Ruby 4.1.0dev (2026-03-06 revision 407dd02c1b52b05ba55a179554b29a14e44a4b82)
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_sized_xfree(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*);
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, bool error);
1720
1721static void
1722next_rescue_context(struct lex_context *next, const struct lex_context *outer, enum rescue_context def)
1723{
1724 next->in_rescue = outer->in_rescue == after_rescue ? after_rescue : def;
1725}
1726
1727static void
1728restore_defun(struct parser_params *p, rb_node_def_temp_t *temp)
1729{
1730 /* See: def_name action */
1731 struct lex_context ctxt = temp->save.ctxt;
1732 p->ctxt.in_def = ctxt.in_def;
1733 p->ctxt.shareable_constant_value = ctxt.shareable_constant_value;
1734 p->ctxt.in_rescue = ctxt.in_rescue;
1735 p->max_numparam = temp->save.max_numparam;
1736 numparam_pop(p, temp->save.numparam_save);
1737 clear_block_exit(p, true);
1738}
1739
1740static void
1741endless_method_name(struct parser_params *p, ID mid, const YYLTYPE *loc)
1742{
1743 if (is_attrset_id(mid)) {
1744 yyerror1(loc, "setter method cannot be defined in an endless method definition");
1745 }
1746 token_info_drop(p, "def", loc->beg_pos);
1747}
1748
1749#define debug_token_line(p, name, line) do { \
1750 if (p->debug) { \
1751 const char *const pcur = p->lex.pcur; \
1752 const char *const ptok = p->lex.ptok; \
1753 rb_parser_printf(p, name ":%d (%d: %"PRIdPTRDIFF"|%"PRIdPTRDIFF"|%"PRIdPTRDIFF")\n", \
1754 line, p->ruby_sourceline, \
1755 ptok - p->lex.pbeg, pcur - ptok, p->lex.pend - pcur); \
1756 } \
1757 } while (0)
1758
1759#define begin_definition(k, loc_beg, loc_end) \
1760 do { \
1761 if (!(p->ctxt.in_class = (k)[0] != 0)) { \
1762 /* singleton class */ \
1763 p->ctxt.cant_return = !p->ctxt.in_def; \
1764 p->ctxt.in_def = 0; \
1765 } \
1766 else if (p->ctxt.in_def) { \
1767 YYLTYPE loc = code_loc_gen(loc_beg, loc_end); \
1768 yyerror1(&loc, k " definition in method body"); \
1769 } \
1770 else { \
1771 p->ctxt.cant_return = 1; \
1772 } \
1773 local_push(p, 0); \
1774 } while (0)
1775
1776#ifndef RIPPER
1777# define ifndef_ripper(x) (x)
1778# define ifdef_ripper(r,x) (x)
1779#else
1780# define ifndef_ripper(x)
1781# define ifdef_ripper(r,x) (r)
1782#endif
1783
1784# define rb_warn0(fmt) WARN_CALL(WARN_ARGS(fmt, 1))
1785# define rb_warn1(fmt,a) WARN_CALL(WARN_ARGS(fmt, 2), (a))
1786# define rb_warn2(fmt,a,b) WARN_CALL(WARN_ARGS(fmt, 3), (a), (b))
1787# define rb_warn3(fmt,a,b,c) WARN_CALL(WARN_ARGS(fmt, 4), (a), (b), (c))
1788# define rb_warn4(fmt,a,b,c,d) WARN_CALL(WARN_ARGS(fmt, 5), (a), (b), (c), (d))
1789# define rb_warning0(fmt) WARNING_CALL(WARNING_ARGS(fmt, 1))
1790# define rb_warning1(fmt,a) WARNING_CALL(WARNING_ARGS(fmt, 2), (a))
1791# define rb_warning2(fmt,a,b) WARNING_CALL(WARNING_ARGS(fmt, 3), (a), (b))
1792# define rb_warning3(fmt,a,b,c) WARNING_CALL(WARNING_ARGS(fmt, 4), (a), (b), (c))
1793# define rb_warning4(fmt,a,b,c,d) WARNING_CALL(WARNING_ARGS(fmt, 5), (a), (b), (c), (d))
1794# define rb_warn0L(l,fmt) WARN_CALL(WARN_ARGS_L(l, fmt, 1))
1795# define rb_warn1L(l,fmt,a) WARN_CALL(WARN_ARGS_L(l, fmt, 2), (a))
1796# define rb_warn2L(l,fmt,a,b) WARN_CALL(WARN_ARGS_L(l, fmt, 3), (a), (b))
1797# define rb_warn3L(l,fmt,a,b,c) WARN_CALL(WARN_ARGS_L(l, fmt, 4), (a), (b), (c))
1798# define rb_warn4L(l,fmt,a,b,c,d) WARN_CALL(WARN_ARGS_L(l, fmt, 5), (a), (b), (c), (d))
1799# define rb_warning0L(l,fmt) WARNING_CALL(WARNING_ARGS_L(l, fmt, 1))
1800# define rb_warning1L(l,fmt,a) WARNING_CALL(WARNING_ARGS_L(l, fmt, 2), (a))
1801# define rb_warning2L(l,fmt,a,b) WARNING_CALL(WARNING_ARGS_L(l, fmt, 3), (a), (b))
1802# define rb_warning3L(l,fmt,a,b,c) WARNING_CALL(WARNING_ARGS_L(l, fmt, 4), (a), (b), (c))
1803# define rb_warning4L(l,fmt,a,b,c,d) WARNING_CALL(WARNING_ARGS_L(l, fmt, 5), (a), (b), (c), (d))
1804#ifdef RIPPER
1805extern const ID id_warn, id_warning, id_gets, id_assoc;
1806# define ERR_MESG() STR_NEW2(mesg) /* to bypass Ripper DSL */
1807# define WARN_S_L(s,l) STR_NEW(s,l)
1808# define WARN_S(s) STR_NEW2(s)
1809# define WARN_I(i) INT2NUM(i)
1810# define WARN_ID(i) rb_id2str(i)
1811# define PRIsWARN PRIsVALUE
1812# define WARN_ARGS(fmt,n) p->value, id_warn, n, rb_usascii_str_new_lit(fmt)
1813# define WARN_ARGS_L(l,fmt,n) WARN_ARGS(fmt,n)
1814# ifdef HAVE_VA_ARGS_MACRO
1815# define WARN_CALL(...) rb_funcall(__VA_ARGS__)
1816# else
1817# define WARN_CALL rb_funcall
1818# endif
1819# define WARNING_ARGS(fmt,n) p->value, id_warning, n, rb_usascii_str_new_lit(fmt)
1820# define WARNING_ARGS_L(l, fmt,n) WARNING_ARGS(fmt,n)
1821# ifdef HAVE_VA_ARGS_MACRO
1822# define WARNING_CALL(...) rb_funcall(__VA_ARGS__)
1823# else
1824# define WARNING_CALL rb_funcall
1825# endif
1826# define compile_error ripper_compile_error
1827#else
1828# define WARN_S_L(s,l) s
1829# define WARN_S(s) s
1830# define WARN_I(i) i
1831# define WARN_ID(i) rb_id2name(i)
1832# define PRIsWARN PRIsVALUE
1833# define WARN_ARGS(fmt,n) WARN_ARGS_L(p->ruby_sourceline,fmt,n)
1834# define WARN_ARGS_L(l,fmt,n) p->ruby_sourcefile, (l), (fmt)
1835# define WARN_CALL rb_compile_warn
1836# define WARNING_ARGS(fmt,n) WARN_ARGS(fmt,n)
1837# define WARNING_ARGS_L(l,fmt,n) WARN_ARGS_L(l,fmt,n)
1838# define WARNING_CALL rb_compile_warning
1839PRINTF_ARGS(static void parser_compile_error(struct parser_params*, const rb_code_location_t *loc, const char *fmt, ...), 3, 4);
1840# define compile_error(p, ...) parser_compile_error(p, NULL, __VA_ARGS__)
1841#endif
1842
1843#define RNODE_EXITS(node) ((rb_node_exits_t*)(node))
1844
1845static NODE *
1846add_block_exit(struct parser_params *p, NODE *node)
1847{
1848 if (!node) {
1849 compile_error(p, "unexpected null node");
1850 return 0;
1851 }
1852 switch (nd_type(node)) {
1853 case NODE_BREAK: case NODE_NEXT: case NODE_REDO: break;
1854 default:
1855 compile_error(p, "add_block_exit: unexpected node: %s", parser_node_name(nd_type(node)));
1856 return node;
1857 }
1858 if (!p->ctxt.in_defined) {
1859 rb_node_exits_t *exits = p->exits;
1860 if (exits) {
1861 RNODE_EXITS(exits->nd_stts)->nd_chain = node;
1862 exits->nd_stts = node;
1863 }
1864 }
1865 return node;
1866}
1867
1868static rb_node_exits_t *
1869init_block_exit(struct parser_params *p)
1870{
1871 rb_node_exits_t *old = p->exits;
1872 rb_node_exits_t *exits = NODE_NEW_INTERNAL(NODE_EXITS, rb_node_exits_t);
1873 exits->nd_chain = 0;
1874 exits->nd_stts = RNODE(exits);
1875 p->exits = exits;
1876 return old;
1877}
1878
1879static rb_node_exits_t *
1880allow_block_exit(struct parser_params *p)
1881{
1882 rb_node_exits_t *exits = p->exits;
1883 p->exits = 0;
1884 return exits;
1885}
1886
1887static void
1888restore_block_exit(struct parser_params *p, rb_node_exits_t *exits)
1889{
1890 p->exits = exits;
1891}
1892
1893static void
1894clear_block_exit(struct parser_params *p, bool error)
1895{
1896 rb_node_exits_t *exits = p->exits;
1897 if (!exits) return;
1898 if (error) {
1899 for (NODE *e = RNODE(exits); (e = RNODE_EXITS(e)->nd_chain) != 0; ) {
1900 switch (nd_type(e)) {
1901 case NODE_BREAK:
1902 yyerror1(&e->nd_loc, "Invalid break");
1903 break;
1904 case NODE_NEXT:
1905 yyerror1(&e->nd_loc, "Invalid next");
1906 break;
1907 case NODE_REDO:
1908 yyerror1(&e->nd_loc, "Invalid redo");
1909 break;
1910 default:
1911 yyerror1(&e->nd_loc, "unexpected node");
1912 goto end_checks; /* no nd_chain */
1913 }
1914 }
1915 end_checks:;
1916 }
1917 exits->nd_stts = RNODE(exits);
1918 exits->nd_chain = 0;
1919}
1920
1921#define WARN_EOL(tok) \
1922 (looking_at_eol_p(p) ? \
1923 (void)rb_warning0("'" tok "' at the end of line without an expression") : \
1924 (void)0)
1925static int looking_at_eol_p(struct parser_params *p);
1926
1927static NODE *
1928get_nd_value(struct parser_params *p, NODE *node)
1929{
1930 switch (nd_type(node)) {
1931 case NODE_GASGN:
1932 return RNODE_GASGN(node)->nd_value;
1933 case NODE_IASGN:
1934 return RNODE_IASGN(node)->nd_value;
1935 case NODE_LASGN:
1936 return RNODE_LASGN(node)->nd_value;
1937 case NODE_DASGN:
1938 return RNODE_DASGN(node)->nd_value;
1939 case NODE_MASGN:
1940 return RNODE_MASGN(node)->nd_value;
1941 case NODE_CVASGN:
1942 return RNODE_CVASGN(node)->nd_value;
1943 case NODE_CDECL:
1944 return RNODE_CDECL(node)->nd_value;
1945 default:
1946 compile_error(p, "get_nd_value: unexpected node: %s", parser_node_name(nd_type(node)));
1947 return 0;
1948 }
1949}
1950
1951static void
1952set_nd_value(struct parser_params *p, NODE *node, NODE *rhs)
1953{
1954 switch (nd_type(node)) {
1955 case NODE_CDECL:
1956 RNODE_CDECL(node)->nd_value = rhs;
1957 break;
1958 case NODE_GASGN:
1959 RNODE_GASGN(node)->nd_value = rhs;
1960 break;
1961 case NODE_IASGN:
1962 RNODE_IASGN(node)->nd_value = rhs;
1963 break;
1964 case NODE_LASGN:
1965 RNODE_LASGN(node)->nd_value = rhs;
1966 break;
1967 case NODE_DASGN:
1968 RNODE_DASGN(node)->nd_value = rhs;
1969 break;
1970 case NODE_MASGN:
1971 RNODE_MASGN(node)->nd_value = rhs;
1972 break;
1973 case NODE_CVASGN:
1974 RNODE_CVASGN(node)->nd_value = rhs;
1975 break;
1976 default:
1977 compile_error(p, "set_nd_value: unexpected node: %s", parser_node_name(nd_type(node)));
1978 break;
1979 }
1980}
1981
1982static ID
1983get_nd_vid(struct parser_params *p, NODE *node)
1984{
1985 switch (nd_type(node)) {
1986 case NODE_CDECL:
1987 return RNODE_CDECL(node)->nd_vid;
1988 case NODE_GASGN:
1989 return RNODE_GASGN(node)->nd_vid;
1990 case NODE_IASGN:
1991 return RNODE_IASGN(node)->nd_vid;
1992 case NODE_LASGN:
1993 return RNODE_LASGN(node)->nd_vid;
1994 case NODE_DASGN:
1995 return RNODE_DASGN(node)->nd_vid;
1996 case NODE_CVASGN:
1997 return RNODE_CVASGN(node)->nd_vid;
1998 default:
1999 compile_error(p, "get_nd_vid: unexpected node: %s", parser_node_name(nd_type(node)));
2000 return 0;
2001 }
2002}
2003
2004static NODE *
2005get_nd_args(struct parser_params *p, NODE *node)
2006{
2007 switch (nd_type(node)) {
2008 case NODE_CALL:
2009 return RNODE_CALL(node)->nd_args;
2010 case NODE_OPCALL:
2011 return RNODE_OPCALL(node)->nd_args;
2012 case NODE_FCALL:
2013 return RNODE_FCALL(node)->nd_args;
2014 case NODE_QCALL:
2015 return RNODE_QCALL(node)->nd_args;
2016 case NODE_SUPER:
2017 return RNODE_SUPER(node)->nd_args;
2018 case NODE_VCALL:
2019 case NODE_ZSUPER:
2020 case NODE_YIELD:
2021 case NODE_RETURN:
2022 case NODE_BREAK:
2023 case NODE_NEXT:
2024 return 0;
2025 default:
2026 compile_error(p, "get_nd_args: unexpected node: %s", parser_node_name(nd_type(node)));
2027 return 0;
2028 }
2029}
2030
2031static st_index_t
2032djb2(const uint8_t *str, size_t len)
2033{
2034 st_index_t hash = 5381;
2035
2036 for (size_t i = 0; i < len; i++) {
2037 hash = ((hash << 5) + hash) + str[i];
2038 }
2039
2040 return hash;
2041}
2042
2043static st_index_t
2044parser_memhash(const void *ptr, long len)
2045{
2046 return djb2(ptr, len);
2047}
2048
2049#define PARSER_STRING_PTR(str) (str->ptr)
2050#define PARSER_STRING_LEN(str) (str->len)
2051#define PARSER_STRING_END(str) (&str->ptr[str->len])
2052#define STRING_SIZE(str) ((size_t)str->len + 1)
2053#define STRING_TERM_LEN(str) (1)
2054#define STRING_TERM_FILL(str) (str->ptr[str->len] = '\0')
2055#define PARSER_STRING_RESIZE_CAPA_TERM(p,str,capacity,termlen) do {\
2056 REALLOC_N(str->ptr, char, (size_t)total + termlen); \
2057 str->len = total; \
2058} while (0)
2059#define STRING_SET_LEN(str, n) do { \
2060 (str)->len = (n); \
2061} while (0)
2062#define PARSER_STRING_GETMEM(str, ptrvar, lenvar) \
2063 ((ptrvar) = str->ptr, \
2064 (lenvar) = str->len)
2065
2066static inline int
2067parser_string_char_at_end(struct parser_params *p, rb_parser_string_t *str, int when_empty)
2068{
2069 return PARSER_STRING_LEN(str) > 0 ? (unsigned char)PARSER_STRING_END(str)[-1] : when_empty;
2070}
2071
2072static rb_parser_string_t *
2073rb_parser_string_new(rb_parser_t *p, const char *ptr, long len)
2074{
2075 rb_parser_string_t *str;
2076
2077 if (len < 0) {
2078 rb_bug("negative string size (or size too big): %ld", len);
2079 }
2080
2081 str = xcalloc(1, sizeof(rb_parser_string_t));
2082 str->ptr = xcalloc(len + 1, sizeof(char));
2083
2084 if (ptr) {
2085 memcpy(PARSER_STRING_PTR(str), ptr, len);
2086 }
2087 STRING_SET_LEN(str, len);
2088 STRING_TERM_FILL(str);
2089 return str;
2090}
2091
2092static rb_parser_string_t *
2093rb_parser_encoding_string_new(rb_parser_t *p, const char *ptr, long len, rb_encoding *enc)
2094{
2095 rb_parser_string_t *str = rb_parser_string_new(p, ptr, len);
2096 str->coderange = RB_PARSER_ENC_CODERANGE_UNKNOWN;
2097 str->enc = enc;
2098 return str;
2099}
2100
2101#ifndef RIPPER
2102rb_parser_string_t *
2103rb_str_to_parser_string(rb_parser_t *p, VALUE str)
2104{
2105 /* Type check */
2106 rb_parser_string_t *ret = rb_parser_encoding_string_new(p, RSTRING_PTR(str), RSTRING_LEN(str), rb_enc_get(str));
2107 RB_GC_GUARD(str);
2108 return ret;
2109}
2110
2111void
2112rb_parser_string_free(rb_parser_t *p, rb_parser_string_t *str)
2113{
2114 if (!str) return;
2115 xfree(PARSER_STRING_PTR(str));
2116 xfree(str);
2117}
2118#endif
2119
2120static st_index_t
2121rb_parser_str_hash(rb_parser_string_t *str)
2122{
2123 return parser_memhash((const void *)PARSER_STRING_PTR(str), PARSER_STRING_LEN(str));
2124}
2125
2126static st_index_t
2127rb_char_p_hash(const char *c)
2128{
2129 return parser_memhash((const void *)c, strlen(c));
2130}
2131
2132static size_t
2133rb_parser_str_capacity(rb_parser_string_t *str, const int termlen)
2134{
2135 return PARSER_STRING_LEN(str);
2136}
2137
2138#ifndef RIPPER
2139static char *
2140rb_parser_string_end(rb_parser_string_t *str)
2141{
2142 return &str->ptr[str->len];
2143}
2144#endif
2145
2146static void
2147rb_parser_string_set_encoding(rb_parser_string_t *str, rb_encoding *enc)
2148{
2149 str->enc = enc;
2150}
2151
2152static rb_encoding *
2153rb_parser_str_get_encoding(rb_parser_string_t *str)
2154{
2155 return str->enc;
2156}
2157
2158#ifndef RIPPER
2159static bool
2160PARSER_ENCODING_IS_ASCII8BIT(struct parser_params *p, rb_parser_string_t *str)
2161{
2162 return rb_parser_str_get_encoding(str) == rb_ascii8bit_encoding();
2163}
2164#endif
2165
2166static int
2167PARSER_ENC_CODERANGE(rb_parser_string_t *str)
2168{
2169 return str->coderange;
2170}
2171
2172static void
2173PARSER_ENC_CODERANGE_SET(rb_parser_string_t *str, int coderange)
2174{
2175 str->coderange = coderange;
2176}
2177
2178static void
2179PARSER_ENCODING_CODERANGE_SET(rb_parser_string_t *str, rb_encoding *enc, enum rb_parser_string_coderange_type cr)
2180{
2181 rb_parser_string_set_encoding(str, enc);
2182 PARSER_ENC_CODERANGE_SET(str, cr);
2183}
2184
2185static void
2186PARSER_ENC_CODERANGE_CLEAR(rb_parser_string_t *str)
2187{
2188 str->coderange = RB_PARSER_ENC_CODERANGE_UNKNOWN;
2189}
2190
2191static bool
2192PARSER_ENC_CODERANGE_ASCIIONLY(rb_parser_string_t *str)
2193{
2194 return PARSER_ENC_CODERANGE(str) == RB_PARSER_ENC_CODERANGE_7BIT;
2195}
2196
2197static bool
2198PARSER_ENC_CODERANGE_CLEAN_P(int cr)
2199{
2200 return cr == RB_PARSER_ENC_CODERANGE_7BIT || cr == RB_PARSER_ENC_CODERANGE_VALID;
2201}
2202
2203static const char *
2204rb_parser_search_nonascii(const char *p, const char *e)
2205{
2206 const char *s = p;
2207
2208 for (; s < e; s++) {
2209 if (*s & 0x80) return s;
2210 }
2211
2212 return NULL;
2213}
2214
2215static int
2216rb_parser_coderange_scan(struct parser_params *p, const char *ptr, long len, rb_encoding *enc)
2217{
2218 const char *e = ptr + len;
2219
2220 if (enc == rb_ascii8bit_encoding()) {
2221 /* enc is ASCII-8BIT. ASCII-8BIT string never be broken. */
2222 ptr = rb_parser_search_nonascii(ptr, e);
2223 return ptr ? RB_PARSER_ENC_CODERANGE_VALID : RB_PARSER_ENC_CODERANGE_7BIT;
2224 }
2225
2226 /* parser string encoding is always asciicompat */
2227 ptr = rb_parser_search_nonascii(ptr, e);
2228 if (!ptr) return RB_PARSER_ENC_CODERANGE_7BIT;
2229 for (;;) {
2230 int ret = rb_enc_precise_mbclen(ptr, e, enc);
2231 if (!MBCLEN_CHARFOUND_P(ret)) return RB_PARSER_ENC_CODERANGE_BROKEN;
2232 ptr += MBCLEN_CHARFOUND_LEN(ret);
2233 if (ptr == e) break;
2234 ptr = rb_parser_search_nonascii(ptr, e);
2235 if (!ptr) break;
2236 }
2237
2238 return RB_PARSER_ENC_CODERANGE_VALID;
2239}
2240
2241static int
2242rb_parser_enc_coderange_scan(struct parser_params *p, rb_parser_string_t *str, rb_encoding *enc)
2243{
2244 return rb_parser_coderange_scan(p, PARSER_STRING_PTR(str), PARSER_STRING_LEN(str), enc);
2245}
2246
2247static int
2248rb_parser_enc_str_coderange(struct parser_params *p, rb_parser_string_t *str)
2249{
2250 int cr = PARSER_ENC_CODERANGE(str);
2251
2252 if (cr == RB_PARSER_ENC_CODERANGE_UNKNOWN) {
2253 cr = rb_parser_enc_coderange_scan(p, str, rb_parser_str_get_encoding(str));
2254 PARSER_ENC_CODERANGE_SET(str, cr);
2255 }
2256
2257 return cr;
2258}
2259
2260static rb_parser_string_t *
2261rb_parser_enc_associate(struct parser_params *p, rb_parser_string_t *str, rb_encoding *enc)
2262{
2263 if (rb_parser_str_get_encoding(str) == enc)
2264 return str;
2265 if (!PARSER_ENC_CODERANGE_ASCIIONLY(str)) {
2266 PARSER_ENC_CODERANGE_CLEAR(str);
2267 }
2268 rb_parser_string_set_encoding(str, enc);
2269 return str;
2270}
2271
2272static bool
2273rb_parser_is_ascii_string(struct parser_params *p, rb_parser_string_t *str)
2274{
2275 return rb_parser_enc_str_coderange(p, str) == RB_PARSER_ENC_CODERANGE_7BIT;
2276}
2277
2278static rb_encoding *
2279rb_parser_enc_compatible(struct parser_params *p, rb_parser_string_t *str1, rb_parser_string_t *str2)
2280{
2281 rb_encoding *enc1 = rb_parser_str_get_encoding(str1);
2282 rb_encoding *enc2 = rb_parser_str_get_encoding(str2);
2283
2284 if (enc1 == NULL || enc2 == NULL)
2285 return 0;
2286
2287 if (enc1 == enc2) {
2288 return enc1;
2289 }
2290
2291 if (PARSER_STRING_LEN(str2) == 0)
2292 return enc1;
2293 if (PARSER_STRING_LEN(str1) == 0)
2294 return rb_parser_is_ascii_string(p, str2) ? enc1 : enc2;
2295
2296 int cr1, cr2;
2297
2298 cr1 = rb_parser_enc_str_coderange(p, str1);
2299 cr2 = rb_parser_enc_str_coderange(p, str2);
2300
2301 if (cr1 != cr2) {
2302 if (cr1 == RB_PARSER_ENC_CODERANGE_7BIT) return enc2;
2303 if (cr2 == RB_PARSER_ENC_CODERANGE_7BIT) return enc1;
2304 }
2305
2306 if (cr2 == RB_PARSER_ENC_CODERANGE_7BIT) {
2307 return enc1;
2308 }
2309
2310 if (cr1 == RB_PARSER_ENC_CODERANGE_7BIT) {
2311 return enc2;
2312 }
2313
2314 return 0;
2315}
2316
2317static void
2318rb_parser_str_modify(rb_parser_string_t *str)
2319{
2320 PARSER_ENC_CODERANGE_CLEAR(str);
2321}
2322
2323static void
2324rb_parser_str_set_len(struct parser_params *p, rb_parser_string_t *str, long len)
2325{
2326 long capa;
2327 const int termlen = STRING_TERM_LEN(str);
2328
2329 if (len > (capa = (long)(rb_parser_str_capacity(str, termlen))) || len < 0) {
2330 rb_bug("probable buffer overflow: %ld for %ld", len, capa);
2331 }
2332
2333 int cr = PARSER_ENC_CODERANGE(str);
2334 if (cr == RB_PARSER_ENC_CODERANGE_UNKNOWN) {
2335 /* Leave unknown. */
2336 }
2337 else if (len > PARSER_STRING_LEN(str)) {
2338 PARSER_ENC_CODERANGE_SET(str, RB_PARSER_ENC_CODERANGE_UNKNOWN);
2339 }
2340 else if (len < PARSER_STRING_LEN(str)) {
2341 if (cr != RB_PARSER_ENC_CODERANGE_7BIT) {
2342 /* ASCII-only string is keeping after truncated. Valid
2343 * and broken may be invalid or valid, leave unknown. */
2344 PARSER_ENC_CODERANGE_SET(str, RB_PARSER_ENC_CODERANGE_UNKNOWN);
2345 }
2346 }
2347
2348 STRING_SET_LEN(str, len);
2349 STRING_TERM_FILL(str);
2350}
2351
2352static rb_parser_string_t *
2353rb_parser_str_buf_cat(struct parser_params *p, rb_parser_string_t *str, const char *ptr, long len)
2354{
2355 rb_parser_str_modify(str);
2356 if (len == 0) return 0;
2357
2358 long total, olen, off = -1;
2359 char *sptr;
2360 const int termlen = STRING_TERM_LEN(str);
2361
2362 PARSER_STRING_GETMEM(str, sptr, olen);
2363 if (ptr >= sptr && ptr <= sptr + olen) {
2364 off = ptr - sptr;
2365 }
2366
2367 if (olen > LONG_MAX - len) {
2368 compile_error(p, "string sizes too big");
2369 return 0;
2370 }
2371 total = olen + len;
2372 PARSER_STRING_RESIZE_CAPA_TERM(p, str, total, termlen);
2373 sptr = PARSER_STRING_PTR(str);
2374 if (off != -1) {
2375 ptr = sptr + off;
2376 }
2377 memcpy(sptr + olen, ptr, len);
2378 STRING_SET_LEN(str, total);
2379 STRING_TERM_FILL(str);
2380
2381 return str;
2382}
2383
2384#define parser_str_cat(str, ptr, len) rb_parser_str_buf_cat(p, str, ptr, len)
2385#define parser_str_cat_cstr(str, lit) rb_parser_str_buf_cat(p, str, lit, strlen(lit))
2386
2387static rb_parser_string_t *
2388rb_parser_enc_cr_str_buf_cat(struct parser_params *p, rb_parser_string_t *str, const char *ptr, long len,
2389 rb_encoding *ptr_enc, int ptr_cr, int *ptr_cr_ret)
2390{
2391 int str_cr, res_cr;
2392 rb_encoding *str_enc, *res_enc;
2393
2394 str_enc = rb_parser_str_get_encoding(str);
2395 str_cr = PARSER_STRING_LEN(str) ? PARSER_ENC_CODERANGE(str) : RB_PARSER_ENC_CODERANGE_7BIT;
2396
2397 if (str_enc == ptr_enc) {
2398 if (str_cr != RB_PARSER_ENC_CODERANGE_UNKNOWN && ptr_cr == RB_PARSER_ENC_CODERANGE_UNKNOWN) {
2399 ptr_cr = rb_parser_coderange_scan(p, ptr, len, ptr_enc);
2400 }
2401 }
2402 else {
2403 /* parser string encoding is always asciicompat */
2404 if (ptr_cr == RB_PARSER_ENC_CODERANGE_UNKNOWN) {
2405 ptr_cr = rb_parser_coderange_scan(p, ptr, len, ptr_enc);
2406 }
2407 if (str_cr == RB_PARSER_ENC_CODERANGE_UNKNOWN) {
2408 if (str_enc == rb_ascii8bit_encoding() || ptr_cr != RB_PARSER_ENC_CODERANGE_7BIT) {
2409 str_cr = rb_parser_enc_str_coderange(p, str);
2410 }
2411 }
2412 }
2413 if (ptr_cr_ret)
2414 *ptr_cr_ret = ptr_cr;
2415
2416 if (str_enc != ptr_enc &&
2417 str_cr != RB_PARSER_ENC_CODERANGE_7BIT &&
2418 ptr_cr != RB_PARSER_ENC_CODERANGE_7BIT) {
2419 goto incompatible;
2420 }
2421
2422 if (str_cr == RB_PARSER_ENC_CODERANGE_UNKNOWN) {
2423 res_enc = str_enc;
2424 res_cr = RB_PARSER_ENC_CODERANGE_UNKNOWN;
2425 }
2426 else if (str_cr == RB_PARSER_ENC_CODERANGE_7BIT) {
2427 if (ptr_cr == RB_PARSER_ENC_CODERANGE_7BIT) {
2428 res_enc = str_enc;
2429 res_cr = RB_PARSER_ENC_CODERANGE_7BIT;
2430 }
2431 else {
2432 res_enc = ptr_enc;
2433 res_cr = ptr_cr;
2434 }
2435 }
2436 else if (str_cr == RB_PARSER_ENC_CODERANGE_VALID) {
2437 res_enc = str_enc;
2438 if (PARSER_ENC_CODERANGE_CLEAN_P(ptr_cr))
2439 res_cr = str_cr;
2440 else
2441 res_cr = ptr_cr;
2442 }
2443 else { /* str_cr == RB_PARSER_ENC_CODERANGE_BROKEN */
2444 res_enc = str_enc;
2445 res_cr = str_cr;
2446 if (0 < len) res_cr = RB_PARSER_ENC_CODERANGE_UNKNOWN;
2447 }
2448
2449 if (len < 0) {
2450 compile_error(p, "negative string size (or size too big)");
2451 }
2452 parser_str_cat(str, ptr, len);
2453 PARSER_ENCODING_CODERANGE_SET(str, res_enc, res_cr);
2454 return str;
2455
2456 incompatible:
2457 compile_error(p, "incompatible character encodings: %s and %s",
2458 rb_enc_name(str_enc), rb_enc_name(ptr_enc));
2459 UNREACHABLE_RETURN(0);
2460
2461}
2462
2463static rb_parser_string_t *
2464rb_parser_enc_str_buf_cat(struct parser_params *p, rb_parser_string_t *str, const char *ptr, long len,
2465 rb_encoding *ptr_enc)
2466{
2467 return rb_parser_enc_cr_str_buf_cat(p, str, ptr, len, ptr_enc, RB_PARSER_ENC_CODERANGE_UNKNOWN, NULL);
2468}
2469
2470static rb_parser_string_t *
2471rb_parser_str_buf_append(struct parser_params *p, rb_parser_string_t *str, rb_parser_string_t *str2)
2472{
2473 int str2_cr = rb_parser_enc_str_coderange(p, str2);
2474
2475 rb_parser_enc_cr_str_buf_cat(p, str, PARSER_STRING_PTR(str2), PARSER_STRING_LEN(str2),
2476 rb_parser_str_get_encoding(str2), str2_cr, &str2_cr);
2477
2478 PARSER_ENC_CODERANGE_SET(str2, str2_cr);
2479
2480 return str;
2481}
2482
2483static rb_parser_string_t *
2484rb_parser_str_resize(struct parser_params *p, rb_parser_string_t *str, long len)
2485{
2486 if (len < 0) {
2487 rb_bug("negative string size (or size too big)");
2488 }
2489
2490 long slen = PARSER_STRING_LEN(str);
2491
2492 if (slen > len && PARSER_ENC_CODERANGE(str) != RB_PARSER_ENC_CODERANGE_7BIT) {
2493 PARSER_ENC_CODERANGE_CLEAR(str);
2494 }
2495
2496 {
2497 long capa;
2498 const int termlen = STRING_TERM_LEN(str);
2499
2500 if ((capa = slen) < len) {
2501 SIZED_REALLOC_N(str->ptr, char, (size_t)len + termlen, STRING_SIZE(str));
2502 }
2503 else if (len == slen) return str;
2504 STRING_SET_LEN(str, len);
2505 STRING_TERM_FILL(str);
2506 }
2507 return str;
2508}
2509
2510# define PARSER_ENC_STRING_GETMEM(str, ptrvar, lenvar, encvar) \
2511 ((ptrvar) = str->ptr, \
2512 (lenvar) = str->len, \
2513 (encvar) = str->enc)
2514
2515static int
2516rb_parser_string_hash_cmp(rb_parser_string_t *str1, rb_parser_string_t *str2)
2517{
2518 long len1, len2;
2519 const char *ptr1, *ptr2;
2520 rb_encoding *enc1, *enc2;
2521
2522 PARSER_ENC_STRING_GETMEM(str1, ptr1, len1, enc1);
2523 PARSER_ENC_STRING_GETMEM(str2, ptr2, len2, enc2);
2524
2525 return (len1 != len2 ||
2526 enc1 != enc2 ||
2527 memcmp(ptr1, ptr2, len1) != 0);
2528}
2529
2530static void
2531rb_parser_ary_extend(rb_parser_t *p, rb_parser_ary_t *ary, long len)
2532{
2533 long i;
2534 if (ary->capa < len) {
2535 ary->capa = len;
2536 ary->data = (rb_parser_ary_data *)xrealloc(ary->data, sizeof(rb_parser_ary_data) * len);
2537 for (i = ary->len; i < len; i++) {
2538 ary->data[i] = 0;
2539 }
2540 }
2541}
2542
2543/*
2544 * Do not call this directly.
2545 * Use rb_parser_ary_new_capa_for_XXX() instead.
2546 */
2547static rb_parser_ary_t *
2548parser_ary_new_capa(rb_parser_t *p, long len)
2549{
2550 if (len < 0) {
2551 rb_bug("negative array size (or size too big): %ld", len);
2552 }
2553 rb_parser_ary_t *ary = xcalloc(1, sizeof(rb_parser_ary_t));
2554 ary->data_type = 0;
2555 ary->len = 0;
2556 ary->capa = len;
2557 if (0 < len) {
2558 ary->data = (rb_parser_ary_data *)xcalloc(len, sizeof(rb_parser_ary_data));
2559 }
2560 else {
2561 ary->data = NULL;
2562 }
2563 return ary;
2564}
2565
2566#ifndef RIPPER
2567static rb_parser_ary_t *
2568rb_parser_ary_new_capa_for_script_line(rb_parser_t *p, long len)
2569{
2570 rb_parser_ary_t *ary = parser_ary_new_capa(p, len);
2571 ary->data_type = PARSER_ARY_DATA_SCRIPT_LINE;
2572 return ary;
2573}
2574
2575static rb_parser_ary_t *
2576rb_parser_ary_new_capa_for_ast_token(rb_parser_t *p, long len)
2577{
2578 rb_parser_ary_t *ary = parser_ary_new_capa(p, len);
2579 ary->data_type = PARSER_ARY_DATA_AST_TOKEN;
2580 return ary;
2581}
2582#endif
2583
2584static rb_parser_ary_t *
2585rb_parser_ary_new_capa_for_node(rb_parser_t *p, long len)
2586{
2587 rb_parser_ary_t *ary = parser_ary_new_capa(p, len);
2588 ary->data_type = PARSER_ARY_DATA_NODE;
2589 return ary;
2590}
2591
2592/*
2593 * Do not call this directly.
2594 * Use rb_parser_ary_push_XXX() instead.
2595 */
2596static rb_parser_ary_t *
2597parser_ary_push(rb_parser_t *p, rb_parser_ary_t *ary, rb_parser_ary_data val)
2598{
2599 if (ary->len == ary->capa) {
2600 rb_parser_ary_extend(p, ary, ary->len == 0 ? 1 : ary->len * 2);
2601 }
2602 ary->data[ary->len++] = val;
2603 return ary;
2604}
2605
2606#ifndef RIPPER
2607static rb_parser_ary_t *
2608rb_parser_ary_push_ast_token(rb_parser_t *p, rb_parser_ary_t *ary, rb_parser_ast_token_t *val)
2609{
2610 if (ary->data_type != PARSER_ARY_DATA_AST_TOKEN) {
2611 rb_bug("unexpected rb_parser_ary_data_type: %d", ary->data_type);
2612 }
2613 return parser_ary_push(p, ary, val);
2614}
2615
2616static rb_parser_ary_t *
2617rb_parser_ary_push_script_line(rb_parser_t *p, rb_parser_ary_t *ary, rb_parser_string_t *val)
2618{
2619 if (ary->data_type != PARSER_ARY_DATA_SCRIPT_LINE) {
2620 rb_bug("unexpected rb_parser_ary_data_type: %d", ary->data_type);
2621 }
2622 return parser_ary_push(p, ary, val);
2623}
2624#endif
2625
2626static rb_parser_ary_t *
2627rb_parser_ary_push_node(rb_parser_t *p, rb_parser_ary_t *ary, NODE *val)
2628{
2629 if (ary->data_type != PARSER_ARY_DATA_NODE) {
2630 rb_bug("unexpected rb_parser_ary_data_type: %d", ary->data_type);
2631 }
2632 return parser_ary_push(p, ary, val);
2633}
2634
2635#ifndef RIPPER
2636static void
2637rb_parser_ast_token_free(rb_parser_t *p, rb_parser_ast_token_t *token)
2638{
2639 if (!token) return;
2640 rb_parser_string_free(p, token->str);
2641 xfree(token);
2642}
2643
2644static void
2645rb_parser_ary_free(rb_parser_t *p, rb_parser_ary_t *ary)
2646{
2647# define foreach_ary(ptr) \
2648 for (rb_parser_ary_data *ptr = ary->data, *const end_ary_data = ptr + ary->len; \
2649 ptr < end_ary_data; ptr++)
2650 switch (ary->data_type) {
2651 case PARSER_ARY_DATA_AST_TOKEN:
2652 foreach_ary(data) {rb_parser_ast_token_free(p, *data);}
2653 break;
2654 case PARSER_ARY_DATA_SCRIPT_LINE:
2655 foreach_ary(data) {rb_parser_string_free(p, *data);}
2656 break;
2657 case PARSER_ARY_DATA_NODE:
2658 /* Do nothing because nodes are freed when rb_ast_t is freed */
2659 break;
2660 default:
2661 rb_bug("unexpected rb_parser_ary_data_type: %d", ary->data_type);
2662 break;
2663 }
2664# undef foreach_ary
2665 xfree(ary->data);
2666 xfree(ary);
2667}
2668
2669#endif /* !RIPPER */
2670
2671#line 2672 "parse.c"
2672
2673# ifndef YY_CAST
2674# ifdef __cplusplus
2675# define YY_CAST(Type, Val) static_cast<Type> (Val)
2676# define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast<Type> (Val)
2677# else
2678# define YY_CAST(Type, Val) ((Type) (Val))
2679# define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val))
2680# endif
2681# endif
2682# ifndef YY_NULLPTR
2683# if defined __cplusplus
2684# if 201103L <= __cplusplus
2685# define YY_NULLPTR nullptr
2686# else
2687# define YY_NULLPTR 0
2688# endif
2689# else
2690# define YY_NULLPTR ((void*)0)
2691# endif
2692# endif
2693
2694#include "parse.h"
2695/* Symbol kind. */
2696enum yysymbol_kind_t
2697{
2698 YYSYMBOL_YYEMPTY = -2,
2699 YYSYMBOL_YYEOF = 0, /* "end-of-input" */
2700 YYSYMBOL_YYerror = 1, /* error */
2701 YYSYMBOL_YYUNDEF = 2, /* "invalid token" */
2702 YYSYMBOL_keyword_class = 3, /* "'class'" */
2703 YYSYMBOL_keyword_module = 4, /* "'module'" */
2704 YYSYMBOL_keyword_def = 5, /* "'def'" */
2705 YYSYMBOL_keyword_undef = 6, /* "'undef'" */
2706 YYSYMBOL_keyword_begin = 7, /* "'begin'" */
2707 YYSYMBOL_keyword_rescue = 8, /* "'rescue'" */
2708 YYSYMBOL_keyword_ensure = 9, /* "'ensure'" */
2709 YYSYMBOL_keyword_end = 10, /* "'end'" */
2710 YYSYMBOL_keyword_if = 11, /* "'if'" */
2711 YYSYMBOL_keyword_unless = 12, /* "'unless'" */
2712 YYSYMBOL_keyword_then = 13, /* "'then'" */
2713 YYSYMBOL_keyword_elsif = 14, /* "'elsif'" */
2714 YYSYMBOL_keyword_else = 15, /* "'else'" */
2715 YYSYMBOL_keyword_case = 16, /* "'case'" */
2716 YYSYMBOL_keyword_when = 17, /* "'when'" */
2717 YYSYMBOL_keyword_while = 18, /* "'while'" */
2718 YYSYMBOL_keyword_until = 19, /* "'until'" */
2719 YYSYMBOL_keyword_for = 20, /* "'for'" */
2720 YYSYMBOL_keyword_break = 21, /* "'break'" */
2721 YYSYMBOL_keyword_next = 22, /* "'next'" */
2722 YYSYMBOL_keyword_redo = 23, /* "'redo'" */
2723 YYSYMBOL_keyword_retry = 24, /* "'retry'" */
2724 YYSYMBOL_keyword_in = 25, /* "'in'" */
2725 YYSYMBOL_keyword_do = 26, /* "'do'" */
2726 YYSYMBOL_keyword_do_cond = 27, /* "'do' for condition" */
2727 YYSYMBOL_keyword_do_block = 28, /* "'do' for block" */
2728 YYSYMBOL_keyword_do_LAMBDA = 29, /* "'do' for lambda" */
2729 YYSYMBOL_keyword_return = 30, /* "'return'" */
2730 YYSYMBOL_keyword_yield = 31, /* "'yield'" */
2731 YYSYMBOL_keyword_super = 32, /* "'super'" */
2732 YYSYMBOL_keyword_self = 33, /* "'self'" */
2733 YYSYMBOL_keyword_nil = 34, /* "'nil'" */
2734 YYSYMBOL_keyword_true = 35, /* "'true'" */
2735 YYSYMBOL_keyword_false = 36, /* "'false'" */
2736 YYSYMBOL_keyword_and = 37, /* "'and'" */
2737 YYSYMBOL_keyword_or = 38, /* "'or'" */
2738 YYSYMBOL_keyword_not = 39, /* "'not'" */
2739 YYSYMBOL_modifier_if = 40, /* "'if' modifier" */
2740 YYSYMBOL_modifier_unless = 41, /* "'unless' modifier" */
2741 YYSYMBOL_modifier_while = 42, /* "'while' modifier" */
2742 YYSYMBOL_modifier_until = 43, /* "'until' modifier" */
2743 YYSYMBOL_modifier_rescue = 44, /* "'rescue' modifier" */
2744 YYSYMBOL_keyword_alias = 45, /* "'alias'" */
2745 YYSYMBOL_keyword_defined = 46, /* "'defined?'" */
2746 YYSYMBOL_keyword_BEGIN = 47, /* "'BEGIN'" */
2747 YYSYMBOL_keyword_END = 48, /* "'END'" */
2748 YYSYMBOL_keyword__LINE__ = 49, /* "'__LINE__'" */
2749 YYSYMBOL_keyword__FILE__ = 50, /* "'__FILE__'" */
2750 YYSYMBOL_keyword__ENCODING__ = 51, /* "'__ENCODING__'" */
2751 YYSYMBOL_tIDENTIFIER = 52, /* "local variable or method" */
2752 YYSYMBOL_tFID = 53, /* "method" */
2753 YYSYMBOL_tGVAR = 54, /* "global variable" */
2754 YYSYMBOL_tIVAR = 55, /* "instance variable" */
2755 YYSYMBOL_tCONSTANT = 56, /* "constant" */
2756 YYSYMBOL_tCVAR = 57, /* "class variable" */
2757 YYSYMBOL_tLABEL = 58, /* "label" */
2758 YYSYMBOL_tINTEGER = 59, /* "integer literal" */
2759 YYSYMBOL_tFLOAT = 60, /* "float literal" */
2760 YYSYMBOL_tRATIONAL = 61, /* "rational literal" */
2761 YYSYMBOL_tIMAGINARY = 62, /* "imaginary literal" */
2762 YYSYMBOL_tCHAR = 63, /* "char literal" */
2763 YYSYMBOL_tNTH_REF = 64, /* "numbered reference" */
2764 YYSYMBOL_tBACK_REF = 65, /* "back reference" */
2765 YYSYMBOL_tSTRING_CONTENT = 66, /* "literal content" */
2766 YYSYMBOL_tREGEXP_END = 67, /* tREGEXP_END */
2767 YYSYMBOL_tDUMNY_END = 68, /* "dummy end" */
2768 YYSYMBOL_69_ = 69, /* '.' */
2769 YYSYMBOL_70_backslash_ = 70, /* "backslash" */
2770 YYSYMBOL_tSP = 71, /* "escaped space" */
2771 YYSYMBOL_72_escaped_horizontal_tab_ = 72, /* "escaped horizontal tab" */
2772 YYSYMBOL_73_escaped_form_feed_ = 73, /* "escaped form feed" */
2773 YYSYMBOL_74_escaped_carriage_return_ = 74, /* "escaped carriage return" */
2774 YYSYMBOL_75_escaped_vertical_tab_ = 75, /* "escaped vertical tab" */
2775 YYSYMBOL_tUPLUS = 76, /* "unary+" */
2776 YYSYMBOL_tUMINUS = 77, /* "unary-" */
2777 YYSYMBOL_tPOW = 78, /* "**" */
2778 YYSYMBOL_tCMP = 79, /* "<=>" */
2779 YYSYMBOL_tEQ = 80, /* "==" */
2780 YYSYMBOL_tEQQ = 81, /* "===" */
2781 YYSYMBOL_tNEQ = 82, /* "!=" */
2782 YYSYMBOL_tGEQ = 83, /* ">=" */
2783 YYSYMBOL_tLEQ = 84, /* "<=" */
2784 YYSYMBOL_tANDOP = 85, /* "&&" */
2785 YYSYMBOL_tOROP = 86, /* "||" */
2786 YYSYMBOL_tMATCH = 87, /* "=~" */
2787 YYSYMBOL_tNMATCH = 88, /* "!~" */
2788 YYSYMBOL_tDOT2 = 89, /* ".." */
2789 YYSYMBOL_tDOT3 = 90, /* "..." */
2790 YYSYMBOL_tBDOT2 = 91, /* "(.." */
2791 YYSYMBOL_tBDOT3 = 92, /* "(..." */
2792 YYSYMBOL_tAREF = 93, /* "[]" */
2793 YYSYMBOL_tASET = 94, /* "[]=" */
2794 YYSYMBOL_tLSHFT = 95, /* "<<" */
2795 YYSYMBOL_tRSHFT = 96, /* ">>" */
2796 YYSYMBOL_tANDDOT = 97, /* "&." */
2797 YYSYMBOL_tCOLON2 = 98, /* "::" */
2798 YYSYMBOL_tCOLON3 = 99, /* ":: at EXPR_BEG" */
2799 YYSYMBOL_tOP_ASGN = 100, /* "operator-assignment" */
2800 YYSYMBOL_tASSOC = 101, /* "=>" */
2801 YYSYMBOL_tLPAREN = 102, /* "(" */
2802 YYSYMBOL_tLPAREN_ARG = 103, /* "( arg" */
2803 YYSYMBOL_tLBRACK = 104, /* "[" */
2804 YYSYMBOL_tLBRACE = 105, /* "{" */
2805 YYSYMBOL_tLBRACE_ARG = 106, /* "{ arg" */
2806 YYSYMBOL_tSTAR = 107, /* "*" */
2807 YYSYMBOL_tDSTAR = 108, /* "**arg" */
2808 YYSYMBOL_tAMPER = 109, /* "&" */
2809 YYSYMBOL_tLAMBDA = 110, /* "->" */
2810 YYSYMBOL_tSYMBEG = 111, /* "symbol literal" */
2811 YYSYMBOL_tSTRING_BEG = 112, /* "string literal" */
2812 YYSYMBOL_tXSTRING_BEG = 113, /* "backtick literal" */
2813 YYSYMBOL_tREGEXP_BEG = 114, /* "regexp literal" */
2814 YYSYMBOL_tWORDS_BEG = 115, /* "word list" */
2815 YYSYMBOL_tQWORDS_BEG = 116, /* "verbatim word list" */
2816 YYSYMBOL_tSYMBOLS_BEG = 117, /* "symbol list" */
2817 YYSYMBOL_tQSYMBOLS_BEG = 118, /* "verbatim symbol list" */
2818 YYSYMBOL_tSTRING_END = 119, /* "terminator" */
2819 YYSYMBOL_tSTRING_DEND = 120, /* "'}'" */
2820 YYSYMBOL_tSTRING_DBEG = 121, /* "'#{'" */
2821 YYSYMBOL_tSTRING_DVAR = 122, /* tSTRING_DVAR */
2822 YYSYMBOL_tLAMBEG = 123, /* tLAMBEG */
2823 YYSYMBOL_tLABEL_END = 124, /* tLABEL_END */
2824 YYSYMBOL_tIGNORED_NL = 125, /* tIGNORED_NL */
2825 YYSYMBOL_tCOMMENT = 126, /* tCOMMENT */
2826 YYSYMBOL_tEMBDOC_BEG = 127, /* tEMBDOC_BEG */
2827 YYSYMBOL_tEMBDOC = 128, /* tEMBDOC */
2828 YYSYMBOL_tEMBDOC_END = 129, /* tEMBDOC_END */
2829 YYSYMBOL_tHEREDOC_BEG = 130, /* tHEREDOC_BEG */
2830 YYSYMBOL_tHEREDOC_END = 131, /* tHEREDOC_END */
2831 YYSYMBOL_k__END__ = 132, /* k__END__ */
2832 YYSYMBOL_tLOWEST = 133, /* tLOWEST */
2833 YYSYMBOL_134_ = 134, /* '=' */
2834 YYSYMBOL_135_ = 135, /* '?' */
2835 YYSYMBOL_136_ = 136, /* ':' */
2836 YYSYMBOL_137_ = 137, /* '>' */
2837 YYSYMBOL_138_ = 138, /* '<' */
2838 YYSYMBOL_139_ = 139, /* '|' */
2839 YYSYMBOL_140_ = 140, /* '^' */
2840 YYSYMBOL_141_ = 141, /* '&' */
2841 YYSYMBOL_142_ = 142, /* '+' */
2842 YYSYMBOL_143_ = 143, /* '-' */
2843 YYSYMBOL_144_ = 144, /* '*' */
2844 YYSYMBOL_145_ = 145, /* '/' */
2845 YYSYMBOL_146_ = 146, /* '%' */
2846 YYSYMBOL_tUMINUS_NUM = 147, /* tUMINUS_NUM */
2847 YYSYMBOL_148_ = 148, /* '!' */
2848 YYSYMBOL_149_ = 149, /* '~' */
2849 YYSYMBOL_tLAST_TOKEN = 150, /* tLAST_TOKEN */
2850 YYSYMBOL_151_ = 151, /* '{' */
2851 YYSYMBOL_152_ = 152, /* '}' */
2852 YYSYMBOL_153_ = 153, /* '[' */
2853 YYSYMBOL_154_n_ = 154, /* '\n' */
2854 YYSYMBOL_155_ = 155, /* ',' */
2855 YYSYMBOL_156_ = 156, /* '`' */
2856 YYSYMBOL_157_ = 157, /* '(' */
2857 YYSYMBOL_158_ = 158, /* ')' */
2858 YYSYMBOL_159_ = 159, /* ']' */
2859 YYSYMBOL_160_ = 160, /* ';' */
2860 YYSYMBOL_161_ = 161, /* ' ' */
2861 YYSYMBOL_YYACCEPT = 162, /* $accept */
2862 YYSYMBOL_option_terms = 163, /* option_terms */
2863 YYSYMBOL_compstmt_top_stmts = 164, /* compstmt_top_stmts */
2864 YYSYMBOL_165_1 = 165, /* $@1 */
2865 YYSYMBOL_program = 166, /* program */
2866 YYSYMBOL_top_stmts = 167, /* top_stmts */
2867 YYSYMBOL_top_stmt = 168, /* top_stmt */
2868 YYSYMBOL_block_open = 169, /* block_open */
2869 YYSYMBOL_begin_block = 170, /* begin_block */
2870 YYSYMBOL_compstmt_stmts = 171, /* compstmt_stmts */
2871 YYSYMBOL_172_2 = 172, /* $@2 */
2872 YYSYMBOL_173_3 = 173, /* $@3 */
2873 YYSYMBOL_bodystmt = 174, /* bodystmt */
2874 YYSYMBOL_175_4 = 175, /* $@4 */
2875 YYSYMBOL_stmts = 176, /* stmts */
2876 YYSYMBOL_stmt_or_begin = 177, /* stmt_or_begin */
2877 YYSYMBOL_178_5 = 178, /* $@5 */
2878 YYSYMBOL_allow_exits = 179, /* allow_exits */
2879 YYSYMBOL_k_END = 180, /* k_END */
2880 YYSYMBOL_181_6 = 181, /* $@6 */
2881 YYSYMBOL_stmt = 182, /* stmt */
2882 YYSYMBOL_asgn_mrhs = 183, /* asgn_mrhs */
2883 YYSYMBOL_asgn_command_rhs = 184, /* asgn_command_rhs */
2884 YYSYMBOL_command_asgn = 185, /* command_asgn */
2885 YYSYMBOL_op_asgn_command_rhs = 186, /* op_asgn_command_rhs */
2886 YYSYMBOL_def_endless_method_endless_command = 187, /* def_endless_method_endless_command */
2887 YYSYMBOL_endless_command = 188, /* endless_command */
2888 YYSYMBOL_option__n_ = 189, /* option_'\n' */
2889 YYSYMBOL_command_rhs = 190, /* command_rhs */
2890 YYSYMBOL_expr = 191, /* expr */
2891 YYSYMBOL_192_7 = 192, /* $@7 */
2892 YYSYMBOL_193_8 = 193, /* $@8 */
2893 YYSYMBOL_def_name = 194, /* def_name */
2894 YYSYMBOL_defn_head = 195, /* defn_head */
2895 YYSYMBOL_196_9 = 196, /* $@9 */
2896 YYSYMBOL_defs_head = 197, /* defs_head */
2897 YYSYMBOL_value_expr_expr = 198, /* value_expr_expr */
2898 YYSYMBOL_expr_value = 199, /* expr_value */
2899 YYSYMBOL_200_10 = 200, /* $@10 */
2900 YYSYMBOL_201_11 = 201, /* $@11 */
2901 YYSYMBOL_expr_value_do = 202, /* expr_value_do */
2902 YYSYMBOL_command_call = 203, /* command_call */
2903 YYSYMBOL_value_expr_command_call = 204, /* value_expr_command_call */
2904 YYSYMBOL_command_call_value = 205, /* command_call_value */
2905 YYSYMBOL_block_command = 206, /* block_command */
2906 YYSYMBOL_cmd_brace_block = 207, /* cmd_brace_block */
2907 YYSYMBOL_fcall = 208, /* fcall */
2908 YYSYMBOL_command = 209, /* command */
2909 YYSYMBOL_mlhs = 210, /* mlhs */
2910 YYSYMBOL_mlhs_inner = 211, /* mlhs_inner */
2911 YYSYMBOL_mlhs_basic = 212, /* mlhs_basic */
2912 YYSYMBOL_mlhs_items_mlhs_item = 213, /* mlhs_items_mlhs_item */
2913 YYSYMBOL_mlhs_item = 214, /* mlhs_item */
2914 YYSYMBOL_mlhs_head = 215, /* mlhs_head */
2915 YYSYMBOL_mlhs_node = 216, /* mlhs_node */
2916 YYSYMBOL_lhs = 217, /* lhs */
2917 YYSYMBOL_cname = 218, /* cname */
2918 YYSYMBOL_cpath = 219, /* cpath */
2919 YYSYMBOL_fname = 220, /* fname */
2920 YYSYMBOL_fitem = 221, /* fitem */
2921 YYSYMBOL_undef_list = 222, /* undef_list */
2922 YYSYMBOL_223_12 = 223, /* $@12 */
2923 YYSYMBOL_op = 224, /* op */
2924 YYSYMBOL_reswords = 225, /* reswords */
2925 YYSYMBOL_asgn_arg_rhs = 226, /* asgn_arg_rhs */
2926 YYSYMBOL_arg = 227, /* arg */
2927 YYSYMBOL_op_asgn_arg_rhs = 228, /* op_asgn_arg_rhs */
2928 YYSYMBOL_range_expr_arg = 229, /* range_expr_arg */
2929 YYSYMBOL_def_endless_method_endless_arg = 230, /* def_endless_method_endless_arg */
2930 YYSYMBOL_ternary = 231, /* ternary */
2931 YYSYMBOL_endless_arg = 232, /* endless_arg */
2932 YYSYMBOL_relop = 233, /* relop */
2933 YYSYMBOL_rel_expr = 234, /* rel_expr */
2934 YYSYMBOL_lex_ctxt = 235, /* lex_ctxt */
2935 YYSYMBOL_begin_defined = 236, /* begin_defined */
2936 YYSYMBOL_after_rescue = 237, /* after_rescue */
2937 YYSYMBOL_value_expr_arg = 238, /* value_expr_arg */
2938 YYSYMBOL_arg_value = 239, /* arg_value */
2939 YYSYMBOL_aref_args = 240, /* aref_args */
2940 YYSYMBOL_arg_rhs = 241, /* arg_rhs */
2941 YYSYMBOL_paren_args = 242, /* paren_args */
2942 YYSYMBOL_opt_paren_args = 243, /* opt_paren_args */
2943 YYSYMBOL_opt_call_args = 244, /* opt_call_args */
2944 YYSYMBOL_value_expr_command = 245, /* value_expr_command */
2945 YYSYMBOL_call_args = 246, /* call_args */
2946 YYSYMBOL_247_13 = 247, /* $@13 */
2947 YYSYMBOL_command_args = 248, /* command_args */
2948 YYSYMBOL_block_arg = 249, /* block_arg */
2949 YYSYMBOL_opt_block_arg = 250, /* opt_block_arg */
2950 YYSYMBOL_args = 251, /* args */
2951 YYSYMBOL_arg_splat = 252, /* arg_splat */
2952 YYSYMBOL_mrhs_arg = 253, /* mrhs_arg */
2953 YYSYMBOL_mrhs = 254, /* mrhs */
2954 YYSYMBOL_primary = 255, /* primary */
2955 YYSYMBOL_256_14 = 256, /* $@14 */
2956 YYSYMBOL_257_15 = 257, /* $@15 */
2957 YYSYMBOL_258_16 = 258, /* @16 */
2958 YYSYMBOL_259_17 = 259, /* @17 */
2959 YYSYMBOL_260_18 = 260, /* $@18 */
2960 YYSYMBOL_261_19 = 261, /* $@19 */
2961 YYSYMBOL_262_20 = 262, /* $@20 */
2962 YYSYMBOL_263_21 = 263, /* $@21 */
2963 YYSYMBOL_264_22 = 264, /* $@22 */
2964 YYSYMBOL_265_23 = 265, /* $@23 */
2965 YYSYMBOL_266_24 = 266, /* $@24 */
2966 YYSYMBOL_value_expr_primary = 267, /* value_expr_primary */
2967 YYSYMBOL_primary_value = 268, /* primary_value */
2968 YYSYMBOL_k_begin = 269, /* k_begin */
2969 YYSYMBOL_k_if = 270, /* k_if */
2970 YYSYMBOL_k_unless = 271, /* k_unless */
2971 YYSYMBOL_k_while = 272, /* k_while */
2972 YYSYMBOL_k_until = 273, /* k_until */
2973 YYSYMBOL_k_case = 274, /* k_case */
2974 YYSYMBOL_k_for = 275, /* k_for */
2975 YYSYMBOL_k_class = 276, /* k_class */
2976 YYSYMBOL_k_module = 277, /* k_module */
2977 YYSYMBOL_k_def = 278, /* k_def */
2978 YYSYMBOL_k_do = 279, /* k_do */
2979 YYSYMBOL_k_do_block = 280, /* k_do_block */
2980 YYSYMBOL_k_rescue = 281, /* k_rescue */
2981 YYSYMBOL_k_ensure = 282, /* k_ensure */
2982 YYSYMBOL_k_when = 283, /* k_when */
2983 YYSYMBOL_k_else = 284, /* k_else */
2984 YYSYMBOL_k_elsif = 285, /* k_elsif */
2985 YYSYMBOL_k_end = 286, /* k_end */
2986 YYSYMBOL_k_return = 287, /* k_return */
2987 YYSYMBOL_k_yield = 288, /* k_yield */
2988 YYSYMBOL_then = 289, /* then */
2989 YYSYMBOL_do = 290, /* do */
2990 YYSYMBOL_if_tail = 291, /* if_tail */
2991 YYSYMBOL_opt_else = 292, /* opt_else */
2992 YYSYMBOL_for_var = 293, /* for_var */
2993 YYSYMBOL_f_marg = 294, /* f_marg */
2994 YYSYMBOL_mlhs_items_f_marg = 295, /* mlhs_items_f_marg */
2995 YYSYMBOL_f_margs = 296, /* f_margs */
2996 YYSYMBOL_f_rest_marg = 297, /* f_rest_marg */
2997 YYSYMBOL_f_any_kwrest = 298, /* f_any_kwrest */
2998 YYSYMBOL_299_25 = 299, /* $@25 */
2999 YYSYMBOL_f_eq = 300, /* f_eq */
3000 YYSYMBOL_f_kw_primary_value = 301, /* f_kw_primary_value */
3001 YYSYMBOL_f_kwarg_primary_value = 302, /* f_kwarg_primary_value */
3002 YYSYMBOL_args_tail_basic_primary_value = 303, /* args_tail_basic_primary_value */
3003 YYSYMBOL_block_args_tail = 304, /* block_args_tail */
3004 YYSYMBOL_opt_args_tail_block_args_tail = 305, /* opt_args_tail_block_args_tail */
3005 YYSYMBOL_block_args_opt_tail = 306, /* block_args-opt_tail */
3006 YYSYMBOL_excessed_comma = 307, /* excessed_comma */
3007 YYSYMBOL_f_opt_primary_value = 308, /* f_opt_primary_value */
3008 YYSYMBOL_f_opt_arg_primary_value = 309, /* f_opt_arg_primary_value */
3009 YYSYMBOL_args_list_primary_value_block_args_opt_tail = 310, /* args-list_primary_value_block_args-opt_tail */
3010 YYSYMBOL_block_param = 311, /* block_param */
3011 YYSYMBOL_tail_only_args_block_args_tail = 312, /* tail-only-args_block_args_tail */
3012 YYSYMBOL_opt_block_param_def = 313, /* opt_block_param_def */
3013 YYSYMBOL_block_param_def = 314, /* block_param_def */
3014 YYSYMBOL_opt_block_param = 315, /* opt_block_param */
3015 YYSYMBOL_opt_bv_decl = 316, /* opt_bv_decl */
3016 YYSYMBOL_bv_decls = 317, /* bv_decls */
3017 YYSYMBOL_bvar = 318, /* bvar */
3018 YYSYMBOL_max_numparam = 319, /* max_numparam */
3019 YYSYMBOL_numparam = 320, /* numparam */
3020 YYSYMBOL_it_id = 321, /* it_id */
3021 YYSYMBOL_322_26 = 322, /* @26 */
3022 YYSYMBOL_323_27 = 323, /* $@27 */
3023 YYSYMBOL_lambda = 324, /* lambda */
3024 YYSYMBOL_f_larglist = 325, /* f_larglist */
3025 YYSYMBOL_lambda_body = 326, /* lambda_body */
3026 YYSYMBOL_327_28 = 327, /* $@28 */
3027 YYSYMBOL_do_block = 328, /* do_block */
3028 YYSYMBOL_block_call = 329, /* block_call */
3029 YYSYMBOL_method_call = 330, /* method_call */
3030 YYSYMBOL_brace_block = 331, /* brace_block */
3031 YYSYMBOL_332_29 = 332, /* @29 */
3032 YYSYMBOL_brace_body = 333, /* brace_body */
3033 YYSYMBOL_334_30 = 334, /* @30 */
3034 YYSYMBOL_do_body = 335, /* do_body */
3035 YYSYMBOL_case_args = 336, /* case_args */
3036 YYSYMBOL_case_body = 337, /* case_body */
3037 YYSYMBOL_cases = 338, /* cases */
3038 YYSYMBOL_p_pvtbl = 339, /* p_pvtbl */
3039 YYSYMBOL_p_pktbl = 340, /* p_pktbl */
3040 YYSYMBOL_p_in_kwarg = 341, /* p_in_kwarg */
3041 YYSYMBOL_342_31 = 342, /* $@31 */
3042 YYSYMBOL_p_case_body = 343, /* p_case_body */
3043 YYSYMBOL_p_cases = 344, /* p_cases */
3044 YYSYMBOL_p_top_expr = 345, /* p_top_expr */
3045 YYSYMBOL_p_top_expr_body = 346, /* p_top_expr_body */
3046 YYSYMBOL_p_expr = 347, /* p_expr */
3047 YYSYMBOL_p_as = 348, /* p_as */
3048 YYSYMBOL_349_32 = 349, /* $@32 */
3049 YYSYMBOL_p_alt = 350, /* p_alt */
3050 YYSYMBOL_p_lparen = 351, /* p_lparen */
3051 YYSYMBOL_p_lbracket = 352, /* p_lbracket */
3052 YYSYMBOL_p_expr_basic = 353, /* p_expr_basic */
3053 YYSYMBOL_354_33 = 354, /* $@33 */
3054 YYSYMBOL_p_args = 355, /* p_args */
3055 YYSYMBOL_p_args_head = 356, /* p_args_head */
3056 YYSYMBOL_p_args_tail = 357, /* p_args_tail */
3057 YYSYMBOL_p_find = 358, /* p_find */
3058 YYSYMBOL_p_rest = 359, /* p_rest */
3059 YYSYMBOL_p_args_post = 360, /* p_args_post */
3060 YYSYMBOL_p_arg = 361, /* p_arg */
3061 YYSYMBOL_p_kwargs = 362, /* p_kwargs */
3062 YYSYMBOL_p_kwarg = 363, /* p_kwarg */
3063 YYSYMBOL_p_kw = 364, /* p_kw */
3064 YYSYMBOL_p_kw_label = 365, /* p_kw_label */
3065 YYSYMBOL_p_kwrest = 366, /* p_kwrest */
3066 YYSYMBOL_p_kwnorest = 367, /* p_kwnorest */
3067 YYSYMBOL_p_any_kwrest = 368, /* p_any_kwrest */
3068 YYSYMBOL_p_value = 369, /* p_value */
3069 YYSYMBOL_range_expr_p_primitive = 370, /* range_expr_p_primitive */
3070 YYSYMBOL_p_primitive = 371, /* p_primitive */
3071 YYSYMBOL_p_variable = 372, /* p_variable */
3072 YYSYMBOL_p_var_ref = 373, /* p_var_ref */
3073 YYSYMBOL_p_expr_ref = 374, /* p_expr_ref */
3074 YYSYMBOL_p_const = 375, /* p_const */
3075 YYSYMBOL_opt_rescue = 376, /* opt_rescue */
3076 YYSYMBOL_exc_list = 377, /* exc_list */
3077 YYSYMBOL_exc_var = 378, /* exc_var */
3078 YYSYMBOL_opt_ensure = 379, /* opt_ensure */
3079 YYSYMBOL_literal = 380, /* literal */
3080 YYSYMBOL_strings = 381, /* strings */
3081 YYSYMBOL_string = 382, /* string */
3082 YYSYMBOL_string1 = 383, /* string1 */
3083 YYSYMBOL_xstring = 384, /* xstring */
3084 YYSYMBOL_regexp = 385, /* regexp */
3085 YYSYMBOL_nonempty_list__ = 386, /* nonempty_list_' ' */
3086 YYSYMBOL_words_tWORDS_BEG_word_list = 387, /* words_tWORDS_BEG_word_list */
3087 YYSYMBOL_words = 388, /* words */
3088 YYSYMBOL_word_list = 389, /* word_list */
3089 YYSYMBOL_word = 390, /* word */
3090 YYSYMBOL_words_tSYMBOLS_BEG_symbol_list = 391, /* words_tSYMBOLS_BEG_symbol_list */
3091 YYSYMBOL_symbols = 392, /* symbols */
3092 YYSYMBOL_symbol_list = 393, /* symbol_list */
3093 YYSYMBOL_words_tQWORDS_BEG_qword_list = 394, /* words_tQWORDS_BEG_qword_list */
3094 YYSYMBOL_qwords = 395, /* qwords */
3095 YYSYMBOL_words_tQSYMBOLS_BEG_qsym_list = 396, /* words_tQSYMBOLS_BEG_qsym_list */
3096 YYSYMBOL_qsymbols = 397, /* qsymbols */
3097 YYSYMBOL_qword_list = 398, /* qword_list */
3098 YYSYMBOL_qsym_list = 399, /* qsym_list */
3099 YYSYMBOL_string_contents = 400, /* string_contents */
3100 YYSYMBOL_xstring_contents = 401, /* xstring_contents */
3101 YYSYMBOL_regexp_contents = 402, /* regexp_contents */
3102 YYSYMBOL_string_content = 403, /* string_content */
3103 YYSYMBOL_404_34 = 404, /* @34 */
3104 YYSYMBOL_405_35 = 405, /* @35 */
3105 YYSYMBOL_406_36 = 406, /* @36 */
3106 YYSYMBOL_407_37 = 407, /* @37 */
3107 YYSYMBOL_string_dend = 408, /* string_dend */
3108 YYSYMBOL_string_dvar = 409, /* string_dvar */
3109 YYSYMBOL_symbol = 410, /* symbol */
3110 YYSYMBOL_ssym = 411, /* ssym */
3111 YYSYMBOL_sym = 412, /* sym */
3112 YYSYMBOL_dsym = 413, /* dsym */
3113 YYSYMBOL_numeric = 414, /* numeric */
3114 YYSYMBOL_simple_numeric = 415, /* simple_numeric */
3115 YYSYMBOL_nonlocal_var = 416, /* nonlocal_var */
3116 YYSYMBOL_user_variable = 417, /* user_variable */
3117 YYSYMBOL_keyword_variable = 418, /* keyword_variable */
3118 YYSYMBOL_var_ref = 419, /* var_ref */
3119 YYSYMBOL_var_lhs = 420, /* var_lhs */
3120 YYSYMBOL_backref = 421, /* backref */
3121 YYSYMBOL_422_38 = 422, /* $@38 */
3122 YYSYMBOL_superclass = 423, /* superclass */
3123 YYSYMBOL_f_opt_paren_args = 424, /* f_opt_paren_args */
3124 YYSYMBOL_f_empty_arg = 425, /* f_empty_arg */
3125 YYSYMBOL_f_paren_args = 426, /* f_paren_args */
3126 YYSYMBOL_f_arglist = 427, /* f_arglist */
3127 YYSYMBOL_428_39 = 428, /* @39 */
3128 YYSYMBOL_f_kw_arg_value = 429, /* f_kw_arg_value */
3129 YYSYMBOL_f_kwarg_arg_value = 430, /* f_kwarg_arg_value */
3130 YYSYMBOL_args_tail_basic_arg_value = 431, /* args_tail_basic_arg_value */
3131 YYSYMBOL_args_tail = 432, /* args_tail */
3132 YYSYMBOL_opt_args_tail_args_tail = 433, /* opt_args_tail_args_tail */
3133 YYSYMBOL_f_args_opt_tail = 434, /* f_args-opt_tail */
3134 YYSYMBOL_f_opt_arg_value = 435, /* f_opt_arg_value */
3135 YYSYMBOL_f_opt_arg_arg_value = 436, /* f_opt_arg_arg_value */
3136 YYSYMBOL_args_list_arg_value_f_args_opt_tail = 437, /* args-list_arg_value_f_args-opt_tail */
3137 YYSYMBOL_f_args = 438, /* f_args */
3138 YYSYMBOL_tail_only_args_args_tail = 439, /* tail-only-args_args_tail */
3139 YYSYMBOL_args_forward = 440, /* args_forward */
3140 YYSYMBOL_f_bad_arg = 441, /* f_bad_arg */
3141 YYSYMBOL_f_norm_arg = 442, /* f_norm_arg */
3142 YYSYMBOL_f_arg_asgn = 443, /* f_arg_asgn */
3143 YYSYMBOL_f_arg_item = 444, /* f_arg_item */
3144 YYSYMBOL_f_arg = 445, /* f_arg */
3145 YYSYMBOL_f_label = 446, /* f_label */
3146 YYSYMBOL_kwrest_mark = 447, /* kwrest_mark */
3147 YYSYMBOL_f_no_kwarg = 448, /* f_no_kwarg */
3148 YYSYMBOL_f_kwrest = 449, /* f_kwrest */
3149 YYSYMBOL_restarg_mark = 450, /* restarg_mark */
3150 YYSYMBOL_f_rest_arg = 451, /* f_rest_arg */
3151 YYSYMBOL_blkarg_mark = 452, /* blkarg_mark */
3152 YYSYMBOL_f_block_arg = 453, /* f_block_arg */
3153 YYSYMBOL_opt_f_block_arg = 454, /* opt_f_block_arg */
3154 YYSYMBOL_value_expr_singleton_expr = 455, /* value_expr_singleton_expr */
3155 YYSYMBOL_singleton = 456, /* singleton */
3156 YYSYMBOL_singleton_expr = 457, /* singleton_expr */
3157 YYSYMBOL_458_40 = 458, /* $@40 */
3158 YYSYMBOL_assoc_list = 459, /* assoc_list */
3159 YYSYMBOL_assocs = 460, /* assocs */
3160 YYSYMBOL_assoc = 461, /* assoc */
3161 YYSYMBOL_operation2 = 462, /* operation2 */
3162 YYSYMBOL_operation3 = 463, /* operation3 */
3163 YYSYMBOL_dot_or_colon = 464, /* dot_or_colon */
3164 YYSYMBOL_call_op = 465, /* call_op */
3165 YYSYMBOL_call_op2 = 466, /* call_op2 */
3166 YYSYMBOL_rparen = 467, /* rparen */
3167 YYSYMBOL_rbracket = 468, /* rbracket */
3168 YYSYMBOL_rbrace = 469, /* rbrace */
3169 YYSYMBOL_trailer = 470, /* trailer */
3170 YYSYMBOL_term = 471, /* term */
3171 YYSYMBOL_terms = 472, /* terms */
3172 YYSYMBOL_none = 473 /* none */
3173};
3174typedef enum yysymbol_kind_t yysymbol_kind_t;
3175
3176
3177
3178
3179#ifdef short
3180# undef short
3181#endif
3182
3183/* On compilers that do not define __PTRDIFF_MAX__ etc., make sure
3184 <limits.h> and (if available) <stdint.h> are included
3185 so that the code can choose integer types of a good width. */
3186
3187#ifndef __PTRDIFF_MAX__
3188# include <limits.h> /* INFRINGES ON USER NAME SPACE */
3189# if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
3190# include <stdint.h> /* INFRINGES ON USER NAME SPACE */
3191# define YY_STDINT_H
3192# endif
3193#endif
3194
3195/* Narrow types that promote to a signed type and that can represent a
3196 signed or unsigned integer of at least N bits. In tables they can
3197 save space and decrease cache pressure. Promoting to a signed type
3198 helps avoid bugs in integer arithmetic. */
3199
3200#ifdef __INT_LEAST8_MAX__
3201typedef __INT_LEAST8_TYPE__ yytype_int8;
3202#elif defined YY_STDINT_H
3203typedef int_least8_t yytype_int8;
3204#else
3205typedef signed char yytype_int8;
3206#endif
3207
3208#ifdef __INT_LEAST16_MAX__
3209typedef __INT_LEAST16_TYPE__ yytype_int16;
3210#elif defined YY_STDINT_H
3211typedef int_least16_t yytype_int16;
3212#else
3213typedef short yytype_int16;
3214#endif
3215
3216/* Work around bug in HP-UX 11.23, which defines these macros
3217 incorrectly for preprocessor constants. This workaround can likely
3218 be removed in 2023, as HPE has promised support for HP-UX 11.23
3219 (aka HP-UX 11i v2) only through the end of 2022; see Table 2 of
3220 <https://h20195.www2.hpe.com/V2/getpdf.aspx/4AA4-7673ENW.pdf>. */
3221#ifdef __hpux
3222# undef UINT_LEAST8_MAX
3223# undef UINT_LEAST16_MAX
3224# define UINT_LEAST8_MAX 255
3225# define UINT_LEAST16_MAX 65535
3226#endif
3227
3228#if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__
3229typedef __UINT_LEAST8_TYPE__ yytype_uint8;
3230#elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \
3231 && UINT_LEAST8_MAX <= INT_MAX)
3232typedef uint_least8_t yytype_uint8;
3233#elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX
3234typedef unsigned char yytype_uint8;
3235#else
3236typedef short yytype_uint8;
3237#endif
3238
3239#if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__
3240typedef __UINT_LEAST16_TYPE__ yytype_uint16;
3241#elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \
3242 && UINT_LEAST16_MAX <= INT_MAX)
3243typedef uint_least16_t yytype_uint16;
3244#elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX
3245typedef unsigned short yytype_uint16;
3246#else
3247typedef int yytype_uint16;
3248#endif
3249
3250#ifndef YYPTRDIFF_T
3251# if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__
3252# define YYPTRDIFF_T __PTRDIFF_TYPE__
3253# define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__
3254# elif defined PTRDIFF_MAX
3255# ifndef ptrdiff_t
3256# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
3257# endif
3258# define YYPTRDIFF_T ptrdiff_t
3259# define YYPTRDIFF_MAXIMUM PTRDIFF_MAX
3260# else
3261# define YYPTRDIFF_T long
3262# define YYPTRDIFF_MAXIMUM LONG_MAX
3263# endif
3264#endif
3265
3266#ifndef YYSIZE_T
3267# ifdef __SIZE_TYPE__
3268# define YYSIZE_T __SIZE_TYPE__
3269# elif defined size_t
3270# define YYSIZE_T size_t
3271# elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
3272# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
3273# define YYSIZE_T size_t
3274# else
3275# define YYSIZE_T unsigned
3276# endif
3277#endif
3278
3279#define YYSIZE_MAXIMUM \
3280 YY_CAST (YYPTRDIFF_T, \
3281 (YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1) \
3282 ? YYPTRDIFF_MAXIMUM \
3283 : YY_CAST (YYSIZE_T, -1)))
3284
3285#define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X))
3286
3287
3288/* Stored state numbers (used for stacks). */
3289typedef yytype_int16 yy_state_t;
3290
3291/* State numbers in computations. */
3292typedef int yy_state_fast_t;
3293
3294#ifndef YY_
3295# if defined YYENABLE_NLS && YYENABLE_NLS
3296# if ENABLE_NLS
3297# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
3298# define YY_(Msgid) dgettext ("bison-runtime", Msgid)
3299# endif
3300# endif
3301# ifndef YY_
3302# define YY_(Msgid) Msgid
3303# endif
3304#endif
3305
3306
3307#ifndef YY_ATTRIBUTE_PURE
3308# if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__)
3309# define YY_ATTRIBUTE_PURE __attribute__ ((__pure__))
3310# else
3311# define YY_ATTRIBUTE_PURE
3312# endif
3313#endif
3314
3315#ifndef YY_ATTRIBUTE_UNUSED
3316# if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__)
3317# define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
3318# else
3319# define YY_ATTRIBUTE_UNUSED
3320# endif
3321#endif
3322
3323/* Suppress unused-variable warnings by "using" E. */
3324#if ! defined lint || defined __GNUC__
3325# define YY_USE(E) ((void) (E))
3326#else
3327# define YY_USE(E) /* empty */
3328#endif
3329
3330/* Suppress an incorrect diagnostic about yylval being uninitialized. */
3331#if defined __GNUC__ && ! defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__
3332# if __GNUC__ * 100 + __GNUC_MINOR__ < 407
3333# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
3334 _Pragma ("GCC diagnostic push") \
3335 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")
3336# else
3337# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
3338 _Pragma ("GCC diagnostic push") \
3339 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \
3340 _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
3341# endif
3342# define YY_IGNORE_MAYBE_UNINITIALIZED_END \
3343 _Pragma ("GCC diagnostic pop")
3344#else
3345# define YY_INITIAL_VALUE(Value) Value
3346#endif
3347#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
3348# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
3349# define YY_IGNORE_MAYBE_UNINITIALIZED_END
3350#endif
3351#ifndef YY_INITIAL_VALUE
3352# define YY_INITIAL_VALUE(Value) /* Nothing. */
3353#endif
3354
3355#if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__
3356# define YY_IGNORE_USELESS_CAST_BEGIN \
3357 _Pragma ("GCC diagnostic push") \
3358 _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"")
3359# define YY_IGNORE_USELESS_CAST_END \
3360 _Pragma ("GCC diagnostic pop")
3361#endif
3362#ifndef YY_IGNORE_USELESS_CAST_BEGIN
3363# define YY_IGNORE_USELESS_CAST_BEGIN
3364# define YY_IGNORE_USELESS_CAST_END
3365#endif
3366
3367
3368#define YY_ASSERT(E) ((void) (0 && (E)))
3369
3370#if 1
3371
3372/* The parser invokes alloca or malloc; define the necessary symbols. */
3373
3374# ifdef YYSTACK_USE_ALLOCA
3375# if YYSTACK_USE_ALLOCA
3376# ifdef __GNUC__
3377# define YYSTACK_ALLOC __builtin_alloca
3378# elif defined __BUILTIN_VA_ARG_INCR
3379# include <alloca.h> /* INFRINGES ON USER NAME SPACE */
3380# elif defined _AIX
3381# define YYSTACK_ALLOC __alloca
3382# elif defined _MSC_VER
3383# include <malloc.h> /* INFRINGES ON USER NAME SPACE */
3384# define alloca _alloca
3385# else
3386# define YYSTACK_ALLOC alloca
3387# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
3388# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
3389 /* Use EXIT_SUCCESS as a witness for stdlib.h. */
3390# ifndef EXIT_SUCCESS
3391# define EXIT_SUCCESS 0
3392# endif
3393# endif
3394# endif
3395# endif
3396# endif
3397
3398# ifdef YYSTACK_ALLOC
3399 /* Pacify GCC's 'empty if-body' warning. */
3400# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
3401# ifndef YYSTACK_ALLOC_MAXIMUM
3402 /* The OS might guarantee only one guard page at the bottom of the stack,
3403 and a page size can be as small as 4096 bytes. So we cannot safely
3404 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
3405 to allow for a few compiler-allocated temporary stack slots. */
3406# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
3407# endif
3408# else
3409# define YYSTACK_ALLOC YYMALLOC
3410# define YYSTACK_FREE YYFREE
3411# ifndef YYSTACK_ALLOC_MAXIMUM
3412# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
3413# endif
3414# if (defined __cplusplus && ! defined EXIT_SUCCESS \
3415 && ! ((defined YYMALLOC || defined malloc) \
3416 && (defined YYFREE || defined free)))
3417# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
3418# ifndef EXIT_SUCCESS
3419# define EXIT_SUCCESS 0
3420# endif
3421# endif
3422# ifndef YYMALLOC
3423# define YYMALLOC malloc
3424# if ! defined malloc && ! defined EXIT_SUCCESS
3425void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
3426# endif
3427# endif
3428# ifndef YYFREE
3429# define YYFREE free
3430# if ! defined free && ! defined EXIT_SUCCESS
3431void free (void *); /* INFRINGES ON USER NAME SPACE */
3432# endif
3433# endif
3434# endif
3435#endif /* 1 */
3436
3437#if (! defined yyoverflow \
3438 && (! defined __cplusplus \
3439 || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \
3440 && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
3441
3442/* A type that is properly aligned for any stack member. */
3443union yyalloc
3444{
3445 yy_state_t yyss_alloc;
3446 YYSTYPE yyvs_alloc;
3447 YYLTYPE yyls_alloc;
3448};
3449
3450/* The size of the maximum gap between one aligned stack and the next. */
3451# define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1)
3452
3453/* The size of an array large to enough to hold all stacks, each with
3454 N elements. */
3455# define YYSTACK_BYTES(N) \
3456 ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE) \
3457 + YYSIZEOF (YYLTYPE)) \
3458 + 2 * YYSTACK_GAP_MAXIMUM)
3459
3460# define YYCOPY_NEEDED 1
3461
3462/* Relocate STACK from its old location to the new one. The
3463 local variables YYSIZE and YYSTACKSIZE give the old and new number of
3464 elements in the stack, and YYPTR gives the new location of the
3465 stack. Advance YYPTR to a properly aligned location for the next
3466 stack. */
3467# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
3468 do \
3469 { \
3470 YYPTRDIFF_T yynewbytes; \
3471 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
3472 Stack = &yyptr->Stack_alloc; \
3473 yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \
3474 yyptr += yynewbytes / YYSIZEOF (*yyptr); \
3475 } \
3476 while (0)
3477
3478#endif
3479
3480#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
3481/* Copy COUNT objects from SRC to DST. The source and destination do
3482 not overlap. */
3483# ifndef YYCOPY
3484# if defined __GNUC__ && 1 < __GNUC__
3485# define YYCOPY(Dst, Src, Count) \
3486 __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src)))
3487# else
3488# define YYCOPY(Dst, Src, Count) \
3489 do \
3490 { \
3491 YYPTRDIFF_T yyi; \
3492 for (yyi = 0; yyi < (Count); yyi++) \
3493 (Dst)[yyi] = (Src)[yyi]; \
3494 } \
3495 while (0)
3496# endif
3497# endif
3498#endif /* !YYCOPY_NEEDED */
3499
3500/* YYFINAL -- State number of the termination state. */
3501#define YYFINAL 143
3502/* YYLAST -- Last index in YYTABLE. */
3503#define YYLAST 16541
3504
3505/* YYNTOKENS -- Number of terminals. */
3506#define YYNTOKENS 162
3507/* YYNNTS -- Number of nonterminals. */
3508#define YYNNTS 312
3509/* YYNRULES -- Number of rules. */
3510#define YYNRULES 823
3511/* YYNSTATES -- Number of states. */
3512#define YYNSTATES 1386
3513
3514/* YYMAXUTOK -- Last valid token kind. */
3515#define YYMAXUTOK 361
3516
3517
3518/* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM
3519 as returned by yylex, with out-of-bounds checking. */
3520#define YYTRANSLATE(YYX) \
3521 (0 <= (YYX) && (YYX) <= YYMAXUTOK \
3522 ? YY_CAST (yysymbol_kind_t, yytranslate[YYX]) \
3523 : YYSYMBOL_YYUNDEF)
3524
3525/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
3526 as returned by yylex. */
3527static const yytype_uint8 yytranslate[] =
3528{
3529 0, 2, 2, 2, 2, 2, 2, 2, 2, 72,
3530 154, 75, 73, 74, 2, 2, 2, 2, 2, 2,
3531 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3532 2, 2, 161, 148, 2, 2, 2, 146, 141, 2,
3533 157, 158, 144, 142, 155, 143, 69, 145, 2, 2,
3534 2, 2, 2, 2, 2, 2, 2, 2, 136, 160,
3535 138, 134, 137, 135, 2, 2, 2, 2, 2, 2,
3536 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3537 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3538 2, 153, 70, 159, 140, 2, 156, 2, 2, 2,
3539 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3540 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3541 2, 2, 2, 151, 139, 152, 149, 2, 89, 90,
3542 91, 92, 76, 77, 78, 79, 95, 96, 84, 83,
3543 80, 81, 82, 87, 88, 93, 94, 98, 85, 86,
3544 97, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3545 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3546 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3547 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3548 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3549 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3550 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3551 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3552 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3553 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3554 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
3555 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
3556 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
3557 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
3558 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
3559 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
3560 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
3561 65, 66, 67, 68, 71, 99, 100, 101, 102, 103,
3562 104, 105, 106, 107, 108, 109, 110, 111, 112, 113,
3563 114, 115, 116, 117, 118, 119, 120, 121, 122, 123,
3564 124, 125, 126, 127, 128, 129, 130, 131, 132, 133,
3565 147, 150
3566};
3567
3568#if YYDEBUG
3569/* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
3570static const yytype_int16 yyrline[] =
3571{
3572 0, 3167, 3161, 3167, 3167, 3167, 3167, 3187, 3192, 3197,
3573 3204, 3209, 3216, 3218, 3236, 3232, 3237, 3236, 3248, 3245,
3574 3258, 3263, 3268, 3275, 3277, 3276, 3286, 3288, 3295, 3295,
3575 3300, 3305, 3313, 3322, 3329, 3335, 3341, 3352, 3363, 3372,
3576 3386, 3387, 3392, 3392, 3393, 3404, 3409, 3410, 3417, 3417,
3577 3418, 3418, 3418, 3418, 3418, 3418, 3418, 3418, 3418, 3419,
3578 3419, 3419, 3422, 3423, 3429, 3429, 3429, 3436, 3437, 3444,
3579 3447, 3448, 3453, 3458, 3463, 3469, 3468, 3484, 3483, 3498,
3580 3501, 3512, 3522, 3521, 3535, 3535, 3536, 3542, 3542, 3542,
3581 3549, 3550, 3553, 3553, 3556, 3557, 3564, 3572, 3572, 3572,
3582 3579, 3586, 3595, 3600, 3605, 3610, 3615, 3621, 3627, 3633,
3583 3638, 3645, 3654, 3655, 3662, 3663, 3670, 3675, 3680, 3685,
3584 3685, 3685, 3690, 3695, 3700, 3705, 3710, 3715, 3722, 3723,
3585 3730, 3735, 3743, 3743, 3748, 3753, 3753, 3759, 3764, 3769,
3586 3774, 3782, 3782, 3787, 3792, 3792, 3797, 3802, 3807, 3812,
3587 3820, 3828, 3831, 3836, 3841, 3848, 3848, 3848, 3849, 3854,
3588 3857, 3862, 3865, 3870, 3870, 3878, 3879, 3880, 3881, 3882,
3589 3883, 3884, 3885, 3886, 3887, 3888, 3889, 3890, 3891, 3892,
3590 3893, 3894, 3895, 3896, 3897, 3898, 3899, 3900, 3901, 3902,
3591 3903, 3904, 3905, 3906, 3907, 3910, 3910, 3910, 3911, 3911,
3592 3912, 3912, 3912, 3913, 3913, 3913, 3913, 3914, 3914, 3914,
3593 3914, 3915, 3915, 3915, 3916, 3916, 3916, 3916, 3917, 3917,
3594 3917, 3917, 3918, 3918, 3918, 3918, 3919, 3919, 3919, 3919,
3595 3920, 3920, 3920, 3920, 3921, 3921, 3924, 3924, 3925, 3925,
3596 3925, 3925, 3925, 3925, 3925, 3925, 3925, 3926, 3926, 3926,
3597 3926, 3926, 3926, 3926, 3927, 3932, 3937, 3942, 3947, 3952,
3598 3957, 3962, 3967, 3972, 3977, 3982, 3987, 3992, 3993, 3998,
3599 4003, 4008, 4013, 4018, 4023, 4028, 4033, 4038, 4043, 4048,
3600 4055, 4055, 4055, 4056, 4057, 4060, 4069, 4070, 4076, 4083,
3601 4084, 4085, 4086, 4089, 4094, 4102, 4108, 4115, 4122, 4122,
3602 4125, 4126, 4127, 4132, 4139, 4144, 4153, 4158, 4168, 4180,
3603 4181, 4187, 4188, 4189, 4190, 4195, 4202, 4202, 4207, 4212,
3604 4217, 4223, 4229, 4233, 4233, 4271, 4276, 4284, 4289, 4297,
3605 4302, 4307, 4312, 4320, 4325, 4334, 4335, 4339, 4344, 4349,
3606 4367, 4367, 4367, 4367, 4367, 4367, 4367, 4367, 4368, 4369,
3607 4370, 4376, 4375, 4388, 4388, 4394, 4400, 4405, 4410, 4415,
3608 4421, 4426, 4431, 4436, 4441, 4448, 4453, 4458, 4463, 4464,
3609 4470, 4472, 4484, 4493, 4502, 4511, 4510, 4525, 4524, 4537,
3610 4545, 4545, 4546, 4590, 4589, 4612, 4611, 4631, 4630, 4649,
3611 4647, 4664, 4662, 4677, 4682, 4687, 4692, 4707, 4707, 4710,
3612 4717, 4735, 4742, 4750, 4758, 4765, 4773, 4782, 4791, 4799,
3613 4806, 4813, 4821, 4828, 4834, 4849, 4856, 4861, 4867, 4874,
3614 4881, 4882, 4883, 4886, 4887, 4890, 4892, 4901, 4902, 4909,
3615 4910, 4913, 4918, 4926, 4926, 4926, 4931, 4936, 4941, 4946,
3616 4953, 4959, 4966, 4967, 4974, 4974, 4976, 4976, 4976, 4976,
3617 4976, 4976, 4976, 4976, 4976, 4979, 4979, 4979, 4982, 4990,
3618 4990, 4990, 4990, 4990, 4990, 4990, 4990, 4990, 4990, 4990,
3619 4990, 4990, 4990, 4990, 4990, 4991, 4997, 5002, 5002, 5005,
3620 5006, 5012, 5022, 5026, 5029, 5034, 5041, 5043, 5047, 5052,
3621 5055, 5061, 5066, 5073, 5079, 5072, 5106, 5113, 5122, 5129,
3622 5128, 5139, 5147, 5159, 5169, 5175, 5180, 5188, 5195, 5206,
3623 5212, 5217, 5223, 5233, 5238, 5246, 5252, 5260, 5262, 5277,
3624 5277, 5298, 5304, 5309, 5315, 5323, 5332, 5333, 5336, 5337,
3625 5339, 5352, 5359, 5367, 5368, 5371, 5372, 5378, 5386, 5387,
3626 5393, 5399, 5404, 5409, 5416, 5419, 5426, 5430, 5429, 5442,
3627 5445, 5452, 5459, 5460, 5461, 5468, 5475, 5482, 5488, 5495,
3628 5502, 5509, 5515, 5520, 5525, 5532, 5531, 5542, 5548, 5556,
3629 5562, 5567, 5572, 5577, 5582, 5585, 5586, 5593, 5598, 5605,
3630 5613, 5619, 5626, 5627, 5634, 5641, 5646, 5651, 5656, 5663,
3631 5665, 5672, 5678, 5690, 5691, 5706, 5711, 5718, 5724, 5725,
3632 5732, 5733, 5733, 5733, 5733, 5733, 5733, 5733, 5734, 5735,
3633 5736, 5739, 5739, 5739, 5739, 5739, 5739, 5739, 5739, 5740,
3634 5745, 5748, 5756, 5768, 5775, 5782, 5787, 5792, 5800, 5820,
3635 5823, 5828, 5832, 5835, 5840, 5843, 5850, 5853, 5854, 5857,
3636 5869, 5870, 5871, 5878, 5891, 5903, 5910, 5910, 5910, 5910,
3637 5914, 5918, 5925, 5927, 5934, 5934, 5938, 5942, 5949, 5949,
3638 5952, 5952, 5956, 5960, 5968, 5972, 5980, 5984, 5992, 5996,
3639 6004, 6008, 6034, 6037, 6036, 6051, 6059, 6063, 6067, 6082,
3640 6083, 6086, 6091, 6094, 6095, 6098, 6114, 6115, 6118, 6126,
3641 6127, 6135, 6136, 6137, 6138, 6141, 6142, 6143, 6146, 6146,
3642 6147, 6150, 6151, 6152, 6153, 6154, 6155, 6156, 6159, 6169,
3643 6176, 6176, 6183, 6184, 6188, 6187, 6197, 6200, 6201, 6208,
3644 6215, 6225, 6226, 6226, 6243, 6243, 6243, 6243, 6243, 6243,
3645 6243, 6243, 6243, 6244, 6332, 6332, 6332, 6335, 6335, 6335,
3646 6335, 6335, 6335, 6335, 6335, 6335, 6335, 6335, 6335, 6335,
3647 6335, 6335, 6335, 6336, 6341, 6341, 6342, 6346, 6353, 6362,
3648 6371, 6380, 6391, 6392, 6402, 6409, 6414, 6433, 6435, 6446,
3649 6466, 6467, 6470, 6476, 6482, 6490, 6491, 6494, 6500, 6508,
3650 6509, 6512, 6518, 6523, 6531, 6536, 6540, 6540, 6570, 6572,
3651 6571, 6584, 6585, 6592, 6594, 6619, 6624, 6629, 6636, 6642,
3652 6647, 6660, 6660, 6660, 6661, 6664, 6665, 6666, 6669, 6670,
3653 6673, 6674, 6677, 6678, 6681, 6684, 6687, 6690, 6691, 6694,
3654 6702, 6709, 6710, 6714
3655};
3656#endif
3657
3659#define YY_ACCESSING_SYMBOL(State) YY_CAST (yysymbol_kind_t, yystos[State])
3660
3661#if 1
3662/* The user-facing name of the symbol whose (internal) number is
3663 YYSYMBOL. No bounds checking. */
3664static const char *yysymbol_name (yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED;
3665
3666/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
3667 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
3668static const char *const yytname[] =
3669{
3670 "\"end-of-input\"", "error", "\"invalid token\"", "\"'class'\"",
3671 "\"'module'\"", "\"'def'\"", "\"'undef'\"", "\"'begin'\"",
3672 "\"'rescue'\"", "\"'ensure'\"", "\"'end'\"", "\"'if'\"", "\"'unless'\"",
3673 "\"'then'\"", "\"'elsif'\"", "\"'else'\"", "\"'case'\"", "\"'when'\"",
3674 "\"'while'\"", "\"'until'\"", "\"'for'\"", "\"'break'\"", "\"'next'\"",
3675 "\"'redo'\"", "\"'retry'\"", "\"'in'\"", "\"'do'\"",
3676 "\"'do' for condition\"", "\"'do' for block\"", "\"'do' for lambda\"",
3677 "\"'return'\"", "\"'yield'\"", "\"'super'\"", "\"'self'\"", "\"'nil'\"",
3678 "\"'true'\"", "\"'false'\"", "\"'and'\"", "\"'or'\"", "\"'not'\"",
3679 "\"'if' modifier\"", "\"'unless' modifier\"", "\"'while' modifier\"",
3680 "\"'until' modifier\"", "\"'rescue' modifier\"", "\"'alias'\"",
3681 "\"'defined?'\"", "\"'BEGIN'\"", "\"'END'\"", "\"'__LINE__'\"",
3682 "\"'__FILE__'\"", "\"'__ENCODING__'\"", "\"local variable or method\"",
3683 "\"method\"", "\"global variable\"", "\"instance variable\"",
3684 "\"constant\"", "\"class variable\"", "\"label\"", "\"integer literal\"",
3685 "\"float literal\"", "\"rational literal\"", "\"imaginary literal\"",
3686 "\"char literal\"", "\"numbered reference\"", "\"back reference\"",
3687 "\"literal content\"", "tREGEXP_END", "\"dummy end\"", "'.'",
3688 "\"backslash\"", "\"escaped space\"", "\"escaped horizontal tab\"",
3689 "\"escaped form feed\"", "\"escaped carriage return\"",
3690 "\"escaped vertical tab\"", "\"unary+\"", "\"unary-\"", "\"**\"",
3691 "\"<=>\"", "\"==\"", "\"===\"", "\"!=\"", "\">=\"", "\"<=\"", "\"&&\"",
3692 "\"||\"", "\"=~\"", "\"!~\"", "\"..\"", "\"...\"", "\"(..\"", "\"(...\"",
3693 "\"[]\"", "\"[]=\"", "\"<<\"", "\">>\"", "\"&.\"", "\"::\"",
3694 "\":: at EXPR_BEG\"", "\"operator-assignment\"", "\"=>\"", "\"(\"",
3695 "\"( arg\"", "\"[\"", "\"{\"", "\"{ arg\"", "\"*\"", "\"**arg\"",
3696 "\"&\"", "\"->\"", "\"symbol literal\"", "\"string literal\"",
3697 "\"backtick literal\"", "\"regexp literal\"", "\"word list\"",
3698 "\"verbatim word list\"", "\"symbol list\"", "\"verbatim symbol list\"",
3699 "\"terminator\"", "\"'}'\"", "\"'#{'\"", "tSTRING_DVAR", "tLAMBEG",
3700 "tLABEL_END", "tIGNORED_NL", "tCOMMENT", "tEMBDOC_BEG", "tEMBDOC",
3701 "tEMBDOC_END", "tHEREDOC_BEG", "tHEREDOC_END", "k__END__", "tLOWEST",
3702 "'='", "'?'", "':'", "'>'", "'<'", "'|'", "'^'", "'&'", "'+'", "'-'",
3703 "'*'", "'/'", "'%'", "tUMINUS_NUM", "'!'", "'~'", "tLAST_TOKEN", "'{'",
3704 "'}'", "'['", "'\\n'", "','", "'`'", "'('", "')'", "']'", "';'", "' '",
3705 "$accept", "option_terms", "compstmt_top_stmts", "$@1", "program",
3706 "top_stmts", "top_stmt", "block_open", "begin_block", "compstmt_stmts",
3707 "$@2", "$@3", "bodystmt", "$@4", "stmts", "stmt_or_begin", "$@5",
3708 "allow_exits", "k_END", "$@6", "stmt", "asgn_mrhs", "asgn_command_rhs",
3709 "command_asgn", "op_asgn_command_rhs",
3710 "def_endless_method_endless_command", "endless_command", "option_'\\n'",
3711 "command_rhs", "expr", "$@7", "$@8", "def_name", "defn_head", "$@9",
3712 "defs_head", "value_expr_expr", "expr_value", "$@10", "$@11",
3713 "expr_value_do", "command_call", "value_expr_command_call",
3714 "command_call_value", "block_command", "cmd_brace_block", "fcall",
3715 "command", "mlhs", "mlhs_inner", "mlhs_basic", "mlhs_items_mlhs_item",
3716 "mlhs_item", "mlhs_head", "mlhs_node", "lhs", "cname", "cpath", "fname",
3717 "fitem", "undef_list", "$@12", "op", "reswords", "asgn_arg_rhs", "arg",
3718 "op_asgn_arg_rhs", "range_expr_arg", "def_endless_method_endless_arg",
3719 "ternary", "endless_arg", "relop", "rel_expr", "lex_ctxt",
3720 "begin_defined", "after_rescue", "value_expr_arg", "arg_value",
3721 "aref_args", "arg_rhs", "paren_args", "opt_paren_args", "opt_call_args",
3722 "value_expr_command", "call_args", "$@13", "command_args", "block_arg",
3723 "opt_block_arg", "args", "arg_splat", "mrhs_arg", "mrhs", "primary",
3724 "$@14", "$@15", "@16", "@17", "$@18", "$@19", "$@20", "$@21", "$@22",
3725 "$@23", "$@24", "value_expr_primary", "primary_value", "k_begin", "k_if",
3726 "k_unless", "k_while", "k_until", "k_case", "k_for", "k_class",
3727 "k_module", "k_def", "k_do", "k_do_block", "k_rescue", "k_ensure",
3728 "k_when", "k_else", "k_elsif", "k_end", "k_return", "k_yield", "then",
3729 "do", "if_tail", "opt_else", "for_var", "f_marg", "mlhs_items_f_marg",
3730 "f_margs", "f_rest_marg", "f_any_kwrest", "$@25", "f_eq",
3731 "f_kw_primary_value", "f_kwarg_primary_value",
3732 "args_tail_basic_primary_value", "block_args_tail",
3733 "opt_args_tail_block_args_tail", "block_args-opt_tail", "excessed_comma",
3734 "f_opt_primary_value", "f_opt_arg_primary_value",
3735 "args-list_primary_value_block_args-opt_tail", "block_param",
3736 "tail-only-args_block_args_tail", "opt_block_param_def",
3737 "block_param_def", "opt_block_param", "opt_bv_decl", "bv_decls", "bvar",
3738 "max_numparam", "numparam", "it_id", "@26", "$@27", "lambda",
3739 "f_larglist", "lambda_body", "$@28", "do_block", "block_call",
3740 "method_call", "brace_block", "@29", "brace_body", "@30", "do_body",
3741 "case_args", "case_body", "cases", "p_pvtbl", "p_pktbl", "p_in_kwarg",
3742 "$@31", "p_case_body", "p_cases", "p_top_expr", "p_top_expr_body",
3743 "p_expr", "p_as", "$@32", "p_alt", "p_lparen", "p_lbracket",
3744 "p_expr_basic", "$@33", "p_args", "p_args_head", "p_args_tail", "p_find",
3745 "p_rest", "p_args_post", "p_arg", "p_kwargs", "p_kwarg", "p_kw",
3746 "p_kw_label", "p_kwrest", "p_kwnorest", "p_any_kwrest", "p_value",
3747 "range_expr_p_primitive", "p_primitive", "p_variable", "p_var_ref",
3748 "p_expr_ref", "p_const", "opt_rescue", "exc_list", "exc_var",
3749 "opt_ensure", "literal", "strings", "string", "string1", "xstring",
3750 "regexp", "nonempty_list_' '", "words_tWORDS_BEG_word_list", "words",
3751 "word_list", "word", "words_tSYMBOLS_BEG_symbol_list", "symbols",
3752 "symbol_list", "words_tQWORDS_BEG_qword_list", "qwords",
3753 "words_tQSYMBOLS_BEG_qsym_list", "qsymbols", "qword_list", "qsym_list",
3754 "string_contents", "xstring_contents", "regexp_contents",
3755 "string_content", "@34", "@35", "@36", "@37", "string_dend",
3756 "string_dvar", "symbol", "ssym", "sym", "dsym", "numeric",
3757 "simple_numeric", "nonlocal_var", "user_variable", "keyword_variable",
3758 "var_ref", "var_lhs", "backref", "$@38", "superclass",
3759 "f_opt_paren_args", "f_empty_arg", "f_paren_args", "f_arglist", "@39",
3760 "f_kw_arg_value", "f_kwarg_arg_value", "args_tail_basic_arg_value",
3761 "args_tail", "opt_args_tail_args_tail", "f_args-opt_tail",
3762 "f_opt_arg_value", "f_opt_arg_arg_value",
3763 "args-list_arg_value_f_args-opt_tail", "f_args",
3764 "tail-only-args_args_tail", "args_forward", "f_bad_arg", "f_norm_arg",
3765 "f_arg_asgn", "f_arg_item", "f_arg", "f_label", "kwrest_mark",
3766 "f_no_kwarg", "f_kwrest", "restarg_mark", "f_rest_arg", "blkarg_mark",
3767 "f_block_arg", "opt_f_block_arg", "value_expr_singleton_expr",
3768 "singleton", "singleton_expr", "$@40", "assoc_list", "assocs", "assoc",
3769 "operation2", "operation3", "dot_or_colon", "call_op", "call_op2",
3770 "rparen", "rbracket", "rbrace", "trailer", "term", "terms", "none", YY_NULLPTR
3771};
3772
3773static const char *
3774yysymbol_name (yysymbol_kind_t yysymbol)
3775{
3776 return yytname[yysymbol];
3777}
3778#endif
3779
3780#define YYPACT_NINF (-1142)
3781
3782#define yypact_value_is_default(Yyn) \
3783 ((Yyn) == YYPACT_NINF)
3784
3785#define YYTABLE_NINF (-824)
3786
3787#define yytable_value_is_error(Yyn) \
3788 ((Yyn) == YYTABLE_NINF)
3789
3790/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
3791 STATE-NUM. */
3792static const yytype_int16 yypact[] =
3793{
3794 -1142, 6313, 179, -1142, -1142, -1142, -1142, 10926, -1142, -1142,
3795 -1142, -1142, -1142, -1142, -1142, 11981, 11981, -1142, -1142, -1142,
3796 -1142, 7215, -1142, -1142, -1142, -1142, 694, 10772, 99, 119,
3797 -1142, -1142, -1142, -1142, 6591, 7371, -1142, -1142, 6747, -1142,
3798 -1142, -1142, -1142, -1142, -1142, -1142, -1142, 13541, 13541, 13541,
3799 13541, 281, 9685, 9843, 12461, 12701, 11227, -1142, 10618, -1142,
3800 -1142, -1142, 265, 265, 265, 265, 1291, 13661, 13541, -1142,
3801 517, -1142, -1142, 1302, -1142, -1142, -1142, -1142, -1142, 166,
3802 250, 250, -1142, -1142, 442, 452, 359, -1142, 345, 14261,
3803 -1142, 391, -1142, 3092, -1142, -1142, -1142, -1142, 1030, 485,
3804 -1142, 551, -1142, 11861, 11861, -1142, -1142, 10305, 14379, 14497,
3805 14615, 10463, 11981, 7839, -1142, 804, 95, -1142, -1142, 436,
3806 -1142, -1142, -1142, -1142, -1142, -1142, -1142, -1142, -1142, -1142,
3807 -1142, -1142, -1142, -1142, -1142, -1142, -1142, 35, 405, -1142,
3808 474, 410, -1142, -1142, -1142, -1142, -1142, -1142, -1142, -1142,
3809 -1142, -1142, -1142, -1142, -1142, -1142, -1142, -1142, -1142, -1142,
3810 -1142, -1142, -1142, -1142, -1142, -1142, -1142, -1142, -1142, -1142,
3811 -1142, -1142, -1142, -1142, -1142, -1142, -1142, -1142, -1142, -1142,
3812 -1142, -1142, -1142, -1142, -1142, -1142, -1142, -1142, -1142, -1142,
3813 -1142, -1142, -1142, -1142, -1142, -1142, -1142, -1142, -1142, -1142,
3814 -1142, -1142, -1142, -1142, -1142, -1142, -1142, -1142, -1142, -1142,
3815 -1142, -1142, -1142, -1142, -1142, -1142, -1142, -1142, -1142, -1142,
3816 426, -1142, -1142, -1142, -1142, -1142, -1142, 476, 13541, 584,
3817 9843, 13541, 13541, 13541, -1142, 13541, -1142, -1142, 473, 5382,
3818 -1142, 549, -1142, -1142, -1142, 547, -1142, 638, 67, 82,
3819 613, 357, 564, -1142, -1142, 12101, -1142, 11981, -1142, -1142,
3820 11602, 13781, 116, -1142, 576, -1142, 10001, -1142, -1142, -1142,
3821 -1142, -1142, 593, 250, 250, 442, -1142, 669, -1142, 611,
3822 692, 6561, 6561, 472, -1142, 9685, 629, 517, -1142, 1302,
3823 99, 663, -1142, -1142, 648, 706, 750, -1142, 549, 672,
3824 750, -1142, 99, 759, 1291, 14733, 688, 688, 713, -1142,
3825 675, 677, 735, 810, -1142, -1142, 326, -1142, -1142, 745,
3826 833, 118, -1142, 709, 709, 709, 709, 841, -1142, -1142,
3827 -1142, -1142, -1142, -1142, -1142, 6465, 734, 11861, 11861, 11861,
3828 11861, -1142, 13781, 13781, 1852, 778, -1142, 789, -1142, 1852,
3829 791, -1142, -1142, -1142, -1142, 836, -1142, -1142, -1142, -1142,
3830 -1142, -1142, -1142, 9685, 11345, 794, -1142, -1142, 13541, 13541,
3831 13541, 13541, 13541, -1142, -1142, 13541, 13541, 13541, 13541, 13541,
3832 13541, 13541, 13541, -1142, 13541, -1142, -1142, 13541, 13541, 13541,
3833 13541, 13541, 13541, 13541, 13541, 13541, 13541, -1142, -1142, 5303,
3834 11981, 15013, 593, 8621, -1142, 166, -1142, 153, 153, 11861,
3835 9533, 9533, -1142, 517, 784, 890, -1142, -1142, 868, 937,
3836 123, 124, 143, 800, 824, 11861, 807, -1142, 818, 874,
3837 -1142, -1142, -1142, -1142, 85, 128, 488, 565, 612, 691,
3838 695, 702, 760, -1142, -1142, -1142, -1142, -1142, 774, -1142,
3839 -1142, 11463, -1142, -1142, -1142, 5184, -1142, -1142, -1142, -1142,
3840 -1142, -1142, 365, -1142, -1142, -1142, 662, -1142, 13541, 12221,
3841 -1142, -1142, 15111, 11981, 15209, -1142, -1142, 12581, -1142, 13541,
3842 99, -1142, 813, 99, 823, -1142, -1142, 815, 94, -1142,
3843 -1142, -1142, -1142, -1142, 10926, -1142, -1142, 13541, 830, 872,
3844 877, 15307, 15209, -1142, 119, 99, -1142, -1142, 5856, 857,
3845 866, -1142, 12461, -1142, -1142, 12701, -1142, -1142, -1142, 576,
3846 889, -1142, 875, -1142, -1142, 14733, 15405, 11981, 15503, -1142,
3847 -1142, -1142, -1142, -1142, -1142, -1142, -1142, -1142, -1142, -1142,
3848 -1142, 998, 111, 1008, 266, 13541, -1142, -1142, 10153, -1142,
3849 -1142, -1142, -1142, -1142, 11741, -1142, -1142, -1142, -1142, -1142,
3850 -1142, -1142, -1142, -1142, -1142, 1123, -1142, -1142, -1142, -1142,
3851 -1142, 880, -1142, -1142, -1142, 884, -1142, -1142, -1142, 888,
3852 -1142, 99, -1142, -1142, -1142, -1142, 920, -1142, 903, 13541,
3853 347, -1142, -1142, 1003, 910, 443, -1142, 13901, 8621, 517,
3854 13901, 8621, -1142, 917, -1142, -1142, -1142, 168, 168, 12821,
3855 99, 14733, 915, -1142, 12941, -1142, 692, 3611, 3611, 3611,
3856 3611, 4287, 3751, 3611, 3611, 6561, 6561, 738, 738, -1142,
3857 4066, 1245, 1245, 1465, 607, 607, 692, 692, 692, 1067,
3858 1067, 7995, 6903, 8307, 7059, 593, -1142, 99, 921, 484,
3859 -1142, 491, -1142, 7527, -1142, -1142, 168, -1142, 8773, 1064,
3860 9229, 229, 168, 168, 1063, 1060, 148, 15601, 11981, 15699,
3861 -1142, -1142, -1142, 889, -1142, -1142, -1142, -1142, 15797, 11981,
3862 15895, 8621, 13781, -1142, -1142, -1142, 99, -1142, -1142, -1142,
3863 -1142, 3453, 14021, 14021, 10926, -1142, 13541, 13541, -1142, 549,
3864 -1142, -1142, 564, 5595, 7683, 99, 392, 445, 13541, 13541,
3865 -1142, -1142, 12341, -1142, 12581, -1142, -1142, -1142, 13781, 5382,
3866 -1142, 14141, 14141, 53, 593, 593, 14021, -1142, 272, -1142,
3867 -1142, 750, 14733, 875, 317, 661, 99, 97, 375, -1142,
3868 -1142, 1018, -1142, 71, -1142, 265, -1142, -1142, 71, 265,
3869 -1142, 692, 945, -1142, 1123, 1216, -1142, 933, 99, 943,
3870 -1142, 367, -1142, -1142, 938, -1142, 1852, -1142, -1142, -1142,
3871 969, 13541, 1852, -1142, -1142, -1142, -1142, -1142, 1988, -1142,
3872 -1142, -1142, 694, 1062, -1142, 5382, 1066, 168, -1142, 1062,
3873 1066, 168, -1142, -1142, 959, -1142, -1142, -1142, -1142, -1142,
3874 13541, -1142, -1142, -1142, 957, 961, 1077, -1142, -1142, 875,
3875 14733, 1069, -1142, -1142, 1082, 999, 4744, -1142, -1142, -1142,
3876 931, 536, -1142, -1142, 996, -1142, -1142, -1142, -1142, 836,
3877 975, 679, 12221, -1142, -1142, -1142, -1142, 836, -1142, 1128,
3878 -1142, 924, -1142, 1131, -1142, -1142, -1142, -1142, -1142, -1142,
3879 13061, 168, -1142, 1063, 168, 225, 297, 99, 174, 192,
3880 11861, 517, 11861, 8621, 900, 661, -1142, 99, 168, 94,
3881 11080, -1142, 95, 452, -1142, 5010, -1142, -1142, -1142, -1142,
3882 13541, -1142, -1142, -1142, -1142, 554, -1142, -1142, 99, 997,
3883 94, 694, -1142, -1142, -1142, -1142, 477, -1142, -1142, -1142,
3884 -1142, -1142, 709, -1142, 709, 709, 709, -1142, 99, -1142,
3885 1123, -1142, 1188, -1142, -1142, 1103, 880, -1142, -1142, 1001,
3886 1015, -1142, -1142, 1016, -1142, 1017, -1142, 1001, 13901, -1142,
3887 -1142, -1142, -1142, -1142, -1142, -1142, 1019, 13181, -1142, 875,
3888 566, -1142, -1142, -1142, 15993, 11981, 16091, -1142, -1142, 13541,
3889 14021, 14021, 1035, -1142, -1142, -1142, 14021, 14021, -1142, -1142,
3890 13301, 1131, -1142, -1142, -1142, 9533, 11861, 168, -1142, -1142,
3891 168, -1142, 13541, -1142, 151, -1142, -1142, 168, -1142, 212,
3892 229, 8621, 517, 168, -1142, -1142, -1142, -1142, -1142, -1142,
3893 13541, 13541, -1142, 13541, 13541, -1142, 12581, -1142, 14141, 1690,
3894 6161, -1142, -1142, 1029, 1040, -1142, 1988, -1142, 1988, -1142,
3895 1852, -1142, 1988, -1142, -1142, 1062, 1066, 13541, 13541, -1142,
3896 -1142, 13541, 1043, 11741, 11741, 14021, 13541, 8151, 8463, 99,
3897 598, 656, 5977, 5977, 5382, -1142, -1142, -1142, -1142, -1142,
3898 14021, -1142, -1142, -1142, -1142, 957, -1142, 1089, -1142, 1190,
3899 -1142, -1142, 153, -1142, -1142, -1142, 13421, 8925, -1142, -1142,
3900 -1142, 168, -1142, -1142, 13541, 1852, -1142, -1142, 129, 1188,
3901 1188, 1001, 1001, 1046, 1001, 5382, 5382, 1065, 1065, 1019,
3902 -1142, -1142, 5382, 676, -1142, -1142, -1142, 1453, 1453, 834,
3903 -1142, 3762, 6, 1151, -1142, 1210, -1142, -1142, 60, -1142,
3904 1080, -1142, -1142, -1142, 1050, -1142, 1068, -1142, 4549, -1142,
3905 -1142, -1142, -1142, -1142, 871, -1142, -1142, -1142, 65, -1142,
3906 -1142, -1142, -1142, -1142, -1142, -1142, -1142, -1142, 567, -1142,
3907 -1142, -1142, 14851, 153, -1142, -1142, 9533, -1142, -1142, 9381,
3908 8773, 13541, -1142, 438, 5977, 9533, -1142, 99, 104, -1142,
3909 -1142, -1142, 1040, -1142, -1142, 1988, -1142, -1142, 1612, 10153,
3910 -1142, -1142, 8621, -1142, -1142, -1142, -1142, 4549, 88, 99,
3911 3995, -1142, 99, 1071, -1142, 1072, -1142, -1142, -1142, 812,
3912 -1142, 11861, -1142, 1175, 3995, -1142, 4549, 816, 1132, 1453,
3913 1453, 834, 455, 560, 5977, 5977, -1142, 1173, -1142, 936,
3914 198, 211, 215, 8621, 517, -1142, 924, -1142, -1142, -1142,
3915 -1142, 153, 944, 168, 1078, 1079, -1142, 10153, -1142, 1001,
3916 880, -1142, 1084, -1142, -1142, -1142, 1091, -1142, -1142, -1142,
3917 99, 920, 1095, 14969, 1100, -1142, -1142, -1142, 254, -1142,
3918 1132, 1102, 1106, -1142, -1142, -1142, -1142, -1142, 99, -1142,
3919 -1142, 1111, 4549, 1120, -1142, -1142, -1142, -1142, -1142, -1142,
3920 -1142, -1142, -1142, -1142, -1142, 99, 99, 99, 99, 99,
3921 99, 268, 16189, 11981, 16287, 1128, -1142, 1190, -1142, -1142,
3922 11861, 11861, -1142, 1259, -1142, 8621, 1124, -1142, -1142, 938,
3923 -1142, 1612, -1142, -1142, 1141, 14969, 1612, -1142, -1142, 1227,
3924 940, 1824, -1142, -1142, 4549, -1142, 816, -1142, 4549, -1142,
3925 3995, 699, -1142, -1142, -1142, -1142, -1142, -1142, 107, 196,
3926 99, 277, 289, -1142, -1142, 9077, -1142, -1142, -1142, 837,
3927 -1142, -1142, 168, -1142, -1142, 880, -1142, -1142, 1127, 1130,
3928 -1142, 940, 1133, 1137, -1142, 16385, 1127, 1138, 99, 1138,
3929 -1142, -1142, 328, 376, 1259, -1142, -1142, -1142, 1824, -1142,
3930 1824, -1142, 1612, -1142, 1824, -1142, 1129, 1143, -1142, 4549,
3931 -1142, -1142, -1142, -1142, -1142, 1127, 1127, 1140, 1127, -1142,
3932 -1142, 1824, -1142, -1142, 1127, -1142
3933};
3934
3935/* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
3936 Performed when YYTABLE does not specify something else to do. Zero
3937 means the default is an error. */
3938static const yytype_int16 yydefact[] =
3939{
3940 2, 0, 0, 47, 406, 407, 408, 0, 399, 400,
3941 401, 404, 26, 26, 26, 393, 394, 395, 396, 418,
3942 419, 323, 702, 701, 703, 704, 64, 0, 64, 0,
3943 823, 706, 705, 707, 97, 99, 696, 695, 98, 697,
3944 691, 692, 693, 694, 640, 712, 713, 0, 0, 0,
3945 0, 0, 0, 0, 823, 823, 126, 493, 666, 666,
3946 668, 670, 0, 0, 0, 0, 0, 0, 0, 6,
3947 3, 8, 26, 10, 43, 49, 40, 58, 61, 46,
3948 722, 722, 70, 91, 323, 90, 0, 112, 0, 116,
3949 128, 0, 237, 79, 246, 253, 282, 283, 267, 284,
3950 398, 0, 351, 0, 0, 87, 87, 0, 0, 0,
3951 0, 0, 360, 323, 370, 94, 368, 340, 341, 639,
3952 641, 342, 343, 649, 344, 655, 346, 659, 345, 661,
3953 347, 638, 683, 684, 637, 689, 700, 708, 709, 348,
3954 0, 349, 7, 1, 205, 216, 206, 229, 202, 222,
3955 212, 211, 232, 233, 227, 210, 209, 204, 230, 234,
3956 235, 214, 203, 217, 221, 223, 215, 208, 224, 231,
3957 226, 225, 218, 228, 213, 201, 220, 219, 200, 207,
3958 198, 199, 195, 196, 197, 155, 157, 156, 190, 191,
3959 186, 168, 169, 170, 177, 174, 176, 171, 172, 192,
3960 193, 178, 179, 183, 187, 173, 175, 165, 166, 167,
3961 180, 181, 182, 184, 185, 188, 189, 194, 160, 162,
3962 33, 158, 159, 161, 402, 403, 405, 0, 797, 0,
3963 0, 334, 800, 326, 666, 0, 318, 316, 0, 298,
3964 299, 329, 317, 110, 322, 823, 330, 0, 708, 709,
3965 0, 349, 823, 793, 111, 823, 512, 0, 107, 65,
3966 64, 0, 0, 28, 823, 12, 0, 11, 27, 295,
3967 393, 394, 513, 722, 722, 0, 261, 0, 360, 363,
3968 262, 251, 252, 357, 24, 0, 0, 3, 21, 23,
3969 64, 114, 20, 353, 0, 64, 64, 300, 0, 0,
3970 64, 791, 64, 0, 0, 0, 722, 722, 124, 397,
3971 0, 132, 133, 140, 490, 686, 0, 685, 687, 0,
3972 0, 0, 646, 650, 662, 656, 664, 690, 74, 273,
3973 274, 820, 819, 5, 821, 0, 0, 0, 0, 0,
3974 0, 823, 0, 0, 719, 0, 718, 721, 389, 719,
3975 0, 391, 409, 517, 507, 100, 519, 367, 410, 519,
3976 502, 823, 130, 0, 122, 117, 823, 77, 0, 0,
3977 0, 0, 0, 291, 292, 0, 0, 0, 0, 249,
3978 250, 0, 0, 75, 0, 289, 290, 0, 0, 0,
3979 0, 0, 0, 0, 0, 0, 0, 810, 811, 813,
3980 823, 812, 0, 0, 86, 84, 85, 0, 0, 0,
3981 0, 0, 377, 3, 4, 0, 430, 429, 0, 0,
3982 708, 709, 349, 150, 151, 0, 0, 153, 823, 0,
3983 708, 709, 349, 387, 225, 218, 228, 213, 195, 196,
3984 197, 155, 156, 789, 81, 80, 788, 787, 0, 786,
3985 109, 64, 108, 813, 812, 0, 369, 642, 823, 823,
3986 163, 796, 357, 333, 799, 325, 0, 823, 0, 0,
3987 319, 328, 813, 823, 812, 823, 823, 0, 320, 757,
3988 64, 312, 823, 64, 823, 311, 324, 0, 64, 366,
3989 73, 30, 32, 31, 0, 823, 296, 0, 0, 0,
3990 0, 813, 812, 823, 0, 64, 355, 14, 0, 113,
3991 0, 358, 818, 817, 301, 818, 303, 359, 792, 0,
3992 139, 690, 127, 119, 721, 0, 813, 823, 812, 491,
3993 672, 688, 675, 673, 667, 643, 644, 669, 645, 671,
3994 647, 0, 0, 0, 0, 0, 822, 9, 0, 34,
3995 35, 36, 37, 297, 0, 71, 72, 763, 760, 759,
3996 758, 761, 769, 770, 757, 0, 776, 771, 780, 779,
3997 775, 823, 772, 756, 726, 823, 732, 754, 738, 735,
3998 752, 64, 755, 733, 762, 764, 765, 767, 735, 725,
3999 774, 443, 442, 778, 735, 783, 731, 0, 0, 0,
4000 0, 0, 490, 0, 517, 101, 490, 0, 0, 0,
4001 64, 0, 118, 131, 0, 530, 259, 266, 268, 269,
4002 270, 277, 278, 271, 272, 247, 248, 275, 276, 530,
4003 64, 263, 264, 265, 254, 255, 256, 257, 258, 293,
4004 294, 801, 803, 802, 804, 323, 510, 64, 823, 801,
4005 803, 802, 804, 323, 511, 823, 0, 421, 0, 420,
4006 0, 0, 0, 0, 0, 375, 357, 813, 823, 812,
4007 380, 385, 150, 151, 152, 714, 383, 716, 813, 823,
4008 812, 0, 0, 808, 809, 82, 64, 362, 801, 802,
4009 506, 323, 0, 0, 0, 823, 0, 0, 795, 331,
4010 327, 332, 823, 801, 802, 64, 801, 802, 0, 0,
4011 794, 306, 313, 308, 315, 814, 365, 29, 0, 279,
4012 13, 0, 0, 356, 0, 823, 0, 25, 115, 22,
4013 354, 64, 0, 125, 805, 138, 64, 801, 802, 492,
4014 676, 0, 648, 0, 652, 0, 658, 654, 0, 0,
4015 660, 260, 0, 38, 0, 441, 433, 435, 64, 438,
4016 431, 0, 730, 785, 0, 729, 0, 736, 748, 720,
4017 0, 0, 0, 753, 724, 597, 773, 777, 0, 750,
4018 782, 781, 64, 59, 62, 286, 280, 0, 723, 60,
4019 281, 0, 491, 515, 0, 491, 416, 417, 516, 501,
4020 334, 92, 93, 41, 336, 0, 45, 335, 129, 123,
4021 0, 0, 69, 48, 67, 0, 304, 329, 236, 42,
4022 0, 349, 528, 528, 0, 823, 823, 517, 509, 104,
4023 0, 514, 313, 823, 823, 310, 508, 102, 309, 823,
4024 352, 823, 422, 823, 424, 88, 423, 373, 374, 413,
4025 0, 0, 530, 0, 0, 805, 356, 64, 801, 802,
4026 0, 0, 0, 0, 150, 151, 154, 64, 0, 64,
4027 0, 361, 503, 95, 50, 304, 238, 57, 245, 164,
4028 0, 798, 321, 823, 823, 514, 823, 823, 64, 823,
4029 64, 64, 56, 244, 302, 120, 514, 26, 677, 674,
4030 681, 682, 651, 653, 663, 657, 665, 39, 64, 440,
4031 0, 766, 0, 784, 727, 774, 823, 734, 739, 735,
4032 735, 445, 737, 735, 768, 735, 765, 735, 0, 823,
4033 823, 390, 392, 492, 96, 492, 339, 0, 823, 121,
4034 357, 823, 823, 823, 813, 823, 812, 529, 529, 0,
4035 0, 0, 0, 105, 815, 823, 0, 0, 103, 411,
4036 823, 18, 629, 415, 414, 0, 0, 0, 425, 427,
4037 0, 89, 0, 521, 0, 378, 528, 0, 379, 514,
4038 0, 0, 0, 0, 514, 388, 790, 83, 504, 505,
4039 0, 0, 823, 0, 0, 307, 314, 364, 0, 719,
4040 0, 432, 434, 436, 439, 728, 0, 749, 0, 746,
4041 0, 742, 0, 744, 751, 66, 288, 0, 0, 26,
4042 26, 334, 337, 0, 0, 0, 0, 801, 802, 64,
4043 801, 802, 0, 0, 285, 54, 242, 55, 243, 106,
4044 0, 52, 240, 53, 241, 630, 631, 823, 632, 823,
4045 15, 428, 0, 371, 372, 522, 0, 0, 529, 376,
4046 381, 0, 715, 384, 0, 719, 494, 497, 0, 0,
4047 0, 735, 735, 735, 735, 63, 287, 823, 823, 338,
4048 44, 68, 305, 514, 621, 627, 593, 0, 0, 0,
4049 529, 64, 529, 581, 666, 0, 620, 78, 538, 544,
4050 546, 549, 542, 541, 577, 543, 586, 589, 592, 598,
4051 599, 588, 552, 607, 600, 553, 608, 609, 610, 611,
4052 612, 613, 614, 615, 617, 616, 618, 619, 596, 76,
4053 51, 239, 0, 0, 634, 412, 0, 19, 636, 0,
4054 0, 0, 523, 823, 0, 0, 386, 64, 0, 680,
4055 679, 678, 437, 747, 743, 0, 740, 745, 482, 0,
4056 480, 479, 0, 605, 606, 151, 625, 0, 569, 64,
4057 570, 574, 64, 0, 564, 0, 823, 567, 580, 0,
4058 622, 0, 623, 0, 539, 547, 0, 587, 591, 603,
4059 604, 0, 529, 529, 0, 0, 595, 0, 633, 0,
4060 708, 709, 349, 0, 3, 16, 823, 524, 526, 527,
4061 525, 0, 535, 0, 484, 0, 499, 0, 495, 735,
4062 823, 448, 823, 454, 477, 460, 456, 474, 483, 478,
4063 64, 765, 456, 447, 456, 453, 518, 520, 64, 562,
4064 584, 572, 571, 563, 575, 816, 565, 594, 64, 545,
4065 540, 577, 0, 578, 582, 666, 590, 585, 601, 602,
4066 626, 551, 561, 550, 557, 64, 64, 64, 64, 64,
4067 64, 357, 813, 823, 812, 823, 635, 823, 426, 531,
4068 0, 0, 382, 0, 496, 0, 0, 741, 452, 0,
4069 451, 0, 457, 470, 0, 0, 458, 476, 475, 0,
4070 446, 0, 472, 568, 0, 576, 0, 624, 0, 548,
4071 0, 0, 554, 555, 556, 558, 559, 560, 805, 356,
4072 64, 801, 802, 628, 17, 0, 536, 537, 488, 64,
4073 486, 489, 0, 498, 449, 823, 455, 461, 456, 456,
4074 481, 459, 456, 456, 357, 813, 456, 573, 64, 578,
4075 579, 583, 514, 823, 0, 485, 500, 450, 0, 471,
4076 0, 468, 0, 464, 0, 466, 805, 356, 473, 0,
4077 566, 533, 534, 532, 487, 456, 456, 456, 456, 469,
4078 465, 0, 462, 467, 456, 463
4079};
4080
4081/* YYPGOTO[NTERM-NUM]. */
4082static const yytype_int16 yypgoto[] =
4083{
4084 -1142, -99, 1036, -1142, -1142, -1142, 963, -1142, 797, -17,
4085 -1142, -1142, -568, -1142, 169, 796, -1142, -2, -1142, -1142,
4086 26, -1142, -1142, -521, -1142, 5, -552, 49, -518, -66,
4087 -1142, -1142, 451, 2956, -1142, 3333, -1142, -21, -1142, -1142,
4088 1200, 69, -1142, 711, -1142, -426, 1369, -10, 1214, -128,
4089 24, -413, -9, -1142, -16, 4079, -403, 1215, -51, 7,
4090 -1142, -1142, -5, -1142, -1142, 5114, -1142, -1142, -1142, -1142,
4091 -508, 1228, -1142, 1032, 838, 72, -1142, 1226, -1142, 456,
4092 58, 646, -386, -1142, 100, -1142, 46, -374, -221, 28,
4093 -373, -1142, -582, 15, -1142, -1142, -1142, -1142, -1142, -1142,
4094 -1142, -1142, -1142, -1142, -1142, -1142, 992, -1142, -1142, -1142,
4095 -1142, -1142, -1142, -1142, -1142, -1142, -1142, -1142, -1142, -1142,
4096 -1142, -1142, 377, -1142, -456, 2003, 2380, -399, 368, 141,
4097 -815, -1142, -816, -812, 600, 447, 170, -1142, 127, 73,
4098 -1142, -1142, 202, 131, -540, -1142, -1141, 68, -1142, -1142,
4099 -1142, 287, -1142, -1142, 142, -1142, 20, 290, 125, -208,
4100 -1142, -1142, 450, -1142, -1142, -1142, 500, -1142, -1142, -103,
4101 -1142, -526, -1142, 1020, -1142, -807, -1142, -689, -867, -528,
4102 -1142, 22, -1142, -1142, -906, -571, -1142, -1142, -1142, -1142,
4103 -1142, 130, -1142, -3, -1142, -886, -618, -1019, -394, -752,
4104 -711, -1142, 189, -1142, -1142, -566, 190, -1142, -1142, -545,
4105 197, -1142, -1142, -1142, 106, -1142, -1142, 117, 643, 990,
4106 -1142, 1264, 1274, 1429, 0, -1142, 1503, -1142, 853, -1142,
4107 1715, -1142, -1142, 1727, -1142, 1942, -1142, -1142, -58, -1142,
4108 -1142, -177, -1142, -1142, -1142, -1142, -1142, -1142, 12, -1142,
4109 -1142, -1142, -1142, 19, -54, 3910, -1, 1288, 4294, 3718,
4110 -1142, -1142, -32, -288, 697, 47, -1142, 636, -1142, -1142,
4111 -287, -1142, -504, -716, 632, -1142, -323, -1142, -226, -1121,
4112 -466, -302, -698, -640, 70, -659, -1142, -739, -1142, -570,
4113 -1142, -449, -530, -1142, -1142, -1142, -1142, -1142, 43, -404,
4114 -383, -1142, -1142, -91, 1290, 366, -202, 61, -182, -53,
4115 -67, 14
4116};
4117
4118/* YYDEFGOTO[NTERM-NUM]. */
4119static const yytype_int16 yydefgoto[] =
4120{
4121 0, 333, 69, 1, 2, 70, 71, 266, 267, 655,
4122 1139, 1277, 656, 1049, 287, 288, 504, 224, 72, 494,
4123 289, 74, 75, 76, 77, 78, 783, 487, 813, 79,
4124 629, 615, 444, 273, 870, 274, 406, 407, 409, 971,
4125 410, 82, 802, 814, 83, 605, 275, 85, 86, 290,
4126 87, 522, 88, 89, 90, 238, 427, 428, 218, 219,
4127 220, 694, 644, 222, 92, 93, 94, 95, 96, 97,
4128 786, 395, 98, 553, 497, 554, 240, 241, 294, 818,
4129 835, 836, 480, 242, 481, 257, 258, 244, 470, 648,
4130 246, 806, 807, 99, 403, 510, 853, 664, 860, 1145,
4131 863, 861, 681, 598, 601, 100, 277, 102, 103, 104,
4132 105, 106, 107, 108, 109, 110, 111, 356, 359, 960,
4133 1136, 850, 965, 966, 798, 278, 279, 658, 845, 967,
4134 968, 419, 756, 757, 758, 759, 571, 770, 771, 1221,
4135 1222, 1223, 1336, 1292, 1293, 1298, 1225, 1226, 1227, 1228,
4136 1229, 1159, 1160, 1230, 1215, 1329, 1330, 529, 739, 897,
4137 314, 1148, 114, 1066, 1218, 1285, 360, 115, 116, 357,
4138 602, 603, 606, 607, 974, 851, 1210, 947, 1032, 822,
4139 1325, 854, 1373, 1211, 1097, 1240, 1099, 1252, 1100, 1194,
4140 1195, 1101, 1306, 1169, 1170, 1171, 1103, 1104, 1253, 1173,
4141 1105, 1106, 1107, 1108, 1109, 572, 1111, 1112, 1113, 1114,
4142 1115, 1116, 1117, 1118, 961, 1047, 1133, 1137, 117, 118,
4143 119, 120, 121, 122, 323, 123, 124, 541, 743, 125,
4144 126, 543, 127, 128, 129, 130, 542, 544, 316, 320,
4145 321, 534, 741, 740, 898, 1000, 1151, 899, 131, 132,
4146 317, 133, 134, 135, 136, 248, 249, 139, 250, 251,
4147 862, 676, 345, 346, 347, 348, 349, 574, 575, 576,
4148 917, 767, 768, 578, 579, 580, 581, 582, 583, 584,
4149 585, 926, 587, 588, 589, 590, 591, 592, 593, 594,
4150 595, 596, 762, 447, 448, 449, 682, 299, 484, 253,
4151 724, 646, 685, 680, 402, 489, 831, 1177, 514, 659,
4152 414, 269
4153};
4154
4155/* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
4156 positive, shift that token. If negative, reduce the rule whose
4157 number is the opposite. If YYTABLE_NINF, syntax error. */
4158static const yytype_int16 yytable[] =
4159{
4160 138, 319, 221, 335, 318, 237, 237, 315, 412, 660,
4161 401, 225, 226, 456, 647, 142, 645, 334, 653, 223,
4162 236, 236, 221, 674, 454, 916, 599, 73, 970, 483,
4163 787, 478, 819, 791, 263, 286, 293, 405, 405, 223,
4164 308, 405, 586, 245, 245, 765, 977, 586, 789, 350,
4165 918, 138, 138, 221, 334, 312, 573, 577, 252, 252,
4166 445, 573, 577, 324, 325, 326, 292, 292, 297, 301,
4167 336, 309, 691, 710, 924, 261, 291, 264, 794, 256,
4168 365, 1033, 295, 408, 773, 327, 413, 705, 312, 645,
4169 779, 653, 790, 812, 1002, 700, 701, 296, 300, 760,
4170 1004, 823, 237, 700, 309, 915, 221, 421, 431, 431,
4171 431, 710, 733, 868, 516, 243, 254, 236, 518, 725,
4172 -146, 352, -135, 309, 309, 309, 919, 1129, 351, 1149,
4173 355, 342, 343, 1216, 948, -710, 328, 530, 927, 701,
4174 245, 736, 354, 537, 539, 725, 1102, 1102, -141, -142,
4175 1337, 1241, 799, 884, -702, 252, 474, 505, -64, 452,
4176 259, 1183, 1331, 1191, 657, 1251, 657, -710, -149, -141,
4177 491, 812, 812, -148, 874, 877, 466, 745, 796, 143,
4178 492, 493, -711, -702, 530, 538, 502, -147, 507, 1183,
4179 -132, 1144, 532, 533, 488, 490, 920, -701, 809, -144,
4180 840, -141, 925, 342, 343, 812, 847, 848, 892, -147,
4181 -802, -141, 450, 286, 790, 1184, -142, -145, 1192, 528,
4182 508, 1337, 1193, 1167, -142, 1176, -701, 1217, -149, 138,
4183 746, -135, 322, 1331, 334, 610, 797, -143, 1212, 532,
4184 533, 499, 500, -584, 292, 237, 353, 237, 259, 1150,
4185 -146, -135, -135, 259, 1002, -135, 844, 1152, 1102, 471,
4186 236, -146, 236, 478, -801, 138, 471, -146, 286, 485,
4187 265, 405, 405, 405, 405, 866, 555, 556, -132, -133,
4188 142, -148, 857, 482, 138, 245, 725, 1058, 760, 909,
4189 -144, 1350, 73, 867, 918, 983, 523, 725, -140, 292,
4190 252, 952, -145, -139, 312, 331, 1056, 331, 924, 291,
4191 710, 332, 913, 332, 665, 913, 549, 550, 551, 552,
4192 309, 351, -147, 521, 976, 1261, 1263, 669, 1208, -135,
4193 256, 931, 749, 354, 138, 932, 1209, 283, 700, 701,
4194 700, -143, -137, 405, 513, 513, 286, -136, 612, 513,
4195 -147, 519, -141, -802, 351, 1183, -147, 486, -141, 405,
4196 334, 73, 138, 312, 744, -142, 744, -134, 1071, -149,
4197 1072, -142, 1074, 1128, 1128, -149, 1015, 292, 1046, 309,
4198 -137, 775, -801, 331, -719, 750, 1005, 291, 661, 332,
4199 237, 964, 530, 662, 663, 975, 652, 939, 978, 776,
4200 -136, 852, 138, 953, 671, 236, -113, 344, 259, 138,
4201 138, 958, 985, 1061, 485, 1007, 1009, 292, 1242, 1011,
4202 1016, 1013, -148, 1014, 292, 292, 322, -129, -148, 812,
4203 812, -144, 1035, 1037, 1254, 812, 812, -144, 1041, 1043,
4204 1073, 237, 677, -145, 760, 531, 760, 532, 533, -145,
4205 652, -137, -138, 964, -802, 849, 236, 476, 700, 701,
4206 654, 1098, 1098, 237, 586, 695, 1110, 1110, 352, 652,
4207 586, -137, -137, 1172, -801, -137, 568, 780, 236, 245,
4208 358, 882, -143, 1267, 1270, 1128, 888, 485, -143, 221,
4209 1016, -149, 886, 361, 252, 781, 471, 652, 471, -148,
4210 362, 717, -134, 885, 812, -711, 223, 138, 569, -136,
4211 459, 1053, 702, 690, 1054, 1219, 523, 237, 1232, 812,
4212 1168, 1059, 1130, 652, 312, 366, -144, 1063, 1128, -136,
4213 -136, 752, 236, -136, 896, 1128, 1128, 1188, 1371, -142,
4214 309, 485, 1163, 1164, -149, 887, 788, 138, 59, 894,
4215 1335, 686, 1254, 138, -397, 731, 1254, -703, 1351, 1029,
4216 -133, 645, 292, 653, 701, -140, 903, 1153, 1154, 1156,
4217 1157, 903, 503, 1098, 458, 1057, 1266, 1269, 1110, -145,
4218 753, 460, -397, -397, 833, 763, -703, 784, 1234, 763,
4219 784, 834, 710, 353, 1237, 1348, 1238, 138, 924, 255,
4220 138, 775, 523, 760, 760, 1146, -148, 467, 846, 259,
4221 312, -134, 292, 1168, -64, 292, 869, 1351, -144, 1196,
4222 397, 1110, 700, 1168, 1168, -145, 309, -139, 1110, 1110,
4223 915, -134, -134, 260, -704, -134, 459, 805, -397, -135,
4224 462, 841, 805, 843, 1258, 1259, -136, 1128, 398, 399,
4225 468, 1338, 890, 1140, 992, 979, 509, 138, 237, 138,
4226 924, 1346, 471, -704, 652, 984, 503, 838, 882, 237,
4227 -149, 331, 292, 236, 292, 652, 1067, 332, 801, 824,
4228 138, -706, 485, 801, 236, 368, 1166, 900, -143, 221,
4229 1288, 829, 1290, 485, 1302, 292, 830, 586, 833, 837,
4230 -148, 879, 469, 828, 400, 838, 223, 397, 586, 1235,
4231 -706, 573, 577, 475, 259, 1287, 471, 1332, -64, 477,
4232 1375, 1339, 1376, 895, 1378, 1019, 1343, 1020, 530, 946,
4233 -356, 312, -144, 495, 1203, 398, 472, 873, 397, 838,
4234 1110, 1384, 1147, 902, 397, 904, -708, 309, 905, 906,
4235 255, 392, 393, 394, 830, 889, 834, 1282, -356, -356,
4236 -705, 801, 801, 586, -707, 530, 398, 501, 451, 988,
4237 368, -698, 398, 526, -708, -708, 955, 573, 577, 955,
4238 513, 535, 828, 532, 533, 830, 696, 506, 1260, -705,
4239 -145, 473, 1377, -707, 405, 801, 405, -112, 1359, 1361,
4240 -698, 523, 1363, 1365, -709, 1357, 1368, 511, 981, 312,
4241 -143, 530, 1279, -143, -356, 520, 368, 687, -802, 445,
4242 532, 533, 473, 1247, 517, 309, -97, 1083, 527, -699,
4243 -708, 928, -709, -709, -134, 1379, 1380, 1382, 1383, 980,
4244 913, 982, 1235, 683, 1385, 344, 711, 1235, 259, 713,
4245 -98, 260, 1235, 962, 716, 969, 1231, 969, -699, 672,
4246 259, 512, 138, 673, 535, 221, 532, 533, 525, -698,
4247 540, 728, 684, 397, 1086, 889, 1356, 292, 530, -349,
4248 390, 391, 392, 393, 394, 548, 672, 1320, -709, 1174,
4249 1165, 725, 792, -699, 563, 999, 795, -698, -698, 530,
4250 405, 398, 453, 471, 259, 515, 830, -349, -349, 1235,
4251 1347, 1235, 597, 1235, 1349, 1235, 830, 933, 784, 545,
4252 935, -699, -699, -717, 567, 600, -805, 846, 1255, 1062,
4253 763, 535, 1235, 532, 533, 237, 1247, 397, 963, 964,
4254 998, 652, 604, 397, 546, 1052, 666, 769, 1051, 613,
4255 236, -97, 536, -698, 532, 533, 675, -97, -357, 485,
4256 1189, 1190, 670, -349, 138, 398, 667, 1239, 712, -805,
4257 1243, 398, 678, 715, 1048, -98, 808, -699, 714, 292,
4258 138, -98, 720, 1068, 1280, 1281, -357, -357, 805, 1231,
4259 1262, 259, 1354, 101, 1231, 292, 562, -805, -805, 138,
4260 397, 1017, 1018, 524, 524, 397, 721, 247, 247, 397,
4261 1023, 722, -129, 1024, 292, 1026, 563, 1077, 1078, 801,
4262 801, 668, 138, 138, 730, 801, 801, 679, 398, 944,
4263 732, 1127, 1127, 398, 1272, 761, 1179, 398, 1345, 764,
4264 1143, 1182, -357, 766, 101, 101, 567, 568, 310, 1080,
4265 1081, -805, 871, -805, -444, 777, 138, -801, 772, 247,
4266 1231, 1134, 268, 1138, 530, 778, 1315, 1316, 1317, 793,
4267 810, 292, 36, 37, 530, 39, 832, 842, 830, 569,
4268 849, 310, 45, 46, 945, 852, 1127, 1127, 910, 1273,
4269 1127, 1161, 1161, 679, 801, 247, 247, 907, 912, 247,
4270 418, 429, 429, 921, 247, 1276, 929, 1127, 1274, 801,
4271 930, 934, -329, 373, 374, 405, 937, 742, 1352, 532,
4272 533, 938, 1205, 1206, 911, 940, 941, 747, 1213, 532,
4273 533, 1201, 949, 942, 954, 138, 959, 508, 138, 138,
4274 830, 1175, 1236, 1127, 138, 368, 964, 309, 876, 878,
4275 292, 334, 996, 292, 292, 776, 1006, 969, 138, 292,
4276 1248, 138, 381, 382, 876, 878, 1127, 385, 386, 1127,
4277 1008, 1010, 1012, 292, -333, 557, 292, 558, 559, 560,
4278 561, 1250, 893, 1127, 1069, 1127, 1275, 1039, 1127, 1127,
4279 1132, 1265, 1268, 1127, 1127, 1070, 1214, 1311, -331, 1135,
4280 1286, 1155, 138, 1178, 1158, 1186, 387, 388, 389, 390,
4281 391, 392, 393, 394, 405, 405, 138, 292, 830, 1185,
4282 969, 830, 101, 1187, 1245, 754, 1244, 1084, 1233, 1271,
4283 755, 292, 431, 1183, 763, 986, 763, 1284, 1283, 1289,
4284 557, 830, 558, 559, 560, 561, 1291, 247, 309, 247,
4285 1296, 1127, 247, 247, 995, 1301, 997, 1304, 101, 1326,
4286 1327, 1305, 1180, 237, 36, 37, 1308, 39, 557, 652,
4287 558, 559, 560, 561, 1001, 1310, 1333, 101, 236, 1214,
4288 1340, 298, 1358, 1344, 138, 1360, -801, 485, 1362, 962,
4289 754, 1138, 1364, 1369, 431, 1381, 496, 310, 547, 292,
4290 -802, 727, 498, 1127, 729, 1204, 411, 1127, 1353, 1127,
4291 309, 1328, 1181, 558, 559, 560, 561, 830, 830, 830,
4292 803, 987, 416, 368, 138, 433, 396, 101, 1220, 247,
4293 247, 247, 247, 718, 247, 247, 893, 872, 1050, 292,
4294 381, 382, 337, 338, 339, 340, 341, 1278, 1060, 763,
4295 40, 41, 42, 43, 908, 101, 310, 1003, 1295, 1233,
4296 1224, 1233, 1334, 1297, 1342, 1162, 1233, 969, 1127, 830,
4297 84, 1233, 1294, 989, 1374, 1372, 1256, 1257, 1355, 608,
4298 1249, 1323, 1309, 457, 84, 84, 389, 390, 391, 392,
4299 393, 394, 247, 609, 1324, 101, 748, 1175, 614, 446,
4300 914, 247, 101, 101, 923, 455, 1036, 1038, 0, 1370,
4301 0, 0, 1042, 1044, 0, 0, 0, 247, 0, 0,
4302 0, 84, 84, 0, 0, 0, 0, 0, 1233, 0,
4303 1233, 0, 1233, 0, 1233, 0, 84, 0, 0, 0,
4304 0, 0, 0, 247, 0, 0, 1036, 1038, 0, 1042,
4305 1044, 1233, 0, 0, 461, 0, 0, 463, 464, 465,
4306 0, 1220, 0, 0, 0, 247, 1220, 0, 0, 0,
4307 0, 1220, 84, 84, 0, 0, 84, 0, 0, 0,
4308 0, 84, 1096, 1096, 0, 0, 22, 23, 24, 25,
4309 692, 693, 0, 0, 0, 0, 1131, 0, 0, 697,
4310 101, 0, 31, 32, 33, 0, 0, 708, 709, 0,
4311 0, 0, 40, 41, 42, 43, 44, 310, 0, 247,
4312 1131, 0, 0, 0, 0, 0, 0, 496, 1220, 0,
4313 1220, 0, 1220, 0, 1220, 726, 0, 1096, 1096, 0,
4314 101, 1096, 0, 368, 0, 0, 101, 0, 0, 0,
4315 0, 1220, 0, 0, 0, 0, 0, 0, 1096, 1264,
4316 381, 382, 0, 57, 58, 59, 60, 61, 62, 63,
4317 64, 65, 0, 0, 0, 0, 0, 0, 0, 0,
4318 0, 0, 0, 0, 0, 0, 0, 0, 0, 247,
4319 101, 0, 247, 101, 1096, 0, 0, 0, 0, 84,
4320 304, 247, 0, 310, 1303, 0, 820, 390, 391, 392,
4321 393, 394, 0, 0, 1307, 0, 0, 1096, 0, 0,
4322 1096, 0, 0, 0, 84, 0, 84, 0, 0, 84,
4323 84, 1312, 1313, 1314, 1096, 84, 1096, 0, 0, 1096,
4324 1096, 0, 0, 0, 1096, 1096, 0, 0, 0, 0,
4325 101, 0, 101, 0, 84, 0, 0, 0, 0, 0,
4326 247, 0, 0, 0, 557, 0, 558, 559, 560, 561,
4327 562, 247, 0, 101, 247, 1119, 1119, 0, 0, 0,
4328 0, 0, 0, 0, 820, 820, 0, 839, 0, 0,
4329 563, 0, 0, 0, 698, 699, 0, 0, 0, 0,
4330 0, 0, 1096, 298, 84, 0, 84, 84, 84, 84,
4331 247, 84, 84, 0, 565, 0, 0, 0, 820, 566,
4332 567, 568, 0, 0, 310, 0, 0, 880, 0, 0,
4333 1119, 1119, 84, 0, 1119, 0, 0, 0, 699, 0,
4334 0, 298, 557, 0, 558, 559, 560, 561, 562, 0,
4335 0, 1119, 0, 569, 1096, 0, 570, 0, 1096, 0,
4336 1096, 0, 0, 0, 0, 0, 0, 0, 563, 84,
4337 0, 0, 84, 0, 0, 0, 0, 0, 84, 84,
4338 84, 0, 564, 0, 0, 0, 0, 1119, 0, 0,
4339 0, 0, 565, 0, 84, 0, 0, 566, 567, 568,
4340 0, 0, 310, 0, 0, 0, 0, 0, 0, 0,
4341 1119, 0, 0, 1119, 0, 774, 0, 0, 0, 1096,
4342 84, 0, 0, 0, 0, 0, 0, 1119, 0, 1119,
4343 0, 569, 1119, 1119, 570, 804, 0, 1119, 1119, 0,
4344 817, 0, 84, 0, 0, 0, 0, 1065, 0, 0,
4345 0, 0, 247, 0, 247, 101, 0, 950, 951, 0,
4346 0, 0, 0, 0, 0, 956, 957, 0, 0, 0,
4347 0, 0, 0, 0, 0, 0, 557, 84, 558, 559,
4348 560, 561, 562, 0, 0, 0, 0, 0, 0, 0,
4349 0, 0, 0, 0, 0, 1119, 84, 0, 0, 0,
4350 0, 0, 563, 0, 557, 0, 558, 559, 560, 561,
4351 562, 0, 0, 0, 0, 990, 991, 84, 993, 994,
4352 247, 0, 881, 84, 0, 0, 565, 0, 0, 0,
4353 563, 0, 567, 568, 0, 0, 0, 247, 699, 0,
4354 298, 0, 820, 820, 564, 0, 0, 1119, 820, 820,
4355 0, 1119, 0, 1119, 565, 0, 0, 101, 247, 566,
4356 567, 568, 0, 0, 0, 569, 84, 84, 0, 84,
4357 84, 0, 0, 101, 1025, 0, 0, 0, 84, 0,
4358 0, 0, 0, 84, 0, 0, 0, 1040, 0, 0,
4359 0, 0, 101, 569, 0, 0, 570, 922, 0, 0,
4360 0, 0, 0, 0, 112, 0, 0, 0, 0, 0,
4361 0, 0, 1119, 0, 0, 101, 101, 820, 112, 112,
4362 0, 0, 1120, 1120, 1064, 0, 936, 84, 0, 84,
4363 0, 0, 820, 0, 0, 0, 0, 84, 0, 0,
4364 557, 0, 558, 559, 560, 561, 562, 0, 84, 101,
4365 84, 84, 0, 0, 0, 112, 112, 0, 699, 0,
4366 0, 84, 84, 0, 0, 0, 563, 0, 0, 0,
4367 112, 0, 0, 0, 0, 0, 973, 1120, 1120, 0,
4368 564, 1120, 0, 0, 0, 0, 0, 84, 0, 0,
4369 565, 0, 0, 0, 0, 84, 567, 568, 1120, 0,
4370 0, 0, 0, 0, 0, 0, 112, 112, 0, 0,
4371 112, 0, 0, 0, 0, 112, 0, 0, 0, 0,
4372 0, 0, 0, 0, 1199, 0, 0, 0, 101, 569,
4373 0, 101, 101, 0, 1120, 0, 0, 101, 0, 0,
4374 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4375 0, 101, 0, 0, 101, 0, 0, 1120, 0, 0,
4376 1120, 0, 0, 1022, 0, 0, 0, 0, 0, 0,
4377 0, 0, 0, 247, 1120, 0, 1120, 0, 0, 1120,
4378 1120, 0, 0, 0, 1120, 1120, 1045, 0, 0, 0,
4379 0, 0, 0, 0, 0, 101, 0, 0, 1055, 0,
4380 0, 0, 0, 0, 0, 0, 0, 0, 1246, 101,
4381 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4382 0, 0, 298, 0, 0, 1300, 0, 0, 0, 84,
4383 0, 84, 84, 112, 0, 0, 0, 0, 0, 0,
4384 0, 0, 1120, 0, 0, 0, 0, 1079, 0, 0,
4385 0, 0, 0, 0, 0, 0, 0, 0, 112, 0,
4386 112, 0, 0, 112, 112, 247, 0, 0, 0, 112,
4387 0, 0, 247, 247, 0, 0, 0, 101, 0, 0,
4388 0, 0, 1142, 0, 0, 0, 0, 1341, 112, 0,
4389 0, 0, 0, 0, 1120, 0, 0, 84, 1120, 0,
4390 1120, 0, 0, 0, 0, 0, 1121, 1121, 0, 0,
4391 0, 0, 0, 0, 84, 0, 0, 101, 0, 84,
4392 84, 0, 0, 0, 0, 84, 84, 0, 0, 0,
4393 0, 0, 0, 0, 84, 84, 0, 0, 112, 0,
4394 112, 112, 112, 112, 0, 112, 112, 0, 0, 0,
4395 84, 0, 0, 0, 0, 0, 0, 0, 0, 1120,
4396 0, 1121, 1121, 0, 0, 1121, 112, 1207, 0, 84,
4397 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4398 0, 113, 1121, 0, 0, 0, 0, 0, 0, 0,
4399 0, 0, 84, 84, 84, 113, 113, 0, 0, 0,
4400 0, 0, 0, 112, 0, 0, 112, 0, 0, 84,
4401 0, 0, 112, 112, 112, 0, 0, 0, 1121, 0,
4402 0, 0, 0, 0, 0, 0, 84, 0, 112, 0,
4403 0, 0, 113, 113, 0, 0, 0, 0, 0, 0,
4404 0, 1121, 0, 0, 1121, 0, 0, 113, 0, 0,
4405 0, 0, 0, 0, 112, 0, 0, 0, 1121, 0,
4406 1121, 1122, 1122, 1121, 1121, 0, 0, 0, 1121, 1121,
4407 0, 0, 0, 0, 0, 0, 112, 0, 0, 0,
4408 0, 0, 0, 113, 113, 0, 0, 113, 0, 0,
4409 0, 0, 113, 0, 0, 0, 0, 0, 0, 0,
4410 0, 0, 0, 0, 0, 84, 0, 0, 84, 84,
4411 0, 112, 0, 0, 84, 0, 1122, 1122, 0, 0,
4412 1122, 0, 0, 0, 0, 0, 1121, 0, 84, 0,
4413 112, 84, 0, 0, 0, 1123, 1123, 1122, 0, 0,
4414 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4415 84, 112, 0, 0, 0, 0, 0, 112, 0, 0,
4416 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4417 0, 0, 84, 1122, 0, 0, 0, 0, 1121, 0,
4418 0, 0, 1121, 0, 1121, 0, 84, 0, 0, 0,
4419 1123, 1123, 0, 0, 1123, 0, 1122, 0, 0, 1122,
4420 112, 112, 0, 112, 112, 0, 0, 0, 0, 0,
4421 113, 1123, 112, 1122, 0, 1122, 0, 112, 1122, 1122,
4422 0, 0, 0, 1122, 1122, 0, 0, 0, 0, 0,
4423 0, 0, 0, 0, 0, 113, 0, 113, 0, 0,
4424 113, 113, 84, 1121, 0, 0, 113, 1123, 0, 84,
4425 84, 0, 0, 0, 84, 0, 0, 0, 0, 0,
4426 0, 112, 0, 112, 0, 113, 0, 0, 0, 0,
4427 1123, 112, 0, 1123, 0, 0, 0, 0, 0, 0,
4428 0, 1122, 112, 0, 112, 112, 0, 1123, 0, 1123,
4429 0, 0, 1123, 1123, 84, 112, 112, 1123, 1123, 0,
4430 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4431 0, 0, 0, 0, 0, 113, 0, 113, 113, 113,
4432 113, 112, 113, 113, 0, 0, 0, 0, 0, 112,
4433 0, 0, 0, 1122, 0, 0, 0, 1122, 0, 1122,
4434 0, 0, 0, 113, 0, 0, 0, 1124, 1124, 0,
4435 0, 0, 0, 0, 0, 1123, 0, 0, 0, 1125,
4436 1125, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4437 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4438 113, 0, 0, 113, 0, 0, 0, 0, 0, 113,
4439 113, 113, 0, 0, 0, 0, 0, 0, 1122, 0,
4440 0, 0, 1124, 1124, 0, 113, 1124, 1123, 0, 0,
4441 0, 1123, 0, 1123, 1125, 1125, 0, 0, 1125, 0,
4442 0, 0, 0, 1124, 0, 0, 0, 0, 0, 0,
4443 0, 113, 0, 0, 0, 1125, 0, 0, 0, 0,
4444 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4445 0, 0, 0, 113, 0, 0, 0, 0, 0, 1124,
4446 0, 0, 0, 112, 0, 112, 112, 0, 0, 0,
4447 0, 1125, 1123, 0, 0, 0, 0, 0, 0, 0,
4448 0, 0, 1124, 0, 0, 1124, 0, 0, 113, 0,
4449 0, 0, 0, 0, 1125, 0, 0, 1125, 0, 1124,
4450 0, 1124, 0, 0, 1124, 1124, 0, 113, 0, 1124,
4451 1124, 1125, 0, 1125, 0, 0, 1125, 1125, 0, 0,
4452 0, 1125, 1125, 0, 0, 0, 0, 0, 113, 0,
4453 0, 112, 0, 0, 113, 0, 0, 0, 0, 0,
4454 0, 0, 0, 0, 0, 0, 0, 0, 112, 0,
4455 0, 0, 0, 112, 112, 0, 0, 80, 0, 112,
4456 112, 0, 0, 0, 0, 0, 0, 1124, 112, 112,
4457 0, 80, 80, 0, 1126, 1126, 0, 113, 113, 1125,
4458 113, 113, 0, 0, 112, 0, 0, 0, 0, 113,
4459 0, 0, 0, 0, 113, 0, 0, 0, 0, 0,
4460 0, 0, 0, 112, 0, 0, 0, 0, 80, 80,
4461 0, 0, 306, 0, 0, 0, 0, 0, 0, 1124,
4462 0, 0, 0, 1124, 0, 1124, 112, 112, 112, 1126,
4463 1126, 1125, 0, 1126, 0, 1125, 0, 1125, 113, 0,
4464 113, 0, 0, 112, 0, 306, 0, 0, 113, 0,
4465 1126, 0, 0, 0, 0, 0, 0, 0, 0, 113,
4466 112, 113, 113, 0, 306, 306, 306, 0, 80, 0,
4467 0, 0, 113, 113, 0, 0, 0, 0, 0, 0,
4468 0, 0, 0, 0, 1124, 0, 1126, 0, 0, 0,
4469 0, 0, 0, 0, 0, 0, 1125, 0, 113, 0,
4470 0, 0, 0, 0, 0, 0, 113, 0, 0, 1126,
4471 0, 0, 1126, 0, 0, 0, 0, 367, 0, 0,
4472 0, 0, 0, 0, 0, 0, 1126, 0, 1126, 0,
4473 0, 1126, 1126, 0, 0, 0, 1126, 1126, 0, 112,
4474 0, 0, 112, 112, 0, 0, 0, 0, 112, 0,
4475 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4476 0, 0, 112, 0, 0, 112, 0, 0, 0, 0,
4477 368, 369, 370, 371, 372, 373, 374, 375, 376, 377,
4478 378, 379, 380, 0, 112, 0, 80, 381, 382, 0,
4479 0, 0, 0, 383, 1126, 0, 0, 0, 0, 0,
4480 0, 0, 0, 0, 0, 0, 112, 0, 0, 0,
4481 0, 80, 0, 80, 0, 0, 0, 0, 0, 0,
4482 112, 0, 80, 0, 0, 0, 0, 384, 0, 385,
4483 386, 387, 388, 389, 390, 391, 392, 393, 394, 0,
4484 113, 80, 113, 113, 0, 0, 1126, 0, 0, 0,
4485 1126, 0, 1126, 0, 0, 0, 0, 0, 0, 0,
4486 0, 306, 0, 0, 0, 0, 0, 0, 0, 0,
4487 0, 0, 0, 0, 0, 0, 112, 0, 0, 0,
4488 0, 0, 0, 112, 112, 0, 0, 0, 112, 0,
4489 0, 80, 0, 0, 0, 0, 0, 0, 0, 0,
4490 0, 0, 0, 0, 0, 0, 0, 0, 113, 0,
4491 0, 1126, 0, 0, 0, 0, 0, 0, 0, 80,
4492 306, 0, 0, 0, 0, 113, 0, 0, 112, 0,
4493 113, 113, 0, 0, 81, 0, 113, 113, 0, 0,
4494 0, 0, 0, 0, 0, 113, 113, 0, 81, 81,
4495 0, 0, 0, 0, 0, 0, 80, 0, 0, 80,
4496 0, 113, 0, 0, 0, 0, 80, 80, 0, 0,
4497 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4498 113, 0, 0, 0, 0, 81, 81, 0, 0, 307,
4499 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4500 0, 0, 0, 113, 113, 113, 0, 80, 0, 0,
4501 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4502 113, 0, 307, 0, 0, 0, 0, 0, 0, 80,
4503 0, 0, 0, 0, 0, 0, 0, 113, 0, 0,
4504 0, 307, 307, 307, 0, 81, 0, 0, 0, 0,
4505 0, 0, 0, -823, 0, 0, 0, 0, 0, 0,
4506 0, -823, -823, -823, 80, 0, -823, -823, -823, 0,
4507 -823, 0, 0, 0, 0, 0, 0, 0, -823, -823,
4508 -823, 306, 0, 80, 0, 0, 0, 0, 0, 0,
4509 -823, -823, 0, -823, -823, -823, -823, -823, 0, 0,
4510 0, 0, 0, 0, 80, 0, 0, 0, 0, 0,
4511 80, 0, 0, 0, 0, 0, 113, 0, 0, 113,
4512 113, -823, -823, 0, 0, 113, 0, 0, 0, 0,
4513 0, 0, 0, 0, 0, 0, 0, 0, 0, 113,
4514 0, 0, 113, 0, 0, 0, 0, 0, 0, 0,
4515 -823, -823, 0, 0, 80, 0, 0, 80, 0, 0,
4516 0, 113, 0, 81, 0, 0, 0, 306, 0, 0,
4517 80, 0, 0, -823, 0, 0, 0, 0, 0, 0,
4518 0, 0, 0, 113, 0, 0, 0, 0, 81, 0,
4519 81, 0, 0, 0, 0, 0, 0, 113, 0, 81,
4520 0, 0, 0, 0, -823, -823, 0, -823, 0, 0,
4521 255, -823, 0, -823, 80, 0, 80, 0, 81, 0,
4522 0, 0, 0, 0, 80, 0, 0, 0, 0, 0,
4523 0, 0, 0, 0, 0, 80, 0, 80, 307, 0,
4524 0, 0, 0, 0, 0, 0, 0, 0, 80, 80,
4525 0, 0, 0, 113, 0, 0, 0, 0, 0, 0,
4526 113, 113, 0, 0, 0, 113, 0, 0, 81, 0,
4527 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4528 0, 0, 80, 0, 0, 0, 0, 0, 306, 368,
4529 -824, -824, -824, -824, 373, 374, 81, 307, -824, -824,
4530 0, 0, 0, 0, 0, 113, 381, 382, 0, 0,
4531 0, 0, 0, 0, 0, 0, 0, 0, 0, 141,
4532 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4533 0, 0, 0, 81, 0, 0, 81, 0, 0, 0,
4534 0, 0, 0, 81, 81, 0, 0, 0, 385, 386,
4535 387, 388, 389, 390, 391, 392, 393, 394, 0, 0,
4536 0, 0, 0, 0, 0, 0, 306, 0, 0, 0,
4537 141, 141, 0, 0, 313, 0, 0, 0, 0, 0,
4538 0, 0, 0, 0, 81, 0, 0, 0, 0, 0,
4539 0, 0, 0, 0, 0, 22, 23, 24, 25, 0,
4540 0, 0, 0, 0, 0, 0, 81, 313, 0, 0,
4541 0, 31, 32, 33, 1084, 0, 0, 0, 1085, 80,
4542 0, 40, 41, 42, 43, 44, 422, 432, 432, 368,
4543 369, 370, 371, 372, 373, 374, 375, 0, 377, 378,
4544 0, 81, 0, 0, 0, 0, 381, 382, 0, 0,
4545 0, 0, 0, 1087, 1088, 0, 0, 0, 307, 0,
4546 81, 1089, 0, 0, 1090, 0, 1091, 1092, 0, 1093,
4547 0, 0, 57, 58, 59, 60, 61, 62, 63, 64,
4548 65, 81, 0, 0, 0, 0, 0, 81, 385, 386,
4549 387, 388, 389, 390, 391, 392, 393, 394, 0, 0,
4550 0, 80, 1095, 0, 0, 0, 80, 80, 0, 304,
4551 0, 137, 80, 80, 0, 0, 259, 0, 0, 0,
4552 0, 80, 0, 0, 0, 0, 0, 0, 0, 0,
4553 0, 81, 0, 0, 81, 0, 0, 80, 0, 0,
4554 0, 0, 0, 0, 307, 0, 0, 81, 141, 0,
4555 0, 0, 0, 0, 0, 0, 80, 0, 0, 0,
4556 0, 0, 137, 137, 0, 0, 311, 0, 0, 0,
4557 0, 0, 0, 0, 0, 0, 0, 0, 0, 80,
4558 80, 80, 0, 0, 141, 0, 0, 0, 0, 0,
4559 0, 81, 0, 81, 0, 0, 80, 0, 0, 311,
4560 0, 81, 0, 141, 0, 0, 0, 0, 0, 0,
4561 0, 0, 81, 80, 81, 0, 0, 0, 420, 430,
4562 430, 430, 0, 313, 0, 81, 81, 0, 22, 23,
4563 24, 25, 0, 0, 0, 0, 0, 0, 0, 0,
4564 0, 0, 0, 0, 31, 32, 33, 1084, 0, 0,
4565 0, 1085, 0, 141, 40, 41, 42, 43, 44, 81,
4566 0, 0, 0, 0, 0, 307, 0, 0, 0, 0,
4567 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4568 91, 141, 313, 0, 0, 0, 1087, 1088, 306, 0,
4569 0, 0, 80, 0, 1089, 80, 80, 1090, 0, 1091,
4570 1092, 80, 1093, 0, 0, 57, 58, 59, 60, 61,
4571 62, 63, 64, 65, 0, 80, 0, 0, 80, 0,
4572 0, 141, 0, 0, 0, 0, 0, 0, 141, 141,
4573 0, 91, 91, 0, 0, 1095, 0, 0, 0, 0,
4574 137, 0, 304, 307, 368, 369, 370, 371, 372, 373,
4575 374, 375, 376, 377, 378, 379, 380, 0, 0, 80,
4576 0, 381, 382, 0, 0, 0, 0, 0, 0, 0,
4577 0, 0, 0, 80, 0, 0, 137, 0, 0, 0,
4578 0, 0, 0, 0, 0, 0, 0, 417, 0, 306,
4579 0, 0, 0, 0, 0, 137, 81, 0, 0, 0,
4580 0, 384, 0, 385, 386, 387, 388, 389, 390, 391,
4581 392, 393, 394, 0, 0, 311, 0, 0, 0, 0,
4582 259, 0, 0, 0, 0, 0, 141, 0, 0, 80,
4583 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4584 0, 80, 0, 313, 0, 137, 0, 0, 0, 0,
4585 0, 306, 0, 0, 0, 0, 0, 0, 0, 0,
4586 0, 0, 0, 0, 0, 0, 141, 0, 0, 0,
4587 0, 0, 141, 137, 311, 0, 0, 0, 81, 0,
4588 0, 80, 0, 81, 81, 0, 0, 0, 0, 81,
4589 81, 0, 0, 0, 0, 140, 0, 0, 81, 0,
4590 0, 0, 0, 0, 0, 0, 0, 0, 0, 91,
4591 0, 0, 0, 137, 81, 0, 141, 0, 0, 141,
4592 137, 137, 0, 0, 0, 0, 0, 0, 0, 313,
4593 0, 0, 821, 81, 0, 0, 0, 0, 0, 0,
4594 0, 0, 0, 0, 0, 91, 140, 140, 0, 0,
4595 0, 0, 0, 0, 0, 0, 81, 81, 81, 0,
4596 0, 0, 0, 0, 91, 368, 369, 370, 371, 372,
4597 373, 374, 0, 81, 377, 378, 141, 0, 141, 0,
4598 0, 0, 381, 382, 0, 0, 0, 0, 0, 0,
4599 81, 0, 0, 0, 0, 0, 0, 0, 0, 141,
4600 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4601 821, 821, 0, 0, 91, 0, 0, 0, 137, 0,
4602 0, 0, 0, 0, 385, 386, 387, 388, 389, 390,
4603 391, 392, 393, 394, 0, 311, 0, 0, 0, 0,
4604 0, 0, 91, 0, 821, 0, 0, 0, 0, 0,
4605 313, 0, 0, 0, 0, 0, 0, 0, 137, 901,
4606 0, 0, 0, 0, 137, 307, 0, 0, 0, 81,
4607 0, 0, 81, 81, 0, 0, 0, 0, 81, 0,
4608 0, 0, 91, 0, 0, 0, 0, 0, 0, 91,
4609 91, 0, 81, 0, 0, 81, 0, 0, 0, 0,
4610 0, 0, 0, 0, 0, 0, 0, 0, 137, 0,
4611 0, 137, 0, 0, 0, 0, 0, 0, 0, 0,
4612 0, 311, 0, 0, 140, 0, 0, 0, 313, 0,
4613 0, 0, 0, 0, 0, 0, 81, 0, 0, 0,
4614 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4615 81, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4616 140, 0, 0, 0, 0, 0, 307, 0, 137, 0,
4617 137, 0, 0, 0, 0, 0, 0, 0, 0, 140,
4618 0, 141, 22, 23, 24, 25, 0, 91, 0, 0,
4619 0, 137, 0, 0, 0, 0, 0, 0, 31, 32,
4620 33, 1084, 0, 0, 0, 1085, 81, 0, 40, 41,
4621 42, 43, 44, 0, 0, 0, 0, 0, 81, 0,
4622 0, 0, 0, 0, 0, 0, 0, 91, 307, 140,
4623 0, 0, 0, 91, 0, 0, 0, 0, 0, 0,
4624 1087, 1088, 311, 0, 0, 0, 0, 0, 1089, 0,
4625 0, 1090, 0, 1091, 1092, 0, 0, 140, 81, 57,
4626 58, 59, 60, 61, 62, 63, 64, 65, 821, 821,
4627 0, 0, 0, 0, 821, 821, 0, 91, 0, 0,
4628 91, 0, 0, 141, 0, 0, 0, 0, 0, 1095,
4629 0, 0, 0, 815, 0, 0, 304, 140, 0, 141,
4630 0, 0, 0, 0, 140, 140, 0, 0, 0, 0,
4631 0, 0, 0, 0, 0, 0, 0, 0, 141, 0,
4632 311, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4633 0, 0, 0, 0, 0, 0, 0, 91, 0, 91,
4634 0, 141, 141, 821, 0, 0, 0, 0, 0, 0,
4635 0, 0, 0, 0, 0, 0, 0, 0, 821, 0,
4636 91, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4637 0, 815, 815, 137, 0, 141, 0, 0, 0, 0,
4638 0, 0, 0, 0, 0, 0, 0, 0, 943, 0,
4639 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4640 0, 0, 140, 0, 0, 815, 0, 0, 0, 0,
4641 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4642 0, 0, 368, 369, 370, 371, 372, 373, 374, 375,
4643 376, 377, 378, 379, 380, 0, 0, 0, 0, 381,
4644 382, 0, 140, 0, 0, 0, 0, 0, 140, 0,
4645 1202, 0, 0, 0, 141, 0, 0, 141, 141, 0,
4646 0, 0, 0, 141, 0, 0, 0, 0, 0, 0,
4647 0, 0, 0, 0, 0, 137, 0, 141, 0, 384,
4648 141, 385, 386, 387, 388, 389, 390, 391, 392, 393,
4649 394, 137, 140, 0, 0, 140, 0, 0, 0, -298,
4650 0, 0, 0, 0, 0, 0, 0, 0, 140, 0,
4651 137, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4652 0, 141, 0, 0, 0, 0, 0, 0, 0, 0,
4653 0, 0, 0, 137, 137, 141, 0, 0, 0, 0,
4654 0, 0, 91, 0, 0, 0, 0, 0, 0, 0,
4655 0, 432, 140, 0, 140, 0, 0, 0, 0, 0,
4656 0, 0, 0, 0, 0, 0, 0, 137, 0, 0,
4657 0, 0, 0, 0, 0, 140, 0, 0, 0, 0,
4658 0, 0, 0, 0, 0, 0, 140, 140, 0, 0,
4659 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4660 0, 0, 0, 141, 0, 0, 0, 0, 0, 0,
4661 0, 0, 0, 432, 0, 0, 0, 0, 0, 0,
4662 140, 0, 0, 0, 0, 0, 0, 0, 0, 815,
4663 815, 0, 0, 0, 0, 815, 815, 0, 0, 0,
4664 0, 0, 1200, 141, 91, 0, 137, 0, 0, 137,
4665 137, 0, 0, 0, 943, 137, 0, 0, 0, 0,
4666 91, 0, 0, 0, 0, 0, 0, 0, 0, 137,
4667 0, 0, 137, 0, 0, 0, 0, 0, 0, 91,
4668 0, 0, 0, 0, 0, 0, 0, 0, 368, 369,
4669 370, 371, 372, 373, 374, 375, 376, 377, 378, 379,
4670 380, 0, 91, 91, 815, 381, 382, 0, 0, 0,
4671 0, 0, 0, 137, 0, 0, 0, 0, 0, 815,
4672 0, 0, 0, 0, 0, 0, 0, 137, 0, 239,
4673 239, 0, 0, 0, 0, 0, 91, 0, 0, 0,
4674 0, 0, 0, 430, 0, 384, 0, 385, 386, 387,
4675 388, 389, 390, 391, 392, 393, 394, 140, 0, 0,
4676 0, 276, 280, 281, 282, 0, 0, 0, 239, 239,
4677 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4678 0, 329, 330, 0, 0, 0, 0, 0, 0, 0,
4679 0, 0, 0, 0, 0, 137, 0, 0, 0, 0,
4680 0, 0, 0, 0, 0, 430, 0, 0, 0, 0,
4681 0, 1198, 0, 0, 0, 91, 0, 0, 91, 91,
4682 0, 0, 0, 0, 91, 0, 239, 0, 0, 0,
4683 0, 0, 0, 0, 0, 137, 688, 650, 91, 0,
4684 689, 91, 0, 0, 140, 140, 0, 0, 0, 0,
4685 140, 140, 0, 0, 0, 0, 0, 0, 0, 140,
4686 188, 189, 190, 191, 192, 193, 194, 195, 196, 0,
4687 0, 197, 198, 0, 0, 140, 0, 199, 200, 201,
4688 202, 0, 91, 0, 0, 0, 0, 0, 0, 0,
4689 0, 203, 204, 0, 140, 0, 91, 0, 0, 0,
4690 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4691 0, 0, 0, 0, 0, 0, 0, 140, 140, 140,
4692 0, 205, 206, 207, 208, 209, 210, 211, 212, 213,
4693 214, 0, 215, 216, 140, 0, 0, 0, 0, 0,
4694 217, 255, 239, 0, 0, 239, 239, 239, 0, 329,
4695 0, 140, 0, 0, 0, 641, 642, 0, 0, 643,
4696 0, 0, 0, 0, 91, 0, 0, 0, 0, 239,
4697 0, 239, 0, 0, 0, 0, 0, 0, 0, 188,
4698 189, 190, 191, 192, 193, 194, 195, 196, 0, 0,
4699 197, 198, 0, 0, 0, 0, 199, 200, 201, 202,
4700 0, 0, 0, 0, 91, 0, 0, 0, 0, 0,
4701 203, 204, 0, 0, 0, 0, 0, 0, 0, 0,
4702 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4703 140, 0, 0, 140, 140, 0, 0, 0, 0, 140,
4704 205, 206, 207, 208, 209, 210, 211, 212, 213, 214,
4705 0, 215, 216, 140, 0, 0, 140, 0, 0, 217,
4706 368, 369, 370, 371, 372, 373, 374, 375, 376, 377,
4707 378, 379, 380, 0, 0, 0, 0, 381, 382, 0,
4708 0, 0, 616, 617, 618, 619, 620, 0, 0, 621,
4709 622, 623, 624, 625, 626, 627, 628, 140, 630, 0,
4710 0, 631, 632, 633, 634, 635, 636, 637, 638, 639,
4711 640, 140, 0, 0, 239, 0, 0, 384, 0, 385,
4712 386, 387, 388, 389, 390, 391, 392, 393, 394, 0,
4713 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4714 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4715 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4716 0, 0, 0, 0, 0, 239, 0, 0, 0, 0,
4717 0, 0, 0, 0, 0, 0, 0, 0, 0, 140,
4718 0, 0, 239, 239, 0, 0, 0, 239, 0, 0,
4719 0, 239, 0, 282, 0, -805, 0, 0, 0, 0,
4720 0, 0, 0, -805, -805, -805, 0, 0, -805, -805,
4721 -805, 719, -805, 0, 0, 0, 0, 0, 0, 140,
4722 -805, -805, -805, -805, -805, 0, 239, 0, 0, 239,
4723 0, 0, -805, -805, 0, -805, -805, -805, -805, -805,
4724 0, 239, 0, 0, 0, 0, 0, 0, 0, 0,
4725 0, 0, 0, 0, 0, 0, 0, 0, 0, 751,
4726 0, 0, 0, -805, -805, 0, 0, 0, 0, 0,
4727 0, 0, 0, -805, -805, -805, -805, -805, -805, -805,
4728 -805, -805, -805, -805, -805, -805, 0, 0, 0, 0,
4729 -805, -805, -805, -805, 0, 883, -805, 0, 0, 0,
4730 0, -805, 0, 239, 0, 0, 0, 0, 0, 0,
4731 0, 785, 0, 0, 785, -805, 0, 0, -805, 0,
4732 0, 0, 0, 239, 0, 0, 0, 0, 816, -146,
4733 -805, -805, -805, -805, -805, -805, -805, -805, -805, -805,
4734 -805, -805, 0, 0, 0, 0, -805, -805, -805, -805,
4735 -805, 0, 0, -805, -805, -805, 0, 0, 0, 0,
4736 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4737 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4738 0, 0, 239, 0, 0, 0, 0, 0, 0, 0,
4739 0, 0, 0, 239, 0, 0, 0, 0, 0, 0,
4740 0, 0, 0, 0, 0, 0, 875, 875, 0, 0,
4741 239, 875, 0, 0, 0, 0, 0, 0, 0, 0,
4742 0, 0, 875, 875, 0, 0, 239, 0, 239, 0,
4743 0, 0, 0, 0, 0, 785, 785, 0, 0, 0,
4744 875, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4745 0, 0, 0, 0, 0, 0, -4, 3, 0, 4,
4746 5, 6, 7, 8, -4, -4, -4, 9, 10, 0,
4747 -4, -4, 11, -4, 12, 13, 14, 15, 16, 17,
4748 18, -4, 0, 0, 0, 239, 19, 20, 21, 22,
4749 23, 24, 25, 0, 0, 26, 0, 0, 0, 0,
4750 0, 27, 28, 284, 30, 31, 32, 33, 34, 35,
4751 36, 37, 38, 39, 239, 40, 41, 42, 43, 44,
4752 45, 46, 0, 0, -4, 0, 0, 0, 0, 0,
4753 0, 0, 47, 48, 0, 0, 0, 0, 0, 0,
4754 0, 0, 0, 0, 0, 0, 239, 49, 50, 0,
4755 0, 0, 0, 0, 0, 51, 0, 0, 52, 53,
4756 54, 55, 0, 56, 239, 0, 57, 58, 59, 60,
4757 61, 62, 63, 64, 65, 0, -4, 0, 0, 0,
4758 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4759 0, 0, 0, 0, 875, 0, 0, 0, 0, 0,
4760 0, 0, 0, 66, 67, 68, 0, 0, -4, 0,
4761 22, 23, 24, 25, -4, 0, 546, 0, 0, 0,
4762 0, 0, 0, 0, 0, 0, 31, 32, 33, 1084,
4763 0, 0, 0, 1085, 0, 1086, 40, 41, 42, 43,
4764 44, 0, 785, 0, 0, 0, 0, 0, 0, 0,
4765 0, 239, 0, 0, 0, 563, 0, 0, 0, 239,
4766 0, 0, 0, 1034, 875, 875, 0, 0, 1087, 1088,
4767 875, 875, 0, 0, 239, 0, 1089, 0, 0, 1090,
4768 0, 1091, 1092, 0, 1093, 567, 239, 57, 58, 1094,
4769 60, 61, 62, 63, 64, 65, 0, 0, 0, 0,
4770 0, 0, 0, 0, 875, 875, 0, 875, 875, 0,
4771 239, 0, 785, 0, 0, 0, 0, 1095, 0, 0,
4772 0, 0, 0, 0, 304, 0, 0, 0, 0, 0,
4773 0, 1075, 1076, 0, 0, 239, 0, 0, 0, 875,
4774 1082, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4775 0, 0, 0, 0, 875, 0, 0, 0, 0, 0,
4776 0, -823, 3, 0, 4, 5, 6, 7, 8, 0,
4777 239, 0, 9, 10, 0, 0, 0, 11, 875, 12,
4778 13, 14, 15, 16, 17, 18, 0, 0, 0, 0,
4779 0, 19, 20, 21, 22, 23, 24, 25, 0, 0,
4780 26, 0, 0, 0, 0, 0, 27, 28, 284, 30,
4781 31, 32, 33, 34, 35, 36, 37, 38, 39, 0,
4782 40, 41, 42, 43, 44, 45, 46, 0, 0, 0,
4783 0, 0, 0, 0, 0, 0, 0, 47, 48, 0,
4784 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4785 0, 0, 49, 50, 0, 239, 0, 0, 0, 0,
4786 51, 0, 0, 52, 53, 54, 55, 0, 56, 0,
4787 0, 57, 58, 59, 60, 61, 62, 63, 64, 65,
4788 0, -823, 0, 0, 0, 0, 0, 0, 0, 0,
4789 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4790 0, 0, 0, 0, 0, 0, 0, 0, 66, 67,
4791 68, 0, 0, -823, 3, -823, 4, 5, 6, 7,
4792 8, -823, 0, 0, 9, 10, 0, 0, 0, 11,
4793 0, 12, 13, 14, 15, 16, 17, 18, 0, 0,
4794 0, 0, 0, 19, 20, 21, 22, 23, 24, 25,
4795 0, 0, 26, 0, 0, 0, 0, 0, 27, 28,
4796 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
4797 39, 0, 40, 41, 42, 43, 44, 45, 46, 0,
4798 0, 0, 0, 0, 0, 0, 0, 239, 0, 47,
4799 48, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4800 0, 0, 0, 0, 49, 50, 0, 0, 0, 0,
4801 0, 0, 51, 0, 0, 52, 53, 54, 55, 0,
4802 56, 0, 0, 57, 58, 59, 60, 61, 62, 63,
4803 64, 65, 0, 0, 0, 0, 0, 0, 0, 0,
4804 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4805 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4806 66, 67, 68, 0, 0, -4, 3, -823, 4, 5,
4807 6, 7, 8, -823, 0, 0, 9, 10, 0, 0,
4808 0, 11, 0, 12, 13, 14, 15, 16, 17, 18,
4809 0, 0, 0, 0, 0, 19, 20, 21, 22, 23,
4810 24, 25, 0, 0, 26, 0, 0, 0, 0, 0,
4811 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
4812 37, 38, 39, 0, 40, 41, 42, 43, 44, 45,
4813 46, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4814 0, 47, 48, 0, 0, 0, 0, 0, 0, 0,
4815 0, 0, 0, 0, 0, 0, 49, 50, 0, 0,
4816 0, 0, 0, 0, 51, 0, 0, 52, 53, 54,
4817 55, 0, 56, 0, 0, 57, 58, 59, 60, 61,
4818 62, 63, 64, 65, 0, 0, 0, 0, 0, 0,
4819 0, -698, 0, 0, 0, 0, 0, 0, 0, -698,
4820 -698, -698, 0, 0, -698, -698, -698, 0, -698, 0,
4821 0, 0, 66, 67, 68, 0, -698, -4, -698, -698,
4822 -698, 0, 0, 0, 0, 546, 0, 0, -698, -698,
4823 0, -698, -698, -698, -698, -698, 0, 0, 0, 368,
4824 369, 370, 371, 372, 373, 374, 375, 376, 377, 378,
4825 -824, -824, 0, 0, 0, 0, 381, 382, 0, -698,
4826 -698, 0, 0, 0, 0, 0, 0, 0, 0, -698,
4827 -698, -698, -698, -698, -698, -698, -698, -698, -698, -698,
4828 -698, -698, 0, 0, 0, 0, -698, -698, -698, -698,
4829 0, -698, -698, 0, 0, 0, 0, -698, 385, 386,
4830 387, 388, 389, 390, 391, 392, 393, 394, 0, 0,
4831 0, -698, 0, 0, -698, 0, 0, 0, 0, 0,
4832 0, 0, 0, 0, 0, -698, -698, -698, -698, -698,
4833 -698, -698, -698, -698, -698, -698, -698, -698, 0, 0,
4834 0, 0, 0, -698, -698, -698, -698, -699, 0, -698,
4835 -698, -698, 0, 0, 0, -699, -699, -699, 0, 0,
4836 -699, -699, -699, 0, -699, 0, 0, 0, 0, 0,
4837 0, 0, -699, 0, -699, -699, -699, 0, 0, 0,
4838 0, 0, 0, 0, -699, -699, 0, -699, -699, -699,
4839 -699, -699, 0, 0, 0, 0, 0, 0, 0, 0,
4840 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4841 0, 0, 0, 0, 0, -699, -699, 0, 0, 0,
4842 0, 0, 0, 0, 0, -699, -699, -699, -699, -699,
4843 -699, -699, -699, -699, -699, -699, -699, -699, 0, 0,
4844 0, 0, -699, -699, -699, -699, 0, -699, -699, 0,
4845 0, 0, 0, -699, 0, 0, 0, 0, 0, 0,
4846 0, 0, 0, 0, 0, 0, 0, -699, 0, 0,
4847 -699, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4848 0, -699, -699, -699, -699, -699, -699, -699, -699, -699,
4849 -699, -699, -699, -699, 0, 0, 0, 0, 0, -699,
4850 -699, -699, -699, -806, 0, -699, -699, -699, 0, 0,
4851 0, -806, -806, -806, 0, 0, -806, -806, -806, 0,
4852 -806, 0, 0, 0, 0, 0, 0, 0, -806, -806,
4853 -806, -806, -806, 0, 0, 0, 0, 0, 0, 0,
4854 -806, -806, 0, -806, -806, -806, -806, -806, 0, 0,
4855 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4856 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4857 0, -806, -806, 0, 0, 0, 0, 0, 0, 0,
4858 0, -806, -806, -806, -806, -806, -806, -806, -806, -806,
4859 -806, -806, -806, -806, 0, 0, 0, 0, -806, -806,
4860 -806, -806, 0, 0, -806, 0, 0, 0, 0, -806,
4861 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4862 0, 0, 0, -806, 0, 0, -806, 0, 0, 0,
4863 0, 0, 0, 0, 0, 0, 0, 0, -806, -806,
4864 -806, -806, -806, -806, -806, -806, -806, -806, -806, -806,
4865 0, 0, 0, 0, -806, -806, -806, -806, -806, -807,
4866 0, -806, -806, -806, 0, 0, 0, -807, -807, -807,
4867 0, 0, -807, -807, -807, 0, -807, 0, 0, 0,
4868 0, 0, 0, 0, -807, -807, -807, -807, -807, 0,
4869 0, 0, 0, 0, 0, 0, -807, -807, 0, -807,
4870 -807, -807, -807, -807, 0, 0, 0, 0, 0, 0,
4871 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4872 0, 0, 0, 0, 0, 0, 0, -807, -807, 0,
4873 0, 0, 0, 0, 0, 0, 0, -807, -807, -807,
4874 -807, -807, -807, -807, -807, -807, -807, -807, -807, -807,
4875 0, 0, 0, 0, -807, -807, -807, -807, 0, 0,
4876 -807, 0, 0, 0, 0, -807, 0, 0, 0, 0,
4877 0, 0, 0, 0, 0, 0, 0, 0, 0, -807,
4878 0, 0, -807, 0, 0, 0, 0, 0, 0, 0,
4879 0, 0, 0, 0, -807, -807, -807, -807, -807, -807,
4880 -807, -807, -807, -807, -807, -807, 0, 0, 0, 0,
4881 -807, -807, -807, -807, -807, -513, 0, -807, -807, -807,
4882 0, 0, 0, -513, -513, -513, 0, 0, -513, -513,
4883 -513, 0, -513, 0, 0, 0, 0, 0, 0, 0,
4884 -513, -513, -513, -513, 0, 0, 0, 0, 0, 0,
4885 0, 0, -513, -513, 0, -513, -513, -513, -513, -513,
4886 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4887 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4888 0, 0, 0, -513, -513, 0, 0, 0, 0, 0,
4889 0, 0, 0, -513, -513, -513, -513, -513, -513, -513,
4890 -513, -513, -513, -513, -513, -513, 0, 0, 0, 0,
4891 -513, -513, -513, -513, 0, 0, -513, 0, 0, 0,
4892 0, -513, 0, 0, 0, 0, 0, 0, 0, 0,
4893 0, 0, 0, 0, 0, -513, 0, 0, 0, 0,
4894 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4895 -513, 0, -513, -513, -513, -513, -513, -513, -513, -513,
4896 -513, -513, 0, 0, 0, 0, -513, -513, -513, -513,
4897 -513, -350, 255, -513, -513, -513, 0, 0, 0, -350,
4898 -350, -350, 0, 0, -350, -350, -350, 0, -350, 0,
4899 0, 0, 0, 0, 0, 0, -350, 0, -350, -350,
4900 -350, 0, 0, 0, 0, 0, 0, 0, -350, -350,
4901 0, -350, -350, -350, -350, -350, 0, 0, 0, 0,
4902 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4903 0, 0, 0, 0, 0, 0, 0, 0, 0, -350,
4904 -350, 0, 0, 0, 0, 0, 0, 0, 0, -350,
4905 -350, -350, -350, -350, -350, -350, -350, -350, -350, -350,
4906 -350, -350, 0, 0, 0, 0, -350, -350, -350, -350,
4907 0, 0, -350, 0, 0, 0, 0, -350, 0, 0,
4908 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4909 0, -350, 0, 0, -350, 0, 0, 0, 0, 0,
4910 0, 0, 0, 0, 0, 0, -350, -350, -350, -350,
4911 -350, -350, -350, -350, -350, -350, -350, -350, 0, 0,
4912 0, 0, 0, -350, -350, -350, -350, -823, 0, -350,
4913 -350, -350, 0, 0, 0, -823, -823, -823, 0, 0,
4914 -823, -823, -823, 0, -823, 0, 0, 0, 0, 0,
4915 0, 0, -823, -823, -823, -823, 0, 0, 0, 0,
4916 0, 0, 0, 0, -823, -823, 0, -823, -823, -823,
4917 -823, -823, 0, 0, 0, 0, 0, 0, 0, 0,
4918 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4919 0, 0, 0, 0, 0, -823, -823, 0, 0, 0,
4920 0, 0, 0, 0, 0, -823, -823, -823, -823, -823,
4921 -823, -823, -823, -823, -823, -823, -823, -823, 0, 0,
4922 0, 0, -823, -823, -823, -823, 0, 0, -823, 0,
4923 0, 0, 0, -823, 0, 0, 0, 0, 0, 0,
4924 0, 0, 0, 0, 0, 0, 0, -823, 0, 0,
4925 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4926 0, 0, -823, 0, -823, -823, -823, -823, -823, -823,
4927 -823, -823, -823, -823, 0, 0, 0, 0, -823, -823,
4928 -823, -823, -823, -356, 255, -823, -823, -823, 0, 0,
4929 0, -356, -356, -356, 0, 0, -356, -356, -356, 0,
4930 -356, 0, 0, 0, 0, 0, 0, 0, -356, 0,
4931 -356, -356, 0, 0, 0, 0, 0, 0, 0, 0,
4932 -356, -356, 0, -356, -356, -356, -356, -356, 0, 0,
4933 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4934 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4935 0, -356, -356, 0, 0, 0, 0, 0, 0, 0,
4936 0, -356, -356, -356, -356, -356, -356, -356, -356, -356,
4937 -356, -356, -356, -356, 0, 0, 0, 0, -356, -356,
4938 -356, -356, 0, 884, -356, 0, 0, 0, 0, -356,
4939 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4940 0, 0, 0, -356, 0, 0, 0, 0, 0, 0,
4941 0, 0, 0, 0, 0, 0, 0, -147, -356, 0,
4942 -356, -356, -356, -356, -356, -356, -356, -356, -356, -356,
4943 0, 0, 0, 0, 827, -356, -356, -356, -356, -363,
4944 0, -356, -356, -356, 0, 0, 0, -363, -363, -363,
4945 0, 0, -363, -363, -363, 0, -363, 0, 0, 0,
4946 0, 0, 0, 0, -363, 0, -363, -363, 0, 0,
4947 0, 0, 0, 0, 0, 0, -363, -363, 0, -363,
4948 -363, -363, -363, -363, 0, 0, 0, 0, 0, 0,
4949 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4950 0, 0, 0, 0, 0, 0, 0, -363, -363, 0,
4951 0, 0, 0, 0, 0, 0, 0, -363, -363, -363,
4952 -363, -363, -363, -363, -363, -363, -363, -363, -363, -363,
4953 0, 0, 0, 0, -363, -363, -363, -363, 0, 0,
4954 -363, 0, 0, 0, 0, -363, 0, 0, 0, 0,
4955 0, 0, 0, 0, 0, 0, 0, 0, 0, -363,
4956 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4957 0, 0, 0, 0, -363, 0, -363, -363, -363, -363,
4958 -363, -363, -363, -363, -363, -363, 0, 0, 0, 0,
4959 0, -363, -363, -363, -363, -805, 451, -363, -363, -363,
4960 0, 0, 0, -805, -805, -805, 0, 0, 0, -805,
4961 -805, 0, -805, 0, 0, 0, 0, 0, 0, 0,
4962 -805, -805, 0, 0, 0, 0, 0, 0, 0, 0,
4963 0, 0, -805, -805, 0, -805, -805, -805, -805, -805,
4964 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4965 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4966 0, 0, 0, -805, -805, 0, 0, 0, 0, 0,
4967 0, 0, 0, -805, -805, -805, -805, -805, -805, -805,
4968 -805, -805, -805, -805, -805, -805, 0, 0, 0, 0,
4969 -805, -805, -805, -805, 0, 825, -805, 0, 0, 0,
4970 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4971 0, 0, 0, 0, 0, -805, 0, 0, 0, 0,
4972 0, 0, 0, 0, 0, 0, 0, 0, 0, -146,
4973 -805, 0, -805, -805, -805, -805, -805, -805, -805, -805,
4974 -805, -805, 0, 0, 0, 0, -805, -805, -805, -805,
4975 -137, -805, 0, -805, 0, -805, 0, 0, 0, -805,
4976 -805, -805, 0, 0, 0, -805, -805, 0, -805, 0,
4977 0, 0, 0, 0, 0, 0, -805, -805, 0, 0,
4978 0, 0, 0, 0, 0, 0, 0, 0, -805, -805,
4979 0, -805, -805, -805, -805, -805, 0, 0, 0, 0,
4980 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4981 0, 0, 0, 0, 0, 0, 0, 0, 0, -805,
4982 -805, 0, 0, 0, 0, 0, 0, 0, 0, -805,
4983 -805, -805, -805, -805, -805, -805, -805, -805, -805, -805,
4984 -805, -805, 0, 0, 0, 0, -805, -805, -805, -805,
4985 0, 825, -805, 0, 0, 0, 0, 0, 0, 0,
4986 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4987 0, -805, 0, 0, 0, 0, 0, 0, 0, 0,
4988 0, 0, 0, 0, 0, -146, -805, 0, -805, -805,
4989 -805, -805, -805, -805, -805, -805, -805, -805, 0, 0,
4990 0, 0, -805, -805, -805, -805, -805, -356, 0, -805,
4991 0, -805, 0, 0, 0, -356, -356, -356, 0, 0,
4992 0, -356, -356, 0, -356, 0, 0, 0, 0, 0,
4993 0, 0, -356, 0, 0, 0, 0, 0, 0, 0,
4994 0, 0, 0, 0, -356, -356, 0, -356, -356, -356,
4995 -356, -356, 0, 0, 0, 0, 0, 0, 0, 0,
4996 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4997 0, 0, 0, 0, 0, -356, -356, 0, 0, 0,
4998 0, 0, 0, 0, 0, -356, -356, -356, -356, -356,
4999 -356, -356, -356, -356, -356, -356, -356, -356, 0, 0,
5000 0, 0, -356, -356, -356, -356, 0, 826, -356, 0,
5001 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5002 0, 0, 0, 0, 0, 0, 0, -356, 0, 0,
5003 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5004 0, -147, -356, 0, -356, -356, -356, -356, -356, -356,
5005 -356, -356, -356, -356, 0, 0, 0, 0, 827, -356,
5006 -356, -356, -138, -356, 0, -356, 0, -356, 0, 0,
5007 0, -356, -356, -356, 0, 0, 0, -356, -356, 0,
5008 -356, 0, 0, 0, 0, 0, 0, 0, -356, 0,
5009 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5010 -356, -356, 0, -356, -356, -356, -356, -356, 0, 0,
5011 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5012 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5013 0, -356, -356, 0, 0, 0, 0, 0, 0, 0,
5014 0, -356, -356, -356, -356, -356, -356, -356, -356, -356,
5015 -356, -356, -356, -356, 0, 0, 0, 0, -356, -356,
5016 -356, -356, 0, 826, -356, 0, 0, 0, 0, 0,
5017 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5018 0, 0, 0, -356, 0, 0, 0, 0, 0, 0,
5019 0, 0, 0, 0, 0, 0, 0, -147, -356, 0,
5020 -356, -356, -356, -356, -356, -356, -356, -356, -356, -356,
5021 0, 0, 0, 0, 827, -356, -356, -356, -356, 0,
5022 0, -356, 3, -356, 4, 5, 6, 7, 8, -823,
5023 -823, -823, 9, 10, 0, 0, -823, 11, 0, 12,
5024 13, 14, 15, 16, 17, 18, 0, 0, 0, 0,
5025 0, 19, 20, 21, 22, 23, 24, 25, 0, 0,
5026 26, 0, 0, 0, 0, 0, 27, 28, 284, 30,
5027 31, 32, 33, 34, 35, 36, 37, 38, 39, 0,
5028 40, 41, 42, 43, 44, 45, 46, 0, 0, -823,
5029 0, 0, 0, 0, 0, 0, 0, 47, 48, 0,
5030 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5031 0, 0, 49, 50, 0, 0, 0, 0, 0, 0,
5032 51, 0, 0, 52, 53, 54, 55, 0, 56, 0,
5033 0, 57, 58, 59, 60, 61, 62, 63, 64, 65,
5034 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5035 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5036 0, 0, 0, 0, 0, 0, 0, 0, 66, 67,
5037 68, 0, 0, 0, 3, -823, 4, 5, 6, 7,
5038 8, -823, 0, -823, 9, 10, 0, -823, -823, 11,
5039 0, 12, 13, 14, 15, 16, 17, 18, 0, 0,
5040 0, 0, 0, 19, 20, 21, 22, 23, 24, 25,
5041 0, 0, 26, 0, 0, 0, 0, 0, 27, 28,
5042 284, 30, 31, 32, 33, 34, 35, 36, 37, 38,
5043 39, 0, 40, 41, 42, 43, 44, 45, 46, 0,
5044 0, -823, 0, 0, 0, 0, 0, 0, 0, 47,
5045 48, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5046 0, 0, 0, 0, 49, 50, 0, 0, 0, 0,
5047 0, 0, 51, 0, 0, 52, 53, 54, 55, 0,
5048 56, 0, 0, 57, 58, 59, 60, 61, 62, 63,
5049 64, 65, 0, 0, 0, 0, 0, 0, 0, 0,
5050 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5051 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5052 66, 67, 68, 0, 0, 0, 3, -823, 4, 5,
5053 6, 7, 8, -823, 0, -823, 9, 10, 0, 0,
5054 -823, 11, -823, 12, 13, 14, 15, 16, 17, 18,
5055 0, 0, 0, 0, 0, 19, 20, 21, 22, 23,
5056 24, 25, 0, 0, 26, 0, 0, 0, 0, 0,
5057 27, 28, 284, 30, 31, 32, 33, 34, 35, 36,
5058 37, 38, 39, 0, 40, 41, 42, 43, 44, 45,
5059 46, 0, 0, -823, 0, 0, 0, 0, 0, 0,
5060 0, 47, 48, 0, 0, 0, 0, 0, 0, 0,
5061 0, 0, 0, 0, 0, 0, 49, 50, 0, 0,
5062 0, 0, 0, 0, 51, 0, 0, 52, 53, 54,
5063 55, 0, 56, 0, 0, 57, 58, 59, 60, 61,
5064 62, 63, 64, 65, 0, 0, 0, 0, 0, 0,
5065 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5066 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5067 0, 0, 66, 67, 68, 0, 0, 0, 3, -823,
5068 4, 5, 6, 7, 8, -823, 0, -823, 9, 10,
5069 0, 0, -823, 11, 0, 12, 13, 14, 15, 16,
5070 17, 18, -823, 0, 0, 0, 0, 19, 20, 21,
5071 22, 23, 24, 25, 0, 0, 26, 0, 0, 0,
5072 0, 0, 27, 28, 284, 30, 31, 32, 33, 34,
5073 35, 36, 37, 38, 39, 0, 40, 41, 42, 43,
5074 44, 45, 46, 0, 0, -823, 0, 0, 0, 0,
5075 0, 0, 0, 47, 48, 0, 0, 0, 0, 0,
5076 0, 0, 0, 0, 0, 0, 0, 0, 49, 50,
5077 0, 0, 0, 0, 0, 0, 51, 0, 0, 52,
5078 53, 54, 55, 0, 56, 0, 0, 57, 58, 59,
5079 60, 61, 62, 63, 64, 65, 0, 0, 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, 0, 0, 0, 66, 67, 68, 0, 0, 0,
5083 3, -823, 4, 5, 6, 7, 8, -823, 0, -823,
5084 9, 10, 0, 0, -823, 11, 0, 12, 13, 14,
5085 15, 16, 17, 18, 0, 0, 0, 0, 0, 19,
5086 20, 21, 22, 23, 24, 25, 0, 0, 26, 0,
5087 0, 0, 0, 0, 27, 28, 284, 30, 31, 32,
5088 33, 34, 35, 36, 37, 38, 39, 0, 40, 41,
5089 42, 43, 44, 45, 46, 0, 0, -823, 0, 0,
5090 0, 0, 0, 0, 0, 47, 48, 0, 0, 0,
5091 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5092 49, 50, 0, 0, 0, 0, 0, 0, 51, 0,
5093 0, 52, 53, 54, 55, 0, 56, 0, 0, 57,
5094 58, 59, 60, 61, 62, 63, 64, 65, 0, 0,
5095 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5096 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5097 0, 0, 0, 0, 0, 0, 66, 67, 68, 0,
5098 0, 0, 3, -823, 4, 5, 6, 7, 8, -823,
5099 -823, -823, 9, 10, 0, 0, 0, 11, 0, 12,
5100 13, 14, 15, 16, 17, 18, 0, 0, 0, 0,
5101 0, 19, 20, 21, 22, 23, 24, 25, 0, 0,
5102 26, 0, 0, 0, 0, 0, 27, 28, 284, 30,
5103 31, 32, 33, 34, 35, 36, 37, 38, 39, 0,
5104 40, 41, 42, 43, 44, 45, 46, 0, 0, -823,
5105 0, 0, 0, 0, 0, 0, 0, 47, 48, 0,
5106 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5107 0, 0, 49, 50, 0, 0, 0, 0, 0, 0,
5108 51, 0, 0, 52, 53, 54, 55, 0, 56, 0,
5109 0, 57, 58, 59, 60, 61, 62, 63, 64, 65,
5110 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5111 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5112 0, 0, 0, 0, 0, 0, 0, 0, 66, 67,
5113 68, 0, 0, 0, 3, -823, 4, 5, 6, 7,
5114 8, -823, 0, -823, 9, 10, 0, 0, 0, 11,
5115 0, 12, 13, 14, 15, 16, 17, 18, 0, 0,
5116 0, 0, 0, 19, 20, 21, 22, 23, 24, 25,
5117 0, 0, 26, 0, 0, 0, 0, 0, 27, 28,
5118 284, 30, 31, 32, 33, 34, 35, 36, 37, 38,
5119 39, 0, 40, 41, 42, 43, 44, 45, 46, 0,
5120 0, -823, 0, 0, 0, 0, 0, 0, 0, 47,
5121 48, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5122 0, 0, 0, 0, 49, 50, 0, 0, 0, 0,
5123 0, 0, 51, 0, 0, 52, 53, 54, 55, 0,
5124 56, 0, 0, 57, 58, 59, 60, 61, 62, 63,
5125 64, 65, 0, 0, 0, 0, 0, 0, 0, 0,
5126 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5127 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5128 66, 67, 68, 0, 0, 0, 3, -823, 4, 5,
5129 6, 7, 8, -823, 0, 0, 9, 10, 0, 0,
5130 0, 11, 0, 12, 13, 14, 15, 16, 17, 18,
5131 0, 0, 0, 0, 0, 19, 20, 21, 22, 23,
5132 24, 25, 0, 0, 26, 0, 0, 0, 0, 0,
5133 27, 28, 284, 30, 31, 32, 33, 34, 35, 36,
5134 37, 38, 39, 0, 40, 41, 42, 43, 44, 45,
5135 46, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5136 0, 47, 48, 0, 0, 0, 0, 0, 0, 0,
5137 0, 0, 0, 0, 0, 0, 49, 50, 0, 0,
5138 0, 0, 0, 0, 51, 0, 0, 285, 53, 54,
5139 55, 0, 56, 0, 0, 57, 58, 59, 60, 61,
5140 62, 63, 64, 65, 0, 0, 0, 0, 0, 0,
5141 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5142 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5143 0, 0, 66, 67, 68, 0, 0, 0, 0, -823,
5144 0, 0, 0, -823, 3, -823, 4, 5, 6, 7,
5145 8, 0, 0, 0, 9, 10, 0, 0, 0, 11,
5146 0, 12, 13, 14, 15, 16, 17, 18, 0, 0,
5147 0, 0, 0, 19, 20, 21, 22, 23, 24, 25,
5148 0, 0, 26, 0, 0, 0, 0, 0, 27, 28,
5149 284, 30, 31, 32, 33, 34, 35, 36, 37, 38,
5150 39, 0, 40, 41, 42, 43, 44, 45, 46, 0,
5151 0, 0, 0, 0, 0, 0, 0, 0, 0, 47,
5152 48, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5153 0, 0, 0, 0, 49, 50, 0, 0, 0, 0,
5154 0, 0, 51, 0, 0, 52, 53, 54, 55, 0,
5155 56, 0, 0, 57, 58, 59, 60, 61, 62, 63,
5156 64, 65, 0, 0, 0, 0, 0, 0, 0, 0,
5157 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5158 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5159 66, 67, 68, 0, 0, 0, 0, -823, 0, 0,
5160 0, -823, 3, -823, 4, 5, 6, 7, 8, 0,
5161 0, 0, 9, 10, 0, 0, 0, 11, 0, 12,
5162 13, 14, 15, 16, 17, 18, 0, 0, 0, 0,
5163 0, 19, 20, 21, 22, 23, 24, 25, 0, 0,
5164 26, 0, 0, 0, 0, 0, 27, 28, 29, 30,
5165 31, 32, 33, 34, 35, 36, 37, 38, 39, 0,
5166 40, 41, 42, 43, 44, 45, 46, 0, 0, 0,
5167 0, 0, 0, 0, 0, 0, 0, 47, 48, 0,
5168 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5169 0, 0, 49, 50, 0, 0, 0, 0, 0, 0,
5170 51, 0, 0, 52, 53, 54, 55, 0, 56, 0,
5171 0, 57, 58, 59, 60, 61, 62, 63, 64, 65,
5172 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5173 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5174 0, 0, 0, 0, 0, 0, 0, 0, 66, 67,
5175 68, 0, 0, -823, 3, -823, 4, 5, 6, 7,
5176 8, -823, 0, 0, 9, 10, 0, 0, 0, 11,
5177 0, 12, 13, 14, 15, 16, 17, 18, 0, 0,
5178 0, 0, 0, 19, 20, 21, 22, 23, 24, 25,
5179 0, 0, 26, 0, 0, 0, 0, 0, 27, 28,
5180 284, 30, 31, 32, 33, 34, 35, 36, 37, 38,
5181 39, 0, 40, 41, 42, 43, 44, 45, 46, 0,
5182 0, 0, 0, 0, 0, 0, 0, 0, 0, 47,
5183 48, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5184 0, 0, 0, 0, 49, 50, 0, 0, 0, 0,
5185 0, 0, 51, 0, 0, 52, 53, 54, 55, 0,
5186 56, 0, 0, 57, 58, 59, 60, 61, 62, 63,
5187 64, 65, 0, 0, 0, 0, 0, 0, 0, 0,
5188 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5189 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5190 66, 67, 68, 0, 0, -823, 404, -823, 4, 5,
5191 6, 0, 8, -823, 0, 0, 9, 10, 0, 0,
5192 0, 11, -3, 12, 13, 14, 15, 16, 17, 18,
5193 0, 0, 0, 0, 0, 19, 20, 21, 22, 23,
5194 24, 25, 0, 0, 26, 0, 0, 0, 0, 0,
5195 0, 28, 0, 0, 31, 32, 33, 34, 35, 36,
5196 37, 38, 39, 0, 40, 41, 42, 43, 44, 45,
5197 46, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5198 0, 47, 48, 0, 0, 0, 0, 0, 0, 0,
5199 0, 0, 0, 0, 0, 0, 49, 50, 0, 0,
5200 0, 0, 0, 0, 229, 0, 0, 230, 53, 54,
5201 55, 0, 0, 0, 0, 57, 58, 59, 60, 61,
5202 62, 63, 64, 65, 0, 0, 0, 0, 0, 0,
5203 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5204 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5205 0, 0, 66, 67, 68, 0, 0, 0, 0, 331,
5206 0, 0, 0, 0, 0, 332, 144, 145, 146, 147,
5207 148, 149, 150, 151, 152, 153, 154, 155, 156, 157,
5208 158, 159, 160, 161, 162, 163, 164, 165, 166, 167,
5209 0, 0, 0, 168, 169, 170, 434, 435, 436, 437,
5210 175, 176, 177, 0, 0, 0, 0, 0, 178, 179,
5211 180, 181, 438, 439, 440, 441, 186, 36, 37, 442,
5212 39, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5213 0, 0, 0, 0, 0, 0, 0, 0, 0, 188,
5214 189, 190, 191, 192, 193, 194, 195, 196, 0, 0,
5215 197, 198, 0, 0, 0, 0, 199, 200, 201, 202,
5216 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5217 203, 204, 0, 0, 0, 0, 0, 0, 0, 0,
5218 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5219 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5220 205, 206, 207, 208, 209, 210, 211, 212, 213, 214,
5221 0, 215, 216, 0, 0, 0, 0, 0, 0, 217,
5222 443, 144, 145, 146, 147, 148, 149, 150, 151, 152,
5223 153, 154, 155, 156, 157, 158, 159, 160, 161, 162,
5224 163, 164, 165, 166, 167, 0, 0, 0, 168, 169,
5225 170, 171, 172, 173, 174, 175, 176, 177, 0, 0,
5226 0, 0, 0, 178, 179, 180, 181, 182, 183, 184,
5227 185, 186, 36, 37, 187, 39, 0, 0, 0, 0,
5228 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5229 0, 0, 0, 0, 188, 189, 190, 191, 192, 193,
5230 194, 195, 196, 0, 0, 197, 198, 0, 0, 0,
5231 0, 199, 200, 201, 202, 0, 0, 0, 0, 0,
5232 0, 0, 0, 0, 0, 203, 204, 0, 0, 0,
5233 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5234 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5235 0, 0, 0, 0, 0, 205, 206, 207, 208, 209,
5236 210, 211, 212, 213, 214, 0, 215, 216, 0, 0,
5237 0, 0, 0, 0, 217, 144, 145, 146, 147, 148,
5238 149, 150, 151, 152, 153, 154, 155, 156, 157, 158,
5239 159, 160, 161, 162, 163, 164, 165, 166, 167, 0,
5240 0, 0, 168, 169, 170, 171, 172, 173, 174, 175,
5241 176, 177, 0, 0, 0, 0, 0, 178, 179, 180,
5242 181, 182, 183, 184, 185, 186, 262, 0, 187, 0,
5243 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5244 0, 0, 0, 0, 0, 0, 0, 0, 188, 189,
5245 190, 191, 192, 193, 194, 195, 196, 0, 0, 197,
5246 198, 0, 0, 0, 0, 199, 200, 201, 202, 0,
5247 0, 0, 0, 0, 0, 0, 0, 0, 0, 203,
5248 204, 0, 0, 58, 0, 0, 0, 0, 0, 0,
5249 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5250 0, 0, 0, 0, 0, 0, 0, 0, 0, 205,
5251 206, 207, 208, 209, 210, 211, 212, 213, 214, 0,
5252 215, 216, 0, 0, 0, 0, 0, 0, 217, 144,
5253 145, 146, 147, 148, 149, 150, 151, 152, 153, 154,
5254 155, 156, 157, 158, 159, 160, 161, 162, 163, 164,
5255 165, 166, 167, 0, 0, 0, 168, 169, 170, 171,
5256 172, 173, 174, 175, 176, 177, 0, 0, 0, 0,
5257 0, 178, 179, 180, 181, 182, 183, 184, 185, 186,
5258 0, 0, 187, 0, 0, 0, 0, 0, 0, 0,
5259 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5260 0, 0, 188, 189, 190, 191, 192, 193, 194, 195,
5261 196, 0, 0, 197, 198, 0, 0, 0, 0, 199,
5262 200, 201, 202, 0, 0, 0, 0, 0, 0, 0,
5263 0, 0, 0, 203, 204, 0, 0, 58, 0, 0,
5264 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5265 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5266 0, 0, 0, 205, 206, 207, 208, 209, 210, 211,
5267 212, 213, 214, 0, 215, 216, 0, 0, 0, 0,
5268 0, 0, 217, 144, 145, 146, 147, 148, 149, 150,
5269 151, 152, 153, 154, 155, 156, 157, 158, 159, 160,
5270 161, 162, 163, 164, 165, 166, 167, 0, 0, 0,
5271 168, 169, 170, 171, 172, 173, 174, 175, 176, 177,
5272 0, 0, 0, 0, 0, 178, 179, 180, 181, 182,
5273 183, 184, 185, 186, 0, 0, 187, 0, 0, 0,
5274 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5275 0, 0, 0, 0, 0, 0, 188, 189, 190, 191,
5276 192, 193, 194, 195, 196, 0, 0, 197, 198, 0,
5277 0, 0, 0, 199, 200, 201, 202, 0, 0, 0,
5278 0, 0, 0, 0, 0, 0, 0, 203, 204, 0,
5279 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5280 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5281 0, 0, 0, 0, 0, 0, 0, 205, 206, 207,
5282 208, 209, 210, 211, 212, 213, 214, 0, 215, 216,
5283 4, 5, 6, 0, 8, 0, 217, 0, 9, 10,
5284 0, 0, 0, 11, 0, 12, 13, 14, 270, 271,
5285 17, 18, 0, 0, 0, 0, 0, 19, 20, 272,
5286 22, 23, 24, 25, 0, 0, 227, 0, 0, 0,
5287 0, 0, 0, 302, 0, 0, 31, 32, 33, 34,
5288 35, 36, 37, 38, 39, 0, 40, 41, 42, 43,
5289 44, 45, 46, 0, 0, 0, 0, 0, 0, 0,
5290 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5291 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5292 0, 0, 0, 0, 0, 0, 303, 0, 0, 230,
5293 53, 54, 55, 0, 0, 0, 0, 57, 58, 59,
5294 60, 61, 62, 63, 64, 65, 0, 0, 4, 5,
5295 6, 0, 8, 0, 0, 0, 9, 10, 0, 0,
5296 0, 11, 0, 12, 13, 14, 270, 271, 17, 18,
5297 0, 0, 0, 0, 304, 19, 20, 272, 22, 23,
5298 24, 25, 305, 0, 227, 0, 0, 0, 0, 0,
5299 0, 302, 0, 0, 31, 32, 33, 34, 35, 36,
5300 37, 38, 39, 0, 40, 41, 42, 43, 44, 45,
5301 46, 0, 0, 0, 0, 0, 0, 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, 303, 0, 0, 230, 53, 54,
5305 55, 0, 0, 0, 0, 57, 58, 59, 60, 61,
5306 62, 63, 64, 65, 0, 0, 4, 5, 6, 0,
5307 8, 0, 0, 0, 9, 10, 0, 0, 0, 11,
5308 0, 12, 13, 14, 15, 16, 17, 18, 0, 0,
5309 0, 0, 304, 19, 20, 21, 22, 23, 24, 25,
5310 611, 0, 227, 0, 0, 0, 0, 0, 0, 28,
5311 0, 0, 31, 32, 33, 34, 35, 36, 37, 38,
5312 39, 228, 40, 41, 42, 43, 44, 45, 46, 0,
5313 0, 0, 0, 0, 0, 0, 0, 0, 0, 47,
5314 48, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5315 0, 0, 0, 0, 49, 50, 0, 0, 0, 0,
5316 0, 0, 229, 0, 0, 230, 53, 54, 55, 0,
5317 231, 232, 233, 57, 58, 234, 60, 61, 62, 63,
5318 64, 65, 0, 0, 0, 0, 0, 0, 0, 0,
5319 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5320 0, 0, 0, 0, 0, 4, 5, 6, 0, 8,
5321 66, 235, 68, 9, 10, 0, 0, 259, 11, 0,
5322 12, 13, 14, 15, 16, 17, 18, 0, 0, 0,
5323 0, 0, 19, 20, 21, 22, 23, 24, 25, 0,
5324 0, 26, 0, 0, 0, 0, 0, 0, 28, 0,
5325 0, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5326 0, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5327 0, 0, 0, 0, 0, 0, 0, 0, 47, 48,
5328 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5329 0, 0, 0, 49, 50, 0, 0, 0, 0, 0,
5330 0, 229, 0, 0, 230, 53, 54, 55, 0, 0,
5331 0, 0, 57, 58, 59, 60, 61, 62, 63, 64,
5332 65, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5333 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5334 0, 0, 3, 0, 4, 5, 6, 7, 8, 66,
5335 67, 68, 9, 10, 0, 0, 259, 11, 0, 12,
5336 13, 14, 15, 16, 17, 18, 0, 0, 0, 0,
5337 0, 19, 20, 21, 22, 23, 24, 25, 0, 0,
5338 26, 0, 0, 0, 0, 0, 27, 28, 0, 30,
5339 31, 32, 33, 34, 35, 36, 37, 38, 39, 0,
5340 40, 41, 42, 43, 44, 45, 46, 0, 0, 0,
5341 0, 0, 0, 0, 0, 0, 0, 47, 48, 0,
5342 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5343 0, 0, 49, 50, 0, 0, 0, 0, 0, 0,
5344 51, 0, 0, 52, 53, 54, 55, 0, 56, 0,
5345 0, 57, 58, 59, 60, 61, 62, 63, 64, 65,
5346 0, 0, 404, 0, 4, 5, 6, 0, 8, 0,
5347 0, 0, 9, 10, 0, 0, 0, 11, 0, 12,
5348 13, 14, 15, 16, 17, 18, 0, 0, 66, 67,
5349 68, 19, 20, 21, 22, 23, 24, 25, 0, 0,
5350 26, 0, 0, 0, 0, 0, 0, 28, 0, 0,
5351 31, 32, 33, 34, 35, 36, 37, 38, 39, 0,
5352 40, 41, 42, 43, 44, 45, 46, 0, 0, 0,
5353 0, 0, 0, 0, 0, 0, 0, 47, 48, 0,
5354 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5355 0, 0, 49, 50, 0, 0, 0, 0, 0, 0,
5356 229, 0, 0, 230, 53, 54, 55, 0, 0, 0,
5357 0, 57, 58, 59, 60, 61, 62, 63, 64, 65,
5358 0, 0, 0, 0, 4, 5, 6, 0, 8, 0,
5359 0, 0, 9, 10, 0, 0, 0, 11, 0, 12,
5360 13, 14, 15, 16, 17, 18, 0, 0, 66, 67,
5361 68, 19, 20, 21, 22, 23, 24, 25, 0, 0,
5362 227, 0, 0, 0, 0, 0, 0, 28, 0, 0,
5363 31, 32, 33, 34, 35, 36, 37, 38, 39, 228,
5364 40, 41, 42, 43, 44, 45, 46, 0, 0, 0,
5365 0, 0, 0, 0, 0, 0, 0, 47, 48, 0,
5366 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5367 0, 0, 49, 50, 0, 0, 0, 0, 0, 0,
5368 229, 0, 0, 230, 53, 54, 55, 0, 231, 232,
5369 233, 57, 58, 234, 60, 61, 62, 63, 64, 65,
5370 0, 0, 0, 0, 4, 5, 6, 0, 8, 0,
5371 0, 0, 9, 10, 0, 0, 0, 11, 0, 12,
5372 13, 14, 15, 16, 17, 18, 0, 0, 66, 235,
5373 68, 19, 20, 21, 22, 23, 24, 25, 0, 0,
5374 227, 0, 0, 0, 0, 0, 0, 28, 0, 0,
5375 31, 32, 33, 34, 35, 36, 37, 38, 39, 228,
5376 40, 41, 42, 43, 44, 45, 46, 0, 0, 0,
5377 0, 0, 0, 0, 0, 0, 0, 47, 48, 0,
5378 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5379 0, 0, 49, 479, 0, 0, 0, 0, 0, 0,
5380 229, 0, 0, 230, 53, 54, 55, 0, 231, 232,
5381 233, 57, 58, 234, 60, 61, 62, 63, 64, 65,
5382 0, 0, 0, 0, 4, 5, 6, 0, 8, 0,
5383 0, 0, 9, 10, 0, 0, 0, 11, 0, 12,
5384 13, 14, 270, 271, 17, 18, 0, 0, 66, 235,
5385 68, 19, 20, 272, 22, 23, 24, 25, 0, 0,
5386 227, 0, 0, 0, 0, 0, 0, 28, 0, 0,
5387 31, 32, 33, 34, 35, 36, 37, 38, 39, 228,
5388 40, 41, 42, 43, 44, 45, 46, 0, 0, 0,
5389 0, 0, 0, 0, 0, 0, 0, 47, 48, 0,
5390 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5391 0, 0, 49, 50, 0, 0, 0, 0, 0, 0,
5392 229, 0, 0, 230, 53, 54, 55, 0, 231, 232,
5393 233, 57, 58, 234, 60, 61, 62, 63, 64, 65,
5394 0, 0, 0, 0, 4, 5, 6, 0, 8, 0,
5395 0, 0, 9, 10, 0, 0, 0, 11, 0, 12,
5396 13, 14, 270, 271, 17, 18, 0, 0, 66, 235,
5397 68, 19, 20, 272, 22, 23, 24, 25, 0, 0,
5398 227, 0, 0, 0, 0, 0, 0, 28, 0, 0,
5399 31, 32, 33, 34, 35, 36, 37, 38, 39, 228,
5400 40, 41, 42, 43, 44, 45, 46, 0, 0, 0,
5401 0, 0, 0, 0, 0, 0, 0, 47, 48, 0,
5402 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5403 0, 0, 49, 479, 0, 0, 0, 0, 0, 0,
5404 229, 0, 0, 230, 53, 54, 55, 0, 231, 232,
5405 233, 57, 58, 234, 60, 61, 62, 63, 64, 65,
5406 0, 0, 0, 0, 4, 5, 6, 0, 8, 0,
5407 0, 0, 9, 10, 0, 0, 0, 11, 0, 12,
5408 13, 14, 270, 271, 17, 18, 0, 0, 66, 235,
5409 68, 19, 20, 272, 22, 23, 24, 25, 0, 0,
5410 227, 0, 0, 0, 0, 0, 0, 28, 0, 0,
5411 31, 32, 33, 34, 35, 36, 37, 38, 39, 228,
5412 40, 41, 42, 43, 44, 45, 46, 0, 0, 0,
5413 0, 0, 0, 0, 0, 0, 0, 47, 48, 0,
5414 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5415 0, 0, 49, 50, 0, 0, 0, 0, 0, 0,
5416 229, 0, 0, 230, 53, 54, 55, 0, 231, 232,
5417 0, 57, 58, 234, 60, 61, 62, 63, 64, 65,
5418 0, 0, 0, 0, 4, 5, 6, 0, 8, 0,
5419 0, 0, 9, 10, 0, 0, 0, 11, 0, 12,
5420 13, 14, 270, 271, 17, 18, 0, 0, 66, 235,
5421 68, 19, 20, 272, 22, 23, 24, 25, 0, 0,
5422 227, 0, 0, 0, 0, 0, 0, 28, 0, 0,
5423 31, 32, 33, 34, 35, 36, 37, 38, 39, 228,
5424 40, 41, 42, 43, 44, 45, 46, 0, 0, 0,
5425 0, 0, 0, 0, 0, 0, 0, 47, 48, 0,
5426 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5427 0, 0, 49, 50, 0, 0, 0, 0, 0, 0,
5428 229, 0, 0, 230, 53, 54, 55, 0, 0, 232,
5429 233, 57, 58, 234, 60, 61, 62, 63, 64, 65,
5430 0, 0, 0, 0, 4, 5, 6, 0, 8, 0,
5431 0, 0, 9, 10, 0, 0, 0, 11, 0, 12,
5432 13, 14, 270, 271, 17, 18, 0, 0, 66, 235,
5433 68, 19, 20, 272, 22, 23, 24, 25, 0, 0,
5434 227, 0, 0, 0, 0, 0, 0, 28, 0, 0,
5435 31, 32, 33, 34, 35, 36, 37, 38, 39, 228,
5436 40, 41, 42, 43, 44, 45, 46, 0, 0, 0,
5437 0, 0, 0, 0, 0, 0, 0, 47, 48, 0,
5438 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5439 0, 0, 49, 50, 0, 0, 0, 0, 0, 0,
5440 229, 0, 0, 230, 53, 54, 55, 0, 0, 232,
5441 0, 57, 58, 234, 60, 61, 62, 63, 64, 65,
5442 0, 0, 0, 0, 4, 5, 6, 0, 8, 0,
5443 0, 0, 9, 10, 0, 0, 0, 11, 0, 12,
5444 13, 14, 15, 16, 17, 18, 0, 0, 66, 235,
5445 68, 19, 20, 21, 22, 23, 24, 25, 0, 0,
5446 227, 0, 0, 0, 0, 0, 0, 28, 0, 0,
5447 31, 32, 33, 34, 35, 36, 37, 38, 39, 0,
5448 40, 41, 42, 43, 44, 45, 46, 0, 0, 0,
5449 0, 0, 0, 0, 0, 0, 0, 47, 48, 0,
5450 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5451 0, 0, 49, 50, 0, 0, 0, 0, 0, 0,
5452 229, 0, 0, 230, 53, 54, 55, 0, 800, 0,
5453 0, 57, 58, 59, 60, 61, 62, 63, 64, 65,
5454 0, 0, 0, 0, 4, 5, 6, 0, 8, 0,
5455 0, 0, 9, 10, 0, 0, 0, 11, 0, 12,
5456 13, 14, 15, 16, 17, 18, 0, 0, 66, 235,
5457 68, 19, 20, 21, 22, 23, 24, 25, 0, 0,
5458 227, 0, 0, 0, 0, 0, 0, 28, 0, 0,
5459 31, 32, 33, 34, 35, 36, 37, 38, 39, 0,
5460 40, 41, 42, 43, 44, 45, 46, 0, 0, 0,
5461 0, 0, 0, 0, 0, 0, 0, 47, 48, 0,
5462 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5463 0, 0, 49, 50, 0, 0, 0, 0, 0, 0,
5464 811, 0, 0, 230, 53, 54, 55, 0, 800, 0,
5465 0, 57, 58, 59, 60, 61, 62, 63, 64, 65,
5466 0, 0, 0, 0, 4, 5, 6, 0, 8, 0,
5467 0, 0, 9, 10, 0, 0, 0, 11, 0, 12,
5468 13, 14, 270, 271, 17, 18, 0, 0, 66, 235,
5469 68, 19, 20, 272, 22, 23, 24, 25, 0, 0,
5470 227, 0, 0, 0, 0, 0, 0, 28, 0, 0,
5471 31, 32, 33, 34, 35, 36, 37, 38, 39, 0,
5472 40, 41, 42, 43, 44, 45, 46, 0, 0, 0,
5473 0, 0, 0, 0, 0, 0, 0, 47, 48, 0,
5474 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5475 0, 0, 49, 50, 0, 0, 0, 0, 0, 0,
5476 229, 0, 0, 230, 53, 54, 55, 0, 972, 0,
5477 0, 57, 58, 59, 60, 61, 62, 63, 64, 65,
5478 0, 0, 0, 0, 4, 5, 6, 0, 8, 0,
5479 0, 0, 9, 10, 0, 0, 0, 11, 0, 12,
5480 13, 14, 270, 271, 17, 18, 0, 0, 66, 235,
5481 68, 19, 20, 272, 22, 23, 24, 25, 0, 0,
5482 227, 0, 0, 0, 0, 0, 0, 28, 0, 0,
5483 31, 32, 33, 34, 35, 36, 37, 38, 39, 0,
5484 40, 41, 42, 43, 44, 45, 46, 0, 0, 0,
5485 0, 0, 0, 0, 0, 0, 0, 47, 48, 0,
5486 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5487 0, 0, 49, 50, 0, 0, 0, 0, 0, 0,
5488 229, 0, 0, 230, 53, 54, 55, 0, 1021, 0,
5489 0, 57, 58, 59, 60, 61, 62, 63, 64, 65,
5490 0, 0, 0, 0, 4, 5, 6, 0, 8, 0,
5491 0, 0, 9, 10, 0, 0, 0, 11, 0, 12,
5492 13, 14, 270, 271, 17, 18, 0, 0, 66, 235,
5493 68, 19, 20, 272, 22, 23, 24, 25, 0, 0,
5494 227, 0, 0, 0, 0, 0, 0, 28, 0, 0,
5495 31, 32, 33, 34, 35, 36, 37, 38, 39, 0,
5496 40, 41, 42, 43, 44, 45, 46, 0, 0, 0,
5497 0, 0, 0, 0, 0, 0, 0, 47, 48, 0,
5498 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5499 0, 0, 49, 50, 0, 0, 0, 0, 0, 0,
5500 229, 0, 0, 230, 53, 54, 55, 0, 800, 0,
5501 0, 57, 58, 59, 60, 61, 62, 63, 64, 65,
5502 0, 0, 0, 0, 4, 5, 6, 0, 8, 0,
5503 0, 0, 9, 10, 0, 0, 0, 11, 0, 12,
5504 13, 14, 270, 271, 17, 18, 0, 0, 66, 235,
5505 68, 19, 20, 272, 22, 23, 24, 25, 0, 0,
5506 227, 0, 0, 0, 0, 0, 0, 28, 0, 0,
5507 31, 32, 33, 34, 35, 36, 37, 38, 39, 0,
5508 40, 41, 42, 43, 44, 45, 46, 0, 0, 0,
5509 0, 0, 0, 0, 0, 0, 0, 47, 48, 0,
5510 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5511 0, 0, 49, 50, 0, 0, 0, 0, 0, 0,
5512 229, 0, 0, 230, 53, 54, 55, 0, 1141, 0,
5513 0, 57, 58, 59, 60, 61, 62, 63, 64, 65,
5514 0, 0, 0, 0, 4, 5, 6, 0, 8, 0,
5515 0, 0, 9, 10, 0, 0, 0, 11, 0, 12,
5516 13, 14, 270, 271, 17, 18, 0, 0, 66, 235,
5517 68, 19, 20, 272, 22, 23, 24, 25, 0, 0,
5518 227, 0, 0, 0, 0, 0, 0, 28, 0, 0,
5519 31, 32, 33, 34, 35, 36, 37, 38, 39, 0,
5520 40, 41, 42, 43, 44, 45, 46, 0, 0, 0,
5521 0, 0, 0, 0, 0, 0, 0, 47, 48, 0,
5522 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5523 0, 0, 49, 50, 0, 0, 0, 0, 0, 0,
5524 229, 0, 0, 230, 53, 54, 55, 0, 0, 0,
5525 0, 57, 58, 59, 60, 61, 62, 63, 64, 65,
5526 0, 0, 0, 0, 4, 5, 6, 0, 8, 0,
5527 0, 0, 9, 10, 0, 0, 0, 11, 0, 12,
5528 13, 14, 15, 16, 17, 18, 0, 0, 66, 235,
5529 68, 19, 20, 21, 22, 23, 24, 25, 0, 0,
5530 227, 0, 0, 0, 0, 0, 0, 28, 0, 0,
5531 31, 32, 33, 34, 35, 36, 37, 38, 39, 0,
5532 40, 41, 42, 43, 44, 45, 46, 0, 0, 0,
5533 0, 0, 0, 0, 0, 0, 0, 47, 48, 0,
5534 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5535 0, 0, 49, 50, 0, 0, 0, 0, 0, 0,
5536 229, 0, 0, 230, 53, 54, 55, 0, 0, 0,
5537 0, 57, 58, 59, 60, 61, 62, 63, 64, 65,
5538 0, 0, 0, 0, 4, 5, 6, 0, 8, 0,
5539 0, 0, 9, 10, 0, 0, 0, 11, 0, 12,
5540 13, 14, 15, 16, 17, 18, 0, 0, 66, 235,
5541 68, 19, 20, 21, 22, 23, 24, 25, 0, 0,
5542 26, 0, 0, 0, 0, 0, 0, 28, 0, 0,
5543 31, 32, 33, 34, 35, 36, 37, 38, 39, 0,
5544 40, 41, 42, 43, 44, 45, 46, 0, 0, 0,
5545 0, 0, 0, 0, 0, 0, 0, 47, 48, 0,
5546 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5547 0, 0, 49, 50, 0, 0, 0, 0, 0, 0,
5548 229, 0, 0, 230, 53, 54, 55, 0, 0, 0,
5549 0, 57, 58, 59, 60, 61, 62, 63, 64, 65,
5550 0, 0, 0, 0, 4, 5, 6, 0, 8, 0,
5551 0, 0, 9, 10, 0, 0, 0, 11, 0, 12,
5552 13, 14, 15, 16, 17, 18, 0, 0, 66, 67,
5553 68, 19, 20, 21, 22, 23, 24, 25, 0, 0,
5554 782, 0, 0, 0, 0, 0, 0, 28, 0, 0,
5555 31, 32, 33, 34, 35, 36, 37, 38, 39, 0,
5556 40, 41, 42, 43, 44, 45, 46, 0, 0, 0,
5557 0, 0, 0, 0, 0, 0, 0, 47, 48, 0,
5558 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5559 0, 0, 49, 50, 0, 0, 0, 0, 0, 0,
5560 229, 0, 0, 230, 53, 54, 55, 0, 0, 0,
5561 0, 57, 58, 59, 60, 61, 62, 63, 64, 65,
5562 0, 0, 0, 0, 4, 5, 6, 0, 8, 0,
5563 0, 0, 9, 10, 0, 0, 0, 11, 0, 12,
5564 13, 14, 15, 16, 17, 18, 0, 0, 66, 235,
5565 68, 19, 20, 21, 22, 23, 24, 25, 0, 0,
5566 227, 0, 0, 0, 0, 0, 0, 28, 0, 0,
5567 31, 32, 33, 34, 35, 36, 37, 38, 39, 0,
5568 40, 41, 42, 43, 44, 45, 46, 0, 0, 0,
5569 0, 0, 0, 0, 0, 0, 0, 47, 48, 0,
5570 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5571 0, 0, 49, 50, 0, 0, 0, 0, 0, 0,
5572 811, 0, 0, 230, 53, 54, 55, 0, 0, 0,
5573 0, 57, 58, 59, 60, 61, 62, 63, 64, 65,
5574 0, 0, 0, 0, 4, 5, 6, 0, 8, 0,
5575 0, 0, 9, 10, 0, 0, 0, 11, 0, 12,
5576 13, 14, 270, 271, 17, 18, 0, 0, 66, 235,
5577 68, 19, 20, 272, 22, 23, 24, 25, 0, 0,
5578 891, 0, 0, 0, 0, 0, 0, 28, 0, 0,
5579 31, 32, 33, 34, 35, 36, 37, 38, 39, 0,
5580 40, 41, 42, 43, 44, 45, 46, 0, 0, 0,
5581 0, 0, 0, 0, 0, 0, 0, 47, 48, 0,
5582 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5583 0, 0, 49, 50, 0, 0, 0, 0, 0, 0,
5584 229, 0, 0, 230, 53, 54, 55, 0, 0, 0,
5585 0, 57, 58, 59, 60, 61, 62, 63, 64, 65,
5586 0, 0, 0, 0, 4, 5, 6, 0, 8, 0,
5587 0, 0, 9, 10, 0, 0, 0, 11, 0, 12,
5588 13, 14, 270, 271, 17, 18, 0, 0, 66, 235,
5589 68, 19, 20, 272, 22, 23, 24, 25, 0, 0,
5590 227, 0, 0, 0, 0, 0, 0, 302, 0, 0,
5591 31, 32, 33, 34, 35, 36, 37, 38, 39, 0,
5592 40, 41, 42, 43, 44, 45, 46, 0, 0, 0,
5593 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5594 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5595 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5596 303, 0, 0, 363, 53, 54, 55, 0, 364, 0,
5597 0, 57, 58, 59, 60, 61, 62, 63, 64, 65,
5598 0, 0, 4, 5, 6, 0, 8, 0, 0, 0,
5599 9, 10, 0, 0, 0, 11, 0, 12, 13, 14,
5600 270, 271, 17, 18, 0, 0, 0, 0, 304, 19,
5601 20, 272, 22, 23, 24, 25, 0, 0, 227, 0,
5602 0, 0, 0, 0, 0, 302, 0, 0, 31, 32,
5603 33, 34, 35, 36, 37, 38, 39, 0, 40, 41,
5604 42, 43, 44, 45, 46, 0, 0, 0, 0, 0,
5605 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5606 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5607 0, 0, 0, 0, 0, 0, 0, 0, 415, 0,
5608 0, 52, 53, 54, 55, 0, 56, 0, 0, 57,
5609 58, 59, 60, 61, 62, 63, 64, 65, 0, 0,
5610 4, 5, 6, 0, 8, 0, 0, 0, 9, 10,
5611 0, 0, 0, 11, 0, 12, 13, 14, 270, 271,
5612 17, 18, 0, 0, 0, 0, 304, 19, 20, 272,
5613 22, 23, 24, 25, 0, 0, 227, 0, 0, 0,
5614 0, 0, 0, 302, 0, 0, 31, 32, 33, 423,
5615 35, 36, 37, 424, 39, 0, 40, 41, 42, 43,
5616 44, 45, 46, 0, 0, 0, 0, 0, 0, 0,
5617 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5618 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5619 0, 0, 425, 0, 0, 0, 426, 0, 0, 230,
5620 53, 54, 55, 0, 0, 0, 0, 57, 58, 59,
5621 60, 61, 62, 63, 64, 65, 0, 0, 4, 5,
5622 6, 0, 8, 0, 0, 0, 9, 10, 0, 0,
5623 0, 11, 0, 12, 13, 14, 270, 271, 17, 18,
5624 0, 0, 0, 0, 304, 19, 20, 272, 22, 23,
5625 24, 25, 0, 0, 227, 0, 0, 0, 0, 0,
5626 0, 302, 0, 0, 31, 32, 33, 423, 35, 36,
5627 37, 424, 39, 0, 40, 41, 42, 43, 44, 45,
5628 46, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5629 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5630 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5631 0, 0, 0, 0, 426, 0, 0, 230, 53, 54,
5632 55, 0, 0, 0, 0, 57, 58, 59, 60, 61,
5633 62, 63, 64, 65, 0, 0, 4, 5, 6, 0,
5634 8, 0, 0, 0, 9, 10, 0, 0, 0, 11,
5635 0, 12, 13, 14, 270, 271, 17, 18, 0, 0,
5636 0, 0, 304, 19, 20, 272, 22, 23, 24, 25,
5637 0, 0, 227, 0, 0, 0, 0, 0, 0, 302,
5638 0, 0, 31, 32, 33, 34, 35, 36, 37, 38,
5639 39, 0, 40, 41, 42, 43, 44, 45, 46, 0,
5640 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5641 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5642 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5643 0, 0, 303, 0, 0, 363, 53, 54, 55, 0,
5644 0, 0, 0, 57, 58, 59, 60, 61, 62, 63,
5645 64, 65, 0, 0, 4, 5, 6, 0, 8, 0,
5646 0, 0, 9, 10, 0, 0, 0, 11, 0, 12,
5647 13, 14, 270, 271, 17, 18, 0, 0, 0, 0,
5648 304, 19, 20, 272, 22, 23, 24, 25, 0, 0,
5649 227, 0, 0, 0, 0, 0, 0, 302, 0, 0,
5650 31, 32, 33, 34, 35, 36, 37, 38, 39, 0,
5651 40, 41, 42, 43, 44, 45, 46, 0, 0, 0,
5652 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5653 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5654 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5655 1197, 0, 0, 230, 53, 54, 55, 0, 0, 0,
5656 0, 57, 58, 59, 60, 61, 62, 63, 64, 65,
5657 0, 0, 4, 5, 6, 0, 8, 0, 0, 0,
5658 9, 10, 0, 0, 0, 11, 0, 12, 13, 14,
5659 270, 271, 17, 18, 0, 0, 0, 0, 304, 19,
5660 20, 272, 22, 23, 24, 25, 0, 0, 227, 0,
5661 0, 0, 0, 0, 0, 302, 0, 0, 31, 32,
5662 33, 34, 35, 36, 37, 38, 39, 0, 40, 41,
5663 42, 43, 44, 45, 46, 0, 0, 0, 0, 0,
5664 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5665 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5666 0, 0, 0, 0, 0, 649, 650, 0, 1299, 651,
5667 0, 230, 53, 54, 55, 0, 0, 0, 0, 57,
5668 58, 59, 60, 61, 62, 63, 64, 65, 0, 188,
5669 189, 190, 191, 192, 193, 194, 195, 196, 0, 0,
5670 197, 198, 0, 0, 0, 0, 199, 200, 201, 202,
5671 0, 0, 0, 0, 0, 0, 304, 0, 0, 0,
5672 203, 204, 0, 0, 0, 0, 0, 0, 0, 0,
5673 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5674 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5675 205, 206, 207, 208, 209, 210, 211, 212, 213, 214,
5676 0, 215, 216, 703, 642, 0, 0, 704, 0, 217,
5677 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5678 0, 0, 0, 0, 0, 0, 0, 188, 189, 190,
5679 191, 192, 193, 194, 195, 196, 0, 0, 197, 198,
5680 0, 0, 0, 0, 199, 200, 201, 202, 0, 0,
5681 0, 0, 0, 0, 0, 0, 0, 0, 203, 204,
5682 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5683 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5684 0, 0, 0, 0, 0, 0, 0, 0, 205, 206,
5685 207, 208, 209, 210, 211, 212, 213, 214, 0, 215,
5686 216, 706, 650, 0, 0, 707, 0, 217, 0, 0,
5687 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5688 0, 0, 0, 0, 0, 188, 189, 190, 191, 192,
5689 193, 194, 195, 196, 0, 0, 197, 198, 0, 0,
5690 0, 0, 199, 200, 201, 202, 0, 0, 0, 0,
5691 0, 0, 0, 0, 0, 0, 203, 204, 0, 0,
5692 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5693 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5694 0, 0, 0, 0, 0, 0, 205, 206, 207, 208,
5695 209, 210, 211, 212, 213, 214, 0, 215, 216, 703,
5696 642, 0, 0, 723, 0, 217, 0, 0, 0, 0,
5697 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5698 0, 0, 0, 188, 189, 190, 191, 192, 193, 194,
5699 195, 196, 0, 0, 197, 198, 0, 0, 0, 0,
5700 199, 200, 201, 202, 0, 0, 0, 0, 0, 0,
5701 0, 0, 0, 0, 203, 204, 0, 0, 0, 0,
5702 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5703 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5704 0, 0, 0, 0, 205, 206, 207, 208, 209, 210,
5705 211, 212, 213, 214, 0, 215, 216, 734, 642, 0,
5706 0, 735, 0, 217, 0, 0, 0, 0, 0, 0,
5707 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5708 0, 188, 189, 190, 191, 192, 193, 194, 195, 196,
5709 0, 0, 197, 198, 0, 0, 0, 0, 199, 200,
5710 201, 202, 0, 0, 0, 0, 0, 0, 0, 0,
5711 0, 0, 203, 204, 0, 0, 0, 0, 0, 0,
5712 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5713 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5714 0, 0, 205, 206, 207, 208, 209, 210, 211, 212,
5715 213, 214, 0, 215, 216, 737, 650, 0, 0, 738,
5716 0, 217, 0, 0, 0, 0, 0, 0, 0, 0,
5717 0, 0, 0, 0, 0, 0, 0, 0, 0, 188,
5718 189, 190, 191, 192, 193, 194, 195, 196, 0, 0,
5719 197, 198, 0, 0, 0, 0, 199, 200, 201, 202,
5720 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5721 203, 204, 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 205, 206, 207, 208, 209, 210, 211, 212, 213, 214,
5725 0, 215, 216, 855, 642, 0, 0, 856, 0, 217,
5726 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5727 0, 0, 0, 0, 0, 0, 0, 188, 189, 190,
5728 191, 192, 193, 194, 195, 196, 0, 0, 197, 198,
5729 0, 0, 0, 0, 199, 200, 201, 202, 0, 0,
5730 0, 0, 0, 0, 0, 0, 0, 0, 203, 204,
5731 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5732 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5733 0, 0, 0, 0, 0, 0, 0, 0, 205, 206,
5734 207, 208, 209, 210, 211, 212, 213, 214, 0, 215,
5735 216, 858, 650, 0, 0, 859, 0, 217, 0, 0,
5736 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5737 0, 0, 0, 0, 0, 188, 189, 190, 191, 192,
5738 193, 194, 195, 196, 0, 0, 197, 198, 0, 0,
5739 0, 0, 199, 200, 201, 202, 0, 0, 0, 0,
5740 0, 0, 0, 0, 0, 0, 203, 204, 0, 0,
5741 0, 0, 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, 205, 206, 207, 208,
5744 209, 210, 211, 212, 213, 214, 0, 215, 216, 864,
5745 642, 0, 0, 865, 0, 217, 0, 0, 0, 0,
5746 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5747 0, 0, 0, 188, 189, 190, 191, 192, 193, 194,
5748 195, 196, 0, 0, 197, 198, 0, 0, 0, 0,
5749 199, 200, 201, 202, 0, 0, 0, 0, 0, 0,
5750 0, 0, 0, 0, 203, 204, 0, 0, 0, 0,
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, 205, 206, 207, 208, 209, 210,
5754 211, 212, 213, 214, 0, 215, 216, 688, 650, 0,
5755 0, 689, 0, 217, 0, 0, 0, 0, 0, 0,
5756 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5757 0, 188, 189, 190, 191, 192, 193, 194, 195, 196,
5758 0, 0, 197, 198, 0, 0, 0, 0, 199, 200,
5759 201, 202, 0, 0, 0, 0, 0, 0, 0, 0,
5760 0, 0, 203, 204, 0, 0, 0, 0, 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, 205, 206, 207, 208, 209, 210, 211, 212,
5764 213, 214, 0, 215, 216, 1027, 642, 0, 0, 1028,
5765 0, 217, 0, 0, 0, 0, 0, 0, 0, 0,
5766 0, 0, 0, 0, 0, 0, 0, 0, 0, 188,
5767 189, 190, 191, 192, 193, 194, 195, 196, 0, 0,
5768 197, 198, 0, 0, 0, 0, 199, 200, 201, 202,
5769 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5770 203, 204, 0, 0, 0, 0, 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 205, 206, 207, 208, 209, 210, 211, 212, 213, 214,
5774 0, 215, 216, 1030, 650, 0, 0, 1031, 0, 217,
5775 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5776 0, 0, 0, 0, 0, 0, 0, 188, 189, 190,
5777 191, 192, 193, 194, 195, 196, 0, 0, 197, 198,
5778 0, 0, 0, 0, 199, 200, 201, 202, 0, 0,
5779 0, 0, 0, 0, 0, 0, 0, 0, 203, 204,
5780 0, 0, 0, 0, 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, 205, 206,
5783 207, 208, 209, 210, 211, 212, 213, 214, 0, 215,
5784 216, 1318, 642, 0, 0, 1319, 0, 217, 0, 0,
5785 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5786 0, 0, 0, 0, 0, 188, 189, 190, 191, 192,
5787 193, 194, 195, 196, 0, 0, 197, 198, 0, 0,
5788 0, 0, 199, 200, 201, 202, 0, 0, 0, 0,
5789 0, 0, 0, 0, 0, 0, 203, 204, 0, 0,
5790 0, 0, 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, 205, 206, 207, 208,
5793 209, 210, 211, 212, 213, 214, 0, 215, 216, 1321,
5794 650, 0, 0, 1322, 0, 217, 0, 0, 0, 0,
5795 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5796 0, 0, 0, 188, 189, 190, 191, 192, 193, 194,
5797 195, 196, 0, 0, 197, 198, 0, 0, 0, 0,
5798 199, 200, 201, 202, 0, 0, 0, 0, 0, 0,
5799 0, 0, 0, 0, 203, 204, 0, 0, 0, 0,
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, 205, 206, 207, 208, 209, 210,
5803 211, 212, 213, 214, 0, 215, 216, 1366, 642, 0,
5804 0, 1367, 0, 217, 0, 0, 0, 0, 0, 0,
5805 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5806 0, 188, 189, 190, 191, 192, 193, 194, 195, 196,
5807 0, 0, 197, 198, 0, 0, 0, 0, 199, 200,
5808 201, 202, 0, 0, 0, 0, 0, 0, 0, 0,
5809 0, 0, 203, 204, 0, 0, 0, 0, 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, 205, 206, 207, 208, 209, 210, 211, 212,
5813 213, 214, 0, 215, 216, 0, 0, 0, 0, 0,
5814 0, 217
5815};
5816
5817static const yytype_int16 yycheck[] =
5818{
5819 1, 59, 7, 70, 58, 15, 16, 58, 107, 408,
5820 101, 13, 14, 116, 400, 1, 399, 70, 401, 7,
5821 15, 16, 27, 426, 115, 764, 349, 1, 843, 255,
5822 598, 252, 614, 601, 27, 52, 53, 103, 104, 27,
5823 56, 107, 344, 15, 16, 575, 853, 349, 600, 81,
5824 766, 52, 53, 58, 107, 56, 344, 344, 15, 16,
5825 111, 349, 349, 63, 64, 65, 52, 53, 54, 55,
5826 72, 56, 455, 477, 772, 26, 52, 28, 604, 21,
5827 89, 948, 54, 104, 588, 66, 107, 473, 89, 472,
5828 594, 474, 600, 614, 910, 469, 469, 54, 55, 565,
5829 912, 629, 112, 477, 89, 764, 111, 108, 109, 110,
5830 111, 515, 525, 681, 296, 15, 16, 112, 300, 502,
5831 13, 26, 25, 108, 109, 110, 766, 1033, 81, 0,
5832 84, 37, 38, 29, 823, 100, 67, 66, 778, 512,
5833 112, 527, 84, 320, 321, 528, 1032, 1033, 25, 25,
5834 1291, 1170, 608, 100, 69, 112, 247, 285, 152, 113,
5835 154, 101, 1283, 98, 13, 1184, 13, 100, 25, 134,
5836 54, 692, 693, 25, 692, 693, 234, 66, 10, 0,
5837 64, 65, 100, 98, 66, 67, 277, 134, 287, 101,
5838 155, 1058, 121, 122, 260, 261, 766, 69, 611, 25,
5839 656, 134, 772, 37, 38, 726, 662, 663, 726, 13,
5840 157, 13, 112, 230, 722, 155, 134, 25, 153, 310,
5841 287, 1362, 157, 1090, 13, 1092, 98, 123, 13, 230,
5842 119, 134, 161, 1354, 287, 363, 68, 25, 1144, 121,
5843 122, 273, 274, 155, 230, 255, 151, 257, 154, 120,
5844 25, 154, 155, 154, 1070, 158, 27, 1069, 1144, 245,
5845 255, 154, 257, 484, 157, 266, 252, 160, 285, 255,
5846 151, 337, 338, 339, 340, 678, 342, 343, 155, 155,
5847 266, 13, 668, 255, 285, 257, 669, 976, 754, 755,
5848 13, 1310, 266, 679, 1010, 863, 305, 680, 155, 285,
5849 257, 827, 13, 155, 305, 154, 155, 154, 1006, 285,
5850 714, 160, 761, 160, 413, 764, 337, 338, 339, 340,
5851 305, 274, 25, 304, 852, 1192, 1193, 418, 1143, 155,
5852 272, 787, 66, 275, 335, 791, 1143, 56, 712, 712,
5853 714, 13, 25, 409, 295, 296, 363, 155, 364, 300,
5854 154, 302, 154, 157, 307, 101, 160, 257, 160, 425,
5855 413, 335, 363, 364, 541, 154, 543, 155, 1008, 154,
5856 1010, 160, 1012, 1032, 1033, 160, 928, 363, 960, 364,
5857 155, 34, 157, 154, 134, 119, 916, 363, 409, 160,
5858 400, 15, 66, 410, 411, 851, 401, 810, 854, 52,
5859 25, 25, 403, 829, 425, 400, 134, 157, 154, 410,
5860 411, 837, 868, 981, 400, 919, 920, 403, 1170, 923,
5861 928, 925, 154, 927, 410, 411, 161, 155, 160, 950,
5862 951, 154, 950, 951, 1186, 956, 957, 160, 956, 957,
5863 1010, 451, 428, 154, 910, 119, 912, 121, 122, 160,
5864 455, 134, 155, 15, 157, 17, 451, 100, 832, 832,
5865 402, 1032, 1033, 473, 766, 100, 1032, 1033, 26, 474,
5866 772, 154, 155, 1091, 157, 158, 109, 34, 473, 451,
5867 28, 702, 154, 1194, 1195, 1144, 712, 473, 160, 494,
5868 998, 134, 100, 134, 451, 52, 482, 502, 484, 134,
5869 155, 494, 25, 705, 1025, 100, 494, 508, 141, 134,
5870 100, 967, 469, 455, 970, 1155, 525, 527, 1158, 1040,
5871 1091, 977, 1040, 528, 525, 134, 134, 983, 1187, 154,
5872 155, 548, 527, 158, 736, 1194, 1195, 1108, 1353, 134,
5873 525, 527, 1087, 1088, 134, 100, 599, 548, 112, 731,
5874 1289, 451, 1304, 554, 69, 512, 1308, 69, 1310, 945,
5875 155, 944, 548, 946, 937, 155, 743, 1071, 1072, 1073,
5876 1074, 748, 100, 1144, 100, 974, 1194, 1195, 1144, 134,
5877 554, 155, 97, 98, 100, 571, 98, 597, 1158, 575,
5878 600, 100, 996, 151, 1162, 1306, 1167, 598, 1296, 157,
5879 601, 34, 611, 1069, 1070, 1061, 134, 134, 661, 154,
5880 611, 134, 598, 1184, 159, 601, 682, 1369, 134, 52,
5881 69, 1187, 996, 1194, 1195, 134, 611, 155, 1194, 1195,
5882 1289, 154, 155, 157, 69, 158, 100, 609, 153, 155,
5883 56, 658, 614, 660, 1189, 1190, 155, 1306, 97, 98,
5884 101, 1291, 718, 1052, 100, 857, 290, 658, 668, 660,
5885 1358, 1301, 648, 98, 669, 867, 100, 653, 889, 679,
5886 134, 154, 658, 668, 660, 680, 999, 160, 609, 630,
5887 681, 69, 668, 614, 679, 78, 1089, 741, 134, 694,
5888 1220, 645, 1222, 679, 1234, 681, 647, 999, 100, 653,
5889 134, 694, 155, 645, 153, 691, 694, 69, 1010, 1158,
5890 98, 999, 999, 100, 154, 1219, 702, 1285, 158, 155,
5891 1360, 1291, 1362, 732, 1364, 933, 1296, 935, 66, 820,
5892 69, 732, 134, 157, 1133, 97, 98, 691, 69, 725,
5893 1306, 1381, 1065, 743, 69, 745, 69, 732, 748, 749,
5894 157, 144, 145, 146, 705, 712, 100, 1213, 97, 98,
5895 69, 692, 693, 1065, 69, 66, 97, 98, 157, 872,
5896 78, 69, 97, 98, 97, 98, 100, 1065, 1065, 100,
5897 731, 119, 724, 121, 122, 736, 124, 158, 1191, 98,
5898 134, 153, 1362, 98, 860, 726, 862, 134, 1338, 1339,
5899 98, 810, 1342, 1343, 69, 1335, 1346, 159, 861, 810,
5900 134, 66, 1211, 134, 153, 56, 78, 451, 157, 870,
5901 121, 122, 153, 124, 152, 810, 26, 1029, 153, 69,
5902 153, 782, 97, 98, 155, 1375, 1376, 1377, 1378, 860,
5903 1289, 862, 1291, 69, 1384, 157, 480, 1296, 154, 483,
5904 26, 157, 1301, 839, 488, 841, 1158, 843, 98, 52,
5905 154, 155, 863, 56, 119, 870, 121, 122, 155, 69,
5906 161, 505, 98, 69, 58, 832, 1332, 863, 66, 69,
5907 142, 143, 144, 145, 146, 151, 52, 1273, 153, 1091,
5908 56, 1274, 602, 69, 78, 897, 606, 97, 98, 66,
5909 966, 97, 98, 889, 154, 155, 857, 97, 98, 1358,
5910 1304, 1360, 134, 1362, 1308, 1364, 867, 792, 928, 78,
5911 795, 97, 98, 134, 108, 134, 26, 980, 112, 982,
5912 916, 119, 1381, 121, 122, 945, 124, 69, 14, 15,
5913 891, 946, 106, 69, 160, 966, 56, 581, 965, 155,
5914 945, 151, 119, 153, 121, 122, 138, 157, 69, 945,
5915 89, 90, 25, 153, 965, 97, 98, 1169, 155, 69,
5916 1172, 97, 98, 158, 960, 151, 610, 153, 155, 965,
5917 981, 157, 152, 1000, 40, 41, 97, 98, 960, 1291,
5918 1192, 154, 155, 1, 1296, 981, 58, 97, 98, 1000,
5919 69, 929, 930, 306, 307, 69, 134, 15, 16, 69,
5920 938, 134, 155, 941, 1000, 943, 78, 1019, 1020, 950,
5921 951, 153, 1023, 1024, 158, 956, 957, 153, 97, 98,
5922 155, 1032, 1033, 97, 98, 155, 1094, 97, 98, 155,
5923 1057, 1095, 153, 155, 52, 53, 108, 109, 56, 1023,
5924 1024, 151, 686, 153, 134, 52, 1057, 157, 155, 67,
5925 1362, 1047, 30, 1049, 66, 155, 1268, 1269, 1270, 152,
5926 155, 1057, 54, 55, 66, 57, 155, 13, 1029, 141,
5927 17, 89, 64, 65, 153, 25, 1087, 1088, 155, 153,
5928 1091, 1077, 1078, 153, 1025, 103, 104, 152, 155, 107,
5929 108, 109, 110, 134, 112, 1204, 44, 1108, 1199, 1040,
5930 44, 152, 155, 83, 84, 1181, 155, 119, 1320, 121,
5931 122, 44, 1139, 1140, 758, 56, 44, 119, 1145, 121,
5932 122, 1132, 136, 134, 159, 1136, 8, 1204, 1139, 1140,
5933 1091, 1092, 1159, 1144, 1145, 78, 15, 1132, 692, 693,
5934 1136, 1204, 155, 1139, 1140, 52, 155, 1143, 1159, 1145,
5935 1181, 1162, 95, 96, 708, 709, 1167, 137, 138, 1170,
5936 155, 155, 155, 1159, 155, 52, 1162, 54, 55, 56,
5937 57, 1184, 726, 1184, 155, 1186, 1203, 152, 1189, 1190,
5938 101, 1194, 1195, 1194, 1195, 155, 1147, 1255, 155, 9,
5939 1217, 155, 1203, 52, 139, 155, 139, 140, 141, 142,
5940 143, 144, 145, 146, 1280, 1281, 1217, 1203, 1169, 139,
5941 1206, 1172, 230, 155, 152, 102, 155, 52, 1158, 56,
5942 107, 1217, 1233, 101, 1220, 869, 1222, 158, 160, 155,
5943 52, 1192, 54, 55, 56, 57, 155, 255, 1233, 257,
5944 155, 1252, 260, 261, 888, 155, 890, 155, 266, 1280,
5945 1281, 155, 52, 1273, 54, 55, 155, 57, 52, 1274,
5946 54, 55, 56, 57, 908, 155, 152, 285, 1273, 1230,
5947 139, 55, 155, 56, 1285, 155, 157, 1273, 155, 1275,
5948 102, 1277, 155, 155, 1295, 155, 264, 305, 335, 1285,
5949 157, 504, 266, 1304, 508, 1136, 106, 1308, 1325, 1310,
5950 1295, 52, 102, 54, 55, 56, 57, 1268, 1269, 1270,
5951 609, 870, 108, 78, 1325, 110, 98, 335, 1158, 337,
5952 338, 339, 340, 495, 342, 343, 880, 691, 961, 1325,
5953 95, 96, 40, 41, 42, 43, 44, 1206, 980, 1335,
5954 59, 60, 61, 62, 754, 363, 364, 910, 1231, 1289,
5955 1158, 1291, 1289, 1232, 1296, 1078, 1296, 1353, 1369, 1320,
5956 1, 1301, 1230, 873, 1354, 1353, 1187, 1187, 1329, 359,
5957 1183, 1275, 1252, 119, 15, 16, 141, 142, 143, 144,
5958 145, 146, 400, 361, 1277, 403, 543, 1348, 366, 111,
5959 764, 409, 410, 411, 772, 115, 950, 951, -1, 1348,
5960 -1, -1, 956, 957, -1, -1, -1, 425, -1, -1,
5961 -1, 52, 53, -1, -1, -1, -1, -1, 1358, -1,
5962 1360, -1, 1362, -1, 1364, -1, 67, -1, -1, -1,
5963 -1, -1, -1, 451, -1, -1, 990, 991, -1, 993,
5964 994, 1381, -1, -1, 228, -1, -1, 231, 232, 233,
5965 -1, 1291, -1, -1, -1, 473, 1296, -1, -1, -1,
5966 -1, 1301, 103, 104, -1, -1, 107, -1, -1, -1,
5967 -1, 112, 1032, 1033, -1, -1, 33, 34, 35, 36,
5968 458, 459, -1, -1, -1, -1, 1040, -1, -1, 467,
5969 508, -1, 49, 50, 51, -1, -1, 475, 476, -1,
5970 -1, -1, 59, 60, 61, 62, 63, 525, -1, 527,
5971 1064, -1, -1, -1, -1, -1, -1, 495, 1358, -1,
5972 1360, -1, 1362, -1, 1364, 503, -1, 1087, 1088, -1,
5973 548, 1091, -1, 78, -1, -1, 554, -1, -1, -1,
5974 -1, 1381, -1, -1, -1, -1, -1, -1, 1108, 1193,
5975 95, 96, -1, 110, 111, 112, 113, 114, 115, 116,
5976 117, 118, -1, -1, -1, -1, -1, -1, -1, -1,
5977 -1, -1, -1, -1, -1, -1, -1, -1, -1, 597,
5978 598, -1, 600, 601, 1144, -1, -1, -1, -1, 230,
5979 147, 609, -1, 611, 1238, -1, 614, 142, 143, 144,
5980 145, 146, -1, -1, 1248, -1, -1, 1167, -1, -1,
5981 1170, -1, -1, -1, 255, -1, 257, -1, -1, 260,
5982 261, 1265, 1266, 1267, 1184, 266, 1186, -1, -1, 1189,
5983 1190, -1, -1, -1, 1194, 1195, -1, -1, -1, -1,
5984 658, -1, 660, -1, 285, -1, -1, -1, -1, -1,
5985 668, -1, -1, -1, 52, -1, 54, 55, 56, 57,
5986 58, 679, -1, 681, 682, 1032, 1033, -1, -1, -1,
5987 -1, -1, -1, -1, 692, 693, -1, 655, -1, -1,
5988 78, -1, -1, -1, 468, 469, -1, -1, -1, -1,
5989 -1, -1, 1252, 477, 335, -1, 337, 338, 339, 340,
5990 718, 342, 343, -1, 102, -1, -1, -1, 726, 107,
5991 108, 109, -1, -1, 732, -1, -1, 695, -1, -1,
5992 1087, 1088, 363, -1, 1091, -1, -1, -1, 512, -1,
5993 -1, 515, 52, -1, 54, 55, 56, 57, 58, -1,
5994 -1, 1108, -1, 141, 1304, -1, 144, -1, 1308, -1,
5995 1310, -1, -1, -1, -1, -1, -1, -1, 78, 400,
5996 -1, -1, 403, -1, -1, -1, -1, -1, 409, 410,
5997 411, -1, 92, -1, -1, -1, -1, 1144, -1, -1,
5998 -1, -1, 102, -1, 425, -1, -1, 107, 108, 109,
5999 -1, -1, 810, -1, -1, -1, -1, -1, -1, -1,
6000 1167, -1, -1, 1170, -1, 589, -1, -1, -1, 1369,
6001 451, -1, -1, -1, -1, -1, -1, 1184, -1, 1186,
6002 -1, 141, 1189, 1190, 144, 609, -1, 1194, 1195, -1,
6003 614, -1, 473, -1, -1, -1, -1, 157, -1, -1,
6004 -1, -1, 860, -1, 862, 863, -1, 825, 826, -1,
6005 -1, -1, -1, -1, -1, 833, 834, -1, -1, -1,
6006 -1, -1, -1, -1, -1, -1, 52, 508, 54, 55,
6007 56, 57, 58, -1, -1, -1, -1, -1, -1, -1,
6008 -1, -1, -1, -1, -1, 1252, 527, -1, -1, -1,
6009 -1, -1, 78, -1, 52, -1, 54, 55, 56, 57,
6010 58, -1, -1, -1, -1, 883, 884, 548, 886, 887,
6011 928, -1, 696, 554, -1, -1, 102, -1, -1, -1,
6012 78, -1, 108, 109, -1, -1, -1, 945, 712, -1,
6013 714, -1, 950, 951, 92, -1, -1, 1304, 956, 957,
6014 -1, 1308, -1, 1310, 102, -1, -1, 965, 966, 107,
6015 108, 109, -1, -1, -1, 141, 597, 598, -1, 600,
6016 601, -1, -1, 981, 942, -1, -1, -1, 609, -1,
6017 -1, -1, -1, 614, -1, -1, -1, 955, -1, -1,
6018 -1, -1, 1000, 141, -1, -1, 144, 771, -1, -1,
6019 -1, -1, -1, -1, 1, -1, -1, -1, -1, -1,
6020 -1, -1, 1369, -1, -1, 1023, 1024, 1025, 15, 16,
6021 -1, -1, 1032, 1033, 992, -1, 800, 658, -1, 660,
6022 -1, -1, 1040, -1, -1, -1, -1, 668, -1, -1,
6023 52, -1, 54, 55, 56, 57, 58, -1, 679, 1057,
6024 681, 682, -1, -1, -1, 52, 53, -1, 832, -1,
6025 -1, 692, 693, -1, -1, -1, 78, -1, -1, -1,
6026 67, -1, -1, -1, -1, -1, 850, 1087, 1088, -1,
6027 92, 1091, -1, -1, -1, -1, -1, 718, -1, -1,
6028 102, -1, -1, -1, -1, 726, 108, 109, 1108, -1,
6029 -1, -1, -1, -1, -1, -1, 103, 104, -1, -1,
6030 107, -1, -1, -1, -1, 112, -1, -1, -1, -1,
6031 -1, -1, -1, -1, 1132, -1, -1, -1, 1136, 141,
6032 -1, 1139, 1140, -1, 1144, -1, -1, 1145, -1, -1,
6033 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6034 -1, 1159, -1, -1, 1162, -1, -1, 1167, -1, -1,
6035 1170, -1, -1, 937, -1, -1, -1, -1, -1, -1,
6036 -1, -1, -1, 1181, 1184, -1, 1186, -1, -1, 1189,
6037 1190, -1, -1, -1, 1194, 1195, 960, -1, -1, -1,
6038 -1, -1, -1, -1, -1, 1203, -1, -1, 972, -1,
6039 -1, -1, -1, -1, -1, -1, -1, -1, 1176, 1217,
6040 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6041 -1, -1, 996, -1, -1, 1233, -1, -1, -1, 860,
6042 -1, 862, 863, 230, -1, -1, -1, -1, -1, -1,
6043 -1, -1, 1252, -1, -1, -1, -1, 1021, -1, -1,
6044 -1, -1, -1, -1, -1, -1, -1, -1, 255, -1,
6045 257, -1, -1, 260, 261, 1273, -1, -1, -1, 266,
6046 -1, -1, 1280, 1281, -1, -1, -1, 1285, -1, -1,
6047 -1, -1, 1056, -1, -1, -1, -1, 1295, 285, -1,
6048 -1, -1, -1, -1, 1304, -1, -1, 928, 1308, -1,
6049 1310, -1, -1, -1, -1, -1, 1032, 1033, -1, -1,
6050 -1, -1, -1, -1, 945, -1, -1, 1325, -1, 950,
6051 951, -1, -1, -1, -1, 956, 957, -1, -1, -1,
6052 -1, -1, -1, -1, 965, 966, -1, -1, 335, -1,
6053 337, 338, 339, 340, -1, 342, 343, -1, -1, -1,
6054 981, -1, -1, -1, -1, -1, -1, -1, -1, 1369,
6055 -1, 1087, 1088, -1, -1, 1091, 363, 1141, -1, 1000,
6056 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6057 -1, 1, 1108, -1, -1, -1, -1, -1, -1, -1,
6058 -1, -1, 1023, 1024, 1025, 15, 16, -1, -1, -1,
6059 -1, -1, -1, 400, -1, -1, 403, -1, -1, 1040,
6060 -1, -1, 409, 410, 411, -1, -1, -1, 1144, -1,
6061 -1, -1, -1, -1, -1, -1, 1057, -1, 425, -1,
6062 -1, -1, 52, 53, -1, -1, -1, -1, -1, -1,
6063 -1, 1167, -1, -1, 1170, -1, -1, 67, -1, -1,
6064 -1, -1, -1, -1, 451, -1, -1, -1, 1184, -1,
6065 1186, 1032, 1033, 1189, 1190, -1, -1, -1, 1194, 1195,
6066 -1, -1, -1, -1, -1, -1, 473, -1, -1, -1,
6067 -1, -1, -1, 103, 104, -1, -1, 107, -1, -1,
6068 -1, -1, 112, -1, -1, -1, -1, -1, -1, -1,
6069 -1, -1, -1, -1, -1, 1136, -1, -1, 1139, 1140,
6070 -1, 508, -1, -1, 1145, -1, 1087, 1088, -1, -1,
6071 1091, -1, -1, -1, -1, -1, 1252, -1, 1159, -1,
6072 527, 1162, -1, -1, -1, 1032, 1033, 1108, -1, -1,
6073 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6074 1181, 548, -1, -1, -1, -1, -1, 554, -1, -1,
6075 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6076 -1, -1, 1203, 1144, -1, -1, -1, -1, 1304, -1,
6077 -1, -1, 1308, -1, 1310, -1, 1217, -1, -1, -1,
6078 1087, 1088, -1, -1, 1091, -1, 1167, -1, -1, 1170,
6079 597, 598, -1, 600, 601, -1, -1, -1, -1, -1,
6080 230, 1108, 609, 1184, -1, 1186, -1, 614, 1189, 1190,
6081 -1, -1, -1, 1194, 1195, -1, -1, -1, -1, -1,
6082 -1, -1, -1, -1, -1, 255, -1, 257, -1, -1,
6083 260, 261, 1273, 1369, -1, -1, 266, 1144, -1, 1280,
6084 1281, -1, -1, -1, 1285, -1, -1, -1, -1, -1,
6085 -1, 658, -1, 660, -1, 285, -1, -1, -1, -1,
6086 1167, 668, -1, 1170, -1, -1, -1, -1, -1, -1,
6087 -1, 1252, 679, -1, 681, 682, -1, 1184, -1, 1186,
6088 -1, -1, 1189, 1190, 1325, 692, 693, 1194, 1195, -1,
6089 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6090 -1, -1, -1, -1, -1, 335, -1, 337, 338, 339,
6091 340, 718, 342, 343, -1, -1, -1, -1, -1, 726,
6092 -1, -1, -1, 1304, -1, -1, -1, 1308, -1, 1310,
6093 -1, -1, -1, 363, -1, -1, -1, 1032, 1033, -1,
6094 -1, -1, -1, -1, -1, 1252, -1, -1, -1, 1032,
6095 1033, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6096 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6097 400, -1, -1, 403, -1, -1, -1, -1, -1, 409,
6098 410, 411, -1, -1, -1, -1, -1, -1, 1369, -1,
6099 -1, -1, 1087, 1088, -1, 425, 1091, 1304, -1, -1,
6100 -1, 1308, -1, 1310, 1087, 1088, -1, -1, 1091, -1,
6101 -1, -1, -1, 1108, -1, -1, -1, -1, -1, -1,
6102 -1, 451, -1, -1, -1, 1108, -1, -1, -1, -1,
6103 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6104 -1, -1, -1, 473, -1, -1, -1, -1, -1, 1144,
6105 -1, -1, -1, 860, -1, 862, 863, -1, -1, -1,
6106 -1, 1144, 1369, -1, -1, -1, -1, -1, -1, -1,
6107 -1, -1, 1167, -1, -1, 1170, -1, -1, 508, -1,
6108 -1, -1, -1, -1, 1167, -1, -1, 1170, -1, 1184,
6109 -1, 1186, -1, -1, 1189, 1190, -1, 527, -1, 1194,
6110 1195, 1184, -1, 1186, -1, -1, 1189, 1190, -1, -1,
6111 -1, 1194, 1195, -1, -1, -1, -1, -1, 548, -1,
6112 -1, 928, -1, -1, 554, -1, -1, -1, -1, -1,
6113 -1, -1, -1, -1, -1, -1, -1, -1, 945, -1,
6114 -1, -1, -1, 950, 951, -1, -1, 1, -1, 956,
6115 957, -1, -1, -1, -1, -1, -1, 1252, 965, 966,
6116 -1, 15, 16, -1, 1032, 1033, -1, 597, 598, 1252,
6117 600, 601, -1, -1, 981, -1, -1, -1, -1, 609,
6118 -1, -1, -1, -1, 614, -1, -1, -1, -1, -1,
6119 -1, -1, -1, 1000, -1, -1, -1, -1, 52, 53,
6120 -1, -1, 56, -1, -1, -1, -1, -1, -1, 1304,
6121 -1, -1, -1, 1308, -1, 1310, 1023, 1024, 1025, 1087,
6122 1088, 1304, -1, 1091, -1, 1308, -1, 1310, 658, -1,
6123 660, -1, -1, 1040, -1, 89, -1, -1, 668, -1,
6124 1108, -1, -1, -1, -1, -1, -1, -1, -1, 679,
6125 1057, 681, 682, -1, 108, 109, 110, -1, 112, -1,
6126 -1, -1, 692, 693, -1, -1, -1, -1, -1, -1,
6127 -1, -1, -1, -1, 1369, -1, 1144, -1, -1, -1,
6128 -1, -1, -1, -1, -1, -1, 1369, -1, 718, -1,
6129 -1, -1, -1, -1, -1, -1, 726, -1, -1, 1167,
6130 -1, -1, 1170, -1, -1, -1, -1, 25, -1, -1,
6131 -1, -1, -1, -1, -1, -1, 1184, -1, 1186, -1,
6132 -1, 1189, 1190, -1, -1, -1, 1194, 1195, -1, 1136,
6133 -1, -1, 1139, 1140, -1, -1, -1, -1, 1145, -1,
6134 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6135 -1, -1, 1159, -1, -1, 1162, -1, -1, -1, -1,
6136 78, 79, 80, 81, 82, 83, 84, 85, 86, 87,
6137 88, 89, 90, -1, 1181, -1, 230, 95, 96, -1,
6138 -1, -1, -1, 101, 1252, -1, -1, -1, -1, -1,
6139 -1, -1, -1, -1, -1, -1, 1203, -1, -1, -1,
6140 -1, 255, -1, 257, -1, -1, -1, -1, -1, -1,
6141 1217, -1, 266, -1, -1, -1, -1, 135, -1, 137,
6142 138, 139, 140, 141, 142, 143, 144, 145, 146, -1,
6143 860, 285, 862, 863, -1, -1, 1304, -1, -1, -1,
6144 1308, -1, 1310, -1, -1, -1, -1, -1, -1, -1,
6145 -1, 305, -1, -1, -1, -1, -1, -1, -1, -1,
6146 -1, -1, -1, -1, -1, -1, 1273, -1, -1, -1,
6147 -1, -1, -1, 1280, 1281, -1, -1, -1, 1285, -1,
6148 -1, 335, -1, -1, -1, -1, -1, -1, -1, -1,
6149 -1, -1, -1, -1, -1, -1, -1, -1, 928, -1,
6150 -1, 1369, -1, -1, -1, -1, -1, -1, -1, 363,
6151 364, -1, -1, -1, -1, 945, -1, -1, 1325, -1,
6152 950, 951, -1, -1, 1, -1, 956, 957, -1, -1,
6153 -1, -1, -1, -1, -1, 965, 966, -1, 15, 16,
6154 -1, -1, -1, -1, -1, -1, 400, -1, -1, 403,
6155 -1, 981, -1, -1, -1, -1, 410, 411, -1, -1,
6156 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6157 1000, -1, -1, -1, -1, 52, 53, -1, -1, 56,
6158 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6159 -1, -1, -1, 1023, 1024, 1025, -1, 451, -1, -1,
6160 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6161 1040, -1, 89, -1, -1, -1, -1, -1, -1, 473,
6162 -1, -1, -1, -1, -1, -1, -1, 1057, -1, -1,
6163 -1, 108, 109, 110, -1, 112, -1, -1, -1, -1,
6164 -1, -1, -1, 0, -1, -1, -1, -1, -1, -1,
6165 -1, 8, 9, 10, 508, -1, 13, 14, 15, -1,
6166 17, -1, -1, -1, -1, -1, -1, -1, 25, 26,
6167 27, 525, -1, 527, -1, -1, -1, -1, -1, -1,
6168 37, 38, -1, 40, 41, 42, 43, 44, -1, -1,
6169 -1, -1, -1, -1, 548, -1, -1, -1, -1, -1,
6170 554, -1, -1, -1, -1, -1, 1136, -1, -1, 1139,
6171 1140, 68, 69, -1, -1, 1145, -1, -1, -1, -1,
6172 -1, -1, -1, -1, -1, -1, -1, -1, -1, 1159,
6173 -1, -1, 1162, -1, -1, -1, -1, -1, -1, -1,
6174 97, 98, -1, -1, 598, -1, -1, 601, -1, -1,
6175 -1, 1181, -1, 230, -1, -1, -1, 611, -1, -1,
6176 614, -1, -1, 120, -1, -1, -1, -1, -1, -1,
6177 -1, -1, -1, 1203, -1, -1, -1, -1, 255, -1,
6178 257, -1, -1, -1, -1, -1, -1, 1217, -1, 266,
6179 -1, -1, -1, -1, 151, 152, -1, 154, -1, -1,
6180 157, 158, -1, 160, 658, -1, 660, -1, 285, -1,
6181 -1, -1, -1, -1, 668, -1, -1, -1, -1, -1,
6182 -1, -1, -1, -1, -1, 679, -1, 681, 305, -1,
6183 -1, -1, -1, -1, -1, -1, -1, -1, 692, 693,
6184 -1, -1, -1, 1273, -1, -1, -1, -1, -1, -1,
6185 1280, 1281, -1, -1, -1, 1285, -1, -1, 335, -1,
6186 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6187 -1, -1, 726, -1, -1, -1, -1, -1, 732, 78,
6188 79, 80, 81, 82, 83, 84, 363, 364, 87, 88,
6189 -1, -1, -1, -1, -1, 1325, 95, 96, -1, -1,
6190 -1, -1, -1, -1, -1, -1, -1, -1, -1, 1,
6191 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6192 -1, -1, -1, 400, -1, -1, 403, -1, -1, -1,
6193 -1, -1, -1, 410, 411, -1, -1, -1, 137, 138,
6194 139, 140, 141, 142, 143, 144, 145, 146, -1, -1,
6195 -1, -1, -1, -1, -1, -1, 810, -1, -1, -1,
6196 52, 53, -1, -1, 56, -1, -1, -1, -1, -1,
6197 -1, -1, -1, -1, 451, -1, -1, -1, -1, -1,
6198 -1, -1, -1, -1, -1, 33, 34, 35, 36, -1,
6199 -1, -1, -1, -1, -1, -1, 473, 89, -1, -1,
6200 -1, 49, 50, 51, 52, -1, -1, -1, 56, 863,
6201 -1, 59, 60, 61, 62, 63, 108, 109, 110, 78,
6202 79, 80, 81, 82, 83, 84, 85, -1, 87, 88,
6203 -1, 508, -1, -1, -1, -1, 95, 96, -1, -1,
6204 -1, -1, -1, 91, 92, -1, -1, -1, 525, -1,
6205 527, 99, -1, -1, 102, -1, 104, 105, -1, 107,
6206 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
6207 118, 548, -1, -1, -1, -1, -1, 554, 137, 138,
6208 139, 140, 141, 142, 143, 144, 145, 146, -1, -1,
6209 -1, 945, 140, -1, -1, -1, 950, 951, -1, 147,
6210 -1, 1, 956, 957, -1, -1, 154, -1, -1, -1,
6211 -1, 965, -1, -1, -1, -1, -1, -1, -1, -1,
6212 -1, 598, -1, -1, 601, -1, -1, 981, -1, -1,
6213 -1, -1, -1, -1, 611, -1, -1, 614, 230, -1,
6214 -1, -1, -1, -1, -1, -1, 1000, -1, -1, -1,
6215 -1, -1, 52, 53, -1, -1, 56, -1, -1, -1,
6216 -1, -1, -1, -1, -1, -1, -1, -1, -1, 1023,
6217 1024, 1025, -1, -1, 266, -1, -1, -1, -1, -1,
6218 -1, 658, -1, 660, -1, -1, 1040, -1, -1, 89,
6219 -1, 668, -1, 285, -1, -1, -1, -1, -1, -1,
6220 -1, -1, 679, 1057, 681, -1, -1, -1, 108, 109,
6221 110, 111, -1, 305, -1, 692, 693, -1, 33, 34,
6222 35, 36, -1, -1, -1, -1, -1, -1, -1, -1,
6223 -1, -1, -1, -1, 49, 50, 51, 52, -1, -1,
6224 -1, 56, -1, 335, 59, 60, 61, 62, 63, 726,
6225 -1, -1, -1, -1, -1, 732, -1, -1, -1, -1,
6226 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6227 1, 363, 364, -1, -1, -1, 91, 92, 1132, -1,
6228 -1, -1, 1136, -1, 99, 1139, 1140, 102, -1, 104,
6229 105, 1145, 107, -1, -1, 110, 111, 112, 113, 114,
6230 115, 116, 117, 118, -1, 1159, -1, -1, 1162, -1,
6231 -1, 403, -1, -1, -1, -1, -1, -1, 410, 411,
6232 -1, 52, 53, -1, -1, 140, -1, -1, -1, -1,
6233 230, -1, 147, 810, 78, 79, 80, 81, 82, 83,
6234 84, 85, 86, 87, 88, 89, 90, -1, -1, 1203,
6235 -1, 95, 96, -1, -1, -1, -1, -1, -1, -1,
6236 -1, -1, -1, 1217, -1, -1, 266, -1, -1, -1,
6237 -1, -1, -1, -1, -1, -1, -1, 108, -1, 1233,
6238 -1, -1, -1, -1, -1, 285, 863, -1, -1, -1,
6239 -1, 135, -1, 137, 138, 139, 140, 141, 142, 143,
6240 144, 145, 146, -1, -1, 305, -1, -1, -1, -1,
6241 154, -1, -1, -1, -1, -1, 508, -1, -1, 1273,
6242 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6243 -1, 1285, -1, 525, -1, 335, -1, -1, -1, -1,
6244 -1, 1295, -1, -1, -1, -1, -1, -1, -1, -1,
6245 -1, -1, -1, -1, -1, -1, 548, -1, -1, -1,
6246 -1, -1, 554, 363, 364, -1, -1, -1, 945, -1,
6247 -1, 1325, -1, 950, 951, -1, -1, -1, -1, 956,
6248 957, -1, -1, -1, -1, 1, -1, -1, 965, -1,
6249 -1, -1, -1, -1, -1, -1, -1, -1, -1, 230,
6250 -1, -1, -1, 403, 981, -1, 598, -1, -1, 601,
6251 410, 411, -1, -1, -1, -1, -1, -1, -1, 611,
6252 -1, -1, 614, 1000, -1, -1, -1, -1, -1, -1,
6253 -1, -1, -1, -1, -1, 266, 52, 53, -1, -1,
6254 -1, -1, -1, -1, -1, -1, 1023, 1024, 1025, -1,
6255 -1, -1, -1, -1, 285, 78, 79, 80, 81, 82,
6256 83, 84, -1, 1040, 87, 88, 658, -1, 660, -1,
6257 -1, -1, 95, 96, -1, -1, -1, -1, -1, -1,
6258 1057, -1, -1, -1, -1, -1, -1, -1, -1, 681,
6259 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6260 692, 693, -1, -1, 335, -1, -1, -1, 508, -1,
6261 -1, -1, -1, -1, 137, 138, 139, 140, 141, 142,
6262 143, 144, 145, 146, -1, 525, -1, -1, -1, -1,
6263 -1, -1, 363, -1, 726, -1, -1, -1, -1, -1,
6264 732, -1, -1, -1, -1, -1, -1, -1, 548, 741,
6265 -1, -1, -1, -1, 554, 1132, -1, -1, -1, 1136,
6266 -1, -1, 1139, 1140, -1, -1, -1, -1, 1145, -1,
6267 -1, -1, 403, -1, -1, -1, -1, -1, -1, 410,
6268 411, -1, 1159, -1, -1, 1162, -1, -1, -1, -1,
6269 -1, -1, -1, -1, -1, -1, -1, -1, 598, -1,
6270 -1, 601, -1, -1, -1, -1, -1, -1, -1, -1,
6271 -1, 611, -1, -1, 230, -1, -1, -1, 810, -1,
6272 -1, -1, -1, -1, -1, -1, 1203, -1, -1, -1,
6273 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6274 1217, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6275 266, -1, -1, -1, -1, -1, 1233, -1, 658, -1,
6276 660, -1, -1, -1, -1, -1, -1, -1, -1, 285,
6277 -1, 863, 33, 34, 35, 36, -1, 508, -1, -1,
6278 -1, 681, -1, -1, -1, -1, -1, -1, 49, 50,
6279 51, 52, -1, -1, -1, 56, 1273, -1, 59, 60,
6280 61, 62, 63, -1, -1, -1, -1, -1, 1285, -1,
6281 -1, -1, -1, -1, -1, -1, -1, 548, 1295, 335,
6282 -1, -1, -1, 554, -1, -1, -1, -1, -1, -1,
6283 91, 92, 732, -1, -1, -1, -1, -1, 99, -1,
6284 -1, 102, -1, 104, 105, -1, -1, 363, 1325, 110,
6285 111, 112, 113, 114, 115, 116, 117, 118, 950, 951,
6286 -1, -1, -1, -1, 956, 957, -1, 598, -1, -1,
6287 601, -1, -1, 965, -1, -1, -1, -1, -1, 140,
6288 -1, -1, -1, 614, -1, -1, 147, 403, -1, 981,
6289 -1, -1, -1, -1, 410, 411, -1, -1, -1, -1,
6290 -1, -1, -1, -1, -1, -1, -1, -1, 1000, -1,
6291 810, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6292 -1, -1, -1, -1, -1, -1, -1, 658, -1, 660,
6293 -1, 1023, 1024, 1025, -1, -1, -1, -1, -1, -1,
6294 -1, -1, -1, -1, -1, -1, -1, -1, 1040, -1,
6295 681, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6296 -1, 692, 693, 863, -1, 1057, -1, -1, -1, -1,
6297 -1, -1, -1, -1, -1, -1, -1, -1, 44, -1,
6298 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6299 -1, -1, 508, -1, -1, 726, -1, -1, -1, -1,
6300 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6301 -1, -1, 78, 79, 80, 81, 82, 83, 84, 85,
6302 86, 87, 88, 89, 90, -1, -1, -1, -1, 95,
6303 96, -1, 548, -1, -1, -1, -1, -1, 554, -1,
6304 1132, -1, -1, -1, 1136, -1, -1, 1139, 1140, -1,
6305 -1, -1, -1, 1145, -1, -1, -1, -1, -1, -1,
6306 -1, -1, -1, -1, -1, 965, -1, 1159, -1, 135,
6307 1162, 137, 138, 139, 140, 141, 142, 143, 144, 145,
6308 146, 981, 598, -1, -1, 601, -1, -1, -1, 155,
6309 -1, -1, -1, -1, -1, -1, -1, -1, 614, -1,
6310 1000, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6311 -1, 1203, -1, -1, -1, -1, -1, -1, -1, -1,
6312 -1, -1, -1, 1023, 1024, 1217, -1, -1, -1, -1,
6313 -1, -1, 863, -1, -1, -1, -1, -1, -1, -1,
6314 -1, 1233, 658, -1, 660, -1, -1, -1, -1, -1,
6315 -1, -1, -1, -1, -1, -1, -1, 1057, -1, -1,
6316 -1, -1, -1, -1, -1, 681, -1, -1, -1, -1,
6317 -1, -1, -1, -1, -1, -1, 692, 693, -1, -1,
6318 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6319 -1, -1, -1, 1285, -1, -1, -1, -1, -1, -1,
6320 -1, -1, -1, 1295, -1, -1, -1, -1, -1, -1,
6321 726, -1, -1, -1, -1, -1, -1, -1, -1, 950,
6322 951, -1, -1, -1, -1, 956, 957, -1, -1, -1,
6323 -1, -1, 1132, 1325, 965, -1, 1136, -1, -1, 1139,
6324 1140, -1, -1, -1, 44, 1145, -1, -1, -1, -1,
6325 981, -1, -1, -1, -1, -1, -1, -1, -1, 1159,
6326 -1, -1, 1162, -1, -1, -1, -1, -1, -1, 1000,
6327 -1, -1, -1, -1, -1, -1, -1, -1, 78, 79,
6328 80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
6329 90, -1, 1023, 1024, 1025, 95, 96, -1, -1, -1,
6330 -1, -1, -1, 1203, -1, -1, -1, -1, -1, 1040,
6331 -1, -1, -1, -1, -1, -1, -1, 1217, -1, 15,
6332 16, -1, -1, -1, -1, -1, 1057, -1, -1, -1,
6333 -1, -1, -1, 1233, -1, 135, -1, 137, 138, 139,
6334 140, 141, 142, 143, 144, 145, 146, 863, -1, -1,
6335 -1, 47, 48, 49, 50, -1, -1, -1, 54, 55,
6336 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6337 -1, 67, 68, -1, -1, -1, -1, -1, -1, -1,
6338 -1, -1, -1, -1, -1, 1285, -1, -1, -1, -1,
6339 -1, -1, -1, -1, -1, 1295, -1, -1, -1, -1,
6340 -1, 1132, -1, -1, -1, 1136, -1, -1, 1139, 1140,
6341 -1, -1, -1, -1, 1145, -1, 112, -1, -1, -1,
6342 -1, -1, -1, -1, -1, 1325, 52, 53, 1159, -1,
6343 56, 1162, -1, -1, 950, 951, -1, -1, -1, -1,
6344 956, 957, -1, -1, -1, -1, -1, -1, -1, 965,
6345 76, 77, 78, 79, 80, 81, 82, 83, 84, -1,
6346 -1, 87, 88, -1, -1, 981, -1, 93, 94, 95,
6347 96, -1, 1203, -1, -1, -1, -1, -1, -1, -1,
6348 -1, 107, 108, -1, 1000, -1, 1217, -1, -1, -1,
6349 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6350 -1, -1, -1, -1, -1, -1, -1, 1023, 1024, 1025,
6351 -1, 137, 138, 139, 140, 141, 142, 143, 144, 145,
6352 146, -1, 148, 149, 1040, -1, -1, -1, -1, -1,
6353 156, 157, 228, -1, -1, 231, 232, 233, -1, 235,
6354 -1, 1057, -1, -1, -1, 52, 53, -1, -1, 56,
6355 -1, -1, -1, -1, 1285, -1, -1, -1, -1, 255,
6356 -1, 257, -1, -1, -1, -1, -1, -1, -1, 76,
6357 77, 78, 79, 80, 81, 82, 83, 84, -1, -1,
6358 87, 88, -1, -1, -1, -1, 93, 94, 95, 96,
6359 -1, -1, -1, -1, 1325, -1, -1, -1, -1, -1,
6360 107, 108, -1, -1, -1, -1, -1, -1, -1, -1,
6361 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6362 1136, -1, -1, 1139, 1140, -1, -1, -1, -1, 1145,
6363 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
6364 -1, 148, 149, 1159, -1, -1, 1162, -1, -1, 156,
6365 78, 79, 80, 81, 82, 83, 84, 85, 86, 87,
6366 88, 89, 90, -1, -1, -1, -1, 95, 96, -1,
6367 -1, -1, 368, 369, 370, 371, 372, -1, -1, 375,
6368 376, 377, 378, 379, 380, 381, 382, 1203, 384, -1,
6369 -1, 387, 388, 389, 390, 391, 392, 393, 394, 395,
6370 396, 1217, -1, -1, 400, -1, -1, 135, -1, 137,
6371 138, 139, 140, 141, 142, 143, 144, 145, 146, -1,
6372 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6373 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6374 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6375 -1, -1, -1, -1, -1, 451, -1, -1, -1, -1,
6376 -1, -1, -1, -1, -1, -1, -1, -1, -1, 1285,
6377 -1, -1, 468, 469, -1, -1, -1, 473, -1, -1,
6378 -1, 477, -1, 479, -1, 0, -1, -1, -1, -1,
6379 -1, -1, -1, 8, 9, 10, -1, -1, 13, 14,
6380 15, 497, 17, -1, -1, -1, -1, -1, -1, 1325,
6381 25, 26, 27, 28, 29, -1, 512, -1, -1, 515,
6382 -1, -1, 37, 38, -1, 40, 41, 42, 43, 44,
6383 -1, 527, -1, -1, -1, -1, -1, -1, -1, -1,
6384 -1, -1, -1, -1, -1, -1, -1, -1, -1, 545,
6385 -1, -1, -1, 68, 69, -1, -1, -1, -1, -1,
6386 -1, -1, -1, 78, 79, 80, 81, 82, 83, 84,
6387 85, 86, 87, 88, 89, 90, -1, -1, -1, -1,
6388 95, 96, 97, 98, -1, 100, 101, -1, -1, -1,
6389 -1, 106, -1, 589, -1, -1, -1, -1, -1, -1,
6390 -1, 597, -1, -1, 600, 120, -1, -1, 123, -1,
6391 -1, -1, -1, 609, -1, -1, -1, -1, 614, 134,
6392 135, 136, 137, 138, 139, 140, 141, 142, 143, 144,
6393 145, 146, -1, -1, -1, -1, 151, 152, 153, 154,
6394 155, -1, -1, 158, 159, 160, -1, -1, -1, -1,
6395 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6396 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6397 -1, -1, 668, -1, -1, -1, -1, -1, -1, -1,
6398 -1, -1, -1, 679, -1, -1, -1, -1, -1, -1,
6399 -1, -1, -1, -1, -1, -1, 692, 693, -1, -1,
6400 696, 697, -1, -1, -1, -1, -1, -1, -1, -1,
6401 -1, -1, 708, 709, -1, -1, 712, -1, 714, -1,
6402 -1, -1, -1, -1, -1, 721, 722, -1, -1, -1,
6403 726, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6404 -1, -1, -1, -1, -1, -1, 0, 1, -1, 3,
6405 4, 5, 6, 7, 8, 9, 10, 11, 12, -1,
6406 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
6407 24, 25, -1, -1, -1, 771, 30, 31, 32, 33,
6408 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
6409 -1, 45, 46, 47, 48, 49, 50, 51, 52, 53,
6410 54, 55, 56, 57, 800, 59, 60, 61, 62, 63,
6411 64, 65, -1, -1, 68, -1, -1, -1, -1, -1,
6412 -1, -1, 76, 77, -1, -1, -1, -1, -1, -1,
6413 -1, -1, -1, -1, -1, -1, 832, 91, 92, -1,
6414 -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
6415 104, 105, -1, 107, 850, -1, 110, 111, 112, 113,
6416 114, 115, 116, 117, 118, -1, 120, -1, -1, -1,
6417 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6418 -1, -1, -1, -1, 880, -1, -1, -1, -1, -1,
6419 -1, -1, -1, 147, 148, 149, -1, -1, 152, -1,
6420 33, 34, 35, 36, 158, -1, 160, -1, -1, -1,
6421 -1, -1, -1, -1, -1, -1, 49, 50, 51, 52,
6422 -1, -1, -1, 56, -1, 58, 59, 60, 61, 62,
6423 63, -1, 928, -1, -1, -1, -1, -1, -1, -1,
6424 -1, 937, -1, -1, -1, 78, -1, -1, -1, 945,
6425 -1, -1, -1, 949, 950, 951, -1, -1, 91, 92,
6426 956, 957, -1, -1, 960, -1, 99, -1, -1, 102,
6427 -1, 104, 105, -1, 107, 108, 972, 110, 111, 112,
6428 113, 114, 115, 116, 117, 118, -1, -1, -1, -1,
6429 -1, -1, -1, -1, 990, 991, -1, 993, 994, -1,
6430 996, -1, 998, -1, -1, -1, -1, 140, -1, -1,
6431 -1, -1, -1, -1, 147, -1, -1, -1, -1, -1,
6432 -1, 1017, 1018, -1, -1, 1021, -1, -1, -1, 1025,
6433 1026, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6434 -1, -1, -1, -1, 1040, -1, -1, -1, -1, -1,
6435 -1, 0, 1, -1, 3, 4, 5, 6, 7, -1,
6436 1056, -1, 11, 12, -1, -1, -1, 16, 1064, 18,
6437 19, 20, 21, 22, 23, 24, -1, -1, -1, -1,
6438 -1, 30, 31, 32, 33, 34, 35, 36, -1, -1,
6439 39, -1, -1, -1, -1, -1, 45, 46, 47, 48,
6440 49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
6441 59, 60, 61, 62, 63, 64, 65, -1, -1, -1,
6442 -1, -1, -1, -1, -1, -1, -1, 76, 77, -1,
6443 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6444 -1, -1, 91, 92, -1, 1141, -1, -1, -1, -1,
6445 99, -1, -1, 102, 103, 104, 105, -1, 107, -1,
6446 -1, 110, 111, 112, 113, 114, 115, 116, 117, 118,
6447 -1, 120, -1, -1, -1, -1, -1, -1, -1, -1,
6448 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6449 -1, -1, -1, -1, -1, -1, -1, -1, 147, 148,
6450 149, -1, -1, 0, 1, 154, 3, 4, 5, 6,
6451 7, 160, -1, -1, 11, 12, -1, -1, -1, 16,
6452 -1, 18, 19, 20, 21, 22, 23, 24, -1, -1,
6453 -1, -1, -1, 30, 31, 32, 33, 34, 35, 36,
6454 -1, -1, 39, -1, -1, -1, -1, -1, 45, 46,
6455 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
6456 57, -1, 59, 60, 61, 62, 63, 64, 65, -1,
6457 -1, -1, -1, -1, -1, -1, -1, 1273, -1, 76,
6458 77, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6459 -1, -1, -1, -1, 91, 92, -1, -1, -1, -1,
6460 -1, -1, 99, -1, -1, 102, 103, 104, 105, -1,
6461 107, -1, -1, 110, 111, 112, 113, 114, 115, 116,
6462 117, 118, -1, -1, -1, -1, -1, -1, -1, -1,
6463 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6464 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6465 147, 148, 149, -1, -1, 0, 1, 154, 3, 4,
6466 5, 6, 7, 160, -1, -1, 11, 12, -1, -1,
6467 -1, 16, -1, 18, 19, 20, 21, 22, 23, 24,
6468 -1, -1, -1, -1, -1, 30, 31, 32, 33, 34,
6469 35, 36, -1, -1, 39, -1, -1, -1, -1, -1,
6470 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
6471 55, 56, 57, -1, 59, 60, 61, 62, 63, 64,
6472 65, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6473 -1, 76, 77, -1, -1, -1, -1, -1, -1, -1,
6474 -1, -1, -1, -1, -1, -1, 91, 92, -1, -1,
6475 -1, -1, -1, -1, 99, -1, -1, 102, 103, 104,
6476 105, -1, 107, -1, -1, 110, 111, 112, 113, 114,
6477 115, 116, 117, 118, -1, -1, -1, -1, -1, -1,
6478 -1, 0, -1, -1, -1, -1, -1, -1, -1, 8,
6479 9, 10, -1, -1, 13, 14, 15, -1, 17, -1,
6480 -1, -1, 147, 148, 149, -1, 25, 152, 27, 28,
6481 29, -1, -1, -1, -1, 160, -1, -1, 37, 38,
6482 -1, 40, 41, 42, 43, 44, -1, -1, -1, 78,
6483 79, 80, 81, 82, 83, 84, 85, 86, 87, 88,
6484 89, 90, -1, -1, -1, -1, 95, 96, -1, 68,
6485 69, -1, -1, -1, -1, -1, -1, -1, -1, 78,
6486 79, 80, 81, 82, 83, 84, 85, 86, 87, 88,
6487 89, 90, -1, -1, -1, -1, 95, 96, 97, 98,
6488 -1, 100, 101, -1, -1, -1, -1, 106, 137, 138,
6489 139, 140, 141, 142, 143, 144, 145, 146, -1, -1,
6490 -1, 120, -1, -1, 123, -1, -1, -1, -1, -1,
6491 -1, -1, -1, -1, -1, 134, 135, 136, 137, 138,
6492 139, 140, 141, 142, 143, 144, 145, 146, -1, -1,
6493 -1, -1, -1, 152, 153, 154, 155, 0, -1, 158,
6494 159, 160, -1, -1, -1, 8, 9, 10, -1, -1,
6495 13, 14, 15, -1, 17, -1, -1, -1, -1, -1,
6496 -1, -1, 25, -1, 27, 28, 29, -1, -1, -1,
6497 -1, -1, -1, -1, 37, 38, -1, 40, 41, 42,
6498 43, 44, -1, -1, -1, -1, -1, -1, -1, -1,
6499 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6500 -1, -1, -1, -1, -1, 68, 69, -1, -1, -1,
6501 -1, -1, -1, -1, -1, 78, 79, 80, 81, 82,
6502 83, 84, 85, 86, 87, 88, 89, 90, -1, -1,
6503 -1, -1, 95, 96, 97, 98, -1, 100, 101, -1,
6504 -1, -1, -1, 106, -1, -1, -1, -1, -1, -1,
6505 -1, -1, -1, -1, -1, -1, -1, 120, -1, -1,
6506 123, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6507 -1, 134, 135, 136, 137, 138, 139, 140, 141, 142,
6508 143, 144, 145, 146, -1, -1, -1, -1, -1, 152,
6509 153, 154, 155, 0, -1, 158, 159, 160, -1, -1,
6510 -1, 8, 9, 10, -1, -1, 13, 14, 15, -1,
6511 17, -1, -1, -1, -1, -1, -1, -1, 25, 26,
6512 27, 28, 29, -1, -1, -1, -1, -1, -1, -1,
6513 37, 38, -1, 40, 41, 42, 43, 44, -1, -1,
6514 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6515 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6516 -1, 68, 69, -1, -1, -1, -1, -1, -1, -1,
6517 -1, 78, 79, 80, 81, 82, 83, 84, 85, 86,
6518 87, 88, 89, 90, -1, -1, -1, -1, 95, 96,
6519 97, 98, -1, -1, 101, -1, -1, -1, -1, 106,
6520 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6521 -1, -1, -1, 120, -1, -1, 123, -1, -1, -1,
6522 -1, -1, -1, -1, -1, -1, -1, -1, 135, 136,
6523 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
6524 -1, -1, -1, -1, 151, 152, 153, 154, 155, 0,
6525 -1, 158, 159, 160, -1, -1, -1, 8, 9, 10,
6526 -1, -1, 13, 14, 15, -1, 17, -1, -1, -1,
6527 -1, -1, -1, -1, 25, 26, 27, 28, 29, -1,
6528 -1, -1, -1, -1, -1, -1, 37, 38, -1, 40,
6529 41, 42, 43, 44, -1, -1, -1, -1, -1, -1,
6530 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6531 -1, -1, -1, -1, -1, -1, -1, 68, 69, -1,
6532 -1, -1, -1, -1, -1, -1, -1, 78, 79, 80,
6533 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,
6534 -1, -1, -1, -1, 95, 96, 97, 98, -1, -1,
6535 101, -1, -1, -1, -1, 106, -1, -1, -1, -1,
6536 -1, -1, -1, -1, -1, -1, -1, -1, -1, 120,
6537 -1, -1, 123, -1, -1, -1, -1, -1, -1, -1,
6538 -1, -1, -1, -1, 135, 136, 137, 138, 139, 140,
6539 141, 142, 143, 144, 145, 146, -1, -1, -1, -1,
6540 151, 152, 153, 154, 155, 0, -1, 158, 159, 160,
6541 -1, -1, -1, 8, 9, 10, -1, -1, 13, 14,
6542 15, -1, 17, -1, -1, -1, -1, -1, -1, -1,
6543 25, 26, 27, 28, -1, -1, -1, -1, -1, -1,
6544 -1, -1, 37, 38, -1, 40, 41, 42, 43, 44,
6545 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6546 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6547 -1, -1, -1, 68, 69, -1, -1, -1, -1, -1,
6548 -1, -1, -1, 78, 79, 80, 81, 82, 83, 84,
6549 85, 86, 87, 88, 89, 90, -1, -1, -1, -1,
6550 95, 96, 97, 98, -1, -1, 101, -1, -1, -1,
6551 -1, 106, -1, -1, -1, -1, -1, -1, -1, -1,
6552 -1, -1, -1, -1, -1, 120, -1, -1, -1, -1,
6553 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6554 135, -1, 137, 138, 139, 140, 141, 142, 143, 144,
6555 145, 146, -1, -1, -1, -1, 151, 152, 153, 154,
6556 155, 0, 157, 158, 159, 160, -1, -1, -1, 8,
6557 9, 10, -1, -1, 13, 14, 15, -1, 17, -1,
6558 -1, -1, -1, -1, -1, -1, 25, -1, 27, 28,
6559 29, -1, -1, -1, -1, -1, -1, -1, 37, 38,
6560 -1, 40, 41, 42, 43, 44, -1, -1, -1, -1,
6561 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6562 -1, -1, -1, -1, -1, -1, -1, -1, -1, 68,
6563 69, -1, -1, -1, -1, -1, -1, -1, -1, 78,
6564 79, 80, 81, 82, 83, 84, 85, 86, 87, 88,
6565 89, 90, -1, -1, -1, -1, 95, 96, 97, 98,
6566 -1, -1, 101, -1, -1, -1, -1, 106, -1, -1,
6567 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6568 -1, 120, -1, -1, 123, -1, -1, -1, -1, -1,
6569 -1, -1, -1, -1, -1, -1, 135, 136, 137, 138,
6570 139, 140, 141, 142, 143, 144, 145, 146, -1, -1,
6571 -1, -1, -1, 152, 153, 154, 155, 0, -1, 158,
6572 159, 160, -1, -1, -1, 8, 9, 10, -1, -1,
6573 13, 14, 15, -1, 17, -1, -1, -1, -1, -1,
6574 -1, -1, 25, 26, 27, 28, -1, -1, -1, -1,
6575 -1, -1, -1, -1, 37, 38, -1, 40, 41, 42,
6576 43, 44, -1, -1, -1, -1, -1, -1, -1, -1,
6577 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6578 -1, -1, -1, -1, -1, 68, 69, -1, -1, -1,
6579 -1, -1, -1, -1, -1, 78, 79, 80, 81, 82,
6580 83, 84, 85, 86, 87, 88, 89, 90, -1, -1,
6581 -1, -1, 95, 96, 97, 98, -1, -1, 101, -1,
6582 -1, -1, -1, 106, -1, -1, -1, -1, -1, -1,
6583 -1, -1, -1, -1, -1, -1, -1, 120, -1, -1,
6584 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6585 -1, -1, 135, -1, 137, 138, 139, 140, 141, 142,
6586 143, 144, 145, 146, -1, -1, -1, -1, 151, 152,
6587 153, 154, 155, 0, 157, 158, 159, 160, -1, -1,
6588 -1, 8, 9, 10, -1, -1, 13, 14, 15, -1,
6589 17, -1, -1, -1, -1, -1, -1, -1, 25, -1,
6590 27, 28, -1, -1, -1, -1, -1, -1, -1, -1,
6591 37, 38, -1, 40, 41, 42, 43, 44, -1, -1,
6592 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6593 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6594 -1, 68, 69, -1, -1, -1, -1, -1, -1, -1,
6595 -1, 78, 79, 80, 81, 82, 83, 84, 85, 86,
6596 87, 88, 89, 90, -1, -1, -1, -1, 95, 96,
6597 97, 98, -1, 100, 101, -1, -1, -1, -1, 106,
6598 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6599 -1, -1, -1, 120, -1, -1, -1, -1, -1, -1,
6600 -1, -1, -1, -1, -1, -1, -1, 134, 135, -1,
6601 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
6602 -1, -1, -1, -1, 151, 152, 153, 154, 155, 0,
6603 -1, 158, 159, 160, -1, -1, -1, 8, 9, 10,
6604 -1, -1, 13, 14, 15, -1, 17, -1, -1, -1,
6605 -1, -1, -1, -1, 25, -1, 27, 28, -1, -1,
6606 -1, -1, -1, -1, -1, -1, 37, 38, -1, 40,
6607 41, 42, 43, 44, -1, -1, -1, -1, -1, -1,
6608 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6609 -1, -1, -1, -1, -1, -1, -1, 68, 69, -1,
6610 -1, -1, -1, -1, -1, -1, -1, 78, 79, 80,
6611 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,
6612 -1, -1, -1, -1, 95, 96, 97, 98, -1, -1,
6613 101, -1, -1, -1, -1, 106, -1, -1, -1, -1,
6614 -1, -1, -1, -1, -1, -1, -1, -1, -1, 120,
6615 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6616 -1, -1, -1, -1, 135, -1, 137, 138, 139, 140,
6617 141, 142, 143, 144, 145, 146, -1, -1, -1, -1,
6618 -1, 152, 153, 154, 155, 0, 157, 158, 159, 160,
6619 -1, -1, -1, 8, 9, 10, -1, -1, -1, 14,
6620 15, -1, 17, -1, -1, -1, -1, -1, -1, -1,
6621 25, 26, -1, -1, -1, -1, -1, -1, -1, -1,
6622 -1, -1, 37, 38, -1, 40, 41, 42, 43, 44,
6623 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6624 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6625 -1, -1, -1, 68, 69, -1, -1, -1, -1, -1,
6626 -1, -1, -1, 78, 79, 80, 81, 82, 83, 84,
6627 85, 86, 87, 88, 89, 90, -1, -1, -1, -1,
6628 95, 96, 97, 98, -1, 100, 101, -1, -1, -1,
6629 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6630 -1, -1, -1, -1, -1, 120, -1, -1, -1, -1,
6631 -1, -1, -1, -1, -1, -1, -1, -1, -1, 134,
6632 135, -1, 137, 138, 139, 140, 141, 142, 143, 144,
6633 145, 146, -1, -1, -1, -1, 151, 152, 153, 154,
6634 155, 0, -1, 158, -1, 160, -1, -1, -1, 8,
6635 9, 10, -1, -1, -1, 14, 15, -1, 17, -1,
6636 -1, -1, -1, -1, -1, -1, 25, 26, -1, -1,
6637 -1, -1, -1, -1, -1, -1, -1, -1, 37, 38,
6638 -1, 40, 41, 42, 43, 44, -1, -1, -1, -1,
6639 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6640 -1, -1, -1, -1, -1, -1, -1, -1, -1, 68,
6641 69, -1, -1, -1, -1, -1, -1, -1, -1, 78,
6642 79, 80, 81, 82, 83, 84, 85, 86, 87, 88,
6643 89, 90, -1, -1, -1, -1, 95, 96, 97, 98,
6644 -1, 100, 101, -1, -1, -1, -1, -1, -1, -1,
6645 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6646 -1, 120, -1, -1, -1, -1, -1, -1, -1, -1,
6647 -1, -1, -1, -1, -1, 134, 135, -1, 137, 138,
6648 139, 140, 141, 142, 143, 144, 145, 146, -1, -1,
6649 -1, -1, 151, 152, 153, 154, 155, 0, -1, 158,
6650 -1, 160, -1, -1, -1, 8, 9, 10, -1, -1,
6651 -1, 14, 15, -1, 17, -1, -1, -1, -1, -1,
6652 -1, -1, 25, -1, -1, -1, -1, -1, -1, -1,
6653 -1, -1, -1, -1, 37, 38, -1, 40, 41, 42,
6654 43, 44, -1, -1, -1, -1, -1, -1, -1, -1,
6655 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6656 -1, -1, -1, -1, -1, 68, 69, -1, -1, -1,
6657 -1, -1, -1, -1, -1, 78, 79, 80, 81, 82,
6658 83, 84, 85, 86, 87, 88, 89, 90, -1, -1,
6659 -1, -1, 95, 96, 97, 98, -1, 100, 101, -1,
6660 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6661 -1, -1, -1, -1, -1, -1, -1, 120, -1, -1,
6662 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6663 -1, 134, 135, -1, 137, 138, 139, 140, 141, 142,
6664 143, 144, 145, 146, -1, -1, -1, -1, 151, 152,
6665 153, 154, 155, 0, -1, 158, -1, 160, -1, -1,
6666 -1, 8, 9, 10, -1, -1, -1, 14, 15, -1,
6667 17, -1, -1, -1, -1, -1, -1, -1, 25, -1,
6668 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6669 37, 38, -1, 40, 41, 42, 43, 44, -1, -1,
6670 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6671 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6672 -1, 68, 69, -1, -1, -1, -1, -1, -1, -1,
6673 -1, 78, 79, 80, 81, 82, 83, 84, 85, 86,
6674 87, 88, 89, 90, -1, -1, -1, -1, 95, 96,
6675 97, 98, -1, 100, 101, -1, -1, -1, -1, -1,
6676 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6677 -1, -1, -1, 120, -1, -1, -1, -1, -1, -1,
6678 -1, -1, -1, -1, -1, -1, -1, 134, 135, -1,
6679 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
6680 -1, -1, -1, -1, 151, 152, 153, 154, 155, -1,
6681 -1, 158, 1, 160, 3, 4, 5, 6, 7, 8,
6682 9, 10, 11, 12, -1, -1, 15, 16, -1, 18,
6683 19, 20, 21, 22, 23, 24, -1, -1, -1, -1,
6684 -1, 30, 31, 32, 33, 34, 35, 36, -1, -1,
6685 39, -1, -1, -1, -1, -1, 45, 46, 47, 48,
6686 49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
6687 59, 60, 61, 62, 63, 64, 65, -1, -1, 68,
6688 -1, -1, -1, -1, -1, -1, -1, 76, 77, -1,
6689 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6690 -1, -1, 91, 92, -1, -1, -1, -1, -1, -1,
6691 99, -1, -1, 102, 103, 104, 105, -1, 107, -1,
6692 -1, 110, 111, 112, 113, 114, 115, 116, 117, 118,
6693 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6694 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6695 -1, -1, -1, -1, -1, -1, -1, -1, 147, 148,
6696 149, -1, -1, -1, 1, 154, 3, 4, 5, 6,
6697 7, 160, -1, 10, 11, 12, -1, 14, 15, 16,
6698 -1, 18, 19, 20, 21, 22, 23, 24, -1, -1,
6699 -1, -1, -1, 30, 31, 32, 33, 34, 35, 36,
6700 -1, -1, 39, -1, -1, -1, -1, -1, 45, 46,
6701 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
6702 57, -1, 59, 60, 61, 62, 63, 64, 65, -1,
6703 -1, 68, -1, -1, -1, -1, -1, -1, -1, 76,
6704 77, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6705 -1, -1, -1, -1, 91, 92, -1, -1, -1, -1,
6706 -1, -1, 99, -1, -1, 102, 103, 104, 105, -1,
6707 107, -1, -1, 110, 111, 112, 113, 114, 115, 116,
6708 117, 118, -1, -1, -1, -1, -1, -1, -1, -1,
6709 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6710 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6711 147, 148, 149, -1, -1, -1, 1, 154, 3, 4,
6712 5, 6, 7, 160, -1, 10, 11, 12, -1, -1,
6713 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
6714 -1, -1, -1, -1, -1, 30, 31, 32, 33, 34,
6715 35, 36, -1, -1, 39, -1, -1, -1, -1, -1,
6716 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
6717 55, 56, 57, -1, 59, 60, 61, 62, 63, 64,
6718 65, -1, -1, 68, -1, -1, -1, -1, -1, -1,
6719 -1, 76, 77, -1, -1, -1, -1, -1, -1, -1,
6720 -1, -1, -1, -1, -1, -1, 91, 92, -1, -1,
6721 -1, -1, -1, -1, 99, -1, -1, 102, 103, 104,
6722 105, -1, 107, -1, -1, 110, 111, 112, 113, 114,
6723 115, 116, 117, 118, -1, -1, -1, -1, -1, -1,
6724 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6725 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6726 -1, -1, 147, 148, 149, -1, -1, -1, 1, 154,
6727 3, 4, 5, 6, 7, 160, -1, 10, 11, 12,
6728 -1, -1, 15, 16, -1, 18, 19, 20, 21, 22,
6729 23, 24, 25, -1, -1, -1, -1, 30, 31, 32,
6730 33, 34, 35, 36, -1, -1, 39, -1, -1, -1,
6731 -1, -1, 45, 46, 47, 48, 49, 50, 51, 52,
6732 53, 54, 55, 56, 57, -1, 59, 60, 61, 62,
6733 63, 64, 65, -1, -1, 68, -1, -1, -1, -1,
6734 -1, -1, -1, 76, 77, -1, -1, -1, -1, -1,
6735 -1, -1, -1, -1, -1, -1, -1, -1, 91, 92,
6736 -1, -1, -1, -1, -1, -1, 99, -1, -1, 102,
6737 103, 104, 105, -1, 107, -1, -1, 110, 111, 112,
6738 113, 114, 115, 116, 117, 118, -1, -1, -1, -1,
6739 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6740 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6741 -1, -1, -1, -1, 147, 148, 149, -1, -1, -1,
6742 1, 154, 3, 4, 5, 6, 7, 160, -1, 10,
6743 11, 12, -1, -1, 15, 16, -1, 18, 19, 20,
6744 21, 22, 23, 24, -1, -1, -1, -1, -1, 30,
6745 31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
6746 -1, -1, -1, -1, 45, 46, 47, 48, 49, 50,
6747 51, 52, 53, 54, 55, 56, 57, -1, 59, 60,
6748 61, 62, 63, 64, 65, -1, -1, 68, -1, -1,
6749 -1, -1, -1, -1, -1, 76, 77, -1, -1, -1,
6750 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6751 91, 92, -1, -1, -1, -1, -1, -1, 99, -1,
6752 -1, 102, 103, 104, 105, -1, 107, -1, -1, 110,
6753 111, 112, 113, 114, 115, 116, 117, 118, -1, -1,
6754 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6755 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6756 -1, -1, -1, -1, -1, -1, 147, 148, 149, -1,
6757 -1, -1, 1, 154, 3, 4, 5, 6, 7, 160,
6758 9, 10, 11, 12, -1, -1, -1, 16, -1, 18,
6759 19, 20, 21, 22, 23, 24, -1, -1, -1, -1,
6760 -1, 30, 31, 32, 33, 34, 35, 36, -1, -1,
6761 39, -1, -1, -1, -1, -1, 45, 46, 47, 48,
6762 49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
6763 59, 60, 61, 62, 63, 64, 65, -1, -1, 68,
6764 -1, -1, -1, -1, -1, -1, -1, 76, 77, -1,
6765 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6766 -1, -1, 91, 92, -1, -1, -1, -1, -1, -1,
6767 99, -1, -1, 102, 103, 104, 105, -1, 107, -1,
6768 -1, 110, 111, 112, 113, 114, 115, 116, 117, 118,
6769 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6770 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6771 -1, -1, -1, -1, -1, -1, -1, -1, 147, 148,
6772 149, -1, -1, -1, 1, 154, 3, 4, 5, 6,
6773 7, 160, -1, 10, 11, 12, -1, -1, -1, 16,
6774 -1, 18, 19, 20, 21, 22, 23, 24, -1, -1,
6775 -1, -1, -1, 30, 31, 32, 33, 34, 35, 36,
6776 -1, -1, 39, -1, -1, -1, -1, -1, 45, 46,
6777 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
6778 57, -1, 59, 60, 61, 62, 63, 64, 65, -1,
6779 -1, 68, -1, -1, -1, -1, -1, -1, -1, 76,
6780 77, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6781 -1, -1, -1, -1, 91, 92, -1, -1, -1, -1,
6782 -1, -1, 99, -1, -1, 102, 103, 104, 105, -1,
6783 107, -1, -1, 110, 111, 112, 113, 114, 115, 116,
6784 117, 118, -1, -1, -1, -1, -1, -1, -1, -1,
6785 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6786 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6787 147, 148, 149, -1, -1, -1, 1, 154, 3, 4,
6788 5, 6, 7, 160, -1, -1, 11, 12, -1, -1,
6789 -1, 16, -1, 18, 19, 20, 21, 22, 23, 24,
6790 -1, -1, -1, -1, -1, 30, 31, 32, 33, 34,
6791 35, 36, -1, -1, 39, -1, -1, -1, -1, -1,
6792 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
6793 55, 56, 57, -1, 59, 60, 61, 62, 63, 64,
6794 65, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6795 -1, 76, 77, -1, -1, -1, -1, -1, -1, -1,
6796 -1, -1, -1, -1, -1, -1, 91, 92, -1, -1,
6797 -1, -1, -1, -1, 99, -1, -1, 102, 103, 104,
6798 105, -1, 107, -1, -1, 110, 111, 112, 113, 114,
6799 115, 116, 117, 118, -1, -1, -1, -1, -1, -1,
6800 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6801 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6802 -1, -1, 147, 148, 149, -1, -1, -1, -1, 154,
6803 -1, -1, -1, 158, 1, 160, 3, 4, 5, 6,
6804 7, -1, -1, -1, 11, 12, -1, -1, -1, 16,
6805 -1, 18, 19, 20, 21, 22, 23, 24, -1, -1,
6806 -1, -1, -1, 30, 31, 32, 33, 34, 35, 36,
6807 -1, -1, 39, -1, -1, -1, -1, -1, 45, 46,
6808 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
6809 57, -1, 59, 60, 61, 62, 63, 64, 65, -1,
6810 -1, -1, -1, -1, -1, -1, -1, -1, -1, 76,
6811 77, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6812 -1, -1, -1, -1, 91, 92, -1, -1, -1, -1,
6813 -1, -1, 99, -1, -1, 102, 103, 104, 105, -1,
6814 107, -1, -1, 110, 111, 112, 113, 114, 115, 116,
6815 117, 118, -1, -1, -1, -1, -1, -1, -1, -1,
6816 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6817 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6818 147, 148, 149, -1, -1, -1, -1, 154, -1, -1,
6819 -1, 158, 1, 160, 3, 4, 5, 6, 7, -1,
6820 -1, -1, 11, 12, -1, -1, -1, 16, -1, 18,
6821 19, 20, 21, 22, 23, 24, -1, -1, -1, -1,
6822 -1, 30, 31, 32, 33, 34, 35, 36, -1, -1,
6823 39, -1, -1, -1, -1, -1, 45, 46, 47, 48,
6824 49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
6825 59, 60, 61, 62, 63, 64, 65, -1, -1, -1,
6826 -1, -1, -1, -1, -1, -1, -1, 76, 77, -1,
6827 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6828 -1, -1, 91, 92, -1, -1, -1, -1, -1, -1,
6829 99, -1, -1, 102, 103, 104, 105, -1, 107, -1,
6830 -1, 110, 111, 112, 113, 114, 115, 116, 117, 118,
6831 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6832 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6833 -1, -1, -1, -1, -1, -1, -1, -1, 147, 148,
6834 149, -1, -1, 152, 1, 154, 3, 4, 5, 6,
6835 7, 160, -1, -1, 11, 12, -1, -1, -1, 16,
6836 -1, 18, 19, 20, 21, 22, 23, 24, -1, -1,
6837 -1, -1, -1, 30, 31, 32, 33, 34, 35, 36,
6838 -1, -1, 39, -1, -1, -1, -1, -1, 45, 46,
6839 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
6840 57, -1, 59, 60, 61, 62, 63, 64, 65, -1,
6841 -1, -1, -1, -1, -1, -1, -1, -1, -1, 76,
6842 77, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6843 -1, -1, -1, -1, 91, 92, -1, -1, -1, -1,
6844 -1, -1, 99, -1, -1, 102, 103, 104, 105, -1,
6845 107, -1, -1, 110, 111, 112, 113, 114, 115, 116,
6846 117, 118, -1, -1, -1, -1, -1, -1, -1, -1,
6847 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6848 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6849 147, 148, 149, -1, -1, 152, 1, 154, 3, 4,
6850 5, -1, 7, 160, -1, -1, 11, 12, -1, -1,
6851 -1, 16, 17, 18, 19, 20, 21, 22, 23, 24,
6852 -1, -1, -1, -1, -1, 30, 31, 32, 33, 34,
6853 35, 36, -1, -1, 39, -1, -1, -1, -1, -1,
6854 -1, 46, -1, -1, 49, 50, 51, 52, 53, 54,
6855 55, 56, 57, -1, 59, 60, 61, 62, 63, 64,
6856 65, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6857 -1, 76, 77, -1, -1, -1, -1, -1, -1, -1,
6858 -1, -1, -1, -1, -1, -1, 91, 92, -1, -1,
6859 -1, -1, -1, -1, 99, -1, -1, 102, 103, 104,
6860 105, -1, -1, -1, -1, 110, 111, 112, 113, 114,
6861 115, 116, 117, 118, -1, -1, -1, -1, -1, -1,
6862 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6863 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6864 -1, -1, 147, 148, 149, -1, -1, -1, -1, 154,
6865 -1, -1, -1, -1, -1, 160, 3, 4, 5, 6,
6866 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
6867 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
6868 -1, -1, -1, 30, 31, 32, 33, 34, 35, 36,
6869 37, 38, 39, -1, -1, -1, -1, -1, 45, 46,
6870 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
6871 57, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6872 -1, -1, -1, -1, -1, -1, -1, -1, -1, 76,
6873 77, 78, 79, 80, 81, 82, 83, 84, -1, -1,
6874 87, 88, -1, -1, -1, -1, 93, 94, 95, 96,
6875 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6876 107, 108, -1, -1, -1, -1, -1, -1, -1, -1,
6877 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6878 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6879 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
6880 -1, 148, 149, -1, -1, -1, -1, -1, -1, 156,
6881 157, 3, 4, 5, 6, 7, 8, 9, 10, 11,
6882 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
6883 22, 23, 24, 25, 26, -1, -1, -1, 30, 31,
6884 32, 33, 34, 35, 36, 37, 38, 39, -1, -1,
6885 -1, -1, -1, 45, 46, 47, 48, 49, 50, 51,
6886 52, 53, 54, 55, 56, 57, -1, -1, -1, -1,
6887 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6888 -1, -1, -1, -1, 76, 77, 78, 79, 80, 81,
6889 82, 83, 84, -1, -1, 87, 88, -1, -1, -1,
6890 -1, 93, 94, 95, 96, -1, -1, -1, -1, -1,
6891 -1, -1, -1, -1, -1, 107, 108, -1, -1, -1,
6892 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6893 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6894 -1, -1, -1, -1, -1, 137, 138, 139, 140, 141,
6895 142, 143, 144, 145, 146, -1, 148, 149, -1, -1,
6896 -1, -1, -1, -1, 156, 3, 4, 5, 6, 7,
6897 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
6898 18, 19, 20, 21, 22, 23, 24, 25, 26, -1,
6899 -1, -1, 30, 31, 32, 33, 34, 35, 36, 37,
6900 38, 39, -1, -1, -1, -1, -1, 45, 46, 47,
6901 48, 49, 50, 51, 52, 53, 54, -1, 56, -1,
6902 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6903 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
6904 78, 79, 80, 81, 82, 83, 84, -1, -1, 87,
6905 88, -1, -1, -1, -1, 93, 94, 95, 96, -1,
6906 -1, -1, -1, -1, -1, -1, -1, -1, -1, 107,
6907 108, -1, -1, 111, -1, -1, -1, -1, -1, -1,
6908 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6909 -1, -1, -1, -1, -1, -1, -1, -1, -1, 137,
6910 138, 139, 140, 141, 142, 143, 144, 145, 146, -1,
6911 148, 149, -1, -1, -1, -1, -1, -1, 156, 3,
6912 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
6913 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
6914 24, 25, 26, -1, -1, -1, 30, 31, 32, 33,
6915 34, 35, 36, 37, 38, 39, -1, -1, -1, -1,
6916 -1, 45, 46, 47, 48, 49, 50, 51, 52, 53,
6917 -1, -1, 56, -1, -1, -1, -1, -1, -1, -1,
6918 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6919 -1, -1, 76, 77, 78, 79, 80, 81, 82, 83,
6920 84, -1, -1, 87, 88, -1, -1, -1, -1, 93,
6921 94, 95, 96, -1, -1, -1, -1, -1, -1, -1,
6922 -1, -1, -1, 107, 108, -1, -1, 111, -1, -1,
6923 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6924 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6925 -1, -1, -1, 137, 138, 139, 140, 141, 142, 143,
6926 144, 145, 146, -1, 148, 149, -1, -1, -1, -1,
6927 -1, -1, 156, 3, 4, 5, 6, 7, 8, 9,
6928 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
6929 20, 21, 22, 23, 24, 25, 26, -1, -1, -1,
6930 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
6931 -1, -1, -1, -1, -1, 45, 46, 47, 48, 49,
6932 50, 51, 52, 53, -1, -1, 56, -1, -1, -1,
6933 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6934 -1, -1, -1, -1, -1, -1, 76, 77, 78, 79,
6935 80, 81, 82, 83, 84, -1, -1, 87, 88, -1,
6936 -1, -1, -1, 93, 94, 95, 96, -1, -1, -1,
6937 -1, -1, -1, -1, -1, -1, -1, 107, 108, -1,
6938 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6939 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6940 -1, -1, -1, -1, -1, -1, -1, 137, 138, 139,
6941 140, 141, 142, 143, 144, 145, 146, -1, 148, 149,
6942 3, 4, 5, -1, 7, -1, 156, -1, 11, 12,
6943 -1, -1, -1, 16, -1, 18, 19, 20, 21, 22,
6944 23, 24, -1, -1, -1, -1, -1, 30, 31, 32,
6945 33, 34, 35, 36, -1, -1, 39, -1, -1, -1,
6946 -1, -1, -1, 46, -1, -1, 49, 50, 51, 52,
6947 53, 54, 55, 56, 57, -1, 59, 60, 61, 62,
6948 63, 64, 65, -1, -1, -1, -1, -1, -1, -1,
6949 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6950 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6951 -1, -1, -1, -1, -1, -1, 99, -1, -1, 102,
6952 103, 104, 105, -1, -1, -1, -1, 110, 111, 112,
6953 113, 114, 115, 116, 117, 118, -1, -1, 3, 4,
6954 5, -1, 7, -1, -1, -1, 11, 12, -1, -1,
6955 -1, 16, -1, 18, 19, 20, 21, 22, 23, 24,
6956 -1, -1, -1, -1, 147, 30, 31, 32, 33, 34,
6957 35, 36, 155, -1, 39, -1, -1, -1, -1, -1,
6958 -1, 46, -1, -1, 49, 50, 51, 52, 53, 54,
6959 55, 56, 57, -1, 59, 60, 61, 62, 63, 64,
6960 65, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6961 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6962 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6963 -1, -1, -1, -1, 99, -1, -1, 102, 103, 104,
6964 105, -1, -1, -1, -1, 110, 111, 112, 113, 114,
6965 115, 116, 117, 118, -1, -1, 3, 4, 5, -1,
6966 7, -1, -1, -1, 11, 12, -1, -1, -1, 16,
6967 -1, 18, 19, 20, 21, 22, 23, 24, -1, -1,
6968 -1, -1, 147, 30, 31, 32, 33, 34, 35, 36,
6969 155, -1, 39, -1, -1, -1, -1, -1, -1, 46,
6970 -1, -1, 49, 50, 51, 52, 53, 54, 55, 56,
6971 57, 58, 59, 60, 61, 62, 63, 64, 65, -1,
6972 -1, -1, -1, -1, -1, -1, -1, -1, -1, 76,
6973 77, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6974 -1, -1, -1, -1, 91, 92, -1, -1, -1, -1,
6975 -1, -1, 99, -1, -1, 102, 103, 104, 105, -1,
6976 107, 108, 109, 110, 111, 112, 113, 114, 115, 116,
6977 117, 118, -1, -1, -1, -1, -1, -1, -1, -1,
6978 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6979 -1, -1, -1, -1, -1, 3, 4, 5, -1, 7,
6980 147, 148, 149, 11, 12, -1, -1, 154, 16, -1,
6981 18, 19, 20, 21, 22, 23, 24, -1, -1, -1,
6982 -1, -1, 30, 31, 32, 33, 34, 35, 36, -1,
6983 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
6984 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
6985 -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
6986 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
6987 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6988 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
6989 -1, 99, -1, -1, 102, 103, 104, 105, -1, -1,
6990 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
6991 118, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6992 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6993 -1, -1, 1, -1, 3, 4, 5, 6, 7, 147,
6994 148, 149, 11, 12, -1, -1, 154, 16, -1, 18,
6995 19, 20, 21, 22, 23, 24, -1, -1, -1, -1,
6996 -1, 30, 31, 32, 33, 34, 35, 36, -1, -1,
6997 39, -1, -1, -1, -1, -1, 45, 46, -1, 48,
6998 49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
6999 59, 60, 61, 62, 63, 64, 65, -1, -1, -1,
7000 -1, -1, -1, -1, -1, -1, -1, 76, 77, -1,
7001 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7002 -1, -1, 91, 92, -1, -1, -1, -1, -1, -1,
7003 99, -1, -1, 102, 103, 104, 105, -1, 107, -1,
7004 -1, 110, 111, 112, 113, 114, 115, 116, 117, 118,
7005 -1, -1, 1, -1, 3, 4, 5, -1, 7, -1,
7006 -1, -1, 11, 12, -1, -1, -1, 16, -1, 18,
7007 19, 20, 21, 22, 23, 24, -1, -1, 147, 148,
7008 149, 30, 31, 32, 33, 34, 35, 36, -1, -1,
7009 39, -1, -1, -1, -1, -1, -1, 46, -1, -1,
7010 49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
7011 59, 60, 61, 62, 63, 64, 65, -1, -1, -1,
7012 -1, -1, -1, -1, -1, -1, -1, 76, 77, -1,
7013 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7014 -1, -1, 91, 92, -1, -1, -1, -1, -1, -1,
7015 99, -1, -1, 102, 103, 104, 105, -1, -1, -1,
7016 -1, 110, 111, 112, 113, 114, 115, 116, 117, 118,
7017 -1, -1, -1, -1, 3, 4, 5, -1, 7, -1,
7018 -1, -1, 11, 12, -1, -1, -1, 16, -1, 18,
7019 19, 20, 21, 22, 23, 24, -1, -1, 147, 148,
7020 149, 30, 31, 32, 33, 34, 35, 36, -1, -1,
7021 39, -1, -1, -1, -1, -1, -1, 46, -1, -1,
7022 49, 50, 51, 52, 53, 54, 55, 56, 57, 58,
7023 59, 60, 61, 62, 63, 64, 65, -1, -1, -1,
7024 -1, -1, -1, -1, -1, -1, -1, 76, 77, -1,
7025 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7026 -1, -1, 91, 92, -1, -1, -1, -1, -1, -1,
7027 99, -1, -1, 102, 103, 104, 105, -1, 107, 108,
7028 109, 110, 111, 112, 113, 114, 115, 116, 117, 118,
7029 -1, -1, -1, -1, 3, 4, 5, -1, 7, -1,
7030 -1, -1, 11, 12, -1, -1, -1, 16, -1, 18,
7031 19, 20, 21, 22, 23, 24, -1, -1, 147, 148,
7032 149, 30, 31, 32, 33, 34, 35, 36, -1, -1,
7033 39, -1, -1, -1, -1, -1, -1, 46, -1, -1,
7034 49, 50, 51, 52, 53, 54, 55, 56, 57, 58,
7035 59, 60, 61, 62, 63, 64, 65, -1, -1, -1,
7036 -1, -1, -1, -1, -1, -1, -1, 76, 77, -1,
7037 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7038 -1, -1, 91, 92, -1, -1, -1, -1, -1, -1,
7039 99, -1, -1, 102, 103, 104, 105, -1, 107, 108,
7040 109, 110, 111, 112, 113, 114, 115, 116, 117, 118,
7041 -1, -1, -1, -1, 3, 4, 5, -1, 7, -1,
7042 -1, -1, 11, 12, -1, -1, -1, 16, -1, 18,
7043 19, 20, 21, 22, 23, 24, -1, -1, 147, 148,
7044 149, 30, 31, 32, 33, 34, 35, 36, -1, -1,
7045 39, -1, -1, -1, -1, -1, -1, 46, -1, -1,
7046 49, 50, 51, 52, 53, 54, 55, 56, 57, 58,
7047 59, 60, 61, 62, 63, 64, 65, -1, -1, -1,
7048 -1, -1, -1, -1, -1, -1, -1, 76, 77, -1,
7049 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7050 -1, -1, 91, 92, -1, -1, -1, -1, -1, -1,
7051 99, -1, -1, 102, 103, 104, 105, -1, 107, 108,
7052 109, 110, 111, 112, 113, 114, 115, 116, 117, 118,
7053 -1, -1, -1, -1, 3, 4, 5, -1, 7, -1,
7054 -1, -1, 11, 12, -1, -1, -1, 16, -1, 18,
7055 19, 20, 21, 22, 23, 24, -1, -1, 147, 148,
7056 149, 30, 31, 32, 33, 34, 35, 36, -1, -1,
7057 39, -1, -1, -1, -1, -1, -1, 46, -1, -1,
7058 49, 50, 51, 52, 53, 54, 55, 56, 57, 58,
7059 59, 60, 61, 62, 63, 64, 65, -1, -1, -1,
7060 -1, -1, -1, -1, -1, -1, -1, 76, 77, -1,
7061 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7062 -1, -1, 91, 92, -1, -1, -1, -1, -1, -1,
7063 99, -1, -1, 102, 103, 104, 105, -1, 107, 108,
7064 109, 110, 111, 112, 113, 114, 115, 116, 117, 118,
7065 -1, -1, -1, -1, 3, 4, 5, -1, 7, -1,
7066 -1, -1, 11, 12, -1, -1, -1, 16, -1, 18,
7067 19, 20, 21, 22, 23, 24, -1, -1, 147, 148,
7068 149, 30, 31, 32, 33, 34, 35, 36, -1, -1,
7069 39, -1, -1, -1, -1, -1, -1, 46, -1, -1,
7070 49, 50, 51, 52, 53, 54, 55, 56, 57, 58,
7071 59, 60, 61, 62, 63, 64, 65, -1, -1, -1,
7072 -1, -1, -1, -1, -1, -1, -1, 76, 77, -1,
7073 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7074 -1, -1, 91, 92, -1, -1, -1, -1, -1, -1,
7075 99, -1, -1, 102, 103, 104, 105, -1, 107, 108,
7076 -1, 110, 111, 112, 113, 114, 115, 116, 117, 118,
7077 -1, -1, -1, -1, 3, 4, 5, -1, 7, -1,
7078 -1, -1, 11, 12, -1, -1, -1, 16, -1, 18,
7079 19, 20, 21, 22, 23, 24, -1, -1, 147, 148,
7080 149, 30, 31, 32, 33, 34, 35, 36, -1, -1,
7081 39, -1, -1, -1, -1, -1, -1, 46, -1, -1,
7082 49, 50, 51, 52, 53, 54, 55, 56, 57, 58,
7083 59, 60, 61, 62, 63, 64, 65, -1, -1, -1,
7084 -1, -1, -1, -1, -1, -1, -1, 76, 77, -1,
7085 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7086 -1, -1, 91, 92, -1, -1, -1, -1, -1, -1,
7087 99, -1, -1, 102, 103, 104, 105, -1, -1, 108,
7088 109, 110, 111, 112, 113, 114, 115, 116, 117, 118,
7089 -1, -1, -1, -1, 3, 4, 5, -1, 7, -1,
7090 -1, -1, 11, 12, -1, -1, -1, 16, -1, 18,
7091 19, 20, 21, 22, 23, 24, -1, -1, 147, 148,
7092 149, 30, 31, 32, 33, 34, 35, 36, -1, -1,
7093 39, -1, -1, -1, -1, -1, -1, 46, -1, -1,
7094 49, 50, 51, 52, 53, 54, 55, 56, 57, 58,
7095 59, 60, 61, 62, 63, 64, 65, -1, -1, -1,
7096 -1, -1, -1, -1, -1, -1, -1, 76, 77, -1,
7097 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7098 -1, -1, 91, 92, -1, -1, -1, -1, -1, -1,
7099 99, -1, -1, 102, 103, 104, 105, -1, -1, 108,
7100 -1, 110, 111, 112, 113, 114, 115, 116, 117, 118,
7101 -1, -1, -1, -1, 3, 4, 5, -1, 7, -1,
7102 -1, -1, 11, 12, -1, -1, -1, 16, -1, 18,
7103 19, 20, 21, 22, 23, 24, -1, -1, 147, 148,
7104 149, 30, 31, 32, 33, 34, 35, 36, -1, -1,
7105 39, -1, -1, -1, -1, -1, -1, 46, -1, -1,
7106 49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
7107 59, 60, 61, 62, 63, 64, 65, -1, -1, -1,
7108 -1, -1, -1, -1, -1, -1, -1, 76, 77, -1,
7109 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7110 -1, -1, 91, 92, -1, -1, -1, -1, -1, -1,
7111 99, -1, -1, 102, 103, 104, 105, -1, 107, -1,
7112 -1, 110, 111, 112, 113, 114, 115, 116, 117, 118,
7113 -1, -1, -1, -1, 3, 4, 5, -1, 7, -1,
7114 -1, -1, 11, 12, -1, -1, -1, 16, -1, 18,
7115 19, 20, 21, 22, 23, 24, -1, -1, 147, 148,
7116 149, 30, 31, 32, 33, 34, 35, 36, -1, -1,
7117 39, -1, -1, -1, -1, -1, -1, 46, -1, -1,
7118 49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
7119 59, 60, 61, 62, 63, 64, 65, -1, -1, -1,
7120 -1, -1, -1, -1, -1, -1, -1, 76, 77, -1,
7121 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7122 -1, -1, 91, 92, -1, -1, -1, -1, -1, -1,
7123 99, -1, -1, 102, 103, 104, 105, -1, 107, -1,
7124 -1, 110, 111, 112, 113, 114, 115, 116, 117, 118,
7125 -1, -1, -1, -1, 3, 4, 5, -1, 7, -1,
7126 -1, -1, 11, 12, -1, -1, -1, 16, -1, 18,
7127 19, 20, 21, 22, 23, 24, -1, -1, 147, 148,
7128 149, 30, 31, 32, 33, 34, 35, 36, -1, -1,
7129 39, -1, -1, -1, -1, -1, -1, 46, -1, -1,
7130 49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
7131 59, 60, 61, 62, 63, 64, 65, -1, -1, -1,
7132 -1, -1, -1, -1, -1, -1, -1, 76, 77, -1,
7133 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7134 -1, -1, 91, 92, -1, -1, -1, -1, -1, -1,
7135 99, -1, -1, 102, 103, 104, 105, -1, 107, -1,
7136 -1, 110, 111, 112, 113, 114, 115, 116, 117, 118,
7137 -1, -1, -1, -1, 3, 4, 5, -1, 7, -1,
7138 -1, -1, 11, 12, -1, -1, -1, 16, -1, 18,
7139 19, 20, 21, 22, 23, 24, -1, -1, 147, 148,
7140 149, 30, 31, 32, 33, 34, 35, 36, -1, -1,
7141 39, -1, -1, -1, -1, -1, -1, 46, -1, -1,
7142 49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
7143 59, 60, 61, 62, 63, 64, 65, -1, -1, -1,
7144 -1, -1, -1, -1, -1, -1, -1, 76, 77, -1,
7145 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7146 -1, -1, 91, 92, -1, -1, -1, -1, -1, -1,
7147 99, -1, -1, 102, 103, 104, 105, -1, 107, -1,
7148 -1, 110, 111, 112, 113, 114, 115, 116, 117, 118,
7149 -1, -1, -1, -1, 3, 4, 5, -1, 7, -1,
7150 -1, -1, 11, 12, -1, -1, -1, 16, -1, 18,
7151 19, 20, 21, 22, 23, 24, -1, -1, 147, 148,
7152 149, 30, 31, 32, 33, 34, 35, 36, -1, -1,
7153 39, -1, -1, -1, -1, -1, -1, 46, -1, -1,
7154 49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
7155 59, 60, 61, 62, 63, 64, 65, -1, -1, -1,
7156 -1, -1, -1, -1, -1, -1, -1, 76, 77, -1,
7157 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7158 -1, -1, 91, 92, -1, -1, -1, -1, -1, -1,
7159 99, -1, -1, 102, 103, 104, 105, -1, 107, -1,
7160 -1, 110, 111, 112, 113, 114, 115, 116, 117, 118,
7161 -1, -1, -1, -1, 3, 4, 5, -1, 7, -1,
7162 -1, -1, 11, 12, -1, -1, -1, 16, -1, 18,
7163 19, 20, 21, 22, 23, 24, -1, -1, 147, 148,
7164 149, 30, 31, 32, 33, 34, 35, 36, -1, -1,
7165 39, -1, -1, -1, -1, -1, -1, 46, -1, -1,
7166 49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
7167 59, 60, 61, 62, 63, 64, 65, -1, -1, -1,
7168 -1, -1, -1, -1, -1, -1, -1, 76, 77, -1,
7169 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7170 -1, -1, 91, 92, -1, -1, -1, -1, -1, -1,
7171 99, -1, -1, 102, 103, 104, 105, -1, 107, -1,
7172 -1, 110, 111, 112, 113, 114, 115, 116, 117, 118,
7173 -1, -1, -1, -1, 3, 4, 5, -1, 7, -1,
7174 -1, -1, 11, 12, -1, -1, -1, 16, -1, 18,
7175 19, 20, 21, 22, 23, 24, -1, -1, 147, 148,
7176 149, 30, 31, 32, 33, 34, 35, 36, -1, -1,
7177 39, -1, -1, -1, -1, -1, -1, 46, -1, -1,
7178 49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
7179 59, 60, 61, 62, 63, 64, 65, -1, -1, -1,
7180 -1, -1, -1, -1, -1, -1, -1, 76, 77, -1,
7181 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7182 -1, -1, 91, 92, -1, -1, -1, -1, -1, -1,
7183 99, -1, -1, 102, 103, 104, 105, -1, -1, -1,
7184 -1, 110, 111, 112, 113, 114, 115, 116, 117, 118,
7185 -1, -1, -1, -1, 3, 4, 5, -1, 7, -1,
7186 -1, -1, 11, 12, -1, -1, -1, 16, -1, 18,
7187 19, 20, 21, 22, 23, 24, -1, -1, 147, 148,
7188 149, 30, 31, 32, 33, 34, 35, 36, -1, -1,
7189 39, -1, -1, -1, -1, -1, -1, 46, -1, -1,
7190 49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
7191 59, 60, 61, 62, 63, 64, 65, -1, -1, -1,
7192 -1, -1, -1, -1, -1, -1, -1, 76, 77, -1,
7193 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7194 -1, -1, 91, 92, -1, -1, -1, -1, -1, -1,
7195 99, -1, -1, 102, 103, 104, 105, -1, -1, -1,
7196 -1, 110, 111, 112, 113, 114, 115, 116, 117, 118,
7197 -1, -1, -1, -1, 3, 4, 5, -1, 7, -1,
7198 -1, -1, 11, 12, -1, -1, -1, 16, -1, 18,
7199 19, 20, 21, 22, 23, 24, -1, -1, 147, 148,
7200 149, 30, 31, 32, 33, 34, 35, 36, -1, -1,
7201 39, -1, -1, -1, -1, -1, -1, 46, -1, -1,
7202 49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
7203 59, 60, 61, 62, 63, 64, 65, -1, -1, -1,
7204 -1, -1, -1, -1, -1, -1, -1, 76, 77, -1,
7205 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7206 -1, -1, 91, 92, -1, -1, -1, -1, -1, -1,
7207 99, -1, -1, 102, 103, 104, 105, -1, -1, -1,
7208 -1, 110, 111, 112, 113, 114, 115, 116, 117, 118,
7209 -1, -1, -1, -1, 3, 4, 5, -1, 7, -1,
7210 -1, -1, 11, 12, -1, -1, -1, 16, -1, 18,
7211 19, 20, 21, 22, 23, 24, -1, -1, 147, 148,
7212 149, 30, 31, 32, 33, 34, 35, 36, -1, -1,
7213 39, -1, -1, -1, -1, -1, -1, 46, -1, -1,
7214 49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
7215 59, 60, 61, 62, 63, 64, 65, -1, -1, -1,
7216 -1, -1, -1, -1, -1, -1, -1, 76, 77, -1,
7217 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7218 -1, -1, 91, 92, -1, -1, -1, -1, -1, -1,
7219 99, -1, -1, 102, 103, 104, 105, -1, -1, -1,
7220 -1, 110, 111, 112, 113, 114, 115, 116, 117, 118,
7221 -1, -1, -1, -1, 3, 4, 5, -1, 7, -1,
7222 -1, -1, 11, 12, -1, -1, -1, 16, -1, 18,
7223 19, 20, 21, 22, 23, 24, -1, -1, 147, 148,
7224 149, 30, 31, 32, 33, 34, 35, 36, -1, -1,
7225 39, -1, -1, -1, -1, -1, -1, 46, -1, -1,
7226 49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
7227 59, 60, 61, 62, 63, 64, 65, -1, -1, -1,
7228 -1, -1, -1, -1, -1, -1, -1, 76, 77, -1,
7229 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7230 -1, -1, 91, 92, -1, -1, -1, -1, -1, -1,
7231 99, -1, -1, 102, 103, 104, 105, -1, -1, -1,
7232 -1, 110, 111, 112, 113, 114, 115, 116, 117, 118,
7233 -1, -1, -1, -1, 3, 4, 5, -1, 7, -1,
7234 -1, -1, 11, 12, -1, -1, -1, 16, -1, 18,
7235 19, 20, 21, 22, 23, 24, -1, -1, 147, 148,
7236 149, 30, 31, 32, 33, 34, 35, 36, -1, -1,
7237 39, -1, -1, -1, -1, -1, -1, 46, -1, -1,
7238 49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
7239 59, 60, 61, 62, 63, 64, 65, -1, -1, -1,
7240 -1, -1, -1, -1, -1, -1, -1, 76, 77, -1,
7241 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7242 -1, -1, 91, 92, -1, -1, -1, -1, -1, -1,
7243 99, -1, -1, 102, 103, 104, 105, -1, -1, -1,
7244 -1, 110, 111, 112, 113, 114, 115, 116, 117, 118,
7245 -1, -1, -1, -1, 3, 4, 5, -1, 7, -1,
7246 -1, -1, 11, 12, -1, -1, -1, 16, -1, 18,
7247 19, 20, 21, 22, 23, 24, -1, -1, 147, 148,
7248 149, 30, 31, 32, 33, 34, 35, 36, -1, -1,
7249 39, -1, -1, -1, -1, -1, -1, 46, -1, -1,
7250 49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
7251 59, 60, 61, 62, 63, 64, 65, -1, -1, -1,
7252 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7253 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7254 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7255 99, -1, -1, 102, 103, 104, 105, -1, 107, -1,
7256 -1, 110, 111, 112, 113, 114, 115, 116, 117, 118,
7257 -1, -1, 3, 4, 5, -1, 7, -1, -1, -1,
7258 11, 12, -1, -1, -1, 16, -1, 18, 19, 20,
7259 21, 22, 23, 24, -1, -1, -1, -1, 147, 30,
7260 31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
7261 -1, -1, -1, -1, -1, 46, -1, -1, 49, 50,
7262 51, 52, 53, 54, 55, 56, 57, -1, 59, 60,
7263 61, 62, 63, 64, 65, -1, -1, -1, -1, -1,
7264 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7265 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7266 -1, -1, -1, -1, -1, -1, -1, -1, 99, -1,
7267 -1, 102, 103, 104, 105, -1, 107, -1, -1, 110,
7268 111, 112, 113, 114, 115, 116, 117, 118, -1, -1,
7269 3, 4, 5, -1, 7, -1, -1, -1, 11, 12,
7270 -1, -1, -1, 16, -1, 18, 19, 20, 21, 22,
7271 23, 24, -1, -1, -1, -1, 147, 30, 31, 32,
7272 33, 34, 35, 36, -1, -1, 39, -1, -1, -1,
7273 -1, -1, -1, 46, -1, -1, 49, 50, 51, 52,
7274 53, 54, 55, 56, 57, -1, 59, 60, 61, 62,
7275 63, 64, 65, -1, -1, -1, -1, -1, -1, -1,
7276 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7277 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7278 -1, -1, 95, -1, -1, -1, 99, -1, -1, 102,
7279 103, 104, 105, -1, -1, -1, -1, 110, 111, 112,
7280 113, 114, 115, 116, 117, 118, -1, -1, 3, 4,
7281 5, -1, 7, -1, -1, -1, 11, 12, -1, -1,
7282 -1, 16, -1, 18, 19, 20, 21, 22, 23, 24,
7283 -1, -1, -1, -1, 147, 30, 31, 32, 33, 34,
7284 35, 36, -1, -1, 39, -1, -1, -1, -1, -1,
7285 -1, 46, -1, -1, 49, 50, 51, 52, 53, 54,
7286 55, 56, 57, -1, 59, 60, 61, 62, 63, 64,
7287 65, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7288 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7289 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7290 -1, -1, -1, -1, 99, -1, -1, 102, 103, 104,
7291 105, -1, -1, -1, -1, 110, 111, 112, 113, 114,
7292 115, 116, 117, 118, -1, -1, 3, 4, 5, -1,
7293 7, -1, -1, -1, 11, 12, -1, -1, -1, 16,
7294 -1, 18, 19, 20, 21, 22, 23, 24, -1, -1,
7295 -1, -1, 147, 30, 31, 32, 33, 34, 35, 36,
7296 -1, -1, 39, -1, -1, -1, -1, -1, -1, 46,
7297 -1, -1, 49, 50, 51, 52, 53, 54, 55, 56,
7298 57, -1, 59, 60, 61, 62, 63, 64, 65, -1,
7299 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7300 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7301 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7302 -1, -1, 99, -1, -1, 102, 103, 104, 105, -1,
7303 -1, -1, -1, 110, 111, 112, 113, 114, 115, 116,
7304 117, 118, -1, -1, 3, 4, 5, -1, 7, -1,
7305 -1, -1, 11, 12, -1, -1, -1, 16, -1, 18,
7306 19, 20, 21, 22, 23, 24, -1, -1, -1, -1,
7307 147, 30, 31, 32, 33, 34, 35, 36, -1, -1,
7308 39, -1, -1, -1, -1, -1, -1, 46, -1, -1,
7309 49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
7310 59, 60, 61, 62, 63, 64, 65, -1, -1, -1,
7311 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7312 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7313 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7314 99, -1, -1, 102, 103, 104, 105, -1, -1, -1,
7315 -1, 110, 111, 112, 113, 114, 115, 116, 117, 118,
7316 -1, -1, 3, 4, 5, -1, 7, -1, -1, -1,
7317 11, 12, -1, -1, -1, 16, -1, 18, 19, 20,
7318 21, 22, 23, 24, -1, -1, -1, -1, 147, 30,
7319 31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
7320 -1, -1, -1, -1, -1, 46, -1, -1, 49, 50,
7321 51, 52, 53, 54, 55, 56, 57, -1, 59, 60,
7322 61, 62, 63, 64, 65, -1, -1, -1, -1, -1,
7323 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7324 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7325 -1, -1, -1, -1, -1, 52, 53, -1, 99, 56,
7326 -1, 102, 103, 104, 105, -1, -1, -1, -1, 110,
7327 111, 112, 113, 114, 115, 116, 117, 118, -1, 76,
7328 77, 78, 79, 80, 81, 82, 83, 84, -1, -1,
7329 87, 88, -1, -1, -1, -1, 93, 94, 95, 96,
7330 -1, -1, -1, -1, -1, -1, 147, -1, -1, -1,
7331 107, 108, -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 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
7335 -1, 148, 149, 52, 53, -1, -1, 56, -1, 156,
7336 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7337 -1, -1, -1, -1, -1, -1, -1, 76, 77, 78,
7338 79, 80, 81, 82, 83, 84, -1, -1, 87, 88,
7339 -1, -1, -1, -1, 93, 94, 95, 96, -1, -1,
7340 -1, -1, -1, -1, -1, -1, -1, -1, 107, 108,
7341 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7342 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7343 -1, -1, -1, -1, -1, -1, -1, -1, 137, 138,
7344 139, 140, 141, 142, 143, 144, 145, 146, -1, 148,
7345 149, 52, 53, -1, -1, 56, -1, 156, -1, -1,
7346 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7347 -1, -1, -1, -1, -1, 76, 77, 78, 79, 80,
7348 81, 82, 83, 84, -1, -1, 87, 88, -1, -1,
7349 -1, -1, 93, 94, 95, 96, -1, -1, -1, -1,
7350 -1, -1, -1, -1, -1, -1, 107, 108, -1, -1,
7351 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7352 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7353 -1, -1, -1, -1, -1, -1, 137, 138, 139, 140,
7354 141, 142, 143, 144, 145, 146, -1, 148, 149, 52,
7355 53, -1, -1, 56, -1, 156, -1, -1, -1, -1,
7356 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7357 -1, -1, -1, 76, 77, 78, 79, 80, 81, 82,
7358 83, 84, -1, -1, 87, 88, -1, -1, -1, -1,
7359 93, 94, 95, 96, -1, -1, -1, -1, -1, -1,
7360 -1, -1, -1, -1, 107, 108, -1, -1, -1, -1,
7361 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7362 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7363 -1, -1, -1, -1, 137, 138, 139, 140, 141, 142,
7364 143, 144, 145, 146, -1, 148, 149, 52, 53, -1,
7365 -1, 56, -1, 156, -1, -1, -1, -1, -1, -1,
7366 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7367 -1, 76, 77, 78, 79, 80, 81, 82, 83, 84,
7368 -1, -1, 87, 88, -1, -1, -1, -1, 93, 94,
7369 95, 96, -1, -1, -1, -1, -1, -1, -1, -1,
7370 -1, -1, 107, 108, -1, -1, -1, -1, -1, -1,
7371 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7372 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7373 -1, -1, 137, 138, 139, 140, 141, 142, 143, 144,
7374 145, 146, -1, 148, 149, 52, 53, -1, -1, 56,
7375 -1, 156, -1, -1, -1, -1, -1, -1, -1, -1,
7376 -1, -1, -1, -1, -1, -1, -1, -1, -1, 76,
7377 77, 78, 79, 80, 81, 82, 83, 84, -1, -1,
7378 87, 88, -1, -1, -1, -1, 93, 94, 95, 96,
7379 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7380 107, 108, -1, -1, -1, -1, -1, -1, -1, -1,
7381 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7382 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7383 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
7384 -1, 148, 149, 52, 53, -1, -1, 56, -1, 156,
7385 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7386 -1, -1, -1, -1, -1, -1, -1, 76, 77, 78,
7387 79, 80, 81, 82, 83, 84, -1, -1, 87, 88,
7388 -1, -1, -1, -1, 93, 94, 95, 96, -1, -1,
7389 -1, -1, -1, -1, -1, -1, -1, -1, 107, 108,
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, 137, 138,
7393 139, 140, 141, 142, 143, 144, 145, 146, -1, 148,
7394 149, 52, 53, -1, -1, 56, -1, 156, -1, -1,
7395 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7396 -1, -1, -1, -1, -1, 76, 77, 78, 79, 80,
7397 81, 82, 83, 84, -1, -1, 87, 88, -1, -1,
7398 -1, -1, 93, 94, 95, 96, -1, -1, -1, -1,
7399 -1, -1, -1, -1, -1, -1, 107, 108, -1, -1,
7400 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7401 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7402 -1, -1, -1, -1, -1, -1, 137, 138, 139, 140,
7403 141, 142, 143, 144, 145, 146, -1, 148, 149, 52,
7404 53, -1, -1, 56, -1, 156, -1, -1, -1, -1,
7405 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7406 -1, -1, -1, 76, 77, 78, 79, 80, 81, 82,
7407 83, 84, -1, -1, 87, 88, -1, -1, -1, -1,
7408 93, 94, 95, 96, -1, -1, -1, -1, -1, -1,
7409 -1, -1, -1, -1, 107, 108, -1, -1, -1, -1,
7410 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7411 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7412 -1, -1, -1, -1, 137, 138, 139, 140, 141, 142,
7413 143, 144, 145, 146, -1, 148, 149, 52, 53, -1,
7414 -1, 56, -1, 156, -1, -1, -1, -1, -1, -1,
7415 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7416 -1, 76, 77, 78, 79, 80, 81, 82, 83, 84,
7417 -1, -1, 87, 88, -1, -1, -1, -1, 93, 94,
7418 95, 96, -1, -1, -1, -1, -1, -1, -1, -1,
7419 -1, -1, 107, 108, -1, -1, -1, -1, -1, -1,
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, 137, 138, 139, 140, 141, 142, 143, 144,
7423 145, 146, -1, 148, 149, 52, 53, -1, -1, 56,
7424 -1, 156, -1, -1, -1, -1, -1, -1, -1, -1,
7425 -1, -1, -1, -1, -1, -1, -1, -1, -1, 76,
7426 77, 78, 79, 80, 81, 82, 83, 84, -1, -1,
7427 87, 88, -1, -1, -1, -1, 93, 94, 95, 96,
7428 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7429 107, 108, -1, -1, -1, -1, -1, -1, -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 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
7433 -1, 148, 149, 52, 53, -1, -1, 56, -1, 156,
7434 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7435 -1, -1, -1, -1, -1, -1, -1, 76, 77, 78,
7436 79, 80, 81, 82, 83, 84, -1, -1, 87, 88,
7437 -1, -1, -1, -1, 93, 94, 95, 96, -1, -1,
7438 -1, -1, -1, -1, -1, -1, -1, -1, 107, 108,
7439 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7440 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7441 -1, -1, -1, -1, -1, -1, -1, -1, 137, 138,
7442 139, 140, 141, 142, 143, 144, 145, 146, -1, 148,
7443 149, 52, 53, -1, -1, 56, -1, 156, -1, -1,
7444 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7445 -1, -1, -1, -1, -1, 76, 77, 78, 79, 80,
7446 81, 82, 83, 84, -1, -1, 87, 88, -1, -1,
7447 -1, -1, 93, 94, 95, 96, -1, -1, -1, -1,
7448 -1, -1, -1, -1, -1, -1, 107, 108, -1, -1,
7449 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7450 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7451 -1, -1, -1, -1, -1, -1, 137, 138, 139, 140,
7452 141, 142, 143, 144, 145, 146, -1, 148, 149, 52,
7453 53, -1, -1, 56, -1, 156, -1, -1, -1, -1,
7454 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7455 -1, -1, -1, 76, 77, 78, 79, 80, 81, 82,
7456 83, 84, -1, -1, 87, 88, -1, -1, -1, -1,
7457 93, 94, 95, 96, -1, -1, -1, -1, -1, -1,
7458 -1, -1, -1, -1, 107, 108, -1, -1, -1, -1,
7459 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7460 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7461 -1, -1, -1, -1, 137, 138, 139, 140, 141, 142,
7462 143, 144, 145, 146, -1, 148, 149, 52, 53, -1,
7463 -1, 56, -1, 156, -1, -1, -1, -1, -1, -1,
7464 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7465 -1, 76, 77, 78, 79, 80, 81, 82, 83, 84,
7466 -1, -1, 87, 88, -1, -1, -1, -1, 93, 94,
7467 95, 96, -1, -1, -1, -1, -1, -1, -1, -1,
7468 -1, -1, 107, 108, -1, -1, -1, -1, -1, -1,
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, 137, 138, 139, 140, 141, 142, 143, 144,
7472 145, 146, -1, 148, 149, -1, -1, -1, -1, -1,
7473 -1, 156
7474};
7475
7476/* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of
7477 state STATE-NUM. */
7478static const yytype_int16 yystos[] =
7479{
7480 0, 165, 166, 1, 3, 4, 5, 6, 7, 11,
7481 12, 16, 18, 19, 20, 21, 22, 23, 24, 30,
7482 31, 32, 33, 34, 35, 36, 39, 45, 46, 47,
7483 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
7484 59, 60, 61, 62, 63, 64, 65, 76, 77, 91,
7485 92, 99, 102, 103, 104, 105, 107, 110, 111, 112,
7486 113, 114, 115, 116, 117, 118, 147, 148, 149, 164,
7487 167, 168, 180, 182, 183, 184, 185, 186, 187, 191,
7488 195, 197, 203, 206, 208, 209, 210, 212, 214, 215,
7489 216, 217, 226, 227, 228, 229, 230, 231, 234, 255,
7490 267, 268, 269, 270, 271, 272, 273, 274, 275, 276,
7491 277, 278, 287, 288, 324, 329, 330, 380, 381, 382,
7492 383, 384, 385, 387, 388, 391, 392, 394, 395, 396,
7493 397, 410, 411, 413, 414, 415, 416, 417, 418, 419,
7494 420, 421, 473, 0, 3, 4, 5, 6, 7, 8,
7495 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
7496 19, 20, 21, 22, 23, 24, 25, 26, 30, 31,
7497 32, 33, 34, 35, 36, 37, 38, 39, 45, 46,
7498 47, 48, 49, 50, 51, 52, 53, 56, 76, 77,
7499 78, 79, 80, 81, 82, 83, 84, 87, 88, 93,
7500 94, 95, 96, 107, 108, 137, 138, 139, 140, 141,
7501 142, 143, 144, 145, 146, 148, 149, 156, 220, 221,
7502 222, 224, 225, 410, 179, 179, 179, 39, 58, 99,
7503 102, 107, 108, 109, 112, 148, 187, 209, 217, 227,
7504 238, 239, 245, 246, 249, 251, 252, 268, 417, 418,
7505 420, 421, 460, 461, 246, 157, 242, 247, 248, 154,
7506 157, 189, 54, 221, 189, 151, 169, 170, 235, 473,
7507 21, 22, 32, 195, 197, 208, 227, 268, 287, 288,
7508 227, 227, 227, 56, 47, 102, 171, 176, 177, 182,
7509 211, 212, 473, 171, 240, 251, 460, 473, 239, 459,
7510 460, 473, 46, 99, 147, 155, 195, 197, 216, 255,
7511 268, 417, 418, 421, 322, 220, 400, 412, 416, 400,
7512 401, 402, 161, 386, 386, 386, 386, 415, 203, 227,
7513 227, 154, 160, 163, 471, 472, 179, 40, 41, 42,
7514 43, 44, 37, 38, 157, 424, 425, 426, 427, 428,
7515 424, 427, 26, 151, 242, 248, 279, 331, 28, 280,
7516 328, 134, 155, 102, 107, 214, 134, 25, 78, 79,
7517 80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
7518 90, 95, 96, 101, 135, 137, 138, 139, 140, 141,
7519 142, 143, 144, 145, 146, 233, 233, 69, 97, 98,
7520 153, 465, 466, 256, 1, 191, 198, 199, 199, 200,
7521 202, 202, 163, 199, 472, 99, 210, 217, 268, 293,
7522 417, 418, 421, 52, 56, 95, 99, 218, 219, 268,
7523 417, 418, 421, 219, 33, 34, 35, 36, 49, 50,
7524 51, 52, 56, 157, 194, 220, 419, 455, 456, 457,
7525 246, 157, 248, 98, 465, 466, 331, 383, 100, 100,
7526 155, 239, 56, 239, 239, 239, 400, 134, 101, 155,
7527 250, 473, 98, 153, 465, 100, 100, 155, 250, 92,
7528 244, 246, 251, 440, 460, 473, 246, 189, 191, 467,
7529 191, 54, 64, 65, 181, 157, 235, 236, 164, 424,
7530 424, 98, 465, 100, 178, 211, 158, 163, 472, 467,
7531 257, 159, 155, 189, 470, 155, 470, 152, 470, 189,
7532 56, 415, 213, 214, 426, 155, 98, 153, 465, 319,
7533 66, 119, 121, 122, 403, 119, 119, 403, 67, 403,
7534 161, 389, 398, 393, 399, 78, 160, 168, 151, 199,
7535 199, 199, 199, 235, 237, 191, 191, 52, 54, 55,
7536 56, 57, 58, 78, 92, 102, 107, 108, 109, 141,
7537 144, 298, 367, 425, 429, 430, 431, 432, 435, 436,
7538 437, 438, 439, 440, 441, 442, 443, 444, 445, 446,
7539 447, 448, 449, 450, 451, 452, 453, 134, 265, 438,
7540 134, 266, 332, 333, 106, 207, 334, 335, 335, 235,
7541 211, 155, 216, 155, 235, 193, 227, 227, 227, 227,
7542 227, 227, 227, 227, 227, 227, 227, 227, 227, 192,
7543 227, 227, 227, 227, 227, 227, 227, 227, 227, 227,
7544 227, 52, 53, 56, 224, 462, 463, 244, 251, 52,
7545 53, 56, 224, 462, 242, 171, 174, 13, 289, 471,
7546 289, 199, 171, 171, 259, 163, 56, 98, 153, 465,
7547 25, 199, 52, 56, 218, 138, 423, 473, 98, 153,
7548 465, 264, 458, 69, 98, 464, 246, 467, 52, 56,
7549 242, 462, 235, 235, 223, 100, 124, 235, 239, 239,
7550 249, 252, 460, 52, 56, 244, 52, 56, 235, 235,
7551 461, 467, 155, 467, 155, 158, 467, 221, 236, 227,
7552 152, 134, 134, 56, 462, 462, 235, 170, 467, 177,
7553 158, 460, 155, 213, 52, 56, 244, 52, 56, 320,
7554 405, 404, 119, 390, 403, 66, 119, 119, 390, 66,
7555 119, 227, 171, 182, 102, 107, 294, 295, 296, 297,
7556 442, 155, 454, 473, 155, 454, 155, 433, 434, 467,
7557 299, 300, 155, 434, 239, 34, 52, 52, 155, 434,
7558 34, 52, 39, 188, 209, 227, 232, 174, 471, 188,
7559 232, 174, 319, 152, 333, 319, 10, 68, 286, 286,
7560 107, 203, 204, 205, 239, 251, 253, 254, 467, 213,
7561 155, 99, 185, 190, 205, 217, 227, 239, 241, 254,
7562 268, 421, 341, 341, 189, 100, 100, 151, 242, 248,
7563 189, 468, 155, 100, 100, 242, 243, 248, 473, 235,
7564 286, 171, 13, 171, 27, 290, 471, 286, 286, 17,
7565 283, 337, 25, 258, 343, 52, 56, 244, 52, 56,
7566 260, 263, 422, 262, 52, 56, 218, 244, 174, 191,
7567 196, 467, 243, 248, 190, 227, 241, 190, 241, 221,
7568 235, 239, 250, 100, 100, 468, 100, 100, 440, 460,
7569 191, 39, 190, 241, 470, 214, 468, 321, 406, 409,
7570 416, 421, 386, 403, 386, 386, 386, 152, 296, 442,
7571 155, 467, 155, 453, 429, 447, 449, 432, 435, 445,
7572 451, 134, 239, 436, 444, 451, 443, 445, 189, 44,
7573 44, 286, 286, 320, 152, 320, 239, 155, 44, 213,
7574 56, 44, 134, 44, 98, 153, 465, 339, 339, 136,
7575 235, 235, 333, 207, 159, 100, 235, 235, 207, 8,
7576 281, 376, 473, 14, 15, 284, 285, 291, 292, 473,
7577 292, 201, 107, 239, 336, 286, 341, 337, 286, 468,
7578 199, 471, 199, 174, 468, 286, 467, 194, 331, 328,
7579 235, 235, 100, 235, 235, 467, 155, 467, 189, 179,
7580 407, 467, 294, 297, 295, 454, 155, 434, 155, 434,
7581 155, 434, 155, 434, 434, 188, 232, 237, 237, 321,
7582 321, 107, 239, 237, 237, 235, 237, 52, 56, 244,
7583 52, 56, 340, 340, 227, 190, 241, 190, 241, 152,
7584 235, 190, 241, 190, 241, 239, 254, 377, 473, 175,
7585 284, 171, 199, 286, 286, 239, 155, 289, 339, 286,
7586 290, 174, 471, 286, 235, 157, 325, 438, 171, 155,
7587 155, 445, 445, 451, 445, 227, 227, 179, 179, 239,
7588 182, 182, 227, 468, 52, 56, 58, 91, 92, 99,
7589 102, 104, 105, 107, 112, 140, 324, 346, 347, 348,
7590 350, 353, 357, 358, 359, 362, 363, 364, 365, 366,
7591 367, 368, 369, 370, 371, 372, 373, 374, 375, 380,
7592 381, 384, 385, 388, 392, 395, 397, 418, 447, 346,
7593 190, 241, 101, 378, 473, 9, 282, 379, 473, 172,
7594 289, 107, 239, 171, 340, 261, 286, 438, 323, 0,
7595 120, 408, 295, 434, 434, 155, 434, 434, 139, 313,
7596 314, 473, 313, 371, 371, 56, 218, 340, 347, 355,
7597 356, 357, 358, 361, 468, 189, 340, 469, 52, 400,
7598 52, 102, 416, 101, 155, 139, 155, 155, 347, 89,
7599 90, 98, 153, 157, 351, 352, 52, 99, 217, 268,
7600 417, 418, 421, 289, 176, 171, 171, 239, 292, 337,
7601 338, 345, 346, 171, 189, 316, 29, 123, 326, 445,
7602 298, 301, 302, 303, 304, 308, 309, 310, 311, 312,
7603 315, 443, 445, 446, 451, 453, 171, 174, 347, 468,
7604 347, 359, 361, 468, 155, 152, 235, 124, 199, 372,
7605 355, 359, 349, 360, 361, 112, 364, 368, 371, 371,
7606 218, 340, 468, 340, 467, 355, 358, 362, 355, 358,
7607 362, 56, 98, 153, 465, 171, 163, 173, 291, 289,
7608 40, 41, 286, 160, 158, 327, 171, 434, 454, 155,
7609 454, 155, 305, 306, 316, 300, 155, 305, 307, 99,
7610 268, 155, 306, 467, 155, 155, 354, 467, 155, 353,
7611 155, 400, 467, 467, 467, 468, 468, 468, 52, 56,
7612 244, 52, 56, 376, 379, 342, 199, 199, 52, 317,
7613 318, 441, 174, 152, 301, 449, 304, 308, 445, 451,
7614 139, 268, 309, 451, 56, 98, 445, 360, 362, 360,
7615 359, 361, 468, 171, 155, 189, 286, 454, 155, 306,
7616 155, 306, 155, 306, 155, 306, 52, 56, 306, 155,
7617 469, 292, 343, 344, 318, 445, 445, 451, 445, 306,
7618 306, 155, 306, 306, 445, 306
7619};
7620
7621/* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */
7622static const yytype_int16 yyr1[] =
7623{
7624 0, 162, 165, 163, 163, 164, 166, 167, 167, 167,
7625 168, 168, 169, 170, 171, 172, 173, 174, 175, 174,
7626 176, 176, 176, 177, 178, 177, 179, 180, 181, 182,
7627 182, 182, 182, 182, 182, 182, 182, 182, 182, 182,
7628 182, 182, 183, 182, 182, 182, 182, 182, 184, 185,
7629 186, 186, 186, 186, 186, 186, 186, 186, 185, 187,
7630 187, 185, 188, 188, 189, 189, 188, 190, 190, 190,
7631 191, 191, 191, 191, 191, 192, 191, 193, 191, 191,
7632 194, 195, 196, 197, 198, 199, 199, 200, 201, 202,
7633 203, 203, 204, 205, 206, 206, 207, 208, 208, 208,
7634 209, 209, 209, 209, 209, 209, 209, 209, 209, 209,
7635 209, 209, 210, 210, 211, 211, 212, 212, 212, 213,
7636 213, 212, 212, 212, 212, 212, 212, 212, 214, 214,
7637 215, 215, 216, 216, 216, 216, 216, 216, 216, 216,
7638 216, 217, 217, 217, 217, 217, 217, 217, 217, 217,
7639 218, 218, 219, 219, 219, 220, 220, 220, 220, 220,
7640 221, 221, 222, 223, 222, 224, 224, 224, 224, 224,
7641 224, 224, 224, 224, 224, 224, 224, 224, 224, 224,
7642 224, 224, 224, 224, 224, 224, 224, 224, 224, 224,
7643 224, 224, 224, 224, 224, 225, 225, 225, 225, 225,
7644 225, 225, 225, 225, 225, 225, 225, 225, 225, 225,
7645 225, 225, 225, 225, 225, 225, 225, 225, 225, 225,
7646 225, 225, 225, 225, 225, 225, 225, 225, 225, 225,
7647 225, 225, 225, 225, 225, 225, 226, 227, 228, 228,
7648 228, 228, 228, 228, 228, 228, 227, 229, 229, 229,
7649 229, 229, 229, 227, 227, 227, 227, 227, 227, 227,
7650 227, 227, 227, 227, 227, 227, 227, 227, 227, 227,
7651 227, 227, 227, 227, 227, 227, 227, 227, 227, 227,
7652 230, 230, 227, 227, 227, 231, 232, 232, 232, 233,
7653 233, 233, 233, 234, 234, 235, 236, 237, 238, 239,
7654 240, 240, 240, 240, 241, 241, 242, 242, 242, 243,
7655 243, 244, 244, 244, 244, 244, 245, 246, 246, 246,
7656 246, 246, 246, 247, 248, 249, 249, 250, 250, 251,
7657 251, 251, 251, 252, 252, 253, 253, 254, 254, 254,
7658 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
7659 255, 256, 255, 257, 255, 255, 255, 255, 255, 255,
7660 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
7661 255, 255, 255, 255, 255, 258, 255, 259, 255, 255,
7662 260, 261, 255, 262, 255, 263, 255, 264, 255, 265,
7663 255, 266, 255, 255, 255, 255, 255, 267, 268, 269,
7664 270, 271, 272, 273, 274, 275, 276, 277, 278, 279,
7665 280, 281, 282, 283, 284, 285, 286, 286, 287, 288,
7666 289, 289, 289, 290, 290, 291, 291, 292, 292, 293,
7667 293, 294, 294, 295, 295, 296, 296, 296, 296, 296,
7668 297, 297, 298, 298, 299, 300, 301, 301, 302, 302,
7669 303, 303, 303, 303, 304, 305, 305, 306, 307, 308,
7670 309, 309, 310, 310, 310, 310, 310, 310, 310, 310,
7671 310, 310, 310, 310, 311, 311, 311, 312, 311, 313,
7672 313, 314, 315, 315, 316, 316, 317, 317, 318, 318,
7673 319, 320, 321, 322, 323, 324, 325, 325, 326, 327,
7674 326, 328, 329, 329, 329, 329, 329, 330, 330, 330,
7675 330, 330, 330, 330, 330, 331, 331, 332, 333, 334,
7676 335, 336, 336, 336, 336, 337, 338, 338, 339, 340,
7677 341, 342, 343, 344, 344, 345, 345, 345, 346, 346,
7678 346, 346, 346, 346, 347, 348, 348, 349, 350, 350,
7679 351, 352, 353, 353, 353, 353, 353, 353, 353, 353,
7680 353, 353, 353, 353, 353, 354, 353, 353, 353, 355,
7681 355, 355, 355, 355, 355, 356, 356, 357, 357, 358,
7682 359, 359, 360, 360, 361, 362, 362, 362, 362, 363,
7683 363, 364, 364, 365, 365, 366, 366, 367, 368, 368,
7684 369, 370, 370, 370, 370, 370, 370, 369, 369, 369,
7685 369, 371, 371, 371, 371, 371, 371, 371, 371, 371,
7686 371, 372, 373, 373, 374, 375, 375, 375, 376, 376,
7687 377, 377, 377, 378, 378, 379, 379, 380, 380, 381,
7688 382, 382, 382, 383, 384, 385, 386, 386, 387, 388,
7689 389, 389, 390, 390, 391, 392, 393, 393, 394, 395,
7690 396, 397, 398, 398, 399, 399, 400, 400, 401, 401,
7691 402, 402, 403, 404, 403, 405, 406, 407, 403, 408,
7692 408, 409, 409, 410, 410, 411, 412, 412, 413, 414,
7693 414, 415, 415, 415, 415, 416, 416, 416, 417, 417,
7694 417, 418, 418, 418, 418, 418, 418, 418, 419, 419,
7695 420, 420, 421, 421, 422, 423, 423, 424, 424, 425,
7696 426, 427, 428, 427, 429, 429, 430, 430, 431, 431,
7697 431, 431, 432, 432, 433, 433, 434, 435, 436, 436,
7698 437, 437, 437, 437, 437, 437, 437, 437, 437, 437,
7699 437, 437, 438, 438, 439, 438, 438, 440, 441, 441,
7700 441, 441, 442, 442, 443, 444, 444, 445, 445, 446,
7701 447, 447, 448, 449, 449, 450, 450, 451, 451, 452,
7702 452, 453, 453, 453, 454, 454, 455, 456, 457, 458,
7703 457, 459, 459, 460, 460, 461, 461, 461, 461, 461,
7704 461, 462, 462, 462, 462, 463, 463, 463, 464, 464,
7705 465, 465, 466, 466, 467, 468, 469, 470, 470, 471,
7706 471, 472, 472, 473
7707};
7708
7709/* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. */
7710static const yytype_int8 yyr2[] =
7711{
7712 0, 2, 0, 0, 1, 2, 2, 1, 1, 3,
7713 1, 2, 1, 3, 2, 0, 0, 8, 0, 5,
7714 1, 1, 3, 1, 0, 3, 0, 2, 0, 4,
7715 3, 3, 3, 2, 3, 3, 3, 3, 4, 5,
7716 1, 4, 4, 1, 7, 4, 1, 1, 4, 1,
7717 4, 7, 6, 6, 6, 6, 5, 4, 1, 4,
7718 4, 1, 1, 4, 0, 1, 3, 1, 4, 1,
7719 1, 3, 3, 3, 2, 0, 7, 0, 7, 1,
7720 1, 2, 0, 5, 1, 1, 1, 0, 0, 4,
7721 1, 1, 1, 1, 1, 4, 3, 1, 1, 1,
7722 2, 3, 4, 5, 4, 5, 6, 2, 2, 2,
7723 2, 2, 1, 3, 1, 3, 1, 2, 3, 1,
7724 3, 5, 2, 4, 2, 4, 1, 3, 1, 3,
7725 2, 3, 1, 1, 4, 3, 3, 3, 3, 2,
7726 1, 1, 1, 4, 3, 3, 3, 3, 2, 1,
7727 1, 1, 2, 1, 3, 1, 1, 1, 1, 1,
7728 1, 1, 1, 0, 4, 1, 1, 1, 1, 1,
7729 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7730 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7731 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7732 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7733 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7734 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7735 1, 1, 1, 1, 1, 1, 4, 1, 4, 7,
7736 6, 6, 6, 6, 5, 4, 1, 3, 3, 2,
7737 2, 2, 2, 1, 3, 3, 3, 3, 3, 3,
7738 4, 2, 2, 3, 3, 3, 3, 1, 3, 3,
7739 3, 3, 3, 2, 2, 3, 3, 3, 3, 4,
7740 4, 4, 1, 1, 1, 6, 1, 4, 3, 1,
7741 1, 1, 1, 3, 3, 1, 1, 1, 1, 1,
7742 1, 2, 4, 2, 1, 4, 3, 5, 3, 1,
7743 1, 1, 1, 2, 4, 2, 1, 1, 1, 2,
7744 2, 4, 1, 0, 2, 2, 1, 2, 1, 1,
7745 1, 3, 3, 2, 1, 1, 1, 3, 4, 2,
7746 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7747 1, 0, 4, 0, 4, 3, 3, 2, 3, 3,
7748 1, 4, 3, 1, 6, 4, 3, 2, 1, 2,
7749 1, 6, 6, 4, 4, 0, 6, 0, 5, 5,
7750 0, 0, 9, 0, 6, 0, 7, 0, 5, 0,
7751 5, 0, 5, 1, 1, 1, 1, 1, 1, 1,
7752 1, 1, 2, 2, 1, 2, 1, 1, 1, 1,
7753 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7754 1, 1, 2, 1, 1, 1, 5, 1, 2, 1,
7755 1, 1, 3, 1, 3, 1, 3, 5, 1, 3,
7756 2, 1, 1, 1, 0, 2, 2, 1, 1, 3,
7757 4, 2, 2, 1, 1, 2, 0, 1, 1, 3,
7758 1, 3, 6, 8, 4, 6, 4, 6, 4, 6,
7759 2, 4, 2, 4, 1, 2, 2, 1, 1, 1,
7760 1, 4, 0, 1, 1, 4, 1, 3, 1, 1,
7761 0, 0, 0, 0, 0, 9, 4, 1, 3, 0,
7762 4, 3, 2, 4, 5, 5, 3, 2, 4, 4,
7763 3, 3, 2, 1, 4, 3, 3, 0, 7, 0,
7764 7, 1, 2, 3, 4, 5, 1, 1, 0, 0,
7765 0, 0, 9, 1, 1, 1, 3, 3, 1, 2,
7766 3, 1, 1, 1, 1, 3, 1, 0, 4, 1,
7767 2, 2, 1, 1, 4, 4, 4, 3, 4, 4,
7768 4, 3, 3, 3, 2, 0, 6, 2, 4, 1,
7769 1, 2, 2, 4, 1, 2, 3, 1, 3, 5,
7770 2, 1, 1, 3, 1, 3, 1, 2, 1, 1,
7771 3, 2, 1, 1, 3, 2, 1, 2, 1, 1,
7772 1, 3, 3, 2, 2, 2, 2, 1, 1, 1,
7773 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7774 1, 1, 2, 2, 4, 2, 3, 1, 6, 1,
7775 1, 1, 1, 2, 1, 3, 1, 1, 1, 1,
7776 1, 1, 2, 3, 3, 3, 1, 2, 4, 1,
7777 0, 3, 1, 2, 4, 1, 0, 3, 4, 1,
7778 4, 1, 0, 3, 0, 3, 0, 2, 0, 2,
7779 0, 2, 1, 0, 3, 0, 0, 0, 6, 1,
7780 1, 1, 1, 1, 1, 2, 1, 1, 3, 1,
7781 2, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7782 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7783 1, 1, 1, 1, 0, 4, 1, 1, 1, 0,
7784 3, 1, 0, 3, 2, 1, 1, 3, 4, 2,
7785 2, 1, 1, 1, 2, 0, 1, 3, 1, 3,
7786 6, 8, 4, 6, 4, 6, 4, 6, 2, 4,
7787 2, 4, 1, 2, 1, 1, 1, 1, 1, 1,
7788 1, 1, 1, 1, 1, 1, 3, 1, 3, 1,
7789 1, 1, 1, 2, 1, 1, 1, 2, 1, 1,
7790 1, 2, 2, 1, 2, 1, 1, 1, 1, 0,
7791 4, 1, 2, 1, 3, 3, 2, 1, 4, 2,
7792 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7793 1, 1, 1, 1, 2, 2, 2, 1, 1, 1,
7794 1, 1, 2, 0
7795};
7796
7797
7798enum { YYENOMEM = -2 };
7799
7800#define yyerrok (yyerrstatus = 0)
7801#define yyclearin (yychar = YYEMPTY)
7802
7803#define YYACCEPT goto yyacceptlab
7804#define YYABORT goto yyabortlab
7805#define YYERROR goto yyerrorlab
7806#define YYNOMEM goto yyexhaustedlab
7807
7808
7809#define YYRECOVERING() (!!yyerrstatus)
7810
7811#define YYBACKUP(Token, Value) \
7812 do \
7813 if (yychar == YYEMPTY) \
7814 { \
7815 yychar = (Token); \
7816 yylval = (Value); \
7817 YYPOPSTACK (yylen); \
7818 yystate = *yyssp; \
7819 goto yybackup; \
7820 } \
7821 else \
7822 { \
7823 yyerror (&yylloc, p, YY_("syntax error: cannot back up")); \
7824 YYERROR; \
7825 } \
7826 while (0)
7827
7828/* Backward compatibility with an undocumented macro.
7829 Use YYerror or YYUNDEF. */
7830#define YYERRCODE YYUNDEF
7831
7832/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
7833 If N is 0, then set CURRENT to the empty location which ends
7834 the previous symbol: RHS[0] (always defined). */
7835
7836#ifndef YYLLOC_DEFAULT
7837# define YYLLOC_DEFAULT(Current, Rhs, N) \
7838 do \
7839 if (N) \
7840 { \
7841 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
7842 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
7843 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
7844 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
7845 } \
7846 else \
7847 { \
7848 (Current).first_line = (Current).last_line = \
7849 YYRHSLOC (Rhs, 0).last_line; \
7850 (Current).first_column = (Current).last_column = \
7851 YYRHSLOC (Rhs, 0).last_column; \
7852 } \
7853 while (0)
7854#endif
7855
7856#define YYRHSLOC(Rhs, K) ((Rhs)[K])
7857
7858
7859/* Enable debugging if requested. */
7860#if YYDEBUG
7861
7862# ifndef YYFPRINTF
7863# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
7864# define YYFPRINTF fprintf
7865# endif
7866
7867# define YYDPRINTF(Args) \
7868do { \
7869 if (yydebug) \
7870 YYFPRINTF Args; \
7871} while (0)
7872
7873
7874/* YYLOCATION_PRINT -- Print the location on the stream.
7875 This macro was not mandated originally: define only if we know
7876 we won't break user code: when these are the locations we know. */
7877
7878# ifndef YYLOCATION_PRINT
7879
7880# if defined YY_LOCATION_PRINT
7881
7882 /* Temporary convenience wrapper in case some people defined the
7883 undocumented and private YY_LOCATION_PRINT macros. */
7884# define YYLOCATION_PRINT(File, Loc, p) YY_LOCATION_PRINT(File, *(Loc), p)
7885
7886# elif defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
7887
7888/* Print *YYLOCP on YYO. Private, do not rely on its existence. */
7889
7890YY_ATTRIBUTE_UNUSED
7891static int
7892yy_location_print_ (FILE *yyo, YYLTYPE const * const yylocp)
7893{
7894 int res = 0;
7895 int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0;
7896 if (0 <= yylocp->first_line)
7897 {
7898 res += YYFPRINTF (yyo, "%d", yylocp->first_line);
7899 if (0 <= yylocp->first_column)
7900 res += YYFPRINTF (yyo, ".%d", yylocp->first_column);
7901 }
7902 if (0 <= yylocp->last_line)
7903 {
7904 if (yylocp->first_line < yylocp->last_line)
7905 {
7906 res += YYFPRINTF (yyo, "-%d", yylocp->last_line);
7907 if (0 <= end_col)
7908 res += YYFPRINTF (yyo, ".%d", end_col);
7909 }
7910 else if (0 <= end_col && yylocp->first_column < end_col)
7911 res += YYFPRINTF (yyo, "-%d", end_col);
7912 }
7913 return res;
7914}
7915
7916# define YYLOCATION_PRINT yy_location_print_
7917
7918 /* Temporary convenience wrapper in case some people defined the
7919 undocumented and private YY_LOCATION_PRINT macros. */
7920# define YY_LOCATION_PRINT(File, Loc, p) YYLOCATION_PRINT(File, &(Loc), p)
7921
7922# else
7923
7924# define YYLOCATION_PRINT(File, Loc, p) ((void) 0)
7925 /* Temporary convenience wrapper in case some people defined the
7926 undocumented and private YY_LOCATION_PRINT macros. */
7927# define YY_LOCATION_PRINT YYLOCATION_PRINT
7928
7929# endif
7930# endif /* !defined YYLOCATION_PRINT */
7931
7932
7933# define YY_SYMBOL_PRINT(Title, Kind, Value, Location, p) \
7934do { \
7935 if (yydebug) \
7936 { \
7937 YYFPRINTF (stderr, "%s ", Title); \
7938 yy_symbol_print (stderr, \
7939 Kind, Value, Location, p); \
7940 YYFPRINTF (stderr, "\n"); \
7941 } \
7942} while (0)
7943
7944
7945/*-----------------------------------.
7946| Print this symbol's value on YYO. |
7947`-----------------------------------*/
7948
7949static void
7950yy_symbol_value_print (FILE *yyo,
7951 yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, struct parser_params *p)
7952{
7953 FILE *yyoutput = yyo;
7954 YY_USE (yyoutput);
7955 YY_USE (yylocationp);
7956 YY_USE (p);
7957 if (!yyvaluep)
7958 return;
7959 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
7960switch (yykind)
7961 {
7962 case YYSYMBOL_keyword_class: /* "'class'" */
7963#line 2627 "parse.y"
7964 {
7965 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7966}
7967#line 7968 "parse.c"
7968 break;
7969
7970 case YYSYMBOL_keyword_module: /* "'module'" */
7971#line 2627 "parse.y"
7972 {
7973 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7974}
7975#line 7976 "parse.c"
7976 break;
7977
7978 case YYSYMBOL_keyword_def: /* "'def'" */
7979#line 2627 "parse.y"
7980 {
7981 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7982}
7983#line 7984 "parse.c"
7984 break;
7985
7986 case YYSYMBOL_keyword_undef: /* "'undef'" */
7987#line 2627 "parse.y"
7988 {
7989 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7990}
7991#line 7992 "parse.c"
7992 break;
7993
7994 case YYSYMBOL_keyword_begin: /* "'begin'" */
7995#line 2627 "parse.y"
7996 {
7997 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7998}
7999#line 8000 "parse.c"
8000 break;
8001
8002 case YYSYMBOL_keyword_rescue: /* "'rescue'" */
8003#line 2627 "parse.y"
8004 {
8005 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8006}
8007#line 8008 "parse.c"
8008 break;
8009
8010 case YYSYMBOL_keyword_ensure: /* "'ensure'" */
8011#line 2627 "parse.y"
8012 {
8013 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8014}
8015#line 8016 "parse.c"
8016 break;
8017
8018 case YYSYMBOL_keyword_end: /* "'end'" */
8019#line 2627 "parse.y"
8020 {
8021 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8022}
8023#line 8024 "parse.c"
8024 break;
8025
8026 case YYSYMBOL_keyword_if: /* "'if'" */
8027#line 2627 "parse.y"
8028 {
8029 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8030}
8031#line 8032 "parse.c"
8032 break;
8033
8034 case YYSYMBOL_keyword_unless: /* "'unless'" */
8035#line 2627 "parse.y"
8036 {
8037 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8038}
8039#line 8040 "parse.c"
8040 break;
8041
8042 case YYSYMBOL_keyword_then: /* "'then'" */
8043#line 2627 "parse.y"
8044 {
8045 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8046}
8047#line 8048 "parse.c"
8048 break;
8049
8050 case YYSYMBOL_keyword_elsif: /* "'elsif'" */
8051#line 2627 "parse.y"
8052 {
8053 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8054}
8055#line 8056 "parse.c"
8056 break;
8057
8058 case YYSYMBOL_keyword_else: /* "'else'" */
8059#line 2627 "parse.y"
8060 {
8061 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8062}
8063#line 8064 "parse.c"
8064 break;
8065
8066 case YYSYMBOL_keyword_case: /* "'case'" */
8067#line 2627 "parse.y"
8068 {
8069 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8070}
8071#line 8072 "parse.c"
8072 break;
8073
8074 case YYSYMBOL_keyword_when: /* "'when'" */
8075#line 2627 "parse.y"
8076 {
8077 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8078}
8079#line 8080 "parse.c"
8080 break;
8081
8082 case YYSYMBOL_keyword_while: /* "'while'" */
8083#line 2627 "parse.y"
8084 {
8085 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8086}
8087#line 8088 "parse.c"
8088 break;
8089
8090 case YYSYMBOL_keyword_until: /* "'until'" */
8091#line 2627 "parse.y"
8092 {
8093 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8094}
8095#line 8096 "parse.c"
8096 break;
8097
8098 case YYSYMBOL_keyword_for: /* "'for'" */
8099#line 2627 "parse.y"
8100 {
8101 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8102}
8103#line 8104 "parse.c"
8104 break;
8105
8106 case YYSYMBOL_keyword_break: /* "'break'" */
8107#line 2627 "parse.y"
8108 {
8109 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8110}
8111#line 8112 "parse.c"
8112 break;
8113
8114 case YYSYMBOL_keyword_next: /* "'next'" */
8115#line 2627 "parse.y"
8116 {
8117 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8118}
8119#line 8120 "parse.c"
8120 break;
8121
8122 case YYSYMBOL_keyword_redo: /* "'redo'" */
8123#line 2627 "parse.y"
8124 {
8125 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8126}
8127#line 8128 "parse.c"
8128 break;
8129
8130 case YYSYMBOL_keyword_retry: /* "'retry'" */
8131#line 2627 "parse.y"
8132 {
8133 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8134}
8135#line 8136 "parse.c"
8136 break;
8137
8138 case YYSYMBOL_keyword_in: /* "'in'" */
8139#line 2627 "parse.y"
8140 {
8141 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8142}
8143#line 8144 "parse.c"
8144 break;
8145
8146 case YYSYMBOL_keyword_do: /* "'do'" */
8147#line 2627 "parse.y"
8148 {
8149 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8150}
8151#line 8152 "parse.c"
8152 break;
8153
8154 case YYSYMBOL_keyword_do_cond: /* "'do' for condition" */
8155#line 2627 "parse.y"
8156 {
8157 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8158}
8159#line 8160 "parse.c"
8160 break;
8161
8162 case YYSYMBOL_keyword_do_block: /* "'do' for block" */
8163#line 2627 "parse.y"
8164 {
8165 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8166}
8167#line 8168 "parse.c"
8168 break;
8169
8170 case YYSYMBOL_keyword_do_LAMBDA: /* "'do' for lambda" */
8171#line 2627 "parse.y"
8172 {
8173 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8174}
8175#line 8176 "parse.c"
8176 break;
8177
8178 case YYSYMBOL_keyword_return: /* "'return'" */
8179#line 2627 "parse.y"
8180 {
8181 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8182}
8183#line 8184 "parse.c"
8184 break;
8185
8186 case YYSYMBOL_keyword_yield: /* "'yield'" */
8187#line 2627 "parse.y"
8188 {
8189 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8190}
8191#line 8192 "parse.c"
8192 break;
8193
8194 case YYSYMBOL_keyword_super: /* "'super'" */
8195#line 2627 "parse.y"
8196 {
8197 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8198}
8199#line 8200 "parse.c"
8200 break;
8201
8202 case YYSYMBOL_keyword_self: /* "'self'" */
8203#line 2627 "parse.y"
8204 {
8205 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8206}
8207#line 8208 "parse.c"
8208 break;
8209
8210 case YYSYMBOL_keyword_nil: /* "'nil'" */
8211#line 2627 "parse.y"
8212 {
8213 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8214}
8215#line 8216 "parse.c"
8216 break;
8217
8218 case YYSYMBOL_keyword_true: /* "'true'" */
8219#line 2627 "parse.y"
8220 {
8221 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8222}
8223#line 8224 "parse.c"
8224 break;
8225
8226 case YYSYMBOL_keyword_false: /* "'false'" */
8227#line 2627 "parse.y"
8228 {
8229 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8230}
8231#line 8232 "parse.c"
8232 break;
8233
8234 case YYSYMBOL_keyword_and: /* "'and'" */
8235#line 2627 "parse.y"
8236 {
8237 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8238}
8239#line 8240 "parse.c"
8240 break;
8241
8242 case YYSYMBOL_keyword_or: /* "'or'" */
8243#line 2627 "parse.y"
8244 {
8245 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8246}
8247#line 8248 "parse.c"
8248 break;
8249
8250 case YYSYMBOL_keyword_not: /* "'not'" */
8251#line 2627 "parse.y"
8252 {
8253 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8254}
8255#line 8256 "parse.c"
8256 break;
8257
8258 case YYSYMBOL_modifier_if: /* "'if' modifier" */
8259#line 2627 "parse.y"
8260 {
8261 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8262}
8263#line 8264 "parse.c"
8264 break;
8265
8266 case YYSYMBOL_modifier_unless: /* "'unless' modifier" */
8267#line 2627 "parse.y"
8268 {
8269 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8270}
8271#line 8272 "parse.c"
8272 break;
8273
8274 case YYSYMBOL_modifier_while: /* "'while' modifier" */
8275#line 2627 "parse.y"
8276 {
8277 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8278}
8279#line 8280 "parse.c"
8280 break;
8281
8282 case YYSYMBOL_modifier_until: /* "'until' modifier" */
8283#line 2627 "parse.y"
8284 {
8285 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8286}
8287#line 8288 "parse.c"
8288 break;
8289
8290 case YYSYMBOL_modifier_rescue: /* "'rescue' modifier" */
8291#line 2627 "parse.y"
8292 {
8293 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8294}
8295#line 8296 "parse.c"
8296 break;
8297
8298 case YYSYMBOL_keyword_alias: /* "'alias'" */
8299#line 2627 "parse.y"
8300 {
8301 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8302}
8303#line 8304 "parse.c"
8304 break;
8305
8306 case YYSYMBOL_keyword_defined: /* "'defined?'" */
8307#line 2627 "parse.y"
8308 {
8309 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8310}
8311#line 8312 "parse.c"
8312 break;
8313
8314 case YYSYMBOL_keyword_BEGIN: /* "'BEGIN'" */
8315#line 2627 "parse.y"
8316 {
8317 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8318}
8319#line 8320 "parse.c"
8320 break;
8321
8322 case YYSYMBOL_keyword_END: /* "'END'" */
8323#line 2627 "parse.y"
8324 {
8325 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8326}
8327#line 8328 "parse.c"
8328 break;
8329
8330 case YYSYMBOL_keyword__LINE__: /* "'__LINE__'" */
8331#line 2627 "parse.y"
8332 {
8333 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8334}
8335#line 8336 "parse.c"
8336 break;
8337
8338 case YYSYMBOL_keyword__FILE__: /* "'__FILE__'" */
8339#line 2627 "parse.y"
8340 {
8341 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8342}
8343#line 8344 "parse.c"
8344 break;
8345
8346 case YYSYMBOL_keyword__ENCODING__: /* "'__ENCODING__'" */
8347#line 2627 "parse.y"
8348 {
8349 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8350}
8351#line 8352 "parse.c"
8352 break;
8353
8354 case YYSYMBOL_tIDENTIFIER: /* "local variable or method" */
8355#line 2627 "parse.y"
8356 {
8357 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8358}
8359#line 8360 "parse.c"
8360 break;
8361
8362 case YYSYMBOL_tFID: /* "method" */
8363#line 2627 "parse.y"
8364 {
8365 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8366}
8367#line 8368 "parse.c"
8368 break;
8369
8370 case YYSYMBOL_tGVAR: /* "global variable" */
8371#line 2627 "parse.y"
8372 {
8373 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8374}
8375#line 8376 "parse.c"
8376 break;
8377
8378 case YYSYMBOL_tIVAR: /* "instance variable" */
8379#line 2627 "parse.y"
8380 {
8381 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8382}
8383#line 8384 "parse.c"
8384 break;
8385
8386 case YYSYMBOL_tCONSTANT: /* "constant" */
8387#line 2627 "parse.y"
8388 {
8389 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8390}
8391#line 8392 "parse.c"
8392 break;
8393
8394 case YYSYMBOL_tCVAR: /* "class variable" */
8395#line 2627 "parse.y"
8396 {
8397 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8398}
8399#line 8400 "parse.c"
8400 break;
8401
8402 case YYSYMBOL_tLABEL: /* "label" */
8403#line 2627 "parse.y"
8404 {
8405 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8406}
8407#line 8408 "parse.c"
8408 break;
8409
8410 case YYSYMBOL_tINTEGER: /* "integer literal" */
8411#line 2630 "parse.y"
8412 {
8413 switch (nd_type(RNODE(((*yyvaluep).node)))) {
8414 case NODE_INTEGER:
8415 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_integer_literal_val(((*yyvaluep).node)));
8416 break;
8417 case NODE_FLOAT:
8418 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_float_literal_val(((*yyvaluep).node)));
8419 break;
8420 case NODE_RATIONAL:
8421 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_rational_literal_val(((*yyvaluep).node)));
8422 break;
8423 case NODE_IMAGINARY:
8424 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_imaginary_literal_val(((*yyvaluep).node)));
8425 break;
8426 default:
8427 break;
8428 }
8429}
8430#line 8431 "parse.c"
8431 break;
8432
8433 case YYSYMBOL_tFLOAT: /* "float literal" */
8434#line 2630 "parse.y"
8435 {
8436 switch (nd_type(RNODE(((*yyvaluep).node)))) {
8437 case NODE_INTEGER:
8438 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_integer_literal_val(((*yyvaluep).node)));
8439 break;
8440 case NODE_FLOAT:
8441 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_float_literal_val(((*yyvaluep).node)));
8442 break;
8443 case NODE_RATIONAL:
8444 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_rational_literal_val(((*yyvaluep).node)));
8445 break;
8446 case NODE_IMAGINARY:
8447 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_imaginary_literal_val(((*yyvaluep).node)));
8448 break;
8449 default:
8450 break;
8451 }
8452}
8453#line 8454 "parse.c"
8454 break;
8455
8456 case YYSYMBOL_tRATIONAL: /* "rational literal" */
8457#line 2630 "parse.y"
8458 {
8459 switch (nd_type(RNODE(((*yyvaluep).node)))) {
8460 case NODE_INTEGER:
8461 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_integer_literal_val(((*yyvaluep).node)));
8462 break;
8463 case NODE_FLOAT:
8464 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_float_literal_val(((*yyvaluep).node)));
8465 break;
8466 case NODE_RATIONAL:
8467 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_rational_literal_val(((*yyvaluep).node)));
8468 break;
8469 case NODE_IMAGINARY:
8470 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_imaginary_literal_val(((*yyvaluep).node)));
8471 break;
8472 default:
8473 break;
8474 }
8475}
8476#line 8477 "parse.c"
8477 break;
8478
8479 case YYSYMBOL_tIMAGINARY: /* "imaginary literal" */
8480#line 2630 "parse.y"
8481 {
8482 switch (nd_type(RNODE(((*yyvaluep).node)))) {
8483 case NODE_INTEGER:
8484 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_integer_literal_val(((*yyvaluep).node)));
8485 break;
8486 case NODE_FLOAT:
8487 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_float_literal_val(((*yyvaluep).node)));
8488 break;
8489 case NODE_RATIONAL:
8490 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_rational_literal_val(((*yyvaluep).node)));
8491 break;
8492 case NODE_IMAGINARY:
8493 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_imaginary_literal_val(((*yyvaluep).node)));
8494 break;
8495 default:
8496 break;
8497 }
8498}
8499#line 8500 "parse.c"
8500 break;
8501
8502 case YYSYMBOL_tCHAR: /* "char literal" */
8503#line 2630 "parse.y"
8504 {
8505 switch (nd_type(RNODE(((*yyvaluep).node)))) {
8506 case NODE_INTEGER:
8507 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_integer_literal_val(((*yyvaluep).node)));
8508 break;
8509 case NODE_FLOAT:
8510 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_float_literal_val(((*yyvaluep).node)));
8511 break;
8512 case NODE_RATIONAL:
8513 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_rational_literal_val(((*yyvaluep).node)));
8514 break;
8515 case NODE_IMAGINARY:
8516 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_imaginary_literal_val(((*yyvaluep).node)));
8517 break;
8518 default:
8519 break;
8520 }
8521}
8522#line 8523 "parse.c"
8523 break;
8524
8525 case YYSYMBOL_tNTH_REF: /* "numbered reference" */
8526#line 2648 "parse.y"
8527 {
8528 rb_parser_printf(p, "$%ld", RNODE_NTH_REF(((*yyvaluep).node))->nd_nth);
8529}
8530#line 8531 "parse.c"
8531 break;
8532
8533 case YYSYMBOL_tBACK_REF: /* "back reference" */
8534#line 2651 "parse.y"
8535 {
8536 rb_parser_printf(p, "$%c", (int)RNODE_BACK_REF(((*yyvaluep).node))->nd_nth);
8537}
8538#line 8539 "parse.c"
8539 break;
8540
8541 case YYSYMBOL_tSTRING_CONTENT: /* "literal content" */
8542#line 2630 "parse.y"
8543 {
8544 switch (nd_type(RNODE(((*yyvaluep).node)))) {
8545 case NODE_INTEGER:
8546 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_integer_literal_val(((*yyvaluep).node)));
8547 break;
8548 case NODE_FLOAT:
8549 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_float_literal_val(((*yyvaluep).node)));
8550 break;
8551 case NODE_RATIONAL:
8552 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_rational_literal_val(((*yyvaluep).node)));
8553 break;
8554 case NODE_IMAGINARY:
8555 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_imaginary_literal_val(((*yyvaluep).node)));
8556 break;
8557 default:
8558 break;
8559 }
8560}
8561#line 8562 "parse.c"
8562 break;
8563
8564 case YYSYMBOL_69_: /* '.' */
8565#line 2627 "parse.y"
8566 {
8567 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8568}
8569#line 8570 "parse.c"
8570 break;
8571
8572 case YYSYMBOL_70_backslash_: /* "backslash" */
8573#line 2627 "parse.y"
8574 {
8575 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8576}
8577#line 8578 "parse.c"
8578 break;
8579
8580 case YYSYMBOL_72_escaped_horizontal_tab_: /* "escaped horizontal tab" */
8581#line 2627 "parse.y"
8582 {
8583 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8584}
8585#line 8586 "parse.c"
8586 break;
8587
8588 case YYSYMBOL_73_escaped_form_feed_: /* "escaped form feed" */
8589#line 2627 "parse.y"
8590 {
8591 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8592}
8593#line 8594 "parse.c"
8594 break;
8595
8596 case YYSYMBOL_74_escaped_carriage_return_: /* "escaped carriage return" */
8597#line 2627 "parse.y"
8598 {
8599 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8600}
8601#line 8602 "parse.c"
8602 break;
8603
8604 case YYSYMBOL_75_escaped_vertical_tab_: /* "escaped vertical tab" */
8605#line 2627 "parse.y"
8606 {
8607 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8608}
8609#line 8610 "parse.c"
8610 break;
8611
8612 case YYSYMBOL_tANDDOT: /* "&." */
8613#line 2627 "parse.y"
8614 {
8615 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8616}
8617#line 8618 "parse.c"
8618 break;
8619
8620 case YYSYMBOL_tCOLON2: /* "::" */
8621#line 2627 "parse.y"
8622 {
8623 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8624}
8625#line 8626 "parse.c"
8626 break;
8627
8628 case YYSYMBOL_tOP_ASGN: /* "operator-assignment" */
8629#line 2627 "parse.y"
8630 {
8631 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8632}
8633#line 8634 "parse.c"
8634 break;
8635
8636 case YYSYMBOL_compstmt_top_stmts: /* compstmt_top_stmts */
8637#line 2618 "parse.y"
8638 {
8639 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8640 rb_parser_printf(p, "NODE_SPECIAL");
8641 }
8642 else if (((*yyvaluep).node)) {
8643 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8644 }
8645}
8646#line 8647 "parse.c"
8647 break;
8648
8649 case YYSYMBOL_top_stmts: /* top_stmts */
8650#line 2618 "parse.y"
8651 {
8652 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8653 rb_parser_printf(p, "NODE_SPECIAL");
8654 }
8655 else if (((*yyvaluep).node)) {
8656 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8657 }
8658}
8659#line 8660 "parse.c"
8660 break;
8661
8662 case YYSYMBOL_top_stmt: /* top_stmt */
8663#line 2618 "parse.y"
8664 {
8665 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8666 rb_parser_printf(p, "NODE_SPECIAL");
8667 }
8668 else if (((*yyvaluep).node)) {
8669 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8670 }
8671}
8672#line 8673 "parse.c"
8673 break;
8674
8675 case YYSYMBOL_block_open: /* block_open */
8676#line 2618 "parse.y"
8677 {
8678 if ((NODE *)((*yyvaluep).node_exits) == (NODE *)-1) {
8679 rb_parser_printf(p, "NODE_SPECIAL");
8680 }
8681 else if (((*yyvaluep).node_exits)) {
8682 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_exits)))));
8683 }
8684}
8685#line 8686 "parse.c"
8686 break;
8687
8688 case YYSYMBOL_begin_block: /* begin_block */
8689#line 2618 "parse.y"
8690 {
8691 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8692 rb_parser_printf(p, "NODE_SPECIAL");
8693 }
8694 else if (((*yyvaluep).node)) {
8695 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8696 }
8697}
8698#line 8699 "parse.c"
8699 break;
8700
8701 case YYSYMBOL_compstmt_stmts: /* compstmt_stmts */
8702#line 2618 "parse.y"
8703 {
8704 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8705 rb_parser_printf(p, "NODE_SPECIAL");
8706 }
8707 else if (((*yyvaluep).node)) {
8708 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8709 }
8710}
8711#line 8712 "parse.c"
8712 break;
8713
8714 case YYSYMBOL_bodystmt: /* bodystmt */
8715#line 2618 "parse.y"
8716 {
8717 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8718 rb_parser_printf(p, "NODE_SPECIAL");
8719 }
8720 else if (((*yyvaluep).node)) {
8721 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8722 }
8723}
8724#line 8725 "parse.c"
8725 break;
8726
8727 case YYSYMBOL_stmts: /* stmts */
8728#line 2618 "parse.y"
8729 {
8730 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8731 rb_parser_printf(p, "NODE_SPECIAL");
8732 }
8733 else if (((*yyvaluep).node)) {
8734 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8735 }
8736}
8737#line 8738 "parse.c"
8738 break;
8739
8740 case YYSYMBOL_stmt_or_begin: /* stmt_or_begin */
8741#line 2618 "parse.y"
8742 {
8743 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8744 rb_parser_printf(p, "NODE_SPECIAL");
8745 }
8746 else if (((*yyvaluep).node)) {
8747 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8748 }
8749}
8750#line 8751 "parse.c"
8751 break;
8752
8753 case YYSYMBOL_allow_exits: /* allow_exits */
8754#line 2618 "parse.y"
8755 {
8756 if ((NODE *)((*yyvaluep).node_exits) == (NODE *)-1) {
8757 rb_parser_printf(p, "NODE_SPECIAL");
8758 }
8759 else if (((*yyvaluep).node_exits)) {
8760 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_exits)))));
8761 }
8762}
8763#line 8764 "parse.c"
8764 break;
8765
8766 case YYSYMBOL_stmt: /* stmt */
8767#line 2618 "parse.y"
8768 {
8769 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8770 rb_parser_printf(p, "NODE_SPECIAL");
8771 }
8772 else if (((*yyvaluep).node)) {
8773 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8774 }
8775}
8776#line 8777 "parse.c"
8777 break;
8778
8779 case YYSYMBOL_asgn_mrhs: /* asgn_mrhs */
8780#line 2618 "parse.y"
8781 {
8782 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8783 rb_parser_printf(p, "NODE_SPECIAL");
8784 }
8785 else if (((*yyvaluep).node)) {
8786 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8787 }
8788}
8789#line 8790 "parse.c"
8790 break;
8791
8792 case YYSYMBOL_asgn_command_rhs: /* asgn_command_rhs */
8793#line 2618 "parse.y"
8794 {
8795 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8796 rb_parser_printf(p, "NODE_SPECIAL");
8797 }
8798 else if (((*yyvaluep).node)) {
8799 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8800 }
8801}
8802#line 8803 "parse.c"
8803 break;
8804
8805 case YYSYMBOL_command_asgn: /* command_asgn */
8806#line 2618 "parse.y"
8807 {
8808 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8809 rb_parser_printf(p, "NODE_SPECIAL");
8810 }
8811 else if (((*yyvaluep).node)) {
8812 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8813 }
8814}
8815#line 8816 "parse.c"
8816 break;
8817
8818 case YYSYMBOL_op_asgn_command_rhs: /* op_asgn_command_rhs */
8819#line 2618 "parse.y"
8820 {
8821 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8822 rb_parser_printf(p, "NODE_SPECIAL");
8823 }
8824 else if (((*yyvaluep).node)) {
8825 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8826 }
8827}
8828#line 8829 "parse.c"
8829 break;
8830
8831 case YYSYMBOL_def_endless_method_endless_command: /* def_endless_method_endless_command */
8832#line 2618 "parse.y"
8833 {
8834 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8835 rb_parser_printf(p, "NODE_SPECIAL");
8836 }
8837 else if (((*yyvaluep).node)) {
8838 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8839 }
8840}
8841#line 8842 "parse.c"
8842 break;
8843
8844 case YYSYMBOL_endless_command: /* endless_command */
8845#line 2618 "parse.y"
8846 {
8847 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8848 rb_parser_printf(p, "NODE_SPECIAL");
8849 }
8850 else if (((*yyvaluep).node)) {
8851 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8852 }
8853}
8854#line 8855 "parse.c"
8855 break;
8856
8857 case YYSYMBOL_command_rhs: /* command_rhs */
8858#line 2618 "parse.y"
8859 {
8860 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8861 rb_parser_printf(p, "NODE_SPECIAL");
8862 }
8863 else if (((*yyvaluep).node)) {
8864 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8865 }
8866}
8867#line 8868 "parse.c"
8868 break;
8869
8870 case YYSYMBOL_expr: /* expr */
8871#line 2618 "parse.y"
8872 {
8873 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8874 rb_parser_printf(p, "NODE_SPECIAL");
8875 }
8876 else if (((*yyvaluep).node)) {
8877 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8878 }
8879}
8880#line 8881 "parse.c"
8881 break;
8882
8883 case YYSYMBOL_def_name: /* def_name */
8884#line 2627 "parse.y"
8885 {
8886 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8887}
8888#line 8889 "parse.c"
8889 break;
8890
8891 case YYSYMBOL_defn_head: /* defn_head */
8892#line 2618 "parse.y"
8893 {
8894 if ((NODE *)((*yyvaluep).node_def_temp) == (NODE *)-1) {
8895 rb_parser_printf(p, "NODE_SPECIAL");
8896 }
8897 else if (((*yyvaluep).node_def_temp)) {
8898 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_def_temp)))));
8899 }
8900}
8901#line 8902 "parse.c"
8902 break;
8903
8904 case YYSYMBOL_defs_head: /* defs_head */
8905#line 2618 "parse.y"
8906 {
8907 if ((NODE *)((*yyvaluep).node_def_temp) == (NODE *)-1) {
8908 rb_parser_printf(p, "NODE_SPECIAL");
8909 }
8910 else if (((*yyvaluep).node_def_temp)) {
8911 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_def_temp)))));
8912 }
8913}
8914#line 8915 "parse.c"
8915 break;
8916
8917 case YYSYMBOL_value_expr_expr: /* value_expr_expr */
8918#line 2618 "parse.y"
8919 {
8920 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8921 rb_parser_printf(p, "NODE_SPECIAL");
8922 }
8923 else if (((*yyvaluep).node)) {
8924 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8925 }
8926}
8927#line 8928 "parse.c"
8928 break;
8929
8930 case YYSYMBOL_expr_value: /* expr_value */
8931#line 2618 "parse.y"
8932 {
8933 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8934 rb_parser_printf(p, "NODE_SPECIAL");
8935 }
8936 else if (((*yyvaluep).node)) {
8937 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8938 }
8939}
8940#line 8941 "parse.c"
8941 break;
8942
8943 case YYSYMBOL_expr_value_do: /* expr_value_do */
8944#line 2618 "parse.y"
8945 {
8946 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8947 rb_parser_printf(p, "NODE_SPECIAL");
8948 }
8949 else if (((*yyvaluep).node)) {
8950 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8951 }
8952}
8953#line 8954 "parse.c"
8954 break;
8955
8956 case YYSYMBOL_command_call: /* command_call */
8957#line 2618 "parse.y"
8958 {
8959 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8960 rb_parser_printf(p, "NODE_SPECIAL");
8961 }
8962 else if (((*yyvaluep).node)) {
8963 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8964 }
8965}
8966#line 8967 "parse.c"
8967 break;
8968
8969 case YYSYMBOL_value_expr_command_call: /* value_expr_command_call */
8970#line 2618 "parse.y"
8971 {
8972 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8973 rb_parser_printf(p, "NODE_SPECIAL");
8974 }
8975 else if (((*yyvaluep).node)) {
8976 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8977 }
8978}
8979#line 8980 "parse.c"
8980 break;
8981
8982 case YYSYMBOL_command_call_value: /* command_call_value */
8983#line 2618 "parse.y"
8984 {
8985 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8986 rb_parser_printf(p, "NODE_SPECIAL");
8987 }
8988 else if (((*yyvaluep).node)) {
8989 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8990 }
8991}
8992#line 8993 "parse.c"
8993 break;
8994
8995 case YYSYMBOL_block_command: /* block_command */
8996#line 2618 "parse.y"
8997 {
8998 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8999 rb_parser_printf(p, "NODE_SPECIAL");
9000 }
9001 else if (((*yyvaluep).node)) {
9002 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9003 }
9004}
9005#line 9006 "parse.c"
9006 break;
9007
9008 case YYSYMBOL_cmd_brace_block: /* cmd_brace_block */
9009#line 2618 "parse.y"
9010 {
9011 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9012 rb_parser_printf(p, "NODE_SPECIAL");
9013 }
9014 else if (((*yyvaluep).node)) {
9015 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9016 }
9017}
9018#line 9019 "parse.c"
9019 break;
9020
9021 case YYSYMBOL_fcall: /* fcall */
9022#line 2618 "parse.y"
9023 {
9024 if ((NODE *)((*yyvaluep).node_fcall) == (NODE *)-1) {
9025 rb_parser_printf(p, "NODE_SPECIAL");
9026 }
9027 else if (((*yyvaluep).node_fcall)) {
9028 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_fcall)))));
9029 }
9030}
9031#line 9032 "parse.c"
9032 break;
9033
9034 case YYSYMBOL_command: /* command */
9035#line 2618 "parse.y"
9036 {
9037 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9038 rb_parser_printf(p, "NODE_SPECIAL");
9039 }
9040 else if (((*yyvaluep).node)) {
9041 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9042 }
9043}
9044#line 9045 "parse.c"
9045 break;
9046
9047 case YYSYMBOL_mlhs: /* mlhs */
9048#line 2618 "parse.y"
9049 {
9050 if ((NODE *)((*yyvaluep).node_masgn) == (NODE *)-1) {
9051 rb_parser_printf(p, "NODE_SPECIAL");
9052 }
9053 else if (((*yyvaluep).node_masgn)) {
9054 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_masgn)))));
9055 }
9056}
9057#line 9058 "parse.c"
9058 break;
9059
9060 case YYSYMBOL_mlhs_inner: /* mlhs_inner */
9061#line 2618 "parse.y"
9062 {
9063 if ((NODE *)((*yyvaluep).node_masgn) == (NODE *)-1) {
9064 rb_parser_printf(p, "NODE_SPECIAL");
9065 }
9066 else if (((*yyvaluep).node_masgn)) {
9067 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_masgn)))));
9068 }
9069}
9070#line 9071 "parse.c"
9071 break;
9072
9073 case YYSYMBOL_mlhs_basic: /* mlhs_basic */
9074#line 2618 "parse.y"
9075 {
9076 if ((NODE *)((*yyvaluep).node_masgn) == (NODE *)-1) {
9077 rb_parser_printf(p, "NODE_SPECIAL");
9078 }
9079 else if (((*yyvaluep).node_masgn)) {
9080 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_masgn)))));
9081 }
9082}
9083#line 9084 "parse.c"
9084 break;
9085
9086 case YYSYMBOL_mlhs_items_mlhs_item: /* mlhs_items_mlhs_item */
9087#line 2618 "parse.y"
9088 {
9089 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9090 rb_parser_printf(p, "NODE_SPECIAL");
9091 }
9092 else if (((*yyvaluep).node)) {
9093 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9094 }
9095}
9096#line 9097 "parse.c"
9097 break;
9098
9099 case YYSYMBOL_mlhs_item: /* mlhs_item */
9100#line 2618 "parse.y"
9101 {
9102 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9103 rb_parser_printf(p, "NODE_SPECIAL");
9104 }
9105 else if (((*yyvaluep).node)) {
9106 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9107 }
9108}
9109#line 9110 "parse.c"
9110 break;
9111
9112 case YYSYMBOL_mlhs_head: /* mlhs_head */
9113#line 2618 "parse.y"
9114 {
9115 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9116 rb_parser_printf(p, "NODE_SPECIAL");
9117 }
9118 else if (((*yyvaluep).node)) {
9119 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9120 }
9121}
9122#line 9123 "parse.c"
9123 break;
9124
9125 case YYSYMBOL_mlhs_node: /* mlhs_node */
9126#line 2618 "parse.y"
9127 {
9128 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9129 rb_parser_printf(p, "NODE_SPECIAL");
9130 }
9131 else if (((*yyvaluep).node)) {
9132 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9133 }
9134}
9135#line 9136 "parse.c"
9136 break;
9137
9138 case YYSYMBOL_lhs: /* lhs */
9139#line 2618 "parse.y"
9140 {
9141 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9142 rb_parser_printf(p, "NODE_SPECIAL");
9143 }
9144 else if (((*yyvaluep).node)) {
9145 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9146 }
9147}
9148#line 9149 "parse.c"
9149 break;
9150
9151 case YYSYMBOL_cname: /* cname */
9152#line 2627 "parse.y"
9153 {
9154 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9155}
9156#line 9157 "parse.c"
9157 break;
9158
9159 case YYSYMBOL_cpath: /* cpath */
9160#line 2618 "parse.y"
9161 {
9162 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9163 rb_parser_printf(p, "NODE_SPECIAL");
9164 }
9165 else if (((*yyvaluep).node)) {
9166 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9167 }
9168}
9169#line 9170 "parse.c"
9170 break;
9171
9172 case YYSYMBOL_fname: /* fname */
9173#line 2627 "parse.y"
9174 {
9175 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9176}
9177#line 9178 "parse.c"
9178 break;
9179
9180 case YYSYMBOL_fitem: /* fitem */
9181#line 2618 "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_undef_list: /* undef_list */
9194#line 2618 "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_op: /* op */
9207#line 2627 "parse.y"
9208 {
9209 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9210}
9211#line 9212 "parse.c"
9212 break;
9213
9214 case YYSYMBOL_reswords: /* reswords */
9215#line 2627 "parse.y"
9216 {
9217 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9218}
9219#line 9220 "parse.c"
9220 break;
9221
9222 case YYSYMBOL_asgn_arg_rhs: /* asgn_arg_rhs */
9223#line 2618 "parse.y"
9224 {
9225 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9226 rb_parser_printf(p, "NODE_SPECIAL");
9227 }
9228 else if (((*yyvaluep).node)) {
9229 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9230 }
9231}
9232#line 9233 "parse.c"
9233 break;
9234
9235 case YYSYMBOL_arg: /* arg */
9236#line 2618 "parse.y"
9237 {
9238 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9239 rb_parser_printf(p, "NODE_SPECIAL");
9240 }
9241 else if (((*yyvaluep).node)) {
9242 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9243 }
9244}
9245#line 9246 "parse.c"
9246 break;
9247
9248 case YYSYMBOL_op_asgn_arg_rhs: /* op_asgn_arg_rhs */
9249#line 2618 "parse.y"
9250 {
9251 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9252 rb_parser_printf(p, "NODE_SPECIAL");
9253 }
9254 else if (((*yyvaluep).node)) {
9255 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9256 }
9257}
9258#line 9259 "parse.c"
9259 break;
9260
9261 case YYSYMBOL_range_expr_arg: /* range_expr_arg */
9262#line 2618 "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_def_endless_method_endless_arg: /* def_endless_method_endless_arg */
9275#line 2618 "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_ternary: /* ternary */
9288#line 2618 "parse.y"
9289 {
9290 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9291 rb_parser_printf(p, "NODE_SPECIAL");
9292 }
9293 else if (((*yyvaluep).node)) {
9294 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9295 }
9296}
9297#line 9298 "parse.c"
9298 break;
9299
9300 case YYSYMBOL_endless_arg: /* endless_arg */
9301#line 2618 "parse.y"
9302 {
9303 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9304 rb_parser_printf(p, "NODE_SPECIAL");
9305 }
9306 else if (((*yyvaluep).node)) {
9307 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9308 }
9309}
9310#line 9311 "parse.c"
9311 break;
9312
9313 case YYSYMBOL_relop: /* relop */
9314#line 2627 "parse.y"
9315 {
9316 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9317}
9318#line 9319 "parse.c"
9319 break;
9320
9321 case YYSYMBOL_rel_expr: /* rel_expr */
9322#line 2618 "parse.y"
9323 {
9324 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9325 rb_parser_printf(p, "NODE_SPECIAL");
9326 }
9327 else if (((*yyvaluep).node)) {
9328 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9329 }
9330}
9331#line 9332 "parse.c"
9332 break;
9333
9334 case YYSYMBOL_value_expr_arg: /* value_expr_arg */
9335#line 2618 "parse.y"
9336 {
9337 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9338 rb_parser_printf(p, "NODE_SPECIAL");
9339 }
9340 else if (((*yyvaluep).node)) {
9341 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9342 }
9343}
9344#line 9345 "parse.c"
9345 break;
9346
9347 case YYSYMBOL_arg_value: /* arg_value */
9348#line 2618 "parse.y"
9349 {
9350 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9351 rb_parser_printf(p, "NODE_SPECIAL");
9352 }
9353 else if (((*yyvaluep).node)) {
9354 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9355 }
9356}
9357#line 9358 "parse.c"
9358 break;
9359
9360 case YYSYMBOL_aref_args: /* aref_args */
9361#line 2618 "parse.y"
9362 {
9363 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9364 rb_parser_printf(p, "NODE_SPECIAL");
9365 }
9366 else if (((*yyvaluep).node)) {
9367 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9368 }
9369}
9370#line 9371 "parse.c"
9371 break;
9372
9373 case YYSYMBOL_arg_rhs: /* arg_rhs */
9374#line 2618 "parse.y"
9375 {
9376 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9377 rb_parser_printf(p, "NODE_SPECIAL");
9378 }
9379 else if (((*yyvaluep).node)) {
9380 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9381 }
9382}
9383#line 9384 "parse.c"
9384 break;
9385
9386 case YYSYMBOL_paren_args: /* paren_args */
9387#line 2618 "parse.y"
9388 {
9389 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9390 rb_parser_printf(p, "NODE_SPECIAL");
9391 }
9392 else if (((*yyvaluep).node)) {
9393 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9394 }
9395}
9396#line 9397 "parse.c"
9397 break;
9398
9399 case YYSYMBOL_opt_paren_args: /* opt_paren_args */
9400#line 2618 "parse.y"
9401 {
9402 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9403 rb_parser_printf(p, "NODE_SPECIAL");
9404 }
9405 else if (((*yyvaluep).node)) {
9406 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9407 }
9408}
9409#line 9410 "parse.c"
9410 break;
9411
9412 case YYSYMBOL_opt_call_args: /* opt_call_args */
9413#line 2618 "parse.y"
9414 {
9415 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9416 rb_parser_printf(p, "NODE_SPECIAL");
9417 }
9418 else if (((*yyvaluep).node)) {
9419 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9420 }
9421}
9422#line 9423 "parse.c"
9423 break;
9424
9425 case YYSYMBOL_value_expr_command: /* value_expr_command */
9426#line 2618 "parse.y"
9427 {
9428 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9429 rb_parser_printf(p, "NODE_SPECIAL");
9430 }
9431 else if (((*yyvaluep).node)) {
9432 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9433 }
9434}
9435#line 9436 "parse.c"
9436 break;
9437
9438 case YYSYMBOL_call_args: /* call_args */
9439#line 2618 "parse.y"
9440 {
9441 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9442 rb_parser_printf(p, "NODE_SPECIAL");
9443 }
9444 else if (((*yyvaluep).node)) {
9445 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9446 }
9447}
9448#line 9449 "parse.c"
9449 break;
9450
9451 case YYSYMBOL_command_args: /* command_args */
9452#line 2618 "parse.y"
9453 {
9454 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9455 rb_parser_printf(p, "NODE_SPECIAL");
9456 }
9457 else if (((*yyvaluep).node)) {
9458 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9459 }
9460}
9461#line 9462 "parse.c"
9462 break;
9463
9464 case YYSYMBOL_block_arg: /* block_arg */
9465#line 2618 "parse.y"
9466 {
9467 if ((NODE *)((*yyvaluep).node_block_pass) == (NODE *)-1) {
9468 rb_parser_printf(p, "NODE_SPECIAL");
9469 }
9470 else if (((*yyvaluep).node_block_pass)) {
9471 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_block_pass)))));
9472 }
9473}
9474#line 9475 "parse.c"
9475 break;
9476
9477 case YYSYMBOL_opt_block_arg: /* opt_block_arg */
9478#line 2618 "parse.y"
9479 {
9480 if ((NODE *)((*yyvaluep).node_block_pass) == (NODE *)-1) {
9481 rb_parser_printf(p, "NODE_SPECIAL");
9482 }
9483 else if (((*yyvaluep).node_block_pass)) {
9484 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_block_pass)))));
9485 }
9486}
9487#line 9488 "parse.c"
9488 break;
9489
9490 case YYSYMBOL_args: /* args */
9491#line 2618 "parse.y"
9492 {
9493 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9494 rb_parser_printf(p, "NODE_SPECIAL");
9495 }
9496 else if (((*yyvaluep).node)) {
9497 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9498 }
9499}
9500#line 9501 "parse.c"
9501 break;
9502
9503 case YYSYMBOL_arg_splat: /* arg_splat */
9504#line 2618 "parse.y"
9505 {
9506 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9507 rb_parser_printf(p, "NODE_SPECIAL");
9508 }
9509 else if (((*yyvaluep).node)) {
9510 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9511 }
9512}
9513#line 9514 "parse.c"
9514 break;
9515
9516 case YYSYMBOL_mrhs_arg: /* mrhs_arg */
9517#line 2618 "parse.y"
9518 {
9519 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9520 rb_parser_printf(p, "NODE_SPECIAL");
9521 }
9522 else if (((*yyvaluep).node)) {
9523 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9524 }
9525}
9526#line 9527 "parse.c"
9527 break;
9528
9529 case YYSYMBOL_mrhs: /* mrhs */
9530#line 2618 "parse.y"
9531 {
9532 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9533 rb_parser_printf(p, "NODE_SPECIAL");
9534 }
9535 else if (((*yyvaluep).node)) {
9536 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9537 }
9538}
9539#line 9540 "parse.c"
9540 break;
9541
9542 case YYSYMBOL_primary: /* primary */
9543#line 2618 "parse.y"
9544 {
9545 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9546 rb_parser_printf(p, "NODE_SPECIAL");
9547 }
9548 else if (((*yyvaluep).node)) {
9549 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9550 }
9551}
9552#line 9553 "parse.c"
9553 break;
9554
9555 case YYSYMBOL_value_expr_primary: /* value_expr_primary */
9556#line 2618 "parse.y"
9557 {
9558 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9559 rb_parser_printf(p, "NODE_SPECIAL");
9560 }
9561 else if (((*yyvaluep).node)) {
9562 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9563 }
9564}
9565#line 9566 "parse.c"
9566 break;
9567
9568 case YYSYMBOL_primary_value: /* primary_value */
9569#line 2618 "parse.y"
9570 {
9571 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9572 rb_parser_printf(p, "NODE_SPECIAL");
9573 }
9574 else if (((*yyvaluep).node)) {
9575 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9576 }
9577}
9578#line 9579 "parse.c"
9579 break;
9580
9581 case YYSYMBOL_k_while: /* k_while */
9582#line 2618 "parse.y"
9583 {
9584 if ((NODE *)((*yyvaluep).node_exits) == (NODE *)-1) {
9585 rb_parser_printf(p, "NODE_SPECIAL");
9586 }
9587 else if (((*yyvaluep).node_exits)) {
9588 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_exits)))));
9589 }
9590}
9591#line 9592 "parse.c"
9592 break;
9593
9594 case YYSYMBOL_k_until: /* k_until */
9595#line 2618 "parse.y"
9596 {
9597 if ((NODE *)((*yyvaluep).node_exits) == (NODE *)-1) {
9598 rb_parser_printf(p, "NODE_SPECIAL");
9599 }
9600 else if (((*yyvaluep).node_exits)) {
9601 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_exits)))));
9602 }
9603}
9604#line 9605 "parse.c"
9605 break;
9606
9607 case YYSYMBOL_k_for: /* k_for */
9608#line 2618 "parse.y"
9609 {
9610 if ((NODE *)((*yyvaluep).node_exits) == (NODE *)-1) {
9611 rb_parser_printf(p, "NODE_SPECIAL");
9612 }
9613 else if (((*yyvaluep).node_exits)) {
9614 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_exits)))));
9615 }
9616}
9617#line 9618 "parse.c"
9618 break;
9619
9620 case YYSYMBOL_k_def: /* k_def */
9621#line 2618 "parse.y"
9622 {
9623 if ((NODE *)((*yyvaluep).node_def_temp) == (NODE *)-1) {
9624 rb_parser_printf(p, "NODE_SPECIAL");
9625 }
9626 else if (((*yyvaluep).node_def_temp)) {
9627 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_def_temp)))));
9628 }
9629}
9630#line 9631 "parse.c"
9631 break;
9632
9633 case YYSYMBOL_do: /* do */
9634#line 2627 "parse.y"
9635 {
9636 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9637}
9638#line 9639 "parse.c"
9639 break;
9640
9641 case YYSYMBOL_if_tail: /* if_tail */
9642#line 2618 "parse.y"
9643 {
9644 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9645 rb_parser_printf(p, "NODE_SPECIAL");
9646 }
9647 else if (((*yyvaluep).node)) {
9648 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9649 }
9650}
9651#line 9652 "parse.c"
9652 break;
9653
9654 case YYSYMBOL_opt_else: /* opt_else */
9655#line 2618 "parse.y"
9656 {
9657 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9658 rb_parser_printf(p, "NODE_SPECIAL");
9659 }
9660 else if (((*yyvaluep).node)) {
9661 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9662 }
9663}
9664#line 9665 "parse.c"
9665 break;
9666
9667 case YYSYMBOL_for_var: /* for_var */
9668#line 2618 "parse.y"
9669 {
9670 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9671 rb_parser_printf(p, "NODE_SPECIAL");
9672 }
9673 else if (((*yyvaluep).node)) {
9674 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9675 }
9676}
9677#line 9678 "parse.c"
9678 break;
9679
9680 case YYSYMBOL_f_marg: /* f_marg */
9681#line 2618 "parse.y"
9682 {
9683 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9684 rb_parser_printf(p, "NODE_SPECIAL");
9685 }
9686 else if (((*yyvaluep).node)) {
9687 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9688 }
9689}
9690#line 9691 "parse.c"
9691 break;
9692
9693 case YYSYMBOL_mlhs_items_f_marg: /* mlhs_items_f_marg */
9694#line 2618 "parse.y"
9695 {
9696 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9697 rb_parser_printf(p, "NODE_SPECIAL");
9698 }
9699 else if (((*yyvaluep).node)) {
9700 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9701 }
9702}
9703#line 9704 "parse.c"
9704 break;
9705
9706 case YYSYMBOL_f_margs: /* f_margs */
9707#line 2618 "parse.y"
9708 {
9709 if ((NODE *)((*yyvaluep).node_masgn) == (NODE *)-1) {
9710 rb_parser_printf(p, "NODE_SPECIAL");
9711 }
9712 else if (((*yyvaluep).node_masgn)) {
9713 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_masgn)))));
9714 }
9715}
9716#line 9717 "parse.c"
9717 break;
9718
9719 case YYSYMBOL_f_rest_marg: /* f_rest_marg */
9720#line 2618 "parse.y"
9721 {
9722 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9723 rb_parser_printf(p, "NODE_SPECIAL");
9724 }
9725 else if (((*yyvaluep).node)) {
9726 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9727 }
9728}
9729#line 9730 "parse.c"
9730 break;
9731
9732 case YYSYMBOL_f_any_kwrest: /* f_any_kwrest */
9733#line 2627 "parse.y"
9734 {
9735 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9736}
9737#line 9738 "parse.c"
9738 break;
9739
9740 case YYSYMBOL_f_kw_primary_value: /* f_kw_primary_value */
9741#line 2618 "parse.y"
9742 {
9743 if ((NODE *)((*yyvaluep).node_kw_arg) == (NODE *)-1) {
9744 rb_parser_printf(p, "NODE_SPECIAL");
9745 }
9746 else if (((*yyvaluep).node_kw_arg)) {
9747 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_kw_arg)))));
9748 }
9749}
9750#line 9751 "parse.c"
9751 break;
9752
9753 case YYSYMBOL_f_kwarg_primary_value: /* f_kwarg_primary_value */
9754#line 2618 "parse.y"
9755 {
9756 if ((NODE *)((*yyvaluep).node_kw_arg) == (NODE *)-1) {
9757 rb_parser_printf(p, "NODE_SPECIAL");
9758 }
9759 else if (((*yyvaluep).node_kw_arg)) {
9760 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_kw_arg)))));
9761 }
9762}
9763#line 9764 "parse.c"
9764 break;
9765
9766 case YYSYMBOL_args_tail_basic_primary_value: /* args_tail_basic_primary_value */
9767#line 2618 "parse.y"
9768 {
9769 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9770 rb_parser_printf(p, "NODE_SPECIAL");
9771 }
9772 else if (((*yyvaluep).node_args)) {
9773 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9774 }
9775}
9776#line 9777 "parse.c"
9777 break;
9778
9779 case YYSYMBOL_block_args_tail: /* block_args_tail */
9780#line 2618 "parse.y"
9781 {
9782 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9783 rb_parser_printf(p, "NODE_SPECIAL");
9784 }
9785 else if (((*yyvaluep).node_args)) {
9786 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9787 }
9788}
9789#line 9790 "parse.c"
9790 break;
9791
9792 case YYSYMBOL_opt_args_tail_block_args_tail: /* opt_args_tail_block_args_tail */
9793#line 2618 "parse.y"
9794 {
9795 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9796 rb_parser_printf(p, "NODE_SPECIAL");
9797 }
9798 else if (((*yyvaluep).node_args)) {
9799 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9800 }
9801}
9802#line 9803 "parse.c"
9803 break;
9804
9805 case YYSYMBOL_block_args_opt_tail: /* block_args-opt_tail */
9806#line 2618 "parse.y"
9807 {
9808 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9809 rb_parser_printf(p, "NODE_SPECIAL");
9810 }
9811 else if (((*yyvaluep).node_args)) {
9812 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9813 }
9814}
9815#line 9816 "parse.c"
9816 break;
9817
9818 case YYSYMBOL_excessed_comma: /* excessed_comma */
9819#line 2627 "parse.y"
9820 {
9821 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9822}
9823#line 9824 "parse.c"
9824 break;
9825
9826 case YYSYMBOL_f_opt_primary_value: /* f_opt_primary_value */
9827#line 2618 "parse.y"
9828 {
9829 if ((NODE *)((*yyvaluep).node_opt_arg) == (NODE *)-1) {
9830 rb_parser_printf(p, "NODE_SPECIAL");
9831 }
9832 else if (((*yyvaluep).node_opt_arg)) {
9833 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_opt_arg)))));
9834 }
9835}
9836#line 9837 "parse.c"
9837 break;
9838
9839 case YYSYMBOL_f_opt_arg_primary_value: /* f_opt_arg_primary_value */
9840#line 2618 "parse.y"
9841 {
9842 if ((NODE *)((*yyvaluep).node_opt_arg) == (NODE *)-1) {
9843 rb_parser_printf(p, "NODE_SPECIAL");
9844 }
9845 else if (((*yyvaluep).node_opt_arg)) {
9846 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_opt_arg)))));
9847 }
9848}
9849#line 9850 "parse.c"
9850 break;
9851
9852 case YYSYMBOL_args_list_primary_value_block_args_opt_tail: /* args-list_primary_value_block_args-opt_tail */
9853#line 2618 "parse.y"
9854 {
9855 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9856 rb_parser_printf(p, "NODE_SPECIAL");
9857 }
9858 else if (((*yyvaluep).node_args)) {
9859 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9860 }
9861}
9862#line 9863 "parse.c"
9863 break;
9864
9865 case YYSYMBOL_block_param: /* block_param */
9866#line 2618 "parse.y"
9867 {
9868 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9869 rb_parser_printf(p, "NODE_SPECIAL");
9870 }
9871 else if (((*yyvaluep).node_args)) {
9872 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9873 }
9874}
9875#line 9876 "parse.c"
9876 break;
9877
9878 case YYSYMBOL_tail_only_args_block_args_tail: /* tail-only-args_block_args_tail */
9879#line 2618 "parse.y"
9880 {
9881 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9882 rb_parser_printf(p, "NODE_SPECIAL");
9883 }
9884 else if (((*yyvaluep).node_args)) {
9885 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9886 }
9887}
9888#line 9889 "parse.c"
9889 break;
9890
9891 case YYSYMBOL_opt_block_param_def: /* opt_block_param_def */
9892#line 2618 "parse.y"
9893 {
9894 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9895 rb_parser_printf(p, "NODE_SPECIAL");
9896 }
9897 else if (((*yyvaluep).node_args)) {
9898 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9899 }
9900}
9901#line 9902 "parse.c"
9902 break;
9903
9904 case YYSYMBOL_block_param_def: /* block_param_def */
9905#line 2618 "parse.y"
9906 {
9907 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9908 rb_parser_printf(p, "NODE_SPECIAL");
9909 }
9910 else if (((*yyvaluep).node_args)) {
9911 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9912 }
9913}
9914#line 9915 "parse.c"
9915 break;
9916
9917 case YYSYMBOL_opt_block_param: /* opt_block_param */
9918#line 2618 "parse.y"
9919 {
9920 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9921 rb_parser_printf(p, "NODE_SPECIAL");
9922 }
9923 else if (((*yyvaluep).node_args)) {
9924 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9925 }
9926}
9927#line 9928 "parse.c"
9928 break;
9929
9930 case YYSYMBOL_opt_bv_decl: /* opt_bv_decl */
9931#line 2627 "parse.y"
9932 {
9933 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9934}
9935#line 9936 "parse.c"
9936 break;
9937
9938 case YYSYMBOL_bv_decls: /* bv_decls */
9939#line 2627 "parse.y"
9940 {
9941 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9942}
9943#line 9944 "parse.c"
9944 break;
9945
9946 case YYSYMBOL_bvar: /* bvar */
9947#line 2627 "parse.y"
9948 {
9949 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9950}
9951#line 9952 "parse.c"
9952 break;
9953
9954 case YYSYMBOL_numparam: /* numparam */
9955#line 2618 "parse.y"
9956 {
9957 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9958 rb_parser_printf(p, "NODE_SPECIAL");
9959 }
9960 else if (((*yyvaluep).node)) {
9961 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9962 }
9963}
9964#line 9965 "parse.c"
9965 break;
9966
9967 case YYSYMBOL_it_id: /* it_id */
9968#line 2627 "parse.y"
9969 {
9970 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9971}
9972#line 9973 "parse.c"
9973 break;
9974
9975 case YYSYMBOL_lambda: /* lambda */
9976#line 2618 "parse.y"
9977 {
9978 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9979 rb_parser_printf(p, "NODE_SPECIAL");
9980 }
9981 else if (((*yyvaluep).node)) {
9982 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9983 }
9984}
9985#line 9986 "parse.c"
9986 break;
9987
9988 case YYSYMBOL_f_larglist: /* f_larglist */
9989#line 2618 "parse.y"
9990 {
9991 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9992 rb_parser_printf(p, "NODE_SPECIAL");
9993 }
9994 else if (((*yyvaluep).node_args)) {
9995 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9996 }
9997}
9998#line 9999 "parse.c"
9999 break;
10000
10001 case YYSYMBOL_do_block: /* do_block */
10002#line 2618 "parse.y"
10003 {
10004 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10005 rb_parser_printf(p, "NODE_SPECIAL");
10006 }
10007 else if (((*yyvaluep).node)) {
10008 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10009 }
10010}
10011#line 10012 "parse.c"
10012 break;
10013
10014 case YYSYMBOL_block_call: /* block_call */
10015#line 2618 "parse.y"
10016 {
10017 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10018 rb_parser_printf(p, "NODE_SPECIAL");
10019 }
10020 else if (((*yyvaluep).node)) {
10021 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10022 }
10023}
10024#line 10025 "parse.c"
10025 break;
10026
10027 case YYSYMBOL_method_call: /* method_call */
10028#line 2618 "parse.y"
10029 {
10030 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10031 rb_parser_printf(p, "NODE_SPECIAL");
10032 }
10033 else if (((*yyvaluep).node)) {
10034 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10035 }
10036}
10037#line 10038 "parse.c"
10038 break;
10039
10040 case YYSYMBOL_brace_block: /* brace_block */
10041#line 2618 "parse.y"
10042 {
10043 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10044 rb_parser_printf(p, "NODE_SPECIAL");
10045 }
10046 else if (((*yyvaluep).node)) {
10047 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10048 }
10049}
10050#line 10051 "parse.c"
10051 break;
10052
10053 case YYSYMBOL_brace_body: /* brace_body */
10054#line 2618 "parse.y"
10055 {
10056 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10057 rb_parser_printf(p, "NODE_SPECIAL");
10058 }
10059 else if (((*yyvaluep).node)) {
10060 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10061 }
10062}
10063#line 10064 "parse.c"
10064 break;
10065
10066 case YYSYMBOL_do_body: /* do_body */
10067#line 2618 "parse.y"
10068 {
10069 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10070 rb_parser_printf(p, "NODE_SPECIAL");
10071 }
10072 else if (((*yyvaluep).node)) {
10073 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10074 }
10075}
10076#line 10077 "parse.c"
10077 break;
10078
10079 case YYSYMBOL_case_args: /* case_args */
10080#line 2618 "parse.y"
10081 {
10082 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10083 rb_parser_printf(p, "NODE_SPECIAL");
10084 }
10085 else if (((*yyvaluep).node)) {
10086 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10087 }
10088}
10089#line 10090 "parse.c"
10090 break;
10091
10092 case YYSYMBOL_case_body: /* case_body */
10093#line 2618 "parse.y"
10094 {
10095 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10096 rb_parser_printf(p, "NODE_SPECIAL");
10097 }
10098 else if (((*yyvaluep).node)) {
10099 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10100 }
10101}
10102#line 10103 "parse.c"
10103 break;
10104
10105 case YYSYMBOL_cases: /* cases */
10106#line 2618 "parse.y"
10107 {
10108 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10109 rb_parser_printf(p, "NODE_SPECIAL");
10110 }
10111 else if (((*yyvaluep).node)) {
10112 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10113 }
10114}
10115#line 10116 "parse.c"
10116 break;
10117
10118 case YYSYMBOL_p_case_body: /* p_case_body */
10119#line 2618 "parse.y"
10120 {
10121 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10122 rb_parser_printf(p, "NODE_SPECIAL");
10123 }
10124 else if (((*yyvaluep).node)) {
10125 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10126 }
10127}
10128#line 10129 "parse.c"
10129 break;
10130
10131 case YYSYMBOL_p_cases: /* p_cases */
10132#line 2618 "parse.y"
10133 {
10134 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10135 rb_parser_printf(p, "NODE_SPECIAL");
10136 }
10137 else if (((*yyvaluep).node)) {
10138 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10139 }
10140}
10141#line 10142 "parse.c"
10142 break;
10143
10144 case YYSYMBOL_p_top_expr: /* p_top_expr */
10145#line 2618 "parse.y"
10146 {
10147 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10148 rb_parser_printf(p, "NODE_SPECIAL");
10149 }
10150 else if (((*yyvaluep).node)) {
10151 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10152 }
10153}
10154#line 10155 "parse.c"
10155 break;
10156
10157 case YYSYMBOL_p_top_expr_body: /* p_top_expr_body */
10158#line 2618 "parse.y"
10159 {
10160 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10161 rb_parser_printf(p, "NODE_SPECIAL");
10162 }
10163 else if (((*yyvaluep).node)) {
10164 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10165 }
10166}
10167#line 10168 "parse.c"
10168 break;
10169
10170 case YYSYMBOL_p_expr: /* p_expr */
10171#line 2618 "parse.y"
10172 {
10173 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10174 rb_parser_printf(p, "NODE_SPECIAL");
10175 }
10176 else if (((*yyvaluep).node)) {
10177 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10178 }
10179}
10180#line 10181 "parse.c"
10181 break;
10182
10183 case YYSYMBOL_p_as: /* p_as */
10184#line 2618 "parse.y"
10185 {
10186 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10187 rb_parser_printf(p, "NODE_SPECIAL");
10188 }
10189 else if (((*yyvaluep).node)) {
10190 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10191 }
10192}
10193#line 10194 "parse.c"
10194 break;
10195
10196 case YYSYMBOL_p_alt: /* p_alt */
10197#line 2618 "parse.y"
10198 {
10199 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10200 rb_parser_printf(p, "NODE_SPECIAL");
10201 }
10202 else if (((*yyvaluep).node)) {
10203 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10204 }
10205}
10206#line 10207 "parse.c"
10207 break;
10208
10209 case YYSYMBOL_p_expr_basic: /* p_expr_basic */
10210#line 2618 "parse.y"
10211 {
10212 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10213 rb_parser_printf(p, "NODE_SPECIAL");
10214 }
10215 else if (((*yyvaluep).node)) {
10216 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10217 }
10218}
10219#line 10220 "parse.c"
10220 break;
10221
10222 case YYSYMBOL_p_args: /* p_args */
10223#line 2618 "parse.y"
10224 {
10225 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10226 rb_parser_printf(p, "NODE_SPECIAL");
10227 }
10228 else if (((*yyvaluep).node)) {
10229 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10230 }
10231}
10232#line 10233 "parse.c"
10233 break;
10234
10235 case YYSYMBOL_p_args_head: /* p_args_head */
10236#line 2618 "parse.y"
10237 {
10238 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10239 rb_parser_printf(p, "NODE_SPECIAL");
10240 }
10241 else if (((*yyvaluep).node)) {
10242 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10243 }
10244}
10245#line 10246 "parse.c"
10246 break;
10247
10248 case YYSYMBOL_p_args_tail: /* p_args_tail */
10249#line 2618 "parse.y"
10250 {
10251 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10252 rb_parser_printf(p, "NODE_SPECIAL");
10253 }
10254 else if (((*yyvaluep).node)) {
10255 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10256 }
10257}
10258#line 10259 "parse.c"
10259 break;
10260
10261 case YYSYMBOL_p_find: /* p_find */
10262#line 2618 "parse.y"
10263 {
10264 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10265 rb_parser_printf(p, "NODE_SPECIAL");
10266 }
10267 else if (((*yyvaluep).node)) {
10268 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10269 }
10270}
10271#line 10272 "parse.c"
10272 break;
10273
10274 case YYSYMBOL_p_rest: /* p_rest */
10275#line 2618 "parse.y"
10276 {
10277 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10278 rb_parser_printf(p, "NODE_SPECIAL");
10279 }
10280 else if (((*yyvaluep).node)) {
10281 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10282 }
10283}
10284#line 10285 "parse.c"
10285 break;
10286
10287 case YYSYMBOL_p_args_post: /* p_args_post */
10288#line 2618 "parse.y"
10289 {
10290 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10291 rb_parser_printf(p, "NODE_SPECIAL");
10292 }
10293 else if (((*yyvaluep).node)) {
10294 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10295 }
10296}
10297#line 10298 "parse.c"
10298 break;
10299
10300 case YYSYMBOL_p_arg: /* p_arg */
10301#line 2618 "parse.y"
10302 {
10303 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10304 rb_parser_printf(p, "NODE_SPECIAL");
10305 }
10306 else if (((*yyvaluep).node)) {
10307 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10308 }
10309}
10310#line 10311 "parse.c"
10311 break;
10312
10313 case YYSYMBOL_p_kwargs: /* p_kwargs */
10314#line 2618 "parse.y"
10315 {
10316 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10317 rb_parser_printf(p, "NODE_SPECIAL");
10318 }
10319 else if (((*yyvaluep).node)) {
10320 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10321 }
10322}
10323#line 10324 "parse.c"
10324 break;
10325
10326 case YYSYMBOL_p_kwarg: /* p_kwarg */
10327#line 2618 "parse.y"
10328 {
10329 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10330 rb_parser_printf(p, "NODE_SPECIAL");
10331 }
10332 else if (((*yyvaluep).node)) {
10333 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10334 }
10335}
10336#line 10337 "parse.c"
10337 break;
10338
10339 case YYSYMBOL_p_kw: /* p_kw */
10340#line 2618 "parse.y"
10341 {
10342 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10343 rb_parser_printf(p, "NODE_SPECIAL");
10344 }
10345 else if (((*yyvaluep).node)) {
10346 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10347 }
10348}
10349#line 10350 "parse.c"
10350 break;
10351
10352 case YYSYMBOL_p_kw_label: /* p_kw_label */
10353#line 2627 "parse.y"
10354 {
10355 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10356}
10357#line 10358 "parse.c"
10358 break;
10359
10360 case YYSYMBOL_p_kwrest: /* p_kwrest */
10361#line 2627 "parse.y"
10362 {
10363 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10364}
10365#line 10366 "parse.c"
10366 break;
10367
10368 case YYSYMBOL_p_kwnorest: /* p_kwnorest */
10369#line 2627 "parse.y"
10370 {
10371 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10372}
10373#line 10374 "parse.c"
10374 break;
10375
10376 case YYSYMBOL_p_any_kwrest: /* p_any_kwrest */
10377#line 2627 "parse.y"
10378 {
10379 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10380}
10381#line 10382 "parse.c"
10382 break;
10383
10384 case YYSYMBOL_p_value: /* p_value */
10385#line 2618 "parse.y"
10386 {
10387 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10388 rb_parser_printf(p, "NODE_SPECIAL");
10389 }
10390 else if (((*yyvaluep).node)) {
10391 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10392 }
10393}
10394#line 10395 "parse.c"
10395 break;
10396
10397 case YYSYMBOL_range_expr_p_primitive: /* range_expr_p_primitive */
10398#line 2618 "parse.y"
10399 {
10400 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10401 rb_parser_printf(p, "NODE_SPECIAL");
10402 }
10403 else if (((*yyvaluep).node)) {
10404 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10405 }
10406}
10407#line 10408 "parse.c"
10408 break;
10409
10410 case YYSYMBOL_p_primitive: /* p_primitive */
10411#line 2618 "parse.y"
10412 {
10413 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10414 rb_parser_printf(p, "NODE_SPECIAL");
10415 }
10416 else if (((*yyvaluep).node)) {
10417 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10418 }
10419}
10420#line 10421 "parse.c"
10421 break;
10422
10423 case YYSYMBOL_p_variable: /* p_variable */
10424#line 2618 "parse.y"
10425 {
10426 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10427 rb_parser_printf(p, "NODE_SPECIAL");
10428 }
10429 else if (((*yyvaluep).node)) {
10430 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10431 }
10432}
10433#line 10434 "parse.c"
10434 break;
10435
10436 case YYSYMBOL_p_var_ref: /* p_var_ref */
10437#line 2618 "parse.y"
10438 {
10439 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10440 rb_parser_printf(p, "NODE_SPECIAL");
10441 }
10442 else if (((*yyvaluep).node)) {
10443 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10444 }
10445}
10446#line 10447 "parse.c"
10447 break;
10448
10449 case YYSYMBOL_p_expr_ref: /* p_expr_ref */
10450#line 2618 "parse.y"
10451 {
10452 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10453 rb_parser_printf(p, "NODE_SPECIAL");
10454 }
10455 else if (((*yyvaluep).node)) {
10456 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10457 }
10458}
10459#line 10460 "parse.c"
10460 break;
10461
10462 case YYSYMBOL_p_const: /* p_const */
10463#line 2618 "parse.y"
10464 {
10465 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10466 rb_parser_printf(p, "NODE_SPECIAL");
10467 }
10468 else if (((*yyvaluep).node)) {
10469 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10470 }
10471}
10472#line 10473 "parse.c"
10473 break;
10474
10475 case YYSYMBOL_opt_rescue: /* opt_rescue */
10476#line 2618 "parse.y"
10477 {
10478 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10479 rb_parser_printf(p, "NODE_SPECIAL");
10480 }
10481 else if (((*yyvaluep).node)) {
10482 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10483 }
10484}
10485#line 10486 "parse.c"
10486 break;
10487
10488 case YYSYMBOL_exc_list: /* exc_list */
10489#line 2618 "parse.y"
10490 {
10491 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10492 rb_parser_printf(p, "NODE_SPECIAL");
10493 }
10494 else if (((*yyvaluep).node)) {
10495 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10496 }
10497}
10498#line 10499 "parse.c"
10499 break;
10500
10501 case YYSYMBOL_exc_var: /* exc_var */
10502#line 2618 "parse.y"
10503 {
10504 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10505 rb_parser_printf(p, "NODE_SPECIAL");
10506 }
10507 else if (((*yyvaluep).node)) {
10508 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10509 }
10510}
10511#line 10512 "parse.c"
10512 break;
10513
10514 case YYSYMBOL_opt_ensure: /* opt_ensure */
10515#line 2618 "parse.y"
10516 {
10517 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10518 rb_parser_printf(p, "NODE_SPECIAL");
10519 }
10520 else if (((*yyvaluep).node)) {
10521 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10522 }
10523}
10524#line 10525 "parse.c"
10525 break;
10526
10527 case YYSYMBOL_literal: /* literal */
10528#line 2618 "parse.y"
10529 {
10530 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10531 rb_parser_printf(p, "NODE_SPECIAL");
10532 }
10533 else if (((*yyvaluep).node)) {
10534 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10535 }
10536}
10537#line 10538 "parse.c"
10538 break;
10539
10540 case YYSYMBOL_strings: /* strings */
10541#line 2618 "parse.y"
10542 {
10543 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10544 rb_parser_printf(p, "NODE_SPECIAL");
10545 }
10546 else if (((*yyvaluep).node)) {
10547 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10548 }
10549}
10550#line 10551 "parse.c"
10551 break;
10552
10553 case YYSYMBOL_string: /* string */
10554#line 2618 "parse.y"
10555 {
10556 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10557 rb_parser_printf(p, "NODE_SPECIAL");
10558 }
10559 else if (((*yyvaluep).node)) {
10560 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10561 }
10562}
10563#line 10564 "parse.c"
10564 break;
10565
10566 case YYSYMBOL_string1: /* string1 */
10567#line 2618 "parse.y"
10568 {
10569 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10570 rb_parser_printf(p, "NODE_SPECIAL");
10571 }
10572 else if (((*yyvaluep).node)) {
10573 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10574 }
10575}
10576#line 10577 "parse.c"
10577 break;
10578
10579 case YYSYMBOL_xstring: /* xstring */
10580#line 2618 "parse.y"
10581 {
10582 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10583 rb_parser_printf(p, "NODE_SPECIAL");
10584 }
10585 else if (((*yyvaluep).node)) {
10586 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10587 }
10588}
10589#line 10590 "parse.c"
10590 break;
10591
10592 case YYSYMBOL_regexp: /* regexp */
10593#line 2618 "parse.y"
10594 {
10595 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10596 rb_parser_printf(p, "NODE_SPECIAL");
10597 }
10598 else if (((*yyvaluep).node)) {
10599 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10600 }
10601}
10602#line 10603 "parse.c"
10603 break;
10604
10605 case YYSYMBOL_words_tWORDS_BEG_word_list: /* words_tWORDS_BEG_word_list */
10606#line 2618 "parse.y"
10607 {
10608 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10609 rb_parser_printf(p, "NODE_SPECIAL");
10610 }
10611 else if (((*yyvaluep).node)) {
10612 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10613 }
10614}
10615#line 10616 "parse.c"
10616 break;
10617
10618 case YYSYMBOL_words: /* words */
10619#line 2618 "parse.y"
10620 {
10621 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10622 rb_parser_printf(p, "NODE_SPECIAL");
10623 }
10624 else if (((*yyvaluep).node)) {
10625 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10626 }
10627}
10628#line 10629 "parse.c"
10629 break;
10630
10631 case YYSYMBOL_word_list: /* word_list */
10632#line 2618 "parse.y"
10633 {
10634 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10635 rb_parser_printf(p, "NODE_SPECIAL");
10636 }
10637 else if (((*yyvaluep).node)) {
10638 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10639 }
10640}
10641#line 10642 "parse.c"
10642 break;
10643
10644 case YYSYMBOL_word: /* word */
10645#line 2618 "parse.y"
10646 {
10647 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10648 rb_parser_printf(p, "NODE_SPECIAL");
10649 }
10650 else if (((*yyvaluep).node)) {
10651 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10652 }
10653}
10654#line 10655 "parse.c"
10655 break;
10656
10657 case YYSYMBOL_words_tSYMBOLS_BEG_symbol_list: /* words_tSYMBOLS_BEG_symbol_list */
10658#line 2618 "parse.y"
10659 {
10660 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10661 rb_parser_printf(p, "NODE_SPECIAL");
10662 }
10663 else if (((*yyvaluep).node)) {
10664 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10665 }
10666}
10667#line 10668 "parse.c"
10668 break;
10669
10670 case YYSYMBOL_symbols: /* symbols */
10671#line 2618 "parse.y"
10672 {
10673 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10674 rb_parser_printf(p, "NODE_SPECIAL");
10675 }
10676 else if (((*yyvaluep).node)) {
10677 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10678 }
10679}
10680#line 10681 "parse.c"
10681 break;
10682
10683 case YYSYMBOL_symbol_list: /* symbol_list */
10684#line 2618 "parse.y"
10685 {
10686 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10687 rb_parser_printf(p, "NODE_SPECIAL");
10688 }
10689 else if (((*yyvaluep).node)) {
10690 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10691 }
10692}
10693#line 10694 "parse.c"
10694 break;
10695
10696 case YYSYMBOL_words_tQWORDS_BEG_qword_list: /* words_tQWORDS_BEG_qword_list */
10697#line 2618 "parse.y"
10698 {
10699 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10700 rb_parser_printf(p, "NODE_SPECIAL");
10701 }
10702 else if (((*yyvaluep).node)) {
10703 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10704 }
10705}
10706#line 10707 "parse.c"
10707 break;
10708
10709 case YYSYMBOL_qwords: /* qwords */
10710#line 2618 "parse.y"
10711 {
10712 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10713 rb_parser_printf(p, "NODE_SPECIAL");
10714 }
10715 else if (((*yyvaluep).node)) {
10716 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10717 }
10718}
10719#line 10720 "parse.c"
10720 break;
10721
10722 case YYSYMBOL_words_tQSYMBOLS_BEG_qsym_list: /* words_tQSYMBOLS_BEG_qsym_list */
10723#line 2618 "parse.y"
10724 {
10725 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10726 rb_parser_printf(p, "NODE_SPECIAL");
10727 }
10728 else if (((*yyvaluep).node)) {
10729 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10730 }
10731}
10732#line 10733 "parse.c"
10733 break;
10734
10735 case YYSYMBOL_qsymbols: /* qsymbols */
10736#line 2618 "parse.y"
10737 {
10738 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10739 rb_parser_printf(p, "NODE_SPECIAL");
10740 }
10741 else if (((*yyvaluep).node)) {
10742 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10743 }
10744}
10745#line 10746 "parse.c"
10746 break;
10747
10748 case YYSYMBOL_qword_list: /* qword_list */
10749#line 2618 "parse.y"
10750 {
10751 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10752 rb_parser_printf(p, "NODE_SPECIAL");
10753 }
10754 else if (((*yyvaluep).node)) {
10755 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10756 }
10757}
10758#line 10759 "parse.c"
10759 break;
10760
10761 case YYSYMBOL_qsym_list: /* qsym_list */
10762#line 2618 "parse.y"
10763 {
10764 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10765 rb_parser_printf(p, "NODE_SPECIAL");
10766 }
10767 else if (((*yyvaluep).node)) {
10768 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10769 }
10770}
10771#line 10772 "parse.c"
10772 break;
10773
10774 case YYSYMBOL_string_contents: /* string_contents */
10775#line 2618 "parse.y"
10776 {
10777 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10778 rb_parser_printf(p, "NODE_SPECIAL");
10779 }
10780 else if (((*yyvaluep).node)) {
10781 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10782 }
10783}
10784#line 10785 "parse.c"
10785 break;
10786
10787 case YYSYMBOL_xstring_contents: /* xstring_contents */
10788#line 2618 "parse.y"
10789 {
10790 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10791 rb_parser_printf(p, "NODE_SPECIAL");
10792 }
10793 else if (((*yyvaluep).node)) {
10794 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10795 }
10796}
10797#line 10798 "parse.c"
10798 break;
10799
10800 case YYSYMBOL_regexp_contents: /* regexp_contents */
10801#line 2618 "parse.y"
10802 {
10803 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10804 rb_parser_printf(p, "NODE_SPECIAL");
10805 }
10806 else if (((*yyvaluep).node)) {
10807 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10808 }
10809}
10810#line 10811 "parse.c"
10811 break;
10812
10813 case YYSYMBOL_string_content: /* string_content */
10814#line 2618 "parse.y"
10815 {
10816 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10817 rb_parser_printf(p, "NODE_SPECIAL");
10818 }
10819 else if (((*yyvaluep).node)) {
10820 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10821 }
10822}
10823#line 10824 "parse.c"
10824 break;
10825
10826 case YYSYMBOL_string_dvar: /* string_dvar */
10827#line 2618 "parse.y"
10828 {
10829 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10830 rb_parser_printf(p, "NODE_SPECIAL");
10831 }
10832 else if (((*yyvaluep).node)) {
10833 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10834 }
10835}
10836#line 10837 "parse.c"
10837 break;
10838
10839 case YYSYMBOL_symbol: /* symbol */
10840#line 2618 "parse.y"
10841 {
10842 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10843 rb_parser_printf(p, "NODE_SPECIAL");
10844 }
10845 else if (((*yyvaluep).node)) {
10846 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10847 }
10848}
10849#line 10850 "parse.c"
10850 break;
10851
10852 case YYSYMBOL_ssym: /* ssym */
10853#line 2618 "parse.y"
10854 {
10855 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10856 rb_parser_printf(p, "NODE_SPECIAL");
10857 }
10858 else if (((*yyvaluep).node)) {
10859 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10860 }
10861}
10862#line 10863 "parse.c"
10863 break;
10864
10865 case YYSYMBOL_sym: /* sym */
10866#line 2627 "parse.y"
10867 {
10868 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10869}
10870#line 10871 "parse.c"
10871 break;
10872
10873 case YYSYMBOL_dsym: /* dsym */
10874#line 2618 "parse.y"
10875 {
10876 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10877 rb_parser_printf(p, "NODE_SPECIAL");
10878 }
10879 else if (((*yyvaluep).node)) {
10880 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10881 }
10882}
10883#line 10884 "parse.c"
10884 break;
10885
10886 case YYSYMBOL_numeric: /* numeric */
10887#line 2618 "parse.y"
10888 {
10889 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10890 rb_parser_printf(p, "NODE_SPECIAL");
10891 }
10892 else if (((*yyvaluep).node)) {
10893 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10894 }
10895}
10896#line 10897 "parse.c"
10897 break;
10898
10899 case YYSYMBOL_simple_numeric: /* simple_numeric */
10900#line 2618 "parse.y"
10901 {
10902 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10903 rb_parser_printf(p, "NODE_SPECIAL");
10904 }
10905 else if (((*yyvaluep).node)) {
10906 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10907 }
10908}
10909#line 10910 "parse.c"
10910 break;
10911
10912 case YYSYMBOL_nonlocal_var: /* nonlocal_var */
10913#line 2627 "parse.y"
10914 {
10915 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10916}
10917#line 10918 "parse.c"
10918 break;
10919
10920 case YYSYMBOL_user_variable: /* user_variable */
10921#line 2627 "parse.y"
10922 {
10923 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10924}
10925#line 10926 "parse.c"
10926 break;
10927
10928 case YYSYMBOL_keyword_variable: /* keyword_variable */
10929#line 2627 "parse.y"
10930 {
10931 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10932}
10933#line 10934 "parse.c"
10934 break;
10935
10936 case YYSYMBOL_var_ref: /* var_ref */
10937#line 2618 "parse.y"
10938 {
10939 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10940 rb_parser_printf(p, "NODE_SPECIAL");
10941 }
10942 else if (((*yyvaluep).node)) {
10943 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10944 }
10945}
10946#line 10947 "parse.c"
10947 break;
10948
10949 case YYSYMBOL_var_lhs: /* var_lhs */
10950#line 2618 "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_backref: /* backref */
10963#line 2618 "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_superclass: /* superclass */
10976#line 2618 "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_f_opt_paren_args: /* f_opt_paren_args */
10989#line 2618 "parse.y"
10990 {
10991 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
10992 rb_parser_printf(p, "NODE_SPECIAL");
10993 }
10994 else if (((*yyvaluep).node_args)) {
10995 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
10996 }
10997}
10998#line 10999 "parse.c"
10999 break;
11000
11001 case YYSYMBOL_f_empty_arg: /* f_empty_arg */
11002#line 2618 "parse.y"
11003 {
11004 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11005 rb_parser_printf(p, "NODE_SPECIAL");
11006 }
11007 else if (((*yyvaluep).node_args)) {
11008 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11009 }
11010}
11011#line 11012 "parse.c"
11012 break;
11013
11014 case YYSYMBOL_f_paren_args: /* f_paren_args */
11015#line 2618 "parse.y"
11016 {
11017 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11018 rb_parser_printf(p, "NODE_SPECIAL");
11019 }
11020 else if (((*yyvaluep).node_args)) {
11021 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11022 }
11023}
11024#line 11025 "parse.c"
11025 break;
11026
11027 case YYSYMBOL_f_arglist: /* f_arglist */
11028#line 2618 "parse.y"
11029 {
11030 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11031 rb_parser_printf(p, "NODE_SPECIAL");
11032 }
11033 else if (((*yyvaluep).node_args)) {
11034 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11035 }
11036}
11037#line 11038 "parse.c"
11038 break;
11039
11040 case YYSYMBOL_f_kw_arg_value: /* f_kw_arg_value */
11041#line 2618 "parse.y"
11042 {
11043 if ((NODE *)((*yyvaluep).node_kw_arg) == (NODE *)-1) {
11044 rb_parser_printf(p, "NODE_SPECIAL");
11045 }
11046 else if (((*yyvaluep).node_kw_arg)) {
11047 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_kw_arg)))));
11048 }
11049}
11050#line 11051 "parse.c"
11051 break;
11052
11053 case YYSYMBOL_f_kwarg_arg_value: /* f_kwarg_arg_value */
11054#line 2618 "parse.y"
11055 {
11056 if ((NODE *)((*yyvaluep).node_kw_arg) == (NODE *)-1) {
11057 rb_parser_printf(p, "NODE_SPECIAL");
11058 }
11059 else if (((*yyvaluep).node_kw_arg)) {
11060 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_kw_arg)))));
11061 }
11062}
11063#line 11064 "parse.c"
11064 break;
11065
11066 case YYSYMBOL_args_tail_basic_arg_value: /* args_tail_basic_arg_value */
11067#line 2618 "parse.y"
11068 {
11069 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11070 rb_parser_printf(p, "NODE_SPECIAL");
11071 }
11072 else if (((*yyvaluep).node_args)) {
11073 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11074 }
11075}
11076#line 11077 "parse.c"
11077 break;
11078
11079 case YYSYMBOL_args_tail: /* args_tail */
11080#line 2618 "parse.y"
11081 {
11082 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11083 rb_parser_printf(p, "NODE_SPECIAL");
11084 }
11085 else if (((*yyvaluep).node_args)) {
11086 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11087 }
11088}
11089#line 11090 "parse.c"
11090 break;
11091
11092 case YYSYMBOL_opt_args_tail_args_tail: /* opt_args_tail_args_tail */
11093#line 2618 "parse.y"
11094 {
11095 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11096 rb_parser_printf(p, "NODE_SPECIAL");
11097 }
11098 else if (((*yyvaluep).node_args)) {
11099 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11100 }
11101}
11102#line 11103 "parse.c"
11103 break;
11104
11105 case YYSYMBOL_f_args_opt_tail: /* f_args-opt_tail */
11106#line 2618 "parse.y"
11107 {
11108 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11109 rb_parser_printf(p, "NODE_SPECIAL");
11110 }
11111 else if (((*yyvaluep).node_args)) {
11112 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11113 }
11114}
11115#line 11116 "parse.c"
11116 break;
11117
11118 case YYSYMBOL_f_opt_arg_value: /* f_opt_arg_value */
11119#line 2618 "parse.y"
11120 {
11121 if ((NODE *)((*yyvaluep).node_opt_arg) == (NODE *)-1) {
11122 rb_parser_printf(p, "NODE_SPECIAL");
11123 }
11124 else if (((*yyvaluep).node_opt_arg)) {
11125 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_opt_arg)))));
11126 }
11127}
11128#line 11129 "parse.c"
11129 break;
11130
11131 case YYSYMBOL_f_opt_arg_arg_value: /* f_opt_arg_arg_value */
11132#line 2618 "parse.y"
11133 {
11134 if ((NODE *)((*yyvaluep).node_opt_arg) == (NODE *)-1) {
11135 rb_parser_printf(p, "NODE_SPECIAL");
11136 }
11137 else if (((*yyvaluep).node_opt_arg)) {
11138 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_opt_arg)))));
11139 }
11140}
11141#line 11142 "parse.c"
11142 break;
11143
11144 case YYSYMBOL_args_list_arg_value_f_args_opt_tail: /* args-list_arg_value_f_args-opt_tail */
11145#line 2618 "parse.y"
11146 {
11147 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11148 rb_parser_printf(p, "NODE_SPECIAL");
11149 }
11150 else if (((*yyvaluep).node_args)) {
11151 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11152 }
11153}
11154#line 11155 "parse.c"
11155 break;
11156
11157 case YYSYMBOL_f_args: /* f_args */
11158#line 2618 "parse.y"
11159 {
11160 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11161 rb_parser_printf(p, "NODE_SPECIAL");
11162 }
11163 else if (((*yyvaluep).node_args)) {
11164 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11165 }
11166}
11167#line 11168 "parse.c"
11168 break;
11169
11170 case YYSYMBOL_tail_only_args_args_tail: /* tail-only-args_args_tail */
11171#line 2618 "parse.y"
11172 {
11173 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
11174 rb_parser_printf(p, "NODE_SPECIAL");
11175 }
11176 else if (((*yyvaluep).node_args)) {
11177 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
11178 }
11179}
11180#line 11181 "parse.c"
11181 break;
11182
11183 case YYSYMBOL_args_forward: /* args_forward */
11184#line 2627 "parse.y"
11185 {
11186 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11187}
11188#line 11189 "parse.c"
11189 break;
11190
11191 case YYSYMBOL_f_bad_arg: /* f_bad_arg */
11192#line 2627 "parse.y"
11193 {
11194 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11195}
11196#line 11197 "parse.c"
11197 break;
11198
11199 case YYSYMBOL_f_norm_arg: /* f_norm_arg */
11200#line 2627 "parse.y"
11201 {
11202 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11203}
11204#line 11205 "parse.c"
11205 break;
11206
11207 case YYSYMBOL_f_arg_asgn: /* f_arg_asgn */
11208#line 2627 "parse.y"
11209 {
11210 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11211}
11212#line 11213 "parse.c"
11213 break;
11214
11215 case YYSYMBOL_f_arg_item: /* f_arg_item */
11216#line 2618 "parse.y"
11217 {
11218 if ((NODE *)((*yyvaluep).node_args_aux) == (NODE *)-1) {
11219 rb_parser_printf(p, "NODE_SPECIAL");
11220 }
11221 else if (((*yyvaluep).node_args_aux)) {
11222 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args_aux)))));
11223 }
11224}
11225#line 11226 "parse.c"
11226 break;
11227
11228 case YYSYMBOL_f_arg: /* f_arg */
11229#line 2618 "parse.y"
11230 {
11231 if ((NODE *)((*yyvaluep).node_args_aux) == (NODE *)-1) {
11232 rb_parser_printf(p, "NODE_SPECIAL");
11233 }
11234 else if (((*yyvaluep).node_args_aux)) {
11235 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args_aux)))));
11236 }
11237}
11238#line 11239 "parse.c"
11239 break;
11240
11241 case YYSYMBOL_f_label: /* f_label */
11242#line 2627 "parse.y"
11243 {
11244 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11245}
11246#line 11247 "parse.c"
11247 break;
11248
11249 case YYSYMBOL_f_no_kwarg: /* f_no_kwarg */
11250#line 2627 "parse.y"
11251 {
11252 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11253}
11254#line 11255 "parse.c"
11255 break;
11256
11257 case YYSYMBOL_f_kwrest: /* f_kwrest */
11258#line 2627 "parse.y"
11259 {
11260 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11261}
11262#line 11263 "parse.c"
11263 break;
11264
11265 case YYSYMBOL_f_rest_arg: /* f_rest_arg */
11266#line 2627 "parse.y"
11267 {
11268 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11269}
11270#line 11271 "parse.c"
11271 break;
11272
11273 case YYSYMBOL_f_block_arg: /* f_block_arg */
11274#line 2627 "parse.y"
11275 {
11276 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11277}
11278#line 11279 "parse.c"
11279 break;
11280
11281 case YYSYMBOL_opt_f_block_arg: /* opt_f_block_arg */
11282#line 2627 "parse.y"
11283 {
11284 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11285}
11286#line 11287 "parse.c"
11287 break;
11288
11289 case YYSYMBOL_value_expr_singleton_expr: /* value_expr_singleton_expr */
11290#line 2618 "parse.y"
11291 {
11292 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11293 rb_parser_printf(p, "NODE_SPECIAL");
11294 }
11295 else if (((*yyvaluep).node)) {
11296 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11297 }
11298}
11299#line 11300 "parse.c"
11300 break;
11301
11302 case YYSYMBOL_singleton: /* singleton */
11303#line 2618 "parse.y"
11304 {
11305 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11306 rb_parser_printf(p, "NODE_SPECIAL");
11307 }
11308 else if (((*yyvaluep).node)) {
11309 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11310 }
11311}
11312#line 11313 "parse.c"
11313 break;
11314
11315 case YYSYMBOL_singleton_expr: /* singleton_expr */
11316#line 2618 "parse.y"
11317 {
11318 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11319 rb_parser_printf(p, "NODE_SPECIAL");
11320 }
11321 else if (((*yyvaluep).node)) {
11322 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11323 }
11324}
11325#line 11326 "parse.c"
11326 break;
11327
11328 case YYSYMBOL_assoc_list: /* assoc_list */
11329#line 2618 "parse.y"
11330 {
11331 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11332 rb_parser_printf(p, "NODE_SPECIAL");
11333 }
11334 else if (((*yyvaluep).node)) {
11335 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11336 }
11337}
11338#line 11339 "parse.c"
11339 break;
11340
11341 case YYSYMBOL_assocs: /* assocs */
11342#line 2618 "parse.y"
11343 {
11344 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11345 rb_parser_printf(p, "NODE_SPECIAL");
11346 }
11347 else if (((*yyvaluep).node)) {
11348 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11349 }
11350}
11351#line 11352 "parse.c"
11352 break;
11353
11354 case YYSYMBOL_assoc: /* assoc */
11355#line 2618 "parse.y"
11356 {
11357 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11358 rb_parser_printf(p, "NODE_SPECIAL");
11359 }
11360 else if (((*yyvaluep).node)) {
11361 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11362 }
11363}
11364#line 11365 "parse.c"
11365 break;
11366
11367 case YYSYMBOL_operation2: /* operation2 */
11368#line 2627 "parse.y"
11369 {
11370 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11371}
11372#line 11373 "parse.c"
11373 break;
11374
11375 case YYSYMBOL_operation3: /* operation3 */
11376#line 2627 "parse.y"
11377 {
11378 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11379}
11380#line 11381 "parse.c"
11381 break;
11382
11383 case YYSYMBOL_dot_or_colon: /* dot_or_colon */
11384#line 2627 "parse.y"
11385 {
11386 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11387}
11388#line 11389 "parse.c"
11389 break;
11390
11391 case YYSYMBOL_call_op: /* call_op */
11392#line 2627 "parse.y"
11393 {
11394 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11395}
11396#line 11397 "parse.c"
11397 break;
11398
11399 case YYSYMBOL_call_op2: /* call_op2 */
11400#line 2627 "parse.y"
11401 {
11402 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
11403}
11404#line 11405 "parse.c"
11405 break;
11406
11407 case YYSYMBOL_none: /* none */
11408#line 2618 "parse.y"
11409 {
11410 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
11411 rb_parser_printf(p, "NODE_SPECIAL");
11412 }
11413 else if (((*yyvaluep).node)) {
11414 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
11415 }
11416}
11417#line 11418 "parse.c"
11418 break;
11419
11420 default:
11421 break;
11422 }
11423 YY_IGNORE_MAYBE_UNINITIALIZED_END
11424}
11425
11426
11427/*---------------------------.
11428| Print this symbol on YYO. |
11429`---------------------------*/
11430
11431static void
11432yy_symbol_print (FILE *yyo,
11433 yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, struct parser_params *p)
11434{
11435 YYFPRINTF (yyo, "%s %s (",
11436 yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name (yykind));
11437
11438 YYLOCATION_PRINT (yyo, yylocationp, p);
11439 YYFPRINTF (yyo, ": ");
11440 yy_symbol_value_print (yyo, yykind, yyvaluep, yylocationp, p);
11441 YYFPRINTF (yyo, ")");
11442}
11443
11444/*------------------------------------------------------------------.
11445| yy_stack_print -- Print the state stack from its BOTTOM up to its |
11446| TOP (included). |
11447`------------------------------------------------------------------*/
11448
11449static void
11450yy_stack_print (yy_state_t *yybottom, yy_state_t *yytop, struct parser_params *p)
11451{
11452 YYFPRINTF (stderr, "Stack now");
11453 for (; yybottom <= yytop; yybottom++)
11454 {
11455 int yybot = *yybottom;
11456 YYFPRINTF (stderr, " %d", yybot);
11457 }
11458 YYFPRINTF (stderr, "\n");
11459}
11460
11461# define YY_STACK_PRINT(Bottom, Top, p) \
11462do { \
11463 if (yydebug) \
11464 yy_stack_print ((Bottom), (Top), p); \
11465} while (0)
11466
11467
11468/*------------------------------------------------.
11469| Report that the YYRULE is going to be reduced. |
11470`------------------------------------------------*/
11471
11472static void
11473yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp,
11474 int yyrule, struct parser_params *p)
11475{
11476 int yylno = yyrline[yyrule];
11477 int yynrhs = yyr2[yyrule];
11478 int yyi;
11479 YYFPRINTF (stderr, "Reducing stack by rule %d (line %d):\n",
11480 yyrule - 1, yylno);
11481 /* The symbols being reduced. */
11482 for (yyi = 0; yyi < yynrhs; yyi++)
11483 {
11484 YYFPRINTF (stderr, " $%d = ", yyi + 1);
11485 yy_symbol_print (stderr,
11486 YY_ACCESSING_SYMBOL (+yyssp[yyi + 1 - yynrhs]),
11487 &yyvsp[(yyi + 1) - (yynrhs)],
11488 &(yylsp[(yyi + 1) - (yynrhs)]), p);
11489 YYFPRINTF (stderr, "\n");
11490 }
11491}
11492
11493# define YY_REDUCE_PRINT(Rule, p) \
11494do { \
11495 if (yydebug) \
11496 yy_reduce_print (yyssp, yyvsp, yylsp, Rule, p); \
11497} while (0)
11498
11499/* Nonzero means print parse trace. It is left uninitialized so that
11500 multiple parsers can coexist. */
11501#ifndef yydebug
11502int yydebug;
11503#endif
11504#else /* !YYDEBUG */
11505# define YYDPRINTF(Args) ((void) 0)
11506# define YY_SYMBOL_PRINT(Title, Kind, Value, Location, p)
11507# define YY_STACK_PRINT(Bottom, Top, p)
11508# define YY_REDUCE_PRINT(Rule, p)
11509#endif /* !YYDEBUG */
11510
11511
11512/* YYINITDEPTH -- initial size of the parser's stacks. */
11513#ifndef YYINITDEPTH
11514# define YYINITDEPTH 200
11515#endif
11516
11517/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
11518 if the built-in stack extension method is used).
11519
11520 Do not make this value too large; the results are undefined if
11521 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
11522 evaluated with infinite-precision integer arithmetic. */
11523
11524#ifndef YYMAXDEPTH
11525# define YYMAXDEPTH 10000
11526#endif
11527
11528
11529/* Context of a parse error. */
11530typedef struct
11531{
11532 yy_state_t *yyssp;
11533 yysymbol_kind_t yytoken;
11534 YYLTYPE *yylloc;
11535} yypcontext_t;
11536
11537/* Put in YYARG at most YYARGN of the expected tokens given the
11538 current YYCTX, and return the number of tokens stored in YYARG. If
11539 YYARG is null, return the number of expected tokens (guaranteed to
11540 be less than YYNTOKENS). Return YYENOMEM on memory exhaustion.
11541 Return 0 if there are more than YYARGN expected tokens, yet fill
11542 YYARG up to YYARGN. */
11543static int
11544yypcontext_expected_tokens (const yypcontext_t *yyctx,
11545 yysymbol_kind_t yyarg[], int yyargn)
11546{
11547 /* Actual size of YYARG. */
11548 int yycount = 0;
11549 int yyn = yypact[+*yyctx->yyssp];
11550 if (!yypact_value_is_default (yyn))
11551 {
11552 /* Start YYX at -YYN if negative to avoid negative indexes in
11553 YYCHECK. In other words, skip the first -YYN actions for
11554 this state because they are default actions. */
11555 int yyxbegin = yyn < 0 ? -yyn : 0;
11556 /* Stay within bounds of both yycheck and yytname. */
11557 int yychecklim = YYLAST - yyn + 1;
11558 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
11559 int yyx;
11560 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
11561 if (yycheck[yyx + yyn] == yyx && yyx != YYSYMBOL_YYerror
11562 && !yytable_value_is_error (yytable[yyx + yyn]))
11563 {
11564 if (!yyarg)
11565 ++yycount;
11566 else if (yycount == yyargn)
11567 return 0;
11568 else
11569 yyarg[yycount++] = YY_CAST (yysymbol_kind_t, yyx);
11570 }
11571 }
11572 if (yyarg && yycount == 0 && 0 < yyargn)
11573 yyarg[0] = YYSYMBOL_YYEMPTY;
11574 return yycount;
11575}
11576
11577
11578
11579
11580#ifndef yystrlen
11581# if defined __GLIBC__ && defined _STRING_H
11582# define yystrlen(S) (YY_CAST (YYPTRDIFF_T, strlen (S)))
11583# else
11584/* Return the length of YYSTR. */
11585static YYPTRDIFF_T
11586yystrlen (const char *yystr)
11587{
11588 YYPTRDIFF_T yylen;
11589 for (yylen = 0; yystr[yylen]; yylen++)
11590 continue;
11591 return yylen;
11592}
11593# endif
11594#endif
11595
11596#ifndef yystpcpy
11597# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
11598# define yystpcpy stpcpy
11599# else
11600/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
11601 YYDEST. */
11602static char *
11603yystpcpy (char *yydest, const char *yysrc)
11604{
11605 char *yyd = yydest;
11606 const char *yys = yysrc;
11607
11608 while ((*yyd++ = *yys++) != '\0')
11609 continue;
11610
11611 return yyd - 1;
11612}
11613# endif
11614#endif
11615
11616#ifndef yytnamerr
11617/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
11618 quotes and backslashes, so that it's suitable for yyerror. The
11619 heuristic is that double-quoting is unnecessary unless the string
11620 contains an apostrophe, a comma, or backslash (other than
11621 backslash-backslash). YYSTR is taken from yytname. If YYRES is
11622 null, do not copy; instead, return the length of what the result
11623 would have been. */
11624static YYPTRDIFF_T
11625yytnamerr (char *yyres, const char *yystr)
11626{
11627 if (*yystr == '"')
11628 {
11629 YYPTRDIFF_T yyn = 0;
11630 char const *yyp = yystr;
11631 for (;;)
11632 switch (*++yyp)
11633 {
11634 case '\'':
11635 case ',':
11636 goto do_not_strip_quotes;
11637
11638 case '\\':
11639 if (*++yyp != '\\')
11640 goto do_not_strip_quotes;
11641 else
11642 goto append;
11643
11644 append:
11645 default:
11646 if (yyres)
11647 yyres[yyn] = *yyp;
11648 yyn++;
11649 break;
11650
11651 case '"':
11652 if (yyres)
11653 yyres[yyn] = '\0';
11654 return yyn;
11655 }
11656 do_not_strip_quotes: ;
11657 }
11658
11659 if (yyres)
11660 return yystpcpy (yyres, yystr) - yyres;
11661 else
11662 return yystrlen (yystr);
11663}
11664#endif
11665
11666
11667static int
11668yy_syntax_error_arguments (const yypcontext_t *yyctx,
11669 yysymbol_kind_t yyarg[], int yyargn)
11670{
11671 /* Actual size of YYARG. */
11672 int yycount = 0;
11673 /* There are many possibilities here to consider:
11674 - If this state is a consistent state with a default action, then
11675 the only way this function was invoked is if the default action
11676 is an error action. In that case, don't check for expected
11677 tokens because there are none.
11678 - The only way there can be no lookahead present (in yychar) is if
11679 this state is a consistent state with a default action. Thus,
11680 detecting the absence of a lookahead is sufficient to determine
11681 that there is no unexpected or expected token to report. In that
11682 case, just report a simple "syntax error".
11683 - Don't assume there isn't a lookahead just because this state is a
11684 consistent state with a default action. There might have been a
11685 previous inconsistent state, consistent state with a non-default
11686 action, or user semantic action that manipulated yychar.
11687 - Of course, the expected token list depends on states to have
11688 correct lookahead information, and it depends on the parser not
11689 to perform extra reductions after fetching a lookahead from the
11690 scanner and before detecting a syntax error. Thus, state merging
11691 (from LALR or IELR) and default reductions corrupt the expected
11692 token list. However, the list is correct for canonical LR with
11693 one exception: it will still contain any token that will not be
11694 accepted due to an error action in a later state.
11695 */
11696 if (yyctx->yytoken != YYSYMBOL_YYEMPTY)
11697 {
11698 int yyn;
11699 if (yyarg)
11700 yyarg[yycount] = yyctx->yytoken;
11701 ++yycount;
11702 yyn = yypcontext_expected_tokens (yyctx,
11703 yyarg ? yyarg + 1 : yyarg, yyargn - 1);
11704 if (yyn == YYENOMEM)
11705 return YYENOMEM;
11706 else
11707 yycount += yyn;
11708 }
11709 return yycount;
11710}
11711
11712/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
11713 about the unexpected token YYTOKEN for the state stack whose top is
11714 YYSSP.
11715
11716 Return 0 if *YYMSG was successfully written. Return -1 if *YYMSG is
11717 not large enough to hold the message. In that case, also set
11718 *YYMSG_ALLOC to the required number of bytes. Return YYENOMEM if the
11719 required number of bytes is too large to store. */
11720static int
11721yysyntax_error (YYPTRDIFF_T *yymsg_alloc, char **yymsg,
11722 const yypcontext_t *yyctx, struct parser_params *p)
11723{
11724 enum { YYARGS_MAX = 5 };
11725 /* Internationalized format string. */
11726 const char *yyformat = YY_NULLPTR;
11727 /* Arguments of yyformat: reported tokens (one for the "unexpected",
11728 one per "expected"). */
11729 yysymbol_kind_t yyarg[YYARGS_MAX];
11730 /* Cumulated lengths of YYARG. */
11731 YYPTRDIFF_T yysize = 0;
11732
11733 /* Actual size of YYARG. */
11734 int yycount = yy_syntax_error_arguments (yyctx, yyarg, YYARGS_MAX);
11735 if (yycount == YYENOMEM)
11736 return YYENOMEM;
11737
11738 switch (yycount)
11739 {
11740#define YYCASE_(N, S) \
11741 case N: \
11742 yyformat = S; \
11743 break
11744 default: /* Avoid compiler warnings. */
11745 YYCASE_(0, YY_("syntax error"));
11746 YYCASE_(1, YY_("syntax error, unexpected %s"));
11747 YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
11748 YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
11749 YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
11750 YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
11751#undef YYCASE_
11752 }
11753
11754 /* Compute error message size. Don't count the "%s"s, but reserve
11755 room for the terminator. */
11756 yysize = yystrlen (yyformat) - 2 * yycount + 1;
11757 {
11758 int yyi;
11759 for (yyi = 0; yyi < yycount; ++yyi)
11760 {
11761 YYPTRDIFF_T yysize1
11762 = yysize + yytnamerr (YY_NULLPTR, yytname[yyarg[yyi]]);
11763 if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)
11764 yysize = yysize1;
11765 else
11766 return YYENOMEM;
11767 }
11768 }
11769
11770 if (*yymsg_alloc < yysize)
11771 {
11772 *yymsg_alloc = 2 * yysize;
11773 if (! (yysize <= *yymsg_alloc
11774 && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
11775 *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
11776 return -1;
11777 }
11778
11779 /* Avoid sprintf, as that infringes on the user's name space.
11780 Don't have undefined behavior even if the translation
11781 produced a string with the wrong number of "%s"s. */
11782 {
11783 char *yyp = *yymsg;
11784 int yyi = 0;
11785 while ((*yyp = *yyformat) != '\0')
11786 if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
11787 {
11788 yyp += yytnamerr (yyp, yytname[yyarg[yyi++]]);
11789 yyformat += 2;
11790 }
11791 else
11792 {
11793 ++yyp;
11794 ++yyformat;
11795 }
11796 }
11797 return 0;
11798}
11799
11800
11801/*-----------------------------------------------.
11802| Release the memory associated to this symbol. |
11803`-----------------------------------------------*/
11804
11805static void
11806yydestruct (const char *yymsg,
11807 yysymbol_kind_t yykind, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, struct parser_params *p)
11808{
11809 YY_USE (yyvaluep);
11810 YY_USE (yylocationp);
11811 YY_USE (p);
11812 if (!yymsg)
11813 yymsg = "Deleting";
11814 YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp, p);
11815
11816 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
11817 switch (yykind)
11818 {
11819 case YYSYMBOL_258_16: /* @16 */
11820#line 2655 "parse.y"
11821 {
11822 if (CASE_LABELS_ENABLED_P(((*yyvaluep).labels))) st_free_table(((*yyvaluep).labels));
11823}
11824#line 11825 "parse.c"
11825 break;
11826
11827 case YYSYMBOL_259_17: /* @17 */
11828#line 2655 "parse.y"
11829 {
11830 if (CASE_LABELS_ENABLED_P(((*yyvaluep).labels))) st_free_table(((*yyvaluep).labels));
11831}
11832#line 11833 "parse.c"
11833 break;
11834
11835 default:
11836 break;
11837 }
11838 YY_IGNORE_MAYBE_UNINITIALIZED_END
11839}
11840
11841
11842
11843
11844
11845
11846/*----------.
11847| yyparse. |
11848`----------*/
11849
11850int
11851yyparse (struct parser_params *p)
11852{
11853/* Lookahead token kind. */
11854int yychar;
11855
11856
11857/* The semantic value of the lookahead symbol. */
11858/* Default value used for initialization, for pacifying older GCCs
11859 or non-GCC compilers. */
11860#ifdef __cplusplus
11861static const YYSTYPE yyval_default = {};
11862(void) yyval_default;
11863#else
11864YY_INITIAL_VALUE (static const YYSTYPE yyval_default;)
11865#endif
11866YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
11867
11868/* Location data for the lookahead symbol. */
11869static const YYLTYPE yyloc_default
11870# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
11871 = { 1, 1, 1, 1 }
11872# endif
11873;
11874YYLTYPE yylloc = yyloc_default;
11875
11876 /* Number of syntax errors so far. */
11877 int yynerrs = 0;
11878 YY_USE (yynerrs); /* Silence compiler warning. */
11879
11880 yy_state_fast_t yystate = 0;
11881 /* Number of tokens to shift before error messages enabled. */
11882 int yyerrstatus = 0;
11883
11884 /* Refer to the stacks through separate pointers, to allow yyoverflow
11885 to reallocate them elsewhere. */
11886
11887 /* Their size. */
11888 YYPTRDIFF_T yystacksize = YYINITDEPTH;
11889
11890 /* The state stack: array, bottom, top. */
11891 yy_state_t yyssa[YYINITDEPTH];
11892 yy_state_t *yyss = yyssa;
11893 yy_state_t *yyssp = yyss;
11894
11895 /* The semantic value stack: array, bottom, top. */
11896 YYSTYPE yyvsa[YYINITDEPTH];
11897 YYSTYPE *yyvs = yyvsa;
11898 YYSTYPE *yyvsp = yyvs;
11899
11900 /* The location stack: array, bottom, top. */
11901 YYLTYPE yylsa[YYINITDEPTH];
11902 YYLTYPE *yyls = yylsa;
11903 YYLTYPE *yylsp = yyls;
11904
11905 int yyn;
11906 /* The return value of yyparse. */
11907 int yyresult;
11908 /* Lookahead symbol kind. */
11909 yysymbol_kind_t yytoken = YYSYMBOL_YYEMPTY;
11910 /* The variables used to return semantic value and location from the
11911 action routines. */
11912 YYSTYPE yyval;
11913 YYLTYPE yyloc;
11914
11915 /* The locations where the error started and ended. */
11916 YYLTYPE yyerror_range[3];
11917
11918 /* Buffer for error messages, and its allocated size. */
11919 char yymsgbuf[128];
11920 char *yymsg = yymsgbuf;
11921 YYPTRDIFF_T yymsg_alloc = sizeof yymsgbuf;
11922
11923#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N))
11924
11925 /* The number of symbols on the RHS of the reduced rule.
11926 Keep to zero when no symbol should be popped. */
11927 int yylen = 0;
11928
11929 YYDPRINTF ((stderr, "Starting parse\n"));
11930
11931 yychar = YYEMPTY; /* Cause a token to be read. */
11932
11933
11934 /* User initialization code. */
11935#line 2662 "parse.y"
11936 {
11937 RUBY_SET_YYLLOC_OF_NONE(yylloc);
11938}
11939
11940#line 11941 "parse.c"
11941
11942 yylsp[0] = yylloc;
11943 goto yysetstate;
11944
11945
11946/*------------------------------------------------------------.
11947| yynewstate -- push a new state, which is found in yystate. |
11948`------------------------------------------------------------*/
11949yynewstate:
11950 /* In all cases, when you get here, the value and location stacks
11951 have just been pushed. So pushing a state here evens the stacks. */
11952 yyssp++;
11953
11954
11955/*--------------------------------------------------------------------.
11956| yysetstate -- set current state (the top of the stack) to yystate. |
11957`--------------------------------------------------------------------*/
11958yysetstate:
11959 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
11960 YY_ASSERT (0 <= yystate && yystate < YYNSTATES);
11961 YY_IGNORE_USELESS_CAST_BEGIN
11962 *yyssp = YY_CAST (yy_state_t, yystate);
11963 YY_IGNORE_USELESS_CAST_END
11964 YY_STACK_PRINT (yyss, yyssp, p);
11965
11966 if (yyss + yystacksize - 1 <= yyssp)
11967#if !defined yyoverflow && !defined YYSTACK_RELOCATE
11968 YYNOMEM;
11969#else
11970 {
11971 /* Get the current used size of the three stacks, in elements. */
11972 YYPTRDIFF_T yysize = yyssp - yyss + 1;
11973
11974# if defined yyoverflow
11975 {
11976 /* Give user a chance to reallocate the stack. Use copies of
11977 these so that the &'s don't force the real ones into
11978 memory. */
11979 yy_state_t *yyss1 = yyss;
11980 YYSTYPE *yyvs1 = yyvs;
11981 YYLTYPE *yyls1 = yyls;
11982
11983 /* Each stack pointer address is followed by the size of the
11984 data in use in that stack, in bytes. This used to be a
11985 conditional around just the two extra args, but that might
11986 be undefined if yyoverflow is a macro. */
11987 yyoverflow (YY_("memory exhausted"),
11988 &yyss1, yysize * YYSIZEOF (*yyssp),
11989 &yyvs1, yysize * YYSIZEOF (*yyvsp),
11990 &yyls1, yysize * YYSIZEOF (*yylsp),
11991 &yystacksize);
11992 yyss = yyss1;
11993 yyvs = yyvs1;
11994 yyls = yyls1;
11995 }
11996# else /* defined YYSTACK_RELOCATE */
11997 /* Extend the stack our own way. */
11998 if (YYMAXDEPTH <= yystacksize)
11999 YYNOMEM;
12000 yystacksize *= 2;
12001 if (YYMAXDEPTH < yystacksize)
12002 yystacksize = YYMAXDEPTH;
12003
12004 {
12005 yy_state_t *yyss1 = yyss;
12006 union yyalloc *yyptr =
12007 YY_CAST (union yyalloc *,
12008 YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize))));
12009 if (! yyptr)
12010 YYNOMEM;
12011 YYSTACK_RELOCATE (yyss_alloc, yyss);
12012 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
12013 YYSTACK_RELOCATE (yyls_alloc, yyls);
12014# undef YYSTACK_RELOCATE
12015 if (yyss1 != yyssa)
12016 YYSTACK_FREE (yyss1);
12017 }
12018# endif
12019
12020 yyssp = yyss + yysize - 1;
12021 yyvsp = yyvs + yysize - 1;
12022 yylsp = yyls + yysize - 1;
12023
12024 YY_IGNORE_USELESS_CAST_BEGIN
12025 YYDPRINTF ((stderr, "Stack size increased to %ld\n",
12026 YY_CAST (long, yystacksize)));
12027 YY_IGNORE_USELESS_CAST_END
12028
12029 if (yyss + yystacksize - 1 <= yyssp)
12030 YYABORT;
12031 }
12032#endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */
12033
12034
12035 if (yystate == YYFINAL)
12036 YYACCEPT;
12037
12038 goto yybackup;
12039
12040
12041/*-----------.
12042| yybackup. |
12043`-----------*/
12044yybackup:
12045 /* Do appropriate processing given the current state. Read a
12046 lookahead token if we need one and don't already have one. */
12047
12048 /* First try to decide what to do without reference to lookahead token. */
12049 yyn = yypact[yystate];
12050 if (yypact_value_is_default (yyn))
12051 goto yydefault;
12052
12053 /* Not known => get a lookahead token if don't already have one. */
12054
12055 /* YYCHAR is either empty, or end-of-input, or a valid lookahead. */
12056 if (yychar == YYEMPTY)
12057 {
12058 YYDPRINTF ((stderr, "Reading a token\n"));
12059 yychar = yylex (&yylval, &yylloc, p);
12060 }
12061
12062 if (yychar <= END_OF_INPUT)
12063 {
12064 yychar = END_OF_INPUT;
12065 yytoken = YYSYMBOL_YYEOF;
12066 YYDPRINTF ((stderr, "Now at end of input.\n"));
12067 }
12068 else if (yychar == YYerror)
12069 {
12070 /* The scanner already issued an error message, process directly
12071 to error recovery. But do not keep the error token as
12072 lookahead, it is too special and may lead us to an endless
12073 loop in error recovery. */
12074 yychar = YYUNDEF;
12075 yytoken = YYSYMBOL_YYerror;
12076 yyerror_range[1] = yylloc;
12077 goto yyerrlab1;
12078 }
12079 else
12080 {
12081 yytoken = YYTRANSLATE (yychar);
12082 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc, p);
12083 }
12084
12085 /* If the proper action on seeing token YYTOKEN is to reduce or to
12086 detect an error, take that action. */
12087 yyn += yytoken;
12088 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
12089 goto yydefault;
12090 yyn = yytable[yyn];
12091 if (yyn <= 0)
12092 {
12093 if (yytable_value_is_error (yyn))
12094 goto yyerrlab;
12095 yyn = -yyn;
12096 goto yyreduce;
12097 }
12098
12099 /* Count tokens shifted since error; after three, turn off error
12100 status. */
12101 if (yyerrstatus)
12102 yyerrstatus--;
12103
12104 /* Shift the lookahead token. */
12105 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc, p);
12106 yystate = yyn;
12107 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
12108 *++yyvsp = yylval;
12109 YY_IGNORE_MAYBE_UNINITIALIZED_END
12110 *++yylsp = yylloc;
12111 /* %after-shift code. */
12112#line 2665 "parse.y"
12113 {after_shift(p);}
12114#line 12115 "parse.c"
12115
12116
12117 /* Discard the shifted token. */
12118 yychar = YYEMPTY;
12119 goto yynewstate;
12120
12121
12122/*-----------------------------------------------------------.
12123| yydefault -- do the default action for the current state. |
12124`-----------------------------------------------------------*/
12125yydefault:
12126 yyn = yydefact[yystate];
12127 if (yyn == 0)
12128 goto yyerrlab;
12129 goto yyreduce;
12130
12131
12132/*-----------------------------.
12133| yyreduce -- do a reduction. |
12134`-----------------------------*/
12135yyreduce:
12136 /* yyn is the number of a rule to reduce with. */
12137 yylen = yyr2[yyn];
12138
12139 /* If YYLEN is nonzero, implement the default value of the action:
12140 '$$ = $1'.
12141
12142 Otherwise, the following line sets YYVAL to garbage.
12143 This behavior is undocumented and Bison
12144 users should not rely upon it. Assigning to YYVAL
12145 unconditionally makes the parser a bit smaller, and it avoids a
12146 GCC warning that YYVAL may be used uninitialized. */
12147 yyval = yyvsp[1-yylen];
12148 /* %before-reduce function. */
12149#line 2666 "parse.y"
12150 {before_reduce(yylen, p);}
12151#line 12152 "parse.c"
12152
12153
12154 /* Default location. */
12155 YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
12156 yyerror_range[1] = yyloc;
12157 YY_REDUCE_PRINT (yyn, p);
12158 switch (yyn)
12159 {
12160 case 2: /* $@1: %empty */
12161#line 3161 "parse.y"
12162 {
12163 SET_LEX_STATE(EXPR_BEG);
12164 local_push(p, ifndef_ripper(1)+0);
12165 /* jumps are possible in the top-level loop. */
12166 if (!ifndef_ripper(p->do_loop) + 0) init_block_exit(p);
12167 }
12168#line 12169 "parse.c"
12169 break;
12170
12171 case 5: /* compstmt_top_stmts: top_stmts option_terms */
12172#line 2976 "parse.y"
12173 {
12174 void_stmts(p, (yyval.node) = (yyvsp[-1].node));
12175 }
12176#line 12177 "parse.c"
12177 break;
12178
12179 case 6: /* program: $@1 compstmt_top_stmts */
12180#line 3168 "parse.y"
12181 {
12182 if ((yyvsp[0].node) && !compile_for_eval) {
12183 NODE *node = (yyvsp[0].node);
12184 /* last expression should not be void */
12185 if (nd_type_p(node, NODE_BLOCK)) {
12186 while (RNODE_BLOCK(node)->nd_next) {
12187 node = RNODE_BLOCK(node)->nd_next;
12188 }
12189 node = RNODE_BLOCK(node)->nd_head;
12190 }
12191 node = remove_begin(node);
12192 void_expr(p, node);
12193 }
12194 p->eval_tree = NEW_SCOPE(0, block_append(p, p->eval_tree, (yyvsp[0].node)), NULL, &(yyloc));
12195 /*% ripper[final]: program!($:2) %*/
12196 local_pop(p);
12197 }
12198#line 12199 "parse.c"
12199 break;
12200
12201 case 7: /* top_stmts: none */
12202#line 3188 "parse.y"
12203 {
12204 (yyval.node) = NEW_BEGIN(0, &(yyloc));
12205 /*% ripper: stmts_add!(stmts_new!, void_stmt!) %*/
12206 }
12207#line 12208 "parse.c"
12208 break;
12209
12210 case 8: /* top_stmts: top_stmt */
12211#line 3193 "parse.y"
12212 {
12213 (yyval.node) = newline_node((yyvsp[0].node));
12214 /*% ripper: stmts_add!(stmts_new!, $:1) %*/
12215 }
12216#line 12217 "parse.c"
12217 break;
12218
12219 case 9: /* top_stmts: top_stmts terms top_stmt */
12220#line 3198 "parse.y"
12221 {
12222 (yyval.node) = block_append(p, (yyvsp[-2].node), newline_node((yyvsp[0].node)));
12223 /*% ripper: stmts_add!($:1, $:3) %*/
12224 }
12225#line 12226 "parse.c"
12226 break;
12227
12228 case 10: /* top_stmt: stmt */
12229#line 3205 "parse.y"
12230 {
12231 clear_block_exit(p, true);
12232 (yyval.node) = (yyvsp[0].node);
12233 }
12234#line 12235 "parse.c"
12235 break;
12236
12237 case 11: /* top_stmt: "'BEGIN'" begin_block */
12238#line 3210 "parse.y"
12239 {
12240 (yyval.node) = (yyvsp[0].node);
12241 /*% ripper: $:2 %*/
12242 }
12243#line 12244 "parse.c"
12244 break;
12245
12246 case 12: /* block_open: '{' */
12247#line 3216 "parse.y"
12248 {(yyval.node_exits) = init_block_exit(p);}
12249#line 12250 "parse.c"
12250 break;
12251
12252 case 13: /* begin_block: block_open compstmt_top_stmts '}' */
12253#line 3219 "parse.y"
12254 {
12255 restore_block_exit(p, (yyvsp[-2].node_exits));
12256 p->eval_tree_begin = block_append(p, p->eval_tree_begin,
12257 NEW_BEGIN((yyvsp[-1].node), &(yyloc)));
12258 (yyval.node) = NEW_BEGIN(0, &(yyloc));
12259 /*% ripper: BEGIN!($:compstmt) %*/
12260 }
12261#line 12262 "parse.c"
12262 break;
12263
12264 case 14: /* compstmt_stmts: stmts option_terms */
12265#line 2976 "parse.y"
12266 {
12267 void_stmts(p, (yyval.node) = (yyvsp[-1].node));
12268 }
12269#line 12270 "parse.c"
12270 break;
12271
12272 case 15: /* $@2: %empty */
12273#line 3232 "parse.y"
12274 {
12275 if (!(yyvsp[-1].node)) yyerror1(&(yylsp[0]), "else without rescue is useless");
12276 next_rescue_context(&p->ctxt, &(yyvsp[-2].ctxt), after_else);
12277 }
12278#line 12279 "parse.c"
12279 break;
12280
12281 case 16: /* $@3: %empty */
12282#line 3237 "parse.y"
12283 {
12284 next_rescue_context(&p->ctxt, &(yyvsp[-4].ctxt), after_ensure);
12285 }
12286#line 12287 "parse.c"
12287 break;
12288
12289 case 17: /* bodystmt: compstmt_stmts lex_ctxt opt_rescue k_else $@2 compstmt_stmts $@3 opt_ensure */
12290#line 3241 "parse.y"
12291 {
12292 (yyval.node) = new_bodystmt(p, (yyvsp[-7].node), (yyvsp[-5].node), (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
12293 /*% ripper: bodystmt!($:body, $:opt_rescue, $:elsebody, $:opt_ensure) %*/
12294 }
12295#line 12296 "parse.c"
12296 break;
12297
12298 case 18: /* $@4: %empty */
12299#line 3248 "parse.y"
12300 {
12301 next_rescue_context(&p->ctxt, &(yyvsp[-1].ctxt), after_ensure);
12302 }
12303#line 12304 "parse.c"
12304 break;
12305
12306 case 19: /* bodystmt: compstmt_stmts lex_ctxt opt_rescue $@4 opt_ensure */
12307#line 3252 "parse.y"
12308 {
12309 (yyval.node) = new_bodystmt(p, (yyvsp[-4].node), (yyvsp[-2].node), 0, (yyvsp[0].node), &(yyloc));
12310 /*% ripper: bodystmt!($:body, $:opt_rescue, Qnil, $:opt_ensure) %*/
12311 }
12312#line 12313 "parse.c"
12313 break;
12314
12315 case 20: /* stmts: none */
12316#line 3259 "parse.y"
12317 {
12318 (yyval.node) = NEW_BEGIN(0, &(yyloc));
12319 /*% ripper: stmts_add!(stmts_new!, void_stmt!) %*/
12320 }
12321#line 12322 "parse.c"
12322 break;
12323
12324 case 21: /* stmts: stmt_or_begin */
12325#line 3264 "parse.y"
12326 {
12327 (yyval.node) = newline_node((yyvsp[0].node));
12328 /*% ripper: stmts_add!(stmts_new!, $:1) %*/
12329 }
12330#line 12331 "parse.c"
12331 break;
12332
12333 case 22: /* stmts: stmts terms stmt_or_begin */
12334#line 3269 "parse.y"
12335 {
12336 (yyval.node) = block_append(p, (yyvsp[-2].node), newline_node((yyvsp[0].node)));
12337 /*% ripper: stmts_add!($:1, $:3) %*/
12338 }
12339#line 12340 "parse.c"
12340 break;
12341
12342 case 24: /* $@5: %empty */
12343#line 3277 "parse.y"
12344 {
12345 yyerror1(&(yylsp[0]), "BEGIN is permitted only at toplevel");
12346 }
12347#line 12348 "parse.c"
12348 break;
12349
12350 case 25: /* stmt_or_begin: "'BEGIN'" $@5 begin_block */
12351#line 3281 "parse.y"
12352 {
12353 (yyval.node) = (yyvsp[0].node);
12354 }
12355#line 12356 "parse.c"
12356 break;
12357
12358 case 26: /* allow_exits: %empty */
12359#line 3286 "parse.y"
12360 {(yyval.node_exits) = allow_block_exit(p);}
12361#line 12362 "parse.c"
12362 break;
12363
12364 case 27: /* k_END: "'END'" lex_ctxt */
12365#line 3289 "parse.y"
12366 {
12367 (yyval.ctxt) = (yyvsp[0].ctxt);
12368 p->ctxt.in_rescue = before_rescue;
12369 /*% ripper: $:2 %*/
12370 }
12371#line 12372 "parse.c"
12372 break;
12373
12374 case 28: /* $@6: %empty */
12375#line 3295 "parse.y"
12376 {SET_LEX_STATE(EXPR_FNAME|EXPR_FITEM);}
12377#line 12378 "parse.c"
12378 break;
12379
12380 case 29: /* stmt: "'alias'" fitem $@6 fitem */
12381#line 3296 "parse.y"
12382 {
12383 (yyval.node) = NEW_ALIAS((yyvsp[-2].node), (yyvsp[0].node), &(yyloc), &(yylsp[-3]));
12384 /*% ripper: alias!($:new, $:old) %*/
12385 }
12386#line 12387 "parse.c"
12387 break;
12388
12389 case 30: /* stmt: "'alias'" "global variable" "global variable" */
12390#line 3301 "parse.y"
12391 {
12392 (yyval.node) = NEW_VALIAS((yyvsp[-1].id), (yyvsp[0].id), &(yyloc), &(yylsp[-2]));
12393 /*% ripper: var_alias!($:new, $:old) %*/
12394 }
12395#line 12396 "parse.c"
12396 break;
12397
12398 case 31: /* stmt: "'alias'" "global variable" "back reference" */
12399#line 3306 "parse.y"
12400 {
12401 char buf[2];
12402 buf[0] = '$';
12403 buf[1] = (char)RNODE_BACK_REF((yyvsp[0].node))->nd_nth;
12404 (yyval.node) = NEW_VALIAS((yyvsp[-1].id), rb_intern2(buf, 2), &(yyloc), &(yylsp[-2]));
12405 /*% ripper: var_alias!($:new, $:old) %*/
12406 }
12407#line 12408 "parse.c"
12408 break;
12409
12410 case 32: /* stmt: "'alias'" "global variable" "numbered reference" */
12411#line 3314 "parse.y"
12412 {
12413 static const char mesg[] = "can't make alias for the number variables";
12414 /*%%%*/
12415 yyerror1(&(yylsp[0]), mesg);
12416 /*% %*/
12417 (yyval.node) = NEW_ERROR(&(yyloc));
12418 /*% ripper[error]: alias_error!(ERR_MESG(), $:nth) %*/
12419 }
12420#line 12421 "parse.c"
12421 break;
12422
12423 case 33: /* stmt: "'undef'" undef_list */
12424#line 3323 "parse.y"
12425 {
12426 nd_set_first_loc((yyvsp[0].node), (yylsp[-1]).beg_pos);
12427 RNODE_UNDEF((yyvsp[0].node))->keyword_loc = (yylsp[-1]);
12428 (yyval.node) = (yyvsp[0].node);
12429 /*% ripper: undef!($:list) %*/
12430 }
12431#line 12432 "parse.c"
12432 break;
12433
12434 case 34: /* stmt: stmt "'if' modifier" expr_value */
12435#line 3330 "parse.y"
12436 {
12437 (yyval.node) = new_if(p, (yyvsp[0].node), remove_begin((yyvsp[-2].node)), 0, &(yyloc), &(yylsp[-1]), &NULL_LOC, &NULL_LOC);
12438 fixpos((yyval.node), (yyvsp[0].node));
12439 /*% ripper: if_mod!($:cond, $:body) %*/
12440 }
12441#line 12442 "parse.c"
12442 break;
12443
12444 case 35: /* stmt: stmt "'unless' modifier" expr_value */
12445#line 3336 "parse.y"
12446 {
12447 (yyval.node) = new_unless(p, (yyvsp[0].node), remove_begin((yyvsp[-2].node)), 0, &(yyloc), &(yylsp[-1]), &NULL_LOC, &NULL_LOC);
12448 fixpos((yyval.node), (yyvsp[0].node));
12449 /*% ripper: unless_mod!($:cond, $:body) %*/
12450 }
12451#line 12452 "parse.c"
12452 break;
12453
12454 case 36: /* stmt: stmt "'while' modifier" expr_value */
12455#line 3342 "parse.y"
12456 {
12457 clear_block_exit(p, false);
12458 if ((yyvsp[-2].node) && nd_type_p((yyvsp[-2].node), NODE_BEGIN)) {
12459 (yyval.node) = NEW_WHILE(cond(p, (yyvsp[0].node), &(yylsp[0])), RNODE_BEGIN((yyvsp[-2].node))->nd_body, 0, &(yyloc), &(yylsp[-1]), &NULL_LOC);
12460 }
12461 else {
12462 (yyval.node) = NEW_WHILE(cond(p, (yyvsp[0].node), &(yylsp[0])), (yyvsp[-2].node), 1, &(yyloc), &(yylsp[-1]), &NULL_LOC);
12463 }
12464 /*% ripper: while_mod!($:cond_expr, $:body) %*/
12465 }
12466#line 12467 "parse.c"
12467 break;
12468
12469 case 37: /* stmt: stmt "'until' modifier" expr_value */
12470#line 3353 "parse.y"
12471 {
12472 clear_block_exit(p, false);
12473 if ((yyvsp[-2].node) && nd_type_p((yyvsp[-2].node), NODE_BEGIN)) {
12474 (yyval.node) = NEW_UNTIL(cond(p, (yyvsp[0].node), &(yylsp[0])), RNODE_BEGIN((yyvsp[-2].node))->nd_body, 0, &(yyloc), &(yylsp[-1]), &NULL_LOC);
12475 }
12476 else {
12477 (yyval.node) = NEW_UNTIL(cond(p, (yyvsp[0].node), &(yylsp[0])), (yyvsp[-2].node), 1, &(yyloc), &(yylsp[-1]), &NULL_LOC);
12478 }
12479 /*% ripper: until_mod!($:cond_expr, $:body) %*/
12480 }
12481#line 12482 "parse.c"
12482 break;
12483
12484 case 38: /* stmt: stmt "'rescue' modifier" after_rescue stmt */
12485#line 3364 "parse.y"
12486 {
12487 p->ctxt.in_rescue = (yyvsp[-1].ctxt).in_rescue;
12488 NODE *resq;
12489 YYLTYPE loc = code_loc_gen(&(yylsp[-2]), &(yylsp[0]));
12490 resq = NEW_RESBODY(0, 0, remove_begin((yyvsp[0].node)), 0, &loc);
12491 (yyval.node) = NEW_RESCUE(remove_begin((yyvsp[-3].node)), resq, 0, &(yyloc));
12492 /*% ripper: rescue_mod!($:body, $:resbody) %*/
12493 }
12494#line 12495 "parse.c"
12495 break;
12496
12497 case 39: /* stmt: k_END allow_exits '{' compstmt_stmts '}' */
12498#line 3373 "parse.y"
12499 {
12500 if (p->ctxt.in_def) {
12501 rb_warn0("END in method; use at_exit");
12502 }
12503 restore_block_exit(p, (yyvsp[-3].node_exits));
12504 p->ctxt = (yyvsp[-4].ctxt);
12505 {
12506 NODE *scope = NEW_SCOPE2(0 /* tbl */, 0 /* args */, (yyvsp[-1].node) /* body */, NULL /* parent */, &(yyloc));
12507 (yyval.node) = NEW_POSTEXE(scope, &(yyloc), &(yylsp[-4]), &(yylsp[-2]), &(yylsp[0]));
12508 RNODE_SCOPE(scope)->nd_parent = (yyval.node);
12509 }
12510 /*% ripper: END!($:body) %*/
12511 }
12512#line 12513 "parse.c"
12513 break;
12514
12515 case 41: /* stmt: mlhs '=' lex_ctxt command_call_value */
12516#line 3388 "parse.y"
12517 {
12518 (yyval.node) = node_assign(p, (NODE *)(yyvsp[-3].node_masgn), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
12519 /*% ripper: massign!($:lhs, $:rhs) %*/
12520 }
12521#line 12522 "parse.c"
12522 break;
12523
12524 case 42: /* asgn_mrhs: lhs '=' lex_ctxt mrhs */
12525#line 2920 "parse.y"
12526 {
12527 (yyval.node) = node_assign(p, (NODE *)(yyvsp[-3].node), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
12528 /*% ripper: assign!($:1, $:4) %*/
12529 }
12530#line 12531 "parse.c"
12531 break;
12532
12533 case 44: /* stmt: mlhs '=' lex_ctxt mrhs_arg "'rescue' modifier" after_rescue stmt */
12534#line 3395 "parse.y"
12535 {
12536 p->ctxt.in_rescue = (yyvsp[-1].ctxt).in_rescue;
12537 YYLTYPE loc = code_loc_gen(&(yylsp[-2]), &(yylsp[0]));
12538 (yyvsp[0].node) = NEW_RESBODY(0, 0, remove_begin((yyvsp[0].node)), 0, &loc);
12539 loc.beg_pos = (yylsp[-3]).beg_pos;
12540 (yyvsp[-3].node) = NEW_RESCUE((yyvsp[-3].node), (yyvsp[0].node), 0, &loc);
12541 (yyval.node) = node_assign(p, (NODE *)(yyvsp[-6].node_masgn), (yyvsp[-3].node), (yyvsp[-4].ctxt), &(yyloc));
12542 /*% ripper: massign!($:lhs, rescue_mod!($:mrhs_arg, $:resbody)) %*/
12543 }
12544#line 12545 "parse.c"
12545 break;
12546
12547 case 45: /* stmt: mlhs '=' lex_ctxt mrhs_arg */
12548#line 3405 "parse.y"
12549 {
12550 (yyval.node) = node_assign(p, (NODE *)(yyvsp[-3].node_masgn), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
12551 /*% ripper: massign!($:lhs, $:rhs) %*/
12552 }
12553#line 12554 "parse.c"
12554 break;
12555
12556 case 47: /* stmt: error */
12557#line 3411 "parse.y"
12558 {
12559 (void)yynerrs;
12560 (yyval.node) = NEW_ERROR(&(yyloc));
12561 }
12562#line 12563 "parse.c"
12563 break;
12564
12565 case 48: /* asgn_command_rhs: lhs '=' lex_ctxt command_rhs */
12566#line 2920 "parse.y"
12567 {
12568 (yyval.node) = node_assign(p, (NODE *)(yyvsp[-3].node), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
12569 /*% ripper: assign!($:1, $:4) %*/
12570 }
12571#line 12572 "parse.c"
12572 break;
12573
12574 case 50: /* op_asgn_command_rhs: var_lhs "operator-assignment" lex_ctxt command_rhs */
12575#line 3046 "parse.y"
12576 {
12577 (yyval.node) = new_op_assign(p, (yyvsp[-3].node), (yyvsp[-2].id), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
12578 /*% ripper: opassign!($:var_lhs, $:tOP_ASGN, $:rhs) %*/
12579 }
12580#line 12581 "parse.c"
12581 break;
12582
12583 case 51: /* op_asgn_command_rhs: primary_value '[' opt_call_args rbracket "operator-assignment" lex_ctxt command_rhs */
12584#line 3051 "parse.y"
12585 {
12586 (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]));
12587 /*% ripper: opassign!(aref_field!($:primary_value, $:opt_call_args), $:tOP_ASGN, $:rhs) %*/
12588 }
12589#line 12590 "parse.c"
12590 break;
12591
12592 case 52: /* op_asgn_command_rhs: primary_value call_op "local variable or method" "operator-assignment" lex_ctxt command_rhs */
12593#line 3056 "parse.y"
12594 {
12595 (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]));
12596 /*% ripper: opassign!(field!($:primary_value, $:call_op, $:tIDENTIFIER), $:tOP_ASGN, $:rhs) %*/
12597 }
12598#line 12599 "parse.c"
12599 break;
12600
12601 case 53: /* op_asgn_command_rhs: primary_value call_op "constant" "operator-assignment" lex_ctxt command_rhs */
12602#line 3061 "parse.y"
12603 {
12604 (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]));
12605 /*% ripper: opassign!(field!($:primary_value, $:call_op, $:tCONSTANT), $:tOP_ASGN, $:rhs) %*/
12606 }
12607#line 12608 "parse.c"
12608 break;
12609
12610 case 54: /* op_asgn_command_rhs: primary_value "::" "local variable or method" "operator-assignment" lex_ctxt command_rhs */
12611#line 3066 "parse.y"
12612 {
12613 (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]));
12614 /*% ripper: opassign!(field!($:primary_value, $:tCOLON2, $:tIDENTIFIER), $:tOP_ASGN, $:rhs) %*/
12615 }
12616#line 12617 "parse.c"
12617 break;
12618
12619 case 55: /* op_asgn_command_rhs: primary_value "::" "constant" "operator-assignment" lex_ctxt command_rhs */
12620#line 3071 "parse.y"
12621 {
12622 YYLTYPE loc = code_loc_gen(&(yylsp[-5]), &(yylsp[-3]));
12623 (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));
12624 /*% ripper: opassign!(const_path_field!($:primary_value, $:tCONSTANT), $:tOP_ASGN, $:rhs) %*/
12625 }
12626#line 12627 "parse.c"
12627 break;
12628
12629 case 56: /* op_asgn_command_rhs: ":: at EXPR_BEG" "constant" "operator-assignment" lex_ctxt command_rhs */
12630#line 3077 "parse.y"
12631 {
12632 YYLTYPE loc = code_loc_gen(&(yylsp[-4]), &(yylsp[-3]));
12633 (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));
12634 /*% ripper: opassign!(top_const_field!($:tCONSTANT), $:tOP_ASGN, $:rhs) %*/
12635 }
12636#line 12637 "parse.c"
12637 break;
12638
12639 case 57: /* op_asgn_command_rhs: backref "operator-assignment" lex_ctxt command_rhs */
12640#line 3083 "parse.y"
12641 {
12642 VALUE MAYBE_UNUSED(e) = rb_backref_error(p, (yyvsp[-3].node));
12643 (yyval.node) = NEW_ERROR(&(yyloc));
12644 /*% ripper[error]: assign_error!(?e, opassign!(var_field!($:backref), $:tOP_ASGN, $:rhs)) %*/
12645 }
12646#line 12647 "parse.c"
12647 break;
12648
12649 case 59: /* def_endless_method_endless_command: defn_head f_opt_paren_args '=' endless_command */
12650#line 2951 "parse.y"
12651 {
12652 endless_method_name(p, (yyvsp[-3].node_def_temp)->nd_mid, &(yylsp[-3]));
12653 restore_defun(p, (yyvsp[-3].node_def_temp));
12654 ((yyval.node) = (yyvsp[-3].node_def_temp)->nd_def)->nd_loc = (yyloc);
12655 (yyvsp[0].node) = new_scope_body(p, (yyvsp[-2].node_args), (yyvsp[0].node), (yyval.node), &(yyloc));
12656 RNODE_DEFN((yyval.node))->nd_defn = (yyvsp[0].node);
12657 /*% ripper: bodystmt!($:bodystmt, Qnil, Qnil, Qnil) %*/
12658 /*% ripper: def!($:head, $:args, $:$) %*/
12659 local_pop(p);
12660 }
12661#line 12662 "parse.c"
12662 break;
12663
12664 case 60: /* def_endless_method_endless_command: defs_head f_opt_paren_args '=' endless_command */
12665#line 2962 "parse.y"
12666 {
12667 endless_method_name(p, (yyvsp[-3].node_def_temp)->nd_mid, &(yylsp[-3]));
12668 restore_defun(p, (yyvsp[-3].node_def_temp));
12669 ((yyval.node) = (yyvsp[-3].node_def_temp)->nd_def)->nd_loc = (yyloc);
12670 (yyvsp[0].node) = new_scope_body(p, (yyvsp[-2].node_args), (yyvsp[0].node), (yyval.node), &(yyloc));
12671 RNODE_DEFS((yyval.node))->nd_defn = (yyvsp[0].node);
12672 /*% ripper: bodystmt!($:bodystmt, Qnil, Qnil, Qnil) %*/
12673 /*% ripper: defs!(*$:head[0..2], $:args, $:$) %*/
12674 local_pop(p);
12675 }
12676#line 12677 "parse.c"
12677 break;
12678
12679 case 63: /* endless_command: endless_command "'rescue' modifier" after_rescue arg */
12680#line 3424 "parse.y"
12681 {
12682 p->ctxt.in_rescue = (yyvsp[-1].ctxt).in_rescue;
12683 (yyval.node) = rescued_expr(p, (yyvsp[-3].node), (yyvsp[0].node), &(yylsp[-3]), &(yylsp[-2]), &(yylsp[0]));
12684 /*% ripper: rescue_mod!($:1, $:4) %*/
12685 }
12686#line 12687 "parse.c"
12687 break;
12688
12689 case 66: /* endless_command: "'not'" option_'\n' endless_command */
12690#line 3430 "parse.y"
12691 {
12692 (yyval.node) = call_uni_op(p, method_cond(p, (yyvsp[0].node), &(yylsp[0])), METHOD_NOT, &(yylsp[-2]), &(yyloc));
12693 /*% ripper: unary!(ID2VAL(idNOT), $:3) %*/
12694 }
12695#line 12696 "parse.c"
12696 break;
12697
12698 case 68: /* command_rhs: command_call_value "'rescue' modifier" after_rescue stmt */
12699#line 3438 "parse.y"
12700 {
12701 p->ctxt.in_rescue = (yyvsp[-1].ctxt).in_rescue;
12702 YYLTYPE loc = code_loc_gen(&(yylsp[-2]), &(yylsp[0]));
12703 (yyval.node) = NEW_RESCUE((yyvsp[-3].node), NEW_RESBODY(0, 0, remove_begin((yyvsp[0].node)), 0, &loc), 0, &(yyloc));
12704 /*% ripper: rescue_mod!($:1, $:4) %*/
12705 }
12706#line 12707 "parse.c"
12707 break;
12708
12709 case 71: /* expr: expr "'and'" expr */
12710#line 3449 "parse.y"
12711 {
12712 (yyval.node) = logop(p, idAND, (yyvsp[-2].node), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
12713 /*% ripper: binary!($:left, ID2VAL(idAND), $:right) %*/
12714 }
12715#line 12716 "parse.c"
12716 break;
12717
12718 case 72: /* expr: expr "'or'" expr */
12719#line 3454 "parse.y"
12720 {
12721 (yyval.node) = logop(p, idOR, (yyvsp[-2].node), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
12722 /*% ripper: binary!($:left, ID2VAL(idOR), $:right) %*/
12723 }
12724#line 12725 "parse.c"
12725 break;
12726
12727 case 73: /* expr: "'not'" option_'\n' expr */
12728#line 3459 "parse.y"
12729 {
12730 (yyval.node) = call_uni_op(p, method_cond(p, (yyvsp[0].node), &(yylsp[0])), METHOD_NOT, &(yylsp[-2]), &(yyloc));
12731 /*% ripper: unary!(ID2VAL(idNOT), $:arg) %*/
12732 }
12733#line 12734 "parse.c"
12734 break;
12735
12736 case 74: /* expr: '!' command_call */
12737#line 3464 "parse.y"
12738 {
12739 (yyval.node) = call_uni_op(p, method_cond(p, (yyvsp[0].node), &(yylsp[0])), '!', &(yylsp[-1]), &(yyloc));
12740 /*% ripper: unary!(ID2VAL('\'!\''), $:arg) %*/
12741 }
12742#line 12743 "parse.c"
12743 break;
12744
12745 case 75: /* $@7: %empty */
12746#line 3469 "parse.y"
12747 {
12748 value_expr(p, (yyvsp[-1].node));
12749 }
12750#line 12751 "parse.c"
12751 break;
12752
12753 case 76: /* expr: arg "=>" $@7 p_in_kwarg p_pvtbl p_pktbl p_top_expr_body */
12754#line 3474 "parse.y"
12755 {
12756 pop_pktbl(p, (yyvsp[-1].tbl));
12757 pop_pvtbl(p, (yyvsp[-2].tbl));
12758 p->ctxt.in_kwarg = (yyvsp[-3].ctxt).in_kwarg;
12759 p->ctxt.in_alt_pattern = (yyvsp[-3].ctxt).in_alt_pattern;
12760 p->ctxt.capture_in_pattern = (yyvsp[-3].ctxt).capture_in_pattern;
12761 (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);
12762 /*% ripper: case!($:arg, in!($:body, Qnil, Qnil)) %*/
12763 }
12764#line 12765 "parse.c"
12765 break;
12766
12767 case 77: /* $@8: %empty */
12768#line 3484 "parse.y"
12769 {
12770 value_expr(p, (yyvsp[-1].node));
12771 }
12772#line 12773 "parse.c"
12773 break;
12774
12775 case 78: /* expr: arg "'in'" $@8 p_in_kwarg p_pvtbl p_pktbl p_top_expr_body */
12776#line 3489 "parse.y"
12777 {
12778 pop_pktbl(p, (yyvsp[-1].tbl));
12779 pop_pvtbl(p, (yyvsp[-2].tbl));
12780 p->ctxt.in_kwarg = (yyvsp[-3].ctxt).in_kwarg;
12781 p->ctxt.in_alt_pattern = (yyvsp[-3].ctxt).in_alt_pattern;
12782 p->ctxt.capture_in_pattern = (yyvsp[-3].ctxt).capture_in_pattern;
12783 (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);
12784 /*% ripper: case!($:arg, in!($:body, Qnil, Qnil)) %*/
12785 }
12786#line 12787 "parse.c"
12787 break;
12788
12789 case 80: /* def_name: fname */
12790#line 3502 "parse.y"
12791 {
12792 numparam_name(p, (yyvsp[0].id));
12793 local_push(p, 0);
12794 p->ctxt.in_def = 1;
12795 p->ctxt.in_rescue = before_rescue;
12796 p->ctxt.cant_return = 0;
12797 (yyval.id) = (yyvsp[0].id);
12798 }
12799#line 12800 "parse.c"
12800 break;
12801
12802 case 81: /* defn_head: k_def def_name */
12803#line 3513 "parse.y"
12804 {
12805 (yyval.node_def_temp) = def_head_save(p, (yyvsp[-1].node_def_temp));
12806 (yyval.node_def_temp)->nd_mid = (yyvsp[0].id);
12807 (yyval.node_def_temp)->nd_def = NEW_DEFN((yyvsp[0].id), 0, &(yyloc));
12808 /*% ripper: $:def_name %*/
12809 }
12810#line 12811 "parse.c"
12811 break;
12812
12813 case 82: /* $@9: %empty */
12814#line 3522 "parse.y"
12815 {
12816 SET_LEX_STATE(EXPR_FNAME);
12817 }
12818#line 12819 "parse.c"
12819 break;
12820
12821 case 83: /* defs_head: k_def singleton dot_or_colon $@9 def_name */
12822#line 3526 "parse.y"
12823 {
12824 SET_LEX_STATE(EXPR_ENDFN|EXPR_LABEL); /* force for args */
12825 (yyval.node_def_temp) = def_head_save(p, (yyvsp[-4].node_def_temp));
12826 (yyval.node_def_temp)->nd_mid = (yyvsp[0].id);
12827 (yyval.node_def_temp)->nd_def = NEW_DEFS((yyvsp[-3].node), (yyvsp[0].id), 0, &(yyloc));
12828 /*% ripper: [$:singleton, $:dot_or_colon, $:def_name] %*/
12829 }
12830#line 12831 "parse.c"
12831 break;
12832
12833 case 84: /* value_expr_expr: expr */
12834#line 3146 "parse.y"
12835 {
12836 value_expr(p, (yyvsp[0].node));
12837 (yyval.node) = (yyvsp[0].node);
12838 }
12839#line 12840 "parse.c"
12840 break;
12841
12842 case 86: /* expr_value: error */
12843#line 3537 "parse.y"
12844 {
12845 (yyval.node) = NEW_ERROR(&(yyloc));
12846 }
12847#line 12848 "parse.c"
12848 break;
12849
12850 case 87: /* $@10: %empty */
12851#line 3542 "parse.y"
12852 {COND_PUSH(1);}
12853#line 12854 "parse.c"
12854 break;
12855
12856 case 88: /* $@11: %empty */
12857#line 3542 "parse.y"
12858 {COND_POP();}
12859#line 12860 "parse.c"
12860 break;
12861
12862 case 89: /* expr_value_do: $@10 expr_value do $@11 */
12863#line 3543 "parse.y"
12864 {
12865 (yyval.node) = (yyvsp[-2].node);
12866 /*% ripper: $:2 %*/
12867 }
12868#line 12869 "parse.c"
12869 break;
12870
12871 case 92: /* value_expr_command_call: command_call */
12872#line 3146 "parse.y"
12873 {
12874 value_expr(p, (yyvsp[0].node));
12875 (yyval.node) = (yyvsp[0].node);
12876 }
12877#line 12878 "parse.c"
12878 break;
12879
12880 case 95: /* block_command: block_call call_op2 operation2 command_args */
12881#line 3558 "parse.y"
12882 {
12883 (yyval.node) = new_qcall(p, (yyvsp[-2].id), (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
12884 /*% ripper: method_add_arg!(call!($:1, $:2, $:3), $:4) %*/
12885 }
12886#line 12887 "parse.c"
12887 break;
12888
12889 case 96: /* cmd_brace_block: "{ arg" brace_body '}' */
12890#line 3565 "parse.y"
12891 {
12892 (yyval.node) = (yyvsp[-1].node);
12893 set_embraced_location((yyval.node), &(yylsp[-2]), &(yylsp[0]));
12894 /*% ripper: $:2 %*/
12895 }
12896#line 12897 "parse.c"
12897 break;
12898
12899 case 97: /* fcall: "local variable or method" */
12900#line 3573 "parse.y"
12901 {
12902 (yyval.node_fcall) = NEW_FCALL((yyvsp[0].id), 0, &(yyloc));
12903 /*% ripper: $:1 %*/
12904 }
12905#line 12906 "parse.c"
12906 break;
12907
12908 case 98: /* fcall: "constant" */
12909#line 3573 "parse.y"
12910 {
12911 (yyval.node_fcall) = NEW_FCALL((yyvsp[0].id), 0, &(yyloc));
12912 /*% ripper: $:1 %*/
12913 }
12914#line 12915 "parse.c"
12915 break;
12916
12917 case 99: /* fcall: "method" */
12918#line 3573 "parse.y"
12919 {
12920 (yyval.node_fcall) = NEW_FCALL((yyvsp[0].id), 0, &(yyloc));
12921 /*% ripper: $:1 %*/
12922 }
12923#line 12924 "parse.c"
12924 break;
12925
12926 case 100: /* command: fcall command_args */
12927#line 3580 "parse.y"
12928 {
12929 (yyvsp[-1].node_fcall)->nd_args = (yyvsp[0].node);
12930 nd_set_last_loc((yyvsp[-1].node_fcall), (yylsp[0]).end_pos);
12931 (yyval.node) = (NODE *)(yyvsp[-1].node_fcall);
12932 /*% ripper: command!($:1, $:2) %*/
12933 }
12934#line 12935 "parse.c"
12935 break;
12936
12937 case 101: /* command: fcall command_args cmd_brace_block */
12938#line 3587 "parse.y"
12939 {
12940 block_dup_check(p, (yyvsp[-1].node), (yyvsp[0].node));
12941 (yyvsp[-2].node_fcall)->nd_args = (yyvsp[-1].node);
12942 (yyval.node) = method_add_block(p, (NODE *)(yyvsp[-2].node_fcall), (yyvsp[0].node), &(yyloc));
12943 fixpos((yyval.node), RNODE((yyvsp[-2].node_fcall)));
12944 nd_set_last_loc((yyvsp[-2].node_fcall), (yylsp[-1]).end_pos);
12945 /*% ripper: method_add_block!(command!($:1, $:2), $:3) %*/
12946 }
12947#line 12948 "parse.c"
12948 break;
12949
12950 case 102: /* command: primary_value call_op operation2 command_args */
12951#line 3596 "parse.y"
12952 {
12953 (yyval.node) = new_command_qcall(p, (yyvsp[-2].id), (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), 0, &(yylsp[-1]), &(yyloc));
12954 /*% ripper: command_call!($:1, $:2, $:3, $:4) %*/
12955 }
12956#line 12957 "parse.c"
12957 break;
12958
12959 case 103: /* command: primary_value call_op operation2 command_args cmd_brace_block */
12960#line 3601 "parse.y"
12961 {
12962 (yyval.node) = new_command_qcall(p, (yyvsp[-3].id), (yyvsp[-4].node), (yyvsp[-2].id), (yyvsp[-1].node), (yyvsp[0].node), &(yylsp[-2]), &(yyloc));
12963 /*% ripper: method_add_block!(command_call!($:1, $:2, $:3, $:4), $:5) %*/
12964 }
12965#line 12966 "parse.c"
12966 break;
12967
12968 case 104: /* command: primary_value "::" operation2 command_args */
12969#line 3606 "parse.y"
12970 {
12971 (yyval.node) = new_command_qcall(p, idCOLON2, (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), 0, &(yylsp[-1]), &(yyloc));
12972 /*% ripper: command_call!($:1, $:2, $:3, $:4) %*/
12973 }
12974#line 12975 "parse.c"
12975 break;
12976
12977 case 105: /* command: primary_value "::" operation2 command_args cmd_brace_block */
12978#line 3611 "parse.y"
12979 {
12980 (yyval.node) = new_command_qcall(p, idCOLON2, (yyvsp[-4].node), (yyvsp[-2].id), (yyvsp[-1].node), (yyvsp[0].node), &(yylsp[-2]), &(yyloc));
12981 /*% ripper: method_add_block!(command_call!($:1, $:2, $:3, $:4), $:5) %*/
12982 }
12983#line 12984 "parse.c"
12984 break;
12985
12986 case 106: /* command: primary_value "::" "constant" '{' brace_body '}' */
12987#line 3616 "parse.y"
12988 {
12989 set_embraced_location((yyvsp[-1].node), &(yylsp[-2]), &(yylsp[0]));
12990 (yyval.node) = new_command_qcall(p, idCOLON2, (yyvsp[-5].node), (yyvsp[-3].id), 0, (yyvsp[-1].node), &(yylsp[-3]), &(yyloc));
12991 /*% ripper: method_add_block!(command_call!($:1, $:2, $:3, Qnil), $:5) %*/
12992 }
12993#line 12994 "parse.c"
12994 break;
12995
12996 case 107: /* command: "'super'" command_args */
12997#line 3622 "parse.y"
12998 {
12999 (yyval.node) = NEW_SUPER((yyvsp[0].node), &(yyloc), &(yylsp[-1]), &NULL_LOC, &NULL_LOC);
13000 fixpos((yyval.node), (yyvsp[0].node));
13001 /*% ripper: super!($:2) %*/
13002 }
13003#line 13004 "parse.c"
13004 break;
13005
13006 case 108: /* command: k_yield command_args */
13007#line 3628 "parse.y"
13008 {
13009 (yyval.node) = NEW_YIELD((yyvsp[0].node), &(yyloc), &(yylsp[-1]), &NULL_LOC, &NULL_LOC);
13010 fixpos((yyval.node), (yyvsp[0].node));
13011 /*% ripper: yield!($:2) %*/
13012 }
13013#line 13014 "parse.c"
13014 break;
13015
13016 case 109: /* command: k_return call_args */
13017#line 3634 "parse.y"
13018 {
13019 (yyval.node) = NEW_RETURN(ret_args(p, (yyvsp[0].node)), &(yyloc), &(yylsp[-1]));
13020 /*% ripper: return!($:2) %*/
13021 }
13022#line 13023 "parse.c"
13023 break;
13024
13025 case 110: /* command: "'break'" call_args */
13026#line 3639 "parse.y"
13027 {
13028 NODE *args = 0;
13029 args = ret_args(p, (yyvsp[0].node));
13030 (yyval.node) = add_block_exit(p, NEW_BREAK(args, &(yyloc), &(yylsp[-1])));
13031 /*% ripper: break!($:2) %*/
13032 }
13033#line 13034 "parse.c"
13034 break;
13035
13036 case 111: /* command: "'next'" call_args */
13037#line 3646 "parse.y"
13038 {
13039 NODE *args = 0;
13040 args = ret_args(p, (yyvsp[0].node));
13041 (yyval.node) = add_block_exit(p, NEW_NEXT(args, &(yyloc), &(yylsp[-1])));
13042 /*% ripper: next!($:2) %*/
13043 }
13044#line 13045 "parse.c"
13045 break;
13046
13047 case 113: /* mlhs: "(" mlhs_inner rparen */
13048#line 3656 "parse.y"
13049 {
13050 (yyval.node_masgn) = (yyvsp[-1].node_masgn);
13051 /*% ripper: mlhs_paren!($:2) %*/
13052 }
13053#line 13054 "parse.c"
13054 break;
13055
13056 case 115: /* mlhs_inner: "(" mlhs_inner rparen */
13057#line 3664 "parse.y"
13058 {
13059 (yyval.node_masgn) = NEW_MASGN(NEW_LIST((NODE *)(yyvsp[-1].node_masgn), &(yyloc)), 0, &(yyloc));
13060 /*% ripper: mlhs_paren!($:2) %*/
13061 }
13062#line 13063 "parse.c"
13063 break;
13064
13065 case 116: /* mlhs_basic: mlhs_head */
13066#line 3671 "parse.y"
13067 {
13068 (yyval.node_masgn) = NEW_MASGN((yyvsp[0].node), 0, &(yyloc));
13069 /*% ripper: $:1 %*/
13070 }
13071#line 13072 "parse.c"
13072 break;
13073
13074 case 117: /* mlhs_basic: mlhs_head mlhs_item */
13075#line 3676 "parse.y"
13076 {
13077 (yyval.node_masgn) = NEW_MASGN(list_append(p, (yyvsp[-1].node), (yyvsp[0].node)), 0, &(yyloc));
13078 /*% ripper: mlhs_add!($:1, $:2) %*/
13079 }
13080#line 13081 "parse.c"
13081 break;
13082
13083 case 118: /* mlhs_basic: mlhs_head "*" mlhs_node */
13084#line 3681 "parse.y"
13085 {
13086 (yyval.node_masgn) = NEW_MASGN((yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
13087 /*% ripper: mlhs_add_star!($:1, $:3) %*/
13088 }
13089#line 13090 "parse.c"
13090 break;
13091
13092 case 119: /* mlhs_items_mlhs_item: mlhs_item */
13093#line 3033 "parse.y"
13094 {
13095 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
13096 /*% ripper: mlhs_add!(mlhs_new!, $:1) %*/
13097 }
13098#line 13099 "parse.c"
13099 break;
13100
13101 case 120: /* mlhs_items_mlhs_item: mlhs_items_mlhs_item ',' mlhs_item */
13102#line 3038 "parse.y"
13103 {
13104 (yyval.node) = list_append(p, (yyvsp[-2].node), (yyvsp[0].node));
13105 /*% ripper: mlhs_add!($:1, $:3) %*/
13106 }
13107#line 13108 "parse.c"
13108 break;
13109
13110 case 121: /* mlhs_basic: mlhs_head "*" mlhs_node ',' mlhs_items_mlhs_item */
13111#line 3686 "parse.y"
13112 {
13113 (yyval.node_masgn) = NEW_MASGN((yyvsp[-4].node), NEW_POSTARG((yyvsp[-2].node),(yyvsp[0].node),&(yyloc)), &(yyloc));
13114 /*% ripper: mlhs_add_post!(mlhs_add_star!($:1, $:3), $:5) %*/
13115 }
13116#line 13117 "parse.c"
13117 break;
13118
13119 case 122: /* mlhs_basic: mlhs_head "*" */
13120#line 3691 "parse.y"
13121 {
13122 (yyval.node_masgn) = NEW_MASGN((yyvsp[-1].node), NODE_SPECIAL_NO_NAME_REST, &(yyloc));
13123 /*% ripper: mlhs_add_star!($:1, Qnil) %*/
13124 }
13125#line 13126 "parse.c"
13126 break;
13127
13128 case 123: /* mlhs_basic: mlhs_head "*" ',' mlhs_items_mlhs_item */
13129#line 3696 "parse.y"
13130 {
13131 (yyval.node_masgn) = NEW_MASGN((yyvsp[-3].node), NEW_POSTARG(NODE_SPECIAL_NO_NAME_REST, (yyvsp[0].node), &(yyloc)), &(yyloc));
13132 /*% ripper: mlhs_add_post!(mlhs_add_star!($:1, Qnil), $:4) %*/
13133 }
13134#line 13135 "parse.c"
13135 break;
13136
13137 case 124: /* mlhs_basic: "*" mlhs_node */
13138#line 3701 "parse.y"
13139 {
13140 (yyval.node_masgn) = NEW_MASGN(0, (yyvsp[0].node), &(yyloc));
13141 /*% ripper: mlhs_add_star!(mlhs_new!, $:2) %*/
13142 }
13143#line 13144 "parse.c"
13144 break;
13145
13146 case 125: /* mlhs_basic: "*" mlhs_node ',' mlhs_items_mlhs_item */
13147#line 3706 "parse.y"
13148 {
13149 (yyval.node_masgn) = NEW_MASGN(0, NEW_POSTARG((yyvsp[-2].node),(yyvsp[0].node),&(yyloc)), &(yyloc));
13150 /*% ripper: mlhs_add_post!(mlhs_add_star!(mlhs_new!, $:2), $:4) %*/
13151 }
13152#line 13153 "parse.c"
13153 break;
13154
13155 case 126: /* mlhs_basic: "*" */
13156#line 3711 "parse.y"
13157 {
13158 (yyval.node_masgn) = NEW_MASGN(0, NODE_SPECIAL_NO_NAME_REST, &(yyloc));
13159 /*% ripper: mlhs_add_star!(mlhs_new!, Qnil) %*/
13160 }
13161#line 13162 "parse.c"
13162 break;
13163
13164 case 127: /* mlhs_basic: "*" ',' mlhs_items_mlhs_item */
13165#line 3716 "parse.y"
13166 {
13167 (yyval.node_masgn) = NEW_MASGN(0, NEW_POSTARG(NODE_SPECIAL_NO_NAME_REST, (yyvsp[0].node), &(yyloc)), &(yyloc));
13168 /*% ripper: mlhs_add_post!(mlhs_add_star!(mlhs_new!, Qnil), $:3) %*/
13169 }
13170#line 13171 "parse.c"
13171 break;
13172
13173 case 129: /* mlhs_item: "(" mlhs_inner rparen */
13174#line 3724 "parse.y"
13175 {
13176 (yyval.node) = (NODE *)(yyvsp[-1].node_masgn);
13177 /*% ripper: mlhs_paren!($:2) %*/
13178 }
13179#line 13180 "parse.c"
13180 break;
13181
13182 case 130: /* mlhs_head: mlhs_item ',' */
13183#line 3731 "parse.y"
13184 {
13185 (yyval.node) = NEW_LIST((yyvsp[-1].node), &(yylsp[-1]));
13186 /*% ripper: mlhs_add!(mlhs_new!, $:1) %*/
13187 }
13188#line 13189 "parse.c"
13189 break;
13190
13191 case 131: /* mlhs_head: mlhs_head mlhs_item ',' */
13192#line 3736 "parse.y"
13193 {
13194 (yyval.node) = list_append(p, (yyvsp[-2].node), (yyvsp[-1].node));
13195 /*% ripper: mlhs_add!($:1, $:2) %*/
13196 }
13197#line 13198 "parse.c"
13198 break;
13199
13200 case 132: /* mlhs_node: user_variable */
13201#line 3744 "parse.y"
13202 {
13203 /*% ripper: var_field!($:1) %*/
13204 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
13205 }
13206#line 13207 "parse.c"
13207 break;
13208
13209 case 133: /* mlhs_node: keyword_variable */
13210#line 3744 "parse.y"
13211 {
13212 /*% ripper: var_field!($:1) %*/
13213 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
13214 }
13215#line 13216 "parse.c"
13216 break;
13217
13218 case 134: /* mlhs_node: primary_value '[' opt_call_args rbracket */
13219#line 3749 "parse.y"
13220 {
13221 (yyval.node) = aryset(p, (yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
13222 /*% ripper: aref_field!($:1, $:3) %*/
13223 }
13224#line 13225 "parse.c"
13225 break;
13226
13227 case 135: /* mlhs_node: primary_value call_op "local variable or method" */
13228#line 3754 "parse.y"
13229 {
13230 anddot_multiple_assignment_check(p, &(yylsp[-1]), (yyvsp[-1].id));
13231 (yyval.node) = attrset(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].id), &(yyloc));
13232 /*% ripper: field!($:1, $:2, $:3) %*/
13233 }
13234#line 13235 "parse.c"
13235 break;
13236
13237 case 136: /* mlhs_node: primary_value call_op "constant" */
13238#line 3754 "parse.y"
13239 {
13240 anddot_multiple_assignment_check(p, &(yylsp[-1]), (yyvsp[-1].id));
13241 (yyval.node) = attrset(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].id), &(yyloc));
13242 /*% ripper: field!($:1, $:2, $:3) %*/
13243 }
13244#line 13245 "parse.c"
13245 break;
13246
13247 case 137: /* mlhs_node: primary_value "::" "local variable or method" */
13248#line 3760 "parse.y"
13249 {
13250 (yyval.node) = attrset(p, (yyvsp[-2].node), idCOLON2, (yyvsp[0].id), &(yyloc));
13251 /*% ripper: const_path_field!($:1, $:3) %*/
13252 }
13253#line 13254 "parse.c"
13254 break;
13255
13256 case 138: /* mlhs_node: primary_value "::" "constant" */
13257#line 3765 "parse.y"
13258 {
13259 /*% ripper: const_path_field!($:1, $:3) %*/
13260 (yyval.node) = const_decl(p, NEW_COLON2((yyvsp[-2].node), (yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0])), &(yyloc));
13261 }
13262#line 13263 "parse.c"
13263 break;
13264
13265 case 139: /* mlhs_node: ":: at EXPR_BEG" "constant" */
13266#line 3770 "parse.y"
13267 {
13268 /*% ripper: top_const_field!($:2) %*/
13269 (yyval.node) = const_decl(p, NEW_COLON3((yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0])), &(yyloc));
13270 }
13271#line 13272 "parse.c"
13272 break;
13273
13274 case 140: /* mlhs_node: backref */
13275#line 3775 "parse.y"
13276 {
13277 VALUE MAYBE_UNUSED(e) = rb_backref_error(p, (yyvsp[0].node));
13278 (yyval.node) = NEW_ERROR(&(yyloc));
13279 /*% ripper[error]: assign_error!(?e, var_field!($:1)) %*/
13280 }
13281#line 13282 "parse.c"
13282 break;
13283
13284 case 141: /* lhs: user_variable */
13285#line 3783 "parse.y"
13286 {
13287 /*% ripper: var_field!($:1) %*/
13288 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
13289 }
13290#line 13291 "parse.c"
13291 break;
13292
13293 case 142: /* lhs: keyword_variable */
13294#line 3783 "parse.y"
13295 {
13296 /*% ripper: var_field!($:1) %*/
13297 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
13298 }
13299#line 13300 "parse.c"
13300 break;
13301
13302 case 143: /* lhs: primary_value '[' opt_call_args rbracket */
13303#line 3788 "parse.y"
13304 {
13305 (yyval.node) = aryset(p, (yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
13306 /*% ripper: aref_field!($:1, $:3) %*/
13307 }
13308#line 13309 "parse.c"
13309 break;
13310
13311 case 144: /* lhs: primary_value call_op "local variable or method" */
13312#line 3793 "parse.y"
13313 {
13314 (yyval.node) = attrset(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].id), &(yyloc));
13315 /*% ripper: field!($:1, $:2, $:3) %*/
13316 }
13317#line 13318 "parse.c"
13318 break;
13319
13320 case 145: /* lhs: primary_value call_op "constant" */
13321#line 3793 "parse.y"
13322 {
13323 (yyval.node) = attrset(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].id), &(yyloc));
13324 /*% ripper: field!($:1, $:2, $:3) %*/
13325 }
13326#line 13327 "parse.c"
13327 break;
13328
13329 case 146: /* lhs: primary_value "::" "local variable or method" */
13330#line 3798 "parse.y"
13331 {
13332 (yyval.node) = attrset(p, (yyvsp[-2].node), idCOLON2, (yyvsp[0].id), &(yyloc));
13333 /*% ripper: field!($:1, $:2, $:3) %*/
13334 }
13335#line 13336 "parse.c"
13336 break;
13337
13338 case 147: /* lhs: primary_value "::" "constant" */
13339#line 3803 "parse.y"
13340 {
13341 /*% ripper: const_path_field!($:1, $:3) %*/
13342 (yyval.node) = const_decl(p, NEW_COLON2((yyvsp[-2].node), (yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0])), &(yyloc));
13343 }
13344#line 13345 "parse.c"
13345 break;
13346
13347 case 148: /* lhs: ":: at EXPR_BEG" "constant" */
13348#line 3808 "parse.y"
13349 {
13350 /*% ripper: top_const_field!($:2) %*/
13351 (yyval.node) = const_decl(p, NEW_COLON3((yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0])), &(yyloc));
13352 }
13353#line 13354 "parse.c"
13354 break;
13355
13356 case 149: /* lhs: backref */
13357#line 3813 "parse.y"
13358 {
13359 VALUE MAYBE_UNUSED(e) = rb_backref_error(p, (yyvsp[0].node));
13360 (yyval.node) = NEW_ERROR(&(yyloc));
13361 /*% ripper[error]: assign_error!(?e, var_field!($:1)) %*/
13362 }
13363#line 13364 "parse.c"
13364 break;
13365
13366 case 150: /* cname: "local variable or method" */
13367#line 3821 "parse.y"
13368 {
13369 static const char mesg[] = "class/module name must be CONSTANT";
13370 /*%%%*/
13371 yyerror1(&(yylsp[0]), mesg);
13372 /*% %*/
13373 /*% ripper[error]: class_name_error!(ERR_MESG(), $:1) %*/
13374 }
13375#line 13376 "parse.c"
13376 break;
13377
13378 case 152: /* cpath: ":: at EXPR_BEG" cname */
13379#line 3832 "parse.y"
13380 {
13381 (yyval.node) = NEW_COLON3((yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0]));
13382 /*% ripper: top_const_ref!($:2) %*/
13383 }
13384#line 13385 "parse.c"
13385 break;
13386
13387 case 153: /* cpath: cname */
13388#line 3837 "parse.y"
13389 {
13390 (yyval.node) = NEW_COLON2(0, (yyvsp[0].id), &(yyloc), &NULL_LOC, &(yylsp[0]));
13391 /*% ripper: const_ref!($:1) %*/
13392 }
13393#line 13394 "parse.c"
13394 break;
13395
13396 case 154: /* cpath: primary_value "::" cname */
13397#line 3842 "parse.y"
13398 {
13399 (yyval.node) = NEW_COLON2((yyvsp[-2].node), (yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0]));
13400 /*% ripper: const_path_ref!($:1, $:3) %*/
13401 }
13402#line 13403 "parse.c"
13403 break;
13404
13405 case 158: /* fname: op */
13406#line 3850 "parse.y"
13407 {
13408 SET_LEX_STATE(EXPR_ENDFN);
13409 (yyval.id) = (yyvsp[0].id);
13410 }
13411#line 13412 "parse.c"
13412 break;
13413
13414 case 160: /* fitem: fname */
13415#line 3858 "parse.y"
13416 {
13417 (yyval.node) = NEW_SYM(rb_id2str((yyvsp[0].id)), &(yyloc));
13418 /*% ripper: symbol_literal!($:1) %*/
13419 }
13420#line 13421 "parse.c"
13421 break;
13422
13423 case 162: /* undef_list: fitem */
13424#line 3866 "parse.y"
13425 {
13426 (yyval.node) = NEW_UNDEF((yyvsp[0].node), &(yyloc));
13427 /*% ripper: rb_ary_new3(1, $:1) %*/
13428 }
13429#line 13430 "parse.c"
13430 break;
13431
13432 case 163: /* $@12: %empty */
13433#line 3870 "parse.y"
13434 {SET_LEX_STATE(EXPR_FNAME|EXPR_FITEM);}
13435#line 13436 "parse.c"
13436 break;
13437
13438 case 164: /* undef_list: undef_list ',' $@12 fitem */
13439#line 3871 "parse.y"
13440 {
13441 nd_set_last_loc((yyvsp[-3].node), (yylsp[0]).end_pos);
13442 rb_parser_ary_push_node(p, RNODE_UNDEF((yyvsp[-3].node))->nd_undefs, (yyvsp[0].node));
13443 /*% ripper: rb_ary_push($:1, $:4) %*/
13444 }
13445#line 13446 "parse.c"
13446 break;
13447
13448 case 165: /* op: '|' */
13449#line 3878 "parse.y"
13450 { (yyval.id) = '|'; }
13451#line 13452 "parse.c"
13452 break;
13453
13454 case 166: /* op: '^' */
13455#line 3879 "parse.y"
13456 { (yyval.id) = '^'; }
13457#line 13458 "parse.c"
13458 break;
13459
13460 case 167: /* op: '&' */
13461#line 3880 "parse.y"
13462 { (yyval.id) = '&'; }
13463#line 13464 "parse.c"
13464 break;
13465
13466 case 168: /* op: "<=>" */
13467#line 3881 "parse.y"
13468 { (yyval.id) = tCMP; }
13469#line 13470 "parse.c"
13470 break;
13471
13472 case 169: /* op: "==" */
13473#line 3882 "parse.y"
13474 { (yyval.id) = tEQ; }
13475#line 13476 "parse.c"
13476 break;
13477
13478 case 170: /* op: "===" */
13479#line 3883 "parse.y"
13480 { (yyval.id) = tEQQ; }
13481#line 13482 "parse.c"
13482 break;
13483
13484 case 171: /* op: "=~" */
13485#line 3884 "parse.y"
13486 { (yyval.id) = tMATCH; }
13487#line 13488 "parse.c"
13488 break;
13489
13490 case 172: /* op: "!~" */
13491#line 3885 "parse.y"
13492 { (yyval.id) = tNMATCH; }
13493#line 13494 "parse.c"
13494 break;
13495
13496 case 173: /* op: '>' */
13497#line 3886 "parse.y"
13498 { (yyval.id) = '>'; }
13499#line 13500 "parse.c"
13500 break;
13501
13502 case 174: /* op: ">=" */
13503#line 3887 "parse.y"
13504 { (yyval.id) = tGEQ; }
13505#line 13506 "parse.c"
13506 break;
13507
13508 case 175: /* op: '<' */
13509#line 3888 "parse.y"
13510 { (yyval.id) = '<'; }
13511#line 13512 "parse.c"
13512 break;
13513
13514 case 176: /* op: "<=" */
13515#line 3889 "parse.y"
13516 { (yyval.id) = tLEQ; }
13517#line 13518 "parse.c"
13518 break;
13519
13520 case 177: /* op: "!=" */
13521#line 3890 "parse.y"
13522 { (yyval.id) = tNEQ; }
13523#line 13524 "parse.c"
13524 break;
13525
13526 case 178: /* op: "<<" */
13527#line 3891 "parse.y"
13528 { (yyval.id) = tLSHFT; }
13529#line 13530 "parse.c"
13530 break;
13531
13532 case 179: /* op: ">>" */
13533#line 3892 "parse.y"
13534 { (yyval.id) = tRSHFT; }
13535#line 13536 "parse.c"
13536 break;
13537
13538 case 180: /* op: '+' */
13539#line 3893 "parse.y"
13540 { (yyval.id) = '+'; }
13541#line 13542 "parse.c"
13542 break;
13543
13544 case 181: /* op: '-' */
13545#line 3894 "parse.y"
13546 { (yyval.id) = '-'; }
13547#line 13548 "parse.c"
13548 break;
13549
13550 case 182: /* op: '*' */
13551#line 3895 "parse.y"
13552 { (yyval.id) = '*'; }
13553#line 13554 "parse.c"
13554 break;
13555
13556 case 183: /* op: "*" */
13557#line 3896 "parse.y"
13558 { (yyval.id) = '*'; }
13559#line 13560 "parse.c"
13560 break;
13561
13562 case 184: /* op: '/' */
13563#line 3897 "parse.y"
13564 { (yyval.id) = '/'; }
13565#line 13566 "parse.c"
13566 break;
13567
13568 case 185: /* op: '%' */
13569#line 3898 "parse.y"
13570 { (yyval.id) = '%'; }
13571#line 13572 "parse.c"
13572 break;
13573
13574 case 186: /* op: "**" */
13575#line 3899 "parse.y"
13576 { (yyval.id) = tPOW; }
13577#line 13578 "parse.c"
13578 break;
13579
13580 case 187: /* op: "**arg" */
13581#line 3900 "parse.y"
13582 { (yyval.id) = tDSTAR; }
13583#line 13584 "parse.c"
13584 break;
13585
13586 case 188: /* op: '!' */
13587#line 3901 "parse.y"
13588 { (yyval.id) = '!'; }
13589#line 13590 "parse.c"
13590 break;
13591
13592 case 189: /* op: '~' */
13593#line 3902 "parse.y"
13594 { (yyval.id) = '~'; }
13595#line 13596 "parse.c"
13596 break;
13597
13598 case 190: /* op: "unary+" */
13599#line 3903 "parse.y"
13600 { (yyval.id) = tUPLUS; }
13601#line 13602 "parse.c"
13602 break;
13603
13604 case 191: /* op: "unary-" */
13605#line 3904 "parse.y"
13606 { (yyval.id) = tUMINUS; }
13607#line 13608 "parse.c"
13608 break;
13609
13610 case 192: /* op: "[]" */
13611#line 3905 "parse.y"
13612 { (yyval.id) = tAREF; }
13613#line 13614 "parse.c"
13614 break;
13615
13616 case 193: /* op: "[]=" */
13617#line 3906 "parse.y"
13618 { (yyval.id) = tASET; }
13619#line 13620 "parse.c"
13620 break;
13621
13622 case 194: /* op: '`' */
13623#line 3907 "parse.y"
13624 { (yyval.id) = '`'; }
13625#line 13626 "parse.c"
13626 break;
13627
13628 case 236: /* asgn_arg_rhs: lhs '=' lex_ctxt arg_rhs */
13629#line 2920 "parse.y"
13630 {
13631 (yyval.node) = node_assign(p, (NODE *)(yyvsp[-3].node), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
13632 /*% ripper: assign!($:1, $:4) %*/
13633 }
13634#line 13635 "parse.c"
13635 break;
13636
13637 case 238: /* op_asgn_arg_rhs: var_lhs "operator-assignment" lex_ctxt arg_rhs */
13638#line 3046 "parse.y"
13639 {
13640 (yyval.node) = new_op_assign(p, (yyvsp[-3].node), (yyvsp[-2].id), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
13641 /*% ripper: opassign!($:var_lhs, $:tOP_ASGN, $:rhs) %*/
13642 }
13643#line 13644 "parse.c"
13644 break;
13645
13646 case 239: /* op_asgn_arg_rhs: primary_value '[' opt_call_args rbracket "operator-assignment" lex_ctxt arg_rhs */
13647#line 3051 "parse.y"
13648 {
13649 (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]));
13650 /*% ripper: opassign!(aref_field!($:primary_value, $:opt_call_args), $:tOP_ASGN, $:rhs) %*/
13651 }
13652#line 13653 "parse.c"
13653 break;
13654
13655 case 240: /* op_asgn_arg_rhs: primary_value call_op "local variable or method" "operator-assignment" lex_ctxt arg_rhs */
13656#line 3056 "parse.y"
13657 {
13658 (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]));
13659 /*% ripper: opassign!(field!($:primary_value, $:call_op, $:tIDENTIFIER), $:tOP_ASGN, $:rhs) %*/
13660 }
13661#line 13662 "parse.c"
13662 break;
13663
13664 case 241: /* op_asgn_arg_rhs: primary_value call_op "constant" "operator-assignment" lex_ctxt arg_rhs */
13665#line 3061 "parse.y"
13666 {
13667 (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]));
13668 /*% ripper: opassign!(field!($:primary_value, $:call_op, $:tCONSTANT), $:tOP_ASGN, $:rhs) %*/
13669 }
13670#line 13671 "parse.c"
13671 break;
13672
13673 case 242: /* op_asgn_arg_rhs: primary_value "::" "local variable or method" "operator-assignment" lex_ctxt arg_rhs */
13674#line 3066 "parse.y"
13675 {
13676 (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]));
13677 /*% ripper: opassign!(field!($:primary_value, $:tCOLON2, $:tIDENTIFIER), $:tOP_ASGN, $:rhs) %*/
13678 }
13679#line 13680 "parse.c"
13680 break;
13681
13682 case 243: /* op_asgn_arg_rhs: primary_value "::" "constant" "operator-assignment" lex_ctxt arg_rhs */
13683#line 3071 "parse.y"
13684 {
13685 YYLTYPE loc = code_loc_gen(&(yylsp[-5]), &(yylsp[-3]));
13686 (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));
13687 /*% ripper: opassign!(const_path_field!($:primary_value, $:tCONSTANT), $:tOP_ASGN, $:rhs) %*/
13688 }
13689#line 13690 "parse.c"
13690 break;
13691
13692 case 244: /* op_asgn_arg_rhs: ":: at EXPR_BEG" "constant" "operator-assignment" lex_ctxt arg_rhs */
13693#line 3077 "parse.y"
13694 {
13695 YYLTYPE loc = code_loc_gen(&(yylsp[-4]), &(yylsp[-3]));
13696 (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));
13697 /*% ripper: opassign!(top_const_field!($:tCONSTANT), $:tOP_ASGN, $:rhs) %*/
13698 }
13699#line 13700 "parse.c"
13700 break;
13701
13702 case 245: /* op_asgn_arg_rhs: backref "operator-assignment" lex_ctxt arg_rhs */
13703#line 3083 "parse.y"
13704 {
13705 VALUE MAYBE_UNUSED(e) = rb_backref_error(p, (yyvsp[-3].node));
13706 (yyval.node) = NEW_ERROR(&(yyloc));
13707 /*% ripper[error]: assign_error!(?e, opassign!(var_field!($:backref), $:tOP_ASGN, $:rhs)) %*/
13708 }
13709#line 13710 "parse.c"
13710 break;
13711
13712 case 247: /* range_expr_arg: arg ".." arg */
13713#line 3105 "parse.y"
13714 {
13715 value_expr(p, (yyvsp[-2].node));
13716 value_expr(p, (yyvsp[0].node));
13717 (yyval.node) = NEW_DOT2((yyvsp[-2].node), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
13718 /*% ripper: dot2!($:1, $:3) %*/
13719 }
13720#line 13721 "parse.c"
13721 break;
13722
13723 case 248: /* range_expr_arg: arg "..." arg */
13724#line 3112 "parse.y"
13725 {
13726 value_expr(p, (yyvsp[-2].node));
13727 value_expr(p, (yyvsp[0].node));
13728 (yyval.node) = NEW_DOT3((yyvsp[-2].node), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
13729 /*% ripper: dot3!($:1, $:3) %*/
13730 }
13731#line 13732 "parse.c"
13732 break;
13733
13734 case 249: /* range_expr_arg: arg ".." */
13735#line 3119 "parse.y"
13736 {
13737 value_expr(p, (yyvsp[-1].node));
13738 (yyval.node) = NEW_DOT2((yyvsp[-1].node), new_nil_at(p, &(yylsp[0]).end_pos), &(yyloc), &(yylsp[0]));
13739 /*% ripper: dot2!($:1, Qnil) %*/
13740 }
13741#line 13742 "parse.c"
13742 break;
13743
13744 case 250: /* range_expr_arg: arg "..." */
13745#line 3125 "parse.y"
13746 {
13747 value_expr(p, (yyvsp[-1].node));
13748 (yyval.node) = NEW_DOT3((yyvsp[-1].node), new_nil_at(p, &(yylsp[0]).end_pos), &(yyloc), &(yylsp[0]));
13749 /*% ripper: dot3!($:1, Qnil) %*/
13750 }
13751#line 13752 "parse.c"
13752 break;
13753
13754 case 251: /* range_expr_arg: "(.." arg */
13755#line 3131 "parse.y"
13756 {
13757 value_expr(p, (yyvsp[0].node));
13758 (yyval.node) = NEW_DOT2(new_nil_at(p, &(yylsp[-1]).beg_pos), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
13759 /*% ripper: dot2!(Qnil, $:2) %*/
13760 }
13761#line 13762 "parse.c"
13762 break;
13763
13764 case 252: /* range_expr_arg: "(..." arg */
13765#line 3137 "parse.y"
13766 {
13767 value_expr(p, (yyvsp[0].node));
13768 (yyval.node) = NEW_DOT3(new_nil_at(p, &(yylsp[-1]).beg_pos), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
13769 /*% ripper: dot3!(Qnil, $:2) %*/
13770 }
13771#line 13772 "parse.c"
13772 break;
13773
13774 case 254: /* arg: arg '+' arg */
13775#line 3928 "parse.y"
13776 {
13777 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '+', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13778 /*% ripper: binary!($:1, ID2VAL('\'+\''), $:3) %*/
13779 }
13780#line 13781 "parse.c"
13781 break;
13782
13783 case 255: /* arg: arg '-' arg */
13784#line 3933 "parse.y"
13785 {
13786 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '-', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13787 /*% ripper: binary!($:1, ID2VAL('\'-\''), $:3) %*/
13788 }
13789#line 13790 "parse.c"
13790 break;
13791
13792 case 256: /* arg: arg '*' arg */
13793#line 3938 "parse.y"
13794 {
13795 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '*', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13796 /*% ripper: binary!($:1, ID2VAL('\'*\''), $:3) %*/
13797 }
13798#line 13799 "parse.c"
13799 break;
13800
13801 case 257: /* arg: arg '/' arg */
13802#line 3943 "parse.y"
13803 {
13804 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '/', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13805 /*% ripper: binary!($:1, ID2VAL('\'/\''), $:3) %*/
13806 }
13807#line 13808 "parse.c"
13808 break;
13809
13810 case 258: /* arg: arg '%' arg */
13811#line 3948 "parse.y"
13812 {
13813 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '%', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13814 /*% ripper: binary!($:1, ID2VAL('\'%\''), $:3) %*/
13815 }
13816#line 13817 "parse.c"
13817 break;
13818
13819 case 259: /* arg: arg "**" arg */
13820#line 3953 "parse.y"
13821 {
13822 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idPow, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13823 /*% ripper: binary!($:1, ID2VAL(idPow), $:3) %*/
13824 }
13825#line 13826 "parse.c"
13826 break;
13827
13828 case 260: /* arg: tUMINUS_NUM simple_numeric "**" arg */
13829#line 3958 "parse.y"
13830 {
13831 (yyval.node) = call_uni_op(p, call_bin_op(p, (yyvsp[-2].node), idPow, (yyvsp[0].node), &(yylsp[-2]), &(yyloc)), idUMinus, &(yylsp[-3]), &(yyloc));
13832 /*% ripper: unary!(ID2VAL(idUMinus), binary!($:2, ID2VAL(idPow), $:4)) %*/
13833 }
13834#line 13835 "parse.c"
13835 break;
13836
13837 case 261: /* arg: "unary+" arg */
13838#line 3963 "parse.y"
13839 {
13840 (yyval.node) = call_uni_op(p, (yyvsp[0].node), idUPlus, &(yylsp[-1]), &(yyloc));
13841 /*% ripper: unary!(ID2VAL(idUPlus), $:2) %*/
13842 }
13843#line 13844 "parse.c"
13844 break;
13845
13846 case 262: /* arg: "unary-" arg */
13847#line 3968 "parse.y"
13848 {
13849 (yyval.node) = call_uni_op(p, (yyvsp[0].node), idUMinus, &(yylsp[-1]), &(yyloc));
13850 /*% ripper: unary!(ID2VAL(idUMinus), $:2) %*/
13851 }
13852#line 13853 "parse.c"
13853 break;
13854
13855 case 263: /* arg: arg '|' arg */
13856#line 3973 "parse.y"
13857 {
13858 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '|', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13859 /*% ripper: binary!($:1, ID2VAL('\'|\''), $:3) %*/
13860 }
13861#line 13862 "parse.c"
13862 break;
13863
13864 case 264: /* arg: arg '^' arg */
13865#line 3978 "parse.y"
13866 {
13867 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '^', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13868 /*% ripper: binary!($:1, ID2VAL('\'^\''), $:3) %*/
13869 }
13870#line 13871 "parse.c"
13871 break;
13872
13873 case 265: /* arg: arg '&' arg */
13874#line 3983 "parse.y"
13875 {
13876 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '&', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13877 /*% ripper: binary!($:1, ID2VAL('\'&\''), $:3) %*/
13878 }
13879#line 13880 "parse.c"
13880 break;
13881
13882 case 266: /* arg: arg "<=>" arg */
13883#line 3988 "parse.y"
13884 {
13885 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idCmp, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13886 /*% ripper: binary!($:1, ID2VAL(idCmp), $:3) %*/
13887 }
13888#line 13889 "parse.c"
13889 break;
13890
13891 case 268: /* arg: arg "==" arg */
13892#line 3994 "parse.y"
13893 {
13894 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idEq, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13895 /*% ripper: binary!($:1, ID2VAL(idEq), $:3) %*/
13896 }
13897#line 13898 "parse.c"
13898 break;
13899
13900 case 269: /* arg: arg "===" arg */
13901#line 3999 "parse.y"
13902 {
13903 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idEqq, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13904 /*% ripper: binary!($:1, ID2VAL(idEqq), $:3) %*/
13905 }
13906#line 13907 "parse.c"
13907 break;
13908
13909 case 270: /* arg: arg "!=" arg */
13910#line 4004 "parse.y"
13911 {
13912 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idNeq, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13913 /*% ripper: binary!($:1, ID2VAL(idNeq), $:3) %*/
13914 }
13915#line 13916 "parse.c"
13916 break;
13917
13918 case 271: /* arg: arg "=~" arg */
13919#line 4009 "parse.y"
13920 {
13921 (yyval.node) = match_op(p, (yyvsp[-2].node), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13922 /*% ripper: binary!($:1, ID2VAL(idEqTilde), $:3) %*/
13923 }
13924#line 13925 "parse.c"
13925 break;
13926
13927 case 272: /* arg: arg "!~" arg */
13928#line 4014 "parse.y"
13929 {
13930 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idNeqTilde, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13931 /*% ripper: binary!($:1, ID2VAL(idNeqTilde), $:3) %*/
13932 }
13933#line 13934 "parse.c"
13934 break;
13935
13936 case 273: /* arg: '!' arg */
13937#line 4019 "parse.y"
13938 {
13939 (yyval.node) = call_uni_op(p, method_cond(p, (yyvsp[0].node), &(yylsp[0])), '!', &(yylsp[-1]), &(yyloc));
13940 /*% ripper: unary!(ID2VAL('\'!\''), $:2) %*/
13941 }
13942#line 13943 "parse.c"
13943 break;
13944
13945 case 274: /* arg: '~' arg */
13946#line 4024 "parse.y"
13947 {
13948 (yyval.node) = call_uni_op(p, (yyvsp[0].node), '~', &(yylsp[-1]), &(yyloc));
13949 /*% ripper: unary!(ID2VAL('\'~\''), $:2) %*/
13950 }
13951#line 13952 "parse.c"
13952 break;
13953
13954 case 275: /* arg: arg "<<" arg */
13955#line 4029 "parse.y"
13956 {
13957 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idLTLT, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13958 /*% ripper: binary!($:1, ID2VAL(idLTLT), $:3) %*/
13959 }
13960#line 13961 "parse.c"
13961 break;
13962
13963 case 276: /* arg: arg ">>" arg */
13964#line 4034 "parse.y"
13965 {
13966 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idGTGT, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13967 /*% ripper: binary!($:1, ID2VAL(idGTGT), $:3) %*/
13968 }
13969#line 13970 "parse.c"
13970 break;
13971
13972 case 277: /* arg: arg "&&" arg */
13973#line 4039 "parse.y"
13974 {
13975 (yyval.node) = logop(p, idANDOP, (yyvsp[-2].node), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13976 /*% ripper: binary!($:1, ID2VAL(idANDOP), $:3) %*/
13977 }
13978#line 13979 "parse.c"
13979 break;
13980
13981 case 278: /* arg: arg "||" arg */
13982#line 4044 "parse.y"
13983 {
13984 (yyval.node) = logop(p, idOROP, (yyvsp[-2].node), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13985 /*% ripper: binary!($:1, ID2VAL(idOROP), $:3) %*/
13986 }
13987#line 13988 "parse.c"
13988 break;
13989
13990 case 279: /* arg: "'defined?'" option_'\n' begin_defined arg */
13991#line 4049 "parse.y"
13992 {
13993 p->ctxt.in_defined = (yyvsp[-1].ctxt).in_defined;
13994 (yyval.node) = new_defined(p, (yyvsp[0].node), &(yyloc), &(yylsp[-3]));
13995 p->ctxt.has_trailing_semicolon = (yyvsp[-1].ctxt).has_trailing_semicolon;
13996 /*% ripper: defined!($:4) %*/
13997 }
13998#line 13999 "parse.c"
13999 break;
14000
14001 case 280: /* def_endless_method_endless_arg: defn_head f_opt_paren_args '=' endless_arg */
14002#line 2951 "parse.y"
14003 {
14004 endless_method_name(p, (yyvsp[-3].node_def_temp)->nd_mid, &(yylsp[-3]));
14005 restore_defun(p, (yyvsp[-3].node_def_temp));
14006 ((yyval.node) = (yyvsp[-3].node_def_temp)->nd_def)->nd_loc = (yyloc);
14007 (yyvsp[0].node) = new_scope_body(p, (yyvsp[-2].node_args), (yyvsp[0].node), (yyval.node), &(yyloc));
14008 RNODE_DEFN((yyval.node))->nd_defn = (yyvsp[0].node);
14009 /*% ripper: bodystmt!($:bodystmt, Qnil, Qnil, Qnil) %*/
14010 /*% ripper: def!($:head, $:args, $:$) %*/
14011 local_pop(p);
14012 }
14013#line 14014 "parse.c"
14014 break;
14015
14016 case 281: /* def_endless_method_endless_arg: defs_head f_opt_paren_args '=' endless_arg */
14017#line 2962 "parse.y"
14018 {
14019 endless_method_name(p, (yyvsp[-3].node_def_temp)->nd_mid, &(yylsp[-3]));
14020 restore_defun(p, (yyvsp[-3].node_def_temp));
14021 ((yyval.node) = (yyvsp[-3].node_def_temp)->nd_def)->nd_loc = (yyloc);
14022 (yyvsp[0].node) = new_scope_body(p, (yyvsp[-2].node_args), (yyvsp[0].node), (yyval.node), &(yyloc));
14023 RNODE_DEFS((yyval.node))->nd_defn = (yyvsp[0].node);
14024 /*% ripper: bodystmt!($:bodystmt, Qnil, Qnil, Qnil) %*/
14025 /*% ripper: defs!(*$:head[0..2], $:args, $:$) %*/
14026 local_pop(p);
14027 }
14028#line 14029 "parse.c"
14029 break;
14030
14031 case 285: /* ternary: arg '?' arg option_'\n' ':' arg */
14032#line 4061 "parse.y"
14033 {
14034 value_expr(p, (yyvsp[-5].node));
14035 (yyval.node) = new_if(p, (yyvsp[-5].node), (yyvsp[-3].node), (yyvsp[0].node), &(yyloc), &NULL_LOC, &(yylsp[-1]), &NULL_LOC);
14036 fixpos((yyval.node), (yyvsp[-5].node));
14037 /*% ripper: ifop!($:1, $:3, $:6) %*/
14038 }
14039#line 14040 "parse.c"
14040 break;
14041
14042 case 287: /* endless_arg: endless_arg "'rescue' modifier" after_rescue arg */
14043#line 4071 "parse.y"
14044 {
14045 p->ctxt.in_rescue = (yyvsp[-1].ctxt).in_rescue;
14046 (yyval.node) = rescued_expr(p, (yyvsp[-3].node), (yyvsp[0].node), &(yylsp[-3]), &(yylsp[-2]), &(yylsp[0]));
14047 /*% ripper: rescue_mod!($:1, $:4) %*/
14048 }
14049#line 14050 "parse.c"
14050 break;
14051
14052 case 288: /* endless_arg: "'not'" option_'\n' endless_arg */
14053#line 4077 "parse.y"
14054 {
14055 (yyval.node) = call_uni_op(p, method_cond(p, (yyvsp[0].node), &(yylsp[0])), METHOD_NOT, &(yylsp[-2]), &(yyloc));
14056 /*% ripper: unary!(ID2VAL(idNOT), $:3) %*/
14057 }
14058#line 14059 "parse.c"
14059 break;
14060
14061 case 289: /* relop: '>' */
14062#line 4083 "parse.y"
14063 {(yyval.id) = '>';}
14064#line 14065 "parse.c"
14065 break;
14066
14067 case 290: /* relop: '<' */
14068#line 4084 "parse.y"
14069 {(yyval.id) = '<';}
14070#line 14071 "parse.c"
14071 break;
14072
14073 case 291: /* relop: ">=" */
14074#line 4085 "parse.y"
14075 {(yyval.id) = idGE;}
14076#line 14077 "parse.c"
14077 break;
14078
14079 case 292: /* relop: "<=" */
14080#line 4086 "parse.y"
14081 {(yyval.id) = idLE;}
14082#line 14083 "parse.c"
14083 break;
14084
14085 case 293: /* rel_expr: arg relop arg */
14086#line 4090 "parse.y"
14087 {
14088 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
14089 /*% ripper: binary!($:1, ID2VAL($2), $:3) %*/
14090 }
14091#line 14092 "parse.c"
14092 break;
14093
14094 case 294: /* rel_expr: rel_expr relop arg */
14095#line 4095 "parse.y"
14096 {
14097 rb_warning1("comparison '%s' after comparison", WARN_ID((yyvsp[-1].id)));
14098 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
14099 /*% ripper: binary!($:1, ID2VAL($2), $:3) %*/
14100 }
14101#line 14102 "parse.c"
14102 break;
14103
14104 case 295: /* lex_ctxt: none */
14105#line 4103 "parse.y"
14106 {
14107 (yyval.ctxt) = p->ctxt;
14108 }
14109#line 14110 "parse.c"
14110 break;
14111
14112 case 296: /* begin_defined: lex_ctxt */
14113#line 4109 "parse.y"
14114 {
14115 p->ctxt.in_defined = 1;
14116 (yyval.ctxt) = (yyvsp[0].ctxt);
14117 }
14118#line 14119 "parse.c"
14119 break;
14120
14121 case 297: /* after_rescue: lex_ctxt */
14122#line 4116 "parse.y"
14123 {
14124 p->ctxt.in_rescue = after_rescue;
14125 (yyval.ctxt) = (yyvsp[0].ctxt);
14126 }
14127#line 14128 "parse.c"
14128 break;
14129
14130 case 298: /* value_expr_arg: arg */
14131#line 3146 "parse.y"
14132 {
14133 value_expr(p, (yyvsp[0].node));
14134 (yyval.node) = (yyvsp[0].node);
14135 }
14136#line 14137 "parse.c"
14137 break;
14138
14139 case 302: /* aref_args: args ',' assocs trailer */
14140#line 4128 "parse.y"
14141 {
14142 (yyval.node) = (yyvsp[-1].node) ? arg_append(p, (yyvsp[-3].node), new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yyloc)) : (yyvsp[-3].node);
14143 /*% ripper: args_add!($:1, bare_assoc_hash!($:3)) %*/
14144 }
14145#line 14146 "parse.c"
14146 break;
14147
14148 case 303: /* aref_args: assocs trailer */
14149#line 4133 "parse.y"
14150 {
14151 (yyval.node) = (yyvsp[-1].node) ? NEW_LIST(new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yyloc)) : 0;
14152 /*% ripper: args_add!(args_new!, bare_assoc_hash!($:1)) %*/
14153 }
14154#line 14155 "parse.c"
14155 break;
14156
14157 case 304: /* arg_rhs: arg */
14158#line 4140 "parse.y"
14159 {
14160 value_expr(p, (yyvsp[0].node));
14161 (yyval.node) = (yyvsp[0].node);
14162 }
14163#line 14164 "parse.c"
14164 break;
14165
14166 case 305: /* arg_rhs: arg "'rescue' modifier" after_rescue arg */
14167#line 4145 "parse.y"
14168 {
14169 p->ctxt.in_rescue = (yyvsp[-1].ctxt).in_rescue;
14170 value_expr(p, (yyvsp[-3].node));
14171 (yyval.node) = rescued_expr(p, (yyvsp[-3].node), (yyvsp[0].node), &(yylsp[-3]), &(yylsp[-2]), &(yylsp[0]));
14172 /*% ripper: rescue_mod!($:1, $:4) %*/
14173 }
14174#line 14175 "parse.c"
14175 break;
14176
14177 case 306: /* paren_args: '(' opt_call_args rparen */
14178#line 4154 "parse.y"
14179 {
14180 (yyval.node) = (yyvsp[-1].node);
14181 /*% ripper: arg_paren!($:2) %*/
14182 }
14183#line 14184 "parse.c"
14184 break;
14185
14186 case 307: /* paren_args: '(' args ',' args_forward rparen */
14187#line 4159 "parse.y"
14188 {
14189 if (!check_forwarding_args(p)) {
14190 (yyval.node) = 0;
14191 }
14192 else {
14193 (yyval.node) = new_args_forward_call(p, (yyvsp[-3].node), &(yylsp[-1]), &(yyloc));
14194 /*% ripper: arg_paren!(args_add!($:2, $:4)) %*/
14195 }
14196 }
14197#line 14198 "parse.c"
14198 break;
14199
14200 case 308: /* paren_args: '(' args_forward rparen */
14201#line 4169 "parse.y"
14202 {
14203 if (!check_forwarding_args(p)) {
14204 (yyval.node) = 0;
14205 }
14206 else {
14207 (yyval.node) = new_args_forward_call(p, 0, &(yylsp[-1]), &(yyloc));
14208 /*% ripper: arg_paren!($:2) %*/
14209 }
14210 }
14211#line 14212 "parse.c"
14212 break;
14213
14214 case 310: /* opt_paren_args: paren_args */
14215#line 4182 "parse.y"
14216 {
14217 (yyval.node) = (yyvsp[0].node) ? (yyvsp[0].node) : NODE_SPECIAL_EMPTY_ARGS;
14218 }
14219#line 14220 "parse.c"
14220 break;
14221
14222 case 314: /* opt_call_args: args ',' assocs ',' */
14223#line 4191 "parse.y"
14224 {
14225 (yyval.node) = (yyvsp[-1].node) ? arg_append(p, (yyvsp[-3].node), new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yyloc)) : (yyvsp[-3].node);
14226 /*% ripper: args_add!($:1, bare_assoc_hash!($:3)) %*/
14227 }
14228#line 14229 "parse.c"
14229 break;
14230
14231 case 315: /* opt_call_args: assocs ',' */
14232#line 4196 "parse.y"
14233 {
14234 (yyval.node) = (yyvsp[-1].node) ? NEW_LIST(new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yylsp[-1])) : 0;
14235 /*% ripper: args_add!(args_new!, bare_assoc_hash!($:1)) %*/
14236 }
14237#line 14238 "parse.c"
14238 break;
14239
14240 case 316: /* value_expr_command: command */
14241#line 3146 "parse.y"
14242 {
14243 value_expr(p, (yyvsp[0].node));
14244 (yyval.node) = (yyvsp[0].node);
14245 }
14246#line 14247 "parse.c"
14247 break;
14248
14249 case 317: /* call_args: value_expr_command */
14250#line 4203 "parse.y"
14251 {
14252 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
14253 /*% ripper: args_add!(args_new!, $:1) %*/
14254 }
14255#line 14256 "parse.c"
14256 break;
14257
14258 case 318: /* call_args: def_endless_method_endless_command */
14259#line 4208 "parse.y"
14260 {
14261 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
14262 /*% ripper: args_add!(args_new!, $:1) %*/
14263 }
14264#line 14265 "parse.c"
14265 break;
14266
14267 case 319: /* call_args: args opt_block_arg */
14268#line 4213 "parse.y"
14269 {
14270 (yyval.node) = arg_blk_pass((yyvsp[-1].node), (yyvsp[0].node_block_pass));
14271 /*% ripper: args_add_block!($:1, $:2) %*/
14272 }
14273#line 14274 "parse.c"
14274 break;
14275
14276 case 320: /* call_args: assocs opt_block_arg */
14277#line 4218 "parse.y"
14278 {
14279 (yyval.node) = (yyvsp[-1].node) ? NEW_LIST(new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yylsp[-1])) : 0;
14280 (yyval.node) = arg_blk_pass((yyval.node), (yyvsp[0].node_block_pass));
14281 /*% ripper: args_add_block!(args_add!(args_new!, bare_assoc_hash!($:1)), $:2) %*/
14282 }
14283#line 14284 "parse.c"
14284 break;
14285
14286 case 321: /* call_args: args ',' assocs opt_block_arg */
14287#line 4224 "parse.y"
14288 {
14289 (yyval.node) = (yyvsp[-1].node) ? arg_append(p, (yyvsp[-3].node), new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yyloc)) : (yyvsp[-3].node);
14290 (yyval.node) = arg_blk_pass((yyval.node), (yyvsp[0].node_block_pass));
14291 /*% ripper: args_add_block!(args_add!($:1, bare_assoc_hash!($:3)), $:4) %*/
14292 }
14293#line 14294 "parse.c"
14294 break;
14295
14296 case 323: /* $@13: %empty */
14297#line 4233 "parse.y"
14298 {
14299 /* If call_args starts with a open paren '(' or '[',
14300 * look-ahead reading of the letters calls CMDARG_PUSH(0),
14301 * but the push must be done after CMDARG_PUSH(1).
14302 * So this code makes them consistent by first cancelling
14303 * the premature CMDARG_PUSH(0), doing CMDARG_PUSH(1),
14304 * and finally redoing CMDARG_PUSH(0).
14305 */
14306 int lookahead = 0;
14307 switch (yychar) {
14308 case '(': case tLPAREN: case tLPAREN_ARG: case '[': case tLBRACK:
14309 lookahead = 1;
14310 }
14311 if (lookahead) CMDARG_POP();
14312 CMDARG_PUSH(1);
14313 if (lookahead) CMDARG_PUSH(0);
14314 }
14315#line 14316 "parse.c"
14316 break;
14317
14318 case 324: /* command_args: $@13 call_args */
14319#line 4251 "parse.y"
14320 {
14321 /* call_args can be followed by tLBRACE_ARG (that does CMDARG_PUSH(0) in the lexer)
14322 * but the push must be done after CMDARG_POP() in the parser.
14323 * So this code does CMDARG_POP() to pop 0 pushed by tLBRACE_ARG,
14324 * CMDARG_POP() to pop 1 pushed by command_args,
14325 * and CMDARG_PUSH(0) to restore back the flag set by tLBRACE_ARG.
14326 */
14327 int lookahead = 0;
14328 switch (yychar) {
14329 case tLBRACE_ARG:
14330 lookahead = 1;
14331 }
14332 if (lookahead) CMDARG_POP();
14333 CMDARG_POP();
14334 if (lookahead) CMDARG_PUSH(0);
14335 (yyval.node) = (yyvsp[0].node);
14336 /*% ripper: $:2 %*/
14337 }
14338#line 14339 "parse.c"
14339 break;
14340
14341 case 325: /* block_arg: "&" arg_value */
14342#line 4272 "parse.y"
14343 {
14344 (yyval.node_block_pass) = NEW_BLOCK_PASS((yyvsp[0].node), &(yyloc), &(yylsp[-1]));
14345 /*% ripper: $:2 %*/
14346 }
14347#line 14348 "parse.c"
14348 break;
14349
14350 case 326: /* block_arg: "&" */
14351#line 4277 "parse.y"
14352 {
14353 forwarding_arg_check(p, idFWD_BLOCK, idFWD_ALL, "block");
14354 (yyval.node_block_pass) = NEW_BLOCK_PASS(NEW_LVAR(idFWD_BLOCK, &(yylsp[0])), &(yyloc), &(yylsp[0]));
14355 /*% ripper: Qnil %*/
14356 }
14357#line 14358 "parse.c"
14358 break;
14359
14360 case 327: /* opt_block_arg: ',' block_arg */
14361#line 4285 "parse.y"
14362 {
14363 (yyval.node_block_pass) = (yyvsp[0].node_block_pass);
14364 /*% ripper: $:2 %*/
14365 }
14366#line 14367 "parse.c"
14367 break;
14368
14369 case 328: /* opt_block_arg: none */
14370#line 4290 "parse.y"
14371 {
14372 (yyval.node_block_pass) = 0;
14373 /*% ripper: Qfalse %*/
14374 }
14375#line 14376 "parse.c"
14376 break;
14377
14378 case 329: /* args: arg_value */
14379#line 4298 "parse.y"
14380 {
14381 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
14382 /*% ripper: args_add!(args_new!, $:arg_value) %*/
14383 }
14384#line 14385 "parse.c"
14385 break;
14386
14387 case 330: /* args: arg_splat */
14388#line 4303 "parse.y"
14389 {
14390 (yyval.node) = (yyvsp[0].node);
14391 /*% ripper: args_add_star!(args_new!, $:arg_splat) %*/
14392 }
14393#line 14394 "parse.c"
14394 break;
14395
14396 case 331: /* args: args ',' arg_value */
14397#line 4308 "parse.y"
14398 {
14399 (yyval.node) = last_arg_append(p, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
14400 /*% ripper: args_add!($:non_last_args, $:arg_value) %*/
14401 }
14402#line 14403 "parse.c"
14403 break;
14404
14405 case 332: /* args: args ',' arg_splat */
14406#line 4313 "parse.y"
14407 {
14408 (yyval.node) = rest_arg_append(p, (yyvsp[-2].node), RNODE_SPLAT((yyvsp[0].node))->nd_head, &(yyloc));
14409 /*% ripper: args_add_star!($:non_last_args, $:arg_splat) %*/
14410 }
14411#line 14412 "parse.c"
14412 break;
14413
14414 case 333: /* arg_splat: "*" arg_value */
14415#line 4321 "parse.y"
14416 {
14417 (yyval.node) = NEW_SPLAT((yyvsp[0].node), &(yyloc), &(yylsp[-1]));
14418 /*% ripper: $:arg_value %*/
14419 }
14420#line 14421 "parse.c"
14421 break;
14422
14423 case 334: /* arg_splat: "*" */
14424#line 4326 "parse.y"
14425 {
14426 forwarding_arg_check(p, idFWD_REST, idFWD_ALL, "rest");
14427 (yyval.node) = NEW_SPLAT(NEW_LVAR(idFWD_REST, &(yylsp[0])), &(yyloc), &(yylsp[0]));
14428 /*% ripper: Qnil %*/
14429 }
14430#line 14431 "parse.c"
14431 break;
14432
14433 case 337: /* mrhs: args ',' arg_value */
14434#line 4340 "parse.y"
14435 {
14436 (yyval.node) = last_arg_append(p, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
14437 /*% ripper: mrhs_add!(mrhs_new_from_args!($:args), $:arg_value) %*/
14438 }
14439#line 14440 "parse.c"
14440 break;
14441
14442 case 338: /* mrhs: args ',' "*" arg_value */
14443#line 4345 "parse.y"
14444 {
14445 (yyval.node) = rest_arg_append(p, (yyvsp[-3].node), (yyvsp[0].node), &(yyloc));
14446 /*% ripper: mrhs_add_star!(mrhs_new_from_args!($:args), $:arg_value) %*/
14447 }
14448#line 14449 "parse.c"
14449 break;
14450
14451 case 339: /* mrhs: "*" arg_value */
14452#line 4350 "parse.y"
14453 {
14454 (yyval.node) = NEW_SPLAT((yyvsp[0].node), &(yyloc), &(yylsp[-1]));
14455 /*% ripper: mrhs_add_star!(mrhs_new!, $:arg_value) %*/
14456 }
14457#line 14458 "parse.c"
14458 break;
14459
14460 case 350: /* primary: "method" */
14461#line 4371 "parse.y"
14462 {
14463 (yyval.node) = (NODE *)NEW_FCALL((yyvsp[0].id), 0, &(yyloc));
14464 /*% ripper: method_add_arg!(fcall!($:fid), args_new!) %*/
14465 }
14466#line 14467 "parse.c"
14467 break;
14468
14469 case 351: /* $@14: %empty */
14470#line 4376 "parse.y"
14471 {
14472 CMDARG_PUSH(0);
14473 }
14474#line 14475 "parse.c"
14475 break;
14476
14477 case 352: /* primary: k_begin $@14 bodystmt k_end */
14478#line 4381 "parse.y"
14479 {
14480 CMDARG_POP();
14481 set_line_body((yyvsp[-1].node), (yylsp[-3]).end_pos.lineno);
14482 (yyval.node) = NEW_BEGIN((yyvsp[-1].node), &(yyloc));
14483 nd_set_line((yyval.node), (yylsp[-3]).end_pos.lineno);
14484 /*% ripper: begin!($:body) %*/
14485 }
14486#line 14487 "parse.c"
14487 break;
14488
14489 case 353: /* $@15: %empty */
14490#line 4388 "parse.y"
14491 {SET_LEX_STATE(EXPR_ENDARG);}
14492#line 14493 "parse.c"
14493 break;
14494
14495 case 354: /* primary: "( arg" compstmt_stmts $@15 ')' */
14496#line 4389 "parse.y"
14497 {
14498 if (nd_type_p((yyvsp[-2].node), NODE_SELF)) RNODE_SELF((yyvsp[-2].node))->nd_state = 0;
14499 (yyval.node) = (yyvsp[-2].node);
14500 /*% ripper: paren!($:body) %*/
14501 }
14502#line 14503 "parse.c"
14503 break;
14504
14505 case 355: /* primary: "(" compstmt_stmts ')' */
14506#line 4395 "parse.y"
14507 {
14508 if (nd_type_p((yyvsp[-1].node), NODE_SELF)) RNODE_SELF((yyvsp[-1].node))->nd_state = 0;
14509 (yyval.node) = NEW_BLOCK((yyvsp[-1].node), &(yyloc));
14510 /*% ripper: paren!($:body) %*/
14511 }
14512#line 14513 "parse.c"
14513 break;
14514
14515 case 356: /* primary: primary_value "::" "constant" */
14516#line 4401 "parse.y"
14517 {
14518 (yyval.node) = NEW_COLON2((yyvsp[-2].node), (yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0]));
14519 /*% ripper: const_path_ref!($:recv, $:name) %*/
14520 }
14521#line 14522 "parse.c"
14522 break;
14523
14524 case 357: /* primary: ":: at EXPR_BEG" "constant" */
14525#line 4406 "parse.y"
14526 {
14527 (yyval.node) = NEW_COLON3((yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0]));
14528 /*% ripper: top_const_ref!($:name) %*/
14529 }
14530#line 14531 "parse.c"
14531 break;
14532
14533 case 358: /* primary: "[" aref_args ']' */
14534#line 4411 "parse.y"
14535 {
14536 (yyval.node) = make_list((yyvsp[-1].node), &(yyloc));
14537 /*% ripper: array!($:args) %*/
14538 }
14539#line 14540 "parse.c"
14540 break;
14541
14542 case 359: /* primary: "{" assoc_list '}' */
14543#line 4416 "parse.y"
14544 {
14545 (yyval.node) = new_hash(p, (yyvsp[-1].node), &(yyloc));
14546 RNODE_HASH((yyval.node))->nd_brace = TRUE;
14547 /*% ripper: hash!($:list) %*/
14548 }
14549#line 14550 "parse.c"
14550 break;
14551
14552 case 360: /* primary: k_return */
14553#line 4422 "parse.y"
14554 {
14555 (yyval.node) = NEW_RETURN(0, &(yyloc), &(yylsp[0]));
14556 /*% ripper: return0! %*/
14557 }
14558#line 14559 "parse.c"
14559 break;
14560
14561 case 361: /* primary: k_yield '(' call_args rparen */
14562#line 4427 "parse.y"
14563 {
14564 (yyval.node) = NEW_YIELD((yyvsp[-1].node), &(yyloc), &(yylsp[-3]), &(yylsp[-2]), &(yylsp[0]));
14565 /*% ripper: yield!(paren!($:args)) %*/
14566 }
14567#line 14568 "parse.c"
14568 break;
14569
14570 case 362: /* primary: k_yield '(' rparen */
14571#line 4432 "parse.y"
14572 {
14573 (yyval.node) = NEW_YIELD(0, &(yyloc), &(yylsp[-2]), &(yylsp[-1]), &(yylsp[0]));
14574 /*% ripper: yield!(paren!(args_new!)) %*/
14575 }
14576#line 14577 "parse.c"
14577 break;
14578
14579 case 363: /* primary: k_yield */
14580#line 4437 "parse.y"
14581 {
14582 (yyval.node) = NEW_YIELD(0, &(yyloc), &(yylsp[0]), &NULL_LOC, &NULL_LOC);
14583 /*% ripper: yield0! %*/
14584 }
14585#line 14586 "parse.c"
14586 break;
14587
14588 case 364: /* primary: "'defined?'" option_'\n' '(' begin_defined expr rparen */
14589#line 4442 "parse.y"
14590 {
14591 p->ctxt.in_defined = (yyvsp[-2].ctxt).in_defined;
14592 (yyval.node) = new_defined(p, (yyvsp[-1].node), &(yyloc), &(yylsp[-5]));
14593 p->ctxt.has_trailing_semicolon = (yyvsp[-2].ctxt).has_trailing_semicolon;
14594 /*% ripper: defined!($:arg) %*/
14595 }
14596#line 14597 "parse.c"
14597 break;
14598
14599 case 365: /* primary: "'not'" '(' expr rparen */
14600#line 4449 "parse.y"
14601 {
14602 (yyval.node) = call_uni_op(p, method_cond(p, (yyvsp[-1].node), &(yylsp[-1])), METHOD_NOT, &(yylsp[-3]), &(yyloc));
14603 /*% ripper: unary!(ID2VAL(idNOT), $:arg) %*/
14604 }
14605#line 14606 "parse.c"
14606 break;
14607
14608 case 366: /* primary: "'not'" '(' rparen */
14609#line 4454 "parse.y"
14610 {
14611 (yyval.node) = call_uni_op(p, method_cond(p, NEW_NIL(&(yylsp[-1])), &(yylsp[-1])), METHOD_NOT, &(yylsp[-2]), &(yyloc));
14612 /*% ripper: unary!(ID2VAL(idNOT), Qnil) %*/
14613 }
14614#line 14615 "parse.c"
14615 break;
14616
14617 case 367: /* primary: fcall brace_block */
14618#line 4459 "parse.y"
14619 {
14620 (yyval.node) = method_add_block(p, (NODE *)(yyvsp[-1].node_fcall), (yyvsp[0].node), &(yyloc));
14621 /*% ripper: method_add_block!(method_add_arg!(fcall!($:call), args_new!), $:block) %*/
14622 }
14623#line 14624 "parse.c"
14624 break;
14625
14626 case 369: /* primary: method_call brace_block */
14627#line 4465 "parse.y"
14628 {
14629 block_dup_check(p, get_nd_args(p, (yyvsp[-1].node)), (yyvsp[0].node));
14630 (yyval.node) = method_add_block(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
14631 /*% ripper: method_add_block!($:call, $:block) %*/
14632 }
14633#line 14634 "parse.c"
14634 break;
14635
14636 case 371: /* primary: k_if expr_value then compstmt_stmts if_tail k_end */
14637#line 4475 "parse.y"
14638 {
14639 if ((yyvsp[-1].node) && nd_type_p((yyvsp[-1].node), NODE_IF))
14640 RNODE_IF((yyvsp[-1].node))->end_keyword_loc = (yylsp[0]);
14641
14642 (yyval.node) = new_if(p, (yyvsp[-4].node), (yyvsp[-2].node), (yyvsp[-1].node), &(yyloc), &(yylsp[-5]), &(yylsp[-3]), &(yylsp[0]));
14643 fixpos((yyval.node), (yyvsp[-4].node));
14644 /*% ripper: if!($:cond, $:body, $:tail) %*/
14645 }
14646#line 14647 "parse.c"
14647 break;
14648
14649 case 372: /* primary: k_unless expr_value then compstmt_stmts opt_else k_end */
14650#line 4487 "parse.y"
14651 {
14652 (yyval.node) = new_unless(p, (yyvsp[-4].node), (yyvsp[-2].node), (yyvsp[-1].node), &(yyloc), &(yylsp[-5]), &(yylsp[-3]), &(yylsp[0]));
14653 fixpos((yyval.node), (yyvsp[-4].node));
14654 /*% ripper: unless!($:cond, $:body, $:tail) %*/
14655 }
14656#line 14657 "parse.c"
14657 break;
14658
14659 case 373: /* primary: k_while expr_value_do compstmt_stmts k_end */
14660#line 4495 "parse.y"
14661 {
14662 restore_block_exit(p, (yyvsp[-3].node_exits));
14663 (yyval.node) = NEW_WHILE(cond(p, (yyvsp[-2].node), &(yylsp[-2])), (yyvsp[-1].node), 1, &(yyloc), &(yylsp[-3]), &(yylsp[0]));
14664 fixpos((yyval.node), (yyvsp[-2].node));
14665 /*% ripper: while!($:cond, $:body) %*/
14666 }
14667#line 14668 "parse.c"
14668 break;
14669
14670 case 374: /* primary: k_until expr_value_do compstmt_stmts k_end */
14671#line 4504 "parse.y"
14672 {
14673 restore_block_exit(p, (yyvsp[-3].node_exits));
14674 (yyval.node) = NEW_UNTIL(cond(p, (yyvsp[-2].node), &(yylsp[-2])), (yyvsp[-1].node), 1, &(yyloc), &(yylsp[-3]), &(yylsp[0]));
14675 fixpos((yyval.node), (yyvsp[-2].node));
14676 /*% ripper: until!($:cond, $:body) %*/
14677 }
14678#line 14679 "parse.c"
14679 break;
14680
14681 case 375: /* @16: %empty */
14682#line 4511 "parse.y"
14683 {
14684 (yyval.labels) = p->case_labels;
14685 p->case_labels = CHECK_LITERAL_WHEN;
14686 }
14687#line 14688 "parse.c"
14688 break;
14689
14690 case 376: /* primary: k_case expr_value option_terms @16 case_body k_end */
14691#line 4517 "parse.y"
14692 {
14693 if (CASE_LABELS_ENABLED_P(p->case_labels)) st_free_table(p->case_labels);
14694 p->case_labels = (yyvsp[-2].labels);
14695 (yyval.node) = NEW_CASE((yyvsp[-4].node), (yyvsp[-1].node), &(yyloc), &(yylsp[-5]), &(yylsp[0]));
14696 fixpos((yyval.node), (yyvsp[-4].node));
14697 /*% ripper: case!($:expr, $:body) %*/
14698 }
14699#line 14700 "parse.c"
14700 break;
14701
14702 case 377: /* @17: %empty */
14703#line 4525 "parse.y"
14704 {
14705 (yyval.labels) = p->case_labels;
14706 p->case_labels = 0;
14707 }
14708#line 14709 "parse.c"
14709 break;
14710
14711 case 378: /* primary: k_case option_terms @17 case_body k_end */
14712#line 4531 "parse.y"
14713 {
14714 if (p->case_labels) st_free_table(p->case_labels);
14715 p->case_labels = (yyvsp[-2].labels);
14716 (yyval.node) = NEW_CASE2((yyvsp[-1].node), &(yyloc), &(yylsp[-4]), &(yylsp[0]));
14717 /*% ripper: case!(Qnil, $:body) %*/
14718 }
14719#line 14720 "parse.c"
14720 break;
14721
14722 case 379: /* primary: k_case expr_value option_terms p_case_body k_end */
14723#line 4540 "parse.y"
14724 {
14725 (yyval.node) = NEW_CASE3((yyvsp[-3].node), (yyvsp[-1].node), &(yyloc), &(yylsp[-4]), &(yylsp[0]));
14726 /*% ripper: case!($:expr, $:body) %*/
14727 }
14728#line 14729 "parse.c"
14729 break;
14730
14731 case 380: /* $@18: %empty */
14732#line 4545 "parse.y"
14733 {COND_PUSH(1);}
14734#line 14735 "parse.c"
14735 break;
14736
14737 case 381: /* $@19: %empty */
14738#line 4545 "parse.y"
14739 {COND_POP();}
14740#line 14741 "parse.c"
14741 break;
14742
14743 case 382: /* primary: k_for for_var "'in'" $@18 expr_value do $@19 compstmt_stmts k_end */
14744#line 4548 "parse.y"
14745 {
14746 restore_block_exit(p, (yyvsp[-8].node_exits));
14747 /*
14748 * for a, b, c in e
14749 * #=>
14750 * e.each{|*x| a, b, c = x}
14751 *
14752 * for a in e
14753 * #=>
14754 * e.each{|x| a, = x}
14755 */
14756 ID id = internal_id(p);
14757 rb_node_args_aux_t *m = NEW_ARGS_AUX(0, 0, &NULL_LOC);
14758 rb_node_args_t *args;
14759 NODE *scope, *internal_var = NEW_DVAR(id, &(yylsp[-7]));
14760 rb_ast_id_table_t *tbl = rb_ast_new_local_table(p->ast, 1);
14761 tbl->ids[0] = id; /* internal id */
14762
14763 switch (nd_type((yyvsp[-7].node))) {
14764 case NODE_LASGN:
14765 case NODE_DASGN: /* e.each {|internal_var| a = internal_var; ... } */
14766 set_nd_value(p, (yyvsp[-7].node), internal_var);
14767 id = 0;
14768 m->nd_plen = 1;
14769 m->nd_next = (yyvsp[-7].node);
14770 break;
14771 case NODE_MASGN: /* e.each {|*internal_var| a, b, c = (internal_var.length == 1 && Array === (tmp = internal_var[0]) ? tmp : internal_var); ... } */
14772 m->nd_next = node_assign(p, (yyvsp[-7].node), NEW_FOR_MASGN(internal_var, &(yylsp[-7])), NO_LEX_CTXT, &(yylsp[-7]));
14773 break;
14774 default: /* e.each {|*internal_var| @a, B, c[1], d.attr = internal_val; ... } */
14775 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]));
14776 }
14777 /* {|*internal_id| <m> = internal_id; ... } */
14778 args = new_args(p, m, 0, id, 0, new_empty_args_tail(p, &(yylsp[-7])), &(yylsp[-7]));
14779 scope = NEW_SCOPE2(tbl, args, (yyvsp[-1].node), NULL, &(yyloc));
14780 YYLTYPE do_keyword_loc = (yyvsp[-3].id) == keyword_do_cond ? (yylsp[-3]) : NULL_LOC;
14781 (yyval.node) = NEW_FOR((yyvsp[-4].node), scope, &(yyloc), &(yylsp[-8]), &(yylsp[-6]), &do_keyword_loc, &(yylsp[0]));
14782 RNODE_SCOPE(scope)->nd_parent = (yyval.node);
14783 fixpos((yyval.node), (yyvsp[-7].node));
14784 /*% ripper: for!($:for_var, $:expr_value, $:compstmt) %*/
14785 }
14786#line 14787 "parse.c"
14787 break;
14788
14789 case 383: /* $@20: %empty */
14790#line 4590 "parse.y"
14791 {
14792 begin_definition("class", &(yylsp[-2]), &(yylsp[-1]));
14793 }
14794#line 14795 "parse.c"
14795 break;
14796
14797 case 384: /* primary: k_class cpath superclass $@20 bodystmt k_end */
14798#line 4595 "parse.y"
14799 {
14800 YYLTYPE inheritance_operator_loc = NULL_LOC;
14801 if ((yyvsp[-3].node)) {
14802 inheritance_operator_loc = (yylsp[-3]);
14803 inheritance_operator_loc.end_pos.column = inheritance_operator_loc.beg_pos.column + 1;
14804 }
14805 (yyval.node) = NEW_CLASS((yyvsp[-4].node), (yyvsp[-1].node), (yyvsp[-3].node), &(yyloc), &(yylsp[-5]), &inheritance_operator_loc, &(yylsp[0]));
14806 nd_set_line(RNODE_CLASS((yyval.node))->nd_body, (yylsp[0]).end_pos.lineno);
14807 set_line_body((yyvsp[-1].node), (yylsp[-3]).end_pos.lineno);
14808 nd_set_line((yyval.node), (yylsp[-3]).end_pos.lineno);
14809 /*% ripper: class!($:cpath, $:superclass, $:bodystmt) %*/
14810 local_pop(p);
14811 p->ctxt.in_class = (yyvsp[-5].ctxt).in_class;
14812 p->ctxt.cant_return = (yyvsp[-5].ctxt).cant_return;
14813 p->ctxt.shareable_constant_value = (yyvsp[-5].ctxt).shareable_constant_value;
14814 }
14815#line 14816 "parse.c"
14816 break;
14817
14818 case 385: /* $@21: %empty */
14819#line 4612 "parse.y"
14820 {
14821 begin_definition("", &(yylsp[-2]), &(yylsp[-1]));
14822 }
14823#line 14824 "parse.c"
14824 break;
14825
14826 case 386: /* primary: k_class "<<" expr_value $@21 term bodystmt k_end */
14827#line 4618 "parse.y"
14828 {
14829 (yyval.node) = NEW_SCLASS((yyvsp[-4].node), (yyvsp[-1].node), &(yyloc), &(yylsp[-6]), &(yylsp[-5]), &(yylsp[0]));
14830 nd_set_line(RNODE_SCLASS((yyval.node))->nd_body, (yylsp[0]).end_pos.lineno);
14831 set_line_body((yyvsp[-1].node), nd_line((yyvsp[-4].node)));
14832 fixpos((yyval.node), (yyvsp[-4].node));
14833 /*% ripper: sclass!($:expr_value, $:bodystmt) %*/
14834 local_pop(p);
14835 p->ctxt.in_def = (yyvsp[-6].ctxt).in_def;
14836 p->ctxt.in_class = (yyvsp[-6].ctxt).in_class;
14837 p->ctxt.cant_return = (yyvsp[-6].ctxt).cant_return;
14838 p->ctxt.shareable_constant_value = (yyvsp[-6].ctxt).shareable_constant_value;
14839 }
14840#line 14841 "parse.c"
14841 break;
14842
14843 case 387: /* $@22: %empty */
14844#line 4631 "parse.y"
14845 {
14846 begin_definition("module", &(yylsp[-1]), &(yylsp[0]));
14847 }
14848#line 14849 "parse.c"
14849 break;
14850
14851 case 388: /* primary: k_module cpath $@22 bodystmt k_end */
14852#line 4636 "parse.y"
14853 {
14854 (yyval.node) = NEW_MODULE((yyvsp[-3].node), (yyvsp[-1].node), &(yyloc), &(yylsp[-4]), &(yylsp[0]));
14855 nd_set_line(RNODE_MODULE((yyval.node))->nd_body, (yylsp[0]).end_pos.lineno);
14856 set_line_body((yyvsp[-1].node), (yylsp[-3]).end_pos.lineno);
14857 nd_set_line((yyval.node), (yylsp[-3]).end_pos.lineno);
14858 /*% ripper: module!($:cpath, $:bodystmt) %*/
14859 local_pop(p);
14860 p->ctxt.in_class = (yyvsp[-4].ctxt).in_class;
14861 p->ctxt.cant_return = (yyvsp[-4].ctxt).cant_return;
14862 p->ctxt.shareable_constant_value = (yyvsp[-4].ctxt).shareable_constant_value;
14863 }
14864#line 14865 "parse.c"
14865 break;
14866
14867 case 389: /* $@23: %empty */
14868#line 4649 "parse.y"
14869 {
14870 push_end_expect_token_locations(p, &(yylsp[-1]).beg_pos);
14871 }
14872#line 14873 "parse.c"
14873 break;
14874
14875 case 390: /* primary: defn_head f_arglist $@23 bodystmt k_end */
14876#line 4654 "parse.y"
14877 {
14878 restore_defun(p, (yyvsp[-4].node_def_temp));
14879 ((yyval.node) = (yyvsp[-4].node_def_temp)->nd_def)->nd_loc = (yyloc);
14880 (yyvsp[-1].node) = new_scope_body(p, (yyvsp[-3].node_args), (yyvsp[-1].node), (yyval.node), &(yyloc));
14881 RNODE_DEFN((yyval.node))->nd_defn = (yyvsp[-1].node);
14882 /*% ripper: def!($:head, $:args, $:bodystmt) %*/
14883 local_pop(p);
14884 }
14885#line 14886 "parse.c"
14886 break;
14887
14888 case 391: /* $@24: %empty */
14889#line 4664 "parse.y"
14890 {
14891 push_end_expect_token_locations(p, &(yylsp[-1]).beg_pos);
14892 }
14893#line 14894 "parse.c"
14894 break;
14895
14896 case 392: /* primary: defs_head f_arglist $@24 bodystmt k_end */
14897#line 4669 "parse.y"
14898 {
14899 restore_defun(p, (yyvsp[-4].node_def_temp));
14900 ((yyval.node) = (yyvsp[-4].node_def_temp)->nd_def)->nd_loc = (yyloc);
14901 (yyvsp[-1].node) = new_scope_body(p, (yyvsp[-3].node_args), (yyvsp[-1].node), (yyval.node), &(yyloc));
14902 RNODE_DEFS((yyval.node))->nd_defn = (yyvsp[-1].node);
14903 /*% ripper: defs!(*$:head[0..2], $:args, $:bodystmt) %*/
14904 local_pop(p);
14905 }
14906#line 14907 "parse.c"
14907 break;
14908
14909 case 393: /* primary: "'break'" */
14910#line 4678 "parse.y"
14911 {
14912 (yyval.node) = add_block_exit(p, NEW_BREAK(0, &(yyloc), &(yylsp[0])));
14913 /*% ripper: break!(args_new!) %*/
14914 }
14915#line 14916 "parse.c"
14916 break;
14917
14918 case 394: /* primary: "'next'" */
14919#line 4683 "parse.y"
14920 {
14921 (yyval.node) = add_block_exit(p, NEW_NEXT(0, &(yyloc), &(yylsp[0])));
14922 /*% ripper: next!(args_new!) %*/
14923 }
14924#line 14925 "parse.c"
14925 break;
14926
14927 case 395: /* primary: "'redo'" */
14928#line 4688 "parse.y"
14929 {
14930 (yyval.node) = add_block_exit(p, NEW_REDO(&(yyloc), &(yylsp[0])));
14931 /*% ripper: redo! %*/
14932 }
14933#line 14934 "parse.c"
14934 break;
14935
14936 case 396: /* primary: "'retry'" */
14937#line 4693 "parse.y"
14938 {
14939 if (!p->ctxt.in_defined) {
14940 switch (p->ctxt.in_rescue) {
14941 case before_rescue: yyerror1(&(yylsp[0]), "Invalid retry without rescue"); break;
14942 case after_rescue: /* ok */ break;
14943 case after_else: yyerror1(&(yylsp[0]), "Invalid retry after else"); break;
14944 case after_ensure: yyerror1(&(yylsp[0]), "Invalid retry after ensure"); break;
14945 }
14946 }
14947 (yyval.node) = NEW_RETRY(&(yyloc));
14948 /*% ripper: retry! %*/
14949 }
14950#line 14951 "parse.c"
14951 break;
14952
14953 case 397: /* value_expr_primary: primary */
14954#line 3146 "parse.y"
14955 {
14956 value_expr(p, (yyvsp[0].node));
14957 (yyval.node) = (yyvsp[0].node);
14958 }
14959#line 14960 "parse.c"
14960 break;
14961
14962 case 399: /* k_begin: "'begin'" */
14963#line 4711 "parse.y"
14964 {
14965 token_info_push(p, "begin", &(yyloc));
14966 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
14967 }
14968#line 14969 "parse.c"
14969 break;
14970
14971 case 400: /* k_if: "'if'" */
14972#line 4718 "parse.y"
14973 {
14974 WARN_EOL("if");
14975 token_info_push(p, "if", &(yyloc));
14976 if (p->token_info && p->token_info->nonspc &&
14977 p->token_info->next && !strcmp(p->token_info->next->token, "else")) {
14978 const char *tok = p->lex.ptok - rb_strlen_lit("if");
14979 const char *beg = p->lex.pbeg + p->token_info->next->beg.column;
14980 beg += rb_strlen_lit("else");
14981 while (beg < tok && ISSPACE(*beg)) beg++;
14982 if (beg == tok) {
14983 p->token_info->nonspc = 0;
14984 }
14985 }
14986 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
14987 }
14988#line 14989 "parse.c"
14989 break;
14990
14991 case 401: /* k_unless: "'unless'" */
14992#line 4736 "parse.y"
14993 {
14994 token_info_push(p, "unless", &(yyloc));
14995 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
14996 }
14997#line 14998 "parse.c"
14998 break;
14999
15000 case 402: /* k_while: "'while'" allow_exits */
15001#line 4743 "parse.y"
15002 {
15003 (yyval.node_exits) = (yyvsp[0].node_exits);
15004 token_info_push(p, "while", &(yyloc));
15005 push_end_expect_token_locations(p, &(yylsp[-1]).beg_pos);
15006 }
15007#line 15008 "parse.c"
15008 break;
15009
15010 case 403: /* k_until: "'until'" allow_exits */
15011#line 4751 "parse.y"
15012 {
15013 (yyval.node_exits) = (yyvsp[0].node_exits);
15014 token_info_push(p, "until", &(yyloc));
15015 push_end_expect_token_locations(p, &(yylsp[-1]).beg_pos);
15016 }
15017#line 15018 "parse.c"
15018 break;
15019
15020 case 404: /* k_case: "'case'" */
15021#line 4759 "parse.y"
15022 {
15023 token_info_push(p, "case", &(yyloc));
15024 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
15025 }
15026#line 15027 "parse.c"
15027 break;
15028
15029 case 405: /* k_for: "'for'" allow_exits */
15030#line 4766 "parse.y"
15031 {
15032 (yyval.node_exits) = (yyvsp[0].node_exits);
15033 token_info_push(p, "for", &(yyloc));
15034 push_end_expect_token_locations(p, &(yylsp[-1]).beg_pos);
15035 }
15036#line 15037 "parse.c"
15037 break;
15038
15039 case 406: /* k_class: "'class'" */
15040#line 4774 "parse.y"
15041 {
15042 token_info_push(p, "class", &(yyloc));
15043 (yyval.ctxt) = p->ctxt;
15044 p->ctxt.in_rescue = before_rescue;
15045 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
15046 }
15047#line 15048 "parse.c"
15048 break;
15049
15050 case 407: /* k_module: "'module'" */
15051#line 4783 "parse.y"
15052 {
15053 token_info_push(p, "module", &(yyloc));
15054 (yyval.ctxt) = p->ctxt;
15055 p->ctxt.in_rescue = before_rescue;
15056 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
15057 }
15058#line 15059 "parse.c"
15059 break;
15060
15061 case 408: /* k_def: "'def'" */
15062#line 4792 "parse.y"
15063 {
15064 token_info_push(p, "def", &(yyloc));
15065 (yyval.node_def_temp) = NEW_DEF_TEMP(&(yyloc));
15066 p->ctxt.in_argdef = 1;
15067 }
15068#line 15069 "parse.c"
15069 break;
15070
15071 case 409: /* k_do: "'do'" */
15072#line 4800 "parse.y"
15073 {
15074 token_info_push(p, "do", &(yyloc));
15075 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
15076 }
15077#line 15078 "parse.c"
15078 break;
15079
15080 case 410: /* k_do_block: "'do' for block" */
15081#line 4807 "parse.y"
15082 {
15083 token_info_push(p, "do", &(yyloc));
15084 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
15085 }
15086#line 15087 "parse.c"
15087 break;
15088
15089 case 411: /* k_rescue: "'rescue'" */
15090#line 4814 "parse.y"
15091 {
15092 token_info_warn(p, "rescue", p->token_info, 1, &(yyloc));
15093 (yyval.ctxt) = p->ctxt;
15094 p->ctxt.in_rescue = after_rescue;
15095 }
15096#line 15097 "parse.c"
15097 break;
15098
15099 case 412: /* k_ensure: "'ensure'" */
15100#line 4822 "parse.y"
15101 {
15102 token_info_warn(p, "ensure", p->token_info, 1, &(yyloc));
15103 (yyval.ctxt) = p->ctxt;
15104 }
15105#line 15106 "parse.c"
15106 break;
15107
15108 case 413: /* k_when: "'when'" */
15109#line 4829 "parse.y"
15110 {
15111 token_info_warn(p, "when", p->token_info, 0, &(yyloc));
15112 }
15113#line 15114 "parse.c"
15114 break;
15115
15116 case 414: /* k_else: "'else'" */
15117#line 4835 "parse.y"
15118 {
15119 token_info *ptinfo_beg = p->token_info;
15120 int same = ptinfo_beg && strcmp(ptinfo_beg->token, "case") != 0;
15121 token_info_warn(p, "else", p->token_info, same, &(yyloc));
15122 if (same) {
15123 token_info e;
15124 e.next = ptinfo_beg->next;
15125 e.token = "else";
15126 token_info_setup(&e, p->lex.pbeg, &(yyloc));
15127 if (!e.nonspc) *ptinfo_beg = e;
15128 }
15129 }
15130#line 15131 "parse.c"
15131 break;
15132
15133 case 415: /* k_elsif: "'elsif'" */
15134#line 4850 "parse.y"
15135 {
15136 WARN_EOL("elsif");
15137 token_info_warn(p, "elsif", p->token_info, 1, &(yyloc));
15138 }
15139#line 15140 "parse.c"
15140 break;
15141
15142 case 416: /* k_end: "'end'" */
15143#line 4857 "parse.y"
15144 {
15145 token_info_pop(p, "end", &(yyloc));
15146 pop_end_expect_token_locations(p);
15147 }
15148#line 15149 "parse.c"
15149 break;
15150
15151 case 417: /* k_end: "dummy end" */
15152#line 4862 "parse.y"
15153 {
15154 compile_error(p, "syntax error, unexpected end-of-input");
15155 }
15156#line 15157 "parse.c"
15157 break;
15158
15159 case 418: /* k_return: "'return'" */
15160#line 4868 "parse.y"
15161 {
15162 if (p->ctxt.cant_return && !dyna_in_block(p))
15163 yyerror1(&(yylsp[0]), "Invalid return in class/module body");
15164 }
15165#line 15166 "parse.c"
15166 break;
15167
15168 case 419: /* k_yield: "'yield'" */
15169#line 4875 "parse.y"
15170 {
15171 if (!p->ctxt.in_defined && !p->ctxt.in_def && !compile_for_eval)
15172 yyerror1(&(yylsp[0]), "Invalid yield");
15173 }
15174#line 15175 "parse.c"
15175 break;
15176
15177 case 424: /* do: "'do' for condition" */
15178#line 4887 "parse.y"
15179 { (yyval.id) = keyword_do_cond; }
15180#line 15181 "parse.c"
15181 break;
15182
15183 case 426: /* if_tail: k_elsif expr_value then compstmt_stmts if_tail */
15184#line 4894 "parse.y"
15185 {
15186 (yyval.node) = new_if(p, (yyvsp[-3].node), (yyvsp[-1].node), (yyvsp[0].node), &(yyloc), &(yylsp[-4]), &(yylsp[-2]), &NULL_LOC);
15187 fixpos((yyval.node), (yyvsp[-3].node));
15188 /*% ripper: elsif!($:2, $:4, $:5) %*/
15189 }
15190#line 15191 "parse.c"
15191 break;
15192
15193 case 428: /* opt_else: k_else compstmt_stmts */
15194#line 4903 "parse.y"
15195 {
15196 (yyval.node) = (yyvsp[0].node);
15197 /*% ripper: else!($:2) %*/
15198 }
15199#line 15200 "parse.c"
15200 break;
15201
15202 case 431: /* f_marg: f_norm_arg */
15203#line 4914 "parse.y"
15204 {
15205 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
15206 mark_lvar_used(p, (yyval.node));
15207 }
15208#line 15209 "parse.c"
15209 break;
15210
15211 case 432: /* f_marg: "(" f_margs rparen */
15212#line 4919 "parse.y"
15213 {
15214 (yyval.node) = (NODE *)(yyvsp[-1].node_masgn);
15215 /*% ripper: mlhs_paren!($:2) %*/
15216 }
15217#line 15218 "parse.c"
15218 break;
15219
15220 case 433: /* mlhs_items_f_marg: f_marg */
15221#line 3033 "parse.y"
15222 {
15223 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
15224 /*% ripper: mlhs_add!(mlhs_new!, $:1) %*/
15225 }
15226#line 15227 "parse.c"
15227 break;
15228
15229 case 434: /* mlhs_items_f_marg: mlhs_items_f_marg ',' f_marg */
15230#line 3038 "parse.y"
15231 {
15232 (yyval.node) = list_append(p, (yyvsp[-2].node), (yyvsp[0].node));
15233 /*% ripper: mlhs_add!($:1, $:3) %*/
15234 }
15235#line 15236 "parse.c"
15236 break;
15237
15238 case 435: /* f_margs: mlhs_items_f_marg */
15239#line 4927 "parse.y"
15240 {
15241 (yyval.node_masgn) = NEW_MASGN((yyvsp[0].node), 0, &(yyloc));
15242 /*% ripper: $:1 %*/
15243 }
15244#line 15245 "parse.c"
15245 break;
15246
15247 case 436: /* f_margs: mlhs_items_f_marg ',' f_rest_marg */
15248#line 4932 "parse.y"
15249 {
15250 (yyval.node_masgn) = NEW_MASGN((yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
15251 /*% ripper: mlhs_add_star!($:1, $:3) %*/
15252 }
15253#line 15254 "parse.c"
15254 break;
15255
15256 case 437: /* f_margs: mlhs_items_f_marg ',' f_rest_marg ',' mlhs_items_f_marg */
15257#line 4937 "parse.y"
15258 {
15259 (yyval.node_masgn) = NEW_MASGN((yyvsp[-4].node), NEW_POSTARG((yyvsp[-2].node), (yyvsp[0].node), &(yyloc)), &(yyloc));
15260 /*% ripper: mlhs_add_post!(mlhs_add_star!($:1, $:3), $:5) %*/
15261 }
15262#line 15263 "parse.c"
15263 break;
15264
15265 case 438: /* f_margs: f_rest_marg */
15266#line 4942 "parse.y"
15267 {
15268 (yyval.node_masgn) = NEW_MASGN(0, (yyvsp[0].node), &(yyloc));
15269 /*% ripper: mlhs_add_star!(mlhs_new!, $:1) %*/
15270 }
15271#line 15272 "parse.c"
15272 break;
15273
15274 case 439: /* f_margs: f_rest_marg ',' mlhs_items_f_marg */
15275#line 4947 "parse.y"
15276 {
15277 (yyval.node_masgn) = NEW_MASGN(0, NEW_POSTARG((yyvsp[-2].node), (yyvsp[0].node), &(yyloc)), &(yyloc));
15278 /*% ripper: mlhs_add_post!(mlhs_add_star!(mlhs_new!, $:1), $:3) %*/
15279 }
15280#line 15281 "parse.c"
15281 break;
15282
15283 case 440: /* f_rest_marg: "*" f_norm_arg */
15284#line 4954 "parse.y"
15285 {
15286 /*% ripper: $:2 %*/
15287 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
15288 mark_lvar_used(p, (yyval.node));
15289 }
15290#line 15291 "parse.c"
15291 break;
15292
15293 case 441: /* f_rest_marg: "*" */
15294#line 4960 "parse.y"
15295 {
15296 (yyval.node) = NODE_SPECIAL_NO_NAME_REST;
15297 /*% ripper: Qnil %*/
15298 }
15299#line 15300 "parse.c"
15300 break;
15301
15302 case 443: /* f_any_kwrest: f_no_kwarg */
15303#line 4968 "parse.y"
15304 {
15305 (yyval.id) = idNil;
15306 /*% ripper: ID2VAL(idNil) %*/
15307 }
15308#line 15309 "parse.c"
15309 break;
15310
15311 case 444: /* $@25: %empty */
15312#line 4974 "parse.y"
15313 {p->ctxt.in_argdef = 0;}
15314#line 15315 "parse.c"
15315 break;
15316
15317 case 446: /* f_kw_primary_value: f_label primary_value */
15318#line 3005 "parse.y"
15319 {
15320 p->ctxt.in_argdef = 1;
15321 (yyval.node_kw_arg) = new_kw_arg(p, assignable(p, (yyvsp[-1].id), (yyvsp[0].node), &(yyloc)), &(yyloc));
15322 /*% ripper: [$:$, $:value] %*/
15323 }
15324#line 15325 "parse.c"
15325 break;
15326
15327 case 447: /* f_kw_primary_value: f_label */
15328#line 3011 "parse.y"
15329 {
15330 p->ctxt.in_argdef = 1;
15331 (yyval.node_kw_arg) = new_kw_arg(p, assignable(p, (yyvsp[0].id), NODE_SPECIAL_REQUIRED_KEYWORD, &(yyloc)), &(yyloc));
15332 /*% ripper: [$:$, 0] %*/
15333 }
15334#line 15335 "parse.c"
15335 break;
15336
15337 case 448: /* f_kwarg_primary_value: f_kw_primary_value */
15338#line 3020 "parse.y"
15339 {
15340 (yyval.node_kw_arg) = (yyvsp[0].node_kw_arg);
15341 /*% ripper: rb_ary_new3(1, $:1) %*/
15342 }
15343#line 15344 "parse.c"
15344 break;
15345
15346 case 449: /* f_kwarg_primary_value: f_kwarg_primary_value ',' f_kw_primary_value */
15347#line 3025 "parse.y"
15348 {
15349 (yyval.node_kw_arg) = kwd_append((yyvsp[-2].node_kw_arg), (yyvsp[0].node_kw_arg));
15350 /*% ripper: rb_ary_push($:1, $:3) %*/
15351 }
15352#line 15353 "parse.c"
15353 break;
15354
15355 case 450: /* args_tail_basic_primary_value: f_kwarg_primary_value ',' f_kwrest opt_f_block_arg */
15356#line 2928 "parse.y"
15357 {
15358 (yyval.node_args) = new_args_tail(p, (yyvsp[-3].node_kw_arg), (yyvsp[-1].id), (yyvsp[0].id), &(yylsp[-1]));
15359 /*% ripper: [$:1, $:3, $:4] %*/
15360 }
15361#line 15362 "parse.c"
15362 break;
15363
15364 case 451: /* args_tail_basic_primary_value: f_kwarg_primary_value opt_f_block_arg */
15365#line 2933 "parse.y"
15366 {
15367 (yyval.node_args) = new_args_tail(p, (yyvsp[-1].node_kw_arg), 0, (yyvsp[0].id), &(yylsp[-1]));
15368 /*% ripper: [$:1, Qnil, $:2] %*/
15369 }
15370#line 15371 "parse.c"
15371 break;
15372
15373 case 452: /* args_tail_basic_primary_value: f_any_kwrest opt_f_block_arg */
15374#line 2938 "parse.y"
15375 {
15376 (yyval.node_args) = new_args_tail(p, 0, (yyvsp[-1].id), (yyvsp[0].id), &(yylsp[-1]));
15377 /*% ripper: [Qnil, $:1, $:2] %*/
15378 }
15379#line 15380 "parse.c"
15380 break;
15381
15382 case 453: /* args_tail_basic_primary_value: f_block_arg */
15383#line 2943 "parse.y"
15384 {
15385 (yyval.node_args) = new_args_tail(p, 0, 0, (yyvsp[0].id), &(yylsp[0]));
15386 /*% ripper: [Qnil, Qnil, $:1] %*/
15387 }
15388#line 15389 "parse.c"
15389 break;
15390
15391 case 455: /* opt_args_tail_block_args_tail: ',' block_args_tail */
15392#line 3092 "parse.y"
15393 {
15394 (yyval.node_args) = (yyvsp[0].node_args);
15395 /*% ripper: $:tail %*/
15396 }
15397#line 15398 "parse.c"
15398 break;
15399
15400 case 456: /* opt_args_tail_block_args_tail: %empty */
15401#line 3097 "parse.y"
15402 {
15403 (yyval.node_args) = new_empty_args_tail(p, &(yyloc));
15404 /*% ripper: [Qnil, Qnil, Qnil] %*/
15405 }
15406#line 15407 "parse.c"
15407 break;
15408
15409 case 458: /* excessed_comma: ',' */
15410#line 4983 "parse.y"
15411 {
15412 /* magic number for rest_id in iseq_set_arguments() */
15413 (yyval.id) = NODE_SPECIAL_EXCESSIVE_COMMA;
15414 /*% ripper: excessed_comma! %*/
15415 }
15416#line 15417 "parse.c"
15417 break;
15418
15419 case 459: /* f_opt_primary_value: f_arg_asgn f_eq primary_value */
15420#line 2983 "parse.y"
15421 {
15422 p->ctxt.in_argdef = 1;
15423 (yyval.node_opt_arg) = NEW_OPT_ARG(assignable(p, (yyvsp[-2].id), (yyvsp[0].node), &(yyloc)), &(yyloc));
15424 /*% ripper: [$:$, $:3] %*/
15425 }
15426#line 15427 "parse.c"
15427 break;
15428
15429 case 460: /* f_opt_arg_primary_value: f_opt_primary_value */
15430#line 2992 "parse.y"
15431 {
15432 (yyval.node_opt_arg) = (yyvsp[0].node_opt_arg);
15433 /*% ripper: rb_ary_new3(1, $:1) %*/
15434 }
15435#line 15436 "parse.c"
15436 break;
15437
15438 case 461: /* f_opt_arg_primary_value: f_opt_arg_primary_value ',' f_opt_primary_value */
15439#line 2997 "parse.y"
15440 {
15441 (yyval.node_opt_arg) = opt_arg_append((yyvsp[-2].node_opt_arg), (yyvsp[0].node_opt_arg));
15442 /*% ripper: rb_ary_push($:1, $:3) %*/
15443 }
15444#line 15445 "parse.c"
15445 break;
15446
15447 case 462: /* args-list_primary_value_block_args-opt_tail: f_arg ',' f_opt_arg_primary_value ',' f_rest_arg block_args-opt_tail */
15448#line 6263 "parse.y"
15449 {
15450 (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));
15451 /*% ripper: params!($:pre, $:opt, $:rest, Qnil, *$:tail[0..2]) %*/
15452 }
15453#line 15454 "parse.c"
15454 break;
15455
15456 case 463: /* args-list_primary_value_block_args-opt_tail: f_arg ',' f_opt_arg_primary_value ',' f_rest_arg ',' f_arg block_args-opt_tail */
15457#line 6268 "parse.y"
15458 {
15459 (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));
15460 /*% ripper: params!($:pre, $:opt, $:rest, $:post, *$:tail[0..2]) %*/
15461 }
15462#line 15463 "parse.c"
15463 break;
15464
15465 case 464: /* args-list_primary_value_block_args-opt_tail: f_arg ',' f_opt_arg_primary_value block_args-opt_tail */
15466#line 6273 "parse.y"
15467 {
15468 (yyval.node_args) = new_args(p, (yyvsp[-3].node_args_aux), (yyvsp[-1].node_opt_arg), 0, 0, (yyvsp[0].node_args), &(yyloc));
15469 /*% ripper: params!($:pre, $:opt, Qnil, Qnil, *$:tail[0..2]) %*/
15470 }
15471#line 15472 "parse.c"
15472 break;
15473
15474 case 465: /* args-list_primary_value_block_args-opt_tail: f_arg ',' f_opt_arg_primary_value ',' f_arg block_args-opt_tail */
15475#line 6278 "parse.y"
15476 {
15477 (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));
15478 /*% ripper: params!($:pre, $:opt, Qnil, $:post, *$:tail[0..2]) %*/
15479 }
15480#line 15481 "parse.c"
15481 break;
15482
15483 case 466: /* args-list_primary_value_block_args-opt_tail: f_arg ',' f_rest_arg block_args-opt_tail */
15484#line 6283 "parse.y"
15485 {
15486 (yyval.node_args) = new_args(p, (yyvsp[-3].node_args_aux), 0, (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
15487 /*% ripper: params!($:pre, Qnil, $:rest, Qnil, *$:tail[0..2]) %*/
15488 }
15489#line 15490 "parse.c"
15490 break;
15491
15492 case 467: /* args-list_primary_value_block_args-opt_tail: f_arg ',' f_rest_arg ',' f_arg block_args-opt_tail */
15493#line 6288 "parse.y"
15494 {
15495 (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));
15496 /*% ripper: params!($:pre, Qnil, $:rest, $:post, *$:tail[0..2]) %*/
15497 }
15498#line 15499 "parse.c"
15499 break;
15500
15501 case 468: /* args-list_primary_value_block_args-opt_tail: f_opt_arg_primary_value ',' f_rest_arg block_args-opt_tail */
15502#line 6293 "parse.y"
15503 {
15504 (yyval.node_args) = new_args(p, 0, (yyvsp[-3].node_opt_arg), (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
15505 /*% ripper: params!(Qnil, $:opt, $:rest, Qnil, *$:tail[0..2]) %*/
15506 }
15507#line 15508 "parse.c"
15508 break;
15509
15510 case 469: /* args-list_primary_value_block_args-opt_tail: f_opt_arg_primary_value ',' f_rest_arg ',' f_arg block_args-opt_tail */
15511#line 6298 "parse.y"
15512 {
15513 (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));
15514 /*% ripper: params!(Qnil, $:opt, $:rest, $:post, *$:tail[0..2]) %*/
15515 }
15516#line 15517 "parse.c"
15517 break;
15518
15519 case 470: /* args-list_primary_value_block_args-opt_tail: f_opt_arg_primary_value block_args-opt_tail */
15520#line 6303 "parse.y"
15521 {
15522 (yyval.node_args) = new_args(p, 0, (yyvsp[-1].node_opt_arg), 0, 0, (yyvsp[0].node_args), &(yyloc));
15523 /*% ripper: params!(Qnil, $:opt, Qnil, Qnil, *$:tail[0..2]) %*/
15524 }
15525#line 15526 "parse.c"
15526 break;
15527
15528 case 471: /* args-list_primary_value_block_args-opt_tail: f_opt_arg_primary_value ',' f_arg block_args-opt_tail */
15529#line 6308 "parse.y"
15530 {
15531 (yyval.node_args) = new_args(p, 0, (yyvsp[-3].node_opt_arg), 0, (yyvsp[-1].node_args_aux), (yyvsp[0].node_args), &(yyloc));
15532 /*% ripper: params!(Qnil, $:opt, Qnil, $:post, *$:tail[0..2]) %*/
15533 }
15534#line 15535 "parse.c"
15535 break;
15536
15537 case 472: /* args-list_primary_value_block_args-opt_tail: f_rest_arg block_args-opt_tail */
15538#line 6313 "parse.y"
15539 {
15540 (yyval.node_args) = new_args(p, 0, 0, (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
15541 /*% ripper: params!(Qnil, Qnil, $:rest, Qnil, *$:tail[0..2]) %*/
15542 }
15543#line 15544 "parse.c"
15544 break;
15545
15546 case 473: /* args-list_primary_value_block_args-opt_tail: f_rest_arg ',' f_arg block_args-opt_tail */
15547#line 6318 "parse.y"
15548 {
15549 (yyval.node_args) = new_args(p, 0, 0, (yyvsp[-3].id), (yyvsp[-1].node_args_aux), (yyvsp[0].node_args), &(yyloc));
15550 /*% ripper: params!(Qnil, Qnil, $:rest, $:post, *$:tail[0..2]) %*/
15551 }
15552#line 15553 "parse.c"
15553 break;
15554
15555 case 475: /* block_param: f_arg excessed_comma */
15556#line 4992 "parse.y"
15557 {
15558 (yyval.node_args) = new_empty_args_tail(p, &(yylsp[0]));
15559 (yyval.node_args) = new_args(p, (yyvsp[-1].node_args_aux), 0, (yyvsp[0].id), 0, (yyval.node_args), &(yyloc));
15560 /*% ripper: params!($:pre, Qnil, $:excessed_comma, Qnil, Qnil, Qnil, Qnil) %*/
15561 }
15562#line 15563 "parse.c"
15563 break;
15564
15565 case 476: /* block_param: f_arg opt_args_tail_block_args_tail */
15566#line 4998 "parse.y"
15567 {
15568 (yyval.node_args) = new_args(p, (yyvsp[-1].node_args_aux), 0, 0, 0, (yyvsp[0].node_args), &(yyloc));
15569 /*% ripper: params!($:pre, Qnil, Qnil, Qnil, *$:tail[0..2]) %*/
15570 }
15571#line 15572 "parse.c"
15572 break;
15573
15574 case 477: /* tail-only-args_block_args_tail: block_args_tail */
15575#line 6326 "parse.y"
15576 {
15577 (yyval.node_args) = new_args(p, 0, 0, 0, 0, (yyvsp[0].node_args), &(yyloc));
15578 /*% ripper: params!(Qnil, Qnil, Qnil, Qnil, *$:tail[0..2]) %*/
15579 }
15580#line 15581 "parse.c"
15581 break;
15582
15583 case 480: /* opt_block_param_def: block_param_def */
15584#line 5007 "parse.y"
15585 {
15586 p->command_start = TRUE;
15587 }
15588#line 15589 "parse.c"
15589 break;
15590
15591 case 481: /* block_param_def: '|' opt_block_param opt_bv_decl '|' */
15592#line 5013 "parse.y"
15593 {
15594 p->max_numparam = ORDINAL_PARAM;
15595 p->ctxt.in_argdef = 0;
15596 (yyval.node_args) = (yyvsp[-2].node_args);
15597 /*% ripper: block_var!($:2, $:3) %*/
15598 }
15599#line 15600 "parse.c"
15600 break;
15601
15602 case 482: /* opt_block_param: %empty */
15603#line 5022 "parse.y"
15604 {
15605 (yyval.node_args) = 0;
15606 /*% ripper: params!(Qnil,Qnil,Qnil,Qnil,Qnil,Qnil,Qnil) %*/
15607 }
15608#line 15609 "parse.c"
15609 break;
15610
15611 case 484: /* opt_bv_decl: option_'\n' */
15612#line 5030 "parse.y"
15613 {
15614 (yyval.id) = 0;
15615 /*% ripper: Qfalse %*/
15616 }
15617#line 15618 "parse.c"
15618 break;
15619
15620 case 485: /* opt_bv_decl: option_'\n' ';' bv_decls option_'\n' */
15621#line 5035 "parse.y"
15622 {
15623 (yyval.id) = 0;
15624 /*% ripper: $:3 %*/
15625 }
15626#line 15627 "parse.c"
15627 break;
15628
15629 case 488: /* bvar: "local variable or method" */
15630#line 5048 "parse.y"
15631 {
15632 new_bv(p, (yyvsp[0].id));
15633 /*% ripper: $:1 %*/
15634 }
15635#line 15636 "parse.c"
15636 break;
15637
15638 case 490: /* max_numparam: %empty */
15639#line 5055 "parse.y"
15640 {
15641 (yyval.num) = p->max_numparam;
15642 p->max_numparam = 0;
15643 }
15644#line 15645 "parse.c"
15645 break;
15646
15647 case 491: /* numparam: %empty */
15648#line 5061 "parse.y"
15649 {
15650 (yyval.node) = numparam_push(p);
15651 }
15652#line 15653 "parse.c"
15653 break;
15654
15655 case 492: /* it_id: %empty */
15656#line 5066 "parse.y"
15657 {
15658 (yyval.id) = p->it_id;
15659 p->it_id = 0;
15660 }
15661#line 15662 "parse.c"
15662 break;
15663
15664 case 493: /* @26: %empty */
15665#line 5073 "parse.y"
15666 {
15667 token_info_push(p, "->", &(yylsp[0]));
15668 (yyval.vars) = dyna_push(p);
15669 }
15670#line 15671 "parse.c"
15671 break;
15672
15673 case 494: /* $@27: %empty */
15674#line 5079 "parse.y"
15675 {
15676 CMDARG_PUSH(0);
15677 }
15678#line 15679 "parse.c"
15679 break;
15680
15681 case 495: /* lambda: "->" @26 max_numparam numparam it_id allow_exits f_larglist $@27 lambda_body */
15682#line 5083 "parse.y"
15683 {
15684 int max_numparam = p->max_numparam;
15685 ID it_id = p->it_id;
15686 p->lex.lpar_beg = (yyvsp[-8].num);
15687 p->max_numparam = (yyvsp[-6].num);
15688 p->it_id = (yyvsp[-4].id);
15689 restore_block_exit(p, (yyvsp[-3].node_exits));
15690 CMDARG_POP();
15691 (yyvsp[-2].node_args) = args_with_numbered(p, (yyvsp[-2].node_args), max_numparam, it_id);
15692 {
15693 YYLTYPE loc = code_loc_gen(&(yylsp[-8]), &(yylsp[0]));
15694 (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);
15695 nd_set_line(RNODE_LAMBDA((yyval.node))->nd_body, (yylsp[0]).end_pos.lineno);
15696 nd_set_line((yyval.node), (yylsp[-2]).end_pos.lineno);
15697 nd_set_first_loc((yyval.node), (yylsp[-8]).beg_pos);
15698 xfree((yyvsp[0].locations_lambda_body));
15699 }
15700 /*% ripper: lambda!($:args, $:body) %*/
15701 numparam_pop(p, (yyvsp[-5].node));
15702 dyna_pop(p, (yyvsp[-7].vars));
15703 }
15704#line 15705 "parse.c"
15705 break;
15706
15707 case 496: /* f_larglist: '(' f_args opt_bv_decl ')' */
15708#line 5107 "parse.y"
15709 {
15710 p->ctxt.in_argdef = 0;
15711 (yyval.node_args) = (yyvsp[-2].node_args);
15712 p->max_numparam = ORDINAL_PARAM;
15713 /*% ripper: paren!($:f_args) %*/
15714 }
15715#line 15716 "parse.c"
15716 break;
15717
15718 case 497: /* f_larglist: f_args */
15719#line 5114 "parse.y"
15720 {
15721 p->ctxt.in_argdef = 0;
15722 if (!args_info_empty_p(&(yyvsp[0].node_args)->nd_ainfo))
15723 p->max_numparam = ORDINAL_PARAM;
15724 (yyval.node_args) = (yyvsp[0].node_args);
15725 }
15726#line 15727 "parse.c"
15727 break;
15728
15729 case 498: /* lambda_body: tLAMBEG compstmt_stmts '}' */
15730#line 5123 "parse.y"
15731 {
15732 token_info_pop(p, "}", &(yylsp[0]));
15733 (yyval.locations_lambda_body) = new_locations_lambda_body(p, (yyvsp[-1].node), &(yylsp[-1]), &(yylsp[-2]), &(yylsp[0]));
15734 /*% ripper: $:2 %*/
15735 }
15736#line 15737 "parse.c"
15737 break;
15738
15739 case 499: /* $@28: %empty */
15740#line 5129 "parse.y"
15741 {
15742 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
15743 }
15744#line 15745 "parse.c"
15745 break;
15746
15747 case 500: /* lambda_body: "'do' for lambda" $@28 bodystmt k_end */
15748#line 5133 "parse.y"
15749 {
15750 (yyval.locations_lambda_body) = new_locations_lambda_body(p, (yyvsp[-1].node), &(yylsp[-1]), &(yylsp[-3]), &(yylsp[0]));
15751 /*% ripper: $:3 %*/
15752 }
15753#line 15754 "parse.c"
15754 break;
15755
15756 case 501: /* do_block: k_do_block do_body k_end */
15757#line 5140 "parse.y"
15758 {
15759 (yyval.node) = (yyvsp[-1].node);
15760 set_embraced_location((yyval.node), &(yylsp[-2]), &(yylsp[0]));
15761 /*% ripper: $:2 %*/
15762 }
15763#line 15764 "parse.c"
15764 break;
15765
15766 case 502: /* block_call: command do_block */
15767#line 5148 "parse.y"
15768 {
15769 if (nd_type_p((yyvsp[-1].node), NODE_YIELD)) {
15770 compile_error(p, "block given to yield");
15771 }
15772 else {
15773 block_dup_check(p, get_nd_args(p, (yyvsp[-1].node)), (yyvsp[0].node));
15774 }
15775 (yyval.node) = method_add_block(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
15776 fixpos((yyval.node), (yyvsp[-1].node));
15777 /*% ripper: method_add_block!($:1, $:2) %*/
15778 }
15779#line 15780 "parse.c"
15780 break;
15781
15782 case 503: /* block_call: block_call call_op2 operation2 opt_paren_args */
15783#line 5160 "parse.y"
15784 {
15785 bool has_args = (yyvsp[0].node) != 0;
15786 if (NODE_EMPTY_ARGS_P((yyvsp[0].node))) (yyvsp[0].node) = 0;
15787 (yyval.node) = new_qcall(p, (yyvsp[-2].id), (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
15788 /*% ripper: call!($:1, $:2, $:3) %*/
15789 if (has_args) {
15790 /*% ripper: method_add_arg!($:$, $:4) %*/
15791 }
15792 }
15793#line 15794 "parse.c"
15794 break;
15795
15796 case 504: /* block_call: block_call call_op2 operation2 opt_paren_args brace_block */
15797#line 5170 "parse.y"
15798 {
15799 if (NODE_EMPTY_ARGS_P((yyvsp[-1].node))) (yyvsp[-1].node) = 0;
15800 (yyval.node) = new_command_qcall(p, (yyvsp[-3].id), (yyvsp[-4].node), (yyvsp[-2].id), (yyvsp[-1].node), (yyvsp[0].node), &(yylsp[-2]), &(yyloc));
15801 /*% ripper: method_add_block!(command_call!($:1, $:2, $:3, $:4), $:5) %*/
15802 }
15803#line 15804 "parse.c"
15804 break;
15805
15806 case 505: /* block_call: block_call call_op2 operation2 command_args do_block */
15807#line 5176 "parse.y"
15808 {
15809 (yyval.node) = new_command_qcall(p, (yyvsp[-3].id), (yyvsp[-4].node), (yyvsp[-2].id), (yyvsp[-1].node), (yyvsp[0].node), &(yylsp[-2]), &(yyloc));
15810 /*% ripper: method_add_block!(command_call!($:1, $:2, $:3, $:4), $:5) %*/
15811 }
15812#line 15813 "parse.c"
15813 break;
15814
15815 case 506: /* block_call: block_call call_op2 paren_args */
15816#line 5181 "parse.y"
15817 {
15818 (yyval.node) = new_qcall(p, (yyvsp[-1].id), (yyvsp[-2].node), idCall, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
15819 nd_set_line((yyval.node), (yylsp[-1]).end_pos.lineno);
15820 /*% ripper: method_add_arg!(call!($:1, $:2, ID2VAL(idCall)), $:3) %*/
15821 }
15822#line 15823 "parse.c"
15823 break;
15824
15825 case 507: /* method_call: fcall paren_args */
15826#line 5189 "parse.y"
15827 {
15828 (yyvsp[-1].node_fcall)->nd_args = (yyvsp[0].node);
15829 (yyval.node) = (NODE *)(yyvsp[-1].node_fcall);
15830 nd_set_last_loc((yyvsp[-1].node_fcall), (yylsp[0]).end_pos);
15831 /*% ripper: method_add_arg!(fcall!($:1), $:2) %*/
15832 }
15833#line 15834 "parse.c"
15834 break;
15835
15836 case 508: /* method_call: primary_value call_op operation2 opt_paren_args */
15837#line 5196 "parse.y"
15838 {
15839 bool has_args = (yyvsp[0].node) != 0;
15840 if (NODE_EMPTY_ARGS_P((yyvsp[0].node))) (yyvsp[0].node) = 0;
15841 (yyval.node) = new_qcall(p, (yyvsp[-2].id), (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
15842 nd_set_line((yyval.node), (yylsp[-1]).end_pos.lineno);
15843 /*% ripper: call!($:1, $:2, $:3) %*/
15844 if (has_args) {
15845 /*% ripper: method_add_arg!($:$, $:4) %*/
15846 }
15847 }
15848#line 15849 "parse.c"
15849 break;
15850
15851 case 509: /* method_call: primary_value "::" operation2 paren_args */
15852#line 5207 "parse.y"
15853 {
15854 (yyval.node) = new_qcall(p, idCOLON2, (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
15855 nd_set_line((yyval.node), (yylsp[-1]).end_pos.lineno);
15856 /*% ripper: method_add_arg!(call!($:1, $:2, $:3), $:4) %*/
15857 }
15858#line 15859 "parse.c"
15859 break;
15860
15861 case 510: /* method_call: primary_value "::" operation3 */
15862#line 5213 "parse.y"
15863 {
15864 (yyval.node) = new_qcall(p, idCOLON2, (yyvsp[-2].node), (yyvsp[0].id), 0, &(yylsp[0]), &(yyloc));
15865 /*% ripper: call!($:1, $:2, $:3) %*/
15866 }
15867#line 15868 "parse.c"
15868 break;
15869
15870 case 511: /* method_call: primary_value call_op2 paren_args */
15871#line 5218 "parse.y"
15872 {
15873 (yyval.node) = new_qcall(p, (yyvsp[-1].id), (yyvsp[-2].node), idCall, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
15874 nd_set_line((yyval.node), (yylsp[-1]).end_pos.lineno);
15875 /*% ripper: method_add_arg!(call!($:1, $:2, ID2VAL(idCall)), $:3) %*/
15876 }
15877#line 15878 "parse.c"
15878 break;
15879
15880 case 512: /* method_call: "'super'" paren_args */
15881#line 5224 "parse.y"
15882 {
15883 rb_code_location_t lparen_loc = (yylsp[0]);
15884 rb_code_location_t rparen_loc = (yylsp[0]);
15885 lparen_loc.end_pos.column = lparen_loc.beg_pos.column + 1;
15886 rparen_loc.beg_pos.column = rparen_loc.end_pos.column - 1;
15887
15888 (yyval.node) = NEW_SUPER((yyvsp[0].node), &(yyloc), &(yylsp[-1]), &lparen_loc, &rparen_loc);
15889 /*% ripper: super!($:2) %*/
15890 }
15891#line 15892 "parse.c"
15892 break;
15893
15894 case 513: /* method_call: "'super'" */
15895#line 5234 "parse.y"
15896 {
15897 (yyval.node) = NEW_ZSUPER(&(yyloc));
15898 /*% ripper: zsuper! %*/
15899 }
15900#line 15901 "parse.c"
15901 break;
15902
15903 case 514: /* method_call: primary_value '[' opt_call_args rbracket */
15904#line 5239 "parse.y"
15905 {
15906 (yyval.node) = NEW_CALL((yyvsp[-3].node), tAREF, (yyvsp[-1].node), &(yyloc));
15907 fixpos((yyval.node), (yyvsp[-3].node));
15908 /*% ripper: aref!($:1, $:3) %*/
15909 }
15910#line 15911 "parse.c"
15911 break;
15912
15913 case 515: /* brace_block: '{' brace_body '}' */
15914#line 5247 "parse.y"
15915 {
15916 (yyval.node) = (yyvsp[-1].node);
15917 set_embraced_location((yyval.node), &(yylsp[-2]), &(yylsp[0]));
15918 /*% ripper: $:2 %*/
15919 }
15920#line 15921 "parse.c"
15921 break;
15922
15923 case 516: /* brace_block: k_do do_body k_end */
15924#line 5253 "parse.y"
15925 {
15926 (yyval.node) = (yyvsp[-1].node);
15927 set_embraced_location((yyval.node), &(yylsp[-2]), &(yylsp[0]));
15928 /*% ripper: $:2 %*/
15929 }
15930#line 15931 "parse.c"
15931 break;
15932
15933 case 517: /* @29: %empty */
15934#line 5260 "parse.y"
15935 {(yyval.vars) = dyna_push(p);}
15936#line 15937 "parse.c"
15937 break;
15938
15939 case 518: /* brace_body: @29 max_numparam numparam it_id allow_exits opt_block_param_def compstmt_stmts */
15940#line 5263 "parse.y"
15941 {
15942 int max_numparam = p->max_numparam;
15943 ID it_id = p->it_id;
15944 p->max_numparam = (yyvsp[-5].num);
15945 p->it_id = (yyvsp[-3].id);
15946 (yyvsp[-1].node_args) = args_with_numbered(p, (yyvsp[-1].node_args), max_numparam, it_id);
15947 (yyval.node) = NEW_ITER((yyvsp[-1].node_args), (yyvsp[0].node), &(yyloc));
15948 /*% ripper: brace_block!($:args, $:compstmt) %*/
15949 restore_block_exit(p, (yyvsp[-2].node_exits));
15950 numparam_pop(p, (yyvsp[-4].node));
15951 dyna_pop(p, (yyvsp[-6].vars));
15952 }
15953#line 15954 "parse.c"
15954 break;
15955
15956 case 519: /* @30: %empty */
15957#line 5277 "parse.y"
15958 {
15959 (yyval.vars) = dyna_push(p);
15960 CMDARG_PUSH(0);
15961 }
15962#line 15963 "parse.c"
15963 break;
15964
15965 case 520: /* do_body: @30 max_numparam numparam it_id allow_exits opt_block_param_def bodystmt */
15966#line 5283 "parse.y"
15967 {
15968 int max_numparam = p->max_numparam;
15969 ID it_id = p->it_id;
15970 p->max_numparam = (yyvsp[-5].num);
15971 p->it_id = (yyvsp[-3].id);
15972 (yyvsp[-1].node_args) = args_with_numbered(p, (yyvsp[-1].node_args), max_numparam, it_id);
15973 (yyval.node) = NEW_ITER((yyvsp[-1].node_args), (yyvsp[0].node), &(yyloc));
15974 /*% ripper: do_block!($:args, $:bodystmt) %*/
15975 CMDARG_POP();
15976 restore_block_exit(p, (yyvsp[-2].node_exits));
15977 numparam_pop(p, (yyvsp[-4].node));
15978 dyna_pop(p, (yyvsp[-6].vars));
15979 }
15980#line 15981 "parse.c"
15981 break;
15982
15983 case 521: /* case_args: arg_value */
15984#line 5299 "parse.y"
15985 {
15986 check_literal_when(p, (yyvsp[0].node), &(yylsp[0]));
15987 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
15988 /*% ripper: args_add!(args_new!, $:arg_value) %*/
15989 }
15990#line 15991 "parse.c"
15991 break;
15992
15993 case 522: /* case_args: "*" arg_value */
15994#line 5305 "parse.y"
15995 {
15996 (yyval.node) = NEW_SPLAT((yyvsp[0].node), &(yyloc), &(yylsp[-1]));
15997 /*% ripper: args_add_star!(args_new!, $:arg_value) %*/
15998 }
15999#line 16000 "parse.c"
16000 break;
16001
16002 case 523: /* case_args: case_args ',' arg_value */
16003#line 5310 "parse.y"
16004 {
16005 check_literal_when(p, (yyvsp[0].node), &(yylsp[0]));
16006 (yyval.node) = last_arg_append(p, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
16007 /*% ripper: args_add!($:non_last_args, $:arg_value) %*/
16008 }
16009#line 16010 "parse.c"
16010 break;
16011
16012 case 524: /* case_args: case_args ',' "*" arg_value */
16013#line 5316 "parse.y"
16014 {
16015 (yyval.node) = rest_arg_append(p, (yyvsp[-3].node), (yyvsp[0].node), &(yyloc));
16016 /*% ripper: args_add_star!($:non_last_args, $:arg_value) %*/
16017 }
16018#line 16019 "parse.c"
16019 break;
16020
16021 case 525: /* case_body: k_when case_args then compstmt_stmts cases */
16022#line 5325 "parse.y"
16023 {
16024 (yyval.node) = NEW_WHEN((yyvsp[-3].node), (yyvsp[-1].node), (yyvsp[0].node), &(yyloc), &(yylsp[-4]), &(yylsp[-2]));
16025 fixpos((yyval.node), (yyvsp[-3].node));
16026 /*% ripper: when!($:2, $:4, $:5) %*/
16027 }
16028#line 16029 "parse.c"
16029 break;
16030
16031 case 528: /* p_pvtbl: %empty */
16032#line 5336 "parse.y"
16033 {(yyval.tbl) = p->pvtbl; p->pvtbl = st_init_numtable();}
16034#line 16035 "parse.c"
16035 break;
16036
16037 case 529: /* p_pktbl: %empty */
16038#line 5337 "parse.y"
16039 {(yyval.tbl) = p->pktbl; p->pktbl = 0;}
16040#line 16041 "parse.c"
16041 break;
16042
16043 case 530: /* p_in_kwarg: %empty */
16044#line 5339 "parse.y"
16045 {
16046 (yyval.ctxt) = p->ctxt;
16047 SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
16048 p->command_start = FALSE;
16049 p->ctxt.in_kwarg = 1;
16050 p->ctxt.in_alt_pattern = 0;
16051 p->ctxt.capture_in_pattern = 0;
16052 }
16053#line 16054 "parse.c"
16054 break;
16055
16056 case 531: /* $@31: %empty */
16057#line 5352 "parse.y"
16058 {
16059 pop_pktbl(p, (yyvsp[-2].tbl));
16060 pop_pvtbl(p, (yyvsp[-3].tbl));
16061 p->ctxt.in_kwarg = (yyvsp[-4].ctxt).in_kwarg;
16062 p->ctxt.in_alt_pattern = (yyvsp[-4].ctxt).in_alt_pattern;
16063 p->ctxt.capture_in_pattern = (yyvsp[-4].ctxt).capture_in_pattern;
16064 }
16065#line 16066 "parse.c"
16066 break;
16067
16068 case 532: /* p_case_body: "'in'" p_in_kwarg p_pvtbl p_pktbl p_top_expr then $@31 compstmt_stmts p_cases */
16069#line 5361 "parse.y"
16070 {
16071 (yyval.node) = NEW_IN((yyvsp[-4].node), (yyvsp[-1].node), (yyvsp[0].node), &(yyloc), &(yylsp[-8]), &(yylsp[-3]), &NULL_LOC);
16072 /*% ripper: in!($:expr, $:compstmt, $:cases) %*/
16073 }
16074#line 16075 "parse.c"
16075 break;
16076
16077 case 536: /* p_top_expr: p_top_expr_body "'if' modifier" expr_value */
16078#line 5373 "parse.y"
16079 {
16080 (yyval.node) = new_if(p, (yyvsp[0].node), (yyvsp[-2].node), 0, &(yyloc), &(yylsp[-1]), &NULL_LOC, &NULL_LOC);
16081 fixpos((yyval.node), (yyvsp[0].node));
16082 /*% ripper: if_mod!($:3, $:1) %*/
16083 }
16084#line 16085 "parse.c"
16085 break;
16086
16087 case 537: /* p_top_expr: p_top_expr_body "'unless' modifier" expr_value */
16088#line 5379 "parse.y"
16089 {
16090 (yyval.node) = new_unless(p, (yyvsp[0].node), (yyvsp[-2].node), 0, &(yyloc), &(yylsp[-1]), &NULL_LOC, &NULL_LOC);
16091 fixpos((yyval.node), (yyvsp[0].node));
16092 /*% ripper: unless_mod!($:3, $:1) %*/
16093 }
16094#line 16095 "parse.c"
16095 break;
16096
16097 case 539: /* p_top_expr_body: p_expr ',' */
16098#line 5388 "parse.y"
16099 {
16100 (yyval.node) = new_array_pattern_tail(p, 0, 1, 0, 0, &(yyloc));
16101 (yyval.node) = new_array_pattern(p, 0, (yyvsp[-1].node), (yyval.node), &(yyloc));
16102 /*% ripper: aryptn!(Qnil, [$:1], Qnil, Qnil) %*/
16103 }
16104#line 16105 "parse.c"
16105 break;
16106
16107 case 540: /* p_top_expr_body: p_expr ',' p_args */
16108#line 5394 "parse.y"
16109 {
16110 (yyval.node) = new_array_pattern(p, 0, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
16111 nd_set_first_loc((yyval.node), (yylsp[-2]).beg_pos);
16112 /*% ripper: aryptn!(Qnil, aryptn_pre_args(p, $:1, $:3[0]), *$:3[1..2]) %*/
16113 }
16114#line 16115 "parse.c"
16115 break;
16116
16117 case 541: /* p_top_expr_body: p_find */
16118#line 5400 "parse.y"
16119 {
16120 (yyval.node) = new_find_pattern(p, 0, (yyvsp[0].node), &(yyloc));
16121 /*% ripper: fndptn!(Qnil, *$:1[0..2]) %*/
16122 }
16123#line 16124 "parse.c"
16124 break;
16125
16126 case 542: /* p_top_expr_body: p_args_tail */
16127#line 5405 "parse.y"
16128 {
16129 (yyval.node) = new_array_pattern(p, 0, 0, (yyvsp[0].node), &(yyloc));
16130 /*% ripper: aryptn!(Qnil, *$:1[0..2]) %*/
16131 }
16132#line 16133 "parse.c"
16133 break;
16134
16135 case 543: /* p_top_expr_body: p_kwargs */
16136#line 5410 "parse.y"
16137 {
16138 (yyval.node) = new_hash_pattern(p, 0, (yyvsp[0].node), &(yyloc));
16139 /*% ripper: hshptn!(Qnil, *$:1[0..1]) %*/
16140 }
16141#line 16142 "parse.c"
16142 break;
16143
16144 case 545: /* p_as: p_expr "=>" p_variable */
16145#line 5420 "parse.y"
16146 {
16147 NODE *n = NEW_LIST((yyvsp[-2].node), &(yyloc));
16148 n = list_append(p, n, (yyvsp[0].node));
16149 (yyval.node) = new_hash(p, n, &(yyloc));
16150 /*% ripper: binary!($:1, ID2VAL((id_assoc)), $:3) %*/
16151 }
16152#line 16153 "parse.c"
16153 break;
16154
16155 case 547: /* $@32: %empty */
16156#line 5430 "parse.y"
16157 {
16158 p->ctxt.in_alt_pattern = 1;
16159 }
16160#line 16161 "parse.c"
16161 break;
16162
16163 case 548: /* p_alt: p_alt '|' $@32 p_expr_basic */
16164#line 5434 "parse.y"
16165 {
16166 if (p->ctxt.capture_in_pattern) {
16167 yyerror1(&(yylsp[-2]), "alternative pattern after variable capture");
16168 }
16169 p->ctxt.in_alt_pattern = 0;
16170 (yyval.node) = NEW_OR((yyvsp[-3].node), (yyvsp[0].node), &(yyloc), &(yylsp[-2]));
16171 /*% ripper: binary!($:left, ID2VAL(idOr), $:right) %*/
16172 }
16173#line 16174 "parse.c"
16174 break;
16175
16176 case 550: /* p_lparen: '(' p_pktbl */
16177#line 5446 "parse.y"
16178 {
16179 (yyval.tbl) = (yyvsp[0].tbl);
16180 /*% ripper: $:2 %*/
16181 }
16182#line 16183 "parse.c"
16183 break;
16184
16185 case 551: /* p_lbracket: '[' p_pktbl */
16186#line 5453 "parse.y"
16187 {
16188 (yyval.tbl) = (yyvsp[0].tbl);
16189 /*% ripper: $:2 %*/
16190 }
16191#line 16192 "parse.c"
16192 break;
16193
16194 case 554: /* p_expr_basic: p_const p_lparen p_args rparen */
16195#line 5462 "parse.y"
16196 {
16197 pop_pktbl(p, (yyvsp[-2].tbl));
16198 (yyval.node) = new_array_pattern(p, (yyvsp[-3].node), 0, (yyvsp[-1].node), &(yyloc));
16199 nd_set_first_loc((yyval.node), (yylsp[-3]).beg_pos);
16200 /*% ripper: aryptn!($:p_const, *$:p_args[0..2]) %*/
16201 }
16202#line 16203 "parse.c"
16203 break;
16204
16205 case 555: /* p_expr_basic: p_const p_lparen p_find rparen */
16206#line 5469 "parse.y"
16207 {
16208 pop_pktbl(p, (yyvsp[-2].tbl));
16209 (yyval.node) = new_find_pattern(p, (yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
16210 nd_set_first_loc((yyval.node), (yylsp[-3]).beg_pos);
16211 /*% ripper: fndptn!($:p_const, *$:p_find[0..2]) %*/
16212 }
16213#line 16214 "parse.c"
16214 break;
16215
16216 case 556: /* p_expr_basic: p_const p_lparen p_kwargs rparen */
16217#line 5476 "parse.y"
16218 {
16219 pop_pktbl(p, (yyvsp[-2].tbl));
16220 (yyval.node) = new_hash_pattern(p, (yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
16221 nd_set_first_loc((yyval.node), (yylsp[-3]).beg_pos);
16222 /*% ripper: hshptn!($:p_const, *$:p_kwargs[0..1]) %*/
16223 }
16224#line 16225 "parse.c"
16225 break;
16226
16227 case 557: /* p_expr_basic: p_const '(' rparen */
16228#line 5483 "parse.y"
16229 {
16230 (yyval.node) = new_array_pattern_tail(p, 0, 0, 0, 0, &(yyloc));
16231 (yyval.node) = new_array_pattern(p, (yyvsp[-2].node), 0, (yyval.node), &(yyloc));
16232 /*% ripper: aryptn!($:p_const, Qnil, Qnil, Qnil) %*/
16233 }
16234#line 16235 "parse.c"
16235 break;
16236
16237 case 558: /* p_expr_basic: p_const p_lbracket p_args rbracket */
16238#line 5489 "parse.y"
16239 {
16240 pop_pktbl(p, (yyvsp[-2].tbl));
16241 (yyval.node) = new_array_pattern(p, (yyvsp[-3].node), 0, (yyvsp[-1].node), &(yyloc));
16242 nd_set_first_loc((yyval.node), (yylsp[-3]).beg_pos);
16243 /*% ripper: aryptn!($:p_const, *$:p_args[0..2]) %*/
16244 }
16245#line 16246 "parse.c"
16246 break;
16247
16248 case 559: /* p_expr_basic: p_const p_lbracket p_find rbracket */
16249#line 5496 "parse.y"
16250 {
16251 pop_pktbl(p, (yyvsp[-2].tbl));
16252 (yyval.node) = new_find_pattern(p, (yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
16253 nd_set_first_loc((yyval.node), (yylsp[-3]).beg_pos);
16254 /*% ripper: fndptn!($:p_const, *$:p_find[0..2]) %*/
16255 }
16256#line 16257 "parse.c"
16257 break;
16258
16259 case 560: /* p_expr_basic: p_const p_lbracket p_kwargs rbracket */
16260#line 5503 "parse.y"
16261 {
16262 pop_pktbl(p, (yyvsp[-2].tbl));
16263 (yyval.node) = new_hash_pattern(p, (yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
16264 nd_set_first_loc((yyval.node), (yylsp[-3]).beg_pos);
16265 /*% ripper: hshptn!($:p_const, *$:p_kwargs[0..1]) %*/
16266 }
16267#line 16268 "parse.c"
16268 break;
16269
16270 case 561: /* p_expr_basic: p_const '[' rbracket */
16271#line 5510 "parse.y"
16272 {
16273 (yyval.node) = new_array_pattern_tail(p, 0, 0, 0, 0, &(yyloc));
16274 (yyval.node) = new_array_pattern(p, (yyvsp[-2].node), 0, (yyval.node), &(yyloc));
16275 /*% ripper: aryptn!($:p_const, Qnil, Qnil, Qnil) %*/
16276 }
16277#line 16278 "parse.c"
16278 break;
16279
16280 case 562: /* p_expr_basic: "[" p_args rbracket */
16281#line 5516 "parse.y"
16282 {
16283 (yyval.node) = new_array_pattern(p, 0, 0, (yyvsp[-1].node), &(yyloc));
16284 /*% ripper: aryptn!(Qnil, *$:p_args[0..2]) %*/
16285 }
16286#line 16287 "parse.c"
16287 break;
16288
16289 case 563: /* p_expr_basic: "[" p_find rbracket */
16290#line 5521 "parse.y"
16291 {
16292 (yyval.node) = new_find_pattern(p, 0, (yyvsp[-1].node), &(yyloc));
16293 /*% ripper: fndptn!(Qnil, *$:p_find[0..2]) %*/
16294 }
16295#line 16296 "parse.c"
16296 break;
16297
16298 case 564: /* p_expr_basic: "[" rbracket */
16299#line 5526 "parse.y"
16300 {
16301 (yyval.node) = new_array_pattern_tail(p, 0, 0, 0, 0, &(yyloc));
16302 (yyval.node) = new_array_pattern(p, 0, 0, (yyval.node), &(yyloc));
16303 /*% ripper: aryptn!(Qnil, Qnil, Qnil, Qnil) %*/
16304 }
16305#line 16306 "parse.c"
16306 break;
16307
16308 case 565: /* $@33: %empty */
16309#line 5532 "parse.y"
16310 {
16311 p->ctxt.in_kwarg = 0;
16312 }
16313#line 16314 "parse.c"
16314 break;
16315
16316 case 566: /* p_expr_basic: "{" p_pktbl lex_ctxt $@33 p_kwargs rbrace */
16317#line 5536 "parse.y"
16318 {
16319 pop_pktbl(p, (yyvsp[-4].tbl));
16320 p->ctxt.in_kwarg = (yyvsp[-3].ctxt).in_kwarg;
16321 (yyval.node) = new_hash_pattern(p, 0, (yyvsp[-1].node), &(yyloc));
16322 /*% ripper: hshptn!(Qnil, *$:p_kwargs[0..1]) %*/
16323 }
16324#line 16325 "parse.c"
16325 break;
16326
16327 case 567: /* p_expr_basic: "{" rbrace */
16328#line 5543 "parse.y"
16329 {
16330 (yyval.node) = new_hash_pattern_tail(p, 0, 0, &(yyloc));
16331 (yyval.node) = new_hash_pattern(p, 0, (yyval.node), &(yyloc));
16332 /*% ripper: hshptn!(Qnil, Qnil, Qnil) %*/
16333 }
16334#line 16335 "parse.c"
16335 break;
16336
16337 case 568: /* p_expr_basic: "(" p_pktbl p_expr rparen */
16338#line 5549 "parse.y"
16339 {
16340 pop_pktbl(p, (yyvsp[-2].tbl));
16341 (yyval.node) = (yyvsp[-1].node);
16342 /*% ripper: $:p_expr %*/
16343 }
16344#line 16345 "parse.c"
16345 break;
16346
16347 case 569: /* p_args: p_expr */
16348#line 5557 "parse.y"
16349 {
16350 NODE *pre_args = NEW_LIST((yyvsp[0].node), &(yyloc));
16351 (yyval.node) = new_array_pattern_tail(p, pre_args, 0, 0, 0, &(yyloc));
16352 /*% ripper: [[$:1], Qnil, Qnil] %*/
16353 }
16354#line 16355 "parse.c"
16355 break;
16356
16357 case 570: /* p_args: p_args_head */
16358#line 5563 "parse.y"
16359 {
16360 (yyval.node) = new_array_pattern_tail(p, (yyvsp[0].node), 1, 0, 0, &(yyloc));
16361 /*% ripper: [$:1, Qnil, Qnil] %*/
16362 }
16363#line 16364 "parse.c"
16364 break;
16365
16366 case 571: /* p_args: p_args_head p_arg */
16367#line 5568 "parse.y"
16368 {
16369 (yyval.node) = new_array_pattern_tail(p, list_concat((yyvsp[-1].node), (yyvsp[0].node)), 0, 0, 0, &(yyloc));
16370 /*% ripper: [rb_ary_concat($:1, $:2), Qnil, Qnil] %*/
16371 }
16372#line 16373 "parse.c"
16373 break;
16374
16375 case 572: /* p_args: p_args_head p_rest */
16376#line 5573 "parse.y"
16377 {
16378 (yyval.node) = new_array_pattern_tail(p, (yyvsp[-1].node), 1, (yyvsp[0].node), 0, &(yyloc));
16379 /*% ripper: [$:1, $:2, Qnil] %*/
16380 }
16381#line 16382 "parse.c"
16382 break;
16383
16384 case 573: /* p_args: p_args_head p_rest ',' p_args_post */
16385#line 5578 "parse.y"
16386 {
16387 (yyval.node) = new_array_pattern_tail(p, (yyvsp[-3].node), 1, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
16388 /*% ripper: [$:1, $:2, $:4] %*/
16389 }
16390#line 16391 "parse.c"
16391 break;
16392
16393 case 576: /* p_args_head: p_args_head p_arg ',' */
16394#line 5587 "parse.y"
16395 {
16396 (yyval.node) = list_concat((yyvsp[-2].node), (yyvsp[-1].node));
16397 /*% ripper: rb_ary_concat($:1, $:2) %*/
16398 }
16399#line 16400 "parse.c"
16400 break;
16401
16402 case 577: /* p_args_tail: p_rest */
16403#line 5594 "parse.y"
16404 {
16405 (yyval.node) = new_array_pattern_tail(p, 0, 1, (yyvsp[0].node), 0, &(yyloc));
16406 /*% ripper: [Qnil, $:1, Qnil] %*/
16407 }
16408#line 16409 "parse.c"
16409 break;
16410
16411 case 578: /* p_args_tail: p_rest ',' p_args_post */
16412#line 5599 "parse.y"
16413 {
16414 (yyval.node) = new_array_pattern_tail(p, 0, 1, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
16415 /*% ripper: [Qnil, $:1, $:3] %*/
16416 }
16417#line 16418 "parse.c"
16418 break;
16419
16420 case 579: /* p_find: p_rest ',' p_args_post ',' p_rest */
16421#line 5606 "parse.y"
16422 {
16423 (yyval.node) = new_find_pattern_tail(p, (yyvsp[-4].node), (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
16424 /*% ripper: [$:1, $:3, $:5] %*/
16425 }
16426#line 16427 "parse.c"
16427 break;
16428
16429 case 580: /* p_rest: "*" "local variable or method" */
16430#line 5614 "parse.y"
16431 {
16432 error_duplicate_pattern_variable(p, (yyvsp[0].id), &(yylsp[0]));
16433 /*% ripper: var_field!($:2) %*/
16434 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
16435 }
16436#line 16437 "parse.c"
16437 break;
16438
16439 case 581: /* p_rest: "*" */
16440#line 5620 "parse.y"
16441 {
16442 (yyval.node) = 0;
16443 /*% ripper: var_field!(Qnil) %*/
16444 }
16445#line 16446 "parse.c"
16446 break;
16447
16448 case 583: /* p_args_post: p_args_post ',' p_arg */
16449#line 5628 "parse.y"
16450 {
16451 (yyval.node) = list_concat((yyvsp[-2].node), (yyvsp[0].node));
16452 /*% ripper: rb_ary_concat($:1, $:3) %*/
16453 }
16454#line 16455 "parse.c"
16455 break;
16456
16457 case 584: /* p_arg: p_expr */
16458#line 5635 "parse.y"
16459 {
16460 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
16461 /*% ripper: [$:1] %*/
16462 }
16463#line 16464 "parse.c"
16464 break;
16465
16466 case 585: /* p_kwargs: p_kwarg ',' p_any_kwrest */
16467#line 5642 "parse.y"
16468 {
16469 (yyval.node) = new_hash_pattern_tail(p, new_unique_key_hash(p, (yyvsp[-2].node), &(yyloc)), (yyvsp[0].id), &(yyloc));
16470 /*% ripper: [$:1, $:3] %*/
16471 }
16472#line 16473 "parse.c"
16473 break;
16474
16475 case 586: /* p_kwargs: p_kwarg */
16476#line 5647 "parse.y"
16477 {
16478 (yyval.node) = new_hash_pattern_tail(p, new_unique_key_hash(p, (yyvsp[0].node), &(yyloc)), 0, &(yyloc));
16479 /*% ripper: [$:1, Qnil] %*/
16480 }
16481#line 16482 "parse.c"
16482 break;
16483
16484 case 587: /* p_kwargs: p_kwarg ',' */
16485#line 5652 "parse.y"
16486 {
16487 (yyval.node) = new_hash_pattern_tail(p, new_unique_key_hash(p, (yyvsp[-1].node), &(yyloc)), 0, &(yyloc));
16488 /*% ripper: [$:1, Qnil] %*/
16489 }
16490#line 16491 "parse.c"
16491 break;
16492
16493 case 588: /* p_kwargs: p_any_kwrest */
16494#line 5657 "parse.y"
16495 {
16496 (yyval.node) = new_hash_pattern_tail(p, new_hash(p, 0, &(yyloc)), (yyvsp[0].id), &(yyloc));
16497 /*% ripper: [[], $:1] %*/
16498 }
16499#line 16500 "parse.c"
16500 break;
16501
16502 case 590: /* p_kwarg: p_kwarg ',' p_kw */
16503#line 5666 "parse.y"
16504 {
16505 (yyval.node) = list_concat((yyvsp[-2].node), (yyvsp[0].node));
16506 /*% ripper: rb_ary_push($:1, $:3) %*/
16507 }
16508#line 16509 "parse.c"
16509 break;
16510
16511 case 591: /* p_kw: p_kw_label p_expr */
16512#line 5673 "parse.y"
16513 {
16514 error_duplicate_pattern_key(p, (yyvsp[-1].id), &(yylsp[-1]));
16515 (yyval.node) = list_append(p, NEW_LIST(NEW_SYM(rb_id2str((yyvsp[-1].id)), &(yylsp[-1])), &(yyloc)), (yyvsp[0].node));
16516 /*% ripper: [$:1, $:2] %*/
16517 }
16518#line 16519 "parse.c"
16519 break;
16520
16521 case 592: /* p_kw: p_kw_label */
16522#line 5679 "parse.y"
16523 {
16524 error_duplicate_pattern_key(p, (yyvsp[0].id), &(yylsp[0]));
16525 if ((yyvsp[0].id) && !is_local_id((yyvsp[0].id))) {
16526 yyerror1(&(yylsp[0]), "key must be valid as local variables");
16527 }
16528 error_duplicate_pattern_variable(p, (yyvsp[0].id), &(yylsp[0]));
16529 (yyval.node) = list_append(p, NEW_LIST(NEW_SYM(rb_id2str((yyvsp[0].id)), &(yyloc)), &(yyloc)), assignable(p, (yyvsp[0].id), 0, &(yyloc)));
16530 /*% ripper: [$:1, Qnil] %*/
16531 }
16532#line 16533 "parse.c"
16533 break;
16534
16535 case 594: /* p_kw_label: "string literal" string_contents tLABEL_END */
16536#line 5692 "parse.y"
16537 {
16538 YYLTYPE loc = code_loc_gen(&(yylsp[-2]), &(yylsp[0]));
16539 if (!(yyvsp[-1].node) || nd_type_p((yyvsp[-1].node), NODE_STR)) {
16540 NODE *node = dsym_node(p, (yyvsp[-1].node), &loc);
16541 (yyval.id) = rb_sym2id(rb_node_sym_string_val(node));
16542 }
16543 else {
16544 yyerror1(&loc, "symbol literal with interpolation is not allowed");
16545 (yyval.id) = rb_intern_str(STR_NEW0());
16546 }
16547 /*% ripper: $:2 %*/
16548 }
16549#line 16550 "parse.c"
16550 break;
16551
16552 case 595: /* p_kwrest: kwrest_mark "local variable or method" */
16553#line 5707 "parse.y"
16554 {
16555 (yyval.id) = (yyvsp[0].id);
16556 /*% ripper: var_field!($:2) %*/
16557 }
16558#line 16559 "parse.c"
16559 break;
16560
16561 case 596: /* p_kwrest: kwrest_mark */
16562#line 5712 "parse.y"
16563 {
16564 (yyval.id) = 0;
16565 /*% ripper: Qnil %*/
16566 }
16567#line 16568 "parse.c"
16568 break;
16569
16570 case 597: /* p_kwnorest: kwrest_mark "'nil'" */
16571#line 5719 "parse.y"
16572 {
16573 (yyval.id) = 0;
16574 }
16575#line 16576 "parse.c"
16576 break;
16577
16578 case 599: /* p_any_kwrest: p_kwnorest */
16579#line 5726 "parse.y"
16580 {
16581 (yyval.id) = idNil;
16582 /*% ripper: var_field!(ID2VAL(idNil)) %*/
16583 }
16584#line 16585 "parse.c"
16585 break;
16586
16587 case 601: /* range_expr_p_primitive: p_primitive ".." p_primitive */
16588#line 3105 "parse.y"
16589 {
16590 value_expr(p, (yyvsp[-2].node));
16591 value_expr(p, (yyvsp[0].node));
16592 (yyval.node) = NEW_DOT2((yyvsp[-2].node), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
16593 /*% ripper: dot2!($:1, $:3) %*/
16594 }
16595#line 16596 "parse.c"
16596 break;
16597
16598 case 602: /* range_expr_p_primitive: p_primitive "..." p_primitive */
16599#line 3112 "parse.y"
16600 {
16601 value_expr(p, (yyvsp[-2].node));
16602 value_expr(p, (yyvsp[0].node));
16603 (yyval.node) = NEW_DOT3((yyvsp[-2].node), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
16604 /*% ripper: dot3!($:1, $:3) %*/
16605 }
16606#line 16607 "parse.c"
16607 break;
16608
16609 case 603: /* range_expr_p_primitive: p_primitive ".." */
16610#line 3119 "parse.y"
16611 {
16612 value_expr(p, (yyvsp[-1].node));
16613 (yyval.node) = NEW_DOT2((yyvsp[-1].node), new_nil_at(p, &(yylsp[0]).end_pos), &(yyloc), &(yylsp[0]));
16614 /*% ripper: dot2!($:1, Qnil) %*/
16615 }
16616#line 16617 "parse.c"
16617 break;
16618
16619 case 604: /* range_expr_p_primitive: p_primitive "..." */
16620#line 3125 "parse.y"
16621 {
16622 value_expr(p, (yyvsp[-1].node));
16623 (yyval.node) = NEW_DOT3((yyvsp[-1].node), new_nil_at(p, &(yylsp[0]).end_pos), &(yyloc), &(yylsp[0]));
16624 /*% ripper: dot3!($:1, Qnil) %*/
16625 }
16626#line 16627 "parse.c"
16627 break;
16628
16629 case 605: /* range_expr_p_primitive: "(.." p_primitive */
16630#line 3131 "parse.y"
16631 {
16632 value_expr(p, (yyvsp[0].node));
16633 (yyval.node) = NEW_DOT2(new_nil_at(p, &(yylsp[-1]).beg_pos), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
16634 /*% ripper: dot2!(Qnil, $:2) %*/
16635 }
16636#line 16637 "parse.c"
16637 break;
16638
16639 case 606: /* range_expr_p_primitive: "(..." p_primitive */
16640#line 3137 "parse.y"
16641 {
16642 value_expr(p, (yyvsp[0].node));
16643 (yyval.node) = NEW_DOT3(new_nil_at(p, &(yylsp[-1]).beg_pos), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
16644 /*% ripper: dot3!(Qnil, $:2) %*/
16645 }
16646#line 16647 "parse.c"
16647 break;
16648
16649 case 619: /* p_primitive: keyword_variable */
16650#line 5741 "parse.y"
16651 {
16652 if (!((yyval.node) = gettable(p, (yyvsp[0].id), &(yyloc)))) (yyval.node) = NEW_ERROR(&(yyloc));
16653 /*% ripper: var_ref!($:1) %*/
16654 }
16655#line 16656 "parse.c"
16656 break;
16657
16658 case 621: /* p_variable: "local variable or method" */
16659#line 5749 "parse.y"
16660 {
16661 error_duplicate_pattern_variable(p, (yyvsp[0].id), &(yylsp[0]));
16662 /*% ripper: var_field!($:1) %*/
16663 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
16664 }
16665#line 16666 "parse.c"
16666 break;
16667
16668 case 622: /* p_var_ref: '^' "local variable or method" */
16669#line 5757 "parse.y"
16670 {
16671 NODE *n = gettable(p, (yyvsp[0].id), &(yyloc));
16672 if (!n) {
16673 n = NEW_ERROR(&(yyloc));
16674 }
16675 else if (!(nd_type_p(n, NODE_LVAR) || nd_type_p(n, NODE_DVAR))) {
16676 compile_error(p, "%"PRIsVALUE": no such local variable", rb_id2str((yyvsp[0].id)));
16677 }
16678 (yyval.node) = n;
16679 /*% ripper: var_ref!($:2) %*/
16680 }
16681#line 16682 "parse.c"
16682 break;
16683
16684 case 623: /* p_var_ref: '^' nonlocal_var */
16685#line 5769 "parse.y"
16686 {
16687 if (!((yyval.node) = gettable(p, (yyvsp[0].id), &(yyloc)))) (yyval.node) = NEW_ERROR(&(yyloc));
16688 /*% ripper: var_ref!($:2) %*/
16689 }
16690#line 16691 "parse.c"
16691 break;
16692
16693 case 624: /* p_expr_ref: '^' "(" expr_value rparen */
16694#line 5776 "parse.y"
16695 {
16696 (yyval.node) = NEW_BLOCK((yyvsp[-1].node), &(yyloc));
16697 /*% ripper: begin!($:3) %*/
16698 }
16699#line 16700 "parse.c"
16700 break;
16701
16702 case 625: /* p_const: ":: at EXPR_BEG" cname */
16703#line 5783 "parse.y"
16704 {
16705 (yyval.node) = NEW_COLON3((yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0]));
16706 /*% ripper: top_const_ref!($:2) %*/
16707 }
16708#line 16709 "parse.c"
16709 break;
16710
16711 case 626: /* p_const: p_const "::" cname */
16712#line 5788 "parse.y"
16713 {
16714 (yyval.node) = NEW_COLON2((yyvsp[-2].node), (yyvsp[0].id), &(yyloc), &(yylsp[-1]), &(yylsp[0]));
16715 /*% ripper: const_path_ref!($:1, $:3) %*/
16716 }
16717#line 16718 "parse.c"
16718 break;
16719
16720 case 627: /* p_const: "constant" */
16721#line 5793 "parse.y"
16722 {
16723 (yyval.node) = gettable(p, (yyvsp[0].id), &(yyloc));
16724 /*% ripper: var_ref!($:1) %*/
16725 }
16726#line 16727 "parse.c"
16727 break;
16728
16729 case 628: /* opt_rescue: k_rescue exc_list exc_var then compstmt_stmts opt_rescue */
16730#line 5802 "parse.y"
16731 {
16732 NODE *err = (yyvsp[-3].node);
16733 if ((yyvsp[-3].node)) {
16734 err = NEW_ERRINFO(&(yylsp[-3]));
16735 err = node_assign(p, (yyvsp[-3].node), err, NO_LEX_CTXT, &(yylsp[-3]));
16736 }
16737 (yyval.node) = NEW_RESBODY((yyvsp[-4].node), (yyvsp[-3].node), (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
16738 if ((yyvsp[-4].node)) {
16739 fixpos((yyval.node), (yyvsp[-4].node));
16740 }
16741 else if ((yyvsp[-3].node)) {
16742 fixpos((yyval.node), (yyvsp[-3].node));
16743 }
16744 else {
16745 fixpos((yyval.node), (yyvsp[-1].node));
16746 }
16747 /*% ripper: rescue!($:2, $:3, $:5, $:6) %*/
16748 }
16749#line 16750 "parse.c"
16750 break;
16751
16752 case 630: /* exc_list: arg_value */
16753#line 5824 "parse.y"
16754 {
16755 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
16756 /*% ripper: rb_ary_new3(1, $:1) %*/
16757 }
16758#line 16759 "parse.c"
16759 break;
16760
16761 case 631: /* exc_list: mrhs */
16762#line 5829 "parse.y"
16763 {
16764 if (!((yyval.node) = splat_array((yyvsp[0].node)))) (yyval.node) = (yyvsp[0].node);
16765 }
16766#line 16767 "parse.c"
16767 break;
16768
16769 case 633: /* exc_var: "=>" lhs */
16770#line 5836 "parse.y"
16771 {
16772 (yyval.node) = (yyvsp[0].node);
16773 /*% ripper: $:2 %*/
16774 }
16775#line 16776 "parse.c"
16776 break;
16777
16778 case 635: /* opt_ensure: k_ensure stmts option_terms */
16779#line 5844 "parse.y"
16780 {
16781 p->ctxt.in_rescue = (yyvsp[-2].ctxt).in_rescue;
16782 (yyval.node) = (yyvsp[-1].node);
16783 void_expr(p, void_stmts(p, (yyval.node)));
16784 /*% ripper: ensure!($:2) %*/
16785 }
16786#line 16787 "parse.c"
16787 break;
16788
16789 case 639: /* strings: string */
16790#line 5858 "parse.y"
16791 {
16792 if (!(yyvsp[0].node)) {
16793 (yyval.node) = NEW_STR(STRING_NEW0(), &(yyloc));
16794 }
16795 else {
16796 (yyval.node) = evstr2dstr(p, (yyvsp[0].node));
16797 }
16798 /*% ripper: $:1 %*/
16799 }
16800#line 16801 "parse.c"
16801 break;
16802
16803 case 642: /* string: string string1 */
16804#line 5872 "parse.y"
16805 {
16806 (yyval.node) = literal_concat(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
16807 /*% ripper: string_concat!($:1, $:2) %*/
16808 }
16809#line 16810 "parse.c"
16810 break;
16811
16812 case 643: /* string1: "string literal" string_contents "terminator" */
16813#line 5879 "parse.y"
16814 {
16815 (yyval.node) = heredoc_dedent(p, (yyvsp[-1].node));
16816 if ((yyval.node)) nd_set_loc((yyval.node), &(yyloc));
16817 /*% ripper: $:2 %*/
16818 if (p->heredoc_indent > 0) {
16819 /*% ripper: heredoc_dedent!($:$, INT2NUM(%{p->heredoc_indent})) %*/
16820 p->heredoc_indent = 0;
16821 }
16822 /*% ripper: string_literal!($:$) %*/
16823 }
16824#line 16825 "parse.c"
16825 break;
16826
16827 case 644: /* xstring: "backtick literal" xstring_contents "terminator" */
16828#line 5892 "parse.y"
16829 {
16830 (yyval.node) = new_xstring(p, heredoc_dedent(p, (yyvsp[-1].node)), &(yyloc));
16831 /*% ripper: $:2 %*/
16832 if (p->heredoc_indent > 0) {
16833 /*% ripper: heredoc_dedent!($:$, INT2NUM(%{p->heredoc_indent})) %*/
16834 p->heredoc_indent = 0;
16835 }
16836 /*% ripper: xstring_literal!($:$) %*/
16837 }
16838#line 16839 "parse.c"
16839 break;
16840
16841 case 645: /* regexp: "regexp literal" regexp_contents tREGEXP_END */
16842#line 5904 "parse.y"
16843 {
16844 (yyval.node) = new_regexp(p, (yyvsp[-1].node), (yyvsp[0].num), &(yyloc), &(yylsp[-2]), &(yylsp[-1]), &(yylsp[0]));
16845 /*% ripper: regexp_literal!($:2, $:3) %*/
16846 }
16847#line 16848 "parse.c"
16848 break;
16849
16850 case 648: /* words_tWORDS_BEG_word_list: "word list" nonempty_list_' ' word_list "terminator" */
16851#line 3154 "parse.y"
16852 {
16853 (yyval.node) = make_list((yyvsp[-1].node), &(yyloc));
16854 /*% ripper: array!($:word_list) %*/
16855 }
16856#line 16857 "parse.c"
16857 break;
16858
16859 case 650: /* word_list: %empty */
16860#line 5914 "parse.y"
16861 {
16862 (yyval.node) = 0;
16863 /*% ripper: words_new! %*/
16864 }
16865#line 16866 "parse.c"
16866 break;
16867
16868 case 651: /* word_list: word_list word nonempty_list_' ' */
16869#line 5919 "parse.y"
16870 {
16871 (yyval.node) = list_append(p, (yyvsp[-2].node), evstr2dstr(p, (yyvsp[-1].node)));
16872 /*% ripper: words_add!($:1, $:2) %*/
16873 }
16874#line 16875 "parse.c"
16875 break;
16876
16877 case 653: /* word: word string_content */
16878#line 5928 "parse.y"
16879 {
16880 (yyval.node) = literal_concat(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
16881 /*% ripper: word_add!($:1, $:2) %*/
16882 }
16883#line 16884 "parse.c"
16884 break;
16885
16886 case 654: /* words_tSYMBOLS_BEG_symbol_list: "symbol list" nonempty_list_' ' symbol_list "terminator" */
16887#line 3154 "parse.y"
16888 {
16889 (yyval.node) = make_list((yyvsp[-1].node), &(yyloc));
16890 /*% ripper: array!($:word_list) %*/
16891 }
16892#line 16893 "parse.c"
16893 break;
16894
16895 case 656: /* symbol_list: %empty */
16896#line 5938 "parse.y"
16897 {
16898 (yyval.node) = 0;
16899 /*% ripper: symbols_new! %*/
16900 }
16901#line 16902 "parse.c"
16902 break;
16903
16904 case 657: /* symbol_list: symbol_list word nonempty_list_' ' */
16905#line 5943 "parse.y"
16906 {
16907 (yyval.node) = symbol_append(p, (yyvsp[-2].node), evstr2dstr(p, (yyvsp[-1].node)));
16908 /*% ripper: symbols_add!($:1, $:2) %*/
16909 }
16910#line 16911 "parse.c"
16911 break;
16912
16913 case 658: /* words_tQWORDS_BEG_qword_list: "verbatim word list" nonempty_list_' ' qword_list "terminator" */
16914#line 3154 "parse.y"
16915 {
16916 (yyval.node) = make_list((yyvsp[-1].node), &(yyloc));
16917 /*% ripper: array!($:word_list) %*/
16918 }
16919#line 16920 "parse.c"
16920 break;
16921
16922 case 660: /* words_tQSYMBOLS_BEG_qsym_list: "verbatim symbol list" nonempty_list_' ' qsym_list "terminator" */
16923#line 3154 "parse.y"
16924 {
16925 (yyval.node) = make_list((yyvsp[-1].node), &(yyloc));
16926 /*% ripper: array!($:word_list) %*/
16927 }
16928#line 16929 "parse.c"
16929 break;
16930
16931 case 662: /* qword_list: %empty */
16932#line 5956 "parse.y"
16933 {
16934 (yyval.node) = 0;
16935 /*% ripper: qwords_new! %*/
16936 }
16937#line 16938 "parse.c"
16938 break;
16939
16940 case 663: /* qword_list: qword_list "literal content" nonempty_list_' ' */
16941#line 5961 "parse.y"
16942 {
16943 (yyval.node) = list_append(p, (yyvsp[-2].node), (yyvsp[-1].node));
16944 /*% ripper: qwords_add!($:1, $:2) %*/
16945 }
16946#line 16947 "parse.c"
16947 break;
16948
16949 case 664: /* qsym_list: %empty */
16950#line 5968 "parse.y"
16951 {
16952 (yyval.node) = 0;
16953 /*% ripper: qsymbols_new! %*/
16954 }
16955#line 16956 "parse.c"
16956 break;
16957
16958 case 665: /* qsym_list: qsym_list "literal content" nonempty_list_' ' */
16959#line 5973 "parse.y"
16960 {
16961 (yyval.node) = symbol_append(p, (yyvsp[-2].node), (yyvsp[-1].node));
16962 /*% ripper: qsymbols_add!($:1, $:2) %*/
16963 }
16964#line 16965 "parse.c"
16965 break;
16966
16967 case 666: /* string_contents: %empty */
16968#line 5980 "parse.y"
16969 {
16970 (yyval.node) = 0;
16971 /*% ripper: string_content! %*/
16972 }
16973#line 16974 "parse.c"
16974 break;
16975
16976 case 667: /* string_contents: string_contents string_content */
16977#line 5985 "parse.y"
16978 {
16979 (yyval.node) = literal_concat(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
16980 /*% ripper: string_add!($:1, $:2) %*/
16981 }
16982#line 16983 "parse.c"
16983 break;
16984
16985 case 668: /* xstring_contents: %empty */
16986#line 5992 "parse.y"
16987 {
16988 (yyval.node) = 0;
16989 /*% ripper: xstring_new! %*/
16990 }
16991#line 16992 "parse.c"
16992 break;
16993
16994 case 669: /* xstring_contents: xstring_contents string_content */
16995#line 5997 "parse.y"
16996 {
16997 (yyval.node) = literal_concat(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
16998 /*% ripper: xstring_add!($:1, $:2) %*/
16999 }
17000#line 17001 "parse.c"
17001 break;
17002
17003 case 670: /* regexp_contents: %empty */
17004#line 6004 "parse.y"
17005 {
17006 (yyval.node) = 0;
17007 /*% ripper: regexp_new! %*/
17008 }
17009#line 17010 "parse.c"
17010 break;
17011
17012 case 671: /* regexp_contents: regexp_contents string_content */
17013#line 6009 "parse.y"
17014 {
17015 NODE *head = (yyvsp[-1].node), *tail = (yyvsp[0].node);
17016 if (!head) {
17017 (yyval.node) = tail;
17018 }
17019 else if (!tail) {
17020 (yyval.node) = head;
17021 }
17022 else {
17023 switch (nd_type(head)) {
17024 case NODE_STR:
17025 head = str2dstr(p, head);
17026 break;
17027 case NODE_DSTR:
17028 break;
17029 default:
17030 head = list_append(p, NEW_DSTR(0, &(yyloc)), head);
17031 break;
17032 }
17033 (yyval.node) = list_append(p, head, tail);
17034 }
17035 /*% ripper: regexp_add!($:1, $:2) %*/
17036 }
17037#line 17038 "parse.c"
17038 break;
17039
17040 case 673: /* @34: %empty */
17041#line 6037 "parse.y"
17042 {
17043 /* need to backup p->lex.strterm so that a string literal `%&foo,#$&,bar&` can be parsed */
17044 (yyval.strterm) = p->lex.strterm;
17045 p->lex.strterm = 0;
17046 SET_LEX_STATE(EXPR_BEG);
17047 }
17048#line 17049 "parse.c"
17049 break;
17050
17051 case 674: /* string_content: tSTRING_DVAR @34 string_dvar */
17052#line 6044 "parse.y"
17053 {
17054 p->lex.strterm = (yyvsp[-1].strterm);
17055 (yyval.node) = NEW_EVSTR((yyvsp[0].node), &(yyloc), &(yylsp[-2]), &NULL_LOC);
17056 nd_set_line((yyval.node), (yylsp[0]).end_pos.lineno);
17057 /*% ripper: string_dvar!($:dvar) %*/
17058 }
17059#line 17060 "parse.c"
17060 break;
17061
17062 case 675: /* @35: %empty */
17063#line 6051 "parse.y"
17064 {
17065 CMDARG_PUSH(0);
17066 COND_PUSH(0);
17067 /* need to backup p->lex.strterm so that a string literal `%!foo,#{ !0 },bar!` can be parsed */
17068 (yyval.strterm) = p->lex.strterm;
17069 p->lex.strterm = 0;
17070 SET_LEX_STATE(EXPR_BEG);
17071 }
17072#line 17073 "parse.c"
17073 break;
17074
17075 case 676: /* @36: %empty */
17076#line 6059 "parse.y"
17077 {
17078 (yyval.num) = p->lex.brace_nest;
17079 p->lex.brace_nest = 0;
17080 }
17081#line 17082 "parse.c"
17082 break;
17083
17084 case 677: /* @37: %empty */
17085#line 6063 "parse.y"
17086 {
17087 (yyval.num) = p->heredoc_indent;
17088 p->heredoc_indent = 0;
17089 }
17090#line 17091 "parse.c"
17091 break;
17092
17093 case 678: /* string_content: "'#{'" @35 @36 @37 compstmt_stmts string_dend */
17094#line 6068 "parse.y"
17095 {
17096 COND_POP();
17097 CMDARG_POP();
17098 p->lex.strterm = (yyvsp[-4].strterm);
17099 SET_LEX_STATE((yyvsp[-5].state));
17100 p->lex.brace_nest = (yyvsp[-3].num);
17101 p->heredoc_indent = (yyvsp[-2].num);
17102 p->heredoc_line_indent = -1;
17103 if ((yyvsp[-1].node)) nd_unset_fl_newline((yyvsp[-1].node));
17104 (yyval.node) = new_evstr(p, (yyvsp[-1].node), &(yyloc), &(yylsp[-5]), &(yylsp[0]));
17105 /*% ripper: string_embexpr!($:compstmt) %*/
17106 }
17107#line 17108 "parse.c"
17108 break;
17109
17110 case 681: /* string_dvar: nonlocal_var */
17111#line 6087 "parse.y"
17112 {
17113 if (!((yyval.node) = gettable(p, (yyvsp[0].id), &(yyloc)))) (yyval.node) = NEW_ERROR(&(yyloc));
17114 /*% ripper: var_ref!($:1) %*/
17115 }
17116#line 17117 "parse.c"
17117 break;
17118
17119 case 685: /* ssym: "symbol literal" sym */
17120#line 6099 "parse.y"
17121 {
17122 SET_LEX_STATE(EXPR_END);
17123 VALUE str = rb_id2str((yyvsp[0].id));
17124 /*
17125 * TODO:
17126 * set_yylval_noname sets invalid id to yylval.
17127 * This branch can be removed once yylval is changed to
17128 * hold lexed string.
17129 */
17130 if (!str) str = STR_NEW0();
17131 (yyval.node) = NEW_SYM(str, &(yyloc));
17132 /*% ripper: symbol_literal!(symbol!($:2)) %*/
17133 }
17134#line 17135 "parse.c"
17135 break;
17136
17137 case 688: /* dsym: "symbol literal" string_contents "terminator" */
17138#line 6119 "parse.y"
17139 {
17140 SET_LEX_STATE(EXPR_END);
17141 (yyval.node) = dsym_node(p, (yyvsp[-1].node), &(yyloc));
17142 /*% ripper: dyna_symbol!($:2) %*/
17143 }
17144#line 17145 "parse.c"
17145 break;
17146
17147 case 690: /* numeric: tUMINUS_NUM simple_numeric */
17148#line 6128 "parse.y"
17149 {
17150 (yyval.node) = (yyvsp[0].node);
17151 negate_lit(p, (yyval.node));
17152 /*% ripper: unary!(ID2VAL(idUMinus), $:2) %*/
17153 }
17154#line 17155 "parse.c"
17155 break;
17156
17157 case 701: /* keyword_variable: "'nil'" */
17158#line 6150 "parse.y"
17159 {(yyval.id) = KWD2EID(nil, (yyvsp[0].id));}
17160#line 17161 "parse.c"
17161 break;
17162
17163 case 702: /* keyword_variable: "'self'" */
17164#line 6151 "parse.y"
17165 {(yyval.id) = KWD2EID(self, (yyvsp[0].id));}
17166#line 17167 "parse.c"
17167 break;
17168
17169 case 703: /* keyword_variable: "'true'" */
17170#line 6152 "parse.y"
17171 {(yyval.id) = KWD2EID(true, (yyvsp[0].id));}
17172#line 17173 "parse.c"
17173 break;
17174
17175 case 704: /* keyword_variable: "'false'" */
17176#line 6153 "parse.y"
17177 {(yyval.id) = KWD2EID(false, (yyvsp[0].id));}
17178#line 17179 "parse.c"
17179 break;
17180
17181 case 705: /* keyword_variable: "'__FILE__'" */
17182#line 6154 "parse.y"
17183 {(yyval.id) = KWD2EID(_FILE__, (yyvsp[0].id));}
17184#line 17185 "parse.c"
17185 break;
17186
17187 case 706: /* keyword_variable: "'__LINE__'" */
17188#line 6155 "parse.y"
17189 {(yyval.id) = KWD2EID(_LINE__, (yyvsp[0].id));}
17190#line 17191 "parse.c"
17191 break;
17192
17193 case 707: /* keyword_variable: "'__ENCODING__'" */
17194#line 6156 "parse.y"
17195 {(yyval.id) = KWD2EID(_ENCODING__, (yyvsp[0].id));}
17196#line 17197 "parse.c"
17197 break;
17198
17199 case 708: /* var_ref: user_variable */
17200#line 6160 "parse.y"
17201 {
17202 if (!((yyval.node) = gettable(p, (yyvsp[0].id), &(yyloc)))) (yyval.node) = NEW_ERROR(&(yyloc));
17203 if (ifdef_ripper(id_is_var(p, (yyvsp[0].id)), false)) {
17204 /*% ripper: var_ref!($:1) %*/
17205 }
17206 else {
17207 /*% ripper: vcall!($:1) %*/
17208 }
17209 }
17210#line 17211 "parse.c"
17211 break;
17212
17213 case 709: /* var_ref: keyword_variable */
17214#line 6170 "parse.y"
17215 {
17216 if (!((yyval.node) = gettable(p, (yyvsp[0].id), &(yyloc)))) (yyval.node) = NEW_ERROR(&(yyloc));
17217 /*% ripper: var_ref!($:1) %*/
17218 }
17219#line 17220 "parse.c"
17220 break;
17221
17222 case 710: /* var_lhs: user_variable */
17223#line 6177 "parse.y"
17224 {
17225 /*% ripper: var_field!($:1) %*/
17226 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
17227 }
17228#line 17229 "parse.c"
17229 break;
17230
17231 case 711: /* var_lhs: keyword_variable */
17232#line 6177 "parse.y"
17233 {
17234 /*% ripper: var_field!($:1) %*/
17235 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
17236 }
17237#line 17238 "parse.c"
17238 break;
17239
17240 case 714: /* $@38: %empty */
17241#line 6188 "parse.y"
17242 {
17243 SET_LEX_STATE(EXPR_BEG);
17244 p->command_start = TRUE;
17245 }
17246#line 17247 "parse.c"
17247 break;
17248
17249 case 715: /* superclass: '<' $@38 expr_value term */
17250#line 6193 "parse.y"
17251 {
17252 (yyval.node) = (yyvsp[-1].node);
17253 /*% ripper: $:3 %*/
17254 }
17255#line 17256 "parse.c"
17256 break;
17257
17258 case 718: /* f_opt_paren_args: f_empty_arg */
17259#line 6202 "parse.y"
17260 {
17261 p->ctxt.in_argdef = 0;
17262 }
17263#line 17264 "parse.c"
17264 break;
17265
17266 case 719: /* f_empty_arg: %empty */
17267#line 6208 "parse.y"
17268 {
17269 (yyval.node_args) = new_empty_args_tail(p, &(yyloc));
17270 (yyval.node_args) = new_args(p, 0, 0, 0, 0, (yyval.node_args), &(yyloc));
17271 /*% ripper: params!(Qnil, Qnil, Qnil, Qnil, Qnil, Qnil, Qnil) %*/
17272 }
17273#line 17274 "parse.c"
17274 break;
17275
17276 case 720: /* f_paren_args: '(' f_args rparen */
17277#line 6216 "parse.y"
17278 {
17279 (yyval.node_args) = (yyvsp[-1].node_args);
17280 /*% ripper: paren!($:2) %*/
17281 SET_LEX_STATE(EXPR_BEG);
17282 p->command_start = TRUE;
17283 p->ctxt.in_argdef = 0;
17284 }
17285#line 17286 "parse.c"
17286 break;
17287
17288 case 722: /* @39: %empty */
17289#line 6226 "parse.y"
17290 {
17291 (yyval.ctxt) = p->ctxt;
17292 p->ctxt.in_kwarg = 1;
17293 p->ctxt.in_argdef = 1;
17294 SET_LEX_STATE(p->lex.state|EXPR_LABEL); /* force for args */
17295 }
17296#line 17297 "parse.c"
17297 break;
17298
17299 case 723: /* f_arglist: @39 f_args term */
17300#line 6233 "parse.y"
17301 {
17302 p->ctxt.in_kwarg = (yyvsp[-2].ctxt).in_kwarg;
17303 p->ctxt.in_argdef = 0;
17304 (yyval.node_args) = (yyvsp[-1].node_args);
17305 SET_LEX_STATE(EXPR_BEG);
17306 p->command_start = TRUE;
17307 /*% ripper: $:2 %*/
17308 }
17309#line 17310 "parse.c"
17310 break;
17311
17312 case 724: /* f_kw_arg_value: f_label arg_value */
17313#line 3005 "parse.y"
17314 {
17315 p->ctxt.in_argdef = 1;
17316 (yyval.node_kw_arg) = new_kw_arg(p, assignable(p, (yyvsp[-1].id), (yyvsp[0].node), &(yyloc)), &(yyloc));
17317 /*% ripper: [$:$, $:value] %*/
17318 }
17319#line 17320 "parse.c"
17320 break;
17321
17322 case 725: /* f_kw_arg_value: f_label */
17323#line 3011 "parse.y"
17324 {
17325 p->ctxt.in_argdef = 1;
17326 (yyval.node_kw_arg) = new_kw_arg(p, assignable(p, (yyvsp[0].id), NODE_SPECIAL_REQUIRED_KEYWORD, &(yyloc)), &(yyloc));
17327 /*% ripper: [$:$, 0] %*/
17328 }
17329#line 17330 "parse.c"
17330 break;
17331
17332 case 726: /* f_kwarg_arg_value: f_kw_arg_value */
17333#line 3020 "parse.y"
17334 {
17335 (yyval.node_kw_arg) = (yyvsp[0].node_kw_arg);
17336 /*% ripper: rb_ary_new3(1, $:1) %*/
17337 }
17338#line 17339 "parse.c"
17339 break;
17340
17341 case 727: /* f_kwarg_arg_value: f_kwarg_arg_value ',' f_kw_arg_value */
17342#line 3025 "parse.y"
17343 {
17344 (yyval.node_kw_arg) = kwd_append((yyvsp[-2].node_kw_arg), (yyvsp[0].node_kw_arg));
17345 /*% ripper: rb_ary_push($:1, $:3) %*/
17346 }
17347#line 17348 "parse.c"
17348 break;
17349
17350 case 728: /* args_tail_basic_arg_value: f_kwarg_arg_value ',' f_kwrest opt_f_block_arg */
17351#line 2928 "parse.y"
17352 {
17353 (yyval.node_args) = new_args_tail(p, (yyvsp[-3].node_kw_arg), (yyvsp[-1].id), (yyvsp[0].id), &(yylsp[-1]));
17354 /*% ripper: [$:1, $:3, $:4] %*/
17355 }
17356#line 17357 "parse.c"
17357 break;
17358
17359 case 729: /* args_tail_basic_arg_value: f_kwarg_arg_value opt_f_block_arg */
17360#line 2933 "parse.y"
17361 {
17362 (yyval.node_args) = new_args_tail(p, (yyvsp[-1].node_kw_arg), 0, (yyvsp[0].id), &(yylsp[-1]));
17363 /*% ripper: [$:1, Qnil, $:2] %*/
17364 }
17365#line 17366 "parse.c"
17366 break;
17367
17368 case 730: /* args_tail_basic_arg_value: f_any_kwrest opt_f_block_arg */
17369#line 2938 "parse.y"
17370 {
17371 (yyval.node_args) = new_args_tail(p, 0, (yyvsp[-1].id), (yyvsp[0].id), &(yylsp[-1]));
17372 /*% ripper: [Qnil, $:1, $:2] %*/
17373 }
17374#line 17375 "parse.c"
17375 break;
17376
17377 case 731: /* args_tail_basic_arg_value: f_block_arg */
17378#line 2943 "parse.y"
17379 {
17380 (yyval.node_args) = new_args_tail(p, 0, 0, (yyvsp[0].id), &(yylsp[0]));
17381 /*% ripper: [Qnil, Qnil, $:1] %*/
17382 }
17383#line 17384 "parse.c"
17384 break;
17385
17386 case 733: /* args_tail: args_forward */
17387#line 6245 "parse.y"
17388 {
17389 ID fwd = (yyvsp[0].id);
17390 if (lambda_beginning_p() ||
17391 (p->lex.lpar_beg >= 0 && p->lex.lpar_beg+1 == p->lex.paren_nest)) {
17392 yyerror0("unexpected ... in lambda argument");
17393 fwd = 0;
17394 }
17395 else {
17396 add_forwarding_args(p);
17397 }
17398 (yyval.node_args) = new_args_tail(p, 0, fwd, arg_FWD_BLOCK, &(yylsp[0]));
17399 (yyval.node_args)->nd_ainfo.forwarding = 1;
17400 /*% ripper: [Qnil, $:args_forward, Qnil] %*/
17401 }
17402#line 17403 "parse.c"
17403 break;
17404
17405 case 734: /* opt_args_tail_args_tail: ',' args_tail */
17406#line 3092 "parse.y"
17407 {
17408 (yyval.node_args) = (yyvsp[0].node_args);
17409 /*% ripper: $:tail %*/
17410 }
17411#line 17412 "parse.c"
17412 break;
17413
17414 case 735: /* opt_args_tail_args_tail: %empty */
17415#line 3097 "parse.y"
17416 {
17417 (yyval.node_args) = new_empty_args_tail(p, &(yyloc));
17418 /*% ripper: [Qnil, Qnil, Qnil] %*/
17419 }
17420#line 17421 "parse.c"
17421 break;
17422
17423 case 737: /* f_opt_arg_value: f_arg_asgn f_eq arg_value */
17424#line 2983 "parse.y"
17425 {
17426 p->ctxt.in_argdef = 1;
17427 (yyval.node_opt_arg) = NEW_OPT_ARG(assignable(p, (yyvsp[-2].id), (yyvsp[0].node), &(yyloc)), &(yyloc));
17428 /*% ripper: [$:$, $:3] %*/
17429 }
17430#line 17431 "parse.c"
17431 break;
17432
17433 case 738: /* f_opt_arg_arg_value: f_opt_arg_value */
17434#line 2992 "parse.y"
17435 {
17436 (yyval.node_opt_arg) = (yyvsp[0].node_opt_arg);
17437 /*% ripper: rb_ary_new3(1, $:1) %*/
17438 }
17439#line 17440 "parse.c"
17440 break;
17441
17442 case 739: /* f_opt_arg_arg_value: f_opt_arg_arg_value ',' f_opt_arg_value */
17443#line 2997 "parse.y"
17444 {
17445 (yyval.node_opt_arg) = opt_arg_append((yyvsp[-2].node_opt_arg), (yyvsp[0].node_opt_arg));
17446 /*% ripper: rb_ary_push($:1, $:3) %*/
17447 }
17448#line 17449 "parse.c"
17449 break;
17450
17451 case 740: /* args-list_arg_value_f_args-opt_tail: f_arg ',' f_opt_arg_arg_value ',' f_rest_arg f_args-opt_tail */
17452#line 6263 "parse.y"
17453 {
17454 (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));
17455 /*% ripper: params!($:pre, $:opt, $:rest, Qnil, *$:tail[0..2]) %*/
17456 }
17457#line 17458 "parse.c"
17458 break;
17459
17460 case 741: /* args-list_arg_value_f_args-opt_tail: f_arg ',' f_opt_arg_arg_value ',' f_rest_arg ',' f_arg f_args-opt_tail */
17461#line 6268 "parse.y"
17462 {
17463 (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));
17464 /*% ripper: params!($:pre, $:opt, $:rest, $:post, *$:tail[0..2]) %*/
17465 }
17466#line 17467 "parse.c"
17467 break;
17468
17469 case 742: /* args-list_arg_value_f_args-opt_tail: f_arg ',' f_opt_arg_arg_value f_args-opt_tail */
17470#line 6273 "parse.y"
17471 {
17472 (yyval.node_args) = new_args(p, (yyvsp[-3].node_args_aux), (yyvsp[-1].node_opt_arg), 0, 0, (yyvsp[0].node_args), &(yyloc));
17473 /*% ripper: params!($:pre, $:opt, Qnil, Qnil, *$:tail[0..2]) %*/
17474 }
17475#line 17476 "parse.c"
17476 break;
17477
17478 case 743: /* args-list_arg_value_f_args-opt_tail: f_arg ',' f_opt_arg_arg_value ',' f_arg f_args-opt_tail */
17479#line 6278 "parse.y"
17480 {
17481 (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));
17482 /*% ripper: params!($:pre, $:opt, Qnil, $:post, *$:tail[0..2]) %*/
17483 }
17484#line 17485 "parse.c"
17485 break;
17486
17487 case 744: /* args-list_arg_value_f_args-opt_tail: f_arg ',' f_rest_arg f_args-opt_tail */
17488#line 6283 "parse.y"
17489 {
17490 (yyval.node_args) = new_args(p, (yyvsp[-3].node_args_aux), 0, (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
17491 /*% ripper: params!($:pre, Qnil, $:rest, Qnil, *$:tail[0..2]) %*/
17492 }
17493#line 17494 "parse.c"
17494 break;
17495
17496 case 745: /* args-list_arg_value_f_args-opt_tail: f_arg ',' f_rest_arg ',' f_arg f_args-opt_tail */
17497#line 6288 "parse.y"
17498 {
17499 (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));
17500 /*% ripper: params!($:pre, Qnil, $:rest, $:post, *$:tail[0..2]) %*/
17501 }
17502#line 17503 "parse.c"
17503 break;
17504
17505 case 746: /* args-list_arg_value_f_args-opt_tail: f_opt_arg_arg_value ',' f_rest_arg f_args-opt_tail */
17506#line 6293 "parse.y"
17507 {
17508 (yyval.node_args) = new_args(p, 0, (yyvsp[-3].node_opt_arg), (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
17509 /*% ripper: params!(Qnil, $:opt, $:rest, Qnil, *$:tail[0..2]) %*/
17510 }
17511#line 17512 "parse.c"
17512 break;
17513
17514 case 747: /* args-list_arg_value_f_args-opt_tail: f_opt_arg_arg_value ',' f_rest_arg ',' f_arg f_args-opt_tail */
17515#line 6298 "parse.y"
17516 {
17517 (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));
17518 /*% ripper: params!(Qnil, $:opt, $:rest, $:post, *$:tail[0..2]) %*/
17519 }
17520#line 17521 "parse.c"
17521 break;
17522
17523 case 748: /* args-list_arg_value_f_args-opt_tail: f_opt_arg_arg_value f_args-opt_tail */
17524#line 6303 "parse.y"
17525 {
17526 (yyval.node_args) = new_args(p, 0, (yyvsp[-1].node_opt_arg), 0, 0, (yyvsp[0].node_args), &(yyloc));
17527 /*% ripper: params!(Qnil, $:opt, Qnil, Qnil, *$:tail[0..2]) %*/
17528 }
17529#line 17530 "parse.c"
17530 break;
17531
17532 case 749: /* args-list_arg_value_f_args-opt_tail: f_opt_arg_arg_value ',' f_arg f_args-opt_tail */
17533#line 6308 "parse.y"
17534 {
17535 (yyval.node_args) = new_args(p, 0, (yyvsp[-3].node_opt_arg), 0, (yyvsp[-1].node_args_aux), (yyvsp[0].node_args), &(yyloc));
17536 /*% ripper: params!(Qnil, $:opt, Qnil, $:post, *$:tail[0..2]) %*/
17537 }
17538#line 17539 "parse.c"
17539 break;
17540
17541 case 750: /* args-list_arg_value_f_args-opt_tail: f_rest_arg f_args-opt_tail */
17542#line 6313 "parse.y"
17543 {
17544 (yyval.node_args) = new_args(p, 0, 0, (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
17545 /*% ripper: params!(Qnil, Qnil, $:rest, Qnil, *$:tail[0..2]) %*/
17546 }
17547#line 17548 "parse.c"
17548 break;
17549
17550 case 751: /* args-list_arg_value_f_args-opt_tail: f_rest_arg ',' f_arg f_args-opt_tail */
17551#line 6318 "parse.y"
17552 {
17553 (yyval.node_args) = new_args(p, 0, 0, (yyvsp[-3].id), (yyvsp[-1].node_args_aux), (yyvsp[0].node_args), &(yyloc));
17554 /*% ripper: params!(Qnil, Qnil, $:rest, $:post, *$:tail[0..2]) %*/
17555 }
17556#line 17557 "parse.c"
17557 break;
17558
17559 case 753: /* f_args: f_arg f_args-opt_tail */
17560#line 6337 "parse.y"
17561 {
17562 (yyval.node_args) = new_args(p, (yyvsp[-1].node_args_aux), 0, 0, 0, (yyvsp[0].node_args), &(yyloc));
17563 /*% ripper: params!($:pre, Qnil, Qnil, Qnil, *$:tail[0..2]) %*/
17564 }
17565#line 17566 "parse.c"
17566 break;
17567
17568 case 754: /* tail-only-args_args_tail: args_tail */
17569#line 6326 "parse.y"
17570 {
17571 (yyval.node_args) = new_args(p, 0, 0, 0, 0, (yyvsp[0].node_args), &(yyloc));
17572 /*% ripper: params!(Qnil, Qnil, Qnil, Qnil, *$:tail[0..2]) %*/
17573 }
17574#line 17575 "parse.c"
17575 break;
17576
17577 case 757: /* args_forward: "(..." */
17578#line 6347 "parse.y"
17579 {
17580 (yyval.id) = idFWD_KWREST;
17581 /*% ripper: args_forward! %*/
17582 }
17583#line 17584 "parse.c"
17584 break;
17585
17586 case 758: /* f_bad_arg: "constant" */
17587#line 6354 "parse.y"
17588 {
17589 static const char mesg[] = "formal argument cannot be a constant";
17590 /*%%%*/
17591 yyerror1(&(yylsp[0]), mesg);
17592 /*% %*/
17593 (yyval.id) = 0;
17594 /*% ripper[error]: param_error!(ERR_MESG(), $:1) %*/
17595 }
17596#line 17597 "parse.c"
17597 break;
17598
17599 case 759: /* f_bad_arg: "instance variable" */
17600#line 6363 "parse.y"
17601 {
17602 static const char mesg[] = "formal argument cannot be an instance variable";
17603 /*%%%*/
17604 yyerror1(&(yylsp[0]), mesg);
17605 /*% %*/
17606 (yyval.id) = 0;
17607 /*% ripper[error]: param_error!(ERR_MESG(), $:1) %*/
17608 }
17609#line 17610 "parse.c"
17610 break;
17611
17612 case 760: /* f_bad_arg: "global variable" */
17613#line 6372 "parse.y"
17614 {
17615 static const char mesg[] = "formal argument cannot be a global variable";
17616 /*%%%*/
17617 yyerror1(&(yylsp[0]), mesg);
17618 /*% %*/
17619 (yyval.id) = 0;
17620 /*% ripper[error]: param_error!(ERR_MESG(), $:1) %*/
17621 }
17622#line 17623 "parse.c"
17623 break;
17624
17625 case 761: /* f_bad_arg: "class variable" */
17626#line 6381 "parse.y"
17627 {
17628 static const char mesg[] = "formal argument cannot be a class variable";
17629 /*%%%*/
17630 yyerror1(&(yylsp[0]), mesg);
17631 /*% %*/
17632 (yyval.id) = 0;
17633 /*% ripper[error]: param_error!(ERR_MESG(), $:1) %*/
17634 }
17635#line 17636 "parse.c"
17636 break;
17637
17638 case 763: /* f_norm_arg: "local variable or method" */
17639#line 6393 "parse.y"
17640 {
17641 VALUE e = formal_argument_error(p, (yyval.id) = (yyvsp[0].id));
17642 if (e) {
17643 /*% ripper[error]: param_error!(?e, $:1) %*/
17644 }
17645 p->max_numparam = ORDINAL_PARAM;
17646 }
17647#line 17648 "parse.c"
17648 break;
17649
17650 case 764: /* f_arg_asgn: f_norm_arg */
17651#line 6403 "parse.y"
17652 {
17653 arg_var(p, (yyvsp[0].id));
17654 (yyval.id) = (yyvsp[0].id);
17655 }
17656#line 17657 "parse.c"
17657 break;
17658
17659 case 765: /* f_arg_item: f_arg_asgn */
17660#line 6410 "parse.y"
17661 {
17662 (yyval.node_args_aux) = NEW_ARGS_AUX((yyvsp[0].id), 1, &NULL_LOC);
17663 /*% ripper: $:1 %*/
17664 }
17665#line 17666 "parse.c"
17666 break;
17667
17668 case 766: /* f_arg_item: "(" f_margs rparen */
17669#line 6415 "parse.y"
17670 {
17671 ID tid = internal_id(p);
17672 YYLTYPE loc;
17673 loc.beg_pos = (yylsp[-1]).beg_pos;
17674 loc.end_pos = (yylsp[-1]).beg_pos;
17675 arg_var(p, tid);
17676 if (dyna_in_block(p)) {
17677 (yyvsp[-1].node_masgn)->nd_value = NEW_DVAR(tid, &loc);
17678 }
17679 else {
17680 (yyvsp[-1].node_masgn)->nd_value = NEW_LVAR(tid, &loc);
17681 }
17682 (yyval.node_args_aux) = NEW_ARGS_AUX(tid, 1, &NULL_LOC);
17683 (yyval.node_args_aux)->nd_next = (NODE *)(yyvsp[-1].node_masgn);
17684 /*% ripper: mlhs_paren!($:2) %*/
17685 }
17686#line 17687 "parse.c"
17687 break;
17688
17689 case 768: /* f_arg: f_arg ',' f_arg_item */
17690#line 6436 "parse.y"
17691 {
17692 (yyval.node_args_aux) = (yyvsp[-2].node_args_aux);
17693 (yyval.node_args_aux)->nd_plen++;
17694 (yyval.node_args_aux)->nd_next = block_append(p, (yyval.node_args_aux)->nd_next, (yyvsp[0].node_args_aux)->nd_next);
17695 rb_discard_node(p, (NODE *)(yyvsp[0].node_args_aux));
17696 /*% ripper: rb_ary_push($:1, $:3) %*/
17697 }
17698#line 17699 "parse.c"
17699 break;
17700
17701 case 769: /* f_label: "label" */
17702#line 6447 "parse.y"
17703 {
17704 VALUE e = formal_argument_error(p, (yyval.id) = (yyvsp[0].id));
17705 if (e) {
17706 (yyval.id) = 0;
17707 /*% ripper[error]: param_error!(?e, $:1) %*/
17708 }
17709 /*
17710 * Workaround for Prism::ParseTest#test_filepath for
17711 * "unparser/corpus/literal/def.txt"
17712 *
17713 * See the discussion on https://github.com/ruby/ruby/pull/9923
17714 */
17715 arg_var(p, ifdef_ripper(0, (yyvsp[0].id)));
17716 /*% ripper: $:1 %*/
17717 p->max_numparam = ORDINAL_PARAM;
17718 p->ctxt.in_argdef = 0;
17719 }
17720#line 17721 "parse.c"
17721 break;
17722
17723 case 772: /* f_no_kwarg: p_kwnorest */
17724#line 6471 "parse.y"
17725 {
17726 /*% ripper: nokw_param!(Qnil) %*/
17727 }
17728#line 17729 "parse.c"
17729 break;
17730
17731 case 773: /* f_kwrest: kwrest_mark "local variable or method" */
17732#line 6477 "parse.y"
17733 {
17734 arg_var(p, shadowing_lvar(p, (yyvsp[0].id)));
17735 (yyval.id) = (yyvsp[0].id);
17736 /*% ripper: kwrest_param!($:2) %*/
17737 }
17738#line 17739 "parse.c"
17739 break;
17740
17741 case 774: /* f_kwrest: kwrest_mark */
17742#line 6483 "parse.y"
17743 {
17744 arg_var(p, idFWD_KWREST);
17745 (yyval.id) = idFWD_KWREST;
17746 /*% ripper: kwrest_param!(Qnil) %*/
17747 }
17748#line 17749 "parse.c"
17749 break;
17750
17751 case 777: /* f_rest_arg: restarg_mark "local variable or method" */
17752#line 6495 "parse.y"
17753 {
17754 arg_var(p, shadowing_lvar(p, (yyvsp[0].id)));
17755 (yyval.id) = (yyvsp[0].id);
17756 /*% ripper: rest_param!($:2) %*/
17757 }
17758#line 17759 "parse.c"
17759 break;
17760
17761 case 778: /* f_rest_arg: restarg_mark */
17762#line 6501 "parse.y"
17763 {
17764 arg_var(p, idFWD_REST);
17765 (yyval.id) = idFWD_REST;
17766 /*% ripper: rest_param!(Qnil) %*/
17767 }
17768#line 17769 "parse.c"
17769 break;
17770
17771 case 781: /* f_block_arg: blkarg_mark "local variable or method" */
17772#line 6513 "parse.y"
17773 {
17774 arg_var(p, shadowing_lvar(p, (yyvsp[0].id)));
17775 (yyval.id) = (yyvsp[0].id);
17776 /*% ripper: blockarg!($:2) %*/
17777 }
17778#line 17779 "parse.c"
17779 break;
17780
17781 case 782: /* f_block_arg: blkarg_mark "'nil'" */
17782#line 6519 "parse.y"
17783 {
17784 (yyval.id) = idNil;
17785 /*% ripper: blockarg!(ID2VAL(idNil)) %*/
17786 }
17787#line 17788 "parse.c"
17788 break;
17789
17790 case 783: /* f_block_arg: blkarg_mark */
17791#line 6524 "parse.y"
17792 {
17793 arg_var(p, idFWD_BLOCK);
17794 (yyval.id) = idFWD_BLOCK;
17795 /*% ripper: blockarg!(Qnil) %*/
17796 }
17797#line 17798 "parse.c"
17798 break;
17799
17800 case 784: /* opt_f_block_arg: ',' f_block_arg */
17801#line 6532 "parse.y"
17802 {
17803 (yyval.id) = (yyvsp[0].id);
17804 /*% ripper: $:2 %*/
17805 }
17806#line 17807 "parse.c"
17807 break;
17808
17809 case 786: /* value_expr_singleton_expr: singleton_expr */
17810#line 3146 "parse.y"
17811 {
17812 value_expr(p, (yyvsp[0].node));
17813 (yyval.node) = (yyvsp[0].node);
17814 }
17815#line 17816 "parse.c"
17816 break;
17817
17818 case 787: /* singleton: value_expr_singleton_expr */
17819#line 6541 "parse.y"
17820 {
17821 NODE *expr = last_expr_node((yyvsp[0].node));
17822 switch (nd_type(expr)) {
17823 case NODE_STR:
17824 case NODE_DSTR:
17825 case NODE_XSTR:
17826 case NODE_DXSTR:
17827 case NODE_REGX:
17828 case NODE_DREGX:
17829 case NODE_SYM:
17830 case NODE_LINE:
17831 case NODE_FILE:
17832 case NODE_ENCODING:
17833 case NODE_INTEGER:
17834 case NODE_FLOAT:
17835 case NODE_RATIONAL:
17836 case NODE_IMAGINARY:
17837 case NODE_DSYM:
17838 case NODE_LIST:
17839 case NODE_ZLIST:
17840 yyerror1(&expr->nd_loc, "can't define singleton method for literals");
17841 break;
17842 default:
17843 break;
17844 }
17845 (yyval.node) = (yyvsp[0].node);
17846 }
17847#line 17848 "parse.c"
17848 break;
17849
17850 case 789: /* $@40: %empty */
17851#line 6572 "parse.y"
17852 {
17853 SET_LEX_STATE(EXPR_BEG);
17854 p->ctxt.in_argdef = 0;
17855 }
17856#line 17857 "parse.c"
17857 break;
17858
17859 case 790: /* singleton_expr: '(' $@40 expr rparen */
17860#line 6577 "parse.y"
17861 {
17862 p->ctxt.in_argdef = 1;
17863 (yyval.node) = (yyvsp[-1].node);
17864 /*% ripper: paren!($:3) %*/
17865 }
17866#line 17867 "parse.c"
17867 break;
17868
17869 case 792: /* assoc_list: assocs trailer */
17870#line 6586 "parse.y"
17871 {
17872 (yyval.node) = (yyvsp[-1].node);
17873 /*% ripper: assoclist_from_args!($:1) %*/
17874 }
17875#line 17876 "parse.c"
17876 break;
17877
17878 case 794: /* assocs: assocs ',' assoc */
17879#line 6595 "parse.y"
17880 {
17881 NODE *assocs = (yyvsp[-2].node);
17882 NODE *tail = (yyvsp[0].node);
17883 if (!assocs) {
17884 assocs = tail;
17885 }
17886 else if (tail) {
17887 if (RNODE_LIST(assocs)->nd_head) {
17888 NODE *n = RNODE_LIST(tail)->nd_next;
17889 if (!RNODE_LIST(tail)->nd_head && nd_type_p(n, NODE_LIST) &&
17890 nd_type_p((n = RNODE_LIST(n)->nd_head), NODE_HASH)) {
17891 /* DSTAR */
17892 tail = RNODE_HASH(n)->nd_head;
17893 }
17894 }
17895 if (tail) {
17896 assocs = list_concat(assocs, tail);
17897 }
17898 }
17899 (yyval.node) = assocs;
17900 /*% ripper: rb_ary_push($:1, $:3) %*/
17901 }
17902#line 17903 "parse.c"
17903 break;
17904
17905 case 795: /* assoc: arg_value "=>" arg_value */
17906#line 6620 "parse.y"
17907 {
17908 (yyval.node) = list_append(p, NEW_LIST((yyvsp[-2].node), &(yyloc)), (yyvsp[0].node));
17909 /*% ripper: assoc_new!($:1, $:3) %*/
17910 }
17911#line 17912 "parse.c"
17912 break;
17913
17914 case 796: /* assoc: "label" arg_value */
17915#line 6625 "parse.y"
17916 {
17917 (yyval.node) = list_append(p, NEW_LIST(NEW_SYM(rb_id2str((yyvsp[-1].id)), &(yylsp[-1])), &(yyloc)), (yyvsp[0].node));
17918 /*% ripper: assoc_new!($:1, $:2) %*/
17919 }
17920#line 17921 "parse.c"
17921 break;
17922
17923 case 797: /* assoc: "label" */
17924#line 6630 "parse.y"
17925 {
17926 NODE *val = gettable(p, (yyvsp[0].id), &(yyloc));
17927 if (!val) val = NEW_ERROR(&(yyloc));
17928 (yyval.node) = list_append(p, NEW_LIST(NEW_SYM(rb_id2str((yyvsp[0].id)), &(yylsp[0])), &(yyloc)), val);
17929 /*% ripper: assoc_new!($:1, Qnil) %*/
17930 }
17931#line 17932 "parse.c"
17932 break;
17933
17934 case 798: /* assoc: "string literal" string_contents tLABEL_END arg_value */
17935#line 6637 "parse.y"
17936 {
17937 YYLTYPE loc = code_loc_gen(&(yylsp[-3]), &(yylsp[-1]));
17938 (yyval.node) = list_append(p, NEW_LIST(dsym_node(p, (yyvsp[-2].node), &loc), &loc), (yyvsp[0].node));
17939 /*% ripper: assoc_new!(dyna_symbol!($:2), $:4) %*/
17940 }
17941#line 17942 "parse.c"
17942 break;
17943
17944 case 799: /* assoc: "**arg" arg_value */
17945#line 6643 "parse.y"
17946 {
17947 (yyval.node) = list_append(p, NEW_LIST(0, &(yyloc)), (yyvsp[0].node));
17948 /*% ripper: assoc_splat!($:2) %*/
17949 }
17950#line 17951 "parse.c"
17951 break;
17952
17953 case 800: /* assoc: "**arg" */
17954#line 6648 "parse.y"
17955 {
17956 forwarding_arg_check(p, idFWD_KWREST, idFWD_ALL, "keyword rest");
17957 (yyval.node) = list_append(p, NEW_LIST(0, &(yyloc)),
17958 NEW_LVAR(idFWD_KWREST, &(yyloc)));
17959 /*% ripper: assoc_splat!(Qnil) %*/
17960 }
17961#line 17962 "parse.c"
17962 break;
17963
17964 case 819: /* term: ';' */
17965#line 6695 "parse.y"
17966 {
17967 yyerrok;
17968 token_flush(p);
17969 if (p->ctxt.in_defined) {
17970 p->ctxt.has_trailing_semicolon = 1;
17971 }
17972 }
17973#line 17974 "parse.c"
17974 break;
17975
17976 case 820: /* term: '\n' */
17977#line 6703 "parse.y"
17978 {
17979 (yyloc).end_pos = (yyloc).beg_pos;
17980 token_flush(p);
17981 }
17982#line 17983 "parse.c"
17983 break;
17984
17985 case 822: /* terms: terms ';' */
17986#line 6710 "parse.y"
17987 {yyerrok;}
17988#line 17989 "parse.c"
17989 break;
17990
17991 case 823: /* none: %empty */
17992#line 6714 "parse.y"
17993 {
17994 (yyval.node) = 0;
17995 /*% ripper: Qnil %*/
17996 }
17997#line 17998 "parse.c"
17998 break;
17999
18000
18001#line 18002 "parse.c"
18002
18003 default: break;
18004 }
18005 /* User semantic actions sometimes alter yychar, and that requires
18006 that yytoken be updated with the new translation. We take the
18007 approach of translating immediately before every use of yytoken.
18008 One alternative is translating here after every semantic action,
18009 but that translation would be missed if the semantic action invokes
18010 YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
18011 if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
18012 incorrect destructor might then be invoked immediately. In the
18013 case of YYERROR or YYBACKUP, subsequent parser actions might lead
18014 to an incorrect destructor call or verbose syntax error message
18015 before the lookahead is translated. */
18016 YY_SYMBOL_PRINT ("-> $$ =", YY_CAST (yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc, p);
18017
18018 YYPOPSTACK (yylen);
18019 /* %after-reduce function. */
18020#line 2667 "parse.y"
18021 {after_reduce(yylen, p);}
18022#line 18023 "parse.c"
18023
18024 yylen = 0;
18025
18026 *++yyvsp = yyval;
18027 *++yylsp = yyloc;
18028
18029 /* Now 'shift' the result of the reduction. Determine what state
18030 that goes to, based on the state we popped back to and the rule
18031 number reduced by. */
18032 {
18033 const int yylhs = yyr1[yyn] - YYNTOKENS;
18034 const int yyi = yypgoto[yylhs] + *yyssp;
18035 yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp
18036 ? yytable[yyi]
18037 : yydefgoto[yylhs]);
18038 }
18039
18040 goto yynewstate;
18041
18042
18043/*--------------------------------------.
18044| yyerrlab -- here on detecting error. |
18045`--------------------------------------*/
18046yyerrlab:
18047 /* Make sure we have latest lookahead translation. See comments at
18048 user semantic actions for why this is necessary. */
18049 yytoken = yychar == YYEMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE (yychar);
18050 /* If not already recovering from an error, report this error. */
18051 if (!yyerrstatus)
18052 {
18053 ++yynerrs;
18054 {
18055 yypcontext_t yyctx
18056 = {yyssp, yytoken, &yylloc};
18057 char const *yymsgp = YY_("syntax error");
18058 int yysyntax_error_status;
18059 yysyntax_error_status = yysyntax_error (&yymsg_alloc, &yymsg, &yyctx, p);
18060 if (yysyntax_error_status == 0)
18061 yymsgp = yymsg;
18062 else if (yysyntax_error_status == -1)
18063 {
18064 if (yymsg != yymsgbuf)
18065 YYSTACK_FREE (yymsg);
18066 yymsg = YY_CAST (char *,
18067 YYSTACK_ALLOC (YY_CAST (YYSIZE_T, yymsg_alloc)));
18068 if (yymsg)
18069 {
18070 yysyntax_error_status
18071 = yysyntax_error (&yymsg_alloc, &yymsg, &yyctx, p);
18072 yymsgp = yymsg;
18073 }
18074 else
18075 {
18076 yymsg = yymsgbuf;
18077 yymsg_alloc = sizeof yymsgbuf;
18078 yysyntax_error_status = YYENOMEM;
18079 }
18080 }
18081 yyerror (&yylloc, p, yymsgp);
18082 if (yysyntax_error_status == YYENOMEM)
18083 YYNOMEM;
18084 }
18085 }
18086
18087 yyerror_range[1] = yylloc;
18088 if (yyerrstatus == 3)
18089 {
18090 /* If just tried and failed to reuse lookahead token after an
18091 error, discard it. */
18092
18093 if (yychar <= END_OF_INPUT)
18094 {
18095 /* Return failure if at end of input. */
18096 if (yychar == END_OF_INPUT)
18097 YYABORT;
18098 }
18099 else
18100 {
18101 yydestruct ("Error: discarding",
18102 yytoken, &yylval, &yylloc, p);
18103 yychar = YYEMPTY;
18104 }
18105 }
18106
18107 /* Else will try to reuse lookahead token after shifting the error
18108 token. */
18109 goto yyerrlab1;
18110
18111
18112/*---------------------------------------------------.
18113| yyerrorlab -- error raised explicitly by YYERROR. |
18114`---------------------------------------------------*/
18115yyerrorlab:
18116 /* Pacify compilers when the user code never invokes YYERROR and the
18117 label yyerrorlab therefore never appears in user code. */
18118 if (0)
18119 YYERROR;
18120 ++yynerrs;
18121
18122 /* Do not reclaim the symbols of the rule whose action triggered
18123 this YYERROR. */
18124 YYPOPSTACK (yylen);
18125 /* %after-pop-stack function. */
18126#line 2669 "parse.y"
18127 {after_pop_stack(yylen, p);}
18128#line 18129 "parse.c"
18129
18130 yylen = 0;
18131 YY_STACK_PRINT (yyss, yyssp, p);
18132 yystate = *yyssp;
18133 goto yyerrlab1;
18134
18135
18136/*-------------------------------------------------------------.
18137| yyerrlab1 -- common code for both syntax error and YYERROR. |
18138`-------------------------------------------------------------*/
18139yyerrlab1:
18140 yyerrstatus = 3; /* Each real token shifted decrements this. */
18141
18142 /* Pop stack until we find a state that shifts the error token. */
18143 for (;;)
18144 {
18145 yyn = yypact[yystate];
18146 if (!yypact_value_is_default (yyn))
18147 {
18148 yyn += YYSYMBOL_YYerror;
18149 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror)
18150 {
18151 yyn = yytable[yyn];
18152 if (0 < yyn)
18153 break;
18154 }
18155 }
18156
18157 /* Pop the current state because it cannot handle the error token. */
18158 if (yyssp == yyss)
18159 YYABORT;
18160
18161 yyerror_range[1] = *yylsp;
18162 yydestruct ("Error: popping",
18163 YY_ACCESSING_SYMBOL (yystate), yyvsp, yylsp, p);
18164 YYPOPSTACK (1);
18165 /* %after-pop-stack function. */
18166#line 2669 "parse.y"
18167 {after_pop_stack(1, p);}
18168#line 18169 "parse.c"
18169
18170 yystate = *yyssp;
18171 YY_STACK_PRINT (yyss, yyssp, p);
18172 }
18173
18174 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
18175 *++yyvsp = yylval;
18176 YY_IGNORE_MAYBE_UNINITIALIZED_END
18177
18178 yyerror_range[2] = yylloc;
18179 ++yylsp;
18180 YYLLOC_DEFAULT (*yylsp, yyerror_range, 2);
18181
18182 /* Shift the error token. */
18183 YY_SYMBOL_PRINT ("Shifting", YY_ACCESSING_SYMBOL (yyn), yyvsp, yylsp, p);
18184 /* %after-shift-error-token code. */
18185#line 2668 "parse.y"
18186 {after_shift_error_token(p);}
18187#line 18188 "parse.c"
18188
18189
18190 yystate = yyn;
18191 goto yynewstate;
18192
18193
18194/*-------------------------------------.
18195| yyacceptlab -- YYACCEPT comes here. |
18196`-------------------------------------*/
18197yyacceptlab:
18198 yyresult = 0;
18199 goto yyreturnlab;
18200
18201
18202/*-----------------------------------.
18203| yyabortlab -- YYABORT comes here. |
18204`-----------------------------------*/
18205yyabortlab:
18206 yyresult = 1;
18207 goto yyreturnlab;
18208
18209
18210/*-----------------------------------------------------------.
18211| yyexhaustedlab -- YYNOMEM (memory exhaustion) comes here. |
18212`-----------------------------------------------------------*/
18213yyexhaustedlab:
18214 yyerror (&yylloc, p, YY_("memory exhausted"));
18215 yyresult = 2;
18216 goto yyreturnlab;
18217
18218
18219/*----------------------------------------------------------.
18220| yyreturnlab -- parsing is finished, clean up and return. |
18221`----------------------------------------------------------*/
18222yyreturnlab:
18223 if (yychar != YYEMPTY)
18224 {
18225 /* Make sure we have latest lookahead translation. See comments at
18226 user semantic actions for why this is necessary. */
18227 yytoken = YYTRANSLATE (yychar);
18228 yydestruct ("Cleanup: discarding lookahead",
18229 yytoken, &yylval, &yylloc, p);
18230 }
18231 /* Do not reclaim the symbols of the rule whose action triggered
18232 this YYABORT or YYACCEPT. */
18233 YYPOPSTACK (yylen);
18234 YY_STACK_PRINT (yyss, yyssp, p);
18235 while (yyssp != yyss)
18236 {
18237 yydestruct ("Cleanup: popping",
18238 YY_ACCESSING_SYMBOL (+*yyssp), yyvsp, yylsp, p);
18239 YYPOPSTACK (1);
18240 }
18241#ifndef yyoverflow
18242 if (yyss != yyssa)
18243 YYSTACK_FREE (yyss);
18244#endif
18245 if (yymsg != yymsgbuf)
18246 YYSTACK_FREE (yymsg);
18247 return yyresult;
18248}
18249
18250#line 6719 "parse.y"
18251
18252# undef p
18253# undef yylex
18254# undef yylval
18255# define yylval (*p->lval)
18256
18257static int regx_options(struct parser_params*);
18258static int tokadd_string(struct parser_params*,int,int,int,long*,rb_encoding**,rb_encoding**);
18259static void tokaddmbc(struct parser_params *p, int c, rb_encoding *enc);
18260static enum yytokentype parse_string(struct parser_params*,rb_strterm_literal_t*);
18261static enum yytokentype here_document(struct parser_params*,rb_strterm_heredoc_t*);
18262
18263#define set_parser_s_value(x) (ifdef_ripper(p->s_value = (x), (void)0))
18264
18265# define set_yylval_node(x) { \
18266 YYLTYPE _cur_loc; \
18267 rb_parser_set_location(p, &_cur_loc); \
18268 yylval.node = (x); \
18269 set_parser_s_value(STR_NEW(p->lex.ptok, p->lex.pcur-p->lex.ptok)); \
18270}
18271# define set_yylval_str(x) \
18272do { \
18273 set_yylval_node(NEW_STR(x, &_cur_loc)); \
18274 set_parser_s_value(rb_str_new_mutable_parser_string(x)); \
18275} while(0)
18276# define set_yylval_num(x) { \
18277 yylval.num = (x); \
18278 set_parser_s_value(x); \
18279}
18280# define set_yylval_id(x) (yylval.id = (x))
18281# define set_yylval_name(x) { \
18282 (yylval.id = (x)); \
18283 set_parser_s_value(ID2SYM(x)); \
18284}
18285# define yylval_id() (yylval.id)
18286
18287#define set_yylval_noname() set_yylval_id(keyword_nil)
18288#define has_delayed_token(p) (p->delayed.token != NULL)
18289
18290#ifndef RIPPER
18291#define literal_flush(p, ptr) ((p)->lex.ptok = (ptr))
18292#define dispatch_scan_event(p, t) parser_dispatch_scan_event(p, t, __LINE__)
18293
18294static bool
18295parser_has_token(struct parser_params *p)
18296{
18297 const char *const pcur = p->lex.pcur;
18298 const char *const ptok = p->lex.ptok;
18299 if (p->keep_tokens && (pcur < ptok)) {
18300 rb_bug("lex.pcur < lex.ptok. (line: %d) %"PRIdPTRDIFF"|%"PRIdPTRDIFF"|%"PRIdPTRDIFF"",
18301 p->ruby_sourceline, ptok - p->lex.pbeg, pcur - ptok, p->lex.pend - pcur);
18302 }
18303 return pcur > ptok;
18304}
18305
18306static const char *
18307escaped_char(int c)
18308{
18309 switch (c) {
18310 case '"': return "\\\"";
18311 case '\\': return "\\\\";
18312 case '\0': return "\\0";
18313 case '\n': return "\\n";
18314 case '\r': return "\\r";
18315 case '\t': return "\\t";
18316 case '\f': return "\\f";
18317 case '\013': return "\\v";
18318 case '\010': return "\\b";
18319 case '\007': return "\\a";
18320 case '\033': return "\\e";
18321 case '\x7f': return "\\c?";
18322 }
18323 return NULL;
18324}
18325
18326static rb_parser_string_t *
18327rb_parser_str_escape(struct parser_params *p, rb_parser_string_t *str)
18328{
18329 rb_encoding *enc = p->enc;
18330 const char *ptr = str->ptr;
18331 const char *pend = ptr + str->len;
18332 const char *prev = ptr;
18333 char charbuf[5] = {'\\', 'x', 0, 0, 0};
18334 rb_parser_string_t * result = rb_parser_string_new(p, 0, 0);
18335
18336 while (ptr < pend) {
18337 unsigned int c;
18338 const char *cc;
18339 int n = rb_enc_precise_mbclen(ptr, pend, enc);
18340 if (!MBCLEN_CHARFOUND_P(n)) {
18341 if (ptr > prev) parser_str_cat(result, prev, ptr - prev);
18342 n = rb_enc_mbminlen(enc);
18343 if (pend < ptr + n)
18344 n = (int)(pend - ptr);
18345 while (n--) {
18346 c = *ptr & 0xf0 >> 4;
18347 charbuf[2] = (c < 10) ? '0' + c : 'A' + c - 10;
18348 c = *ptr & 0x0f;
18349 charbuf[3] = (c < 10) ? '0' + c : 'A' + c - 10;
18350 parser_str_cat(result, charbuf, 4);
18351 prev = ++ptr;
18352 }
18353 continue;
18354 }
18355 n = MBCLEN_CHARFOUND_LEN(n);
18356 c = rb_enc_mbc_to_codepoint(ptr, pend, enc);
18357 ptr += n;
18358 cc = escaped_char(c);
18359 if (cc) {
18360 if (ptr - n > prev) parser_str_cat(result, prev, ptr - n - prev);
18361 parser_str_cat_cstr(result, cc);
18362 prev = ptr;
18363 }
18364 else if (rb_enc_isascii(c, enc) && ISPRINT(c)) {
18365 }
18366 else {
18367 if (ptr - n > prev) {
18368 parser_str_cat(result, prev, ptr - n - prev);
18369 prev = ptr - n;
18370 }
18371 parser_str_cat(result, prev, ptr - prev);
18372 prev = ptr;
18373 }
18374 }
18375 if (ptr > prev) parser_str_cat(result, prev, ptr - prev);
18376
18377 return result;
18378}
18379
18380static void
18381parser_append_tokens(struct parser_params *p, rb_parser_string_t *str, enum yytokentype t, int line)
18382{
18384 token->id = p->token_id;
18385 token->type_name = parser_token2char(p, t);
18386 token->str = str;
18387 token->loc.beg_pos = p->yylloc->beg_pos;
18388 token->loc.end_pos = p->yylloc->end_pos;
18389 rb_parser_ary_push_ast_token(p, p->tokens, token);
18390 p->token_id++;
18391
18392 if (p->debug) {
18393 rb_parser_string_t *str_escaped = rb_parser_str_escape(p, str);
18394 rb_parser_printf(p, "Append tokens (line: %d) [%d, :%s, \"%s\", [%d, %d, %d, %d]]\n",
18395 line, token->id, token->type_name, str_escaped->ptr,
18396 token->loc.beg_pos.lineno, token->loc.beg_pos.column,
18397 token->loc.end_pos.lineno, token->loc.end_pos.column);
18398 rb_parser_string_free(p, str_escaped);
18399 }
18400}
18401
18402static void
18403parser_dispatch_scan_event(struct parser_params *p, enum yytokentype t, int line)
18404{
18405 debug_token_line(p, "parser_dispatch_scan_event", line);
18406
18407 if (!parser_has_token(p)) return;
18408
18409 RUBY_SET_YYLLOC(*p->yylloc);
18410
18411 if (p->keep_tokens) {
18412 rb_parser_string_t *str = rb_parser_encoding_string_new(p, p->lex.ptok, p->lex.pcur - p->lex.ptok, p->enc);
18413 parser_append_tokens(p, str, t, line);
18414 }
18415
18416 token_flush(p);
18417}
18418
18419#define dispatch_delayed_token(p, t) parser_dispatch_delayed_token(p, t, __LINE__)
18420static void
18421parser_dispatch_delayed_token(struct parser_params *p, enum yytokentype t, int line)
18422{
18423 debug_token_line(p, "parser_dispatch_delayed_token", line);
18424
18425 if (!has_delayed_token(p)) return;
18426
18427 RUBY_SET_YYLLOC_OF_DELAYED_TOKEN(*p->yylloc);
18428
18429 if (p->keep_tokens) {
18430 /* p->delayed.token is freed by rb_parser_tokens_free */
18431 parser_append_tokens(p, p->delayed.token, t, line);
18432 }
18433 else {
18434 rb_parser_string_free(p, p->delayed.token);
18435 }
18436
18437 p->delayed.token = NULL;
18438}
18439#else
18440#define literal_flush(p, ptr) ((void)(ptr))
18441
18442static int
18443ripper_has_scan_event(struct parser_params *p)
18444{
18445 if (p->lex.pcur < p->lex.ptok) rb_raise(rb_eRuntimeError, "lex.pcur < lex.ptok");
18446 return p->lex.pcur > p->lex.ptok;
18447}
18448
18449static VALUE
18450ripper_scan_event_val(struct parser_params *p, enum yytokentype t)
18451{
18452 VALUE str = STR_NEW(p->lex.ptok, p->lex.pcur - p->lex.ptok);
18453 VALUE rval = ripper_dispatch1(p, ripper_token2eventid(t), str);
18454 RUBY_SET_YYLLOC(*p->yylloc);
18455 token_flush(p);
18456 return rval;
18457}
18458
18459static void
18460ripper_dispatch_scan_event(struct parser_params *p, enum yytokentype t)
18461{
18462 if (!ripper_has_scan_event(p)) return;
18463
18464 set_parser_s_value(ripper_scan_event_val(p, t));
18465}
18466#define dispatch_scan_event(p, t) ripper_dispatch_scan_event(p, t)
18467
18468static void
18469ripper_dispatch_delayed_token(struct parser_params *p, enum yytokentype t)
18470{
18471 /* save and adjust the location to delayed token for callbacks */
18472 int saved_line = p->ruby_sourceline;
18473 const char *saved_tokp = p->lex.ptok;
18474 VALUE s_value, str;
18475
18476 if (!has_delayed_token(p)) return;
18477 p->ruby_sourceline = p->delayed.beg_line;
18478 p->lex.ptok = p->lex.pbeg + p->delayed.beg_col;
18479 str = rb_str_new_mutable_parser_string(p->delayed.token);
18480 rb_parser_string_free(p, p->delayed.token);
18481 s_value = ripper_dispatch1(p, ripper_token2eventid(t), str);
18482 set_parser_s_value(s_value);
18483 p->delayed.token = NULL;
18484 p->ruby_sourceline = saved_line;
18485 p->lex.ptok = saved_tokp;
18486}
18487#define dispatch_delayed_token(p, t) ripper_dispatch_delayed_token(p, t)
18488#endif /* RIPPER */
18489
18490static inline int
18491is_identchar(struct parser_params *p, const char *ptr, const char *MAYBE_UNUSED(ptr_end), rb_encoding *enc)
18492{
18493 return rb_enc_isalnum((unsigned char)*ptr, enc) || *ptr == '_' || !ISASCII(*ptr);
18494}
18495
18496static inline bool
18497peek_word_at(struct parser_params *p, const char *str, size_t len, int at)
18498{
18499 const char *ptr = p->lex.pcur + at;
18500 if (lex_eol_ptr_n_p(p, ptr, len-1)) return false;
18501 if (memcmp(ptr, str, len)) return false;
18502 if (lex_eol_ptr_n_p(p, ptr, len)) return true;
18503 return !is_identchar(p, ptr+len, p->lex.pend, p->enc);
18504}
18505
18506static inline int
18507parser_is_identchar(struct parser_params *p)
18508{
18509 return !(p)->eofp && is_identchar(p, p->lex.pcur-1, p->lex.pend, p->enc);
18510}
18511
18512static inline int
18513parser_isascii(struct parser_params *p)
18514{
18515 return ISASCII(*(p->lex.pcur-1));
18516}
18517
18518static void
18519token_info_setup(token_info *ptinfo, const char *ptr, const rb_code_location_t *loc)
18520{
18521 int column = 1, nonspc = 0, i;
18522 for (i = 0; i < loc->beg_pos.column; i++, ptr++) {
18523 if (*ptr == '\t') {
18524 column = (((column - 1) / TAB_WIDTH) + 1) * TAB_WIDTH;
18525 }
18526 column++;
18527 if (*ptr != ' ' && *ptr != '\t') {
18528 nonspc = 1;
18529 }
18530 }
18531
18532 ptinfo->beg = loc->beg_pos;
18533 ptinfo->indent = column;
18534 ptinfo->nonspc = nonspc;
18535}
18536
18537static void
18538token_info_push(struct parser_params *p, const char *token, const rb_code_location_t *loc)
18539{
18540 token_info *ptinfo;
18541
18542 if (!p->token_info_enabled) return;
18543 ptinfo = ALLOC(token_info);
18544 ptinfo->token = token;
18545 ptinfo->next = p->token_info;
18546 token_info_setup(ptinfo, p->lex.pbeg, loc);
18547
18548 p->token_info = ptinfo;
18549}
18550
18551static void
18552token_info_pop(struct parser_params *p, const char *token, const rb_code_location_t *loc)
18553{
18554 token_info *ptinfo_beg = p->token_info;
18555
18556 if (!ptinfo_beg) return;
18557
18558 /* indentation check of matched keywords (begin..end, if..end, etc.) */
18559 token_info_warn(p, token, ptinfo_beg, 1, loc);
18560
18561 p->token_info = ptinfo_beg->next;
18562 ruby_sized_xfree(ptinfo_beg, sizeof(*ptinfo_beg));
18563}
18564
18565static void
18566token_info_drop(struct parser_params *p, const char *token, rb_code_position_t beg_pos)
18567{
18568 token_info *ptinfo_beg = p->token_info;
18569
18570 if (!ptinfo_beg) return;
18571 p->token_info = ptinfo_beg->next;
18572
18573 if (ptinfo_beg->beg.lineno != beg_pos.lineno ||
18574 ptinfo_beg->beg.column != beg_pos.column ||
18575 strcmp(ptinfo_beg->token, token)) {
18576 compile_error(p, "token position mismatch: %d:%d:%s expected but %d:%d:%s",
18577 beg_pos.lineno, beg_pos.column, token,
18578 ptinfo_beg->beg.lineno, ptinfo_beg->beg.column,
18579 ptinfo_beg->token);
18580 }
18581
18582 ruby_sized_xfree(ptinfo_beg, sizeof(*ptinfo_beg));
18583}
18584
18585static void
18586token_info_warn(struct parser_params *p, const char *token, token_info *ptinfo_beg, int same, const rb_code_location_t *loc)
18587{
18588 token_info ptinfo_end_body, *ptinfo_end = &ptinfo_end_body;
18589 if (!p->token_info_enabled) return;
18590 if (!ptinfo_beg) return;
18591 token_info_setup(ptinfo_end, p->lex.pbeg, loc);
18592 if (ptinfo_beg->beg.lineno == ptinfo_end->beg.lineno) return; /* ignore one-line block */
18593 if (ptinfo_beg->nonspc || ptinfo_end->nonspc) return; /* ignore keyword in the middle of a line */
18594 if (ptinfo_beg->indent == ptinfo_end->indent) return; /* the indents are matched */
18595 if (!same && ptinfo_beg->indent < ptinfo_end->indent) return;
18596 rb_warn3L(ptinfo_end->beg.lineno,
18597 "mismatched indentations at '%s' with '%s' at %d",
18598 WARN_S(token), WARN_S(ptinfo_beg->token), WARN_I(ptinfo_beg->beg.lineno));
18599}
18600
18601static int
18602parser_precise_mbclen(struct parser_params *p, const char *ptr)
18603{
18604 int len = rb_enc_precise_mbclen(ptr, p->lex.pend, p->enc);
18605 if (!MBCLEN_CHARFOUND_P(len)) {
18606 compile_error(p, "invalid multibyte char (%s)", rb_enc_name(p->enc));
18607 return -1;
18608 }
18609 return len;
18610}
18611
18612#ifndef RIPPER
18613static inline void
18614parser_show_error_line(struct parser_params *p, const YYLTYPE *yylloc)
18615{
18616 rb_parser_string_t *str;
18617 int lineno = p->ruby_sourceline;
18618 if (!yylloc) {
18619 return;
18620 }
18621 else if (yylloc->beg_pos.lineno == lineno) {
18622 str = p->lex.lastline;
18623 }
18624 else {
18625 return;
18626 }
18627 ruby_show_error_line(p, p->error_buffer, yylloc, lineno, str);
18628}
18629
18630static int
18631parser_yyerror(struct parser_params *p, const rb_code_location_t *yylloc, const char *msg)
18632{
18633#if 0
18634 YYLTYPE current;
18635
18636 if (!yylloc) {
18637 yylloc = RUBY_SET_YYLLOC(current);
18638 }
18639 else if ((p->ruby_sourceline != yylloc->beg_pos.lineno &&
18640 p->ruby_sourceline != yylloc->end_pos.lineno)) {
18641 yylloc = 0;
18642 }
18643#endif
18644 parser_compile_error(p, yylloc, "%s", msg);
18645 parser_show_error_line(p, yylloc);
18646 return 0;
18647}
18648
18649static int
18650parser_yyerror0(struct parser_params *p, const char *msg)
18651{
18652 YYLTYPE current;
18653 return parser_yyerror(p, RUBY_SET_YYLLOC(current), msg);
18654}
18655
18656void
18657ruby_show_error_line(struct parser_params *p, VALUE errbuf, const YYLTYPE *yylloc, int lineno, rb_parser_string_t *str)
18658{
18659 VALUE mesg;
18660 const int max_line_margin = 30;
18661 const char *ptr, *ptr_end, *pt, *pb;
18662 const char *pre = "", *post = "", *pend;
18663 const char *code = "", *caret = "";
18664 const char *lim;
18665 const char *const pbeg = PARSER_STRING_PTR(str);
18666 char *buf;
18667 long len;
18668 int i;
18669
18670 if (!yylloc) return;
18671 pend = rb_parser_string_end(str);
18672 if (pend > pbeg && pend[-1] == '\n') {
18673 if (--pend > pbeg && pend[-1] == '\r') --pend;
18674 }
18675
18676 pt = pend;
18677 if (lineno == yylloc->end_pos.lineno &&
18678 (pend - pbeg) > yylloc->end_pos.column) {
18679 pt = pbeg + yylloc->end_pos.column;
18680 }
18681
18682 ptr = ptr_end = pt;
18683 lim = ptr - pbeg > max_line_margin ? ptr - max_line_margin : pbeg;
18684 while ((lim < ptr) && (*(ptr-1) != '\n')) ptr--;
18685
18686 lim = pend - ptr_end > max_line_margin ? ptr_end + max_line_margin : pend;
18687 while ((ptr_end < lim) && (*ptr_end != '\n') && (*ptr_end != '\r')) ptr_end++;
18688
18689 len = ptr_end - ptr;
18690 if (len > 4) {
18691 if (ptr > pbeg) {
18692 ptr = rb_enc_prev_char(pbeg, ptr, pt, rb_parser_str_get_encoding(str));
18693 if (ptr > pbeg) pre = "...";
18694 }
18695 if (ptr_end < pend) {
18696 ptr_end = rb_enc_prev_char(pt, ptr_end, pend, rb_parser_str_get_encoding(str));
18697 if (ptr_end < pend) post = "...";
18698 }
18699 }
18700 pb = pbeg;
18701 if (lineno == yylloc->beg_pos.lineno) {
18702 pb += yylloc->beg_pos.column;
18703 if (pb > pt) pb = pt;
18704 }
18705 if (pb < ptr) pb = ptr;
18706 if (len <= 4 && yylloc->beg_pos.lineno == yylloc->end_pos.lineno) {
18707 return;
18708 }
18709 if (RTEST(errbuf)) {
18710 mesg = rb_attr_get(errbuf, idMesg);
18711 if (char_at_end(p, mesg, '\n') != '\n')
18712 rb_str_cat_cstr(mesg, "\n");
18713 }
18714 else {
18715 mesg = rb_enc_str_new(0, 0, rb_parser_str_get_encoding(str));
18716 }
18717 if (!errbuf && rb_stderr_tty_p()) {
18718#define CSI_BEGIN "\033["
18719#define CSI_SGR "m"
18720 rb_str_catf(mesg,
18721 CSI_BEGIN""CSI_SGR"%s" /* pre */
18722 CSI_BEGIN"1"CSI_SGR"%.*s"
18723 CSI_BEGIN"1;4"CSI_SGR"%.*s"
18724 CSI_BEGIN";1"CSI_SGR"%.*s"
18725 CSI_BEGIN""CSI_SGR"%s" /* post */
18726 "\n",
18727 pre,
18728 (int)(pb - ptr), ptr,
18729 (int)(pt - pb), pb,
18730 (int)(ptr_end - pt), pt,
18731 post);
18732 }
18733 else {
18734 char *p2;
18735
18736 len = ptr_end - ptr;
18737 lim = pt < pend ? pt : pend;
18738 i = (int)(lim - ptr);
18739 buf = ALLOCA_N(char, i+2);
18740 code = ptr;
18741 caret = p2 = buf;
18742 if (ptr <= pb) {
18743 while (ptr < pb) {
18744 *p2++ = *ptr++ == '\t' ? '\t' : ' ';
18745 }
18746 *p2++ = '^';
18747 ptr++;
18748 }
18749 if (lim > ptr) {
18750 memset(p2, '~', (lim - ptr));
18751 p2 += (lim - ptr);
18752 }
18753 *p2 = '\0';
18754 rb_str_catf(mesg, "%s%.*s%s\n""%s%s\n",
18755 pre, (int)len, code, post,
18756 pre, caret);
18757 }
18758 if (!errbuf) rb_write_error_str(mesg);
18759}
18760#else
18761
18762static int
18763parser_yyerror(struct parser_params *p, const YYLTYPE *yylloc, const char *msg)
18764{
18765 const char *pcur = 0, *ptok = 0;
18766 if (p->ruby_sourceline == yylloc->beg_pos.lineno &&
18767 p->ruby_sourceline == yylloc->end_pos.lineno) {
18768 pcur = p->lex.pcur;
18769 ptok = p->lex.ptok;
18770 p->lex.ptok = p->lex.pbeg + yylloc->beg_pos.column;
18771 p->lex.pcur = p->lex.pbeg + yylloc->end_pos.column;
18772 }
18773 parser_yyerror0(p, msg);
18774 if (pcur) {
18775 p->lex.ptok = ptok;
18776 p->lex.pcur = pcur;
18777 }
18778 return 0;
18779}
18780
18781static int
18782parser_yyerror0(struct parser_params *p, const char *msg)
18783{
18784 dispatch1(parse_error, STR_NEW2(msg));
18785 ripper_error(p);
18786 return 0;
18787}
18788
18789static inline void
18790parser_show_error_line(struct parser_params *p, const YYLTYPE *yylloc)
18791{
18792}
18793#endif /* !RIPPER */
18794
18795static int
18796vtable_size(const struct vtable *tbl)
18797{
18798 if (!DVARS_TERMINAL_P(tbl)) {
18799 return tbl->pos;
18800 }
18801 else {
18802 return 0;
18803 }
18804}
18805
18806static struct vtable *
18807vtable_alloc_gen(struct parser_params *p, int line, struct vtable *prev)
18808{
18809 struct vtable *tbl = ALLOC(struct vtable);
18810 tbl->pos = 0;
18811 tbl->capa = 8;
18812 tbl->tbl = ALLOC_N(ID, tbl->capa);
18813 tbl->prev = prev;
18814#ifndef RIPPER
18815 if (p->debug) {
18816 rb_parser_printf(p, "vtable_alloc:%d: %p\n", line, (void *)tbl);
18817 }
18818#endif
18819 return tbl;
18820}
18821#define vtable_alloc(prev) vtable_alloc_gen(p, __LINE__, prev)
18822
18823static void
18824vtable_free_gen(struct parser_params *p, int line, const char *name,
18825 struct vtable *tbl)
18826{
18827#ifndef RIPPER
18828 if (p->debug) {
18829 rb_parser_printf(p, "vtable_free:%d: %s(%p)\n", line, name, (void *)tbl);
18830 }
18831#endif
18832 if (!DVARS_TERMINAL_P(tbl)) {
18833 if (tbl->tbl) {
18834 ruby_sized_xfree(tbl->tbl, tbl->capa * sizeof(ID));
18835 }
18836 ruby_sized_xfree(tbl, sizeof(*tbl));
18837 }
18838}
18839#define vtable_free(tbl) vtable_free_gen(p, __LINE__, #tbl, tbl)
18840
18841static void
18842vtable_add_gen(struct parser_params *p, int line, const char *name,
18843 struct vtable *tbl, ID id)
18844{
18845#ifndef RIPPER
18846 if (p->debug) {
18847 rb_parser_printf(p, "vtable_add:%d: %s(%p), %s\n",
18848 line, name, (void *)tbl, rb_id2name(id));
18849 }
18850#endif
18851 if (DVARS_TERMINAL_P(tbl)) {
18852 rb_parser_fatal(p, "vtable_add: vtable is not allocated (%p)", (void *)tbl);
18853 return;
18854 }
18855 if (tbl->pos == tbl->capa) {
18856 tbl->capa = tbl->capa * 2;
18857 SIZED_REALLOC_N(tbl->tbl, ID, tbl->capa, tbl->pos);
18858 }
18859 tbl->tbl[tbl->pos++] = id;
18860}
18861#define vtable_add(tbl, id) vtable_add_gen(p, __LINE__, #tbl, tbl, id)
18862
18863static void
18864vtable_pop_gen(struct parser_params *p, int line, const char *name,
18865 struct vtable *tbl, int n)
18866{
18867 if (p->debug) {
18868 rb_parser_printf(p, "vtable_pop:%d: %s(%p), %d\n",
18869 line, name, (void *)tbl, n);
18870 }
18871 if (tbl->pos < n) {
18872 rb_parser_fatal(p, "vtable_pop: unreachable (%d < %d)", tbl->pos, n);
18873 return;
18874 }
18875 tbl->pos -= n;
18876}
18877#define vtable_pop(tbl, n) vtable_pop_gen(p, __LINE__, #tbl, tbl, n)
18878
18879static int
18880vtable_included(const struct vtable * tbl, ID id)
18881{
18882 int i;
18883
18884 if (!DVARS_TERMINAL_P(tbl)) {
18885 for (i = 0; i < tbl->pos; i++) {
18886 if (tbl->tbl[i] == id) {
18887 return i+1;
18888 }
18889 }
18890 }
18891 return 0;
18892}
18893
18894static void parser_prepare(struct parser_params *p);
18895
18896static int
18897e_option_supplied(struct parser_params *p)
18898{
18899 return strcmp(p->ruby_sourcefile, "-e") == 0;
18900}
18901
18902#ifndef RIPPER
18903static NODE *parser_append_options(struct parser_params *p, NODE *node);
18904
18905static VALUE
18906yycompile0(VALUE arg)
18907{
18908 int n;
18909 NODE *tree;
18910 struct parser_params *p = (struct parser_params *)arg;
18911 int cov = FALSE;
18912
18913 if (!compile_for_eval && !NIL_P(p->ruby_sourcefile_string) && !e_option_supplied(p)) {
18914 cov = TRUE;
18915 }
18916
18917 if (p->debug_lines) {
18918 p->ast->body.script_lines = p->debug_lines;
18919 }
18920
18921 parser_prepare(p);
18922#define RUBY_DTRACE_PARSE_HOOK(name) \
18923 if (RUBY_DTRACE_PARSE_##name##_ENABLED()) { \
18924 RUBY_DTRACE_PARSE_##name(p->ruby_sourcefile, p->ruby_sourceline); \
18925 }
18926 RUBY_DTRACE_PARSE_HOOK(BEGIN);
18927 n = yyparse(p);
18928 RUBY_DTRACE_PARSE_HOOK(END);
18929
18930 p->debug_lines = 0;
18931
18932 xfree(p->lex.strterm);
18933 p->lex.strterm = 0;
18934 p->lex.pcur = p->lex.pbeg = p->lex.pend = 0;
18935 if (n || p->error_p) {
18936 VALUE mesg = p->error_buffer;
18937 if (!mesg) {
18938 mesg = syntax_error_new();
18939 }
18940 if (!p->error_tolerant) {
18941 rb_set_errinfo(mesg);
18942 return FALSE;
18943 }
18944 }
18945 tree = p->eval_tree;
18946 if (!tree) {
18947 tree = NEW_NIL(&NULL_LOC);
18948 }
18949 else {
18950 rb_parser_ary_t *tokens = p->tokens;
18951 NODE *prelude;
18952 NODE *body = parser_append_options(p, RNODE_SCOPE(tree)->nd_body);
18953 prelude = block_append(p, p->eval_tree_begin, body);
18954 RNODE_SCOPE(tree)->nd_body = prelude;
18955 p->ast->body.frozen_string_literal = p->frozen_string_literal;
18956 p->ast->body.coverage_enabled = cov;
18957 if (p->keep_tokens) {
18958 p->ast->node_buffer->tokens = tokens;
18959 p->tokens = NULL;
18960 }
18961 }
18962 p->ast->body.root = tree;
18963 p->ast->body.line_count = p->line_count;
18964 return TRUE;
18965}
18966
18967static rb_ast_t *
18968yycompile(struct parser_params *p, VALUE fname, int line)
18969{
18970 rb_ast_t *ast;
18971 if (NIL_P(fname)) {
18972 p->ruby_sourcefile_string = Qnil;
18973 p->ruby_sourcefile = "(none)";
18974 }
18975 else {
18976 p->ruby_sourcefile_string = rb_str_to_interned_str(fname);
18977 p->ruby_sourcefile = StringValueCStr(fname);
18978 }
18979 p->ruby_sourceline = line - 1;
18980
18981 p->lvtbl = NULL;
18982
18983 p->ast = ast = rb_ast_new();
18984 compile_callback(yycompile0, (VALUE)p);
18985 p->ast = 0;
18986
18987 while (p->lvtbl) {
18988 local_pop(p);
18989 }
18990
18991 return ast;
18992}
18993#endif /* !RIPPER */
18994
18995static rb_encoding *
18996must_be_ascii_compatible(struct parser_params *p, rb_parser_string_t *s)
18997{
18998 rb_encoding *enc = rb_parser_str_get_encoding(s);
18999 if (!rb_enc_asciicompat(enc)) {
19000 rb_raise(rb_eArgError, "invalid source encoding");
19001 }
19002 return enc;
19003}
19004
19005static rb_parser_string_t *
19006lex_getline(struct parser_params *p)
19007{
19008 rb_parser_string_t *line = (*p->lex.gets)(p, p->lex.input, p->line_count);
19009 if (!line) return 0;
19010 p->line_count++;
19011 string_buffer_append(p, line);
19012 must_be_ascii_compatible(p, line);
19013 return line;
19014}
19015
19016#ifndef RIPPER
19017rb_ast_t*
19018rb_parser_compile(rb_parser_t *p, rb_parser_lex_gets_func *gets, VALUE fname, rb_parser_input_data input, int line)
19019{
19020 p->lex.gets = gets;
19021 p->lex.input = input;
19022 p->lex.pbeg = p->lex.pcur = p->lex.pend = 0;
19023
19024 return yycompile(p, fname, line);
19025}
19026#endif /* !RIPPER */
19027
19028#define STR_FUNC_ESCAPE 0x01
19029#define STR_FUNC_EXPAND 0x02
19030#define STR_FUNC_REGEXP 0x04
19031#define STR_FUNC_QWORDS 0x08
19032#define STR_FUNC_SYMBOL 0x10
19033#define STR_FUNC_INDENT 0x20
19034#define STR_FUNC_LABEL 0x40
19035#define STR_FUNC_LIST 0x4000
19036#define STR_FUNC_TERM 0x8000
19037
19038enum string_type {
19039 str_label = STR_FUNC_LABEL,
19040 str_squote = (0),
19041 str_dquote = (STR_FUNC_EXPAND),
19042 str_xquote = (STR_FUNC_EXPAND),
19043 str_regexp = (STR_FUNC_REGEXP|STR_FUNC_ESCAPE|STR_FUNC_EXPAND),
19044 str_sword = (STR_FUNC_QWORDS|STR_FUNC_LIST),
19045 str_dword = (STR_FUNC_QWORDS|STR_FUNC_EXPAND|STR_FUNC_LIST),
19046 str_ssym = (STR_FUNC_SYMBOL),
19047 str_dsym = (STR_FUNC_SYMBOL|STR_FUNC_EXPAND)
19048};
19049
19050static rb_parser_string_t *
19051parser_str_new(struct parser_params *p, const char *ptr, long len, rb_encoding *enc, int func, rb_encoding *enc0)
19052{
19053 rb_parser_string_t *pstr;
19054
19055 pstr = rb_parser_encoding_string_new(p, ptr, len, enc);
19056
19057 if (!(func & STR_FUNC_REGEXP)) {
19058 if (rb_parser_is_ascii_string(p, pstr)) {
19059 }
19060 else if (rb_is_usascii_enc((void *)enc0) && enc != rb_utf8_encoding()) {
19061 /* everything is valid in ASCII-8BIT */
19062 enc = rb_ascii8bit_encoding();
19063 PARSER_ENCODING_CODERANGE_SET(pstr, enc, RB_PARSER_ENC_CODERANGE_VALID);
19064 }
19065 }
19066
19067 return pstr;
19068}
19069
19070static int
19071strterm_is_heredoc(rb_strterm_t *strterm)
19072{
19073 return strterm->heredoc;
19074}
19075
19076static rb_strterm_t *
19077new_strterm(struct parser_params *p, int func, int term, int paren)
19078{
19079 rb_strterm_t *strterm = ZALLOC(rb_strterm_t);
19080 strterm->u.literal.func = func;
19081 strterm->u.literal.term = term;
19082 strterm->u.literal.paren = paren;
19083 return strterm;
19084}
19085
19086static rb_strterm_t *
19087new_heredoc(struct parser_params *p)
19088{
19089 rb_strterm_t *strterm = ZALLOC(rb_strterm_t);
19090 strterm->heredoc = true;
19091 return strterm;
19092}
19093
19094#define peek(p,c) peek_n(p, (c), 0)
19095#define peek_n(p,c,n) (!lex_eol_n_p(p, n) && (c) == (unsigned char)(p)->lex.pcur[n])
19096#define peekc(p) peekc_n(p, 0)
19097#define peekc_n(p,n) (lex_eol_n_p(p, n) ? -1 : (unsigned char)(p)->lex.pcur[n])
19098
19099#define add_delayed_token(p, tok, end) parser_add_delayed_token(p, tok, end, __LINE__)
19100static void
19101parser_add_delayed_token(struct parser_params *p, const char *tok, const char *end, int line)
19102{
19103 debug_token_line(p, "add_delayed_token", line);
19104
19105 if (tok < end) {
19106 if (has_delayed_token(p)) {
19107 bool next_line = parser_string_char_at_end(p, p->delayed.token, 0) == '\n';
19108 int end_line = (next_line ? 1 : 0) + p->delayed.end_line;
19109 int end_col = (next_line ? 0 : p->delayed.end_col);
19110 if (end_line != p->ruby_sourceline || end_col != tok - p->lex.pbeg) {
19111 dispatch_delayed_token(p, tSTRING_CONTENT);
19112 }
19113 }
19114 if (!has_delayed_token(p)) {
19115 p->delayed.token = rb_parser_string_new(p, 0, 0);
19116 rb_parser_enc_associate(p, p->delayed.token, p->enc);
19117 p->delayed.beg_line = p->ruby_sourceline;
19118 p->delayed.beg_col = rb_long2int(tok - p->lex.pbeg);
19119 }
19120 parser_str_cat(p->delayed.token, tok, end - tok);
19121 p->delayed.end_line = p->ruby_sourceline;
19122 p->delayed.end_col = rb_long2int(end - p->lex.pbeg);
19123 p->lex.ptok = end;
19124 }
19125}
19126
19127static void
19128set_lastline(struct parser_params *p, rb_parser_string_t *str)
19129{
19130 p->lex.pbeg = p->lex.pcur = PARSER_STRING_PTR(str);
19131 p->lex.pend = p->lex.pcur + PARSER_STRING_LEN(str);
19132 p->lex.lastline = str;
19133}
19134
19135static int
19136nextline(struct parser_params *p, int set_encoding)
19137{
19138 rb_parser_string_t *str = p->lex.nextline;
19139 p->lex.nextline = 0;
19140 if (!str) {
19141 if (p->eofp)
19142 return -1;
19143
19144 if (!lex_eol_ptr_p(p, p->lex.pbeg) && *(p->lex.pend-1) != '\n') {
19145 goto end_of_input;
19146 }
19147
19148 if (!p->lex.input || !(str = lex_getline(p))) {
19149 end_of_input:
19150 p->eofp = 1;
19151 lex_goto_eol(p);
19152 return -1;
19153 }
19154#ifndef RIPPER
19155 if (p->debug_lines) {
19156 if (set_encoding) rb_parser_enc_associate(p, str, p->enc);
19157 rb_parser_string_t *copy = rb_parser_string_deep_copy(p, str);
19158 rb_parser_ary_push_script_line(p, p->debug_lines, copy);
19159 }
19160#endif
19161 p->cr_seen = FALSE;
19162 }
19163 else if (str == AFTER_HEREDOC_WITHOUT_TERMINATOR) {
19164 /* after here-document without terminator */
19165 goto end_of_input;
19166 }
19167 add_delayed_token(p, p->lex.ptok, p->lex.pend);
19168 if (p->heredoc_end > 0) {
19169 p->ruby_sourceline = p->heredoc_end;
19170 p->heredoc_end = 0;
19171 }
19172 p->ruby_sourceline++;
19173 set_lastline(p, str);
19174 token_flush(p);
19175 return 0;
19176}
19177
19178static int
19179parser_cr(struct parser_params *p, int c)
19180{
19181 if (peek(p, '\n')) {
19182 p->lex.pcur++;
19183 c = '\n';
19184 }
19185 return c;
19186}
19187
19188static inline int
19189nextc0(struct parser_params *p, int set_encoding)
19190{
19191 int c;
19192
19193 if (UNLIKELY(lex_eol_p(p) || p->eofp || p->lex.nextline > AFTER_HEREDOC_WITHOUT_TERMINATOR)) {
19194 if (nextline(p, set_encoding)) return -1;
19195 }
19196 c = (unsigned char)*p->lex.pcur++;
19197 if (UNLIKELY(c == '\r')) {
19198 c = parser_cr(p, c);
19199 }
19200
19201 return c;
19202}
19203#define nextc(p) nextc0(p, TRUE)
19204
19205static void
19206pushback(struct parser_params *p, int c)
19207{
19208 if (c == -1) return;
19209 p->eofp = 0;
19210 p->lex.pcur--;
19211 if (p->lex.pcur > p->lex.pbeg && p->lex.pcur[0] == '\n' && p->lex.pcur[-1] == '\r') {
19212 p->lex.pcur--;
19213 }
19214}
19215
19216#define was_bol(p) ((p)->lex.pcur == (p)->lex.pbeg + 1)
19217
19218#define tokfix(p) ((p)->tokenbuf[(p)->tokidx]='\0')
19219#define tok(p) (p)->tokenbuf
19220#define toklen(p) (p)->tokidx
19221
19222static int
19223looking_at_eol_p(struct parser_params *p)
19224{
19225 const char *ptr = p->lex.pcur;
19226 while (!lex_eol_ptr_p(p, ptr)) {
19227 int c = (unsigned char)*ptr++;
19228 int eol = (c == '\n' || c == '#');
19229 if (eol || !ISSPACE(c)) {
19230 return eol;
19231 }
19232 }
19233 return TRUE;
19234}
19235
19236static char*
19237newtok(struct parser_params *p)
19238{
19239 p->tokidx = 0;
19240 if (!p->tokenbuf) {
19241 p->toksiz = 60;
19242 p->tokenbuf = ALLOC_N(char, 60);
19243 }
19244 if (p->toksiz > 4096) {
19245 p->toksiz = 60;
19246 REALLOC_N(p->tokenbuf, char, 60);
19247 }
19248 return p->tokenbuf;
19249}
19250
19251static char *
19252tokspace(struct parser_params *p, int n)
19253{
19254 p->tokidx += n;
19255
19256 if (p->tokidx >= p->toksiz) {
19257 do {p->toksiz *= 2;} while (p->toksiz < p->tokidx);
19258 REALLOC_N(p->tokenbuf, char, p->toksiz);
19259 }
19260 return &p->tokenbuf[p->tokidx-n];
19261}
19262
19263static void
19264tokadd(struct parser_params *p, int c)
19265{
19266 p->tokenbuf[p->tokidx++] = (char)c;
19267 if (p->tokidx >= p->toksiz) {
19268 p->toksiz *= 2;
19269 REALLOC_N(p->tokenbuf, char, p->toksiz);
19270 }
19271}
19272
19273static int
19274tok_hex(struct parser_params *p, size_t *numlen)
19275{
19276 int c;
19277
19278 c = (int)ruby_scan_hex(p->lex.pcur, 2, numlen);
19279 if (!*numlen) {
19280 flush_string_content(p, p->enc, rb_strlen_lit("\\x"));
19281 yyerror0("invalid hex escape");
19282 dispatch_scan_event(p, tSTRING_CONTENT);
19283 return 0;
19284 }
19285 p->lex.pcur += *numlen;
19286 return c;
19287}
19288
19289#define tokcopy(p, n) memcpy(tokspace(p, n), (p)->lex.pcur - (n), (n))
19290
19291static int
19292escaped_control_code(int c)
19293{
19294 int c2 = 0;
19295 switch (c) {
19296 case ' ':
19297 c2 = 's';
19298 break;
19299 case '\n':
19300 c2 = 'n';
19301 break;
19302 case '\t':
19303 c2 = 't';
19304 break;
19305 case '\v':
19306 c2 = 'v';
19307 break;
19308 case '\r':
19309 c2 = 'r';
19310 break;
19311 case '\f':
19312 c2 = 'f';
19313 break;
19314 }
19315 return c2;
19316}
19317
19318#define WARN_SPACE_CHAR(c, prefix) \
19319 rb_warn1("invalid character syntax; use "prefix"\\%c", WARN_I(c))
19320
19321static int
19322tokadd_codepoint(struct parser_params *p, rb_encoding **encp,
19323 int regexp_literal, const char *begin)
19324{
19325 const int wide = !begin;
19326 size_t numlen;
19327 int codepoint = (int)ruby_scan_hex(p->lex.pcur, wide ? p->lex.pend - p->lex.pcur : 4, &numlen);
19328
19329 p->lex.pcur += numlen;
19330 if (p->lex.strterm == NULL ||
19331 strterm_is_heredoc(p->lex.strterm) ||
19332 (p->lex.strterm->u.literal.func != str_regexp)) {
19333 if (!begin) begin = p->lex.pcur;
19334 if (wide ? (numlen == 0 || numlen > 6) : (numlen < 4)) {
19335 flush_string_content(p, rb_utf8_encoding(), p->lex.pcur - begin);
19336 yyerror0("invalid Unicode escape");
19337 dispatch_scan_event(p, tSTRING_CONTENT);
19338 return wide && numlen > 0;
19339 }
19340 if (codepoint > 0x10ffff) {
19341 flush_string_content(p, rb_utf8_encoding(), p->lex.pcur - begin);
19342 yyerror0("invalid Unicode codepoint (too large)");
19343 dispatch_scan_event(p, tSTRING_CONTENT);
19344 return wide;
19345 }
19346 if ((codepoint & 0xfffff800) == 0xd800) {
19347 flush_string_content(p, rb_utf8_encoding(), p->lex.pcur - begin);
19348 yyerror0("invalid Unicode codepoint");
19349 dispatch_scan_event(p, tSTRING_CONTENT);
19350 return wide;
19351 }
19352 }
19353 if (regexp_literal) {
19354 tokcopy(p, (int)numlen);
19355 }
19356 else if (codepoint >= 0x80) {
19357 rb_encoding *utf8 = rb_utf8_encoding();
19358 if (*encp && utf8 != *encp) {
19359 YYLTYPE loc = RUBY_INIT_YYLLOC();
19360 compile_error(p, "UTF-8 mixed within %s source", rb_enc_name(*encp));
19361 parser_show_error_line(p, &loc);
19362 return wide;
19363 }
19364 *encp = utf8;
19365 tokaddmbc(p, codepoint, *encp);
19366 }
19367 else {
19368 tokadd(p, codepoint);
19369 }
19370 return TRUE;
19371}
19372
19373static int tokadd_mbchar(struct parser_params *p, int c);
19374
19375static int
19376tokskip_mbchar(struct parser_params *p)
19377{
19378 int len = parser_precise_mbclen(p, p->lex.pcur-1);
19379 if (len > 0) {
19380 p->lex.pcur += len - 1;
19381 }
19382 return len;
19383}
19384
19385/* return value is for ?\u3042 */
19386static void
19387tokadd_utf8(struct parser_params *p, rb_encoding **encp,
19388 int term, int symbol_literal, int regexp_literal)
19389{
19390 /*
19391 * If `term` is not -1, then we allow multiple codepoints in \u{}
19392 * upto `term` byte, otherwise we're parsing a character literal.
19393 * And then add the codepoints to the current token.
19394 */
19395 static const char multiple_codepoints[] = "Multiple codepoints at single character literal";
19396
19397 const int open_brace = '{', close_brace = '}';
19398
19399 if (regexp_literal) { tokadd(p, '\\'); tokadd(p, 'u'); }
19400
19401 if (peek(p, open_brace)) { /* handle \u{...} form */
19402 if (regexp_literal && p->lex.strterm->u.literal.func == str_regexp) {
19403 /*
19404 * Skip parsing validation code and copy bytes as-is until term or
19405 * closing brace, in order to correctly handle extended regexps where
19406 * invalid unicode escapes are allowed in comments. The regexp parser
19407 * does its own validation and will catch any issues.
19408 */
19409 tokadd(p, open_brace);
19410 while (!lex_eol_ptr_p(p, ++p->lex.pcur)) {
19411 int c = peekc(p);
19412 if (c == close_brace) {
19413 tokadd(p, c);
19414 ++p->lex.pcur;
19415 break;
19416 }
19417 else if (c == term) {
19418 break;
19419 }
19420 if (c == '\\' && !lex_eol_n_p(p, 1)) {
19421 tokadd(p, c);
19422 c = *++p->lex.pcur;
19423 }
19424 tokadd_mbchar(p, c);
19425 }
19426 }
19427 else {
19428 const char *second = NULL;
19429 int c, last = nextc(p);
19430 if (lex_eol_p(p)) goto unterminated;
19431 while (ISSPACE(c = peekc(p)) && !lex_eol_ptr_p(p, ++p->lex.pcur));
19432 while (c != close_brace) {
19433 if (c == term) goto unterminated;
19434 if (second == multiple_codepoints)
19435 second = p->lex.pcur;
19436 if (regexp_literal) tokadd(p, last);
19437 if (!tokadd_codepoint(p, encp, regexp_literal, NULL)) {
19438 break;
19439 }
19440 while (ISSPACE(c = peekc(p))) {
19441 if (lex_eol_ptr_p(p, ++p->lex.pcur)) goto unterminated;
19442 last = c;
19443 }
19444 if (term == -1 && !second)
19445 second = multiple_codepoints;
19446 }
19447
19448 if (c != close_brace) {
19449 unterminated:
19450 flush_string_content(p, rb_utf8_encoding(), 0);
19451 yyerror0("unterminated Unicode escape");
19452 dispatch_scan_event(p, tSTRING_CONTENT);
19453 return;
19454 }
19455 if (second && second != multiple_codepoints) {
19456 const char *pcur = p->lex.pcur;
19457 p->lex.pcur = second;
19458 dispatch_scan_event(p, tSTRING_CONTENT);
19459 token_flush(p);
19460 p->lex.pcur = pcur;
19461 yyerror0(multiple_codepoints);
19462 token_flush(p);
19463 }
19464
19465 if (regexp_literal) tokadd(p, close_brace);
19466 nextc(p);
19467 }
19468 }
19469 else { /* handle \uxxxx form */
19470 if (!tokadd_codepoint(p, encp, regexp_literal, p->lex.pcur - rb_strlen_lit("\\u"))) {
19471 token_flush(p);
19472 return;
19473 }
19474 }
19475}
19476
19477#define ESCAPE_CONTROL 1
19478#define ESCAPE_META 2
19479
19480static int
19481read_escape(struct parser_params *p, int flags, const char *begin)
19482{
19483 int c;
19484 size_t numlen;
19485
19486 switch (c = nextc(p)) {
19487 case '\\': /* Backslash */
19488 return c;
19489
19490 case 'n': /* newline */
19491 return '\n';
19492
19493 case 't': /* horizontal tab */
19494 return '\t';
19495
19496 case 'r': /* carriage-return */
19497 return '\r';
19498
19499 case 'f': /* form-feed */
19500 return '\f';
19501
19502 case 'v': /* vertical tab */
19503 return '\13';
19504
19505 case 'a': /* alarm(bell) */
19506 return '\007';
19507
19508 case 'e': /* escape */
19509 return 033;
19510
19511 case '0': case '1': case '2': case '3': /* octal constant */
19512 case '4': case '5': case '6': case '7':
19513 pushback(p, c);
19514 c = (int)ruby_scan_oct(p->lex.pcur, 3, &numlen);
19515 p->lex.pcur += numlen;
19516 return c;
19517
19518 case 'x': /* hex constant */
19519 c = tok_hex(p, &numlen);
19520 if (numlen == 0) return 0;
19521 return c;
19522
19523 case 'b': /* backspace */
19524 return '\010';
19525
19526 case 's': /* space */
19527 return ' ';
19528
19529 case 'M':
19530 if (flags & ESCAPE_META) goto eof;
19531 if ((c = nextc(p)) != '-') {
19532 goto eof;
19533 }
19534 if ((c = nextc(p)) == '\\') {
19535 switch (peekc(p)) {
19536 case 'u': case 'U':
19537 nextc(p);
19538 goto eof;
19539 }
19540 return read_escape(p, flags|ESCAPE_META, begin) | 0x80;
19541 }
19542 else if (c == -1) goto eof;
19543 else if (!ISASCII(c)) {
19544 tokskip_mbchar(p);
19545 goto eof;
19546 }
19547 else {
19548 int c2 = escaped_control_code(c);
19549 if (c2) {
19550 if (ISCNTRL(c) || !(flags & ESCAPE_CONTROL)) {
19551 WARN_SPACE_CHAR(c2, "\\M-");
19552 }
19553 else {
19554 WARN_SPACE_CHAR(c2, "\\C-\\M-");
19555 }
19556 }
19557 else if (ISCNTRL(c)) goto eof;
19558 return ((c & 0xff) | 0x80);
19559 }
19560
19561 case 'C':
19562 if ((c = nextc(p)) != '-') {
19563 goto eof;
19564 }
19565 case 'c':
19566 if (flags & ESCAPE_CONTROL) goto eof;
19567 if ((c = nextc(p))== '\\') {
19568 switch (peekc(p)) {
19569 case 'u': case 'U':
19570 nextc(p);
19571 goto eof;
19572 }
19573 c = read_escape(p, flags|ESCAPE_CONTROL, begin);
19574 }
19575 else if (c == '?')
19576 return 0177;
19577 else if (c == -1) goto eof;
19578 else if (!ISASCII(c)) {
19579 tokskip_mbchar(p);
19580 goto eof;
19581 }
19582 else {
19583 int c2 = escaped_control_code(c);
19584 if (c2) {
19585 if (ISCNTRL(c)) {
19586 if (flags & ESCAPE_META) {
19587 WARN_SPACE_CHAR(c2, "\\M-");
19588 }
19589 else {
19590 WARN_SPACE_CHAR(c2, "");
19591 }
19592 }
19593 else {
19594 if (flags & ESCAPE_META) {
19595 WARN_SPACE_CHAR(c2, "\\M-\\C-");
19596 }
19597 else {
19598 WARN_SPACE_CHAR(c2, "\\C-");
19599 }
19600 }
19601 }
19602 else if (ISCNTRL(c)) goto eof;
19603 }
19604 return c & 0x9f;
19605
19606 eof:
19607 case -1:
19608 flush_string_content(p, p->enc, p->lex.pcur - begin);
19609 yyerror0("Invalid escape character syntax");
19610 dispatch_scan_event(p, tSTRING_CONTENT);
19611 return '\0';
19612
19613 default:
19614 if (!ISASCII(c)) {
19615 tokskip_mbchar(p);
19616 goto eof;
19617 }
19618 return c;
19619 }
19620}
19621
19622static void
19623tokaddmbc(struct parser_params *p, int c, rb_encoding *enc)
19624{
19625 int len = rb_enc_codelen(c, enc);
19626 rb_enc_mbcput(c, tokspace(p, len), enc);
19627}
19628
19629static int
19630tokadd_escape(struct parser_params *p)
19631{
19632 int c;
19633 size_t numlen;
19634 const char *begin = p->lex.pcur;
19635
19636 switch (c = nextc(p)) {
19637 case '\n':
19638 return 0; /* just ignore */
19639
19640 case '0': case '1': case '2': case '3': /* octal constant */
19641 case '4': case '5': case '6': case '7':
19642 {
19643 ruby_scan_oct(--p->lex.pcur, 3, &numlen);
19644 if (numlen == 0) goto eof;
19645 p->lex.pcur += numlen;
19646 tokcopy(p, (int)numlen + 1);
19647 }
19648 return 0;
19649
19650 case 'x': /* hex constant */
19651 {
19652 tok_hex(p, &numlen);
19653 if (numlen == 0) return -1;
19654 tokcopy(p, (int)numlen + 2);
19655 }
19656 return 0;
19657
19658 eof:
19659 case -1:
19660 flush_string_content(p, p->enc, p->lex.pcur - begin);
19661 yyerror0("Invalid escape character syntax");
19662 token_flush(p);
19663 return -1;
19664
19665 default:
19666 tokadd(p, '\\');
19667 tokadd(p, c);
19668 }
19669 return 0;
19670}
19671
19672static int
19673char_to_option(int c)
19674{
19675 int val;
19676
19677 switch (c) {
19678 case 'i':
19679 val = RE_ONIG_OPTION_IGNORECASE;
19680 break;
19681 case 'x':
19682 val = RE_ONIG_OPTION_EXTEND;
19683 break;
19684 case 'm':
19685 val = RE_ONIG_OPTION_MULTILINE;
19686 break;
19687 default:
19688 val = 0;
19689 break;
19690 }
19691 return val;
19692}
19693
19694#define ARG_ENCODING_FIXED 16
19695#define ARG_ENCODING_NONE 32
19696#define ENC_ASCII8BIT 1
19697#define ENC_EUC_JP 2
19698#define ENC_Windows_31J 3
19699#define ENC_UTF8 4
19700
19701static int
19702char_to_option_kcode(int c, int *option, int *kcode)
19703{
19704 *option = 0;
19705
19706 switch (c) {
19707 case 'n':
19708 *kcode = ENC_ASCII8BIT;
19709 return (*option = ARG_ENCODING_NONE);
19710 case 'e':
19711 *kcode = ENC_EUC_JP;
19712 break;
19713 case 's':
19714 *kcode = ENC_Windows_31J;
19715 break;
19716 case 'u':
19717 *kcode = ENC_UTF8;
19718 break;
19719 default:
19720 *kcode = -1;
19721 return (*option = char_to_option(c));
19722 }
19723 *option = ARG_ENCODING_FIXED;
19724 return 1;
19725}
19726
19727static int
19728regx_options(struct parser_params *p)
19729{
19730 int kcode = 0;
19731 int kopt = 0;
19732 int options = 0;
19733 int c, opt, kc;
19734
19735 newtok(p);
19736 while (c = nextc(p), ISALPHA(c)) {
19737 if (c == 'o') {
19738 options |= RE_OPTION_ONCE;
19739 }
19740 else if (char_to_option_kcode(c, &opt, &kc)) {
19741 if (kc >= 0) {
19742 if (kc != ENC_ASCII8BIT) kcode = c;
19743 kopt = opt;
19744 }
19745 else {
19746 options |= opt;
19747 }
19748 }
19749 else {
19750 tokadd(p, c);
19751 }
19752 }
19753 options |= kopt;
19754 pushback(p, c);
19755 if (toklen(p)) {
19756 YYLTYPE loc = RUBY_INIT_YYLLOC();
19757 tokfix(p);
19758 compile_error(p, "unknown regexp option%s - %*s",
19759 toklen(p) > 1 ? "s" : "", toklen(p), tok(p));
19760 parser_show_error_line(p, &loc);
19761 }
19762 return options | RE_OPTION_ENCODING(kcode);
19763}
19764
19765static int
19766tokadd_mbchar(struct parser_params *p, int c)
19767{
19768 int len = parser_precise_mbclen(p, p->lex.pcur-1);
19769 if (len < 0) return -1;
19770 tokadd(p, c);
19771 p->lex.pcur += --len;
19772 if (len > 0) tokcopy(p, len);
19773 return c;
19774}
19775
19776static inline int
19777simple_re_meta(int c)
19778{
19779 switch (c) {
19780 case '$': case '*': case '+': case '.':
19781 case '?': case '^': case '|':
19782 case ')': case ']': case '}': case '>':
19783 return TRUE;
19784 default:
19785 return FALSE;
19786 }
19787}
19788
19789static int
19790parser_update_heredoc_indent(struct parser_params *p, int c)
19791{
19792 if (p->heredoc_line_indent == -1) {
19793 if (c == '\n') p->heredoc_line_indent = 0;
19794 }
19795 else {
19796 if (c == ' ') {
19797 p->heredoc_line_indent++;
19798 return TRUE;
19799 }
19800 else if (c == '\t') {
19801 int w = (p->heredoc_line_indent / TAB_WIDTH) + 1;
19802 p->heredoc_line_indent = w * TAB_WIDTH;
19803 return TRUE;
19804 }
19805 else if (c != '\n') {
19806 if (p->heredoc_indent > p->heredoc_line_indent) {
19807 p->heredoc_indent = p->heredoc_line_indent;
19808 }
19809 p->heredoc_line_indent = -1;
19810 }
19811 else {
19812 /* Whitespace only line has no indentation */
19813 p->heredoc_line_indent = 0;
19814 }
19815 }
19816 return FALSE;
19817}
19818
19819static void
19820parser_mixed_error(struct parser_params *p, rb_encoding *enc1, rb_encoding *enc2)
19821{
19822 YYLTYPE loc = RUBY_INIT_YYLLOC();
19823 const char *n1 = rb_enc_name(enc1), *n2 = rb_enc_name(enc2);
19824 compile_error(p, "%s mixed within %s source", n1, n2);
19825 parser_show_error_line(p, &loc);
19826}
19827
19828static void
19829parser_mixed_escape(struct parser_params *p, const char *beg, rb_encoding *enc1, rb_encoding *enc2)
19830{
19831 const char *pos = p->lex.pcur;
19832 p->lex.pcur = beg;
19833 parser_mixed_error(p, enc1, enc2);
19834 p->lex.pcur = pos;
19835}
19836
19837static inline char
19838nibble_char_upper(unsigned int c)
19839{
19840 c &= 0xf;
19841 return c + (c < 10 ? '0' : 'A' - 10);
19842}
19843
19844static int
19845tokadd_string(struct parser_params *p,
19846 int func, int term, int paren, long *nest,
19847 rb_encoding **encp, rb_encoding **enc)
19848{
19849 int c;
19850 bool erred = false;
19851#ifdef RIPPER
19852 const int heredoc_end = (p->heredoc_end ? p->heredoc_end + 1 : 0);
19853 int top_of_line = FALSE;
19854#endif
19855
19856#define mixed_error(enc1, enc2) \
19857 (void)(erred || (parser_mixed_error(p, enc1, enc2), erred = true))
19858#define mixed_escape(beg, enc1, enc2) \
19859 (void)(erred || (parser_mixed_escape(p, beg, enc1, enc2), erred = true))
19860
19861 while ((c = nextc(p)) != -1) {
19862 if (p->heredoc_indent > 0) {
19863 parser_update_heredoc_indent(p, c);
19864 }
19865#ifdef RIPPER
19866 if (top_of_line && heredoc_end == p->ruby_sourceline) {
19867 pushback(p, c);
19868 break;
19869 }
19870#endif
19871
19872 if (paren && c == paren) {
19873 ++*nest;
19874 }
19875 else if (c == term) {
19876 if (!nest || !*nest) {
19877 pushback(p, c);
19878 break;
19879 }
19880 --*nest;
19881 }
19882 else if ((func & STR_FUNC_EXPAND) && c == '#' && !lex_eol_p(p)) {
19883 unsigned char c2 = *p->lex.pcur;
19884 if (c2 == '$' || c2 == '@' || c2 == '{') {
19885 pushback(p, c);
19886 break;
19887 }
19888 }
19889 else if (c == '\\') {
19890 c = nextc(p);
19891 switch (c) {
19892 case '\n':
19893 if (func & STR_FUNC_QWORDS) break;
19894 if (func & STR_FUNC_EXPAND) {
19895 if (!(func & STR_FUNC_INDENT) || (p->heredoc_indent < 0))
19896 continue;
19897 if (c == term) {
19898 c = '\\';
19899 goto terminate;
19900 }
19901 }
19902 tokadd(p, '\\');
19903 break;
19904
19905 case '\\':
19906 if (func & STR_FUNC_ESCAPE) tokadd(p, c);
19907 break;
19908
19909 case 'u':
19910 if ((func & STR_FUNC_EXPAND) == 0) {
19911 tokadd(p, '\\');
19912 break;
19913 }
19914 tokadd_utf8(p, enc, term,
19915 func & STR_FUNC_SYMBOL,
19916 func & STR_FUNC_REGEXP);
19917 continue;
19918
19919 default:
19920 if (c == -1) return -1;
19921 if (!ISASCII(c)) {
19922 if ((func & STR_FUNC_EXPAND) == 0) tokadd(p, '\\');
19923 goto non_ascii;
19924 }
19925 if (func & STR_FUNC_REGEXP) {
19926 switch (c) {
19927 case 'c':
19928 case 'C':
19929 case 'M': {
19930 pushback(p, c);
19931 c = read_escape(p, 0, p->lex.pcur - 1);
19932
19933 char *t = tokspace(p, rb_strlen_lit("\\x00"));
19934 *t++ = '\\';
19935 *t++ = 'x';
19936 *t++ = nibble_char_upper(c >> 4);
19937 *t++ = nibble_char_upper(c);
19938 continue;
19939 }
19940 }
19941
19942 if (c == term && !simple_re_meta(c)) {
19943 tokadd(p, c);
19944 continue;
19945 }
19946 pushback(p, c);
19947 if ((c = tokadd_escape(p)) < 0)
19948 return -1;
19949 if (*enc && *enc != *encp) {
19950 mixed_escape(p->lex.ptok+2, *enc, *encp);
19951 }
19952 continue;
19953 }
19954 else if (func & STR_FUNC_EXPAND) {
19955 pushback(p, c);
19956 if (func & STR_FUNC_ESCAPE) tokadd(p, '\\');
19957 c = read_escape(p, 0, p->lex.pcur - 1);
19958 }
19959 else if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) {
19960 /* ignore backslashed spaces in %w */
19961 }
19962 else if (c != term && !(paren && c == paren)) {
19963 tokadd(p, '\\');
19964 pushback(p, c);
19965 continue;
19966 }
19967 }
19968 }
19969 else if (!parser_isascii(p)) {
19970 non_ascii:
19971 if (!*enc) {
19972 *enc = *encp;
19973 }
19974 else if (*enc != *encp) {
19975 mixed_error(*enc, *encp);
19976 continue;
19977 }
19978 if (tokadd_mbchar(p, c) == -1) return -1;
19979 continue;
19980 }
19981 else if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) {
19982 pushback(p, c);
19983 break;
19984 }
19985 if (c & 0x80) {
19986 if (!*enc) {
19987 *enc = *encp;
19988 }
19989 else if (*enc != *encp) {
19990 mixed_error(*enc, *encp);
19991 continue;
19992 }
19993 }
19994 tokadd(p, c);
19995#ifdef RIPPER
19996 top_of_line = (c == '\n');
19997#endif
19998 }
19999 terminate:
20000 if (*enc) *encp = *enc;
20001 return c;
20002}
20003
20004#define NEW_STRTERM(func, term, paren) new_strterm(p, func, term, paren)
20005
20006static void
20007flush_string_content(struct parser_params *p, rb_encoding *enc, size_t back)
20008{
20009 p->lex.pcur -= back;
20010 if (has_delayed_token(p)) {
20011 ptrdiff_t len = p->lex.pcur - p->lex.ptok;
20012 if (len > 0) {
20013 rb_parser_enc_str_buf_cat(p, p->delayed.token, p->lex.ptok, len, enc);
20014 p->delayed.end_line = p->ruby_sourceline;
20015 p->delayed.end_col = rb_long2int(p->lex.pcur - p->lex.pbeg);
20016 }
20017 dispatch_delayed_token(p, tSTRING_CONTENT);
20018 p->lex.ptok = p->lex.pcur;
20019 }
20020 dispatch_scan_event(p, tSTRING_CONTENT);
20021 p->lex.pcur += back;
20022}
20023
20024/* this can be shared with ripper, since it's independent from struct
20025 * parser_params. */
20026#ifndef RIPPER
20027#define BIT(c, idx) (((c) / 32 - 1 == idx) ? (1U << ((c) % 32)) : 0)
20028#define SPECIAL_PUNCT(idx) ( \
20029 BIT('~', idx) | BIT('*', idx) | BIT('$', idx) | BIT('?', idx) | \
20030 BIT('!', idx) | BIT('@', idx) | BIT('/', idx) | BIT('\\', idx) | \
20031 BIT(';', idx) | BIT(',', idx) | BIT('.', idx) | BIT('=', idx) | \
20032 BIT(':', idx) | BIT('<', idx) | BIT('>', idx) | BIT('\"', idx) | \
20033 BIT('&', idx) | BIT('`', idx) | BIT('\'', idx) | BIT('+', idx) | \
20034 BIT('0', idx))
20035const uint_least32_t ruby_global_name_punct_bits[] = {
20036 SPECIAL_PUNCT(0),
20037 SPECIAL_PUNCT(1),
20038 SPECIAL_PUNCT(2),
20039};
20040#undef BIT
20041#undef SPECIAL_PUNCT
20042#endif
20043
20044static enum yytokentype
20045parser_peek_variable_name(struct parser_params *p)
20046{
20047 int c;
20048 const char *ptr = p->lex.pcur;
20049
20050 if (lex_eol_ptr_n_p(p, ptr, 1)) return 0;
20051 c = *ptr++;
20052 switch (c) {
20053 case '$':
20054 if ((c = *ptr) == '-') {
20055 if (lex_eol_ptr_p(p, ++ptr)) return 0;
20056 c = *ptr;
20057 }
20058 else if (is_global_name_punct(c) || ISDIGIT(c)) {
20059 return tSTRING_DVAR;
20060 }
20061 break;
20062 case '@':
20063 if ((c = *ptr) == '@') {
20064 if (lex_eol_ptr_p(p, ++ptr)) return 0;
20065 c = *ptr;
20066 }
20067 break;
20068 case '{':
20069 p->lex.pcur = ptr;
20070 p->command_start = TRUE;
20071 yylval.state = p->lex.state;
20072 return tSTRING_DBEG;
20073 default:
20074 return 0;
20075 }
20076 if (!ISASCII(c) || c == '_' || ISALPHA(c))
20077 return tSTRING_DVAR;
20078 return 0;
20079}
20080
20081#define IS_ARG() IS_lex_state(EXPR_ARG_ANY)
20082#define IS_END() IS_lex_state(EXPR_END_ANY)
20083#define IS_BEG() (IS_lex_state(EXPR_BEG_ANY) || IS_lex_state_all(EXPR_ARG|EXPR_LABELED))
20084#define IS_SPCARG(c) (IS_ARG() && space_seen && !ISSPACE(c))
20085#define IS_LABEL_POSSIBLE() (\
20086 (IS_lex_state(EXPR_LABEL|EXPR_ENDFN) && !cmd_state) || \
20087 IS_ARG())
20088#define IS_LABEL_SUFFIX(n) (peek_n(p, ':',(n)) && !peek_n(p, ':', (n)+1))
20089#define IS_AFTER_OPERATOR() IS_lex_state(EXPR_FNAME | EXPR_DOT)
20090
20091static inline enum yytokentype
20092parser_string_term(struct parser_params *p, int func)
20093{
20094 xfree(p->lex.strterm);
20095 p->lex.strterm = 0;
20096 if (func & STR_FUNC_REGEXP) {
20097 set_yylval_num(regx_options(p));
20098 dispatch_scan_event(p, tREGEXP_END);
20099 SET_LEX_STATE(EXPR_END);
20100 return tREGEXP_END;
20101 }
20102 if ((func & STR_FUNC_LABEL) && IS_LABEL_SUFFIX(0)) {
20103 nextc(p);
20104 SET_LEX_STATE(EXPR_ARG|EXPR_LABELED);
20105 return tLABEL_END;
20106 }
20107 SET_LEX_STATE(EXPR_END);
20108 return tSTRING_END;
20109}
20110
20111static enum yytokentype
20112parse_string(struct parser_params *p, rb_strterm_literal_t *quote)
20113{
20114 int func = quote->func;
20115 int term = quote->term;
20116 int paren = quote->paren;
20117 int c, space = 0;
20118 rb_encoding *enc = p->enc;
20119 rb_encoding *base_enc = 0;
20120 rb_parser_string_t *lit;
20121
20122 if (func & STR_FUNC_TERM) {
20123 if (func & STR_FUNC_QWORDS) nextc(p); /* delayed term */
20124 SET_LEX_STATE(EXPR_END);
20125 xfree(p->lex.strterm);
20126 p->lex.strterm = 0;
20127 return func & STR_FUNC_REGEXP ? tREGEXP_END : tSTRING_END;
20128 }
20129 c = nextc(p);
20130 if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) {
20131 while (c != '\n' && ISSPACE(c = nextc(p)));
20132 space = 1;
20133 }
20134 if (func & STR_FUNC_LIST) {
20135 quote->func &= ~STR_FUNC_LIST;
20136 space = 1;
20137 }
20138 if (c == term && !quote->nest) {
20139 if (func & STR_FUNC_QWORDS) {
20140 quote->func |= STR_FUNC_TERM;
20141 pushback(p, c); /* dispatch the term at tSTRING_END */
20142 add_delayed_token(p, p->lex.ptok, p->lex.pcur);
20143 return ' ';
20144 }
20145 return parser_string_term(p, func);
20146 }
20147 if (space) {
20148 if (!ISSPACE(c)) pushback(p, c);
20149 add_delayed_token(p, p->lex.ptok, p->lex.pcur);
20150 return ' ';
20151 }
20152 newtok(p);
20153 if ((func & STR_FUNC_EXPAND) && c == '#') {
20154 enum yytokentype t = parser_peek_variable_name(p);
20155 if (t) return t;
20156 tokadd(p, '#');
20157 c = nextc(p);
20158 }
20159 pushback(p, c);
20160 if (tokadd_string(p, func, term, paren, &quote->nest,
20161 &enc, &base_enc) == -1) {
20162 if (p->eofp) {
20163#ifndef RIPPER
20164# define unterminated_literal(mesg) yyerror0(mesg)
20165#else
20166# define unterminated_literal(mesg) compile_error(p, mesg)
20167#endif
20168 literal_flush(p, p->lex.pcur);
20169 if (func & STR_FUNC_QWORDS) {
20170 /* no content to add, bailing out here */
20171 unterminated_literal("unterminated list meets end of file");
20172 xfree(p->lex.strterm);
20173 p->lex.strterm = 0;
20174 return tSTRING_END;
20175 }
20176 if (func & STR_FUNC_REGEXP) {
20177 unterminated_literal("unterminated regexp meets end of file");
20178 }
20179 else {
20180 unterminated_literal("unterminated string meets end of file");
20181 }
20182 quote->func |= STR_FUNC_TERM;
20183 }
20184 }
20185
20186 tokfix(p);
20187 lit = STR_NEW3(tok(p), toklen(p), enc, func);
20188 set_yylval_str(lit);
20189 flush_string_content(p, enc, 0);
20190
20191 return tSTRING_CONTENT;
20192}
20193
20194static enum yytokentype
20195heredoc_identifier(struct parser_params *p)
20196{
20197 /*
20198 * term_len is length of `<<"END"` except `END`,
20199 * in this case term_len is 4 (<, <, " and ").
20200 */
20201 long len, offset = p->lex.pcur - p->lex.pbeg;
20202 int c = nextc(p), term, func = 0, quote = 0;
20203 enum yytokentype token = tSTRING_BEG;
20204 int indent = 0;
20205
20206 if (c == '-') {
20207 c = nextc(p);
20208 func = STR_FUNC_INDENT;
20209 offset++;
20210 }
20211 else if (c == '~') {
20212 c = nextc(p);
20213 func = STR_FUNC_INDENT;
20214 offset++;
20215 indent = INT_MAX;
20216 }
20217 switch (c) {
20218 case '\'':
20219 func |= str_squote; goto quoted;
20220 case '"':
20221 func |= str_dquote; goto quoted;
20222 case '`':
20223 token = tXSTRING_BEG;
20224 func |= str_xquote; goto quoted;
20225
20226 quoted:
20227 quote++;
20228 offset++;
20229 term = c;
20230 len = 0;
20231 while ((c = nextc(p)) != term) {
20232 if (c == -1 || c == '\r' || c == '\n') {
20233 yyerror0("unterminated here document identifier");
20234 return -1;
20235 }
20236 }
20237 break;
20238
20239 default:
20240 if (!parser_is_identchar(p)) {
20241 pushback(p, c);
20242 if (func & STR_FUNC_INDENT) {
20243 pushback(p, indent > 0 ? '~' : '-');
20244 }
20245 return 0;
20246 }
20247 func |= str_dquote;
20248 do {
20249 int n = parser_precise_mbclen(p, p->lex.pcur-1);
20250 if (n < 0) return 0;
20251 p->lex.pcur += --n;
20252 } while ((c = nextc(p)) != -1 && parser_is_identchar(p));
20253 pushback(p, c);
20254 break;
20255 }
20256
20257 len = p->lex.pcur - (p->lex.pbeg + offset) - quote;
20258 if ((unsigned long)len >= HERETERM_LENGTH_MAX)
20259 yyerror0("too long here document identifier");
20260 dispatch_scan_event(p, tHEREDOC_BEG);
20261 lex_goto_eol(p);
20262
20263 p->lex.strterm = new_heredoc(p);
20264 rb_strterm_heredoc_t *here = &p->lex.strterm->u.heredoc;
20265 here->offset = offset;
20266 here->sourceline = p->ruby_sourceline;
20267 here->length = (unsigned)len;
20268 here->quote = quote;
20269 here->func = func;
20270 here->lastline = p->lex.lastline;
20271
20272 token_flush(p);
20273 p->heredoc_indent = indent;
20274 p->heredoc_line_indent = 0;
20275 return token;
20276}
20277
20278static void
20279heredoc_restore(struct parser_params *p, rb_strterm_heredoc_t *here)
20280{
20281 rb_parser_string_t *line;
20282 rb_strterm_t *term = p->lex.strterm;
20283
20284 p->lex.strterm = 0;
20285 line = here->lastline;
20286 p->lex.lastline = line;
20287 p->lex.pbeg = PARSER_STRING_PTR(line);
20288 p->lex.pend = p->lex.pbeg + PARSER_STRING_LEN(line);
20289 p->lex.pcur = p->lex.pbeg + here->offset + here->length + here->quote;
20290 p->lex.ptok = p->lex.pbeg + here->offset - here->quote;
20291 p->heredoc_end = p->ruby_sourceline;
20292 p->ruby_sourceline = (int)here->sourceline;
20293 if (p->eofp) p->lex.nextline = AFTER_HEREDOC_WITHOUT_TERMINATOR;
20294 p->eofp = 0;
20295 xfree(term);
20296}
20297
20298static int
20299dedent_string_column(const char *str, long len, int width)
20300{
20301 int i, col = 0;
20302
20303 for (i = 0; i < len && col < width; i++) {
20304 if (str[i] == ' ') {
20305 col++;
20306 }
20307 else if (str[i] == '\t') {
20308 int n = TAB_WIDTH * (col / TAB_WIDTH + 1);
20309 if (n > width) break;
20310 col = n;
20311 }
20312 else {
20313 break;
20314 }
20315 }
20316
20317 return i;
20318}
20319
20320static int
20321dedent_string(struct parser_params *p, rb_parser_string_t *string, int width)
20322{
20323 char *str;
20324 long len;
20325 int i;
20326
20327 len = PARSER_STRING_LEN(string);
20328 str = PARSER_STRING_PTR(string);
20329
20330 i = dedent_string_column(str, len, width);
20331 if (!i) return 0;
20332
20333 rb_parser_str_modify(string);
20334 str = PARSER_STRING_PTR(string);
20335 if (PARSER_STRING_LEN(string) != len)
20336 rb_fatal("literal string changed: %s", PARSER_STRING_PTR(string));
20337 MEMMOVE(str, str + i, char, len - i);
20338 rb_parser_str_set_len(p, string, len - i);
20339 return i;
20340}
20341
20342static NODE *
20343heredoc_dedent(struct parser_params *p, NODE *root)
20344{
20345 NODE *node, *str_node, *prev_node;
20346 int indent = p->heredoc_indent;
20347 rb_parser_string_t *prev_lit = 0;
20348
20349 if (indent <= 0) return root;
20350 if (!root) return root;
20351
20352 prev_node = node = str_node = root;
20353 if (nd_type_p(root, NODE_LIST)) str_node = RNODE_LIST(root)->nd_head;
20354
20355 while (str_node) {
20356 rb_parser_string_t *lit = RNODE_STR(str_node)->string;
20357 if (nd_fl_newline(str_node)) {
20358 dedent_string(p, lit, indent);
20359 }
20360 if (!prev_lit) {
20361 prev_lit = lit;
20362 }
20363 else if (!literal_concat0(p, prev_lit, lit)) {
20364 return 0;
20365 }
20366 else {
20367 NODE *end = RNODE_LIST(node)->as.nd_end;
20368 node = RNODE_LIST(prev_node)->nd_next = RNODE_LIST(node)->nd_next;
20369 if (!node) {
20370 if (nd_type_p(prev_node, NODE_DSTR))
20371 nd_set_type(prev_node, NODE_STR);
20372 break;
20373 }
20374 RNODE_LIST(node)->as.nd_end = end;
20375 goto next_str;
20376 }
20377
20378 str_node = 0;
20379 while ((nd_type_p(node, NODE_LIST) || nd_type_p(node, NODE_DSTR)) && (node = RNODE_LIST(prev_node = node)->nd_next) != 0) {
20380 next_str:
20381 if (!nd_type_p(node, NODE_LIST)) break;
20382 if ((str_node = RNODE_LIST(node)->nd_head) != 0) {
20383 enum node_type type = nd_type(str_node);
20384 if (type == NODE_STR || type == NODE_DSTR) break;
20385 prev_lit = 0;
20386 str_node = 0;
20387 }
20388 }
20389 }
20390 return root;
20391}
20392
20393static int
20394whole_match_p(struct parser_params *p, const char *eos, long len, int indent)
20395{
20396 const char *beg = p->lex.pbeg;
20397 const char *ptr = p->lex.pend;
20398
20399 if (ptr - beg < len) return FALSE;
20400 if (ptr > beg && ptr[-1] == '\n') {
20401 if (--ptr > beg && ptr[-1] == '\r') --ptr;
20402 if (ptr - beg < len) return FALSE;
20403 }
20404 if (strncmp(eos, ptr -= len, len)) return FALSE;
20405 if (indent) {
20406 while (beg < ptr && ISSPACE(*beg)) beg++;
20407 }
20408 return beg == ptr;
20409}
20410
20411static int
20412word_match_p(struct parser_params *p, const char *word, long len)
20413{
20414 if (strncmp(p->lex.pcur, word, len)) return 0;
20415 if (lex_eol_n_p(p, len)) return 1;
20416 int c = (unsigned char)p->lex.pcur[len];
20417 if (ISSPACE(c)) return 1;
20418 switch (c) {
20419 case '\0': case '\004': case '\032': return 1;
20420 }
20421 return 0;
20422}
20423
20424#define NUM_SUFFIX_R (1<<0)
20425#define NUM_SUFFIX_I (1<<1)
20426#define NUM_SUFFIX_ALL 3
20427
20428static int
20429number_literal_suffix(struct parser_params *p, int mask)
20430{
20431 int c, result = 0;
20432 const char *lastp = p->lex.pcur;
20433
20434 while ((c = nextc(p)) != -1) {
20435 if ((mask & NUM_SUFFIX_I) && c == 'i') {
20436 result |= (mask & NUM_SUFFIX_I);
20437 mask &= ~NUM_SUFFIX_I;
20438 /* r after i, rational of complex is disallowed */
20439 mask &= ~NUM_SUFFIX_R;
20440 continue;
20441 }
20442 if ((mask & NUM_SUFFIX_R) && c == 'r') {
20443 result |= (mask & NUM_SUFFIX_R);
20444 mask &= ~NUM_SUFFIX_R;
20445 continue;
20446 }
20447 if (!ISASCII(c) || ISALPHA(c) || c == '_') {
20448 p->lex.pcur = lastp;
20449 literal_flush(p, p->lex.pcur);
20450 return 0;
20451 }
20452 pushback(p, c);
20453 break;
20454 }
20455 return result;
20456}
20457
20458static enum yytokentype
20459set_number_literal(struct parser_params *p, enum yytokentype type, int suffix, int base, int seen_point)
20460{
20461 enum rb_numeric_type numeric_type = integer_literal;
20462
20463 if (type == tFLOAT) {
20464 numeric_type = float_literal;
20465 }
20466
20467 if (suffix & NUM_SUFFIX_R) {
20468 type = tRATIONAL;
20469 numeric_type = rational_literal;
20470 }
20471 if (suffix & NUM_SUFFIX_I) {
20472 type = tIMAGINARY;
20473 }
20474
20475 switch (type) {
20476 case tINTEGER:
20477 set_yylval_node(NEW_INTEGER(strdup(tok(p)), base, &_cur_loc));
20478 break;
20479 case tFLOAT:
20480 set_yylval_node(NEW_FLOAT(strdup(tok(p)), &_cur_loc));
20481 break;
20482 case tRATIONAL:
20483 set_yylval_node(NEW_RATIONAL(strdup(tok(p)), base, seen_point, &_cur_loc));
20484 break;
20485 case tIMAGINARY:
20486 set_yylval_node(NEW_IMAGINARY(strdup(tok(p)), base, seen_point, numeric_type, &_cur_loc));
20487 (void)numeric_type; /* for ripper */
20488 break;
20489 default:
20490 rb_bug("unexpected token: %d", type);
20491 }
20492 SET_LEX_STATE(EXPR_END);
20493 return type;
20494}
20495
20496#define dispatch_heredoc_end(p) parser_dispatch_heredoc_end(p, __LINE__)
20497static void
20498parser_dispatch_heredoc_end(struct parser_params *p, int line)
20499{
20500 if (has_delayed_token(p))
20501 dispatch_delayed_token(p, tSTRING_CONTENT);
20502
20503#ifdef RIPPER
20504 VALUE str = STR_NEW(p->lex.ptok, p->lex.pend - p->lex.ptok);
20505 ripper_dispatch1(p, ripper_token2eventid(tHEREDOC_END), str);
20506#else
20507 if (p->keep_tokens) {
20508 rb_parser_string_t *str = rb_parser_encoding_string_new(p, p->lex.ptok, p->lex.pend - p->lex.ptok, p->enc);
20509 RUBY_SET_YYLLOC_OF_HEREDOC_END(*p->yylloc);
20510 parser_append_tokens(p, str, tHEREDOC_END, line);
20511 }
20512#endif
20513
20514 RUBY_SET_YYLLOC_FROM_STRTERM_HEREDOC(*p->yylloc);
20515 lex_goto_eol(p);
20516 token_flush(p);
20517}
20518
20519static enum yytokentype
20520here_document(struct parser_params *p, rb_strterm_heredoc_t *here)
20521{
20522 int c, func, indent = 0;
20523 const char *eos, *ptr, *ptr_end;
20524 long len;
20525 rb_parser_string_t *str = 0;
20526 rb_encoding *enc = p->enc;
20527 rb_encoding *base_enc = 0;
20528 int bol;
20529#ifdef RIPPER
20530 VALUE s_value;
20531#endif
20532
20533 eos = PARSER_STRING_PTR(here->lastline) + here->offset;
20534 len = here->length;
20535 indent = (func = here->func) & STR_FUNC_INDENT;
20536
20537 if ((c = nextc(p)) == -1) {
20538 error:
20539#ifdef RIPPER
20540 if (!has_delayed_token(p)) {
20541 dispatch_scan_event(p, tSTRING_CONTENT);
20542 }
20543 else if (p->delayed.end_line + 1 == p->ruby_sourceline) {
20544 if ((len = p->lex.pcur - p->lex.ptok) > 0) {
20545 if (!(func & STR_FUNC_REGEXP)) {
20546 int cr = ENC_CODERANGE_UNKNOWN;
20547 rb_str_coderange_scan_restartable(p->lex.ptok, p->lex.pcur, enc, &cr);
20548 if (cr != ENC_CODERANGE_7BIT &&
20549 rb_is_usascii_enc(p->enc) &&
20550 enc != rb_utf8_encoding()) {
20551 enc = rb_ascii8bit_encoding();
20552 }
20553 }
20554 rb_parser_enc_str_buf_cat(p, p->delayed.token, p->lex.ptok, len, enc);
20555 }
20556 dispatch_delayed_token(p, tSTRING_CONTENT);
20557 }
20558 else {
20559 dispatch_delayed_token(p, tSTRING_CONTENT);
20560 dispatch_scan_event(p, tSTRING_CONTENT);
20561 }
20562 lex_goto_eol(p);
20563#endif
20564 heredoc_restore(p, &p->lex.strterm->u.heredoc);
20565 compile_error(p, "can't find string \"%.*s\" anywhere before EOF",
20566 (int)len, eos);
20567 token_flush(p);
20568 SET_LEX_STATE(EXPR_END);
20569 return tSTRING_END;
20570 }
20571 bol = was_bol(p);
20572 if (!bol) {
20573 /* not beginning of line, cannot be the terminator */
20574 }
20575 else if (p->heredoc_line_indent == -1) {
20576 /* `heredoc_line_indent == -1` means
20577 * - "after an interpolation in the same line", or
20578 * - "in a continuing line"
20579 */
20580 p->heredoc_line_indent = 0;
20581 }
20582 else if (whole_match_p(p, eos, len, indent)) {
20583 dispatch_heredoc_end(p);
20584 restore:
20585 heredoc_restore(p, &p->lex.strterm->u.heredoc);
20586 token_flush(p);
20587 SET_LEX_STATE(EXPR_END);
20588 return tSTRING_END;
20589 }
20590
20591 if (!(func & STR_FUNC_EXPAND)) {
20592 do {
20593 ptr = PARSER_STRING_PTR(p->lex.lastline);
20594 ptr_end = p->lex.pend;
20595 if (ptr_end > ptr) {
20596 switch (ptr_end[-1]) {
20597 case '\n':
20598 if (--ptr_end == ptr || ptr_end[-1] != '\r') {
20599 ptr_end++;
20600 break;
20601 }
20602 case '\r':
20603 --ptr_end;
20604 }
20605 }
20606
20607 if (p->heredoc_indent > 0) {
20608 long i = 0;
20609 while (ptr + i < ptr_end && parser_update_heredoc_indent(p, ptr[i]))
20610 i++;
20611 p->heredoc_line_indent = 0;
20612 }
20613
20614 if (str)
20615 parser_str_cat(str, ptr, ptr_end - ptr);
20616 else
20617 str = rb_parser_encoding_string_new(p, ptr, ptr_end - ptr, enc);
20618 if (!lex_eol_ptr_p(p, ptr_end)) parser_str_cat_cstr(str, "\n");
20619 lex_goto_eol(p);
20620 if (p->heredoc_indent > 0) {
20621 goto flush_str;
20622 }
20623 if (nextc(p) == -1) {
20624 if (str) {
20625 rb_parser_string_free(p, str);
20626 str = 0;
20627 }
20628 goto error;
20629 }
20630 } while (!whole_match_p(p, eos, len, indent));
20631 }
20632 else {
20633 /* int mb = ENC_CODERANGE_7BIT, *mbp = &mb;*/
20634 newtok(p);
20635 if (c == '#') {
20636 enum yytokentype t = parser_peek_variable_name(p);
20637 if (p->heredoc_line_indent != -1) {
20638 if (p->heredoc_indent > p->heredoc_line_indent) {
20639 p->heredoc_indent = p->heredoc_line_indent;
20640 }
20641 p->heredoc_line_indent = -1;
20642 }
20643 if (t) return t;
20644 tokadd(p, '#');
20645 c = nextc(p);
20646 }
20647 do {
20648 pushback(p, c);
20649 enc = p->enc;
20650 if ((c = tokadd_string(p, func, '\n', 0, NULL, &enc, &base_enc)) == -1) {
20651 if (p->eofp) goto error;
20652 goto restore;
20653 }
20654 if (c != '\n') {
20655 if (c == '\\') p->heredoc_line_indent = -1;
20656 flush:
20657 str = STR_NEW3(tok(p), toklen(p), enc, func);
20658 flush_str:
20659 set_yylval_str(str);
20660#ifndef RIPPER
20661 if (bol) nd_set_fl_newline(yylval.node);
20662#endif
20663 flush_string_content(p, enc, 0);
20664 return tSTRING_CONTENT;
20665 }
20666 tokadd(p, nextc(p));
20667 if (p->heredoc_indent > 0) {
20668 lex_goto_eol(p);
20669 goto flush;
20670 }
20671 /* if (mbp && mb == ENC_CODERANGE_UNKNOWN) mbp = 0;*/
20672 if ((c = nextc(p)) == -1) goto error;
20673 } while (!whole_match_p(p, eos, len, indent));
20674 str = STR_NEW3(tok(p), toklen(p), enc, func);
20675 }
20676 dispatch_heredoc_end(p);
20677 heredoc_restore(p, &p->lex.strterm->u.heredoc);
20678 token_flush(p);
20679 p->lex.strterm = NEW_STRTERM(func | STR_FUNC_TERM, 0, 0);
20680#ifdef RIPPER
20681 /* Preserve s_value for set_yylval_str */
20682 s_value = p->s_value;
20683#endif
20684 set_yylval_str(str);
20685#ifdef RIPPER
20686 set_parser_s_value(s_value);
20687#endif
20688
20689#ifndef RIPPER
20690 if (bol) nd_set_fl_newline(yylval.node);
20691#endif
20692 return tSTRING_CONTENT;
20693}
20694
20695#include "lex.c"
20696
20697static int
20698arg_ambiguous(struct parser_params *p, char c)
20699{
20700#ifndef RIPPER
20701 if (c == '/') {
20702 rb_warning1("ambiguity between regexp and two divisions: wrap regexp in parentheses or add a space after '%c' operator", WARN_I(c));
20703 }
20704 else {
20705 rb_warning1("ambiguous first argument; put parentheses or a space even after '%c' operator", WARN_I(c));
20706 }
20707#else
20708 dispatch1(arg_ambiguous, rb_usascii_str_new(&c, 1));
20709#endif
20710 return TRUE;
20711}
20712
20713/* returns true value if formal argument error;
20714 * Qtrue, or error message if ripper */
20715static VALUE
20716formal_argument_error(struct parser_params *p, ID id)
20717{
20718 switch (id_type(id)) {
20719 case ID_LOCAL:
20720 break;
20721#ifndef RIPPER
20722# define ERR(mesg) (yyerror0(mesg), Qtrue)
20723#else
20724# define ERR(mesg) WARN_S(mesg)
20725#endif
20726 case ID_CONST:
20727 return ERR("formal argument cannot be a constant");
20728 case ID_INSTANCE:
20729 return ERR("formal argument cannot be an instance variable");
20730 case ID_GLOBAL:
20731 return ERR("formal argument cannot be a global variable");
20732 case ID_CLASS:
20733 return ERR("formal argument cannot be a class variable");
20734 default:
20735 return ERR("formal argument must be local variable");
20736#undef ERR
20737 }
20738 shadowing_lvar(p, id);
20739
20740 return Qfalse;
20741}
20742
20743static int
20744lvar_defined(struct parser_params *p, ID id)
20745{
20746 return (dyna_in_block(p) && dvar_defined(p, id)) || local_id(p, id);
20747}
20748
20749/* emacsen -*- hack */
20750static long
20751parser_encode_length(struct parser_params *p, const char *name, long len)
20752{
20753 long nlen;
20754
20755 if (len > 5 && name[nlen = len - 5] == '-') {
20756 if (rb_memcicmp(name + nlen + 1, "unix", 4) == 0)
20757 return nlen;
20758 }
20759 if (len > 4 && name[nlen = len - 4] == '-') {
20760 if (rb_memcicmp(name + nlen + 1, "dos", 3) == 0)
20761 return nlen;
20762 if (rb_memcicmp(name + nlen + 1, "mac", 3) == 0 &&
20763 !(len == 8 && rb_memcicmp(name, "utf8-mac", len) == 0))
20764 /* exclude UTF8-MAC because the encoding named "UTF8" doesn't exist in Ruby */
20765 return nlen;
20766 }
20767 return len;
20768}
20769
20770static void
20771parser_set_encode(struct parser_params *p, const char *name)
20772{
20773 rb_encoding *enc;
20774 VALUE excargs[3];
20775 int idx = 0;
20776
20777 const char *wrong = 0;
20778 switch (*name) {
20779 case 'e': case 'E': wrong = "external"; break;
20780 case 'i': case 'I': wrong = "internal"; break;
20781 case 'f': case 'F': wrong = "filesystem"; break;
20782 case 'l': case 'L': wrong = "locale"; break;
20783 }
20784 if (wrong && STRCASECMP(name, wrong) == 0) goto unknown;
20785 idx = rb_enc_find_index(name);
20786 if (idx < 0) {
20787 unknown:
20788 excargs[1] = rb_sprintf("unknown encoding name: %s", name);
20789 error:
20790 excargs[0] = rb_eArgError;
20791 excargs[2] = rb_make_backtrace();
20792 rb_ary_unshift(excargs[2], rb_sprintf("%"PRIsVALUE":%d", p->ruby_sourcefile_string, p->ruby_sourceline));
20793 VALUE exc = rb_make_exception(3, excargs);
20794 ruby_show_error_line(p, exc, &(YYLTYPE)RUBY_INIT_YYLLOC(), p->ruby_sourceline, p->lex.lastline);
20795
20796 rb_ast_free(p->ast);
20797 p->ast = NULL;
20798
20799 rb_exc_raise(exc);
20800 }
20801 enc = rb_enc_from_index(idx);
20802 if (!rb_enc_asciicompat(enc)) {
20803 excargs[1] = rb_sprintf("%s is not ASCII compatible", rb_enc_name(enc));
20804 goto error;
20805 }
20806 p->enc = enc;
20807#ifndef RIPPER
20808 if (p->debug_lines) {
20809 long i;
20810 for (i = 0; i < p->debug_lines->len; i++) {
20811 rb_parser_enc_associate(p, p->debug_lines->data[i], enc);
20812 }
20813 }
20814#endif
20815}
20816
20817static bool
20818comment_at_top(struct parser_params *p)
20819{
20820 if (p->token_seen) return false;
20821 return (p->line_count == (p->has_shebang ? 2 : 1));
20822}
20823
20824typedef long (*rb_magic_comment_length_t)(struct parser_params *p, const char *name, long len);
20825typedef void (*rb_magic_comment_setter_t)(struct parser_params *p, const char *name, const char *val);
20826
20827static int parser_invalid_pragma_value(struct parser_params *p, const char *name, const char *val);
20828
20829static void
20830magic_comment_encoding(struct parser_params *p, const char *name, const char *val)
20831{
20832 if (!comment_at_top(p)) {
20833 return;
20834 }
20835 parser_set_encode(p, val);
20836}
20837
20838static int
20839parser_get_bool(struct parser_params *p, const char *name, const char *val)
20840{
20841 switch (*val) {
20842 case 't': case 'T':
20843 if (STRCASECMP(val, "true") == 0) {
20844 return TRUE;
20845 }
20846 break;
20847 case 'f': case 'F':
20848 if (STRCASECMP(val, "false") == 0) {
20849 return FALSE;
20850 }
20851 break;
20852 }
20853 return parser_invalid_pragma_value(p, name, val);
20854}
20855
20856static int
20857parser_invalid_pragma_value(struct parser_params *p, const char *name, const char *val)
20858{
20859 rb_warning2("invalid value for %s: %s", WARN_S(name), WARN_S(val));
20860 return -1;
20861}
20862
20863static void
20864parser_set_token_info(struct parser_params *p, const char *name, const char *val)
20865{
20866 int b = parser_get_bool(p, name, val);
20867 if (b >= 0) p->token_info_enabled = b;
20868}
20869
20870static void
20871parser_set_frozen_string_literal(struct parser_params *p, const char *name, const char *val)
20872{
20873 int b;
20874
20875 if (p->token_seen) {
20876 rb_warning1("'%s' is ignored after any tokens", WARN_S(name));
20877 return;
20878 }
20879
20880 b = parser_get_bool(p, name, val);
20881 if (b < 0) return;
20882
20883 p->frozen_string_literal = b;
20884}
20885
20886static void
20887parser_set_shareable_constant_value(struct parser_params *p, const char *name, const char *val)
20888{
20889 for (const char *s = p->lex.pbeg, *e = p->lex.pcur; s < e; ++s) {
20890 if (*s == ' ' || *s == '\t') continue;
20891 if (*s == '#') break;
20892 rb_warning1("'%s' is ignored unless in comment-only line", WARN_S(name));
20893 return;
20894 }
20895
20896 switch (*val) {
20897 case 'n': case 'N':
20898 if (STRCASECMP(val, "none") == 0) {
20899 p->ctxt.shareable_constant_value = rb_parser_shareable_none;
20900 return;
20901 }
20902 break;
20903 case 'l': case 'L':
20904 if (STRCASECMP(val, "literal") == 0) {
20905 p->ctxt.shareable_constant_value = rb_parser_shareable_literal;
20906 return;
20907 }
20908 break;
20909 case 'e': case 'E':
20910 if (STRCASECMP(val, "experimental_copy") == 0) {
20911 p->ctxt.shareable_constant_value = rb_parser_shareable_copy;
20912 return;
20913 }
20914 if (STRCASECMP(val, "experimental_everything") == 0) {
20915 p->ctxt.shareable_constant_value = rb_parser_shareable_everything;
20916 return;
20917 }
20918 break;
20919 }
20920 parser_invalid_pragma_value(p, name, val);
20921}
20922
20923# if WARN_PAST_SCOPE
20924static void
20925parser_set_past_scope(struct parser_params *p, const char *name, const char *val)
20926{
20927 int b = parser_get_bool(p, name, val);
20928 if (b >= 0) p->past_scope_enabled = b;
20929}
20930# endif
20931
20933 const char *name;
20934 rb_magic_comment_setter_t func;
20935 rb_magic_comment_length_t length;
20936};
20937
20938static const struct magic_comment magic_comments[] = {
20939 {"coding", magic_comment_encoding, parser_encode_length},
20940 {"encoding", magic_comment_encoding, parser_encode_length},
20941 {"frozen_string_literal", parser_set_frozen_string_literal},
20942 {"shareable_constant_value", parser_set_shareable_constant_value},
20943 {"warn_indent", parser_set_token_info},
20944# if WARN_PAST_SCOPE
20945 {"warn_past_scope", parser_set_past_scope},
20946# endif
20947};
20948
20949static const char *
20950magic_comment_marker(const char *str, long len)
20951{
20952 long i = 2;
20953
20954 while (i < len) {
20955 switch (str[i]) {
20956 case '-':
20957 if (str[i-1] == '*' && str[i-2] == '-') {
20958 return str + i + 1;
20959 }
20960 i += 2;
20961 break;
20962 case '*':
20963 if (i + 1 >= len) return 0;
20964 if (str[i+1] != '-') {
20965 i += 4;
20966 }
20967 else if (str[i-1] != '-') {
20968 i += 2;
20969 }
20970 else {
20971 return str + i + 2;
20972 }
20973 break;
20974 default:
20975 i += 3;
20976 break;
20977 }
20978 }
20979 return 0;
20980}
20981
20982static int
20983parser_magic_comment(struct parser_params *p, const char *str, long len)
20984{
20985 int indicator = 0;
20986 VALUE name = 0, val = 0;
20987 const char *beg, *end, *vbeg, *vend;
20988#define str_copy(_s, _p, _n) ((_s) \
20989 ? (void)(rb_str_resize((_s), (_n)), \
20990 MEMCPY(RSTRING_PTR(_s), (_p), char, (_n)), (_s)) \
20991 : (void)((_s) = STR_NEW((_p), (_n))))
20992
20993 if (len <= 7) return FALSE;
20994 if (!!(beg = magic_comment_marker(str, len))) {
20995 if (!(end = magic_comment_marker(beg, str + len - beg)))
20996 return FALSE;
20997 indicator = TRUE;
20998 str = beg;
20999 len = end - beg - 3;
21000 }
21001
21002 /* %r"([^\\s\'\":;]+)\\s*:\\s*(\"(?:\\\\.|[^\"])*\"|[^\"\\s;]+)[\\s;]*" */
21003 while (len > 0) {
21004 const struct magic_comment *mc = magic_comments;
21005 char *s;
21006 int i;
21007 long n = 0;
21008
21009 for (; len > 0 && *str; str++, --len) {
21010 switch (*str) {
21011 case '\'': case '"': case ':': case ';':
21012 continue;
21013 }
21014 if (!ISSPACE(*str)) break;
21015 }
21016 for (beg = str; len > 0; str++, --len) {
21017 switch (*str) {
21018 case '\'': case '"': case ':': case ';':
21019 break;
21020 default:
21021 if (ISSPACE(*str)) break;
21022 continue;
21023 }
21024 break;
21025 }
21026 for (end = str; len > 0 && ISSPACE(*str); str++, --len);
21027 if (!len) break;
21028 if (*str != ':') {
21029 if (!indicator) return FALSE;
21030 continue;
21031 }
21032
21033 do str++; while (--len > 0 && ISSPACE(*str));
21034 if (!len) break;
21035 const char *tok_beg = str;
21036 if (*str == '"') {
21037 for (vbeg = ++str; --len > 0 && *str != '"'; str++) {
21038 if (*str == '\\') {
21039 --len;
21040 ++str;
21041 }
21042 }
21043 vend = str;
21044 if (len) {
21045 --len;
21046 ++str;
21047 }
21048 }
21049 else {
21050 for (vbeg = str; len > 0 && *str != '"' && *str != ';' && !ISSPACE(*str); --len, str++);
21051 vend = str;
21052 }
21053 const char *tok_end = str;
21054 if (indicator) {
21055 while (len > 0 && (*str == ';' || ISSPACE(*str))) --len, str++;
21056 }
21057 else {
21058 while (len > 0 && (ISSPACE(*str))) --len, str++;
21059 if (len) return FALSE;
21060 }
21061
21062 n = end - beg;
21063 str_copy(name, beg, n);
21064 s = RSTRING_PTR(name);
21065 for (i = 0; i < n; ++i) {
21066 if (s[i] == '-') s[i] = '_';
21067 }
21068 do {
21069 if (STRNCASECMP(mc->name, s, n) == 0 && !mc->name[n]) {
21070 n = vend - vbeg;
21071 if (mc->length) {
21072 n = (*mc->length)(p, vbeg, n);
21073 }
21074 str_copy(val, vbeg, n);
21075 p->lex.ptok = tok_beg;
21076 p->lex.pcur = tok_end;
21077 (*mc->func)(p, mc->name, RSTRING_PTR(val));
21078 break;
21079 }
21080 } while (++mc < magic_comments + numberof(magic_comments));
21081#ifdef RIPPER
21082 str_copy(val, vbeg, vend - vbeg);
21083 dispatch2(magic_comment, name, val);
21084#endif
21085 }
21086
21087 return TRUE;
21088}
21089
21090static void
21091set_file_encoding(struct parser_params *p, const char *str, const char *send)
21092{
21093 int sep = 0;
21094 const char *beg = str;
21095 VALUE s;
21096
21097 for (;;) {
21098 if (send - str <= 6) return;
21099 switch (str[6]) {
21100 case 'C': case 'c': str += 6; continue;
21101 case 'O': case 'o': str += 5; continue;
21102 case 'D': case 'd': str += 4; continue;
21103 case 'I': case 'i': str += 3; continue;
21104 case 'N': case 'n': str += 2; continue;
21105 case 'G': case 'g': str += 1; continue;
21106 case '=': case ':':
21107 sep = 1;
21108 str += 6;
21109 break;
21110 default:
21111 str += 6;
21112 if (ISSPACE(*str)) break;
21113 continue;
21114 }
21115 if (STRNCASECMP(str-6, "coding", 6) == 0) break;
21116 sep = 0;
21117 }
21118 for (;;) {
21119 do {
21120 if (++str >= send) return;
21121 } while (ISSPACE(*str));
21122 if (sep) break;
21123 if (*str != '=' && *str != ':') return;
21124 sep = 1;
21125 str++;
21126 }
21127 beg = str;
21128 while ((*str == '-' || *str == '_' || ISALNUM(*str)) && ++str < send);
21129 s = rb_str_new(beg, parser_encode_length(p, beg, str - beg));
21130 p->lex.ptok = beg;
21131 p->lex.pcur = str;
21132 parser_set_encode(p, RSTRING_PTR(s));
21133 rb_str_resize(s, 0);
21134}
21135
21136static void
21137parser_prepare(struct parser_params *p)
21138{
21139 int c = nextc0(p, FALSE);
21140 p->token_info_enabled = !compile_for_eval && RTEST(ruby_verbose);
21141 switch (c) {
21142 case '#':
21143 if (peek(p, '!')) p->has_shebang = 1;
21144 break;
21145 case 0xef: /* UTF-8 BOM marker */
21146 if (!lex_eol_n_p(p, 2) &&
21147 (unsigned char)p->lex.pcur[0] == 0xbb &&
21148 (unsigned char)p->lex.pcur[1] == 0xbf) {
21149 p->enc = rb_utf8_encoding();
21150 p->lex.pcur += 2;
21151#ifndef RIPPER
21152 if (p->debug_lines) {
21153 rb_parser_string_set_encoding(p->lex.lastline, p->enc);
21154 }
21155#endif
21156 p->lex.pbeg = p->lex.pcur;
21157 token_flush(p);
21158 return;
21159 }
21160 break;
21161 case -1: /* end of script. */
21162 return;
21163 }
21164 pushback(p, c);
21165 p->enc = rb_parser_str_get_encoding(p->lex.lastline);
21166}
21167
21168#ifndef RIPPER
21169#define ambiguous_operator(tok, op, syn) ( \
21170 rb_warning0("'"op"' after local variable or literal is interpreted as binary operator"), \
21171 rb_warning0("even though it seems like "syn""))
21172#else
21173#define ambiguous_operator(tok, op, syn) \
21174 dispatch2(operator_ambiguous, TOKEN2VAL(tok), rb_str_new_cstr(syn))
21175#endif
21176#define warn_balanced(tok, op, syn) ((void) \
21177 (!IS_lex_state_for(last_state, EXPR_CLASS|EXPR_DOT|EXPR_FNAME|EXPR_ENDFN) && \
21178 space_seen && !ISSPACE(c) && \
21179 (ambiguous_operator(tok, op, syn), 0)), \
21180 (enum yytokentype)(tok))
21181
21182static enum yytokentype
21183no_digits(struct parser_params *p)
21184{
21185 yyerror0("numeric literal without digits");
21186 if (peek(p, '_')) nextc(p);
21187 /* dummy 0, for tUMINUS_NUM at numeric */
21188 return set_number_literal(p, tINTEGER, 0, 10, 0);
21189}
21190
21191static enum yytokentype
21192parse_numeric(struct parser_params *p, int c)
21193{
21194 int is_float, seen_point, seen_e, nondigit;
21195 int suffix;
21196
21197 is_float = seen_point = seen_e = nondigit = 0;
21198 SET_LEX_STATE(EXPR_END);
21199 newtok(p);
21200 if (c == '-' || c == '+') {
21201 tokadd(p, c);
21202 c = nextc(p);
21203 }
21204 if (c == '0') {
21205 int start = toklen(p);
21206 c = nextc(p);
21207 if (c == 'x' || c == 'X') {
21208 /* hexadecimal */
21209 c = nextc(p);
21210 if (c != -1 && ISXDIGIT(c)) {
21211 do {
21212 if (c == '_') {
21213 if (nondigit) break;
21214 nondigit = c;
21215 continue;
21216 }
21217 if (!ISXDIGIT(c)) break;
21218 nondigit = 0;
21219 tokadd(p, c);
21220 } while ((c = nextc(p)) != -1);
21221 }
21222 pushback(p, c);
21223 tokfix(p);
21224 if (toklen(p) == start) {
21225 return no_digits(p);
21226 }
21227 else if (nondigit) goto trailing_uc;
21228 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
21229 return set_number_literal(p, tINTEGER, suffix, 16, 0);
21230 }
21231 if (c == 'b' || c == 'B') {
21232 /* binary */
21233 c = nextc(p);
21234 if (c == '0' || c == '1') {
21235 do {
21236 if (c == '_') {
21237 if (nondigit) break;
21238 nondigit = c;
21239 continue;
21240 }
21241 if (c != '0' && c != '1') break;
21242 nondigit = 0;
21243 tokadd(p, c);
21244 } while ((c = nextc(p)) != -1);
21245 }
21246 pushback(p, c);
21247 tokfix(p);
21248 if (toklen(p) == start) {
21249 return no_digits(p);
21250 }
21251 else if (nondigit) goto trailing_uc;
21252 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
21253 return set_number_literal(p, tINTEGER, suffix, 2, 0);
21254 }
21255 if (c == 'd' || c == 'D') {
21256 /* decimal */
21257 c = nextc(p);
21258 if (c != -1 && ISDIGIT(c)) {
21259 do {
21260 if (c == '_') {
21261 if (nondigit) break;
21262 nondigit = c;
21263 continue;
21264 }
21265 if (!ISDIGIT(c)) break;
21266 nondigit = 0;
21267 tokadd(p, c);
21268 } while ((c = nextc(p)) != -1);
21269 }
21270 pushback(p, c);
21271 tokfix(p);
21272 if (toklen(p) == start) {
21273 return no_digits(p);
21274 }
21275 else if (nondigit) goto trailing_uc;
21276 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
21277 return set_number_literal(p, tINTEGER, suffix, 10, 0);
21278 }
21279 if (c == '_') {
21280 /* 0_0 */
21281 goto octal_number;
21282 }
21283 if (c == 'o' || c == 'O') {
21284 /* prefixed octal */
21285 c = nextc(p);
21286 if (c == -1 || c == '_' || !ISDIGIT(c)) {
21287 tokfix(p);
21288 return no_digits(p);
21289 }
21290 }
21291 if (c >= '0' && c <= '7') {
21292 /* octal */
21293 octal_number:
21294 do {
21295 if (c == '_') {
21296 if (nondigit) break;
21297 nondigit = c;
21298 continue;
21299 }
21300 if (c < '0' || c > '9') break;
21301 if (c > '7') goto invalid_octal;
21302 nondigit = 0;
21303 tokadd(p, c);
21304 } while ((c = nextc(p)) != -1);
21305 if (toklen(p) > start) {
21306 pushback(p, c);
21307 tokfix(p);
21308 if (nondigit) goto trailing_uc;
21309 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
21310 return set_number_literal(p, tINTEGER, suffix, 8, 0);
21311 }
21312 if (nondigit) {
21313 pushback(p, c);
21314 goto trailing_uc;
21315 }
21316 }
21317 if (c > '7' && c <= '9') {
21318 invalid_octal:
21319 yyerror0("Invalid octal digit");
21320 }
21321 else if (c == '.' || c == 'e' || c == 'E') {
21322 tokadd(p, '0');
21323 }
21324 else {
21325 pushback(p, c);
21326 tokfix(p);
21327 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
21328 return set_number_literal(p, tINTEGER, suffix, 10, 0);
21329 }
21330 }
21331
21332 for (;;) {
21333 switch (c) {
21334 case '0': case '1': case '2': case '3': case '4':
21335 case '5': case '6': case '7': case '8': case '9':
21336 nondigit = 0;
21337 tokadd(p, c);
21338 break;
21339
21340 case '.':
21341 if (nondigit) goto trailing_uc;
21342 if (seen_point || seen_e) {
21343 goto decode_num;
21344 }
21345 else {
21346 int c0 = nextc(p);
21347 if (c0 == -1 || !ISDIGIT(c0)) {
21348 pushback(p, c0);
21349 goto decode_num;
21350 }
21351 c = c0;
21352 }
21353 seen_point = toklen(p);
21354 tokadd(p, '.');
21355 tokadd(p, c);
21356 is_float++;
21357 nondigit = 0;
21358 break;
21359
21360 case 'e':
21361 case 'E':
21362 if (nondigit) {
21363 pushback(p, c);
21364 c = nondigit;
21365 goto decode_num;
21366 }
21367 if (seen_e) {
21368 goto decode_num;
21369 }
21370 nondigit = c;
21371 c = nextc(p);
21372 if (c != '-' && c != '+' && !ISDIGIT(c)) {
21373 pushback(p, c);
21374 c = nondigit;
21375 nondigit = 0;
21376 goto decode_num;
21377 }
21378 tokadd(p, nondigit);
21379 seen_e++;
21380 is_float++;
21381 tokadd(p, c);
21382 nondigit = (c == '-' || c == '+') ? c : 0;
21383 break;
21384
21385 case '_': /* `_' in number just ignored */
21386 if (nondigit) goto decode_num;
21387 nondigit = c;
21388 break;
21389
21390 default:
21391 goto decode_num;
21392 }
21393 c = nextc(p);
21394 }
21395
21396 decode_num:
21397 pushback(p, c);
21398 if (nondigit) {
21399 trailing_uc:
21400 literal_flush(p, p->lex.pcur - 1);
21401 YYLTYPE loc = RUBY_INIT_YYLLOC();
21402 compile_error(p, "trailing '%c' in number", nondigit);
21403 parser_show_error_line(p, &loc);
21404 }
21405 tokfix(p);
21406 if (is_float) {
21407 enum yytokentype type = tFLOAT;
21408
21409 suffix = number_literal_suffix(p, seen_e ? NUM_SUFFIX_I : NUM_SUFFIX_ALL);
21410 if (suffix & NUM_SUFFIX_R) {
21411 type = tRATIONAL;
21412 }
21413 else {
21414 strtod(tok(p), 0);
21415 if (errno == ERANGE) {
21416 rb_warning1("Float %s out of range", WARN_S(tok(p)));
21417 errno = 0;
21418 }
21419 }
21420 return set_number_literal(p, type, suffix, 0, seen_point);
21421 }
21422 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
21423 return set_number_literal(p, tINTEGER, suffix, 10, 0);
21424}
21425
21426static enum yytokentype
21427parse_qmark(struct parser_params *p, int space_seen)
21428{
21429 rb_encoding *enc;
21430 register int c;
21431 rb_parser_string_t *lit;
21432 const char *start = p->lex.pcur;
21433
21434 if (IS_END()) {
21435 SET_LEX_STATE(EXPR_VALUE);
21436 return '?';
21437 }
21438 c = nextc(p);
21439 if (c == -1) {
21440 compile_error(p, "incomplete character syntax");
21441 return 0;
21442 }
21443 if (rb_enc_isspace(c, p->enc)) {
21444 if (!IS_ARG()) {
21445 int c2 = escaped_control_code(c);
21446 if (c2) {
21447 WARN_SPACE_CHAR(c2, "?");
21448 }
21449 }
21450 ternary:
21451 pushback(p, c);
21452 SET_LEX_STATE(EXPR_VALUE);
21453 return '?';
21454 }
21455 newtok(p);
21456 enc = p->enc;
21457 int w = parser_precise_mbclen(p, start);
21458 if (is_identchar(p, start, p->lex.pend, p->enc) &&
21459 !(lex_eol_ptr_n_p(p, start, w) || !is_identchar(p, start + w, p->lex.pend, p->enc))) {
21460 if (space_seen) {
21461 const char *ptr = start;
21462 do {
21463 int n = parser_precise_mbclen(p, ptr);
21464 if (n < 0) return -1;
21465 ptr += n;
21466 } while (!lex_eol_ptr_p(p, ptr) && is_identchar(p, ptr, p->lex.pend, p->enc));
21467 rb_warn2("'?' just followed by '%.*s' is interpreted as" \
21468 " a conditional operator, put a space after '?'",
21469 WARN_I((int)(ptr - start)), WARN_S_L(start, (ptr - start)));
21470 }
21471 goto ternary;
21472 }
21473 else if (c == '\\') {
21474 if (peek(p, 'u')) {
21475 nextc(p);
21476 enc = rb_utf8_encoding();
21477 tokadd_utf8(p, &enc, -1, 0, 0);
21478 }
21479 else if (!ISASCII(c = peekc(p)) && c != -1) {
21480 nextc(p);
21481 if (tokadd_mbchar(p, c) == -1) return 0;
21482 }
21483 else {
21484 c = read_escape(p, 0, p->lex.pcur - rb_strlen_lit("?\\"));
21485 tokadd(p, c);
21486 }
21487 }
21488 else {
21489 if (tokadd_mbchar(p, c) == -1) return 0;
21490 }
21491 tokfix(p);
21492 lit = STR_NEW3(tok(p), toklen(p), enc, 0);
21493 set_yylval_str(lit);
21494 SET_LEX_STATE(EXPR_END);
21495 return tCHAR;
21496}
21497
21498static enum yytokentype
21499parse_percent(struct parser_params *p, const int space_seen, const enum lex_state_e last_state)
21500{
21501 register int c;
21502 const char *ptok = p->lex.pcur;
21503
21504 if (IS_BEG()) {
21505 int term;
21506 int paren;
21507
21508 c = nextc(p);
21509 quotation:
21510 if (c == -1) goto unterminated;
21511 if (!ISALNUM(c)) {
21512 term = c;
21513 if (!ISASCII(c)) goto unknown;
21514 c = 'Q';
21515 }
21516 else {
21517 term = nextc(p);
21518 if (rb_enc_isalnum(term, p->enc) || !parser_isascii(p)) {
21519 unknown:
21520 pushback(p, term);
21521 c = parser_precise_mbclen(p, p->lex.pcur);
21522 if (c < 0) return 0;
21523 p->lex.pcur += c;
21524 yyerror0("unknown type of %string");
21525 return 0;
21526 }
21527 }
21528 if (term == -1) {
21529 unterminated:
21530 compile_error(p, "unterminated quoted string meets end of file");
21531 return 0;
21532 }
21533 paren = term;
21534 if (term == '(') term = ')';
21535 else if (term == '[') term = ']';
21536 else if (term == '{') term = '}';
21537 else if (term == '<') term = '>';
21538 else paren = 0;
21539
21540 p->lex.ptok = ptok-1;
21541 switch (c) {
21542 case 'Q':
21543 p->lex.strterm = NEW_STRTERM(str_dquote, term, paren);
21544 return tSTRING_BEG;
21545
21546 case 'q':
21547 p->lex.strterm = NEW_STRTERM(str_squote, term, paren);
21548 return tSTRING_BEG;
21549
21550 case 'W':
21551 p->lex.strterm = NEW_STRTERM(str_dword, term, paren);
21552 return tWORDS_BEG;
21553
21554 case 'w':
21555 p->lex.strterm = NEW_STRTERM(str_sword, term, paren);
21556 return tQWORDS_BEG;
21557
21558 case 'I':
21559 p->lex.strterm = NEW_STRTERM(str_dword, term, paren);
21560 return tSYMBOLS_BEG;
21561
21562 case 'i':
21563 p->lex.strterm = NEW_STRTERM(str_sword, term, paren);
21564 return tQSYMBOLS_BEG;
21565
21566 case 'x':
21567 p->lex.strterm = NEW_STRTERM(str_xquote, term, paren);
21568 return tXSTRING_BEG;
21569
21570 case 'r':
21571 p->lex.strterm = NEW_STRTERM(str_regexp, term, paren);
21572 return tREGEXP_BEG;
21573
21574 case 's':
21575 p->lex.strterm = NEW_STRTERM(str_ssym, term, paren);
21576 SET_LEX_STATE(EXPR_FNAME|EXPR_FITEM);
21577 return tSYMBEG;
21578
21579 default:
21580 yyerror0("unknown type of %string");
21581 return 0;
21582 }
21583 }
21584 if ((c = nextc(p)) == '=') {
21585 set_yylval_id('%');
21586 SET_LEX_STATE(EXPR_BEG);
21587 return tOP_ASGN;
21588 }
21589 if (IS_SPCARG(c) || (IS_lex_state(EXPR_FITEM) && c == 's')) {
21590 goto quotation;
21591 }
21592 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
21593 pushback(p, c);
21594 return warn_balanced('%', "%%", "string literal");
21595}
21596
21597static int
21598tokadd_ident(struct parser_params *p, int c)
21599{
21600 do {
21601 if (tokadd_mbchar(p, c) == -1) return -1;
21602 c = nextc(p);
21603 } while (parser_is_identchar(p));
21604 pushback(p, c);
21605 return 0;
21606}
21607
21608static ID
21609tokenize_ident(struct parser_params *p)
21610{
21611 ID ident = TOK_INTERN();
21612
21613 set_yylval_name(ident);
21614
21615 return ident;
21616}
21617
21618static int
21619parse_numvar(struct parser_params *p)
21620{
21621 size_t len;
21622 int overflow;
21623 unsigned long n = ruby_scan_digits(tok(p)+1, toklen(p)-1, 10, &len, &overflow);
21624 const unsigned long nth_ref_max =
21625 ((FIXNUM_MAX < INT_MAX) ? FIXNUM_MAX : INT_MAX) >> 1;
21626 /* NTH_REF is left-shifted to be ORed with back-ref flag and
21627 * turned into a Fixnum, in compile.c */
21628
21629 if (overflow || n > nth_ref_max) {
21630 /* compile_error()? */
21631 rb_warn1("'%s' is too big for a number variable, always nil", WARN_S(tok(p)));
21632 return 0; /* $0 is $PROGRAM_NAME, not NTH_REF */
21633 }
21634 else {
21635 return (int)n;
21636 }
21637}
21638
21639static enum yytokentype
21640parse_gvar(struct parser_params *p, const enum lex_state_e last_state)
21641{
21642 const char *ptr = p->lex.pcur;
21643 register int c;
21644
21645 SET_LEX_STATE(EXPR_END);
21646 p->lex.ptok = ptr - 1; /* from '$' */
21647 newtok(p);
21648 c = nextc(p);
21649 switch (c) {
21650 case '_': /* $_: last read line string */
21651 c = nextc(p);
21652 if (parser_is_identchar(p)) {
21653 tokadd(p, '$');
21654 tokadd(p, '_');
21655 break;
21656 }
21657 pushback(p, c);
21658 c = '_';
21659 /* fall through */
21660 case '~': /* $~: match-data */
21661 case '*': /* $*: argv */
21662 case '$': /* $$: pid */
21663 case '?': /* $?: last status */
21664 case '!': /* $!: error string */
21665 case '@': /* $@: error position */
21666 case '/': /* $/: input record separator */
21667 case '\\': /* $\: output record separator */
21668 case ';': /* $;: field separator */
21669 case ',': /* $,: output field separator */
21670 case '.': /* $.: last read line number */
21671 case '=': /* $=: ignorecase */
21672 case ':': /* $:: load path */
21673 case '<': /* $<: default input handle */
21674 case '>': /* $>: default output handle */
21675 case '\"': /* $": already loaded files */
21676 tokadd(p, '$');
21677 tokadd(p, c);
21678 goto gvar;
21679
21680 case '-':
21681 tokadd(p, '$');
21682 tokadd(p, c);
21683 c = nextc(p);
21684 if (parser_is_identchar(p)) {
21685 if (tokadd_mbchar(p, c) == -1) return 0;
21686 }
21687 else {
21688 pushback(p, c);
21689 pushback(p, '-');
21690 return '$';
21691 }
21692 gvar:
21693 tokenize_ident(p);
21694 return tGVAR;
21695
21696 case '&': /* $&: last match */
21697 case '`': /* $`: string before last match */
21698 case '\'': /* $': string after last match */
21699 case '+': /* $+: string matches last paren. */
21700 if (IS_lex_state_for(last_state, EXPR_FNAME)) {
21701 tokadd(p, '$');
21702 tokadd(p, c);
21703 goto gvar;
21704 }
21705 set_yylval_node(NEW_BACK_REF(c, &_cur_loc));
21706 return tBACK_REF;
21707
21708 case '1': case '2': case '3':
21709 case '4': case '5': case '6':
21710 case '7': case '8': case '9':
21711 tokadd(p, '$');
21712 do {
21713 tokadd(p, c);
21714 c = nextc(p);
21715 } while (c != -1 && ISDIGIT(c));
21716 pushback(p, c);
21717 if (IS_lex_state_for(last_state, EXPR_FNAME)) goto gvar;
21718 tokfix(p);
21719 c = parse_numvar(p);
21720 set_yylval_node(NEW_NTH_REF(c, &_cur_loc));
21721 return tNTH_REF;
21722
21723 default:
21724 if (!parser_is_identchar(p)) {
21725 YYLTYPE loc = RUBY_INIT_YYLLOC();
21726 if (c == -1 || ISSPACE(c)) {
21727 compile_error(p, "'$' without identifiers is not allowed as a global variable name");
21728 }
21729 else {
21730 pushback(p, c);
21731 compile_error(p, "'$%c' is not allowed as a global variable name", c);
21732 }
21733 parser_show_error_line(p, &loc);
21734 set_yylval_noname();
21735 return tGVAR;
21736 }
21737 /* fall through */
21738 case '0':
21739 tokadd(p, '$');
21740 }
21741
21742 if (tokadd_ident(p, c)) return 0;
21743 SET_LEX_STATE(EXPR_END);
21744 if (VALID_SYMNAME_P(tok(p), toklen(p), p->enc, ID_GLOBAL)) {
21745 tokenize_ident(p);
21746 }
21747 else {
21748 compile_error(p, "'%.*s' is not allowed as a global variable name", toklen(p), tok(p));
21749 set_yylval_noname();
21750 }
21751 return tGVAR;
21752}
21753
21754static bool
21755parser_numbered_param(struct parser_params *p, int n)
21756{
21757 if (n < 0) return false;
21758
21759 if (DVARS_TERMINAL_P(p->lvtbl->args) || DVARS_TERMINAL_P(p->lvtbl->args->prev)) {
21760 return false;
21761 }
21762 if (p->max_numparam == ORDINAL_PARAM) {
21763 compile_error(p, "ordinary parameter is defined");
21764 return false;
21765 }
21766 struct vtable *args = p->lvtbl->args;
21767 if (p->max_numparam < n) {
21768 p->max_numparam = n;
21769 }
21770 while (n > args->pos) {
21771 vtable_add(args, NUMPARAM_IDX_TO_ID(args->pos+1));
21772 }
21773 return true;
21774}
21775
21776static enum yytokentype
21777parse_atmark(struct parser_params *p, const enum lex_state_e last_state)
21778{
21779 const char *ptr = p->lex.pcur;
21780 enum yytokentype result = tIVAR;
21781 register int c = nextc(p);
21782 YYLTYPE loc;
21783
21784 p->lex.ptok = ptr - 1; /* from '@' */
21785 newtok(p);
21786 tokadd(p, '@');
21787 if (c == '@') {
21788 result = tCVAR;
21789 tokadd(p, '@');
21790 c = nextc(p);
21791 }
21792 SET_LEX_STATE(IS_lex_state_for(last_state, EXPR_FNAME) ? EXPR_ENDFN : EXPR_END);
21793 if (c == -1 || !parser_is_identchar(p)) {
21794 pushback(p, c);
21795 RUBY_SET_YYLLOC(loc);
21796 if (result == tIVAR) {
21797 compile_error(p, "'@' without identifiers is not allowed as an instance variable name");
21798 }
21799 else {
21800 compile_error(p, "'@@' without identifiers is not allowed as a class variable name");
21801 }
21802 parser_show_error_line(p, &loc);
21803 set_yylval_noname();
21804 SET_LEX_STATE(EXPR_END);
21805 return result;
21806 }
21807 else if (ISDIGIT(c)) {
21808 pushback(p, c);
21809 RUBY_SET_YYLLOC(loc);
21810 if (result == tIVAR) {
21811 compile_error(p, "'@%c' is not allowed as an instance variable name", c);
21812 }
21813 else {
21814 compile_error(p, "'@@%c' is not allowed as a class variable name", c);
21815 }
21816 parser_show_error_line(p, &loc);
21817 set_yylval_noname();
21818 SET_LEX_STATE(EXPR_END);
21819 return result;
21820 }
21821
21822 if (tokadd_ident(p, c)) return 0;
21823 tokenize_ident(p);
21824 return result;
21825}
21826
21827static enum yytokentype
21828parse_ident(struct parser_params *p, int c, int cmd_state)
21829{
21830 enum yytokentype result;
21831 bool is_ascii = true;
21832 const enum lex_state_e last_state = p->lex.state;
21833 ID ident;
21834 int enforce_keyword_end = 0;
21835
21836 do {
21837 if (!ISASCII(c)) is_ascii = false;
21838 if (tokadd_mbchar(p, c) == -1) return 0;
21839 c = nextc(p);
21840 } while (parser_is_identchar(p));
21841 if ((c == '!' || c == '?') && !peek(p, '=')) {
21842 result = tFID;
21843 tokadd(p, c);
21844 }
21845 else if (c == '=' && IS_lex_state(EXPR_FNAME) &&
21846 (!peek(p, '~') && !peek(p, '>') && (!peek(p, '=') || (peek_n(p, '>', 1))))) {
21847 result = tIDENTIFIER;
21848 tokadd(p, c);
21849 }
21850 else {
21851 result = tCONSTANT; /* assume provisionally */
21852 pushback(p, c);
21853 }
21854 tokfix(p);
21855
21856 if (IS_LABEL_POSSIBLE()) {
21857 if (IS_LABEL_SUFFIX(0)) {
21858 SET_LEX_STATE(EXPR_ARG|EXPR_LABELED);
21859 nextc(p);
21860 tokenize_ident(p);
21861 return tLABEL;
21862 }
21863 }
21864
21865#ifndef RIPPER
21866 if (peek_end_expect_token_locations(p)) {
21867 const rb_code_position_t *end_pos;
21868 int lineno, column;
21869 int beg_pos = (int)(p->lex.ptok - p->lex.pbeg);
21870
21871 end_pos = peek_end_expect_token_locations(p)->pos;
21872 lineno = end_pos->lineno;
21873 column = end_pos->column;
21874
21875 if (p->debug) {
21876 rb_parser_printf(p, "enforce_keyword_end check. current: (%d, %d), peek: (%d, %d)\n",
21877 p->ruby_sourceline, beg_pos, lineno, column);
21878 }
21879
21880 if ((p->ruby_sourceline > lineno) && (beg_pos <= column)) {
21881 const struct kwtable *kw;
21882
21883 if ((IS_lex_state(EXPR_DOT)) && (kw = rb_reserved_word(tok(p), toklen(p))) && (kw && kw->id[0] == keyword_end)) {
21884 if (p->debug) rb_parser_printf(p, "enforce_keyword_end is enabled\n");
21885 enforce_keyword_end = 1;
21886 }
21887 }
21888 }
21889#endif
21890
21891 if (is_ascii && (!IS_lex_state(EXPR_DOT) || enforce_keyword_end)) {
21892 const struct kwtable *kw;
21893
21894 /* See if it is a reserved word. */
21895 kw = rb_reserved_word(tok(p), toklen(p));
21896 if (kw) {
21897 enum lex_state_e state = p->lex.state;
21898 if (IS_lex_state_for(state, EXPR_FNAME)) {
21899 SET_LEX_STATE(EXPR_ENDFN);
21900 set_yylval_name(rb_intern2(tok(p), toklen(p)));
21901 return kw->id[0];
21902 }
21903 SET_LEX_STATE(kw->state);
21904 if (IS_lex_state(EXPR_BEG)) {
21905 p->command_start = TRUE;
21906 }
21907 if (kw->id[0] == keyword_do) {
21908 if (lambda_beginning_p()) {
21909 p->lex.lpar_beg = -1; /* make lambda_beginning_p() == FALSE in the body of "-> do ... end" */
21910 return keyword_do_LAMBDA;
21911 }
21912 if (COND_P()) return keyword_do_cond;
21913 if (CMDARG_P() && !IS_lex_state_for(state, EXPR_CMDARG))
21914 return keyword_do_block;
21915 return keyword_do;
21916 }
21917 if (IS_lex_state_for(state, (EXPR_BEG | EXPR_LABELED | EXPR_CLASS)))
21918 return kw->id[0];
21919 else {
21920 if (kw->id[0] != kw->id[1])
21921 SET_LEX_STATE(EXPR_BEG | EXPR_LABEL);
21922 return kw->id[1];
21923 }
21924 }
21925 }
21926
21927 if (IS_lex_state(EXPR_BEG_ANY | EXPR_ARG_ANY | EXPR_DOT)) {
21928 if (cmd_state) {
21929 SET_LEX_STATE(EXPR_CMDARG);
21930 }
21931 else {
21932 SET_LEX_STATE(EXPR_ARG);
21933 }
21934 }
21935 else if (p->lex.state == EXPR_FNAME) {
21936 SET_LEX_STATE(EXPR_ENDFN);
21937 }
21938 else {
21939 SET_LEX_STATE(EXPR_END);
21940 }
21941
21942 ident = tokenize_ident(p);
21943 if (result == tCONSTANT && is_local_id(ident)) result = tIDENTIFIER;
21944 if (!IS_lex_state_for(last_state, EXPR_DOT|EXPR_FNAME) &&
21945 (result == tIDENTIFIER) && /* not EXPR_FNAME, not attrasgn */
21946 (lvar_defined(p, ident) || NUMPARAM_ID_P(ident))) {
21947 SET_LEX_STATE(EXPR_END|EXPR_LABEL);
21948 }
21949 return result;
21950}
21951
21952static void
21953warn_cr(struct parser_params *p)
21954{
21955 if (!p->cr_seen) {
21956 p->cr_seen = TRUE;
21957 /* carried over with p->lex.nextline for nextc() */
21958 rb_warn0("encountered \\r in middle of line, treated as a mere space");
21959 }
21960}
21961
21962static enum yytokentype
21963parser_yylex(struct parser_params *p)
21964{
21965 register int c;
21966 int space_seen = 0;
21967 int cmd_state;
21968 int label;
21969 enum lex_state_e last_state;
21970 int fallthru = FALSE;
21971 int token_seen = p->token_seen;
21972
21973 if (p->lex.strterm) {
21974 if (strterm_is_heredoc(p->lex.strterm)) {
21975 token_flush(p);
21976 return here_document(p, &p->lex.strterm->u.heredoc);
21977 }
21978 else {
21979 token_flush(p);
21980 return parse_string(p, &p->lex.strterm->u.literal);
21981 }
21982 }
21983 cmd_state = p->command_start;
21984 p->command_start = FALSE;
21985 p->token_seen = TRUE;
21986#ifndef RIPPER
21987 token_flush(p);
21988#endif
21989 retry:
21990 last_state = p->lex.state;
21991 switch (c = nextc(p)) {
21992 case '\0': /* NUL */
21993 case '\004': /* ^D */
21994 case '\032': /* ^Z */
21995 case -1: /* end of script. */
21996 p->eofp = 1;
21997#ifndef RIPPER
21998 if (p->end_expect_token_locations) {
21999 pop_end_expect_token_locations(p);
22000 RUBY_SET_YYLLOC_OF_DUMMY_END(*p->yylloc);
22001 return tDUMNY_END;
22002 }
22003#endif
22004 /* Set location for end-of-input because dispatch_scan_event is not called. */
22005 RUBY_SET_YYLLOC(*p->yylloc);
22006 return END_OF_INPUT;
22007
22008 /* white spaces */
22009 case '\r':
22010 warn_cr(p);
22011 /* fall through */
22012 case ' ': case '\t': case '\f':
22013 case '\13': /* '\v' */
22014 space_seen = 1;
22015 while ((c = nextc(p))) {
22016 switch (c) {
22017 case '\r':
22018 warn_cr(p);
22019 /* fall through */
22020 case ' ': case '\t': case '\f':
22021 case '\13': /* '\v' */
22022 break;
22023 default:
22024 goto outofloop;
22025 }
22026 }
22027 outofloop:
22028 pushback(p, c);
22029 dispatch_scan_event(p, tSP);
22030#ifndef RIPPER
22031 token_flush(p);
22032#endif
22033 goto retry;
22034
22035 case '#': /* it's a comment */
22036 p->token_seen = token_seen;
22037 const char *const pcur = p->lex.pcur, *const ptok = p->lex.ptok;
22038 /* no magic_comment in shebang line */
22039 if (!parser_magic_comment(p, p->lex.pcur, p->lex.pend - p->lex.pcur)) {
22040 if (comment_at_top(p)) {
22041 set_file_encoding(p, p->lex.pcur, p->lex.pend);
22042 }
22043 }
22044 p->lex.pcur = pcur, p->lex.ptok = ptok;
22045 lex_goto_eol(p);
22046 dispatch_scan_event(p, tCOMMENT);
22047 fallthru = TRUE;
22048 /* fall through */
22049 case '\n':
22050 p->token_seen = token_seen;
22051 rb_parser_string_t *prevline = p->lex.lastline;
22052 c = (IS_lex_state(EXPR_BEG|EXPR_CLASS|EXPR_FNAME|EXPR_DOT) &&
22053 !IS_lex_state(EXPR_LABELED));
22054 if (c || IS_lex_state_all(EXPR_ARG|EXPR_LABELED)) {
22055 if (!fallthru) {
22056 dispatch_scan_event(p, tIGNORED_NL);
22057 }
22058 fallthru = FALSE;
22059 if (!c && p->ctxt.in_kwarg) {
22060 goto normal_newline;
22061 }
22062 goto retry;
22063 }
22064 while (1) {
22065 switch (c = nextc(p)) {
22066 case ' ': case '\t': case '\f': case '\r':
22067 case '\13': /* '\v' */
22068 space_seen = 1;
22069 break;
22070 case '#':
22071 pushback(p, c);
22072 if (space_seen) {
22073 dispatch_scan_event(p, tSP);
22074 token_flush(p);
22075 }
22076 goto retry;
22077 case 'a':
22078 if (peek_word_at(p, "nd", 2, 0)) goto leading_logical;
22079 goto bol;
22080 case 'o':
22081 if (peek_word_at(p, "r", 1, 0)) goto leading_logical;
22082 goto bol;
22083 case '|':
22084 if (peek(p, '|')) goto leading_logical;
22085 goto bol;
22086 case '&':
22087 if (peek(p, '&')) {
22088 leading_logical:
22089 pushback(p, c);
22090 dispatch_delayed_token(p, tIGNORED_NL);
22091 cmd_state = FALSE;
22092 goto retry;
22093 }
22094 /* fall through */
22095 case '.': {
22096 dispatch_delayed_token(p, tIGNORED_NL);
22097 if (peek(p, '.') == (c == '&')) {
22098 pushback(p, c);
22099 dispatch_scan_event(p, tSP);
22100 goto retry;
22101 }
22102 }
22103 bol:
22104 default:
22105 p->ruby_sourceline--;
22106 p->lex.nextline = p->lex.lastline;
22107 set_lastline(p, prevline);
22108 case -1: /* EOF no decrement*/
22109 if (c == -1 && space_seen) {
22110 dispatch_scan_event(p, tSP);
22111 }
22112 lex_goto_eol(p);
22113 if (c != -1) {
22114 token_flush(p);
22115 RUBY_SET_YYLLOC(*p->yylloc);
22116 }
22117 goto normal_newline;
22118 }
22119 }
22120 normal_newline:
22121 p->command_start = TRUE;
22122 SET_LEX_STATE(EXPR_BEG);
22123 return '\n';
22124
22125 case '*':
22126 if ((c = nextc(p)) == '*') {
22127 if ((c = nextc(p)) == '=') {
22128 set_yylval_id(idPow);
22129 SET_LEX_STATE(EXPR_BEG);
22130 return tOP_ASGN;
22131 }
22132 pushback(p, c);
22133 if (IS_SPCARG(c)) {
22134 rb_warning0("'**' interpreted as argument prefix");
22135 c = tDSTAR;
22136 }
22137 else if (IS_BEG()) {
22138 c = tDSTAR;
22139 }
22140 else {
22141 c = warn_balanced((enum ruby_method_ids)tPOW, "**", "argument prefix");
22142 }
22143 }
22144 else {
22145 if (c == '=') {
22146 set_yylval_id('*');
22147 SET_LEX_STATE(EXPR_BEG);
22148 return tOP_ASGN;
22149 }
22150 pushback(p, c);
22151 if (IS_SPCARG(c)) {
22152 rb_warning0("'*' interpreted as argument prefix");
22153 c = tSTAR;
22154 }
22155 else if (IS_BEG()) {
22156 c = tSTAR;
22157 }
22158 else {
22159 c = warn_balanced('*', "*", "argument prefix");
22160 }
22161 }
22162 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
22163 return c;
22164
22165 case '!':
22166 c = nextc(p);
22167 if (IS_AFTER_OPERATOR()) {
22168 SET_LEX_STATE(EXPR_ARG);
22169 if (c == '@') {
22170 return '!';
22171 }
22172 }
22173 else {
22174 SET_LEX_STATE(EXPR_BEG);
22175 }
22176 if (c == '=') {
22177 return tNEQ;
22178 }
22179 if (c == '~') {
22180 return tNMATCH;
22181 }
22182 pushback(p, c);
22183 return '!';
22184
22185 case '=':
22186 if (was_bol(p)) {
22187 /* skip embedded rd document */
22188 if (word_match_p(p, "begin", 5)) {
22189 int first_p = TRUE;
22190
22191 lex_goto_eol(p);
22192 dispatch_scan_event(p, tEMBDOC_BEG);
22193 for (;;) {
22194 lex_goto_eol(p);
22195 if (!first_p) {
22196 dispatch_scan_event(p, tEMBDOC);
22197 }
22198 first_p = FALSE;
22199 c = nextc(p);
22200 if (c == -1) {
22201 compile_error(p, "embedded document meets end of file");
22202 return END_OF_INPUT;
22203 }
22204 if (c == '=' && word_match_p(p, "end", 3)) {
22205 break;
22206 }
22207 pushback(p, c);
22208 }
22209 lex_goto_eol(p);
22210 dispatch_scan_event(p, tEMBDOC_END);
22211 goto retry;
22212 }
22213 }
22214
22215 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
22216 if ((c = nextc(p)) == '=') {
22217 if ((c = nextc(p)) == '=') {
22218 return tEQQ;
22219 }
22220 pushback(p, c);
22221 return tEQ;
22222 }
22223 if (c == '~') {
22224 return tMATCH;
22225 }
22226 else if (c == '>') {
22227 return tASSOC;
22228 }
22229 pushback(p, c);
22230 return '=';
22231
22232 case '<':
22233 c = nextc(p);
22234 if (c == '<' &&
22235 !IS_lex_state(EXPR_DOT | EXPR_CLASS) &&
22236 !IS_END() &&
22237 (!IS_ARG() || IS_lex_state(EXPR_LABELED) || space_seen)) {
22238 enum yytokentype token = heredoc_identifier(p);
22239 if (token) return token < 0 ? 0 : token;
22240 }
22241 if (IS_AFTER_OPERATOR()) {
22242 SET_LEX_STATE(EXPR_ARG);
22243 }
22244 else {
22245 if (IS_lex_state(EXPR_CLASS))
22246 p->command_start = TRUE;
22247 SET_LEX_STATE(EXPR_BEG);
22248 }
22249 if (c == '=') {
22250 if ((c = nextc(p)) == '>') {
22251 return tCMP;
22252 }
22253 pushback(p, c);
22254 return tLEQ;
22255 }
22256 if (c == '<') {
22257 if ((c = nextc(p)) == '=') {
22258 set_yylval_id(idLTLT);
22259 SET_LEX_STATE(EXPR_BEG);
22260 return tOP_ASGN;
22261 }
22262 pushback(p, c);
22263 return warn_balanced((enum ruby_method_ids)tLSHFT, "<<", "here document");
22264 }
22265 pushback(p, c);
22266 return '<';
22267
22268 case '>':
22269 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
22270 if ((c = nextc(p)) == '=') {
22271 return tGEQ;
22272 }
22273 if (c == '>') {
22274 if ((c = nextc(p)) == '=') {
22275 set_yylval_id(idGTGT);
22276 SET_LEX_STATE(EXPR_BEG);
22277 return tOP_ASGN;
22278 }
22279 pushback(p, c);
22280 return tRSHFT;
22281 }
22282 pushback(p, c);
22283 return '>';
22284
22285 case '"':
22286 label = (IS_LABEL_POSSIBLE() ? str_label : 0);
22287 p->lex.strterm = NEW_STRTERM(str_dquote | label, '"', 0);
22288 p->lex.ptok = p->lex.pcur-1;
22289 return tSTRING_BEG;
22290
22291 case '`':
22292 if (IS_lex_state(EXPR_FNAME)) {
22293 SET_LEX_STATE(EXPR_ENDFN);
22294 return c;
22295 }
22296 if (IS_lex_state(EXPR_DOT)) {
22297 if (cmd_state)
22298 SET_LEX_STATE(EXPR_CMDARG);
22299 else
22300 SET_LEX_STATE(EXPR_ARG);
22301 return c;
22302 }
22303 p->lex.strterm = NEW_STRTERM(str_xquote, '`', 0);
22304 return tXSTRING_BEG;
22305
22306 case '\'':
22307 label = (IS_LABEL_POSSIBLE() ? str_label : 0);
22308 p->lex.strterm = NEW_STRTERM(str_squote | label, '\'', 0);
22309 p->lex.ptok = p->lex.pcur-1;
22310 return tSTRING_BEG;
22311
22312 case '?':
22313 return parse_qmark(p, space_seen);
22314
22315 case '&':
22316 if ((c = nextc(p)) == '&') {
22317 SET_LEX_STATE(EXPR_BEG);
22318 if ((c = nextc(p)) == '=') {
22319 set_yylval_id(idANDOP);
22320 SET_LEX_STATE(EXPR_BEG);
22321 return tOP_ASGN;
22322 }
22323 pushback(p, c);
22324 return tANDOP;
22325 }
22326 else if (c == '=') {
22327 set_yylval_id('&');
22328 SET_LEX_STATE(EXPR_BEG);
22329 return tOP_ASGN;
22330 }
22331 else if (c == '.') {
22332 set_yylval_id(idANDDOT);
22333 SET_LEX_STATE(EXPR_DOT);
22334 return tANDDOT;
22335 }
22336 pushback(p, c);
22337 if (IS_SPCARG(c)) {
22338 if ((c != ':') ||
22339 (c = peekc_n(p, 1)) == -1 ||
22340 !(c == '\'' || c == '"' ||
22341 is_identchar(p, (p->lex.pcur+1), p->lex.pend, p->enc))) {
22342 rb_warning0("'&' interpreted as argument prefix");
22343 }
22344 c = tAMPER;
22345 }
22346 else if (IS_BEG()) {
22347 c = tAMPER;
22348 }
22349 else {
22350 c = warn_balanced('&', "&", "argument prefix");
22351 }
22352 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
22353 return c;
22354
22355 case '|':
22356 if ((c = nextc(p)) == '|') {
22357 SET_LEX_STATE(EXPR_BEG);
22358 if ((c = nextc(p)) == '=') {
22359 set_yylval_id(idOROP);
22360 SET_LEX_STATE(EXPR_BEG);
22361 return tOP_ASGN;
22362 }
22363 pushback(p, c);
22364 if (IS_lex_state_for(last_state, EXPR_BEG)) {
22365 c = '|';
22366 pushback(p, '|');
22367 return c;
22368 }
22369 return tOROP;
22370 }
22371 if (c == '=') {
22372 set_yylval_id('|');
22373 SET_LEX_STATE(EXPR_BEG);
22374 return tOP_ASGN;
22375 }
22376 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG|EXPR_LABEL);
22377 pushback(p, c);
22378 return '|';
22379
22380 case '+':
22381 c = nextc(p);
22382 if (IS_AFTER_OPERATOR()) {
22383 SET_LEX_STATE(EXPR_ARG);
22384 if (c == '@') {
22385 return tUPLUS;
22386 }
22387 pushback(p, c);
22388 return '+';
22389 }
22390 if (c == '=') {
22391 set_yylval_id('+');
22392 SET_LEX_STATE(EXPR_BEG);
22393 return tOP_ASGN;
22394 }
22395 if (IS_BEG() || (IS_SPCARG(c) && arg_ambiguous(p, '+'))) {
22396 SET_LEX_STATE(EXPR_BEG);
22397 pushback(p, c);
22398 if (c != -1 && ISDIGIT(c)) {
22399 return parse_numeric(p, '+');
22400 }
22401 return tUPLUS;
22402 }
22403 SET_LEX_STATE(EXPR_BEG);
22404 pushback(p, c);
22405 return warn_balanced('+', "+", "unary operator");
22406
22407 case '-':
22408 c = nextc(p);
22409 if (IS_AFTER_OPERATOR()) {
22410 SET_LEX_STATE(EXPR_ARG);
22411 if (c == '@') {
22412 return tUMINUS;
22413 }
22414 pushback(p, c);
22415 return '-';
22416 }
22417 if (c == '=') {
22418 set_yylval_id('-');
22419 SET_LEX_STATE(EXPR_BEG);
22420 return tOP_ASGN;
22421 }
22422 if (c == '>') {
22423 SET_LEX_STATE(EXPR_ENDFN);
22424 yylval.num = p->lex.lpar_beg;
22425 p->lex.lpar_beg = p->lex.paren_nest;
22426 return tLAMBDA;
22427 }
22428 if (IS_BEG() || (IS_SPCARG(c) && arg_ambiguous(p, '-'))) {
22429 SET_LEX_STATE(EXPR_BEG);
22430 pushback(p, c);
22431 if (c != -1 && ISDIGIT(c)) {
22432 return tUMINUS_NUM;
22433 }
22434 return tUMINUS;
22435 }
22436 SET_LEX_STATE(EXPR_BEG);
22437 pushback(p, c);
22438 return warn_balanced('-', "-", "unary operator");
22439
22440 case '.': {
22441 int is_beg = IS_BEG();
22442 SET_LEX_STATE(EXPR_BEG);
22443 if ((c = nextc(p)) == '.') {
22444 if ((c = nextc(p)) == '.') {
22445 if (p->ctxt.in_argdef || IS_LABEL_POSSIBLE()) {
22446 SET_LEX_STATE(EXPR_ENDARG);
22447 return tBDOT3;
22448 }
22449 if (p->lex.paren_nest == 0 && looking_at_eol_p(p)) {
22450 rb_warn0("... at EOL, should be parenthesized?");
22451 }
22452 return is_beg ? tBDOT3 : tDOT3;
22453 }
22454 pushback(p, c);
22455 return is_beg ? tBDOT2 : tDOT2;
22456 }
22457 pushback(p, c);
22458 if (c != -1 && ISDIGIT(c)) {
22459 char prev = p->lex.pcur-1 > p->lex.pbeg ? *(p->lex.pcur-2) : 0;
22460 parse_numeric(p, '.');
22461 if (ISDIGIT(prev)) {
22462 yyerror0("unexpected fraction part after numeric literal");
22463 }
22464 else {
22465 yyerror0("no .<digit> floating literal anymore; put 0 before dot");
22466 }
22467 SET_LEX_STATE(EXPR_END);
22468 p->lex.ptok = p->lex.pcur;
22469 goto retry;
22470 }
22471 set_yylval_id('.');
22472 SET_LEX_STATE(EXPR_DOT);
22473 return '.';
22474 }
22475
22476 case '0': case '1': case '2': case '3': case '4':
22477 case '5': case '6': case '7': case '8': case '9':
22478 return parse_numeric(p, c);
22479
22480 case ')':
22481 COND_POP();
22482 CMDARG_POP();
22483 SET_LEX_STATE(EXPR_ENDFN);
22484 p->lex.paren_nest--;
22485 return c;
22486
22487 case ']':
22488 COND_POP();
22489 CMDARG_POP();
22490 SET_LEX_STATE(EXPR_END);
22491 p->lex.paren_nest--;
22492 return c;
22493
22494 case '}':
22495 /* tSTRING_DEND does COND_POP and CMDARG_POP in the yacc's rule */
22496 if (!p->lex.brace_nest--) return tSTRING_DEND;
22497 COND_POP();
22498 CMDARG_POP();
22499 SET_LEX_STATE(EXPR_END);
22500 p->lex.paren_nest--;
22501 return c;
22502
22503 case ':':
22504 c = nextc(p);
22505 if (c == ':') {
22506 if (IS_BEG() || IS_lex_state(EXPR_CLASS) || IS_SPCARG(-1)) {
22507 SET_LEX_STATE(EXPR_BEG);
22508 return tCOLON3;
22509 }
22510 set_yylval_id(idCOLON2);
22511 SET_LEX_STATE(EXPR_DOT);
22512 return tCOLON2;
22513 }
22514 if (IS_END() || ISSPACE(c) || c == '#') {
22515 pushback(p, c);
22516 c = warn_balanced(':', ":", "symbol literal");
22517 SET_LEX_STATE(EXPR_BEG);
22518 return c;
22519 }
22520 switch (c) {
22521 case '\'':
22522 p->lex.strterm = NEW_STRTERM(str_ssym, c, 0);
22523 break;
22524 case '"':
22525 p->lex.strterm = NEW_STRTERM(str_dsym, c, 0);
22526 break;
22527 default:
22528 pushback(p, c);
22529 break;
22530 }
22531 SET_LEX_STATE(EXPR_FNAME);
22532 return tSYMBEG;
22533
22534 case '/':
22535 if (IS_BEG()) {
22536 p->lex.strterm = NEW_STRTERM(str_regexp, '/', 0);
22537 return tREGEXP_BEG;
22538 }
22539 if ((c = nextc(p)) == '=') {
22540 set_yylval_id('/');
22541 SET_LEX_STATE(EXPR_BEG);
22542 return tOP_ASGN;
22543 }
22544 pushback(p, c);
22545 if (IS_SPCARG(c)) {
22546 arg_ambiguous(p, '/');
22547 p->lex.strterm = NEW_STRTERM(str_regexp, '/', 0);
22548 return tREGEXP_BEG;
22549 }
22550 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
22551 return warn_balanced('/', "/", "regexp literal");
22552
22553 case '^':
22554 if ((c = nextc(p)) == '=') {
22555 set_yylval_id('^');
22556 SET_LEX_STATE(EXPR_BEG);
22557 return tOP_ASGN;
22558 }
22559 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
22560 pushback(p, c);
22561 return '^';
22562
22563 case ';':
22564 SET_LEX_STATE(EXPR_BEG);
22565 p->command_start = TRUE;
22566 return ';';
22567
22568 case ',':
22569 SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
22570 return ',';
22571
22572 case '~':
22573 if (IS_AFTER_OPERATOR()) {
22574 if ((c = nextc(p)) != '@') {
22575 pushback(p, c);
22576 }
22577 SET_LEX_STATE(EXPR_ARG);
22578 }
22579 else {
22580 SET_LEX_STATE(EXPR_BEG);
22581 }
22582 return '~';
22583
22584 case '(':
22585 if (IS_BEG()) {
22586 c = tLPAREN;
22587 }
22588 else if (!space_seen) {
22589 /* foo( ... ) => method call, no ambiguity */
22590 }
22591 else if (IS_ARG() || IS_lex_state_all(EXPR_END|EXPR_LABEL)) {
22592 c = tLPAREN_ARG;
22593 }
22594 else if (IS_lex_state(EXPR_ENDFN) && !lambda_beginning_p()) {
22595 rb_warning0("parentheses after method name is interpreted as "
22596 "an argument list, not a decomposed argument");
22597 }
22598 p->lex.paren_nest++;
22599 COND_PUSH(0);
22600 CMDARG_PUSH(0);
22601 SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
22602 return c;
22603
22604 case '[':
22605 p->lex.paren_nest++;
22606 if (IS_AFTER_OPERATOR()) {
22607 if ((c = nextc(p)) == ']') {
22608 p->lex.paren_nest--;
22609 SET_LEX_STATE(EXPR_ARG);
22610 if ((c = nextc(p)) == '=') {
22611 return tASET;
22612 }
22613 pushback(p, c);
22614 return tAREF;
22615 }
22616 pushback(p, c);
22617 SET_LEX_STATE(EXPR_ARG|EXPR_LABEL);
22618 return '[';
22619 }
22620 else if (IS_BEG()) {
22621 c = tLBRACK;
22622 }
22623 else if (IS_ARG() && (space_seen || IS_lex_state(EXPR_LABELED))) {
22624 c = tLBRACK;
22625 }
22626 SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
22627 COND_PUSH(0);
22628 CMDARG_PUSH(0);
22629 return c;
22630
22631 case '{':
22632 ++p->lex.brace_nest;
22633 if (lambda_beginning_p())
22634 c = tLAMBEG;
22635 else if (IS_lex_state(EXPR_LABELED))
22636 c = tLBRACE; /* hash */
22637 else if (IS_lex_state(EXPR_ARG_ANY | EXPR_END | EXPR_ENDFN))
22638 c = '{'; /* block (primary) */
22639 else if (IS_lex_state(EXPR_ENDARG))
22640 c = tLBRACE_ARG; /* block (expr) */
22641 else
22642 c = tLBRACE; /* hash */
22643 if (c != tLBRACE) {
22644 p->command_start = TRUE;
22645 SET_LEX_STATE(EXPR_BEG);
22646 }
22647 else {
22648 SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
22649 }
22650 ++p->lex.paren_nest; /* after lambda_beginning_p() */
22651 COND_PUSH(0);
22652 CMDARG_PUSH(0);
22653 return c;
22654
22655 case '\\':
22656 c = nextc(p);
22657 if (c == '\n') {
22658 space_seen = 1;
22659 dispatch_scan_event(p, tSP);
22660 goto retry; /* skip \\n */
22661 }
22662 if (c == ' ') return tSP;
22663 if (ISSPACE(c)) return c;
22664 pushback(p, c);
22665 return '\\';
22666
22667 case '%':
22668 return parse_percent(p, space_seen, last_state);
22669
22670 case '$':
22671 return parse_gvar(p, last_state);
22672
22673 case '@':
22674 return parse_atmark(p, last_state);
22675
22676 case '_':
22677 if (was_bol(p) && whole_match_p(p, "__END__", 7, 0)) {
22678 p->ruby__end__seen = 1;
22679 p->eofp = 1;
22680#ifdef RIPPER
22681 lex_goto_eol(p);
22682 dispatch_scan_event(p, k__END__);
22683#endif
22684 return END_OF_INPUT;
22685 }
22686 newtok(p);
22687 break;
22688
22689 default:
22690 if (!parser_is_identchar(p)) {
22691 compile_error(p, "Invalid char '\\x%02X' in expression", c);
22692 token_flush(p);
22693 goto retry;
22694 }
22695
22696 newtok(p);
22697 break;
22698 }
22699
22700 return parse_ident(p, c, cmd_state);
22701}
22702
22703static enum yytokentype
22704yylex(YYSTYPE *lval, YYLTYPE *yylloc, struct parser_params *p)
22705{
22706 enum yytokentype t;
22707
22708 p->lval = lval;
22709 lval->node = 0;
22710 p->yylloc = yylloc;
22711
22712 t = parser_yylex(p);
22713
22714 if (has_delayed_token(p))
22715 dispatch_delayed_token(p, t);
22716 else if (t != END_OF_INPUT)
22717 dispatch_scan_event(p, t);
22718
22719 return t;
22720}
22721
22722#define LVAR_USED ((ID)1 << (sizeof(ID) * CHAR_BIT - 1))
22723
22724static NODE*
22725node_new_internal(struct parser_params *p, enum node_type type, size_t size, size_t alignment)
22726{
22727 NODE *n = rb_ast_newnode(p->ast, type, size, alignment);
22728
22729 rb_node_init(n, type);
22730 return n;
22731}
22732
22733static NODE *
22734nd_set_loc(NODE *nd, const YYLTYPE *loc)
22735{
22736 nd->nd_loc = *loc;
22737 nd_set_line(nd, loc->beg_pos.lineno);
22738 return nd;
22739}
22740
22741static NODE*
22742node_newnode(struct parser_params *p, enum node_type type, size_t size, size_t alignment, const rb_code_location_t *loc)
22743{
22744 NODE *n = node_new_internal(p, type, size, alignment);
22745
22746 nd_set_loc(n, loc);
22747 nd_set_node_id(n, parser_get_node_id(p));
22748 return n;
22749}
22750
22751#define NODE_NEWNODE(node_type, type, loc) (type *)(node_newnode(p, node_type, sizeof(type), RUBY_ALIGNOF(type), loc))
22752
22753static rb_node_scope_t *
22754rb_node_scope_new(struct parser_params *p, rb_node_args_t *nd_args, NODE *nd_body, NODE *nd_parent, const YYLTYPE *loc)
22755{
22756 rb_ast_id_table_t *nd_tbl;
22757 nd_tbl = local_tbl(p);
22758 rb_node_scope_t *n = NODE_NEWNODE(NODE_SCOPE, rb_node_scope_t, loc);
22759 n->nd_tbl = nd_tbl;
22760 n->nd_body = nd_body;
22761 n->nd_parent = nd_parent;
22762 n->nd_args = nd_args;
22763
22764 return n;
22765}
22766
22767static rb_node_scope_t *
22768rb_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)
22769{
22770 rb_node_scope_t *n = NODE_NEWNODE(NODE_SCOPE, rb_node_scope_t, loc);
22771 n->nd_tbl = nd_tbl;
22772 n->nd_body = nd_body;
22773 n->nd_parent = nd_parent;
22774 n->nd_args = nd_args;
22775
22776 return n;
22777}
22778
22779static rb_node_defn_t *
22780rb_node_defn_new(struct parser_params *p, ID nd_mid, NODE *nd_defn, const YYLTYPE *loc)
22781{
22782 rb_node_defn_t *n = NODE_NEWNODE(NODE_DEFN, rb_node_defn_t, loc);
22783 n->nd_mid = nd_mid;
22784 n->nd_defn = nd_defn;
22785
22786 return n;
22787}
22788
22789static rb_node_defs_t *
22790rb_node_defs_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_defn, const YYLTYPE *loc)
22791{
22792 rb_node_defs_t *n = NODE_NEWNODE(NODE_DEFS, rb_node_defs_t, loc);
22793 n->nd_recv = nd_recv;
22794 n->nd_mid = nd_mid;
22795 n->nd_defn = nd_defn;
22796
22797 return n;
22798}
22799
22800static rb_node_block_t *
22801rb_node_block_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc)
22802{
22803 rb_node_block_t *n = NODE_NEWNODE(NODE_BLOCK, rb_node_block_t, loc);
22804 n->nd_head = nd_head;
22805 n->nd_end = (NODE *)n;
22806 n->nd_next = 0;
22807
22808 return n;
22809}
22810
22811static rb_node_for_t *
22812rb_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)
22813{
22814 rb_node_for_t *n = NODE_NEWNODE(NODE_FOR, rb_node_for_t, loc);
22815 n->nd_body = nd_body;
22816 n->nd_iter = nd_iter;
22817 n->for_keyword_loc = *for_keyword_loc;
22818 n->in_keyword_loc = *in_keyword_loc;
22819 n->do_keyword_loc = *do_keyword_loc;
22820 n->end_keyword_loc = *end_keyword_loc;
22821
22822 return n;
22823}
22824
22825static rb_node_for_masgn_t *
22826rb_node_for_masgn_new(struct parser_params *p, NODE *nd_var, const YYLTYPE *loc)
22827{
22828 rb_node_for_masgn_t *n = NODE_NEWNODE(NODE_FOR_MASGN, rb_node_for_masgn_t, loc);
22829 n->nd_var = nd_var;
22830
22831 return n;
22832}
22833
22834static rb_node_retry_t *
22835rb_node_retry_new(struct parser_params *p, const YYLTYPE *loc)
22836{
22837 rb_node_retry_t *n = NODE_NEWNODE(NODE_RETRY, rb_node_retry_t, loc);
22838
22839 return n;
22840}
22841
22842static rb_node_begin_t *
22843rb_node_begin_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc)
22844{
22845 rb_node_begin_t *n = NODE_NEWNODE(NODE_BEGIN, rb_node_begin_t, loc);
22846 n->nd_body = nd_body;
22847
22848 return n;
22849}
22850
22851static rb_node_rescue_t *
22852rb_node_rescue_new(struct parser_params *p, NODE *nd_head, NODE *nd_resq, NODE *nd_else, const YYLTYPE *loc)
22853{
22854 rb_node_rescue_t *n = NODE_NEWNODE(NODE_RESCUE, rb_node_rescue_t, loc);
22855 n->nd_head = nd_head;
22856 n->nd_resq = nd_resq;
22857 n->nd_else = nd_else;
22858
22859 return n;
22860}
22861
22862static rb_node_resbody_t *
22863rb_node_resbody_new(struct parser_params *p, NODE *nd_args, NODE *nd_exc_var, NODE *nd_body, NODE *nd_next, const YYLTYPE *loc)
22864{
22865 rb_node_resbody_t *n = NODE_NEWNODE(NODE_RESBODY, rb_node_resbody_t, loc);
22866 n->nd_args = nd_args;
22867 n->nd_exc_var = nd_exc_var;
22868 n->nd_body = nd_body;
22869 n->nd_next = nd_next;
22870
22871 return n;
22872}
22873
22874static rb_node_ensure_t *
22875rb_node_ensure_new(struct parser_params *p, NODE *nd_head, NODE *nd_ensr, const YYLTYPE *loc)
22876{
22877 rb_node_ensure_t *n = NODE_NEWNODE(NODE_ENSURE, rb_node_ensure_t, loc);
22878 n->nd_head = nd_head;
22879 n->nd_ensr = nd_ensr;
22880
22881 return n;
22882}
22883
22884static rb_node_and_t *
22885rb_node_and_new(struct parser_params *p, NODE *nd_1st, NODE *nd_2nd, const YYLTYPE *loc, const YYLTYPE *operator_loc)
22886{
22887 rb_node_and_t *n = NODE_NEWNODE(NODE_AND, rb_node_and_t, loc);
22888 n->nd_1st = nd_1st;
22889 n->nd_2nd = nd_2nd;
22890 n->operator_loc = *operator_loc;
22891
22892 return n;
22893}
22894
22895static rb_node_or_t *
22896rb_node_or_new(struct parser_params *p, NODE *nd_1st, NODE *nd_2nd, const YYLTYPE *loc, const YYLTYPE *operator_loc)
22897{
22898 rb_node_or_t *n = NODE_NEWNODE(NODE_OR, rb_node_or_t, loc);
22899 n->nd_1st = nd_1st;
22900 n->nd_2nd = nd_2nd;
22901 n->operator_loc = *operator_loc;
22902
22903 return n;
22904}
22905
22906static rb_node_return_t *
22907rb_node_return_new(struct parser_params *p, NODE *nd_stts, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
22908{
22909 rb_node_return_t *n = NODE_NEWNODE(NODE_RETURN, rb_node_return_t, loc);
22910 n->nd_stts = nd_stts;
22911 n->keyword_loc = *keyword_loc;
22912 return n;
22913}
22914
22915static rb_node_yield_t *
22916rb_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)
22917{
22918 if (nd_head) no_blockarg(p, nd_head);
22919
22920 rb_node_yield_t *n = NODE_NEWNODE(NODE_YIELD, rb_node_yield_t, loc);
22921 n->nd_head = nd_head;
22922 n->keyword_loc = *keyword_loc;
22923 n->lparen_loc = *lparen_loc;
22924 n->rparen_loc = *rparen_loc;
22925
22926 return n;
22927}
22928
22929static rb_node_if_t *
22930rb_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)
22931{
22932 rb_node_if_t *n = NODE_NEWNODE(NODE_IF, rb_node_if_t, loc);
22933 n->nd_cond = nd_cond;
22934 n->nd_body = nd_body;
22935 n->nd_else = nd_else;
22936 n->if_keyword_loc = *if_keyword_loc;
22937 n->then_keyword_loc = *then_keyword_loc;
22938 n->end_keyword_loc = *end_keyword_loc;
22939
22940 return n;
22941}
22942
22943static rb_node_unless_t *
22944rb_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)
22945{
22946 rb_node_unless_t *n = NODE_NEWNODE(NODE_UNLESS, rb_node_unless_t, loc);
22947 n->nd_cond = nd_cond;
22948 n->nd_body = nd_body;
22949 n->nd_else = nd_else;
22950 n->keyword_loc = *keyword_loc;
22951 n->then_keyword_loc = *then_keyword_loc;
22952 n->end_keyword_loc = *end_keyword_loc;
22953
22954 return n;
22955}
22956
22957static rb_node_class_t *
22958rb_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)
22959{
22960 /* Keep the order of node creation */
22961 NODE *scope = NEW_SCOPE(0, nd_body, NULL, loc);
22962 rb_node_class_t *n = NODE_NEWNODE(NODE_CLASS, rb_node_class_t, loc);
22963 RNODE_SCOPE(scope)->nd_parent = &n->node;
22964 n->nd_cpath = nd_cpath;
22965 n->nd_body = scope;
22966 n->nd_super = nd_super;
22967 n->class_keyword_loc = *class_keyword_loc;
22968 n->inheritance_operator_loc = *inheritance_operator_loc;
22969 n->end_keyword_loc = *end_keyword_loc;
22970
22971 return n;
22972}
22973
22974static rb_node_sclass_t *
22975rb_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)
22976{
22977 /* Keep the order of node creation */
22978 NODE *scope = NEW_SCOPE(0, nd_body, NULL, loc);
22979 rb_node_sclass_t *n = NODE_NEWNODE(NODE_SCLASS, rb_node_sclass_t, loc);
22980 RNODE_SCOPE(scope)->nd_parent = &n->node;
22981 n->nd_recv = nd_recv;
22982 n->nd_body = scope;
22983 n->class_keyword_loc = *class_keyword_loc;
22984 n->operator_loc = *operator_loc;
22985 n->end_keyword_loc = *end_keyword_loc;
22986
22987 return n;
22988}
22989
22990static rb_node_module_t *
22991rb_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)
22992{
22993 /* Keep the order of node creation */
22994 NODE *scope = NEW_SCOPE(0, nd_body, NULL, loc);
22995 rb_node_module_t *n = NODE_NEWNODE(NODE_MODULE, rb_node_module_t, loc);
22996 RNODE_SCOPE(scope)->nd_parent = &n->node;
22997 n->nd_cpath = nd_cpath;
22998 n->nd_body = scope;
22999 n->module_keyword_loc = *module_keyword_loc;
23000 n->end_keyword_loc = *end_keyword_loc;
23001
23002 return n;
23003}
23004
23005static rb_node_iter_t *
23006rb_node_iter_new(struct parser_params *p, rb_node_args_t *nd_args, NODE *nd_body, const YYLTYPE *loc)
23007{
23008 /* Keep the order of node creation */
23009 NODE *scope = NEW_SCOPE(nd_args, nd_body, NULL, loc);
23010 rb_node_iter_t *n = NODE_NEWNODE(NODE_ITER, rb_node_iter_t, loc);
23011 RNODE_SCOPE(scope)->nd_parent = &n->node;
23012 n->nd_body = scope;
23013 n->nd_iter = 0;
23014
23015 return n;
23016}
23017
23018static rb_node_lambda_t *
23019rb_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)
23020{
23021 /* Keep the order of node creation */
23022 NODE *scope = NEW_SCOPE(nd_args, nd_body, NULL, loc);
23023 YYLTYPE lambda_loc = code_loc_gen(operator_loc, closing_loc);
23024 rb_node_lambda_t *n = NODE_NEWNODE(NODE_LAMBDA, rb_node_lambda_t, &lambda_loc);
23025 RNODE_SCOPE(scope)->nd_parent = &n->node;
23026 n->nd_body = scope;
23027 n->operator_loc = *operator_loc;
23028 n->opening_loc = *opening_loc;
23029 n->closing_loc = *closing_loc;
23030
23031 return n;
23032}
23033
23034static rb_node_case_t *
23035rb_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)
23036{
23037 rb_node_case_t *n = NODE_NEWNODE(NODE_CASE, rb_node_case_t, loc);
23038 n->nd_head = nd_head;
23039 n->nd_body = nd_body;
23040 n->case_keyword_loc = *case_keyword_loc;
23041 n->end_keyword_loc = *end_keyword_loc;
23042
23043 return n;
23044}
23045
23046static rb_node_case2_t *
23047rb_node_case2_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc, const YYLTYPE *case_keyword_loc, const YYLTYPE *end_keyword_loc)
23048{
23049 rb_node_case2_t *n = NODE_NEWNODE(NODE_CASE2, rb_node_case2_t, loc);
23050 n->nd_head = 0;
23051 n->nd_body = nd_body;
23052 n->case_keyword_loc = *case_keyword_loc;
23053 n->end_keyword_loc = *end_keyword_loc;
23054
23055 return n;
23056}
23057
23058static rb_node_case3_t *
23059rb_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)
23060{
23061 rb_node_case3_t *n = NODE_NEWNODE(NODE_CASE3, rb_node_case3_t, loc);
23062 n->nd_head = nd_head;
23063 n->nd_body = nd_body;
23064 n->case_keyword_loc = *case_keyword_loc;
23065 n->end_keyword_loc = *end_keyword_loc;
23066
23067 return n;
23068}
23069
23070static rb_node_when_t *
23071rb_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)
23072{
23073 rb_node_when_t *n = NODE_NEWNODE(NODE_WHEN, rb_node_when_t, loc);
23074 n->nd_head = nd_head;
23075 n->nd_body = nd_body;
23076 n->nd_next = nd_next;
23077 n->keyword_loc = *keyword_loc;
23078 n->then_keyword_loc = *then_keyword_loc;
23079
23080 return n;
23081}
23082
23083static rb_node_in_t *
23084rb_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)
23085{
23086 rb_node_in_t *n = NODE_NEWNODE(NODE_IN, rb_node_in_t, loc);
23087 n->nd_head = nd_head;
23088 n->nd_body = nd_body;
23089 n->nd_next = nd_next;
23090 n->in_keyword_loc = *in_keyword_loc;
23091 n->then_keyword_loc = *then_keyword_loc;
23092 n->operator_loc = *operator_loc;
23093
23094 return n;
23095}
23096
23097static rb_node_while_t *
23098rb_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)
23099{
23100 rb_node_while_t *n = NODE_NEWNODE(NODE_WHILE, rb_node_while_t, loc);
23101 n->nd_cond = nd_cond;
23102 n->nd_body = nd_body;
23103 n->nd_state = nd_state;
23104 n->keyword_loc = *keyword_loc;
23105 n->closing_loc = *closing_loc;
23106
23107 return n;
23108}
23109
23110static rb_node_until_t *
23111rb_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)
23112{
23113 rb_node_until_t *n = NODE_NEWNODE(NODE_UNTIL, rb_node_until_t, loc);
23114 n->nd_cond = nd_cond;
23115 n->nd_body = nd_body;
23116 n->nd_state = nd_state;
23117 n->keyword_loc = *keyword_loc;
23118 n->closing_loc = *closing_loc;
23119
23120 return n;
23121}
23122
23123static rb_node_colon2_t *
23124rb_node_colon2_new(struct parser_params *p, NODE *nd_head, ID nd_mid, const YYLTYPE *loc, const YYLTYPE *delimiter_loc, const YYLTYPE *name_loc)
23125{
23126 rb_node_colon2_t *n = NODE_NEWNODE(NODE_COLON2, rb_node_colon2_t, loc);
23127 n->nd_head = nd_head;
23128 n->nd_mid = nd_mid;
23129 n->delimiter_loc = *delimiter_loc;
23130 n->name_loc = *name_loc;
23131
23132 return n;
23133}
23134
23135static rb_node_colon3_t *
23136rb_node_colon3_new(struct parser_params *p, ID nd_mid, const YYLTYPE *loc, const YYLTYPE *delimiter_loc, const YYLTYPE *name_loc)
23137{
23138 rb_node_colon3_t *n = NODE_NEWNODE(NODE_COLON3, rb_node_colon3_t, loc);
23139 n->nd_mid = nd_mid;
23140 n->delimiter_loc = *delimiter_loc;
23141 n->name_loc = *name_loc;
23142
23143 return n;
23144}
23145
23146static rb_node_dot2_t *
23147rb_node_dot2_new(struct parser_params *p, NODE *nd_beg, NODE *nd_end, const YYLTYPE *loc, const YYLTYPE *operator_loc)
23148{
23149 rb_node_dot2_t *n = NODE_NEWNODE(NODE_DOT2, rb_node_dot2_t, loc);
23150 n->nd_beg = nd_beg;
23151 n->nd_end = nd_end;
23152 n->operator_loc = *operator_loc;
23153
23154 return n;
23155}
23156
23157static rb_node_dot3_t *
23158rb_node_dot3_new(struct parser_params *p, NODE *nd_beg, NODE *nd_end, const YYLTYPE *loc, const YYLTYPE *operator_loc)
23159{
23160 rb_node_dot3_t *n = NODE_NEWNODE(NODE_DOT3, rb_node_dot3_t, loc);
23161 n->nd_beg = nd_beg;
23162 n->nd_end = nd_end;
23163 n->operator_loc = *operator_loc;
23164
23165 return n;
23166}
23167
23168static rb_node_self_t *
23169rb_node_self_new(struct parser_params *p, const YYLTYPE *loc)
23170{
23171 rb_node_self_t *n = NODE_NEWNODE(NODE_SELF, rb_node_self_t, loc);
23172 n->nd_state = 1;
23173
23174 return n;
23175}
23176
23177static rb_node_nil_t *
23178rb_node_nil_new(struct parser_params *p, const YYLTYPE *loc)
23179{
23180 rb_node_nil_t *n = NODE_NEWNODE(NODE_NIL, rb_node_nil_t, loc);
23181
23182 return n;
23183}
23184
23185static rb_node_true_t *
23186rb_node_true_new(struct parser_params *p, const YYLTYPE *loc)
23187{
23188 rb_node_true_t *n = NODE_NEWNODE(NODE_TRUE, rb_node_true_t, loc);
23189
23190 return n;
23191}
23192
23193static rb_node_false_t *
23194rb_node_false_new(struct parser_params *p, const YYLTYPE *loc)
23195{
23196 rb_node_false_t *n = NODE_NEWNODE(NODE_FALSE, rb_node_false_t, loc);
23197
23198 return n;
23199}
23200
23201static rb_node_super_t *
23202rb_node_super_new(struct parser_params *p, NODE *nd_args, const YYLTYPE *loc,
23203 const YYLTYPE *keyword_loc, const YYLTYPE *lparen_loc, const YYLTYPE *rparen_loc)
23204{
23205 rb_node_super_t *n = NODE_NEWNODE(NODE_SUPER, rb_node_super_t, loc);
23206 n->nd_args = nd_args;
23207 n->keyword_loc = *keyword_loc;
23208 n->lparen_loc = *lparen_loc;
23209 n->rparen_loc = *rparen_loc;
23210
23211 return n;
23212}
23213
23214static rb_node_zsuper_t *
23215rb_node_zsuper_new(struct parser_params *p, const YYLTYPE *loc)
23216{
23217 rb_node_zsuper_t *n = NODE_NEWNODE(NODE_ZSUPER, rb_node_zsuper_t, loc);
23218
23219 return n;
23220}
23221
23222static rb_node_match2_t *
23223rb_node_match2_new(struct parser_params *p, NODE *nd_recv, NODE *nd_value, const YYLTYPE *loc)
23224{
23225 rb_node_match2_t *n = NODE_NEWNODE(NODE_MATCH2, rb_node_match2_t, loc);
23226 n->nd_recv = nd_recv;
23227 n->nd_value = nd_value;
23228 n->nd_args = 0;
23229
23230 return n;
23231}
23232
23233static rb_node_match3_t *
23234rb_node_match3_new(struct parser_params *p, NODE *nd_recv, NODE *nd_value, const YYLTYPE *loc)
23235{
23236 rb_node_match3_t *n = NODE_NEWNODE(NODE_MATCH3, rb_node_match3_t, loc);
23237 n->nd_recv = nd_recv;
23238 n->nd_value = nd_value;
23239
23240 return n;
23241}
23242
23243static rb_node_list_t *
23244rb_node_list_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc)
23245{
23246 return rb_node_list_new2(p, nd_head, 1, 0, loc);
23247}
23248
23249static rb_node_list_t *
23250rb_node_list_new2(struct parser_params *p, NODE *nd_head, long nd_alen, NODE *nd_next, const YYLTYPE *loc)
23251{
23252 rb_node_list_t *n = NODE_NEWNODE(NODE_LIST, rb_node_list_t, loc);
23253 n->nd_head = nd_head;
23254 n->as.nd_alen = nd_alen;
23255 n->nd_next = nd_next;
23256
23257 return n;
23258}
23259
23260static rb_node_zlist_t *
23261rb_node_zlist_new(struct parser_params *p, const YYLTYPE *loc)
23262{
23263 rb_node_zlist_t *n = NODE_NEWNODE(NODE_ZLIST, rb_node_zlist_t, loc);
23264
23265 return n;
23266}
23267
23268static rb_node_hash_t *
23269rb_node_hash_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc)
23270{
23271 rb_node_hash_t *n = NODE_NEWNODE(NODE_HASH, rb_node_hash_t, loc);
23272 n->nd_head = nd_head;
23273 n->nd_brace = 0;
23274
23275 return n;
23276}
23277
23278static rb_node_masgn_t *
23279rb_node_masgn_new(struct parser_params *p, NODE *nd_head, NODE *nd_args, const YYLTYPE *loc)
23280{
23281 rb_node_masgn_t *n = NODE_NEWNODE(NODE_MASGN, rb_node_masgn_t, loc);
23282 n->nd_head = nd_head;
23283 n->nd_value = 0;
23284 n->nd_args = nd_args;
23285
23286 return n;
23287}
23288
23289static rb_node_gasgn_t *
23290rb_node_gasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc)
23291{
23292 rb_node_gasgn_t *n = NODE_NEWNODE(NODE_GASGN, rb_node_gasgn_t, loc);
23293 n->nd_vid = nd_vid;
23294 n->nd_value = nd_value;
23295
23296 return n;
23297}
23298
23299static rb_node_lasgn_t *
23300rb_node_lasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc)
23301{
23302 rb_node_lasgn_t *n = NODE_NEWNODE(NODE_LASGN, rb_node_lasgn_t, loc);
23303 n->nd_vid = nd_vid;
23304 n->nd_value = nd_value;
23305
23306 return n;
23307}
23308
23309static rb_node_dasgn_t *
23310rb_node_dasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc)
23311{
23312 rb_node_dasgn_t *n = NODE_NEWNODE(NODE_DASGN, rb_node_dasgn_t, loc);
23313 n->nd_vid = nd_vid;
23314 n->nd_value = nd_value;
23315
23316 return n;
23317}
23318
23319static rb_node_iasgn_t *
23320rb_node_iasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc)
23321{
23322 rb_node_iasgn_t *n = NODE_NEWNODE(NODE_IASGN, rb_node_iasgn_t, loc);
23323 n->nd_vid = nd_vid;
23324 n->nd_value = nd_value;
23325
23326 return n;
23327}
23328
23329static rb_node_cvasgn_t *
23330rb_node_cvasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc)
23331{
23332 rb_node_cvasgn_t *n = NODE_NEWNODE(NODE_CVASGN, rb_node_cvasgn_t, loc);
23333 n->nd_vid = nd_vid;
23334 n->nd_value = nd_value;
23335
23336 return n;
23337}
23338
23339static rb_node_op_asgn1_t *
23340rb_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)
23341{
23342 rb_node_op_asgn1_t *n = NODE_NEWNODE(NODE_OP_ASGN1, rb_node_op_asgn1_t, loc);
23343 n->nd_recv = nd_recv;
23344 n->nd_mid = nd_mid;
23345 n->nd_index = index;
23346 n->nd_rvalue = rvalue;
23347 n->call_operator_loc = *call_operator_loc;
23348 n->opening_loc = *opening_loc;
23349 n->closing_loc = *closing_loc;
23350 n->binary_operator_loc = *binary_operator_loc;
23351
23352 return n;
23353}
23354
23355static rb_node_op_asgn2_t *
23356rb_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)
23357{
23358 rb_node_op_asgn2_t *n = NODE_NEWNODE(NODE_OP_ASGN2, rb_node_op_asgn2_t, loc);
23359 n->nd_recv = nd_recv;
23360 n->nd_value = nd_value;
23361 n->nd_vid = nd_vid;
23362 n->nd_mid = nd_mid;
23363 n->nd_aid = nd_aid;
23364 n->call_operator_loc = *call_operator_loc;
23365 n->message_loc = *message_loc;
23366 n->binary_operator_loc = *binary_operator_loc;
23367
23368 return n;
23369}
23370
23371static rb_node_op_asgn_or_t *
23372rb_node_op_asgn_or_new(struct parser_params *p, NODE *nd_head, NODE *nd_value, const YYLTYPE *loc)
23373{
23374 rb_node_op_asgn_or_t *n = NODE_NEWNODE(NODE_OP_ASGN_OR, rb_node_op_asgn_or_t, loc);
23375 n->nd_head = nd_head;
23376 n->nd_value = nd_value;
23377
23378 return n;
23379}
23380
23381static rb_node_op_asgn_and_t *
23382rb_node_op_asgn_and_new(struct parser_params *p, NODE *nd_head, NODE *nd_value, const YYLTYPE *loc)
23383{
23384 rb_node_op_asgn_and_t *n = NODE_NEWNODE(NODE_OP_ASGN_AND, rb_node_op_asgn_and_t, loc);
23385 n->nd_head = nd_head;
23386 n->nd_value = nd_value;
23387
23388 return n;
23389}
23390
23391static rb_node_gvar_t *
23392rb_node_gvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc)
23393{
23394 rb_node_gvar_t *n = NODE_NEWNODE(NODE_GVAR, rb_node_gvar_t, loc);
23395 n->nd_vid = nd_vid;
23396
23397 return n;
23398}
23399
23400static rb_node_lvar_t *
23401rb_node_lvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc)
23402{
23403 rb_node_lvar_t *n = NODE_NEWNODE(NODE_LVAR, rb_node_lvar_t, loc);
23404 n->nd_vid = nd_vid;
23405
23406 return n;
23407}
23408
23409static rb_node_dvar_t *
23410rb_node_dvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc)
23411{
23412 rb_node_dvar_t *n = NODE_NEWNODE(NODE_DVAR, rb_node_dvar_t, loc);
23413 n->nd_vid = nd_vid;
23414
23415 return n;
23416}
23417
23418static rb_node_ivar_t *
23419rb_node_ivar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc)
23420{
23421 rb_node_ivar_t *n = NODE_NEWNODE(NODE_IVAR, rb_node_ivar_t, loc);
23422 n->nd_vid = nd_vid;
23423
23424 return n;
23425}
23426
23427static rb_node_const_t *
23428rb_node_const_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc)
23429{
23430 rb_node_const_t *n = NODE_NEWNODE(NODE_CONST, rb_node_const_t, loc);
23431 n->nd_vid = nd_vid;
23432
23433 return n;
23434}
23435
23436static rb_node_cvar_t *
23437rb_node_cvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc)
23438{
23439 rb_node_cvar_t *n = NODE_NEWNODE(NODE_CVAR, rb_node_cvar_t, loc);
23440 n->nd_vid = nd_vid;
23441
23442 return n;
23443}
23444
23445static rb_node_nth_ref_t *
23446rb_node_nth_ref_new(struct parser_params *p, long nd_nth, const YYLTYPE *loc)
23447{
23448 rb_node_nth_ref_t *n = NODE_NEWNODE(NODE_NTH_REF, rb_node_nth_ref_t, loc);
23449 n->nd_nth = nd_nth;
23450
23451 return n;
23452}
23453
23454static rb_node_back_ref_t *
23455rb_node_back_ref_new(struct parser_params *p, long nd_nth, const YYLTYPE *loc)
23456{
23457 rb_node_back_ref_t *n = NODE_NEWNODE(NODE_BACK_REF, rb_node_back_ref_t, loc);
23458 n->nd_nth = nd_nth;
23459
23460 return n;
23461}
23462
23463static rb_node_integer_t *
23464rb_node_integer_new(struct parser_params *p, char* val, int base, const YYLTYPE *loc)
23465{
23466 rb_node_integer_t *n = NODE_NEWNODE(NODE_INTEGER, rb_node_integer_t, loc);
23467 n->val = val;
23468 n->minus = FALSE;
23469 n->base = base;
23470
23471 return n;
23472}
23473
23474static rb_node_float_t *
23475rb_node_float_new(struct parser_params *p, char* val, const YYLTYPE *loc)
23476{
23477 rb_node_float_t *n = NODE_NEWNODE(NODE_FLOAT, rb_node_float_t, loc);
23478 n->val = val;
23479 n->minus = FALSE;
23480
23481 return n;
23482}
23483
23484static rb_node_rational_t *
23485rb_node_rational_new(struct parser_params *p, char* val, int base, int seen_point, const YYLTYPE *loc)
23486{
23487 rb_node_rational_t *n = NODE_NEWNODE(NODE_RATIONAL, rb_node_rational_t, loc);
23488 n->val = val;
23489 n->minus = FALSE;
23490 n->base = base;
23491 n->seen_point = seen_point;
23492
23493 return n;
23494}
23495
23496static rb_node_imaginary_t *
23497rb_node_imaginary_new(struct parser_params *p, char* val, int base, int seen_point, enum rb_numeric_type numeric_type, const YYLTYPE *loc)
23498{
23499 rb_node_imaginary_t *n = NODE_NEWNODE(NODE_IMAGINARY, rb_node_imaginary_t, loc);
23500 n->val = val;
23501 n->minus = FALSE;
23502 n->base = base;
23503 n->seen_point = seen_point;
23504 n->type = numeric_type;
23505
23506 return n;
23507}
23508
23509static rb_node_str_t *
23510rb_node_str_new(struct parser_params *p, rb_parser_string_t *string, const YYLTYPE *loc)
23511{
23512 rb_node_str_t *n = NODE_NEWNODE(NODE_STR, rb_node_str_t, loc);
23513 n->string = string;
23514
23515 return n;
23516}
23517
23518/* TODO; Use union for NODE_DSTR2 */
23519static rb_node_dstr_t *
23520rb_node_dstr_new0(struct parser_params *p, rb_parser_string_t *string, long nd_alen, NODE *nd_next, const YYLTYPE *loc)
23521{
23522 rb_node_dstr_t *n = NODE_NEWNODE(NODE_DSTR, rb_node_dstr_t, loc);
23523 n->string = string;
23524 n->as.nd_alen = nd_alen;
23525 n->nd_next = (rb_node_list_t *)nd_next;
23526
23527 return n;
23528}
23529
23530static rb_node_dstr_t *
23531rb_node_dstr_new(struct parser_params *p, rb_parser_string_t *string, const YYLTYPE *loc)
23532{
23533 return rb_node_dstr_new0(p, string, 1, 0, loc);
23534}
23535
23536static rb_node_xstr_t *
23537rb_node_xstr_new(struct parser_params *p, rb_parser_string_t *string, const YYLTYPE *loc)
23538{
23539 rb_node_xstr_t *n = NODE_NEWNODE(NODE_XSTR, rb_node_xstr_t, loc);
23540 n->string = string;
23541
23542 return n;
23543}
23544
23545static rb_node_dxstr_t *
23546rb_node_dxstr_new(struct parser_params *p, rb_parser_string_t *string, long nd_alen, NODE *nd_next, const YYLTYPE *loc)
23547{
23548 rb_node_dxstr_t *n = NODE_NEWNODE(NODE_DXSTR, rb_node_dxstr_t, loc);
23549 n->string = string;
23550 n->as.nd_alen = nd_alen;
23551 n->nd_next = (rb_node_list_t *)nd_next;
23552
23553 return n;
23554}
23555
23556static rb_node_sym_t *
23557rb_node_sym_new(struct parser_params *p, VALUE str, const YYLTYPE *loc)
23558{
23559 rb_node_sym_t *n = NODE_NEWNODE(NODE_SYM, rb_node_sym_t, loc);
23560 n->string = rb_str_to_parser_string(p, str);
23561
23562 return n;
23563}
23564
23565static rb_node_dsym_t *
23566rb_node_dsym_new(struct parser_params *p, rb_parser_string_t *string, long nd_alen, NODE *nd_next, const YYLTYPE *loc)
23567{
23568 rb_node_dsym_t *n = NODE_NEWNODE(NODE_DSYM, rb_node_dsym_t, loc);
23569 n->string = string;
23570 n->as.nd_alen = nd_alen;
23571 n->nd_next = (rb_node_list_t *)nd_next;
23572
23573 return n;
23574}
23575
23576static rb_node_evstr_t *
23577rb_node_evstr_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc, const YYLTYPE *opening_loc, const YYLTYPE *closing_loc)
23578{
23579 rb_node_evstr_t *n = NODE_NEWNODE(NODE_EVSTR, rb_node_evstr_t, loc);
23580 n->nd_body = nd_body;
23581 n->opening_loc = *opening_loc;
23582 n->closing_loc = *closing_loc;
23583
23584 return n;
23585}
23586
23587static rb_node_regx_t *
23588rb_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)
23589{
23590 rb_node_regx_t *n = NODE_NEWNODE(NODE_REGX, rb_node_regx_t, loc);
23591 n->string = string;
23592 n->options = options & RE_OPTION_MASK;
23593 n->opening_loc = *opening_loc;
23594 n->content_loc = *content_loc;
23595 n->closing_loc = *closing_loc;
23596
23597 return n;
23598}
23599
23600static rb_node_call_t *
23601rb_node_call_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc)
23602{
23603 rb_node_call_t *n = NODE_NEWNODE(NODE_CALL, rb_node_call_t, loc);
23604 n->nd_recv = nd_recv;
23605 n->nd_mid = nd_mid;
23606 n->nd_args = nd_args;
23607
23608 return n;
23609}
23610
23611static rb_node_opcall_t *
23612rb_node_opcall_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc)
23613{
23614 rb_node_opcall_t *n = NODE_NEWNODE(NODE_OPCALL, rb_node_opcall_t, loc);
23615 n->nd_recv = nd_recv;
23616 n->nd_mid = nd_mid;
23617 n->nd_args = nd_args;
23618
23619 return n;
23620}
23621
23622static rb_node_fcall_t *
23623rb_node_fcall_new(struct parser_params *p, ID nd_mid, NODE *nd_args, const YYLTYPE *loc)
23624{
23625 rb_node_fcall_t *n = NODE_NEWNODE(NODE_FCALL, rb_node_fcall_t, loc);
23626 n->nd_mid = nd_mid;
23627 n->nd_args = nd_args;
23628
23629 return n;
23630}
23631
23632static rb_node_qcall_t *
23633rb_node_qcall_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc)
23634{
23635 rb_node_qcall_t *n = NODE_NEWNODE(NODE_QCALL, rb_node_qcall_t, loc);
23636 n->nd_recv = nd_recv;
23637 n->nd_mid = nd_mid;
23638 n->nd_args = nd_args;
23639
23640 return n;
23641}
23642
23643static rb_node_vcall_t *
23644rb_node_vcall_new(struct parser_params *p, ID nd_mid, const YYLTYPE *loc)
23645{
23646 rb_node_vcall_t *n = NODE_NEWNODE(NODE_VCALL, rb_node_vcall_t, loc);
23647 n->nd_mid = nd_mid;
23648
23649 return n;
23650}
23651
23652static rb_node_once_t *
23653rb_node_once_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc)
23654{
23655 rb_node_once_t *n = NODE_NEWNODE(NODE_ONCE, rb_node_once_t, loc);
23656 n->nd_body = nd_body;
23657
23658 return n;
23659}
23660
23661static rb_node_args_t *
23662rb_node_args_new(struct parser_params *p, const YYLTYPE *loc)
23663{
23664 rb_node_args_t *n = NODE_NEWNODE(NODE_ARGS, rb_node_args_t, loc);
23665 MEMZERO(&n->nd_ainfo, struct rb_args_info, 1);
23666
23667 return n;
23668}
23669
23670static rb_node_args_aux_t *
23671rb_node_args_aux_new(struct parser_params *p, ID nd_pid, int nd_plen, const YYLTYPE *loc)
23672{
23673 rb_node_args_aux_t *n = NODE_NEWNODE(NODE_ARGS_AUX, rb_node_args_aux_t, loc);
23674 n->nd_pid = nd_pid;
23675 n->nd_plen = nd_plen;
23676 n->nd_next = 0;
23677
23678 return n;
23679}
23680
23681static rb_node_opt_arg_t *
23682rb_node_opt_arg_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc)
23683{
23684 rb_node_opt_arg_t *n = NODE_NEWNODE(NODE_OPT_ARG, rb_node_opt_arg_t, loc);
23685 n->nd_body = nd_body;
23686 n->nd_next = 0;
23687
23688 return n;
23689}
23690
23691static rb_node_kw_arg_t *
23692rb_node_kw_arg_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc)
23693{
23694 rb_node_kw_arg_t *n = NODE_NEWNODE(NODE_KW_ARG, rb_node_kw_arg_t, loc);
23695 n->nd_body = nd_body;
23696 n->nd_next = 0;
23697
23698 return n;
23699}
23700
23701static rb_node_postarg_t *
23702rb_node_postarg_new(struct parser_params *p, NODE *nd_1st, NODE *nd_2nd, const YYLTYPE *loc)
23703{
23704 rb_node_postarg_t *n = NODE_NEWNODE(NODE_POSTARG, rb_node_postarg_t, loc);
23705 n->nd_1st = nd_1st;
23706 n->nd_2nd = nd_2nd;
23707
23708 return n;
23709}
23710
23711static rb_node_argscat_t *
23712rb_node_argscat_new(struct parser_params *p, NODE *nd_head, NODE *nd_body, const YYLTYPE *loc)
23713{
23714 rb_node_argscat_t *n = NODE_NEWNODE(NODE_ARGSCAT, rb_node_argscat_t, loc);
23715 n->nd_head = nd_head;
23716 n->nd_body = nd_body;
23717
23718 return n;
23719}
23720
23721static rb_node_argspush_t *
23722rb_node_argspush_new(struct parser_params *p, NODE *nd_head, NODE *nd_body, const YYLTYPE *loc)
23723{
23724 rb_node_argspush_t *n = NODE_NEWNODE(NODE_ARGSPUSH, rb_node_argspush_t, loc);
23725 n->nd_head = nd_head;
23726 n->nd_body = nd_body;
23727
23728 return n;
23729}
23730
23731static rb_node_splat_t *
23732rb_node_splat_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc, const YYLTYPE *operator_loc)
23733{
23734 rb_node_splat_t *n = NODE_NEWNODE(NODE_SPLAT, rb_node_splat_t, loc);
23735 n->nd_head = nd_head;
23736 n->operator_loc = *operator_loc;
23737
23738 return n;
23739}
23740
23741static rb_node_block_pass_t *
23742rb_node_block_pass_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc, const YYLTYPE *operator_loc)
23743{
23744 rb_node_block_pass_t *n = NODE_NEWNODE(NODE_BLOCK_PASS, rb_node_block_pass_t, loc);
23745 n->forwarding = 0;
23746 n->nd_head = 0;
23747 n->nd_body = nd_body;
23748 n->operator_loc = *operator_loc;
23749
23750 return n;
23751}
23752
23753static rb_node_alias_t *
23754rb_node_alias_new(struct parser_params *p, NODE *nd_1st, NODE *nd_2nd, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
23755{
23756 rb_node_alias_t *n = NODE_NEWNODE(NODE_ALIAS, rb_node_alias_t, loc);
23757 n->nd_1st = nd_1st;
23758 n->nd_2nd = nd_2nd;
23759 n->keyword_loc = *keyword_loc;
23760
23761 return n;
23762}
23763
23764static rb_node_valias_t *
23765rb_node_valias_new(struct parser_params *p, ID nd_alias, ID nd_orig, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
23766{
23767 rb_node_valias_t *n = NODE_NEWNODE(NODE_VALIAS, rb_node_valias_t, loc);
23768 n->nd_alias = nd_alias;
23769 n->nd_orig = nd_orig;
23770 n->keyword_loc = *keyword_loc;
23771
23772 return n;
23773}
23774
23775static rb_node_undef_t *
23776rb_node_undef_new(struct parser_params *p, NODE *nd_undef, const YYLTYPE *loc)
23777{
23778 rb_node_undef_t *n = NODE_NEWNODE(NODE_UNDEF, rb_node_undef_t, loc);
23779 n->nd_undefs = rb_parser_ary_new_capa_for_node(p, 1);
23780 n->keyword_loc = NULL_LOC;
23781 rb_parser_ary_push_node(p, n->nd_undefs, nd_undef);
23782
23783 return n;
23784}
23785
23786static rb_node_errinfo_t *
23787rb_node_errinfo_new(struct parser_params *p, const YYLTYPE *loc)
23788{
23789 rb_node_errinfo_t *n = NODE_NEWNODE(NODE_ERRINFO, rb_node_errinfo_t, loc);
23790
23791 return n;
23792}
23793
23794static rb_node_defined_t *
23795rb_node_defined_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
23796{
23797 rb_node_defined_t *n = NODE_NEWNODE(NODE_DEFINED, rb_node_defined_t, loc);
23798 n->nd_head = nd_head;
23799 n->keyword_loc = *keyword_loc;
23800
23801 return n;
23802}
23803
23804static rb_node_postexe_t *
23805rb_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)
23806{
23807 rb_node_postexe_t *n = NODE_NEWNODE(NODE_POSTEXE, rb_node_postexe_t, loc);
23808 n->nd_body = nd_body;
23809 n->keyword_loc = *keyword_loc;
23810 n->opening_loc = *opening_loc;
23811 n->closing_loc = *closing_loc;
23812
23813 return n;
23814}
23815
23816static rb_node_attrasgn_t *
23817rb_node_attrasgn_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc)
23818{
23819 rb_node_attrasgn_t *n = NODE_NEWNODE(NODE_ATTRASGN, rb_node_attrasgn_t, loc);
23820 n->nd_recv = nd_recv;
23821 n->nd_mid = nd_mid;
23822 n->nd_args = nd_args;
23823
23824 return n;
23825}
23826
23827static rb_node_aryptn_t *
23828rb_node_aryptn_new(struct parser_params *p, NODE *pre_args, NODE *rest_arg, NODE *post_args, const YYLTYPE *loc)
23829{
23830 rb_node_aryptn_t *n = NODE_NEWNODE(NODE_ARYPTN, rb_node_aryptn_t, loc);
23831 n->nd_pconst = 0;
23832 n->pre_args = pre_args;
23833 n->rest_arg = rest_arg;
23834 n->post_args = post_args;
23835
23836 return n;
23837}
23838
23839static rb_node_hshptn_t *
23840rb_node_hshptn_new(struct parser_params *p, NODE *nd_pconst, NODE *nd_pkwargs, NODE *nd_pkwrestarg, const YYLTYPE *loc)
23841{
23842 rb_node_hshptn_t *n = NODE_NEWNODE(NODE_HSHPTN, rb_node_hshptn_t, loc);
23843 n->nd_pconst = nd_pconst;
23844 n->nd_pkwargs = nd_pkwargs;
23845 n->nd_pkwrestarg = nd_pkwrestarg;
23846
23847 return n;
23848}
23849
23850static rb_node_fndptn_t *
23851rb_node_fndptn_new(struct parser_params *p, NODE *pre_rest_arg, NODE *args, NODE *post_rest_arg, const YYLTYPE *loc)
23852{
23853 rb_node_fndptn_t *n = NODE_NEWNODE(NODE_FNDPTN, rb_node_fndptn_t, loc);
23854 n->nd_pconst = 0;
23855 n->pre_rest_arg = pre_rest_arg;
23856 n->args = args;
23857 n->post_rest_arg = post_rest_arg;
23858
23859 return n;
23860}
23861
23862static rb_node_line_t *
23863rb_node_line_new(struct parser_params *p, const YYLTYPE *loc)
23864{
23865 rb_node_line_t *n = NODE_NEWNODE(NODE_LINE, rb_node_line_t, loc);
23866
23867 return n;
23868}
23869
23870static rb_node_file_t *
23871rb_node_file_new(struct parser_params *p, VALUE str, const YYLTYPE *loc)
23872{
23873 rb_node_file_t *n = NODE_NEWNODE(NODE_FILE, rb_node_file_t, loc);
23874 n->path = rb_str_to_parser_string(p, str);
23875
23876 return n;
23877}
23878
23879static rb_node_encoding_t *
23880rb_node_encoding_new(struct parser_params *p, const YYLTYPE *loc)
23881{
23882 rb_node_encoding_t *n = NODE_NEWNODE(NODE_ENCODING, rb_node_encoding_t, loc);
23883 n->enc = p->enc;
23884
23885 return n;
23886}
23887
23888static rb_node_cdecl_t *
23889rb_node_cdecl_new(struct parser_params *p, ID nd_vid, NODE *nd_value, NODE *nd_else, enum rb_parser_shareability shareability, const YYLTYPE *loc)
23890{
23891 rb_node_cdecl_t *n = NODE_NEWNODE(NODE_CDECL, rb_node_cdecl_t, loc);
23892 n->nd_vid = nd_vid;
23893 n->nd_value = nd_value;
23894 n->nd_else = nd_else;
23895 n->shareability = shareability;
23896
23897 return n;
23898}
23899
23900static rb_node_op_cdecl_t *
23901rb_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)
23902{
23903 rb_node_op_cdecl_t *n = NODE_NEWNODE(NODE_OP_CDECL, rb_node_op_cdecl_t, loc);
23904 n->nd_head = nd_head;
23905 n->nd_value = nd_value;
23906 n->nd_aid = nd_aid;
23907 n->shareability = shareability;
23908
23909 return n;
23910}
23911
23912static rb_node_error_t *
23913rb_node_error_new(struct parser_params *p, const YYLTYPE *loc)
23914{
23915 rb_node_error_t *n = NODE_NEWNODE(NODE_ERROR, rb_node_error_t, loc);
23916
23917 return n;
23918}
23919
23920static rb_node_break_t *
23921rb_node_break_new(struct parser_params *p, NODE *nd_stts, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
23922{
23923 rb_node_break_t *n = NODE_NEWNODE(NODE_BREAK, rb_node_break_t, loc);
23924 n->nd_stts = nd_stts;
23925 n->nd_chain = 0;
23926 n->keyword_loc = *keyword_loc;
23927
23928 return n;
23929}
23930
23931static rb_node_next_t *
23932rb_node_next_new(struct parser_params *p, NODE *nd_stts, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
23933{
23934 rb_node_next_t *n = NODE_NEWNODE(NODE_NEXT, rb_node_next_t, loc);
23935 n->nd_stts = nd_stts;
23936 n->nd_chain = 0;
23937 n->keyword_loc = *keyword_loc;
23938
23939 return n;
23940}
23941
23942static rb_node_redo_t *
23943rb_node_redo_new(struct parser_params *p, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
23944{
23945 rb_node_redo_t *n = NODE_NEWNODE(NODE_REDO, rb_node_redo_t, loc);
23946 n->nd_chain = 0;
23947 n->keyword_loc = *keyword_loc;
23948
23949 return n;
23950}
23951
23952static rb_node_def_temp_t *
23953rb_node_def_temp_new(struct parser_params *p, const YYLTYPE *loc)
23954{
23955 rb_node_def_temp_t *n = NODE_NEWNODE((enum node_type)NODE_DEF_TEMP, rb_node_def_temp_t, loc);
23956 n->save.numparam_save = 0;
23957 n->save.max_numparam = 0;
23958 n->save.ctxt = p->ctxt;
23959 n->nd_def = 0;
23960 n->nd_mid = 0;
23961
23962 return n;
23963}
23964
23965static rb_node_def_temp_t *
23966def_head_save(struct parser_params *p, rb_node_def_temp_t *n)
23967{
23968 n->save.numparam_save = numparam_push(p);
23969 n->save.max_numparam = p->max_numparam;
23970 return n;
23971}
23972
23973#ifndef RIPPER
23974static enum node_type
23975nodetype(NODE *node) /* for debug */
23976{
23977 return (enum node_type)nd_type(node);
23978}
23979
23980static int
23981nodeline(NODE *node)
23982{
23983 return nd_line(node);
23984}
23985#endif
23986
23987static NODE*
23988newline_node(NODE *node)
23989{
23990 if (node) {
23991 node = remove_begin(node);
23992 nd_set_fl_newline(node);
23993 }
23994 return node;
23995}
23996
23997static void
23998fixpos(NODE *node, NODE *orig)
23999{
24000 if (!node) return;
24001 if (!orig) return;
24002 nd_set_line(node, nd_line(orig));
24003}
24004
24005static NODE*
24006block_append(struct parser_params *p, NODE *head, NODE *tail)
24007{
24008 NODE *end, *h = head, *nd;
24009
24010 if (tail == 0) return head;
24011
24012 if (h == 0) return tail;
24013 switch (nd_type(h)) {
24014 default:
24015 h = end = NEW_BLOCK(head, &head->nd_loc);
24016 head = end;
24017 break;
24018 case NODE_BLOCK:
24019 end = RNODE_BLOCK(h)->nd_end;
24020 break;
24021 }
24022
24023 nd = RNODE_BLOCK(end)->nd_head;
24024 switch (nd_type(nd)) {
24025 case NODE_RETURN:
24026 case NODE_BREAK:
24027 case NODE_NEXT:
24028 case NODE_REDO:
24029 case NODE_RETRY:
24030 rb_warning0L(nd_line(tail), "statement not reached");
24031 break;
24032
24033 default:
24034 break;
24035 }
24036
24037 if (!nd_type_p(tail, NODE_BLOCK)) {
24038 tail = NEW_BLOCK(tail, &tail->nd_loc);
24039 }
24040 RNODE_BLOCK(end)->nd_next = tail;
24041 RNODE_BLOCK(h)->nd_end = RNODE_BLOCK(tail)->nd_end;
24042 nd_set_last_loc(head, nd_last_loc(tail));
24043 return head;
24044}
24045
24046/* append item to the list */
24047static NODE*
24048list_append(struct parser_params *p, NODE *list, NODE *item)
24049{
24050 NODE *last;
24051
24052 if (list == 0) return NEW_LIST(item, &item->nd_loc);
24053 if (RNODE_LIST(list)->nd_next) {
24054 last = RNODE_LIST(RNODE_LIST(list)->nd_next)->as.nd_end;
24055 }
24056 else {
24057 last = list;
24058 }
24059
24060 RNODE_LIST(list)->as.nd_alen += 1;
24061 RNODE_LIST(last)->nd_next = NEW_LIST(item, &item->nd_loc);
24062 RNODE_LIST(RNODE_LIST(list)->nd_next)->as.nd_end = RNODE_LIST(last)->nd_next;
24063
24064 nd_set_last_loc(list, nd_last_loc(item));
24065
24066 return list;
24067}
24068
24069/* concat two lists */
24070static NODE*
24071list_concat(NODE *head, NODE *tail)
24072{
24073 NODE *last;
24074
24075 if (RNODE_LIST(head)->nd_next) {
24076 last = RNODE_LIST(RNODE_LIST(head)->nd_next)->as.nd_end;
24077 }
24078 else {
24079 last = head;
24080 }
24081
24082 RNODE_LIST(head)->as.nd_alen += RNODE_LIST(tail)->as.nd_alen;
24083 RNODE_LIST(last)->nd_next = tail;
24084 if (RNODE_LIST(tail)->nd_next) {
24085 RNODE_LIST(RNODE_LIST(head)->nd_next)->as.nd_end = RNODE_LIST(RNODE_LIST(tail)->nd_next)->as.nd_end;
24086 }
24087 else {
24088 RNODE_LIST(RNODE_LIST(head)->nd_next)->as.nd_end = tail;
24089 }
24090
24091 nd_set_last_loc(head, nd_last_loc(tail));
24092
24093 return head;
24094}
24095
24096static int
24097literal_concat0(struct parser_params *p, rb_parser_string_t *head, rb_parser_string_t *tail)
24098{
24099 if (!tail) return 1;
24100 if (!rb_parser_enc_compatible(p, head, tail)) {
24101 compile_error(p, "string literal encodings differ (%s / %s)",
24102 rb_enc_name(rb_parser_str_get_encoding(head)),
24103 rb_enc_name(rb_parser_str_get_encoding(tail)));
24104 rb_parser_str_resize(p, head, 0);
24105 rb_parser_str_resize(p, tail, 0);
24106 return 0;
24107 }
24108 rb_parser_str_buf_append(p, head, tail);
24109 return 1;
24110}
24111
24112static rb_parser_string_t *
24113string_literal_head(struct parser_params *p, enum node_type htype, NODE *head)
24114{
24115 if (htype != NODE_DSTR) return NULL;
24116 if (RNODE_DSTR(head)->nd_next) {
24117 head = RNODE_LIST(RNODE_LIST(RNODE_DSTR(head)->nd_next)->as.nd_end)->nd_head;
24118 if (!head || !nd_type_p(head, NODE_STR)) return NULL;
24119 }
24120 rb_parser_string_t *lit = RNODE_DSTR(head)->string;
24121 ASSUME(lit);
24122 return lit;
24123}
24124
24125#ifndef RIPPER
24126static rb_parser_string_t *
24127rb_parser_string_deep_copy(struct parser_params *p, const rb_parser_string_t *orig)
24128{
24129 rb_parser_string_t *copy;
24130 if (!orig) return NULL;
24131 copy = rb_parser_string_new(p, PARSER_STRING_PTR(orig), PARSER_STRING_LEN(orig));
24132 copy->coderange = orig->coderange;
24133 copy->enc = orig->enc;
24134 return copy;
24135}
24136#endif
24137
24138/* concat two string literals */
24139static NODE *
24140literal_concat(struct parser_params *p, NODE *head, NODE *tail, const YYLTYPE *loc)
24141{
24142 enum node_type htype;
24143 rb_parser_string_t *lit;
24144
24145 if (!head) return tail;
24146 if (!tail) return head;
24147
24148 htype = nd_type(head);
24149 if (htype == NODE_EVSTR) {
24150 head = new_dstr(p, head, loc);
24151 htype = NODE_DSTR;
24152 }
24153 if (p->heredoc_indent > 0) {
24154 switch (htype) {
24155 case NODE_STR:
24156 head = str2dstr(p, head);
24157 case NODE_DSTR:
24158 return list_append(p, head, tail);
24159 default:
24160 break;
24161 }
24162 }
24163 switch (nd_type(tail)) {
24164 case NODE_STR:
24165 if ((lit = string_literal_head(p, htype, head)) != false) {
24166 htype = NODE_STR;
24167 }
24168 else {
24169 lit = RNODE_DSTR(head)->string;
24170 }
24171 if (htype == NODE_STR) {
24172 if (!literal_concat0(p, lit, RNODE_STR(tail)->string)) {
24173 error:
24174 rb_discard_node(p, head);
24175 rb_discard_node(p, tail);
24176 return 0;
24177 }
24178 rb_discard_node(p, tail);
24179 }
24180 else {
24181 list_append(p, head, tail);
24182 }
24183 break;
24184
24185 case NODE_DSTR:
24186 if (htype == NODE_STR) {
24187 if (!literal_concat0(p, RNODE_STR(head)->string, RNODE_DSTR(tail)->string))
24188 goto error;
24189 rb_parser_string_free(p, RNODE_DSTR(tail)->string);
24190 RNODE_DSTR(tail)->string = RNODE_STR(head)->string;
24191 RNODE_STR(head)->string = NULL;
24192 rb_discard_node(p, head);
24193 head = tail;
24194 }
24195 else if (!RNODE_DSTR(tail)->string) {
24196 append:
24197 RNODE_DSTR(head)->as.nd_alen += RNODE_DSTR(tail)->as.nd_alen - 1;
24198 if (!RNODE_DSTR(head)->nd_next) {
24199 RNODE_DSTR(head)->nd_next = RNODE_DSTR(tail)->nd_next;
24200 }
24201 else if (RNODE_DSTR(tail)->nd_next) {
24202 RNODE_DSTR(RNODE_DSTR(RNODE_DSTR(head)->nd_next)->as.nd_end)->nd_next = RNODE_DSTR(tail)->nd_next;
24203 RNODE_DSTR(RNODE_DSTR(head)->nd_next)->as.nd_end = RNODE_DSTR(RNODE_DSTR(tail)->nd_next)->as.nd_end;
24204 }
24205 rb_discard_node(p, tail);
24206 }
24207 else if ((lit = string_literal_head(p, htype, head)) != false) {
24208 if (!literal_concat0(p, lit, RNODE_DSTR(tail)->string))
24209 goto error;
24210 rb_parser_string_free(p, RNODE_DSTR(tail)->string);
24211 RNODE_DSTR(tail)->string = 0;
24212 goto append;
24213 }
24214 else {
24215 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));
24216 RNODE_DSTR(tail)->string = 0;
24217 }
24218 break;
24219
24220 case NODE_EVSTR:
24221 if (htype == NODE_STR) {
24222 head = str2dstr(p, head);
24223 RNODE_DSTR(head)->as.nd_alen = 1;
24224 }
24225 list_append(p, head, tail);
24226 break;
24227 }
24228 return head;
24229}
24230
24231static void
24232nd_copy_flag(NODE *new_node, NODE *old_node)
24233{
24234 if (nd_fl_newline(old_node)) nd_set_fl_newline(new_node);
24235 nd_set_line(new_node, nd_line(old_node));
24236 new_node->nd_loc = old_node->nd_loc;
24237 new_node->node_id = old_node->node_id;
24238}
24239
24240static NODE *
24241str2dstr(struct parser_params *p, NODE *node)
24242{
24243 NODE *new_node = (NODE *)NODE_NEW_INTERNAL(NODE_DSTR, rb_node_dstr_t);
24244 nd_copy_flag(new_node, node);
24245 RNODE_DSTR(new_node)->string = RNODE_STR(node)->string;
24246 RNODE_DSTR(new_node)->as.nd_alen = 0;
24247 RNODE_DSTR(new_node)->nd_next = 0;
24248 RNODE_STR(node)->string = 0;
24249
24250 return new_node;
24251}
24252
24253static NODE *
24254str2regx(struct parser_params *p, NODE *node, int options, const YYLTYPE *loc, const YYLTYPE *opening_loc, const YYLTYPE *content_loc, const YYLTYPE *closing_loc)
24255{
24256 NODE *new_node = (NODE *)NODE_NEW_INTERNAL(NODE_REGX, rb_node_regx_t);
24257 nd_copy_flag(new_node, node);
24258 RNODE_REGX(new_node)->string = RNODE_STR(node)->string;
24259 RNODE_REGX(new_node)->options = options;
24260 nd_set_loc(new_node, loc);
24261 RNODE_REGX(new_node)->opening_loc = *opening_loc;
24262 RNODE_REGX(new_node)->content_loc = *content_loc;
24263 RNODE_REGX(new_node)->closing_loc = *closing_loc;
24264 RNODE_STR(node)->string = 0;
24265
24266 return new_node;
24267}
24268
24269static NODE *
24270evstr2dstr(struct parser_params *p, NODE *node)
24271{
24272 if (nd_type_p(node, NODE_EVSTR)) {
24273 node = new_dstr(p, node, &node->nd_loc);
24274 }
24275 return node;
24276}
24277
24278static NODE *
24279new_evstr(struct parser_params *p, NODE *node, const YYLTYPE *loc, const YYLTYPE *opening_loc, const YYLTYPE *closing_loc)
24280{
24281 NODE *head = node;
24282
24283 if (node) {
24284 switch (nd_type(node)) {
24285 case NODE_STR:
24286 return str2dstr(p, node);
24287 case NODE_DSTR:
24288 break;
24289 case NODE_EVSTR:
24290 return node;
24291 }
24292 }
24293 return NEW_EVSTR(head, loc, opening_loc, closing_loc);
24294}
24295
24296static NODE *
24297new_dstr(struct parser_params *p, NODE *node, const YYLTYPE *loc)
24298{
24299 NODE *dstr = NEW_DSTR(STRING_NEW0(), loc);
24300 return list_append(p, dstr, node);
24301}
24302
24303static NODE *
24304call_bin_op(struct parser_params *p, NODE *recv, ID id, NODE *arg1,
24305 const YYLTYPE *op_loc, const YYLTYPE *loc)
24306{
24307 NODE *expr;
24308 value_expr(p, recv);
24309 value_expr(p, arg1);
24310 expr = NEW_OPCALL(recv, id, NEW_LIST(arg1, &arg1->nd_loc), loc);
24311 nd_set_line(expr, op_loc->beg_pos.lineno);
24312 return expr;
24313}
24314
24315static NODE *
24316call_uni_op(struct parser_params *p, NODE *recv, ID id, const YYLTYPE *op_loc, const YYLTYPE *loc)
24317{
24318 NODE *opcall;
24319 value_expr(p, recv);
24320 opcall = NEW_OPCALL(recv, id, 0, loc);
24321 nd_set_line(opcall, op_loc->beg_pos.lineno);
24322 return opcall;
24323}
24324
24325static NODE *
24326new_qcall(struct parser_params* p, ID atype, NODE *recv, ID mid, NODE *args, const YYLTYPE *op_loc, const YYLTYPE *loc)
24327{
24328 NODE *qcall = NEW_QCALL(atype, recv, mid, args, loc);
24329 nd_set_line(qcall, op_loc->beg_pos.lineno);
24330 return qcall;
24331}
24332
24333static NODE*
24334new_command_qcall(struct parser_params* p, ID atype, NODE *recv, ID mid, NODE *args, NODE *block, const YYLTYPE *op_loc, const YYLTYPE *loc)
24335{
24336 NODE *ret;
24337 if (block) block_dup_check(p, args, block);
24338 ret = new_qcall(p, atype, recv, mid, args, op_loc, loc);
24339 if (block) ret = method_add_block(p, ret, block, loc);
24340 fixpos(ret, recv);
24341 return ret;
24342}
24343
24345new_locations_lambda_body(struct parser_params* p, NODE *node, const YYLTYPE *loc, const YYLTYPE *opening_loc, const YYLTYPE *closing_loc)
24346{
24348 body->node = node;
24349 body->opening_loc = *opening_loc;
24350 body->closing_loc = *closing_loc;
24351 return body;
24352}
24353
24354#define nd_once_body(node) (nd_type_p((node), NODE_ONCE) ? RNODE_ONCE(node)->nd_body : node)
24355
24356static NODE*
24357last_expr_once_body(NODE *node)
24358{
24359 if (!node) return 0;
24360 return nd_once_body(node);
24361}
24362
24363static NODE*
24364match_op(struct parser_params *p, NODE *node1, NODE *node2, const YYLTYPE *op_loc, const YYLTYPE *loc)
24365{
24366 NODE *n;
24367 int line = op_loc->beg_pos.lineno;
24368
24369 value_expr(p, node1);
24370 value_expr(p, node2);
24371
24372 if ((n = last_expr_once_body(node1)) != 0) {
24373 switch (nd_type(n)) {
24374 case NODE_DREGX:
24375 {
24376 NODE *match = NEW_MATCH2(node1, node2, loc);
24377 nd_set_line(match, line);
24378 return match;
24379 }
24380
24381 case NODE_REGX:
24382 {
24383 const VALUE lit = rb_node_regx_string_val(n);
24384 if (!NIL_P(lit)) {
24385 NODE *match = NEW_MATCH2(node1, node2, loc);
24386 RNODE_MATCH2(match)->nd_args = reg_named_capture_assign(p, lit, loc, assignable);
24387 nd_set_line(match, line);
24388 return match;
24389 }
24390 }
24391 }
24392 }
24393
24394 if ((n = last_expr_once_body(node2)) != 0) {
24395 NODE *match3;
24396
24397 switch (nd_type(n)) {
24398 case NODE_DREGX:
24399 match3 = NEW_MATCH3(node2, node1, loc);
24400 return match3;
24401 }
24402 }
24403
24404 n = NEW_CALL(node1, tMATCH, NEW_LIST(node2, &node2->nd_loc), loc);
24405 nd_set_line(n, line);
24406 return n;
24407}
24408
24409# if WARN_PAST_SCOPE
24410static int
24411past_dvar_p(struct parser_params *p, ID id)
24412{
24413 struct vtable *past = p->lvtbl->past;
24414 while (past) {
24415 if (vtable_included(past, id)) return 1;
24416 past = past->prev;
24417 }
24418 return 0;
24419}
24420# endif
24421
24422static int
24423numparam_nested_p(struct parser_params *p)
24424{
24425 struct local_vars *local = p->lvtbl;
24426 NODE *outer = local->numparam.outer;
24427 NODE *inner = local->numparam.inner;
24428 if (outer || inner) {
24429 NODE *used = outer ? outer : inner;
24430 compile_error(p, "numbered parameter is already used in %s block\n"
24431 "%s:%d: numbered parameter is already used here",
24432 outer ? "outer" : "inner",
24433 p->ruby_sourcefile, nd_line(used));
24434 parser_show_error_line(p, &used->nd_loc);
24435 return 1;
24436 }
24437 return 0;
24438}
24439
24440static int
24441numparam_used_p(struct parser_params *p)
24442{
24443 NODE *numparam = p->lvtbl->numparam.current;
24444 if (numparam) {
24445 compile_error(p, "'it' is not allowed when a numbered parameter is already used\n"
24446 "%s:%d: numbered parameter is already used here",
24447 p->ruby_sourcefile, nd_line(numparam));
24448 parser_show_error_line(p, &numparam->nd_loc);
24449 return 1;
24450 }
24451 return 0;
24452}
24453
24454static int
24455it_used_p(struct parser_params *p)
24456{
24457 NODE *it = p->lvtbl->it;
24458 if (it) {
24459 compile_error(p, "numbered parameters are not allowed when 'it' is already used\n"
24460 "%s:%d: 'it' is already used here",
24461 p->ruby_sourcefile, nd_line(it));
24462 parser_show_error_line(p, &it->nd_loc);
24463 return 1;
24464 }
24465 return 0;
24466}
24467
24468static NODE*
24469gettable(struct parser_params *p, ID id, const YYLTYPE *loc)
24470{
24471 ID *vidp = NULL;
24472 NODE *node;
24473 switch (id) {
24474 case keyword_self:
24475 return NEW_SELF(loc);
24476 case keyword_nil:
24477 return NEW_NIL(loc);
24478 case keyword_true:
24479 return NEW_TRUE(loc);
24480 case keyword_false:
24481 return NEW_FALSE(loc);
24482 case keyword__FILE__:
24483 {
24484 VALUE file = p->ruby_sourcefile_string;
24485 if (NIL_P(file))
24486 file = rb_str_new(0, 0);
24487 node = NEW_FILE(file, loc);
24488 }
24489 return node;
24490 case keyword__LINE__:
24491 return NEW_LINE(loc);
24492 case keyword__ENCODING__:
24493 return NEW_ENCODING(loc);
24494
24495 }
24496 switch (id_type(id)) {
24497 case ID_LOCAL:
24498 if (dyna_in_block(p) && dvar_defined_ref(p, id, &vidp)) {
24499 if (NUMPARAM_ID_P(id) && (numparam_nested_p(p) || it_used_p(p))) return 0;
24500 if (vidp) *vidp |= LVAR_USED;
24501 node = NEW_DVAR(id, loc);
24502 return node;
24503 }
24504 if (local_id_ref(p, id, &vidp)) {
24505 if (vidp) *vidp |= LVAR_USED;
24506 node = NEW_LVAR(id, loc);
24507 return node;
24508 }
24509 if (dyna_in_block(p) && NUMPARAM_ID_P(id) &&
24510 parser_numbered_param(p, NUMPARAM_ID_TO_IDX(id))) {
24511 if (numparam_nested_p(p) || it_used_p(p)) return 0;
24512 node = NEW_DVAR(id, loc);
24513 struct local_vars *local = p->lvtbl;
24514 if (!local->numparam.current) local->numparam.current = node;
24515 return node;
24516 }
24517# if WARN_PAST_SCOPE
24518 if (!p->ctxt.in_defined && RTEST(ruby_verbose) && past_dvar_p(p, id)) {
24519 rb_warning1("possible reference to past scope - %"PRIsWARN, rb_id2str(id));
24520 }
24521# endif
24522 /* method call without arguments */
24523 if (dyna_in_block(p) && id == idIt && !(DVARS_TERMINAL_P(p->lvtbl->args) || DVARS_TERMINAL_P(p->lvtbl->args->prev))) {
24524 if (numparam_used_p(p)) return 0;
24525 if (p->max_numparam == ORDINAL_PARAM) {
24526 compile_error(p, "ordinary parameter is defined");
24527 return 0;
24528 }
24529 if (!p->it_id) {
24530 p->it_id = idItImplicit;
24531 vtable_add(p->lvtbl->args, p->it_id);
24532 }
24533 NODE *node = NEW_DVAR(p->it_id, loc);
24534 if (!p->lvtbl->it) p->lvtbl->it = node;
24535 return node;
24536 }
24537 return NEW_VCALL(id, loc);
24538 case ID_GLOBAL:
24539 return NEW_GVAR(id, loc);
24540 case ID_INSTANCE:
24541 return NEW_IVAR(id, loc);
24542 case ID_CONST:
24543 return NEW_CONST(id, loc);
24544 case ID_CLASS:
24545 return NEW_CVAR(id, loc);
24546 }
24547 compile_error(p, "identifier %"PRIsVALUE" is not valid to get", rb_id2str(id));
24548 return 0;
24549}
24550
24551static rb_node_opt_arg_t *
24552opt_arg_append(rb_node_opt_arg_t *opt_list, rb_node_opt_arg_t *opt)
24553{
24554 rb_node_opt_arg_t *opts = opt_list;
24555 RNODE(opts)->nd_loc.end_pos = RNODE(opt)->nd_loc.end_pos;
24556
24557 while (opts->nd_next) {
24558 opts = opts->nd_next;
24559 RNODE(opts)->nd_loc.end_pos = RNODE(opt)->nd_loc.end_pos;
24560 }
24561 opts->nd_next = opt;
24562
24563 return opt_list;
24564}
24565
24566static rb_node_kw_arg_t *
24567kwd_append(rb_node_kw_arg_t *kwlist, rb_node_kw_arg_t *kw)
24568{
24569 if (kwlist) {
24570 /* Assume rb_node_kw_arg_t and rb_node_opt_arg_t has same structure */
24571 opt_arg_append(RNODE_OPT_ARG(kwlist), RNODE_OPT_ARG(kw));
24572 }
24573 return kwlist;
24574}
24575
24576static NODE *
24577new_defined(struct parser_params *p, NODE *expr, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
24578{
24579 int had_trailing_semicolon = p->ctxt.has_trailing_semicolon;
24580 p->ctxt.has_trailing_semicolon = 0;
24581
24582 NODE *n = expr;
24583 while (n) {
24584 if (nd_type_p(n, NODE_BEGIN)) {
24585 n = RNODE_BEGIN(n)->nd_body;
24586 }
24587 else if (nd_type_p(n, NODE_BLOCK) && RNODE_BLOCK(n)->nd_end == n) {
24588 n = RNODE_BLOCK(n)->nd_head;
24589 }
24590 else {
24591 break;
24592 }
24593 }
24594
24595 if (had_trailing_semicolon && !nd_type_p(expr, NODE_BLOCK)) {
24596 NODE *block = NEW_BLOCK(expr, loc);
24597 return NEW_DEFINED(block, loc, keyword_loc);
24598 }
24599
24600 return NEW_DEFINED(n, loc, keyword_loc);
24601}
24602
24603static NODE*
24604str_to_sym_node(struct parser_params *p, NODE *node, const YYLTYPE *loc)
24605{
24606 VALUE lit;
24607 rb_parser_string_t *str = RNODE_STR(node)->string;
24608 if (rb_parser_enc_str_coderange(p, str) == RB_PARSER_ENC_CODERANGE_BROKEN) {
24609 yyerror1(loc, "invalid symbol");
24610 lit = STR_NEW0();
24611 }
24612 else {
24613 lit = rb_str_new_parser_string(str);
24614 }
24615 return NEW_SYM(lit, loc);
24616}
24617
24618static NODE*
24619symbol_append(struct parser_params *p, NODE *symbols, NODE *symbol)
24620{
24621 enum node_type type = nd_type(symbol);
24622 switch (type) {
24623 case NODE_DSTR:
24624 nd_set_type(symbol, NODE_DSYM);
24625 break;
24626 case NODE_STR:
24627 symbol = str_to_sym_node(p, symbol, &RNODE(symbol)->nd_loc);
24628 break;
24629 default:
24630 compile_error(p, "unexpected node as symbol: %s", parser_node_name(type));
24631 }
24632 return list_append(p, symbols, symbol);
24633}
24634
24635static void
24636dregex_fragment_setenc(struct parser_params *p, rb_node_dregx_t *const dreg, int options)
24637{
24638 if (dreg->string) {
24639 reg_fragment_setenc(p, dreg->string, options);
24640 }
24641 for (struct RNode_LIST *list = dreg->nd_next; list; list = RNODE_LIST(list->nd_next)) {
24642 NODE *frag = list->nd_head;
24643 if (nd_type_p(frag, NODE_STR)) {
24644 reg_fragment_setenc(p, RNODE_STR(frag)->string, options);
24645 }
24646 else if (nd_type_p(frag, NODE_DSTR)) {
24647 dregex_fragment_setenc(p, RNODE_DSTR(frag), options);
24648 }
24649 }
24650}
24651
24652static NODE *
24653new_regexp(struct parser_params *p, NODE *node, int options, const YYLTYPE *loc, const YYLTYPE *opening_loc, const YYLTYPE *content_loc, const YYLTYPE *closing_loc)
24654{
24655 if (!node) {
24656 /* Check string is valid regex */
24657 rb_parser_string_t *str = STRING_NEW0();
24658 reg_compile(p, str, options);
24659 node = NEW_REGX(str, options, loc, opening_loc, content_loc, closing_loc);
24660 return node;
24661 }
24662 switch (nd_type(node)) {
24663 case NODE_STR:
24664 {
24665 /* Check string is valid regex */
24666 reg_compile(p, RNODE_STR(node)->string, options);
24667 node = str2regx(p, node, options, loc, opening_loc, content_loc, closing_loc);
24668 }
24669 break;
24670 default:
24671 node = NEW_DSTR0(STRING_NEW0(), 1, NEW_LIST(node, loc), loc);
24672 /* fall through */
24673 case NODE_DSTR:
24674 nd_set_type(node, NODE_DREGX);
24675 nd_set_loc(node, loc);
24676 rb_node_dregx_t *const dreg = RNODE_DREGX(node);
24677 dreg->as.nd_cflag = options & RE_OPTION_MASK;
24678 if (dreg->nd_next) {
24679 dregex_fragment_setenc(p, dreg, options);
24680 }
24681 if (options & RE_OPTION_ONCE) {
24682 node = NEW_ONCE(node, loc);
24683 }
24684 break;
24685 }
24686 return node;
24687}
24688
24689static rb_node_kw_arg_t *
24690new_kw_arg(struct parser_params *p, NODE *k, const YYLTYPE *loc)
24691{
24692 if (!k) return 0;
24693 return NEW_KW_ARG((k), loc);
24694}
24695
24696static NODE *
24697new_xstring(struct parser_params *p, NODE *node, const YYLTYPE *loc)
24698{
24699 if (!node) {
24700 NODE *xstr = NEW_XSTR(STRING_NEW0(), loc);
24701 return xstr;
24702 }
24703 switch (nd_type(node)) {
24704 case NODE_STR:
24705 nd_set_type(node, NODE_XSTR);
24706 nd_set_loc(node, loc);
24707 break;
24708 case NODE_DSTR:
24709 nd_set_type(node, NODE_DXSTR);
24710 nd_set_loc(node, loc);
24711 break;
24712 default:
24713 node = NEW_DXSTR(0, 1, NEW_LIST(node, loc), loc);
24714 break;
24715 }
24716 return node;
24717}
24718
24719static const
24720struct st_hash_type literal_type = {
24721 literal_cmp,
24722 literal_hash,
24723};
24724
24725static int nd_type_st_key_enable_p(NODE *node);
24726
24727static void
24728check_literal_when(struct parser_params *p, NODE *arg, const YYLTYPE *loc)
24729{
24730 /* See https://bugs.ruby-lang.org/issues/20331 for discussion about what is warned. */
24731 if (!arg || !p->case_labels) return;
24732 if (!nd_type_st_key_enable_p(arg)) return;
24733
24734 if (p->case_labels == CHECK_LITERAL_WHEN) {
24735 p->case_labels = st_init_table(&literal_type);
24736 }
24737 else {
24738 st_data_t line;
24739 if (st_lookup(p->case_labels, (st_data_t)arg, &line)) {
24740 rb_warning2("'when' clause on line %d duplicates 'when' clause on line %d and is ignored",
24741 WARN_I((int)nd_line(arg)), WARN_I((int)line));
24742 return;
24743 }
24744 }
24745 st_insert(p->case_labels, (st_data_t)arg, (st_data_t)p->ruby_sourceline);
24746}
24747
24748#ifdef RIPPER
24749static int
24750id_is_var(struct parser_params *p, ID id)
24751{
24752 if (is_notop_id(id)) {
24753 switch (id & ID_SCOPE_MASK) {
24754 case ID_GLOBAL: case ID_INSTANCE: case ID_CONST: case ID_CLASS:
24755 return 1;
24756 case ID_LOCAL:
24757 if (dyna_in_block(p)) {
24758 if (NUMPARAM_ID_P(id) || dvar_defined(p, id)) return 1;
24759 }
24760 if (local_id(p, id)) return 1;
24761 /* method call without arguments */
24762 return 0;
24763 }
24764 }
24765 compile_error(p, "identifier %"PRIsVALUE" is not valid to get", rb_id2str(id));
24766 return 0;
24767}
24768#endif
24769
24770static inline enum lex_state_e
24771parser_set_lex_state(struct parser_params *p, enum lex_state_e ls, int line)
24772{
24773 if (p->debug) {
24774 ls = rb_parser_trace_lex_state(p, p->lex.state, ls, line);
24775 }
24776 return p->lex.state = ls;
24777}
24778
24779#ifndef RIPPER
24780static void
24781flush_debug_buffer(struct parser_params *p, VALUE out, VALUE str)
24782{
24783 VALUE mesg = p->debug_buffer;
24784
24785 if (!NIL_P(mesg) && RSTRING_LEN(mesg)) {
24786 p->debug_buffer = Qnil;
24787 rb_io_puts(1, &mesg, out);
24788 }
24789 if (!NIL_P(str) && RSTRING_LEN(str)) {
24790 rb_io_write(p->debug_output, str);
24791 }
24792}
24793
24794static const char rb_parser_lex_state_names[][8] = {
24795 "BEG", "END", "ENDARG", "ENDFN", "ARG",
24796 "CMDARG", "MID", "FNAME", "DOT", "CLASS",
24797 "LABEL", "LABELED","FITEM",
24798};
24799
24800static VALUE
24801append_lex_state_name(struct parser_params *p, enum lex_state_e state, VALUE buf)
24802{
24803 int i, sep = 0;
24804 unsigned int mask = 1;
24805 static const char none[] = "NONE";
24806
24807 for (i = 0; i < EXPR_MAX_STATE; ++i, mask <<= 1) {
24808 if ((unsigned)state & mask) {
24809 if (sep) {
24810 rb_str_cat(buf, "|", 1);
24811 }
24812 sep = 1;
24813 rb_str_cat_cstr(buf, rb_parser_lex_state_names[i]);
24814 }
24815 }
24816 if (!sep) {
24817 rb_str_cat(buf, none, sizeof(none)-1);
24818 }
24819 return buf;
24820}
24821
24822enum lex_state_e
24823rb_parser_trace_lex_state(struct parser_params *p, enum lex_state_e from,
24824 enum lex_state_e to, int line)
24825{
24826 VALUE mesg;
24827 mesg = rb_str_new_cstr("lex_state: ");
24828 append_lex_state_name(p, from, mesg);
24829 rb_str_cat_cstr(mesg, " -> ");
24830 append_lex_state_name(p, to, mesg);
24831 rb_str_catf(mesg, " at line %d\n", line);
24832 flush_debug_buffer(p, p->debug_output, mesg);
24833 return to;
24834}
24835
24836VALUE
24837rb_parser_lex_state_name(struct parser_params *p, enum lex_state_e state)
24838{
24839 return rb_str_to_interned_str(append_lex_state_name(p, state, rb_str_new(0, 0)));
24840}
24841
24842static void
24843append_bitstack_value(struct parser_params *p, stack_type stack, VALUE mesg)
24844{
24845 if (stack == 0) {
24846 rb_str_cat_cstr(mesg, "0");
24847 }
24848 else {
24849 stack_type mask = (stack_type)1U << (CHAR_BIT * sizeof(stack_type) - 1);
24850 for (; mask && !(stack & mask); mask >>= 1) continue;
24851 for (; mask; mask >>= 1) rb_str_cat(mesg, stack & mask ? "1" : "0", 1);
24852 }
24853}
24854
24855void
24856rb_parser_show_bitstack(struct parser_params *p, stack_type stack,
24857 const char *name, int line)
24858{
24859 VALUE mesg = rb_sprintf("%s: ", name);
24860 append_bitstack_value(p, stack, mesg);
24861 rb_str_catf(mesg, " at line %d\n", line);
24862 flush_debug_buffer(p, p->debug_output, mesg);
24863}
24864
24865void
24866rb_parser_fatal(struct parser_params *p, const char *fmt, ...)
24867{
24868 va_list ap;
24869 VALUE mesg = rb_str_new_cstr("internal parser error: ");
24870
24871 va_start(ap, fmt);
24872 rb_str_vcatf(mesg, fmt, ap);
24873 va_end(ap);
24874 yyerror0(RSTRING_PTR(mesg));
24875 RB_GC_GUARD(mesg);
24876
24877 mesg = rb_str_new(0, 0);
24878 append_lex_state_name(p, p->lex.state, mesg);
24879 compile_error(p, "lex.state: %"PRIsVALUE, mesg);
24880 rb_str_resize(mesg, 0);
24881 append_bitstack_value(p, p->cond_stack, mesg);
24882 compile_error(p, "cond_stack: %"PRIsVALUE, mesg);
24883 rb_str_resize(mesg, 0);
24884 append_bitstack_value(p, p->cmdarg_stack, mesg);
24885 compile_error(p, "cmdarg_stack: %"PRIsVALUE, mesg);
24886 if (p->debug_output == rb_ractor_stdout())
24887 p->debug_output = rb_ractor_stderr();
24888 p->debug = TRUE;
24889}
24890
24891static YYLTYPE *
24892rb_parser_set_pos(YYLTYPE *yylloc, int sourceline, int beg_pos, int end_pos)
24893{
24894 yylloc->beg_pos.lineno = sourceline;
24895 yylloc->beg_pos.column = beg_pos;
24896 yylloc->end_pos.lineno = sourceline;
24897 yylloc->end_pos.column = end_pos;
24898 return yylloc;
24899}
24900
24901YYLTYPE *
24902rb_parser_set_location_from_strterm_heredoc(struct parser_params *p, rb_strterm_heredoc_t *here, YYLTYPE *yylloc)
24903{
24904 int sourceline = here->sourceline;
24905 int beg_pos = (int)here->offset - here->quote
24906 - (rb_strlen_lit("<<-") - !(here->func & STR_FUNC_INDENT));
24907 int end_pos = (int)here->offset + here->length + here->quote;
24908
24909 return rb_parser_set_pos(yylloc, sourceline, beg_pos, end_pos);
24910}
24911
24912YYLTYPE *
24913rb_parser_set_location_of_delayed_token(struct parser_params *p, YYLTYPE *yylloc)
24914{
24915 yylloc->beg_pos.lineno = p->delayed.beg_line;
24916 yylloc->beg_pos.column = p->delayed.beg_col;
24917 yylloc->end_pos.lineno = p->delayed.end_line;
24918 yylloc->end_pos.column = p->delayed.end_col;
24919
24920 return yylloc;
24921}
24922
24923YYLTYPE *
24924rb_parser_set_location_of_heredoc_end(struct parser_params *p, YYLTYPE *yylloc)
24925{
24926 int sourceline = p->ruby_sourceline;
24927 int beg_pos = (int)(p->lex.ptok - p->lex.pbeg);
24928 int end_pos = (int)(p->lex.pend - p->lex.pbeg);
24929 return rb_parser_set_pos(yylloc, sourceline, beg_pos, end_pos);
24930}
24931
24932YYLTYPE *
24933rb_parser_set_location_of_dummy_end(struct parser_params *p, YYLTYPE *yylloc)
24934{
24935 yylloc->end_pos = yylloc->beg_pos;
24936
24937 return yylloc;
24938}
24939
24940YYLTYPE *
24941rb_parser_set_location_of_none(struct parser_params *p, YYLTYPE *yylloc)
24942{
24943 int sourceline = p->ruby_sourceline;
24944 int beg_pos = (int)(p->lex.ptok - p->lex.pbeg);
24945 int end_pos = (int)(p->lex.ptok - p->lex.pbeg);
24946 return rb_parser_set_pos(yylloc, sourceline, beg_pos, end_pos);
24947}
24948
24949YYLTYPE *
24950rb_parser_set_location(struct parser_params *p, YYLTYPE *yylloc)
24951{
24952 int sourceline = p->ruby_sourceline;
24953 int beg_pos = (int)(p->lex.ptok - p->lex.pbeg);
24954 int end_pos = (int)(p->lex.pcur - p->lex.pbeg);
24955 return rb_parser_set_pos(yylloc, sourceline, beg_pos, end_pos);
24956}
24957#endif /* !RIPPER */
24958
24959static int
24960assignable0(struct parser_params *p, ID id, const char **err)
24961{
24962 if (!id) return -1;
24963 switch (id) {
24964 case keyword_self:
24965 *err = "Can't change the value of self";
24966 return -1;
24967 case keyword_nil:
24968 *err = "Can't assign to nil";
24969 return -1;
24970 case keyword_true:
24971 *err = "Can't assign to true";
24972 return -1;
24973 case keyword_false:
24974 *err = "Can't assign to false";
24975 return -1;
24976 case keyword__FILE__:
24977 *err = "Can't assign to __FILE__";
24978 return -1;
24979 case keyword__LINE__:
24980 *err = "Can't assign to __LINE__";
24981 return -1;
24982 case keyword__ENCODING__:
24983 *err = "Can't assign to __ENCODING__";
24984 return -1;
24985 }
24986 switch (id_type(id)) {
24987 case ID_LOCAL:
24988 if (dyna_in_block(p)) {
24989 if (p->max_numparam > NO_PARAM && NUMPARAM_ID_P(id)) {
24990 compile_error(p, "Can't assign to numbered parameter _%d",
24991 NUMPARAM_ID_TO_IDX(id));
24992 return -1;
24993 }
24994 if (dvar_curr(p, id)) return NODE_DASGN;
24995 if (dvar_defined(p, id)) return NODE_DASGN;
24996 if (local_id(p, id)) return NODE_LASGN;
24997 dyna_var(p, id);
24998 return NODE_DASGN;
24999 }
25000 else {
25001 if (!local_id(p, id)) local_var(p, id);
25002 return NODE_LASGN;
25003 }
25004 break;
25005 case ID_GLOBAL: return NODE_GASGN;
25006 case ID_INSTANCE: return NODE_IASGN;
25007 case ID_CONST:
25008 if (!p->ctxt.in_def) return NODE_CDECL;
25009 *err = "dynamic constant assignment";
25010 return -1;
25011 case ID_CLASS: return NODE_CVASGN;
25012 default:
25013 compile_error(p, "identifier %"PRIsVALUE" is not valid to set", rb_id2str(id));
25014 }
25015 return -1;
25016}
25017
25018static NODE*
25019assignable(struct parser_params *p, ID id, NODE *val, const YYLTYPE *loc)
25020{
25021 const char *err = 0;
25022 int node_type = assignable0(p, id, &err);
25023 switch (node_type) {
25024 case NODE_DASGN: return NEW_DASGN(id, val, loc);
25025 case NODE_LASGN: return NEW_LASGN(id, val, loc);
25026 case NODE_GASGN: return NEW_GASGN(id, val, loc);
25027 case NODE_IASGN: return NEW_IASGN(id, val, loc);
25028 case NODE_CDECL: return NEW_CDECL(id, val, 0, p->ctxt.shareable_constant_value, loc);
25029 case NODE_CVASGN: return NEW_CVASGN(id, val, loc);
25030 }
25031/* TODO: FIXME */
25032#ifndef RIPPER
25033 if (err) yyerror1(loc, err);
25034#else
25035 if (err) set_value(assign_error(p, err, p->s_lvalue));
25036#endif
25037 return NEW_ERROR(loc);
25038}
25039
25040static int
25041is_private_local_id(struct parser_params *p, ID name)
25042{
25043 VALUE s;
25044 if (name == idUScore) return 1;
25045 if (!is_local_id(name)) return 0;
25046 s = rb_id2str(name);
25047 if (!s) return 0;
25048 return RSTRING_PTR(s)[0] == '_';
25049}
25050
25051static int
25052shadowing_lvar_0(struct parser_params *p, ID name)
25053{
25054 if (dyna_in_block(p)) {
25055 if (dvar_curr(p, name)) {
25056 if (is_private_local_id(p, name)) return 1;
25057 yyerror0("duplicated argument name");
25058 }
25059 else if (dvar_defined(p, name) || local_id(p, name)) {
25060 vtable_add(p->lvtbl->vars, name);
25061 if (p->lvtbl->used) {
25062 vtable_add(p->lvtbl->used, (ID)p->ruby_sourceline | LVAR_USED);
25063 }
25064 return 0;
25065 }
25066 }
25067 else {
25068 if (local_id(p, name)) {
25069 if (is_private_local_id(p, name)) return 1;
25070 yyerror0("duplicated argument name");
25071 }
25072 }
25073 return 1;
25074}
25075
25076static ID
25077shadowing_lvar(struct parser_params *p, ID name)
25078{
25079 shadowing_lvar_0(p, name);
25080 return name;
25081}
25082
25083static void
25084new_bv(struct parser_params *p, ID name)
25085{
25086 if (!name) return;
25087 if (!is_local_id(name)) {
25088 compile_error(p, "invalid local variable - %"PRIsVALUE,
25089 rb_id2str(name));
25090 return;
25091 }
25092 if (!shadowing_lvar_0(p, name)) return;
25093 dyna_var(p, name);
25094 ID *vidp = 0;
25095 if (dvar_defined_ref(p, name, &vidp)) {
25096 if (vidp) *vidp |= LVAR_USED;
25097 }
25098}
25099
25100static void
25101aryset_check(struct parser_params *p, NODE *args)
25102{
25103 NODE *block = 0, *kwds = 0;
25104 if (args && nd_type_p(args, NODE_BLOCK_PASS)) {
25105 block = RNODE_BLOCK_PASS(args)->nd_body;
25106 args = RNODE_BLOCK_PASS(args)->nd_head;
25107 }
25108 if (args && nd_type_p(args, NODE_ARGSCAT)) {
25109 args = RNODE_ARGSCAT(args)->nd_body;
25110 }
25111 if (args && nd_type_p(args, NODE_ARGSPUSH)) {
25112 kwds = RNODE_ARGSPUSH(args)->nd_body;
25113 }
25114 else {
25115 for (NODE *next = args; next && nd_type_p(next, NODE_LIST);
25116 next = RNODE_LIST(next)->nd_next) {
25117 kwds = RNODE_LIST(next)->nd_head;
25118 }
25119 }
25120 if (kwds && nd_type_p(kwds, NODE_HASH) && !RNODE_HASH(kwds)->nd_brace) {
25121 yyerror1(&kwds->nd_loc, "keyword arg given in index assignment");
25122 }
25123 if (block) {
25124 yyerror1(&block->nd_loc, "block arg given in index assignment");
25125 }
25126}
25127
25128static NODE *
25129aryset(struct parser_params *p, NODE *recv, NODE *idx, const YYLTYPE *loc)
25130{
25131 aryset_check(p, idx);
25132 return NEW_ATTRASGN(recv, tASET, idx, loc);
25133}
25134
25135static void
25136block_dup_check(struct parser_params *p, NODE *node1, NODE *node2)
25137{
25138 if (node2 && node1 && nd_type_p(node1, NODE_BLOCK_PASS)) {
25139 compile_error(p, "both block arg and actual block given");
25140 }
25141}
25142
25143static NODE *
25144attrset(struct parser_params *p, NODE *recv, ID atype, ID id, const YYLTYPE *loc)
25145{
25146 if (!CALL_Q_P(atype)) id = rb_id_attrset(id);
25147 return NEW_ATTRASGN(recv, id, 0, loc);
25148}
25149
25150static VALUE
25151rb_backref_error(struct parser_params *p, NODE *node)
25152{
25153#ifndef RIPPER
25154# define ERR(...) (compile_error(p, __VA_ARGS__), Qtrue)
25155#else
25156# define ERR(...) rb_sprintf(__VA_ARGS__)
25157#endif
25158 switch (nd_type(node)) {
25159 case NODE_NTH_REF:
25160 return ERR("Can't set variable $%ld", RNODE_NTH_REF(node)->nd_nth);
25161 case NODE_BACK_REF:
25162 return ERR("Can't set variable $%c", (int)RNODE_BACK_REF(node)->nd_nth);
25163 }
25164#undef ERR
25165 UNREACHABLE_RETURN(Qfalse); /* only called on syntax error */
25166}
25167
25168static NODE *
25169arg_append(struct parser_params *p, NODE *node1, NODE *node2, const YYLTYPE *loc)
25170{
25171 if (!node1) return NEW_LIST(node2, &node2->nd_loc);
25172 switch (nd_type(node1)) {
25173 case NODE_LIST:
25174 return list_append(p, node1, node2);
25175 case NODE_BLOCK_PASS:
25176 RNODE_BLOCK_PASS(node1)->nd_head = arg_append(p, RNODE_BLOCK_PASS(node1)->nd_head, node2, loc);
25177 node1->nd_loc.end_pos = RNODE_BLOCK_PASS(node1)->nd_head->nd_loc.end_pos;
25178 return node1;
25179 case NODE_ARGSPUSH:
25180 RNODE_ARGSPUSH(node1)->nd_body = list_append(p, NEW_LIST(RNODE_ARGSPUSH(node1)->nd_body, &RNODE_ARGSPUSH(node1)->nd_body->nd_loc), node2);
25181 node1->nd_loc.end_pos = RNODE_ARGSPUSH(node1)->nd_body->nd_loc.end_pos;
25182 nd_set_type(node1, NODE_ARGSCAT);
25183 return node1;
25184 case NODE_ARGSCAT:
25185 if (!nd_type_p(RNODE_ARGSCAT(node1)->nd_body, NODE_LIST)) break;
25186 RNODE_ARGSCAT(node1)->nd_body = list_append(p, RNODE_ARGSCAT(node1)->nd_body, node2);
25187 node1->nd_loc.end_pos = RNODE_ARGSCAT(node1)->nd_body->nd_loc.end_pos;
25188 return node1;
25189 }
25190 return NEW_ARGSPUSH(node1, node2, loc);
25191}
25192
25193static NODE *
25194arg_concat(struct parser_params *p, NODE *node1, NODE *node2, const YYLTYPE *loc)
25195{
25196 if (!node2) return node1;
25197 switch (nd_type(node1)) {
25198 case NODE_BLOCK_PASS:
25199 if (RNODE_BLOCK_PASS(node1)->nd_head)
25200 RNODE_BLOCK_PASS(node1)->nd_head = arg_concat(p, RNODE_BLOCK_PASS(node1)->nd_head, node2, loc);
25201 else
25202 RNODE_LIST(node1)->nd_head = NEW_LIST(node2, loc);
25203 return node1;
25204 case NODE_ARGSPUSH:
25205 if (!nd_type_p(node2, NODE_LIST)) break;
25206 RNODE_ARGSPUSH(node1)->nd_body = list_concat(NEW_LIST(RNODE_ARGSPUSH(node1)->nd_body, loc), node2);
25207 nd_set_type(node1, NODE_ARGSCAT);
25208 return node1;
25209 case NODE_ARGSCAT:
25210 if (!nd_type_p(node2, NODE_LIST) ||
25211 !nd_type_p(RNODE_ARGSCAT(node1)->nd_body, NODE_LIST)) break;
25212 RNODE_ARGSCAT(node1)->nd_body = list_concat(RNODE_ARGSCAT(node1)->nd_body, node2);
25213 return node1;
25214 }
25215 return NEW_ARGSCAT(node1, node2, loc);
25216}
25217
25218static NODE *
25219last_arg_append(struct parser_params *p, NODE *args, NODE *last_arg, const YYLTYPE *loc)
25220{
25221 NODE *n1;
25222 if ((n1 = splat_array(args)) != 0) {
25223 return list_append(p, n1, last_arg);
25224 }
25225 return arg_append(p, args, last_arg, loc);
25226}
25227
25228static NODE *
25229rest_arg_append(struct parser_params *p, NODE *args, NODE *rest_arg, const YYLTYPE *loc)
25230{
25231 NODE *n1;
25232 if ((nd_type_p(rest_arg, NODE_LIST)) && (n1 = splat_array(args)) != 0) {
25233 return list_concat(n1, rest_arg);
25234 }
25235 return arg_concat(p, args, rest_arg, loc);
25236}
25237
25238static NODE *
25239splat_array(NODE* node)
25240{
25241 if (nd_type_p(node, NODE_SPLAT)) node = RNODE_SPLAT(node)->nd_head;
25242 if (nd_type_p(node, NODE_LIST)) return node;
25243 return 0;
25244}
25245
25246static void
25247mark_lvar_used(struct parser_params *p, NODE *rhs)
25248{
25249 ID *vidp = NULL;
25250 if (!rhs) return;
25251 switch (nd_type(rhs)) {
25252 case NODE_LASGN:
25253 if (local_id_ref(p, RNODE_LASGN(rhs)->nd_vid, &vidp)) {
25254 if (vidp) *vidp |= LVAR_USED;
25255 }
25256 break;
25257 case NODE_DASGN:
25258 if (dvar_defined_ref(p, RNODE_DASGN(rhs)->nd_vid, &vidp)) {
25259 if (vidp) *vidp |= LVAR_USED;
25260 }
25261 break;
25262#if 0
25263 case NODE_MASGN:
25264 for (rhs = rhs->nd_head; rhs; rhs = rhs->nd_next) {
25265 mark_lvar_used(p, rhs->nd_head);
25266 }
25267 break;
25268#endif
25269 }
25270}
25271
25272static int is_static_content(NODE *node);
25273
25274static NODE *
25275node_assign(struct parser_params *p, NODE *lhs, NODE *rhs, struct lex_context ctxt, const YYLTYPE *loc)
25276{
25277 if (!lhs) return 0;
25278
25279 switch (nd_type(lhs)) {
25280 case NODE_CDECL:
25281 case NODE_GASGN:
25282 case NODE_IASGN:
25283 case NODE_LASGN:
25284 case NODE_DASGN:
25285 case NODE_MASGN:
25286 case NODE_CVASGN:
25287 set_nd_value(p, lhs, rhs);
25288 nd_set_loc(lhs, loc);
25289 break;
25290
25291 case NODE_ATTRASGN:
25292 RNODE_ATTRASGN(lhs)->nd_args = arg_append(p, RNODE_ATTRASGN(lhs)->nd_args, rhs, loc);
25293 nd_set_loc(lhs, loc);
25294 break;
25295
25296 default:
25297 /* should not happen */
25298 break;
25299 }
25300
25301 return lhs;
25302}
25303
25304static NODE *
25305value_expr_check(struct parser_params *p, NODE *node)
25306{
25307 NODE *void_node = 0, *vn;
25308
25309 if (!node) {
25310 rb_warning0("empty expression");
25311 }
25312 while (node) {
25313 switch (nd_type(node)) {
25314 case NODE_ENSURE:
25315 vn = RNODE_ENSURE(node)->nd_head;
25316 node = RNODE_ENSURE(node)->nd_ensr;
25317 /* nd_ensr should not be NULL, check it out next */
25318 if (vn && (vn = value_expr_check(p, vn))) {
25319 goto found;
25320 }
25321 break;
25322
25323 case NODE_RESCUE:
25324 /* void only if all children are void */
25325 vn = RNODE_RESCUE(node)->nd_head;
25326 if (!vn || !(vn = value_expr_check(p, vn))) {
25327 if (!RNODE_RESCUE(node)->nd_else) return NULL;
25328 }
25329 if (!void_node) void_node = vn;
25330 for (NODE *r = RNODE_RESCUE(node)->nd_resq; r; r = RNODE_RESBODY(r)->nd_next) {
25331 if (!nd_type_p(r, NODE_RESBODY)) {
25332 compile_error(p, "unexpected node");
25333 return NULL;
25334 }
25335 if (!(vn = value_expr_check(p, RNODE_RESBODY(r)->nd_body))) {
25336 return NULL;
25337 }
25338 if (!void_node) void_node = vn;
25339 }
25340 node = RNODE_RESCUE(node)->nd_else;
25341 if (!node) return void_node;
25342 break;
25343
25344 case NODE_RETURN:
25345 case NODE_BREAK:
25346 case NODE_NEXT:
25347 case NODE_REDO:
25348 case NODE_RETRY:
25349 goto found;
25350
25351 case NODE_CASE:
25352 case NODE_CASE2:
25353 for (node = RNODE_CASE(node)->nd_body;
25354 node && nd_type_p(node, NODE_WHEN);
25355 node = RNODE_WHEN(node)->nd_next) {
25356 if (!(vn = value_expr_check(p, RNODE_WHEN(node)->nd_body))) {
25357 return NULL;
25358 }
25359 if (!void_node) void_node = vn;
25360 }
25361 break;
25362
25363 case NODE_CASE3:
25364 {
25365 NODE *in = RNODE_CASE3(node)->nd_body;
25366 if (!in || !nd_type_p(in, NODE_IN)) {
25367 compile_error(p, "unexpected node");
25368 return NULL;
25369 }
25370 if (!RNODE_IN(in)->nd_body) {
25371 /* single line pattern matching with "=>" operator */
25372 goto found;
25373 }
25374 do {
25375 vn = value_expr_check(p, RNODE_IN(in)->nd_body);
25376 if (!vn) return NULL;
25377 if (!void_node) void_node = vn;
25378 in = RNODE_IN(in)->nd_next;
25379 } while (in && nd_type_p(in, NODE_IN));
25380 node = in; /* else */
25381 }
25382 break;
25383
25384 case NODE_BLOCK:
25385 while (RNODE_BLOCK(node)->nd_next) {
25386 vn = value_expr_check(p, RNODE_BLOCK(node)->nd_head);
25387 if (vn) return vn;
25388 node = RNODE_BLOCK(node)->nd_next;
25389 }
25390 node = RNODE_BLOCK(node)->nd_head;
25391 break;
25392
25393 case NODE_BEGIN:
25394 node = RNODE_BEGIN(node)->nd_body;
25395 break;
25396
25397 case NODE_IF:
25398 case NODE_UNLESS:
25399 if (!RNODE_IF(node)->nd_body) {
25400 return NULL;
25401 }
25402 else if (!RNODE_IF(node)->nd_else) {
25403 return NULL;
25404 }
25405 vn = value_expr_check(p, RNODE_IF(node)->nd_body);
25406 if (!vn) return NULL;
25407 if (!void_node) void_node = vn;
25408 node = RNODE_IF(node)->nd_else;
25409 break;
25410
25411 case NODE_AND:
25412 case NODE_OR:
25413 node = RNODE_AND(node)->nd_1st;
25414 break;
25415
25416 case NODE_LASGN:
25417 case NODE_DASGN:
25418 case NODE_MASGN:
25419 mark_lvar_used(p, node);
25420 return NULL;
25421
25422 default:
25423 return NULL;
25424 }
25425 }
25426
25427 return NULL;
25428
25429 found:
25430 /* return the first found node */
25431 return void_node ? void_node : node;
25432}
25433
25434static int
25435value_expr(struct parser_params *p, NODE *node)
25436{
25437 NODE *void_node = value_expr_check(p, node);
25438 if (void_node) {
25439 yyerror1(&void_node->nd_loc, "void value expression");
25440 /* or "control never reach"? */
25441 return FALSE;
25442 }
25443 return TRUE;
25444}
25445
25446static void
25447void_expr(struct parser_params *p, NODE *node)
25448{
25449 const char *useless = 0;
25450
25451 if (!RTEST(ruby_verbose)) return;
25452
25453 if (!node || !(node = nd_once_body(node))) return;
25454 switch (nd_type(node)) {
25455 case NODE_OPCALL:
25456 switch (RNODE_OPCALL(node)->nd_mid) {
25457 case '+':
25458 case '-':
25459 case '*':
25460 case '/':
25461 case '%':
25462 case tPOW:
25463 case tUPLUS:
25464 case tUMINUS:
25465 case '|':
25466 case '^':
25467 case '&':
25468 case tCMP:
25469 case '>':
25470 case tGEQ:
25471 case '<':
25472 case tLEQ:
25473 case tEQ:
25474 case tNEQ:
25475 useless = rb_id2name(RNODE_OPCALL(node)->nd_mid);
25476 break;
25477 }
25478 break;
25479
25480 case NODE_LVAR:
25481 case NODE_DVAR:
25482 case NODE_GVAR:
25483 case NODE_IVAR:
25484 case NODE_CVAR:
25485 case NODE_NTH_REF:
25486 case NODE_BACK_REF:
25487 useless = "a variable";
25488 break;
25489 case NODE_CONST:
25490 useless = "a constant";
25491 break;
25492 case NODE_SYM:
25493 case NODE_LINE:
25494 case NODE_FILE:
25495 case NODE_ENCODING:
25496 case NODE_INTEGER:
25497 case NODE_FLOAT:
25498 case NODE_RATIONAL:
25499 case NODE_IMAGINARY:
25500 case NODE_STR:
25501 case NODE_DSTR:
25502 case NODE_REGX:
25503 case NODE_DREGX:
25504 useless = "a literal";
25505 break;
25506 case NODE_COLON2:
25507 case NODE_COLON3:
25508 useless = "::";
25509 break;
25510 case NODE_DOT2:
25511 useless = "..";
25512 break;
25513 case NODE_DOT3:
25514 useless = "...";
25515 break;
25516 case NODE_SELF:
25517 useless = "self";
25518 break;
25519 case NODE_NIL:
25520 useless = "nil";
25521 break;
25522 case NODE_TRUE:
25523 useless = "true";
25524 break;
25525 case NODE_FALSE:
25526 useless = "false";
25527 break;
25528 case NODE_DEFINED:
25529 useless = "defined?";
25530 break;
25531 }
25532
25533 if (useless) {
25534 rb_warn1L(nd_line(node), "possibly useless use of %s in void context", WARN_S(useless));
25535 }
25536}
25537
25538/* warns useless use of block and returns the last statement node */
25539static NODE *
25540void_stmts(struct parser_params *p, NODE *node)
25541{
25542 NODE *const n = node;
25543 if (!RTEST(ruby_verbose)) return n;
25544 if (!node) return n;
25545 if (!nd_type_p(node, NODE_BLOCK)) return n;
25546
25547 while (RNODE_BLOCK(node)->nd_next) {
25548 void_expr(p, RNODE_BLOCK(node)->nd_head);
25549 node = RNODE_BLOCK(node)->nd_next;
25550 }
25551 return RNODE_BLOCK(node)->nd_head;
25552}
25553
25554static NODE *
25555remove_begin(NODE *node)
25556{
25557 NODE **n = &node, *n1 = node;
25558 while (n1 && nd_type_p(n1, NODE_BEGIN) && RNODE_BEGIN(n1)->nd_body) {
25559 *n = n1 = RNODE_BEGIN(n1)->nd_body;
25560 }
25561 return node;
25562}
25563
25564static void
25565reduce_nodes(struct parser_params *p, NODE **body)
25566{
25567 NODE *node = *body;
25568
25569 if (!node) {
25570 *body = NEW_NIL(&NULL_LOC);
25571 return;
25572 }
25573#define subnodes(type, n1, n2) \
25574 ((!type(node)->n1) ? (type(node)->n2 ? (body = &type(node)->n2, 1) : 0) : \
25575 (!type(node)->n2) ? (body = &type(node)->n1, 1) : \
25576 (reduce_nodes(p, &type(node)->n1), body = &type(node)->n2, 1))
25577
25578 while (node) {
25579 int newline = (int)nd_fl_newline(node);
25580 switch (nd_type(node)) {
25581 end:
25582 case NODE_NIL:
25583 *body = 0;
25584 return;
25585 case NODE_BEGIN:
25586 *body = node = RNODE_BEGIN(node)->nd_body;
25587 if (newline && node) nd_set_fl_newline(node);
25588 continue;
25589 case NODE_BLOCK:
25590 body = &RNODE_BLOCK(RNODE_BLOCK(node)->nd_end)->nd_head;
25591 break;
25592 case NODE_IF:
25593 case NODE_UNLESS:
25594 if (subnodes(RNODE_IF, nd_body, nd_else)) break;
25595 return;
25596 case NODE_CASE:
25597 body = &RNODE_CASE(node)->nd_body;
25598 break;
25599 case NODE_WHEN:
25600 if (!subnodes(RNODE_WHEN, nd_body, nd_next)) goto end;
25601 break;
25602 case NODE_ENSURE:
25603 body = &RNODE_ENSURE(node)->nd_head;
25604 break;
25605 case NODE_RESCUE:
25606 newline = 0; // RESBODY should not be a NEWLINE
25607 if (RNODE_RESCUE(node)->nd_else) {
25608 body = &RNODE_RESCUE(node)->nd_resq;
25609 break;
25610 }
25611 if (!subnodes(RNODE_RESCUE, nd_head, nd_resq)) goto end;
25612 break;
25613 default:
25614 return;
25615 }
25616 node = *body;
25617 if (newline && node) nd_set_fl_newline(node);
25618 }
25619
25620#undef subnodes
25621}
25622
25623static int
25624is_static_content(NODE *node)
25625{
25626 if (!node) return 1;
25627 switch (nd_type(node)) {
25628 case NODE_HASH:
25629 if (!(node = RNODE_HASH(node)->nd_head)) break;
25630 case NODE_LIST:
25631 do {
25632 if (!is_static_content(RNODE_LIST(node)->nd_head)) return 0;
25633 } while ((node = RNODE_LIST(node)->nd_next) != 0);
25634 case NODE_SYM:
25635 case NODE_REGX:
25636 case NODE_LINE:
25637 case NODE_FILE:
25638 case NODE_ENCODING:
25639 case NODE_INTEGER:
25640 case NODE_FLOAT:
25641 case NODE_RATIONAL:
25642 case NODE_IMAGINARY:
25643 case NODE_STR:
25644 case NODE_NIL:
25645 case NODE_TRUE:
25646 case NODE_FALSE:
25647 case NODE_ZLIST:
25648 break;
25649 default:
25650 return 0;
25651 }
25652 return 1;
25653}
25654
25655static int
25656assign_in_cond(struct parser_params *p, NODE *node)
25657{
25658 switch (nd_type(node)) {
25659 case NODE_MASGN:
25660 case NODE_LASGN:
25661 case NODE_DASGN:
25662 case NODE_GASGN:
25663 case NODE_IASGN:
25664 case NODE_CVASGN:
25665 case NODE_CDECL:
25666 break;
25667
25668 default:
25669 return 0;
25670 }
25671
25672 if (!get_nd_value(p, node)) return 1;
25673 if (is_static_content(get_nd_value(p, node))) {
25674 /* reports always */
25675 rb_warn0L(nd_line(get_nd_value(p, node)), "found '= literal' in conditional, should be ==");
25676 }
25677 return 1;
25678}
25679
25680enum cond_type {
25681 COND_IN_OP,
25682 COND_IN_COND,
25683 COND_IN_FF
25684};
25685
25686#define SWITCH_BY_COND_TYPE(t, w, arg) do { \
25687 switch (t) { \
25688 case COND_IN_OP: break; \
25689 case COND_IN_COND: rb_##w##0(arg "literal in condition"); break; \
25690 case COND_IN_FF: rb_##w##0(arg "literal in flip-flop"); break; \
25691 } \
25692} while (0)
25693
25694static NODE *cond0(struct parser_params*,NODE*,enum cond_type,const YYLTYPE*,bool);
25695
25696static NODE*
25697range_op(struct parser_params *p, NODE *node, const YYLTYPE *loc)
25698{
25699 enum node_type type;
25700
25701 if (node == 0) return 0;
25702
25703 type = nd_type(node);
25704 value_expr(p, node);
25705 if (type == NODE_INTEGER) {
25706 if (!e_option_supplied(p)) rb_warn0L(nd_line(node), "integer literal in flip-flop");
25707 ID lineno = rb_intern("$.");
25708 return NEW_CALL(node, tEQ, NEW_LIST(NEW_GVAR(lineno, loc), loc), loc);
25709 }
25710 return cond0(p, node, COND_IN_FF, loc, true);
25711}
25712
25713static NODE*
25714cond0(struct parser_params *p, NODE *node, enum cond_type type, const YYLTYPE *loc, bool top)
25715{
25716 if (node == 0) return 0;
25717 if (!(node = nd_once_body(node))) return 0;
25718 assign_in_cond(p, node);
25719
25720 switch (nd_type(node)) {
25721 case NODE_BEGIN:
25722 RNODE_BEGIN(node)->nd_body = cond0(p, RNODE_BEGIN(node)->nd_body, type, loc, top);
25723 break;
25724
25725 case NODE_DSTR:
25726 case NODE_EVSTR:
25727 case NODE_STR:
25728 case NODE_FILE:
25729 SWITCH_BY_COND_TYPE(type, warn, "string ");
25730 break;
25731
25732 case NODE_REGX:
25733 if (!e_option_supplied(p)) SWITCH_BY_COND_TYPE(type, warn, "regex ");
25734 nd_set_type(node, NODE_MATCH);
25735 break;
25736
25737 case NODE_DREGX:
25738 if (!e_option_supplied(p)) SWITCH_BY_COND_TYPE(type, warning, "regex ");
25739
25740 return NEW_MATCH2(node, NEW_GVAR(idLASTLINE, loc), loc);
25741
25742 case NODE_BLOCK:
25743 {
25744 NODE *end = RNODE_BLOCK(node)->nd_end;
25745 NODE **expr = &RNODE_BLOCK(end)->nd_head;
25746 if (top) top = node == end;
25747 *expr = cond0(p, *expr, type, loc, top);
25748 }
25749 break;
25750
25751 case NODE_AND:
25752 case NODE_OR:
25753 RNODE_AND(node)->nd_1st = cond0(p, RNODE_AND(node)->nd_1st, COND_IN_COND, loc, true);
25754 RNODE_AND(node)->nd_2nd = cond0(p, RNODE_AND(node)->nd_2nd, COND_IN_COND, loc, true);
25755 break;
25756
25757 case NODE_DOT2:
25758 case NODE_DOT3:
25759 if (!top) break;
25760 RNODE_DOT2(node)->nd_beg = range_op(p, RNODE_DOT2(node)->nd_beg, loc);
25761 RNODE_DOT2(node)->nd_end = range_op(p, RNODE_DOT2(node)->nd_end, loc);
25762 switch (nd_type(node)) {
25763 case NODE_DOT2:
25764 nd_set_type(node,NODE_FLIP2);
25765 rb_node_flip2_t *flip2 = RNODE_FLIP2(node); /* for debug info */
25766 (void)flip2;
25767 break;
25768 case NODE_DOT3:
25769 nd_set_type(node, NODE_FLIP3);
25770 rb_node_flip3_t *flip3 = RNODE_FLIP3(node); /* for debug info */
25771 (void)flip3;
25772 break;
25773 }
25774 break;
25775
25776 case NODE_SYM:
25777 case NODE_DSYM:
25778 SWITCH_BY_COND_TYPE(type, warning, "symbol ");
25779 break;
25780
25781 case NODE_LINE:
25782 case NODE_ENCODING:
25783 case NODE_INTEGER:
25784 case NODE_FLOAT:
25785 case NODE_RATIONAL:
25786 case NODE_IMAGINARY:
25787 SWITCH_BY_COND_TYPE(type, warning, "");
25788 break;
25789
25790 default:
25791 break;
25792 }
25793 return node;
25794}
25795
25796static NODE*
25797cond(struct parser_params *p, NODE *node, const YYLTYPE *loc)
25798{
25799 if (node == 0) return 0;
25800 return cond0(p, node, COND_IN_COND, loc, true);
25801}
25802
25803static NODE*
25804method_cond(struct parser_params *p, NODE *node, const YYLTYPE *loc)
25805{
25806 if (node == 0) return 0;
25807 return cond0(p, node, COND_IN_OP, loc, true);
25808}
25809
25810static NODE*
25811new_nil_at(struct parser_params *p, const rb_code_position_t *pos)
25812{
25813 YYLTYPE loc = {*pos, *pos};
25814 return NEW_NIL(&loc);
25815}
25816
25817static NODE*
25818new_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)
25819{
25820 if (!cc) return right;
25821 cc = cond0(p, cc, COND_IN_COND, loc, true);
25822 return newline_node(NEW_IF(cc, left, right, loc, if_keyword_loc, then_keyword_loc, end_keyword_loc));
25823}
25824
25825static NODE*
25826new_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)
25827{
25828 if (!cc) return right;
25829 cc = cond0(p, cc, COND_IN_COND, loc, true);
25830 return newline_node(NEW_UNLESS(cc, left, right, loc, keyword_loc, then_keyword_loc, end_keyword_loc));
25831}
25832
25833#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))
25834
25835static NODE*
25836logop(struct parser_params *p, ID id, NODE *left, NODE *right,
25837 const YYLTYPE *op_loc, const YYLTYPE *loc)
25838{
25839 enum node_type type = id == idAND || id == idANDOP ? NODE_AND : NODE_OR;
25840 NODE *op;
25841 value_expr(p, left);
25842 if (left && nd_type_p(left, type)) {
25843 NODE *node = left, *second;
25844 while ((second = RNODE_AND(node)->nd_2nd) != 0 && nd_type_p(second, type)) {
25845 node = second;
25846 }
25847 RNODE_AND(node)->nd_2nd = NEW_AND_OR(type, second, right, loc, op_loc);
25848 nd_set_line(RNODE_AND(node)->nd_2nd, op_loc->beg_pos.lineno);
25849 left->nd_loc.end_pos = loc->end_pos;
25850 return left;
25851 }
25852 op = NEW_AND_OR(type, left, right, loc, op_loc);
25853 nd_set_line(op, op_loc->beg_pos.lineno);
25854 return op;
25855}
25856
25857#undef NEW_AND_OR
25858
25859static void
25860no_blockarg(struct parser_params *p, NODE *node)
25861{
25862 if (nd_type_p(node, NODE_BLOCK_PASS)) {
25863 compile_error(p, "block argument should not be given");
25864 }
25865}
25866
25867static NODE *
25868ret_args(struct parser_params *p, NODE *node)
25869{
25870 if (node) {
25871 no_blockarg(p, node);
25872 if (nd_type_p(node, NODE_LIST) && !RNODE_LIST(node)->nd_next) {
25873 node = RNODE_LIST(node)->nd_head;
25874 }
25875 }
25876 return node;
25877}
25878
25879static NODE*
25880negate_lit(struct parser_params *p, NODE* node)
25881{
25882 switch (nd_type(node)) {
25883 case NODE_INTEGER:
25884 RNODE_INTEGER(node)->minus = TRUE;
25885 break;
25886 case NODE_FLOAT:
25887 RNODE_FLOAT(node)->minus = TRUE;
25888 break;
25889 case NODE_RATIONAL:
25890 RNODE_RATIONAL(node)->minus = TRUE;
25891 break;
25892 case NODE_IMAGINARY:
25893 RNODE_IMAGINARY(node)->minus = TRUE;
25894 break;
25895 }
25896 return node;
25897}
25898
25899static NODE *
25900arg_blk_pass(NODE *node1, rb_node_block_pass_t *node2)
25901{
25902 if (node2) {
25903 if (!node1) return (NODE *)node2;
25904 node2->nd_head = node1;
25905 nd_set_first_lineno(node2, nd_first_lineno(node1));
25906 nd_set_first_column(node2, nd_first_column(node1));
25907 return (NODE *)node2;
25908 }
25909 return node1;
25910}
25911
25912static bool
25913args_info_empty_p(struct rb_args_info *args)
25914{
25915 if (args->pre_args_num) return false;
25916 if (args->post_args_num) return false;
25917 if (args->rest_arg) return false;
25918 if (args->opt_args) return false;
25919 if (args->block_arg) return false;
25920 if (args->kw_args) return false;
25921 if (args->kw_rest_arg) return false;
25922 return true;
25923}
25924
25925static rb_node_args_t *
25926new_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)
25927{
25928 struct rb_args_info *args = &tail->nd_ainfo;
25929
25930 if (args->forwarding) {
25931 if (rest_arg) {
25932 yyerror1(&RNODE(tail)->nd_loc, "... after rest argument");
25933 return tail;
25934 }
25935 rest_arg = idFWD_REST;
25936 }
25937
25938 args->pre_args_num = pre_args ? pre_args->nd_plen : 0;
25939 args->pre_init = pre_args ? pre_args->nd_next : 0;
25940
25941 args->post_args_num = post_args ? post_args->nd_plen : 0;
25942 args->post_init = post_args ? post_args->nd_next : 0;
25943 args->first_post_arg = post_args ? post_args->nd_pid : 0;
25944
25945 args->rest_arg = rest_arg;
25946
25947 args->opt_args = opt_args;
25948
25949 nd_set_loc(RNODE(tail), loc);
25950
25951 return tail;
25952}
25953
25954static rb_node_args_t *
25955new_args_tail(struct parser_params *p, rb_node_kw_arg_t *kw_args, ID kw_rest_arg, ID block, const YYLTYPE *kw_rest_loc)
25956{
25957 rb_node_args_t *node = NEW_ARGS(&NULL_LOC);
25958 struct rb_args_info *args = &node->nd_ainfo;
25959 if (p->error_p) return node;
25960
25961 if (block == idNil) {
25962 block = 0;
25963 args->no_blockarg = TRUE;
25964 }
25965 args->block_arg = block;
25966 args->kw_args = kw_args;
25967
25968 if (kw_args) {
25969 /*
25970 * def foo(k1: 1, kr1:, k2: 2, **krest, &b)
25971 * variable order: k1, kr1, k2, &b, internal_id, krest
25972 * #=> <reorder>
25973 * variable order: kr1, k1, k2, internal_id, krest, &b
25974 */
25975 ID kw_bits = internal_id(p), *required_kw_vars, *kw_vars;
25976 struct vtable *vtargs = p->lvtbl->args;
25977 rb_node_kw_arg_t *kwn = kw_args;
25978
25979 if (block) block = vtargs->tbl[vtargs->pos-1];
25980 vtable_pop(vtargs, !!block + !!kw_rest_arg);
25981 required_kw_vars = kw_vars = &vtargs->tbl[vtargs->pos];
25982 while (kwn) {
25983 if (!NODE_REQUIRED_KEYWORD_P(get_nd_value(p, kwn->nd_body)))
25984 --kw_vars;
25985 --required_kw_vars;
25986 kwn = kwn->nd_next;
25987 }
25988
25989 for (kwn = kw_args; kwn; kwn = kwn->nd_next) {
25990 ID vid = get_nd_vid(p, kwn->nd_body);
25991 if (NODE_REQUIRED_KEYWORD_P(get_nd_value(p, kwn->nd_body))) {
25992 *required_kw_vars++ = vid;
25993 }
25994 else {
25995 *kw_vars++ = vid;
25996 }
25997 }
25998
25999 arg_var(p, kw_bits);
26000 if (kw_rest_arg) arg_var(p, kw_rest_arg);
26001 if (block) arg_var(p, block);
26002
26003 args->kw_rest_arg = NEW_DVAR(kw_rest_arg, kw_rest_loc);
26004 }
26005 else if (kw_rest_arg == idNil) {
26006 args->no_kwarg = 1;
26007 }
26008 else if (kw_rest_arg) {
26009 args->kw_rest_arg = NEW_DVAR(kw_rest_arg, kw_rest_loc);
26010 }
26011
26012 return node;
26013}
26014
26015static rb_node_args_t *
26016args_with_numbered(struct parser_params *p, rb_node_args_t *args, int max_numparam, ID it_id)
26017{
26018 if (max_numparam > NO_PARAM || it_id) {
26019 if (!args) {
26020 YYLTYPE loc = RUBY_INIT_YYLLOC();
26021 args = new_empty_args_tail(p, 0);
26022 nd_set_loc(RNODE(args), &loc);
26023 }
26024 args->nd_ainfo.pre_args_num = it_id ? 1 : max_numparam;
26025 }
26026 return args;
26027}
26028
26029static NODE*
26030new_array_pattern(struct parser_params *p, NODE *constant, NODE *pre_arg, NODE *aryptn, const YYLTYPE *loc)
26031{
26032 RNODE_ARYPTN(aryptn)->nd_pconst = constant;
26033
26034 if (pre_arg) {
26035 NODE *pre_args = NEW_LIST(pre_arg, loc);
26036 if (RNODE_ARYPTN(aryptn)->pre_args) {
26037 RNODE_ARYPTN(aryptn)->pre_args = list_concat(pre_args, RNODE_ARYPTN(aryptn)->pre_args);
26038 }
26039 else {
26040 RNODE_ARYPTN(aryptn)->pre_args = pre_args;
26041 }
26042 }
26043 return aryptn;
26044}
26045
26046static NODE*
26047new_array_pattern_tail(struct parser_params *p, NODE *pre_args, int has_rest, NODE *rest_arg, NODE *post_args, const YYLTYPE *loc)
26048{
26049 if (has_rest) {
26050 rest_arg = rest_arg ? rest_arg : NODE_SPECIAL_NO_NAME_REST;
26051 }
26052 else {
26053 rest_arg = NULL;
26054 }
26055 NODE *node = NEW_ARYPTN(pre_args, rest_arg, post_args, loc);
26056
26057 return node;
26058}
26059
26060static NODE*
26061new_find_pattern(struct parser_params *p, NODE *constant, NODE *fndptn, const YYLTYPE *loc)
26062{
26063 RNODE_FNDPTN(fndptn)->nd_pconst = constant;
26064
26065 return fndptn;
26066}
26067
26068static NODE*
26069new_find_pattern_tail(struct parser_params *p, NODE *pre_rest_arg, NODE *args, NODE *post_rest_arg, const YYLTYPE *loc)
26070{
26071 pre_rest_arg = pre_rest_arg ? pre_rest_arg : NODE_SPECIAL_NO_NAME_REST;
26072 post_rest_arg = post_rest_arg ? post_rest_arg : NODE_SPECIAL_NO_NAME_REST;
26073 NODE *node = NEW_FNDPTN(pre_rest_arg, args, post_rest_arg, loc);
26074
26075 return node;
26076}
26077
26078static NODE*
26079new_hash_pattern(struct parser_params *p, NODE *constant, NODE *hshptn, const YYLTYPE *loc)
26080{
26081 RNODE_HSHPTN(hshptn)->nd_pconst = constant;
26082 return hshptn;
26083}
26084
26085static NODE*
26086new_hash_pattern_tail(struct parser_params *p, NODE *kw_args, ID kw_rest_arg, const YYLTYPE *loc)
26087{
26088 NODE *node, *kw_rest_arg_node;
26089
26090 if (kw_rest_arg == idNil) {
26091 kw_rest_arg_node = NODE_SPECIAL_NO_REST_KEYWORD;
26092 }
26093 else if (kw_rest_arg) {
26094 kw_rest_arg_node = assignable(p, kw_rest_arg, 0, loc);
26095 }
26096 else {
26097 kw_rest_arg_node = NULL;
26098 }
26099
26100 node = NEW_HSHPTN(0, kw_args, kw_rest_arg_node, loc);
26101
26102 return node;
26103}
26104
26105static NODE*
26106dsym_node(struct parser_params *p, NODE *node, const YYLTYPE *loc)
26107{
26108 if (!node) {
26109 return NEW_SYM(STR_NEW0(), loc);
26110 }
26111
26112 switch (nd_type(node)) {
26113 case NODE_DSTR:
26114 nd_set_type(node, NODE_DSYM);
26115 nd_set_loc(node, loc);
26116 break;
26117 case NODE_STR:
26118 node = str_to_sym_node(p, node, loc);
26119 break;
26120 default:
26121 node = NEW_DSYM(0, 1, NEW_LIST(node, loc), loc);
26122 break;
26123 }
26124 return node;
26125}
26126
26127static int
26128nd_type_st_key_enable_p(NODE *node)
26129{
26130 switch (nd_type(node)) {
26131 case NODE_INTEGER:
26132 case NODE_FLOAT:
26133 case NODE_RATIONAL:
26134 case NODE_IMAGINARY:
26135 case NODE_STR:
26136 case NODE_SYM:
26137 case NODE_REGX:
26138 case NODE_LINE:
26139 case NODE_FILE:
26140 case NODE_ENCODING:
26141 return true;
26142 default:
26143 return false;
26144 }
26145}
26146
26147static VALUE
26148nd_value(struct parser_params *p, NODE *node)
26149{
26150 switch (nd_type(node)) {
26151 case NODE_STR:
26152 return rb_node_str_string_val(node);
26153 case NODE_INTEGER:
26154 return rb_node_integer_literal_val(node);
26155 case NODE_FLOAT:
26156 return rb_node_float_literal_val(node);
26157 case NODE_RATIONAL:
26158 return rb_node_rational_literal_val(node);
26159 case NODE_IMAGINARY:
26160 return rb_node_imaginary_literal_val(node);
26161 case NODE_SYM:
26162 return rb_node_sym_string_val(node);
26163 case NODE_REGX:
26164 return rb_node_regx_string_val(node);
26165 case NODE_LINE:
26166 return rb_node_line_lineno_val(node);
26167 case NODE_ENCODING:
26168 return rb_node_encoding_val(node);
26169 case NODE_FILE:
26170 return rb_node_file_path_val(node);
26171 default:
26172 rb_bug("unexpected node: %s", ruby_node_name(nd_type(node)));
26174 }
26175}
26176
26177static void
26178warn_duplicate_keys(struct parser_params *p, NODE *hash)
26179{
26180 /* See https://bugs.ruby-lang.org/issues/20331 for discussion about what is warned. */
26181 p->warn_duplicate_keys_table = st_init_table_with_size(&literal_type, RNODE_LIST(hash)->as.nd_alen / 2);
26182 while (hash && RNODE_LIST(hash)->nd_next) {
26183 NODE *head = RNODE_LIST(hash)->nd_head;
26184 NODE *value = RNODE_LIST(hash)->nd_next;
26185 NODE *next = RNODE_LIST(value)->nd_next;
26186 st_data_t key;
26187 st_data_t data;
26188
26189 /* keyword splat, e.g. {k: 1, **z, k: 2} */
26190 if (!head) {
26191 head = value;
26192 }
26193
26194 if (nd_type_st_key_enable_p(head)) {
26195 key = (st_data_t)head;
26196
26197 if (st_delete(p->warn_duplicate_keys_table, &key, &data)) {
26198 rb_warn2L(nd_line((NODE *)data),
26199 "key %+"PRIsWARN" is duplicated and overwritten on line %d",
26200 nd_value(p, head), WARN_I(nd_line(head)));
26201 }
26202 st_insert(p->warn_duplicate_keys_table, (st_data_t)key, (st_data_t)hash);
26203 }
26204 hash = next;
26205 }
26206 st_free_table(p->warn_duplicate_keys_table);
26207 p->warn_duplicate_keys_table = NULL;
26208}
26209
26210static NODE *
26211new_hash(struct parser_params *p, NODE *hash, const YYLTYPE *loc)
26212{
26213 if (hash) warn_duplicate_keys(p, hash);
26214 return NEW_HASH(hash, loc);
26215}
26216
26217static void
26218error_duplicate_pattern_variable(struct parser_params *p, ID id, const YYLTYPE *loc)
26219{
26220 if (is_private_local_id(p, id)) {
26221 return;
26222 }
26223 if (st_is_member(p->pvtbl, id)) {
26224 yyerror1(loc, "duplicated variable name");
26225 }
26226 else if (p->ctxt.in_alt_pattern && id) {
26227 yyerror1(loc, "variable capture in alternative pattern");
26228 }
26229 else {
26230 p->ctxt.capture_in_pattern = 1;
26231 st_insert(p->pvtbl, (st_data_t)id, 0);
26232 }
26233}
26234
26235static void
26236error_duplicate_pattern_key(struct parser_params *p, VALUE key, const YYLTYPE *loc)
26237{
26238 if (!p->pktbl) {
26239 p->pktbl = st_init_numtable();
26240 }
26241 else if (st_is_member(p->pktbl, key)) {
26242 yyerror1(loc, "duplicated key name");
26243 return;
26244 }
26245 st_insert(p->pktbl, (st_data_t)key, 0);
26246}
26247
26248static NODE *
26249new_unique_key_hash(struct parser_params *p, NODE *hash, const YYLTYPE *loc)
26250{
26251 return NEW_HASH(hash, loc);
26252}
26253
26254static NODE *
26255new_op_assign(struct parser_params *p, NODE *lhs, ID op, NODE *rhs, struct lex_context ctxt, const YYLTYPE *loc)
26256{
26257 NODE *asgn;
26258
26259 if (lhs) {
26260 ID vid = get_nd_vid(p, lhs);
26261 YYLTYPE lhs_loc = lhs->nd_loc;
26262 if (op == tOROP) {
26263 set_nd_value(p, lhs, rhs);
26264 nd_set_loc(lhs, loc);
26265 asgn = NEW_OP_ASGN_OR(gettable(p, vid, &lhs_loc), lhs, loc);
26266 }
26267 else if (op == tANDOP) {
26268 set_nd_value(p, lhs, rhs);
26269 nd_set_loc(lhs, loc);
26270 asgn = NEW_OP_ASGN_AND(gettable(p, vid, &lhs_loc), lhs, loc);
26271 }
26272 else {
26273 asgn = lhs;
26274 rhs = NEW_CALL(gettable(p, vid, &lhs_loc), op, NEW_LIST(rhs, &rhs->nd_loc), loc);
26275 set_nd_value(p, asgn, rhs);
26276 nd_set_loc(asgn, loc);
26277 }
26278 }
26279 else {
26280 asgn = NEW_ERROR(loc);
26281 }
26282 return asgn;
26283}
26284
26285static NODE *
26286new_ary_op_assign(struct parser_params *p, NODE *ary,
26287 NODE *args, ID op, NODE *rhs, const YYLTYPE *args_loc, const YYLTYPE *loc,
26288 const YYLTYPE *call_operator_loc, const YYLTYPE *opening_loc, const YYLTYPE *closing_loc, const YYLTYPE *binary_operator_loc)
26289{
26290 NODE *asgn;
26291
26292 aryset_check(p, args);
26293 args = make_list(args, args_loc);
26294 asgn = NEW_OP_ASGN1(ary, op, args, rhs, loc, call_operator_loc, opening_loc, closing_loc, binary_operator_loc);
26295 fixpos(asgn, ary);
26296 return asgn;
26297}
26298
26299static NODE *
26300new_attr_op_assign(struct parser_params *p, NODE *lhs,
26301 ID atype, ID attr, ID op, NODE *rhs, const YYLTYPE *loc,
26302 const YYLTYPE *call_operator_loc, const YYLTYPE *message_loc, const YYLTYPE *binary_operator_loc)
26303{
26304 NODE *asgn;
26305
26306 asgn = NEW_OP_ASGN2(lhs, CALL_Q_P(atype), attr, op, rhs, loc, call_operator_loc, message_loc, binary_operator_loc);
26307 fixpos(asgn, lhs);
26308 return asgn;
26309}
26310
26311static NODE *
26312new_const_op_assign(struct parser_params *p, NODE *lhs, ID op, NODE *rhs, struct lex_context ctxt, const YYLTYPE *loc)
26313{
26314 NODE *asgn;
26315
26316 if (lhs) {
26317 asgn = NEW_OP_CDECL(lhs, op, rhs, ctxt.shareable_constant_value, loc);
26318 }
26319 else {
26320 asgn = NEW_ERROR(loc);
26321 }
26322 fixpos(asgn, lhs);
26323 return asgn;
26324}
26325
26326static NODE *
26327const_decl(struct parser_params *p, NODE *path, const YYLTYPE *loc)
26328{
26329 if (p->ctxt.in_def) {
26330#ifndef RIPPER
26331 yyerror1(loc, "dynamic constant assignment");
26332#else
26333 set_value(assign_error(p, "dynamic constant assignment", p->s_lvalue));
26334#endif
26335 }
26336 return NEW_CDECL(0, 0, (path), p->ctxt.shareable_constant_value, loc);
26337}
26338
26339#ifdef RIPPER
26340static VALUE
26341assign_error(struct parser_params *p, const char *mesg, VALUE a)
26342{
26343 a = dispatch2(assign_error, ERR_MESG(), a);
26344 ripper_error(p);
26345 return a;
26346}
26347#endif
26348
26349static NODE *
26350new_bodystmt(struct parser_params *p, NODE *head, NODE *rescue, NODE *rescue_else, NODE *ensure, const YYLTYPE *loc)
26351{
26352 NODE *result = head;
26353 if (rescue) {
26354 NODE *tmp = rescue_else ? rescue_else : rescue;
26355 YYLTYPE rescue_loc = code_loc_gen(&head->nd_loc, &tmp->nd_loc);
26356
26357 result = NEW_RESCUE(head, rescue, rescue_else, &rescue_loc);
26358 nd_set_line(result, rescue->nd_loc.beg_pos.lineno);
26359 }
26360 if (ensure) {
26361 result = NEW_ENSURE(result, ensure, loc);
26362 }
26363 fixpos(result, head);
26364 return result;
26365}
26366
26367static void
26368warn_unused_var(struct parser_params *p, struct local_vars *local)
26369{
26370 int cnt;
26371
26372 if (!local->used) return;
26373 cnt = local->used->pos;
26374 if (cnt != local->vars->pos) {
26375 rb_parser_fatal(p, "local->used->pos != local->vars->pos");
26376 }
26377#ifndef RIPPER
26378 ID *v = local->vars->tbl;
26379 ID *u = local->used->tbl;
26380 for (int i = 0; i < cnt; ++i) {
26381 if (!v[i] || (u[i] & LVAR_USED)) continue;
26382 if (is_private_local_id(p, v[i])) continue;
26383 rb_warn1L((int)u[i], "assigned but unused variable - %"PRIsWARN, rb_id2str(v[i]));
26384 }
26385#endif
26386}
26387
26388static void
26389local_push(struct parser_params *p, int toplevel_scope)
26390{
26391 struct local_vars *local;
26392 int inherits_dvars = toplevel_scope && compile_for_eval;
26393 int warn_unused_vars = RTEST(ruby_verbose);
26394
26395 local = ALLOC(struct local_vars);
26396 local->prev = p->lvtbl;
26397 local->args = vtable_alloc(0);
26398 local->vars = vtable_alloc(inherits_dvars ? DVARS_INHERIT : DVARS_TOPSCOPE);
26399#ifndef RIPPER
26400 if (toplevel_scope && compile_for_eval) warn_unused_vars = 0;
26401 if (toplevel_scope && e_option_supplied(p)) warn_unused_vars = 0;
26402#endif
26403 local->numparam.outer = 0;
26404 local->numparam.inner = 0;
26405 local->numparam.current = 0;
26406 local->it = 0;
26407 local->used = warn_unused_vars ? vtable_alloc(0) : 0;
26408
26409# if WARN_PAST_SCOPE
26410 local->past = 0;
26411# endif
26412 CMDARG_PUSH(0);
26413 COND_PUSH(0);
26414 p->lvtbl = local;
26415}
26416
26417static void
26418vtable_chain_free(struct parser_params *p, struct vtable *table)
26419{
26420 while (!DVARS_TERMINAL_P(table)) {
26421 struct vtable *cur_table = table;
26422 table = cur_table->prev;
26423 vtable_free(cur_table);
26424 }
26425}
26426
26427static void
26428local_free(struct parser_params *p, struct local_vars *local)
26429{
26430 vtable_chain_free(p, local->used);
26431
26432# if WARN_PAST_SCOPE
26433 vtable_chain_free(p, local->past);
26434# endif
26435
26436 vtable_chain_free(p, local->args);
26437 vtable_chain_free(p, local->vars);
26438
26439 ruby_sized_xfree(local, sizeof(struct local_vars));
26440}
26441
26442static void
26443local_pop(struct parser_params *p)
26444{
26445 struct local_vars *local = p->lvtbl->prev;
26446 if (p->lvtbl->used) {
26447 warn_unused_var(p, p->lvtbl);
26448 }
26449
26450 local_free(p, p->lvtbl);
26451 p->lvtbl = local;
26452
26453 CMDARG_POP();
26454 COND_POP();
26455}
26456
26457static rb_ast_id_table_t *
26458local_tbl(struct parser_params *p)
26459{
26460 int cnt_args = vtable_size(p->lvtbl->args);
26461 int cnt_vars = vtable_size(p->lvtbl->vars);
26462 int cnt = cnt_args + cnt_vars;
26463 int i, j;
26464 rb_ast_id_table_t *tbl;
26465
26466 if (cnt <= 0) return 0;
26467 tbl = rb_ast_new_local_table(p->ast, cnt);
26468 MEMCPY(tbl->ids, p->lvtbl->args->tbl, ID, cnt_args);
26469 /* remove IDs duplicated to warn shadowing */
26470 for (i = 0, j = cnt_args; i < cnt_vars; ++i) {
26471 ID id = p->lvtbl->vars->tbl[i];
26472 if (!vtable_included(p->lvtbl->args, id)) {
26473 tbl->ids[j++] = id;
26474 }
26475 }
26476 if (j < cnt) {
26477 tbl = rb_ast_resize_latest_local_table(p->ast, j);
26478 }
26479
26480 return tbl;
26481}
26482
26483static void
26484numparam_name(struct parser_params *p, ID id)
26485{
26486 if (!NUMPARAM_ID_P(id)) return;
26487 compile_error(p, "_%d is reserved for numbered parameter",
26488 NUMPARAM_ID_TO_IDX(id));
26489}
26490
26491static void
26492arg_var(struct parser_params *p, ID id)
26493{
26494 numparam_name(p, id);
26495 vtable_add(p->lvtbl->args, id);
26496}
26497
26498static void
26499local_var(struct parser_params *p, ID id)
26500{
26501 numparam_name(p, id);
26502 vtable_add(p->lvtbl->vars, id);
26503 if (p->lvtbl->used) {
26504 vtable_add(p->lvtbl->used, (ID)p->ruby_sourceline);
26505 }
26506}
26507
26508#ifndef RIPPER
26509int
26510rb_parser_local_defined(struct parser_params *p, ID id, const struct rb_iseq_struct *iseq)
26511{
26512 return rb_local_defined(id, iseq);
26513}
26514#endif
26515
26516static int
26517local_id_ref(struct parser_params *p, ID id, ID **vidrefp)
26518{
26519 struct vtable *vars, *args, *used;
26520
26521 vars = p->lvtbl->vars;
26522 args = p->lvtbl->args;
26523 used = p->lvtbl->used;
26524
26525 while (vars && !DVARS_TERMINAL_P(vars->prev)) {
26526 vars = vars->prev;
26527 args = args->prev;
26528 if (used) used = used->prev;
26529 }
26530
26531 if (vars && vars->prev == DVARS_INHERIT) {
26532 return rb_parser_local_defined(p, id, p->parent_iseq);
26533 }
26534 else if (vtable_included(args, id)) {
26535 return 1;
26536 }
26537 else {
26538 int i = vtable_included(vars, id);
26539 if (i && used && vidrefp) *vidrefp = &used->tbl[i-1];
26540 return i != 0;
26541 }
26542}
26543
26544static int
26545local_id(struct parser_params *p, ID id)
26546{
26547 return local_id_ref(p, id, NULL);
26548}
26549
26550static int
26551check_forwarding_args(struct parser_params *p)
26552{
26553 if (local_id(p, idFWD_ALL)) return TRUE;
26554 compile_error(p, "unexpected ...");
26555 return FALSE;
26556}
26557
26558static void
26559add_forwarding_args(struct parser_params *p)
26560{
26561 arg_var(p, idFWD_REST);
26562 arg_var(p, idFWD_KWREST);
26563 arg_var(p, idFWD_BLOCK);
26564 arg_var(p, idFWD_ALL);
26565}
26566
26567static void
26568forwarding_arg_check(struct parser_params *p, ID arg, ID all, const char *var)
26569{
26570 bool conflict = false;
26571
26572 struct vtable *vars, *args;
26573
26574 vars = p->lvtbl->vars;
26575 args = p->lvtbl->args;
26576
26577 while (vars && !DVARS_TERMINAL_P(vars->prev)) {
26578 conflict |= (vtable_included(args, arg) && !(all && vtable_included(args, all)));
26579 vars = vars->prev;
26580 args = args->prev;
26581 }
26582
26583 bool found = false;
26584 if (vars && vars->prev == DVARS_INHERIT && !found) {
26585 found = (rb_parser_local_defined(p, arg, p->parent_iseq) &&
26586 !(all && rb_parser_local_defined(p, all, p->parent_iseq)));
26587 }
26588 else {
26589 found = (vtable_included(args, arg) &&
26590 !(all && vtable_included(args, all)));
26591 }
26592
26593 if (!found) {
26594 compile_error(p, "no anonymous %s parameter", var);
26595 }
26596 else if (conflict) {
26597 compile_error(p, "anonymous %s parameter is also used within block", var);
26598 }
26599}
26600
26601static NODE *
26602new_args_forward_call(struct parser_params *p, NODE *leading, const YYLTYPE *loc, const YYLTYPE *argsloc)
26603{
26604 NODE *rest = NEW_LVAR(idFWD_REST, loc);
26605 NODE *kwrest = list_append(p, NEW_LIST(0, loc), NEW_LVAR(idFWD_KWREST, loc));
26606 rb_node_block_pass_t *block = NEW_BLOCK_PASS(NEW_LVAR(idFWD_BLOCK, loc), argsloc, &NULL_LOC);
26607 NODE *args = leading ? rest_arg_append(p, leading, rest, argsloc) : NEW_SPLAT(rest, loc, &NULL_LOC);
26608 block->forwarding = TRUE;
26609 args = arg_append(p, args, new_hash(p, kwrest, loc), argsloc);
26610 return arg_blk_pass(args, block);
26611}
26612
26613static NODE *
26614numparam_push(struct parser_params *p)
26615{
26616 struct local_vars *local = p->lvtbl;
26617 NODE *inner = local->numparam.inner;
26618 if (!local->numparam.outer) {
26619 local->numparam.outer = local->numparam.current;
26620 }
26621 local->numparam.inner = 0;
26622 local->numparam.current = 0;
26623 local->it = 0;
26624 return inner;
26625}
26626
26627static void
26628numparam_pop(struct parser_params *p, NODE *prev_inner)
26629{
26630 struct local_vars *local = p->lvtbl;
26631 if (prev_inner) {
26632 /* prefer first one */
26633 local->numparam.inner = prev_inner;
26634 }
26635 else if (local->numparam.current) {
26636 /* current and inner are exclusive */
26637 local->numparam.inner = local->numparam.current;
26638 }
26639 if (p->max_numparam > NO_PARAM) {
26640 /* current and outer are exclusive */
26641 local->numparam.current = local->numparam.outer;
26642 local->numparam.outer = 0;
26643 }
26644 else {
26645 /* no numbered parameter */
26646 local->numparam.current = 0;
26647 }
26648 local->it = 0;
26649}
26650
26651static const struct vtable *
26652dyna_push(struct parser_params *p)
26653{
26654 p->lvtbl->args = vtable_alloc(p->lvtbl->args);
26655 p->lvtbl->vars = vtable_alloc(p->lvtbl->vars);
26656 if (p->lvtbl->used) {
26657 p->lvtbl->used = vtable_alloc(p->lvtbl->used);
26658 }
26659 return p->lvtbl->args;
26660}
26661
26662static void
26663dyna_pop_vtable(struct parser_params *p, struct vtable **vtblp)
26664{
26665 struct vtable *tmp = *vtblp;
26666 *vtblp = tmp->prev;
26667# if WARN_PAST_SCOPE
26668 if (p->past_scope_enabled) {
26669 tmp->prev = p->lvtbl->past;
26670 p->lvtbl->past = tmp;
26671 return;
26672 }
26673# endif
26674 vtable_free(tmp);
26675}
26676
26677static void
26678dyna_pop_1(struct parser_params *p)
26679{
26680 struct vtable *tmp;
26681
26682 if ((tmp = p->lvtbl->used) != 0) {
26683 warn_unused_var(p, p->lvtbl);
26684 p->lvtbl->used = p->lvtbl->used->prev;
26685 vtable_free(tmp);
26686 }
26687 dyna_pop_vtable(p, &p->lvtbl->args);
26688 dyna_pop_vtable(p, &p->lvtbl->vars);
26689}
26690
26691static void
26692dyna_pop(struct parser_params *p, const struct vtable *lvargs)
26693{
26694 while (p->lvtbl->args != lvargs) {
26695 dyna_pop_1(p);
26696 if (!p->lvtbl->args) {
26697 struct local_vars *local = p->lvtbl->prev;
26698 ruby_sized_xfree(p->lvtbl, sizeof(*p->lvtbl));
26699 p->lvtbl = local;
26700 }
26701 }
26702 dyna_pop_1(p);
26703}
26704
26705static int
26706dyna_in_block(struct parser_params *p)
26707{
26708 return !DVARS_TERMINAL_P(p->lvtbl->vars) && p->lvtbl->vars->prev != DVARS_TOPSCOPE;
26709}
26710
26711#ifndef RIPPER
26712int
26713dvar_defined_ref(struct parser_params *p, ID id, ID **vidrefp)
26714{
26715 struct vtable *vars, *args, *used;
26716 int i;
26717
26718 args = p->lvtbl->args;
26719 vars = p->lvtbl->vars;
26720 used = p->lvtbl->used;
26721
26722 while (!DVARS_TERMINAL_P(vars)) {
26723 if (vtable_included(args, id)) {
26724 return 1;
26725 }
26726 if ((i = vtable_included(vars, id)) != 0) {
26727 if (used && vidrefp) *vidrefp = &used->tbl[i-1];
26728 return 1;
26729 }
26730 args = args->prev;
26731 vars = vars->prev;
26732 if (!vidrefp) used = 0;
26733 if (used) used = used->prev;
26734 }
26735
26736 if (vars == DVARS_INHERIT && !NUMPARAM_ID_P(id)) {
26737 return rb_dvar_defined(id, p->parent_iseq);
26738 }
26739
26740 return 0;
26741}
26742#endif
26743
26744static int
26745dvar_defined(struct parser_params *p, ID id)
26746{
26747 return dvar_defined_ref(p, id, NULL);
26748}
26749
26750static int
26751dvar_curr(struct parser_params *p, ID id)
26752{
26753 return (vtable_included(p->lvtbl->args, id) ||
26754 vtable_included(p->lvtbl->vars, id));
26755}
26756
26757static void
26758reg_fragment_enc_error(struct parser_params* p, rb_parser_string_t *str, int c)
26759{
26760 compile_error(p,
26761 "regexp encoding option '%c' differs from source encoding '%s'",
26762 c, rb_enc_name(rb_parser_str_get_encoding(str)));
26763}
26764
26765#ifndef RIPPER
26766static rb_encoding *
26767find_enc(struct parser_params* p, const char *name)
26768{
26769 int idx = rb_enc_find_index(name);
26770 if (idx < 0) {
26771 rb_bug("unknown encoding name: %s", name);
26772 }
26773
26774 return rb_enc_from_index(idx);
26775}
26776
26777static rb_encoding *
26778kcode_to_enc(struct parser_params* p, int kcode)
26779{
26780 rb_encoding *enc;
26781
26782 switch (kcode) {
26783 case ENC_ASCII8BIT:
26784 enc = rb_ascii8bit_encoding();
26785 break;
26786 case ENC_EUC_JP:
26787 enc = find_enc(p, "EUC-JP");
26788 break;
26789 case ENC_Windows_31J:
26790 enc = find_enc(p, "Windows-31J");
26791 break;
26792 case ENC_UTF8:
26793 enc = rb_utf8_encoding();
26794 break;
26795 default:
26796 enc = NULL;
26797 break;
26798 }
26799
26800 return enc;
26801}
26802
26803int
26804rb_reg_fragment_setenc(struct parser_params* p, rb_parser_string_t *str, int options)
26805{
26806 int c = RE_OPTION_ENCODING_IDX(options);
26807
26808 if (c) {
26809 int opt, idx;
26810 rb_encoding *enc;
26811
26812 char_to_option_kcode(c, &opt, &idx);
26813 enc = kcode_to_enc(p, idx);
26814 if (enc != rb_parser_str_get_encoding(str) &&
26815 !rb_parser_is_ascii_string(p, str)) {
26816 goto error;
26817 }
26818 rb_parser_string_set_encoding(str, enc);
26819 }
26820 else if (RE_OPTION_ENCODING_NONE(options)) {
26821 if (!PARSER_ENCODING_IS_ASCII8BIT(p, str) &&
26822 !rb_parser_is_ascii_string(p, str)) {
26823 c = 'n';
26824 goto error;
26825 }
26826 rb_parser_enc_associate(p, str, rb_ascii8bit_encoding());
26827 }
26828 else if (rb_is_usascii_enc(p->enc)) {
26829 rb_parser_enc_associate(p, str, rb_ascii8bit_encoding());
26830 }
26831 return 0;
26832
26833 error:
26834 return c;
26835}
26836#endif
26837
26838static void
26839reg_fragment_setenc(struct parser_params* p, rb_parser_string_t *str, int options)
26840{
26841 int c = rb_reg_fragment_setenc(p, str, options);
26842 if (c) reg_fragment_enc_error(p, str, c);
26843}
26844
26845#ifndef UNIVERSAL_PARSER
26846typedef struct {
26847 struct parser_params* parser;
26848 rb_encoding *enc;
26849 NODE *succ_block;
26850 const YYLTYPE *loc;
26851 rb_parser_assignable_func assignable;
26853
26854static int
26855reg_named_capture_assign_iter(const OnigUChar *name, const OnigUChar *name_end,
26856 int back_num, int *back_refs, OnigRegex regex, void *arg0)
26857{
26859 struct parser_params* p = arg->parser;
26860 rb_encoding *enc = arg->enc;
26861 long len = name_end - name;
26862 const char *s = (const char *)name;
26863
26864 return rb_reg_named_capture_assign_iter_impl(p, s, len, enc, &arg->succ_block, arg->loc, arg->assignable);
26865}
26866
26867static NODE *
26868reg_named_capture_assign(struct parser_params* p, VALUE regexp, const YYLTYPE *loc, rb_parser_assignable_func assignable)
26869{
26871
26872 arg.parser = p;
26873 arg.enc = rb_enc_get(regexp);
26874 arg.succ_block = 0;
26875 arg.loc = loc;
26876 arg.assignable = assignable;
26877 onig_foreach_name(RREGEXP_PTR(regexp), reg_named_capture_assign_iter, &arg);
26878
26879 if (!arg.succ_block) return 0;
26880 return RNODE_BLOCK(arg.succ_block)->nd_next;
26881}
26882#endif
26883
26884#ifndef RIPPER
26885NODE *
26886rb_parser_assignable(struct parser_params *p, ID id, NODE *val, const YYLTYPE *loc)
26887{
26888 return assignable(p, id, val, loc);
26889}
26890
26891int
26892rb_reg_named_capture_assign_iter_impl(struct parser_params *p, const char *s, long len,
26893 rb_encoding *enc, NODE **succ_block, const rb_code_location_t *loc, rb_parser_assignable_func assignable)
26894{
26895 ID var;
26896 NODE *node, *succ;
26897
26898 if (!len) return ST_CONTINUE;
26899 if (!VALID_SYMNAME_P(s, len, enc, ID_LOCAL))
26900 return ST_CONTINUE;
26901
26902 var = intern_cstr(s, len, enc);
26903 if (len < MAX_WORD_LENGTH && rb_reserved_word(s, (int)len)) {
26904 if (!lvar_defined(p, var)) return ST_CONTINUE;
26905 }
26906 node = node_assign(p, assignable(p, var, 0, loc), NEW_SYM(rb_id2str(var), loc), NO_LEX_CTXT, loc);
26907 succ = *succ_block;
26908 if (!succ) succ = NEW_ERROR(loc);
26909 succ = block_append(p, succ, node);
26910 *succ_block = succ;
26911 return ST_CONTINUE;
26912}
26913#endif
26914
26915static VALUE
26916parser_reg_compile(struct parser_params* p, rb_parser_string_t *str, int options)
26917{
26918 VALUE str2;
26919 reg_fragment_setenc(p, str, options);
26920 str2 = rb_str_new_parser_string(str);
26921 return rb_parser_reg_compile(p, str2, options);
26922}
26923
26924#ifndef RIPPER
26925VALUE
26926rb_parser_reg_compile(struct parser_params* p, VALUE str, int options)
26927{
26928 return rb_reg_compile(str, options & RE_OPTION_MASK, p->ruby_sourcefile, p->ruby_sourceline);
26929}
26930#endif
26931
26932static VALUE
26933reg_compile(struct parser_params* p, rb_parser_string_t *str, int options)
26934{
26935 VALUE re;
26936 VALUE err;
26937
26938 err = rb_errinfo();
26939 re = parser_reg_compile(p, str, options);
26940 if (NIL_P(re)) {
26941 VALUE m = rb_attr_get(rb_errinfo(), idMesg);
26942 rb_set_errinfo(err);
26943 compile_error(p, "%"PRIsVALUE, m);
26944 return Qnil;
26945 }
26946 return re;
26947}
26948
26949#ifndef RIPPER
26950void
26951rb_ruby_parser_set_options(struct parser_params *p, int print, int loop, int chomp, int split)
26952{
26953 p->do_print = print;
26954 p->do_loop = loop;
26955 p->do_chomp = chomp;
26956 p->do_split = split;
26957}
26958
26959static NODE *
26960parser_append_options(struct parser_params *p, NODE *node)
26961{
26962 static const YYLTYPE default_location = {{1, 0}, {1, 0}};
26963 const YYLTYPE *const LOC = &default_location;
26964
26965 if (p->do_print) {
26966 NODE *print = (NODE *)NEW_FCALL(rb_intern("print"),
26967 NEW_LIST(NEW_GVAR(idLASTLINE, LOC), LOC),
26968 LOC);
26969 node = block_append(p, node, print);
26970 }
26971
26972 if (p->do_loop) {
26973 NODE *irs = NEW_LIST(NEW_GVAR(rb_intern("$/"), LOC), LOC);
26974
26975 if (p->do_split) {
26976 ID ifs = rb_intern("$;");
26977 ID fields = rb_intern("$F");
26978 NODE *args = NEW_LIST(NEW_GVAR(ifs, LOC), LOC);
26979 NODE *split = NEW_GASGN(fields,
26980 NEW_CALL(NEW_GVAR(idLASTLINE, LOC),
26981 rb_intern("split"), args, LOC),
26982 LOC);
26983 node = block_append(p, split, node);
26984 }
26985 if (p->do_chomp) {
26986 NODE *chomp = NEW_SYM(rb_str_new_cstr("chomp"), LOC);
26987 chomp = list_append(p, NEW_LIST(chomp, LOC), NEW_TRUE(LOC));
26988 irs = list_append(p, irs, NEW_HASH(chomp, LOC));
26989 }
26990
26991 node = NEW_WHILE((NODE *)NEW_FCALL(idGets, irs, LOC), node, 1, LOC, &NULL_LOC, &NULL_LOC);
26992 }
26993
26994 return node;
26995}
26996
26997void
26998rb_init_parse(void)
26999{
27000 /* just to suppress unused-function warnings */
27001 (void)nodetype;
27002 (void)nodeline;
27003}
27004
27005ID
27006internal_id(struct parser_params *p)
27007{
27008 return rb_make_temporary_id(vtable_size(p->lvtbl->args) + vtable_size(p->lvtbl->vars));
27009}
27010#endif /* !RIPPER */
27011
27012static void
27013parser_initialize(struct parser_params *p)
27014{
27015 /* note: we rely on TypedData_Make_Struct to set most fields to 0 */
27016 p->command_start = TRUE;
27017 p->ruby_sourcefile_string = Qnil;
27018 p->lex.lpar_beg = -1; /* make lambda_beginning_p() == FALSE at first */
27019 string_buffer_init(p);
27020 p->node_id = 0;
27021 p->delayed.token = NULL;
27022 p->frozen_string_literal = -1; /* not specified */
27023#ifndef RIPPER
27024 p->error_buffer = Qfalse;
27025 p->end_expect_token_locations = NULL;
27026 p->token_id = 0;
27027 p->tokens = NULL;
27028#else
27029 p->result = Qnil;
27030 p->parsing_thread = Qnil;
27031 p->s_value = Qnil;
27032 p->s_lvalue = Qnil;
27033 p->s_value_stack = rb_ary_new();
27034#endif
27035 p->debug_buffer = Qnil;
27036 p->debug_output = rb_ractor_stdout();
27037 p->enc = rb_utf8_encoding();
27038 p->exits = 0;
27039}
27040
27041#ifdef RIPPER
27042#define rb_ruby_parser_mark ripper_parser_mark
27043#define rb_ruby_parser_free ripper_parser_free
27044#define rb_ruby_parser_memsize ripper_parser_memsize
27045#endif
27046
27047void
27048rb_ruby_parser_mark(void *ptr)
27049{
27050 struct parser_params *p = (struct parser_params*)ptr;
27051
27052 rb_gc_mark(p->ruby_sourcefile_string);
27053#ifndef RIPPER
27054 rb_gc_mark(p->error_buffer);
27055#else
27056 rb_gc_mark(p->value);
27057 rb_gc_mark(p->result);
27058 rb_gc_mark(p->parsing_thread);
27059 rb_gc_mark(p->s_value);
27060 rb_gc_mark(p->s_lvalue);
27061 rb_gc_mark(p->s_value_stack);
27062#endif
27063 rb_gc_mark(p->debug_buffer);
27064 rb_gc_mark(p->debug_output);
27065}
27066
27067void
27068rb_ruby_parser_free(void *ptr)
27069{
27070 struct parser_params *p = (struct parser_params*)ptr;
27071 struct local_vars *local, *prev;
27072
27073 if (p->ast) {
27074 rb_ast_free(p->ast);
27075 }
27076
27077 if (p->warn_duplicate_keys_table) {
27078 st_free_table(p->warn_duplicate_keys_table);
27079 }
27080
27081#ifndef RIPPER
27082 if (p->tokens) {
27083 rb_parser_ary_free(p, p->tokens);
27084 }
27085#endif
27086
27087 if (p->tokenbuf) {
27088 ruby_sized_xfree(p->tokenbuf, p->toksiz);
27089 }
27090
27091 for (local = p->lvtbl; local; local = prev) {
27092 prev = local->prev;
27093 local_free(p, local);
27094 }
27095
27096 {
27097 token_info *ptinfo;
27098 while ((ptinfo = p->token_info) != 0) {
27099 p->token_info = ptinfo->next;
27100 xfree(ptinfo);
27101 }
27102 }
27103 string_buffer_free(p);
27104
27105 if (p->pvtbl) {
27106 st_free_table(p->pvtbl);
27107 }
27108
27109 if (CASE_LABELS_ENABLED_P(p->case_labels)) {
27110 st_free_table(p->case_labels);
27111 }
27112
27113 xfree(p->lex.strterm);
27114 p->lex.strterm = 0;
27115
27116 xfree(ptr);
27117}
27118
27119size_t
27120rb_ruby_parser_memsize(const void *ptr)
27121{
27122 struct parser_params *p = (struct parser_params*)ptr;
27123 struct local_vars *local;
27124 size_t size = sizeof(*p);
27125
27126 size += p->toksiz;
27127 for (local = p->lvtbl; local; local = local->prev) {
27128 size += sizeof(*local);
27129 if (local->vars) size += local->vars->capa * sizeof(ID);
27130 }
27131 return size;
27132}
27133
27134#ifndef RIPPER
27135#undef rb_reserved_word
27136
27137const struct kwtable *
27138rb_reserved_word(const char *str, unsigned int len)
27139{
27140 return reserved_word(str, len);
27141}
27142
27143#ifdef UNIVERSAL_PARSER
27145rb_ruby_parser_allocate(const rb_parser_config_t *config)
27146{
27147 /* parser_initialize expects fields to be set to 0 */
27148 rb_parser_t *p = (rb_parser_t *)config->calloc(1, sizeof(rb_parser_t));
27149 p->config = config;
27150 return p;
27151}
27152
27154rb_ruby_parser_new(const rb_parser_config_t *config)
27155{
27156 /* parser_initialize expects fields to be set to 0 */
27157 rb_parser_t *p = rb_ruby_parser_allocate(config);
27158 parser_initialize(p);
27159 return p;
27160}
27161#else
27163rb_ruby_parser_allocate(void)
27164{
27165 /* parser_initialize expects fields to be set to 0 */
27166 rb_parser_t *p = (rb_parser_t *)ruby_xcalloc(1, sizeof(rb_parser_t));
27167 return p;
27168}
27169
27171rb_ruby_parser_new(void)
27172{
27173 /* parser_initialize expects fields to be set to 0 */
27174 rb_parser_t *p = rb_ruby_parser_allocate();
27175 parser_initialize(p);
27176 return p;
27177}
27178#endif
27179
27181rb_ruby_parser_set_context(rb_parser_t *p, const struct rb_iseq_struct *base, int main)
27182{
27183 p->error_buffer = main ? Qfalse : Qnil;
27184 p->parent_iseq = base;
27185 return p;
27186}
27187
27188void
27189rb_ruby_parser_set_script_lines(rb_parser_t *p)
27190{
27191 p->debug_lines = rb_parser_ary_new_capa_for_script_line(p, 10);
27192}
27193
27194void
27195rb_ruby_parser_error_tolerant(rb_parser_t *p)
27196{
27197 p->error_tolerant = 1;
27198}
27199
27200void
27201rb_ruby_parser_keep_tokens(rb_parser_t *p)
27202{
27203 p->keep_tokens = 1;
27204 p->tokens = rb_parser_ary_new_capa_for_ast_token(p, 10);
27205}
27206
27208rb_ruby_parser_encoding(rb_parser_t *p)
27209{
27210 return p->enc;
27211}
27212
27213int
27214rb_ruby_parser_end_seen_p(rb_parser_t *p)
27215{
27216 return p->ruby__end__seen;
27217}
27218
27219int
27220rb_ruby_parser_set_yydebug(rb_parser_t *p, int flag)
27221{
27222 p->debug = flag;
27223 return flag;
27224}
27225#endif /* !RIPPER */
27226
27227#ifdef RIPPER
27228int
27229rb_ruby_parser_get_yydebug(rb_parser_t *p)
27230{
27231 return p->debug;
27232}
27233
27234void
27235rb_ruby_parser_set_value(rb_parser_t *p, VALUE value)
27236{
27237 p->value = value;
27238}
27239
27240int
27241rb_ruby_parser_error_p(rb_parser_t *p)
27242{
27243 return p->error_p;
27244}
27245
27246VALUE
27247rb_ruby_parser_debug_output(rb_parser_t *p)
27248{
27249 return p->debug_output;
27250}
27251
27252void
27253rb_ruby_parser_set_debug_output(rb_parser_t *p, VALUE output)
27254{
27255 p->debug_output = output;
27256}
27257
27258VALUE
27259rb_ruby_parser_parsing_thread(rb_parser_t *p)
27260{
27261 return p->parsing_thread;
27262}
27263
27264void
27265rb_ruby_parser_set_parsing_thread(rb_parser_t *p, VALUE parsing_thread)
27266{
27267 p->parsing_thread = parsing_thread;
27268}
27269
27270void
27271rb_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)
27272{
27273 p->lex.gets = gets;
27274 p->lex.input = input;
27275 p->eofp = 0;
27276 p->ruby_sourcefile_string = sourcefile_string;
27277 p->ruby_sourcefile = sourcefile;
27278 p->ruby_sourceline = sourceline;
27279}
27280
27281VALUE
27282rb_ruby_parser_result(rb_parser_t *p)
27283{
27284 return p->result;
27285}
27286
27288rb_ruby_parser_enc(rb_parser_t *p)
27289{
27290 return p->enc;
27291}
27292
27293VALUE
27294rb_ruby_parser_ruby_sourcefile_string(rb_parser_t *p)
27295{
27296 return p->ruby_sourcefile_string;
27297}
27298
27299int
27300rb_ruby_parser_ruby_sourceline(rb_parser_t *p)
27301{
27302 return p->ruby_sourceline;
27303}
27304
27305int
27306rb_ruby_parser_lex_state(rb_parser_t *p)
27307{
27308 return p->lex.state;
27309}
27310
27311void
27312rb_ruby_ripper_parse0(rb_parser_t *p)
27313{
27314 parser_prepare(p);
27315 p->ast = rb_ast_new();
27316 ripper_yyparse((void*)p);
27317 rb_ast_free(p->ast);
27318 p->ast = 0;
27319 p->eval_tree = 0;
27320 p->eval_tree_begin = 0;
27321}
27322
27323int
27324rb_ruby_ripper_dedent_string(rb_parser_t *p, rb_parser_string_t *string, int width)
27325{
27326 return dedent_string(p, string, width);
27327}
27328
27329int
27330rb_ruby_ripper_initialized_p(rb_parser_t *p)
27331{
27332 return p->lex.input != 0;
27333}
27334
27335void
27336rb_ruby_ripper_parser_initialize(rb_parser_t *p)
27337{
27338 parser_initialize(p);
27339}
27340
27341long
27342rb_ruby_ripper_column(rb_parser_t *p)
27343{
27344 return p->lex.ptok - p->lex.pbeg;
27345}
27346
27347long
27348rb_ruby_ripper_token_len(rb_parser_t *p)
27349{
27350 return p->lex.pcur - p->lex.ptok;
27351}
27352
27354rb_ruby_ripper_lex_lastline(rb_parser_t *p)
27355{
27356 return p->lex.lastline;
27357}
27358
27359VALUE
27360rb_ruby_ripper_lex_state_name(struct parser_params *p, int state)
27361{
27362 return rb_parser_lex_state_name(p, (enum lex_state_e)state);
27363}
27364
27365#ifdef UNIVERSAL_PARSER
27367rb_ripper_parser_params_allocate(const rb_parser_config_t *config)
27368{
27369 rb_parser_t *p = (rb_parser_t *)config->calloc(1, sizeof(rb_parser_t));
27370 p->config = config;
27371 return p;
27372}
27373#endif
27374
27375struct parser_params*
27376rb_ruby_ripper_parser_allocate(void)
27377{
27378 return (struct parser_params *)ruby_xcalloc(1, sizeof(struct parser_params));
27379}
27380#endif /* RIPPER */
27381
27382#ifndef RIPPER
27383void
27384rb_parser_printf(struct parser_params *p, const char *fmt, ...)
27385{
27386 va_list ap;
27387 VALUE mesg = p->debug_buffer;
27388
27389 if (NIL_P(mesg)) p->debug_buffer = mesg = rb_str_new(0, 0);
27390 va_start(ap, fmt);
27391 rb_str_vcatf(mesg, fmt, ap);
27392 va_end(ap);
27393 if (char_at_end(p, mesg, 0) == '\n') {
27394 rb_io_write(p->debug_output, mesg);
27395 p->debug_buffer = Qnil;
27396 }
27397}
27398
27399static void
27400parser_compile_error(struct parser_params *p, const rb_code_location_t *loc, const char *fmt, ...)
27401{
27402 va_list ap;
27403 int lineno, column;
27404
27405 if (loc) {
27406 lineno = loc->end_pos.lineno;
27407 column = loc->end_pos.column;
27408 }
27409 else {
27410 lineno = p->ruby_sourceline;
27411 column = rb_long2int(p->lex.pcur - p->lex.pbeg);
27412 }
27413
27414 rb_io_flush(p->debug_output);
27415 p->error_p = 1;
27416 va_start(ap, fmt);
27417 p->error_buffer =
27418 rb_syntax_error_append(p->error_buffer,
27419 p->ruby_sourcefile_string,
27420 lineno, column,
27421 p->enc, fmt, ap);
27422 va_end(ap);
27423}
27424
27425static size_t
27426count_char(const char *str, int c)
27427{
27428 int n = 0;
27429 while (str[n] == c) ++n;
27430 return n;
27431}
27432
27433/*
27434 * strip enclosing double-quotes, same as the default yytnamerr except
27435 * for that single-quotes matching back-quotes do not stop stripping.
27436 *
27437 * "\"`class' keyword\"" => "`class' keyword"
27438 */
27439size_t
27440rb_yytnamerr(struct parser_params *p, char *yyres, const char *yystr)
27441{
27442 if (*yystr == '"') {
27443 size_t yyn = 0, bquote = 0;
27444 const char *yyp = yystr;
27445
27446 while (*++yyp) {
27447 switch (*yyp) {
27448 case '\'':
27449 if (!bquote) {
27450 bquote = count_char(yyp+1, '\'') + 1;
27451 if (yyres) memcpy(&yyres[yyn], yyp, bquote);
27452 yyn += bquote;
27453 yyp += bquote - 1;
27454 break;
27455 }
27456 else {
27457 if (bquote && count_char(yyp+1, '\'') + 1 == bquote) {
27458 if (yyres) memcpy(yyres + yyn, yyp, bquote);
27459 yyn += bquote;
27460 yyp += bquote - 1;
27461 bquote = 0;
27462 break;
27463 }
27464 if (yyp[1] && yyp[1] != '\'' && yyp[2] == '\'') {
27465 if (yyres) memcpy(yyres + yyn, yyp, 3);
27466 yyn += 3;
27467 yyp += 2;
27468 break;
27469 }
27470 goto do_not_strip_quotes;
27471 }
27472
27473 case ',':
27474 goto do_not_strip_quotes;
27475
27476 case '\\':
27477 if (*++yyp != '\\')
27478 goto do_not_strip_quotes;
27479 /* Fall through. */
27480 default:
27481 if (yyres)
27482 yyres[yyn] = *yyp;
27483 yyn++;
27484 break;
27485
27486 case '"':
27487 case '\0':
27488 if (yyres)
27489 yyres[yyn] = '\0';
27490 return yyn;
27491 }
27492 }
27493 do_not_strip_quotes: ;
27494 }
27495
27496 if (!yyres) return strlen(yystr);
27497
27498 return (YYSIZE_T)(yystpcpy(yyres, yystr) - yyres);
27499}
27500#endif
27501
27502#ifdef RIPPER
27503#define validate(x) (void)(x)
27504
27505static VALUE
27506ripper_dispatch0(struct parser_params *p, ID mid)
27507{
27508 return rb_funcall(p->value, mid, 0);
27509}
27510
27511static VALUE
27512ripper_dispatch1(struct parser_params *p, ID mid, VALUE a)
27513{
27514 validate(a);
27515 return rb_funcall(p->value, mid, 1, a);
27516}
27517
27518static VALUE
27519ripper_dispatch2(struct parser_params *p, ID mid, VALUE a, VALUE b)
27520{
27521 validate(a);
27522 validate(b);
27523 return rb_funcall(p->value, mid, 2, a, b);
27524}
27525
27526static VALUE
27527ripper_dispatch3(struct parser_params *p, ID mid, VALUE a, VALUE b, VALUE c)
27528{
27529 validate(a);
27530 validate(b);
27531 validate(c);
27532 return rb_funcall(p->value, mid, 3, a, b, c);
27533}
27534
27535static VALUE
27536ripper_dispatch4(struct parser_params *p, ID mid, VALUE a, VALUE b, VALUE c, VALUE d)
27537{
27538 validate(a);
27539 validate(b);
27540 validate(c);
27541 validate(d);
27542 return rb_funcall(p->value, mid, 4, a, b, c, d);
27543}
27544
27545static VALUE
27546ripper_dispatch5(struct parser_params *p, ID mid, VALUE a, VALUE b, VALUE c, VALUE d, VALUE e)
27547{
27548 validate(a);
27549 validate(b);
27550 validate(c);
27551 validate(d);
27552 validate(e);
27553 return rb_funcall(p->value, mid, 5, a, b, c, d, e);
27554}
27555
27556static VALUE
27557ripper_dispatch7(struct parser_params *p, ID mid, VALUE a, VALUE b, VALUE c, VALUE d, VALUE e, VALUE f, VALUE g)
27558{
27559 validate(a);
27560 validate(b);
27561 validate(c);
27562 validate(d);
27563 validate(e);
27564 validate(f);
27565 validate(g);
27566 return rb_funcall(p->value, mid, 7, a, b, c, d, e, f, g);
27567}
27568
27569void
27570ripper_error(struct parser_params *p)
27571{
27572 p->error_p = TRUE;
27573}
27574
27575VALUE
27576ripper_value(struct parser_params *p)
27577{
27578 (void)yystpcpy; /* may not used in newer bison */
27579
27580 return p->value;
27581}
27582
27583#endif /* RIPPER */
27584/*
27585 * Local variables:
27586 * mode: c
27587 * c-file-style: "ruby"
27588 * End:
27589 */
#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:660
#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:1416
VALUE rb_eSyntaxError
SyntaxError exception.
Definition error.c:1435
VALUE rb_class_new_instance(int argc, const VALUE *argv, VALUE klass)
Allocates, then initialises an instance of the given class.
Definition object.c:2326
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:814
VALUE rb_funcall(VALUE recv, ID mid, int n,...)
Calls a method.
Definition vm_eval.c:1117
VALUE rb_ary_new(void)
Allocates a new, empty array.
VALUE rb_ary_pop(VALUE ary)
Destructively deletes an element from the end of the passed array and returns what was deleted.
VALUE rb_ary_push(VALUE ary, VALUE elem)
Special case of rb_ary_cat() that it adds only one element.
VALUE rb_ary_entry(VALUE ary, long off)
Queries an element of an array.
#define rb_str_new(str, len)
Allocates an instance of rb_cString.
Definition string.h: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:3586
#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:981
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.