Ruby 3.4.4p34 (2025-05-14 revision a38531fd3f617bf734ef7d6c595325f69985ea1d)
parse.c
1/* A Bison parser, made by Lrama 0.6.11. */
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 parse_isalpha(c) || parse_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 parse_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 BITFIELD(enum rb_parser_shareability, shareable_constant_value, 2);
375 BITFIELD(enum rescue_context, in_rescue, 2);
376 unsigned int cant_return: 1;
377};
378
379typedef struct RNode_DEF_TEMP rb_node_def_temp_t;
380
381#if defined(__GNUC__) && !defined(__clang__)
382// Suppress "parameter passing for argument of type 'struct
383// lex_context' changed" notes. `struct lex_context` is file scope,
384// and has no ABI compatibility issue.
388// Not sure why effective even after popped.
389#endif
390
391#include "parse.h"
392
393#define NO_LEX_CTXT (struct lex_context){0}
394
395#ifndef WARN_PAST_SCOPE
396# define WARN_PAST_SCOPE 0
397#endif
398
399#define TAB_WIDTH 8
400
401#define yydebug (p->debug) /* disable the global variable definition */
402
403#define YYFPRINTF(out, ...) rb_parser_printf(p, __VA_ARGS__)
404#define YY_LOCATION_PRINT(File, loc, p) \
405 rb_parser_printf(p, "%d.%d-%d.%d", \
406 (loc).beg_pos.lineno, (loc).beg_pos.column,\
407 (loc).end_pos.lineno, (loc).end_pos.column)
408#define YYLLOC_DEFAULT(Current, Rhs, N) \
409 do \
410 if (N) \
411 { \
412 (Current).beg_pos = YYRHSLOC(Rhs, 1).beg_pos; \
413 (Current).end_pos = YYRHSLOC(Rhs, N).end_pos; \
414 } \
415 else \
416 { \
417 (Current).beg_pos = YYRHSLOC(Rhs, 0).end_pos; \
418 (Current).end_pos = YYRHSLOC(Rhs, 0).end_pos; \
419 } \
420 while (0)
421#define YY_(Msgid) \
422 (((Msgid)[0] == 'm') && (strcmp((Msgid), "memory exhausted") == 0) ? \
423 "nesting too deep" : (Msgid))
424
425#define RUBY_SET_YYLLOC_FROM_STRTERM_HEREDOC(Current) \
426 rb_parser_set_location_from_strterm_heredoc(p, &p->lex.strterm->u.heredoc, &(Current))
427#define RUBY_SET_YYLLOC_OF_DELAYED_TOKEN(Current) \
428 rb_parser_set_location_of_delayed_token(p, &(Current))
429#define RUBY_SET_YYLLOC_OF_HEREDOC_END(Current) \
430 rb_parser_set_location_of_heredoc_end(p, &(Current))
431#define RUBY_SET_YYLLOC_OF_DUMMY_END(Current) \
432 rb_parser_set_location_of_dummy_end(p, &(Current))
433#define RUBY_SET_YYLLOC_OF_NONE(Current) \
434 rb_parser_set_location_of_none(p, &(Current))
435#define RUBY_SET_YYLLOC(Current) \
436 rb_parser_set_location(p, &(Current))
437#define RUBY_INIT_YYLLOC() \
438 { \
439 {p->ruby_sourceline, (int)(p->lex.ptok - p->lex.pbeg)}, \
440 {p->ruby_sourceline, (int)(p->lex.pcur - p->lex.pbeg)}, \
441 }
442
443#define IS_lex_state_for(x, ls) ((x) & (ls))
444#define IS_lex_state_all_for(x, ls) (((x) & (ls)) == (ls))
445#define IS_lex_state(ls) IS_lex_state_for(p->lex.state, (ls))
446#define IS_lex_state_all(ls) IS_lex_state_all_for(p->lex.state, (ls))
447
448# define SET_LEX_STATE(ls) \
449 parser_set_lex_state(p, ls, __LINE__)
450static inline enum lex_state_e parser_set_lex_state(struct parser_params *p, enum lex_state_e ls, int line);
451
452typedef VALUE stack_type;
453
454static const rb_code_location_t NULL_LOC = { {0, -1}, {0, -1} };
455
456# define SHOW_BITSTACK(stack, name) (p->debug ? rb_parser_show_bitstack(p, stack, name, __LINE__) : (void)0)
457# define BITSTACK_PUSH(stack, n) (((p->stack) = ((p->stack)<<1)|((n)&1)), SHOW_BITSTACK(p->stack, #stack"(push)"))
458# define BITSTACK_POP(stack) (((p->stack) = (p->stack) >> 1), SHOW_BITSTACK(p->stack, #stack"(pop)"))
459# define BITSTACK_SET_P(stack) (SHOW_BITSTACK(p->stack, #stack), (p->stack)&1)
460# define BITSTACK_SET(stack, n) ((p->stack)=(n), SHOW_BITSTACK(p->stack, #stack"(set)"))
461
462/* A flag to identify keyword_do_cond, "do" keyword after condition expression.
463 Examples: `while ... do`, `until ... do`, and `for ... in ... do` */
464#define COND_PUSH(n) BITSTACK_PUSH(cond_stack, (n))
465#define COND_POP() BITSTACK_POP(cond_stack)
466#define COND_P() BITSTACK_SET_P(cond_stack)
467#define COND_SET(n) BITSTACK_SET(cond_stack, (n))
468
469/* A flag to identify keyword_do_block; "do" keyword after command_call.
470 Example: `foo 1, 2 do`. */
471#define CMDARG_PUSH(n) BITSTACK_PUSH(cmdarg_stack, (n))
472#define CMDARG_POP() BITSTACK_POP(cmdarg_stack)
473#define CMDARG_P() BITSTACK_SET_P(cmdarg_stack)
474#define CMDARG_SET(n) BITSTACK_SET(cmdarg_stack, (n))
475
476struct vtable {
477 ID *tbl;
478 int pos;
479 int capa;
480 struct vtable *prev;
481};
482
484 struct vtable *args;
485 struct vtable *vars;
486 struct vtable *used;
487# if WARN_PAST_SCOPE
488 struct vtable *past;
489# endif
490 struct local_vars *prev;
491 struct {
492 NODE *outer, *inner, *current;
493 } numparam;
494 NODE *it;
495};
496
497enum {
498 ORDINAL_PARAM = -1,
499 NO_PARAM = 0,
500 NUMPARAM_MAX = 9,
501};
502
503#define DVARS_INHERIT ((void*)1)
504#define DVARS_TOPSCOPE NULL
505#define DVARS_TERMINAL_P(tbl) ((tbl) == DVARS_INHERIT || (tbl) == DVARS_TOPSCOPE)
506
507typedef struct token_info {
508 const char *token;
509 rb_code_position_t beg;
510 int indent;
511 int nonspc;
512 struct token_info *next;
513} token_info;
514
516 const rb_code_position_t *pos;
517 struct end_expect_token_locations *prev;
518} end_expect_token_locations_t;
519
521 struct parser_string_buffer_elem *next;
522 long len; /* Total length of allocated buf */
523 long used; /* Current usage of buf */
524 rb_parser_string_t *buf[FLEX_ARY_LEN];
525} parser_string_buffer_elem_t;
526
527typedef struct parser_string_buffer {
528 parser_string_buffer_elem_t *head;
529 parser_string_buffer_elem_t *last;
530} parser_string_buffer_t;
531
532#define AFTER_HEREDOC_WITHOUT_TERMINTOR ((rb_parser_string_t *)1)
533
534/*
535 Structure of Lexer Buffer:
536
537 lex.pbeg lex.ptok lex.pcur lex.pend
538 | | | |
539 |------------+------------+------------|
540 |<---------->|
541 token
542*/
544 YYSTYPE *lval;
545 YYLTYPE *yylloc;
546
547 struct {
548 rb_strterm_t *strterm;
549 rb_parser_lex_gets_func *gets;
550 rb_parser_input_data input;
551 parser_string_buffer_t string_buffer;
552 rb_parser_string_t *lastline;
553 rb_parser_string_t *nextline;
554 const char *pbeg;
555 const char *pcur;
556 const char *pend;
557 const char *ptok;
558 enum lex_state_e state;
559 /* track the nest level of any parens "()[]{}" */
560 int paren_nest;
561 /* keep p->lex.paren_nest at the beginning of lambda "->" to detect tLAMBEG and keyword_do_LAMBDA */
562 int lpar_beg;
563 /* track the nest level of only braces "{}" */
564 int brace_nest;
565 } lex;
566 stack_type cond_stack;
567 stack_type cmdarg_stack;
568 int tokidx;
569 int toksiz;
570 int heredoc_end;
571 int heredoc_indent;
572 int heredoc_line_indent;
573 char *tokenbuf;
574 struct local_vars *lvtbl;
575 st_table *pvtbl;
576 st_table *pktbl;
577 int line_count;
578 int ruby_sourceline; /* current line no. */
579 const char *ruby_sourcefile; /* current source file */
580 VALUE ruby_sourcefile_string;
581 rb_encoding *enc;
582 token_info *token_info;
583 st_table *case_labels;
584 rb_node_exits_t *exits;
585
586 VALUE debug_buffer;
587 VALUE debug_output;
588
589 struct {
590 rb_parser_string_t *token;
591 int beg_line;
592 int beg_col;
593 int end_line;
594 int end_col;
595 } delayed;
596
597 rb_ast_t *ast;
598 int node_id;
599
600 st_table *warn_duplicate_keys_table;
601
602 int max_numparam;
603 ID it_id;
604
605 struct lex_context ctxt;
606
607 NODE *eval_tree_begin;
608 NODE *eval_tree;
609 const struct rb_iseq_struct *parent_iseq;
610
611#ifdef UNIVERSAL_PARSER
612 const rb_parser_config_t *config;
613#endif
614 /* compile_option */
615 signed int frozen_string_literal:2; /* -1: not specified, 0: false, 1: true */
616
617 unsigned int command_start:1;
618 unsigned int eofp: 1;
619 unsigned int ruby__end__seen: 1;
620 unsigned int debug: 1;
621 unsigned int has_shebang: 1;
622 unsigned int token_seen: 1;
623 unsigned int token_info_enabled: 1;
624# if WARN_PAST_SCOPE
625 unsigned int past_scope_enabled: 1;
626# endif
627 unsigned int error_p: 1;
628 unsigned int cr_seen: 1;
629
630#ifndef RIPPER
631 /* Ruby core only */
632
633 unsigned int do_print: 1;
634 unsigned int do_loop: 1;
635 unsigned int do_chomp: 1;
636 unsigned int do_split: 1;
637 unsigned int error_tolerant: 1;
638 unsigned int keep_tokens: 1;
639
640 VALUE error_buffer;
641 rb_parser_ary_t *debug_lines;
642 /*
643 * Store specific keyword locations to generate dummy end token.
644 * Refer to the tail of list element.
645 */
646 end_expect_token_locations_t *end_expect_token_locations;
647 /* id for terms */
648 int token_id;
649 /* Array for term tokens */
650 rb_parser_ary_t *tokens;
651#else
652 /* Ripper only */
653
654 VALUE value;
655 VALUE result;
656 VALUE parsing_thread;
657 VALUE s_value; /* Token VALUE */
658 VALUE s_lvalue; /* VALUE generated by rule action (reduce) */
659 VALUE s_value_stack;
660#endif
661};
662
663#define NUMPARAM_ID_P(id) numparam_id_p(p, id)
664#define NUMPARAM_ID_TO_IDX(id) (unsigned int)(((id) >> ID_SCOPE_SHIFT) - (tNUMPARAM_1 - 1))
665#define NUMPARAM_IDX_TO_ID(idx) TOKEN2LOCALID((tNUMPARAM_1 - 1 + (idx)))
666static int
667numparam_id_p(struct parser_params *p, ID id)
668{
669 if (!is_local_id(id) || id < (tNUMPARAM_1 << ID_SCOPE_SHIFT)) return 0;
670 unsigned int idx = NUMPARAM_ID_TO_IDX(id);
671 return idx > 0 && idx <= NUMPARAM_MAX;
672}
673static void numparam_name(struct parser_params *p, ID id);
674
675#ifdef RIPPER
676static void
677after_shift(struct parser_params *p)
678{
679 if (p->debug) {
680 rb_parser_printf(p, "after-shift: %+"PRIsVALUE"\n", p->s_value);
681 }
682 rb_ary_push(p->s_value_stack, p->s_value);
683 p->s_value = Qnil;
684}
685
686static void
687before_reduce(int len, struct parser_params *p)
688{
689 // Initialize $$ with $1.
690 if (len) p->s_lvalue = rb_ary_entry(p->s_value_stack, -len);
691}
692
693static void
694after_reduce(int len, struct parser_params *p)
695{
696 for (int i = 0; i < len; i++) {
697 VALUE tos = rb_ary_pop(p->s_value_stack);
698 if (p->debug) {
699 rb_parser_printf(p, "after-reduce pop: %+"PRIsVALUE"\n", tos);
700 }
701 }
702 if (p->debug) {
703 rb_parser_printf(p, "after-reduce push: %+"PRIsVALUE"\n", p->s_lvalue);
704 }
705 rb_ary_push(p->s_value_stack, p->s_lvalue);
706 p->s_lvalue = Qnil;
707}
708
709static void
710after_shift_error_token(struct parser_params *p)
711{
712 if (p->debug) {
713 rb_parser_printf(p, "after-shift-error-token:\n");
714 }
715 rb_ary_push(p->s_value_stack, Qnil);
716}
717
718static void
719after_pop_stack(int len, struct parser_params *p)
720{
721 for (int i = 0; i < len; i++) {
722 VALUE tos = rb_ary_pop(p->s_value_stack);
723 if (p->debug) {
724 rb_parser_printf(p, "after-pop-stack pop: %+"PRIsVALUE"\n", tos);
725 }
726 }
727}
728#else
729static void
730after_shift(struct parser_params *p)
731{
732}
733
734static void
735before_reduce(int len, struct parser_params *p)
736{
737}
738
739static void
740after_reduce(int len, struct parser_params *p)
741{
742}
743
744static void
745after_shift_error_token(struct parser_params *p)
746{
747}
748
749static void
750after_pop_stack(int len, struct parser_params *p)
751{
752}
753#endif
754
755#define intern_cstr(n,l,en) rb_intern3(n,l,en)
756
757#define STRING_NEW0() rb_parser_encoding_string_new(p,0,0,p->enc)
758
759#define STR_NEW(ptr,len) rb_enc_str_new((ptr),(len),p->enc)
760#define STR_NEW0() rb_enc_str_new(0,0,p->enc)
761#define STR_NEW2(ptr) rb_enc_str_new((ptr),strlen(ptr),p->enc)
762#define STR_NEW3(ptr,len,e,func) parser_str_new(p, (ptr),(len),(e),(func),p->enc)
763#define TOK_INTERN() intern_cstr(tok(p), toklen(p), p->enc)
764#define VALID_SYMNAME_P(s, l, enc, type) (rb_enc_symname_type(s, l, enc, (1U<<(type))) == (int)(type))
765
766#ifndef RIPPER
767static inline int
768char_at_end(struct parser_params *p, VALUE str, int when_empty)
769{
770 long len = RSTRING_LEN(str);
771 return len > 0 ? (unsigned char)RSTRING_PTR(str)[len-1] : when_empty;
772}
773#endif
774
775static void
776pop_pvtbl(struct parser_params *p, st_table *tbl)
777{
778 st_free_table(p->pvtbl);
779 p->pvtbl = tbl;
780}
781
782static void
783pop_pktbl(struct parser_params *p, st_table *tbl)
784{
785 if (p->pktbl) st_free_table(p->pktbl);
786 p->pktbl = tbl;
787}
788
789#define STRING_BUF_DEFAULT_LEN 16
790
791static void
792string_buffer_init(struct parser_params *p)
793{
794 parser_string_buffer_t *buf = &p->lex.string_buffer;
795 const size_t size = offsetof(parser_string_buffer_elem_t, buf) + sizeof(rb_parser_string_t *) * STRING_BUF_DEFAULT_LEN;
796
797 buf->head = buf->last = xmalloc(size);
798 buf->head->len = STRING_BUF_DEFAULT_LEN;
799 buf->head->used = 0;
800 buf->head->next = NULL;
801}
802
803static void
804string_buffer_append(struct parser_params *p, rb_parser_string_t *str)
805{
806 parser_string_buffer_t *buf = &p->lex.string_buffer;
807
808 if (buf->head->used >= buf->head->len) {
809 parser_string_buffer_elem_t *elem;
810 long n = buf->head->len * 2;
811 const size_t size = offsetof(parser_string_buffer_elem_t, buf) + sizeof(rb_parser_string_t *) * n;
812
813 elem = xmalloc(size);
814 elem->len = n;
815 elem->used = 0;
816 elem->next = NULL;
817 buf->last->next = elem;
818 buf->last = elem;
819 }
820 buf->last->buf[buf->last->used++] = str;
821}
822
823static void
824string_buffer_free(struct parser_params *p)
825{
826 parser_string_buffer_elem_t *elem = p->lex.string_buffer.head;
827
828 while (elem) {
829 parser_string_buffer_elem_t *next_elem = elem->next;
830
831 for (long i = 0; i < elem->used; i++) {
832 rb_parser_string_free(p, elem->buf[i]);
833 }
834
835 xfree(elem);
836 elem = next_elem;
837 }
838}
839
840#ifndef RIPPER
841static void flush_debug_buffer(struct parser_params *p, VALUE out, VALUE str);
842
843static void
844debug_end_expect_token_locations(struct parser_params *p, const char *name)
845{
846 if(p->debug) {
847 VALUE mesg = rb_sprintf("%s: [", name);
848 int i = 0;
849 for (end_expect_token_locations_t *loc = p->end_expect_token_locations; loc; loc = loc->prev) {
850 if (i > 0)
851 rb_str_cat_cstr(mesg, ", ");
852 rb_str_catf(mesg, "[%d, %d]", loc->pos->lineno, loc->pos->column);
853 i++;
854 }
855 rb_str_cat_cstr(mesg, "]\n");
856 flush_debug_buffer(p, p->debug_output, mesg);
857 }
858}
859
860static void
861push_end_expect_token_locations(struct parser_params *p, const rb_code_position_t *pos)
862{
863 if(!p->error_tolerant) return;
864
865 end_expect_token_locations_t *locations;
866 locations = ALLOC(end_expect_token_locations_t);
867 locations->pos = pos;
868 locations->prev = p->end_expect_token_locations;
869 p->end_expect_token_locations = locations;
870
871 debug_end_expect_token_locations(p, "push_end_expect_token_locations");
872}
873
874static void
875pop_end_expect_token_locations(struct parser_params *p)
876{
877 if(!p->end_expect_token_locations) return;
878
879 end_expect_token_locations_t *locations = p->end_expect_token_locations->prev;
880 ruby_sized_xfree(p->end_expect_token_locations, sizeof(end_expect_token_locations_t));
881 p->end_expect_token_locations = locations;
882
883 debug_end_expect_token_locations(p, "pop_end_expect_token_locations");
884}
885
886static end_expect_token_locations_t *
887peek_end_expect_token_locations(struct parser_params *p)
888{
889 return p->end_expect_token_locations;
890}
891
892static const char *
893parser_token2char(struct parser_params *p, enum yytokentype tok)
894{
895 switch ((int) tok) {
896#define TOKEN2CHAR(tok) case tok: return (#tok);
897#define TOKEN2CHAR2(tok, name) case tok: return (name);
898 TOKEN2CHAR2(' ', "word_sep");
899 TOKEN2CHAR2('!', "!")
900 TOKEN2CHAR2('%', "%");
901 TOKEN2CHAR2('&', "&");
902 TOKEN2CHAR2('*', "*");
903 TOKEN2CHAR2('+', "+");
904 TOKEN2CHAR2('-', "-");
905 TOKEN2CHAR2('/', "/");
906 TOKEN2CHAR2('<', "<");
907 TOKEN2CHAR2('=', "=");
908 TOKEN2CHAR2('>', ">");
909 TOKEN2CHAR2('?', "?");
910 TOKEN2CHAR2('^', "^");
911 TOKEN2CHAR2('|', "|");
912 TOKEN2CHAR2('~', "~");
913 TOKEN2CHAR2(':', ":");
914 TOKEN2CHAR2(',', ",");
915 TOKEN2CHAR2('.', ".");
916 TOKEN2CHAR2(';', ";");
917 TOKEN2CHAR2('`', "`");
918 TOKEN2CHAR2('\n', "nl");
919 TOKEN2CHAR2('{', "\"{\"");
920 TOKEN2CHAR2('}', "\"}\"");
921 TOKEN2CHAR2('[', "\"[\"");
922 TOKEN2CHAR2(']', "\"]\"");
923 TOKEN2CHAR2('(', "\"(\"");
924 TOKEN2CHAR2(')', "\")\"");
925 TOKEN2CHAR2('\\', "backslash");
926 TOKEN2CHAR(keyword_class);
927 TOKEN2CHAR(keyword_module);
928 TOKEN2CHAR(keyword_def);
929 TOKEN2CHAR(keyword_undef);
930 TOKEN2CHAR(keyword_begin);
931 TOKEN2CHAR(keyword_rescue);
932 TOKEN2CHAR(keyword_ensure);
933 TOKEN2CHAR(keyword_end);
934 TOKEN2CHAR(keyword_if);
935 TOKEN2CHAR(keyword_unless);
936 TOKEN2CHAR(keyword_then);
937 TOKEN2CHAR(keyword_elsif);
938 TOKEN2CHAR(keyword_else);
939 TOKEN2CHAR(keyword_case);
940 TOKEN2CHAR(keyword_when);
941 TOKEN2CHAR(keyword_while);
942 TOKEN2CHAR(keyword_until);
943 TOKEN2CHAR(keyword_for);
944 TOKEN2CHAR(keyword_break);
945 TOKEN2CHAR(keyword_next);
946 TOKEN2CHAR(keyword_redo);
947 TOKEN2CHAR(keyword_retry);
948 TOKEN2CHAR(keyword_in);
949 TOKEN2CHAR(keyword_do);
950 TOKEN2CHAR(keyword_do_cond);
951 TOKEN2CHAR(keyword_do_block);
952 TOKEN2CHAR(keyword_do_LAMBDA);
953 TOKEN2CHAR(keyword_return);
954 TOKEN2CHAR(keyword_yield);
955 TOKEN2CHAR(keyword_super);
956 TOKEN2CHAR(keyword_self);
957 TOKEN2CHAR(keyword_nil);
958 TOKEN2CHAR(keyword_true);
959 TOKEN2CHAR(keyword_false);
960 TOKEN2CHAR(keyword_and);
961 TOKEN2CHAR(keyword_or);
962 TOKEN2CHAR(keyword_not);
963 TOKEN2CHAR(modifier_if);
964 TOKEN2CHAR(modifier_unless);
965 TOKEN2CHAR(modifier_while);
966 TOKEN2CHAR(modifier_until);
967 TOKEN2CHAR(modifier_rescue);
968 TOKEN2CHAR(keyword_alias);
969 TOKEN2CHAR(keyword_defined);
970 TOKEN2CHAR(keyword_BEGIN);
971 TOKEN2CHAR(keyword_END);
972 TOKEN2CHAR(keyword__LINE__);
973 TOKEN2CHAR(keyword__FILE__);
974 TOKEN2CHAR(keyword__ENCODING__);
975 TOKEN2CHAR(tIDENTIFIER);
976 TOKEN2CHAR(tFID);
977 TOKEN2CHAR(tGVAR);
978 TOKEN2CHAR(tIVAR);
979 TOKEN2CHAR(tCONSTANT);
980 TOKEN2CHAR(tCVAR);
981 TOKEN2CHAR(tLABEL);
982 TOKEN2CHAR(tINTEGER);
983 TOKEN2CHAR(tFLOAT);
984 TOKEN2CHAR(tRATIONAL);
985 TOKEN2CHAR(tIMAGINARY);
986 TOKEN2CHAR(tCHAR);
987 TOKEN2CHAR(tNTH_REF);
988 TOKEN2CHAR(tBACK_REF);
989 TOKEN2CHAR(tSTRING_CONTENT);
990 TOKEN2CHAR(tREGEXP_END);
991 TOKEN2CHAR(tDUMNY_END);
992 TOKEN2CHAR(tSP);
993 TOKEN2CHAR(tUPLUS);
994 TOKEN2CHAR(tUMINUS);
995 TOKEN2CHAR(tPOW);
996 TOKEN2CHAR(tCMP);
997 TOKEN2CHAR(tEQ);
998 TOKEN2CHAR(tEQQ);
999 TOKEN2CHAR(tNEQ);
1000 TOKEN2CHAR(tGEQ);
1001 TOKEN2CHAR(tLEQ);
1002 TOKEN2CHAR(tANDOP);
1003 TOKEN2CHAR(tOROP);
1004 TOKEN2CHAR(tMATCH);
1005 TOKEN2CHAR(tNMATCH);
1006 TOKEN2CHAR(tDOT2);
1007 TOKEN2CHAR(tDOT3);
1008 TOKEN2CHAR(tBDOT2);
1009 TOKEN2CHAR(tBDOT3);
1010 TOKEN2CHAR(tAREF);
1011 TOKEN2CHAR(tASET);
1012 TOKEN2CHAR(tLSHFT);
1013 TOKEN2CHAR(tRSHFT);
1014 TOKEN2CHAR(tANDDOT);
1015 TOKEN2CHAR(tCOLON2);
1016 TOKEN2CHAR(tCOLON3);
1017 TOKEN2CHAR(tOP_ASGN);
1018 TOKEN2CHAR(tASSOC);
1019 TOKEN2CHAR(tLPAREN);
1020 TOKEN2CHAR(tLPAREN_ARG);
1021 TOKEN2CHAR(tRPAREN);
1022 TOKEN2CHAR(tLBRACK);
1023 TOKEN2CHAR(tLBRACE);
1024 TOKEN2CHAR(tLBRACE_ARG);
1025 TOKEN2CHAR(tSTAR);
1026 TOKEN2CHAR(tDSTAR);
1027 TOKEN2CHAR(tAMPER);
1028 TOKEN2CHAR(tLAMBDA);
1029 TOKEN2CHAR(tSYMBEG);
1030 TOKEN2CHAR(tSTRING_BEG);
1031 TOKEN2CHAR(tXSTRING_BEG);
1032 TOKEN2CHAR(tREGEXP_BEG);
1033 TOKEN2CHAR(tWORDS_BEG);
1034 TOKEN2CHAR(tQWORDS_BEG);
1035 TOKEN2CHAR(tSYMBOLS_BEG);
1036 TOKEN2CHAR(tQSYMBOLS_BEG);
1037 TOKEN2CHAR(tSTRING_END);
1038 TOKEN2CHAR(tSTRING_DEND);
1039 TOKEN2CHAR(tSTRING_DBEG);
1040 TOKEN2CHAR(tSTRING_DVAR);
1041 TOKEN2CHAR(tLAMBEG);
1042 TOKEN2CHAR(tLABEL_END);
1043 TOKEN2CHAR(tIGNORED_NL);
1044 TOKEN2CHAR(tCOMMENT);
1045 TOKEN2CHAR(tEMBDOC_BEG);
1046 TOKEN2CHAR(tEMBDOC);
1047 TOKEN2CHAR(tEMBDOC_END);
1048 TOKEN2CHAR(tHEREDOC_BEG);
1049 TOKEN2CHAR(tHEREDOC_END);
1050 TOKEN2CHAR(k__END__);
1051 TOKEN2CHAR(tLOWEST);
1052 TOKEN2CHAR(tUMINUS_NUM);
1053 TOKEN2CHAR(tLAST_TOKEN);
1054#undef TOKEN2CHAR
1055#undef TOKEN2CHAR2
1056 }
1057
1058 rb_bug("parser_token2id: unknown token %d", tok);
1059
1061}
1062#else
1063static void
1064push_end_expect_token_locations(struct parser_params *p, const rb_code_position_t *pos)
1065{
1066}
1067
1068static void
1069pop_end_expect_token_locations(struct parser_params *p)
1070{
1071}
1072#endif
1073
1074RBIMPL_ATTR_NONNULL((1, 2, 3))
1075static int parser_yyerror(struct parser_params*, const YYLTYPE *yylloc, const char*);
1076RBIMPL_ATTR_NONNULL((1, 2))
1077static int parser_yyerror0(struct parser_params*, const char*);
1078#define yyerror0(msg) parser_yyerror0(p, (msg))
1079#define yyerror1(loc, msg) parser_yyerror(p, (loc), (msg))
1080#define yyerror(yylloc, p, msg) parser_yyerror(p, yylloc, msg)
1081#define token_flush(ptr) ((ptr)->lex.ptok = (ptr)->lex.pcur)
1082#define lex_goto_eol(p) ((p)->lex.pcur = (p)->lex.pend)
1083#define lex_eol_p(p) lex_eol_n_p(p, 0)
1084#define lex_eol_n_p(p,n) lex_eol_ptr_n_p(p, (p)->lex.pcur, n)
1085#define lex_eol_ptr_p(p,ptr) lex_eol_ptr_n_p(p,ptr,0)
1086#define lex_eol_ptr_n_p(p,ptr,n) ((ptr)+(n) >= (p)->lex.pend)
1087
1088static void token_info_setup(token_info *ptinfo, const char *ptr, const rb_code_location_t *loc);
1089static void token_info_push(struct parser_params*, const char *token, const rb_code_location_t *loc);
1090static void token_info_pop(struct parser_params*, const char *token, const rb_code_location_t *loc);
1091static void token_info_warn(struct parser_params *p, const char *token, token_info *ptinfo_beg, int same, const rb_code_location_t *loc);
1092static void token_info_drop(struct parser_params *p, const char *token, rb_code_position_t beg_pos);
1093
1094#ifdef RIPPER
1095#define compile_for_eval (0)
1096#else
1097#define compile_for_eval (p->parent_iseq != 0)
1098#endif
1099
1100#define token_column ((int)(p->lex.ptok - p->lex.pbeg))
1101
1102#define CALL_Q_P(q) ((q) == tANDDOT)
1103#define NEW_QCALL(q,r,m,a,loc) (CALL_Q_P(q) ? NEW_QCALL0(r,m,a,loc) : NEW_CALL(r,m,a,loc))
1104
1105#define lambda_beginning_p() (p->lex.lpar_beg == p->lex.paren_nest)
1106
1107static enum yytokentype yylex(YYSTYPE*, YYLTYPE*, struct parser_params*);
1108
1109static inline void
1110rb_discard_node(struct parser_params *p, NODE *n)
1111{
1112 rb_ast_delete_node(p->ast, n);
1113}
1114
1115static rb_node_scope_t *rb_node_scope_new(struct parser_params *p, rb_node_args_t *nd_args, NODE *nd_body, const YYLTYPE *loc);
1116static 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, const YYLTYPE *loc);
1117static rb_node_block_t *rb_node_block_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc);
1118static rb_node_if_t *rb_node_if_new(struct parser_params *p, NODE *nd_cond, NODE *nd_body, NODE *nd_else, const YYLTYPE *loc);
1119static 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);
1120static 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);
1121static 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);
1122static 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);
1123static 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);
1124static rb_node_in_t *rb_node_in_new(struct parser_params *p, NODE *nd_head, NODE *nd_body, NODE *nd_next, const YYLTYPE *loc);
1125static 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);
1126static 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);
1127static rb_node_iter_t *rb_node_iter_new(struct parser_params *p, rb_node_args_t *nd_args, NODE *nd_body, const YYLTYPE *loc);
1128static rb_node_for_t *rb_node_for_new(struct parser_params *p, NODE *nd_iter, NODE *nd_body, const YYLTYPE *loc);
1129static rb_node_for_masgn_t *rb_node_for_masgn_new(struct parser_params *p, NODE *nd_var, const YYLTYPE *loc);
1130static rb_node_retry_t *rb_node_retry_new(struct parser_params *p, const YYLTYPE *loc);
1131static rb_node_begin_t *rb_node_begin_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc);
1132static rb_node_rescue_t *rb_node_rescue_new(struct parser_params *p, NODE *nd_head, NODE *nd_resq, NODE *nd_else, const YYLTYPE *loc);
1133static 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);
1134static rb_node_ensure_t *rb_node_ensure_new(struct parser_params *p, NODE *nd_head, NODE *nd_ensr, const YYLTYPE *loc);
1135static 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);
1136static 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);
1137static rb_node_masgn_t *rb_node_masgn_new(struct parser_params *p, NODE *nd_head, NODE *nd_args, const YYLTYPE *loc);
1138static rb_node_lasgn_t *rb_node_lasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc);
1139static rb_node_dasgn_t *rb_node_dasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc);
1140static rb_node_gasgn_t *rb_node_gasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc);
1141static rb_node_iasgn_t *rb_node_iasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc);
1142static 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);
1143static rb_node_cvasgn_t *rb_node_cvasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc);
1144static 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);
1145static 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);
1146static 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);
1147static 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);
1148static 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);
1149static rb_node_call_t *rb_node_call_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc);
1150static rb_node_opcall_t *rb_node_opcall_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc);
1151static rb_node_fcall_t *rb_node_fcall_new(struct parser_params *p, ID nd_mid, NODE *nd_args, const YYLTYPE *loc);
1152static rb_node_vcall_t *rb_node_vcall_new(struct parser_params *p, ID nd_mid, const YYLTYPE *loc);
1153static rb_node_qcall_t *rb_node_qcall_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc);
1154static rb_node_super_t *rb_node_super_new(struct parser_params *p, NODE *nd_args, const YYLTYPE *loc);
1155static rb_node_zsuper_t * rb_node_zsuper_new(struct parser_params *p, const YYLTYPE *loc);
1156static rb_node_list_t *rb_node_list_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc);
1157static rb_node_list_t *rb_node_list_new2(struct parser_params *p, NODE *nd_head, long nd_alen, NODE *nd_next, const YYLTYPE *loc);
1158static rb_node_zlist_t *rb_node_zlist_new(struct parser_params *p, const YYLTYPE *loc);
1159static rb_node_hash_t *rb_node_hash_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc);
1160static rb_node_return_t *rb_node_return_new(struct parser_params *p, NODE *nd_stts, const YYLTYPE *loc, const YYLTYPE *keyword_loc);
1161static rb_node_yield_t *rb_node_yield_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc);
1162static rb_node_lvar_t *rb_node_lvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc);
1163static rb_node_dvar_t *rb_node_dvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc);
1164static rb_node_gvar_t *rb_node_gvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc);
1165static rb_node_ivar_t *rb_node_ivar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc);
1166static rb_node_const_t *rb_node_const_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc);
1167static rb_node_cvar_t *rb_node_cvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc);
1168static rb_node_nth_ref_t *rb_node_nth_ref_new(struct parser_params *p, long nd_nth, const YYLTYPE *loc);
1169static rb_node_back_ref_t *rb_node_back_ref_new(struct parser_params *p, long nd_nth, const YYLTYPE *loc);
1170static rb_node_match2_t *rb_node_match2_new(struct parser_params *p, NODE *nd_recv, NODE *nd_value, const YYLTYPE *loc);
1171static rb_node_match3_t *rb_node_match3_new(struct parser_params *p, NODE *nd_recv, NODE *nd_value, const YYLTYPE *loc);
1172static rb_node_integer_t * rb_node_integer_new(struct parser_params *p, char* val, int base, const YYLTYPE *loc);
1173static rb_node_float_t * rb_node_float_new(struct parser_params *p, char* val, const YYLTYPE *loc);
1174static rb_node_rational_t * rb_node_rational_new(struct parser_params *p, char* val, int base, int seen_point, const YYLTYPE *loc);
1175static 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);
1176static rb_node_str_t *rb_node_str_new(struct parser_params *p, rb_parser_string_t *string, const YYLTYPE *loc);
1177static 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);
1178static rb_node_dstr_t *rb_node_dstr_new(struct parser_params *p, rb_parser_string_t *string, const YYLTYPE *loc);
1179static rb_node_xstr_t *rb_node_xstr_new(struct parser_params *p, rb_parser_string_t *string, const YYLTYPE *loc);
1180static 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);
1181static rb_node_evstr_t *rb_node_evstr_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc);
1182static rb_node_regx_t *rb_node_regx_new(struct parser_params *p, rb_parser_string_t *string, int options, const YYLTYPE *loc);
1183static rb_node_once_t *rb_node_once_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc);
1184static rb_node_args_t *rb_node_args_new(struct parser_params *p, const YYLTYPE *loc);
1185static rb_node_args_aux_t *rb_node_args_aux_new(struct parser_params *p, ID nd_pid, int nd_plen, const YYLTYPE *loc);
1186static rb_node_opt_arg_t *rb_node_opt_arg_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc);
1187static rb_node_kw_arg_t *rb_node_kw_arg_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc);
1188static rb_node_postarg_t *rb_node_postarg_new(struct parser_params *p, NODE *nd_1st, NODE *nd_2nd, const YYLTYPE *loc);
1189static rb_node_argscat_t *rb_node_argscat_new(struct parser_params *p, NODE *nd_head, NODE *nd_body, const YYLTYPE *loc);
1190static rb_node_argspush_t *rb_node_argspush_new(struct parser_params *p, NODE *nd_head, NODE *nd_body, const YYLTYPE *loc);
1191static rb_node_splat_t *rb_node_splat_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc, const YYLTYPE *operator_loc);
1192static rb_node_block_pass_t *rb_node_block_pass_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc, const YYLTYPE *operator_loc);
1193static rb_node_defn_t *rb_node_defn_new(struct parser_params *p, ID nd_mid, NODE *nd_defn, const YYLTYPE *loc);
1194static rb_node_defs_t *rb_node_defs_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_defn, const YYLTYPE *loc);
1195static 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);
1196static 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);
1197static rb_node_undef_t *rb_node_undef_new(struct parser_params *p, NODE *nd_undef, const YYLTYPE *loc);
1198static rb_node_class_t *rb_node_class_new(struct parser_params *p, NODE *nd_cpath, NODE *nd_body, NODE *nd_super, const YYLTYPE *loc);
1199static rb_node_module_t *rb_node_module_new(struct parser_params *p, NODE *nd_cpath, NODE *nd_body, const YYLTYPE *loc);
1200static rb_node_sclass_t *rb_node_sclass_new(struct parser_params *p, NODE *nd_recv, NODE *nd_body, const YYLTYPE *loc);
1201static rb_node_colon2_t *rb_node_colon2_new(struct parser_params *p, NODE *nd_head, ID nd_mid, const YYLTYPE *loc);
1202static rb_node_colon3_t *rb_node_colon3_new(struct parser_params *p, ID nd_mid, const YYLTYPE *loc);
1203static rb_node_dot2_t *rb_node_dot2_new(struct parser_params *p, NODE *nd_beg, NODE *nd_end, const YYLTYPE *loc);
1204static rb_node_dot3_t *rb_node_dot3_new(struct parser_params *p, NODE *nd_beg, NODE *nd_end, const YYLTYPE *loc);
1205static rb_node_self_t *rb_node_self_new(struct parser_params *p, const YYLTYPE *loc);
1206static rb_node_nil_t *rb_node_nil_new(struct parser_params *p, const YYLTYPE *loc);
1207static rb_node_true_t *rb_node_true_new(struct parser_params *p, const YYLTYPE *loc);
1208static rb_node_false_t *rb_node_false_new(struct parser_params *p, const YYLTYPE *loc);
1209static rb_node_errinfo_t *rb_node_errinfo_new(struct parser_params *p, const YYLTYPE *loc);
1210static rb_node_defined_t *rb_node_defined_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc);
1211static rb_node_postexe_t *rb_node_postexe_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc);
1212static rb_node_sym_t *rb_node_sym_new(struct parser_params *p, VALUE str, const YYLTYPE *loc);
1213static 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);
1214static rb_node_attrasgn_t *rb_node_attrasgn_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc);
1215static rb_node_lambda_t *rb_node_lambda_new(struct parser_params *p, rb_node_args_t *nd_args, NODE *nd_body, const YYLTYPE *loc);
1216static rb_node_aryptn_t *rb_node_aryptn_new(struct parser_params *p, NODE *pre_args, NODE *rest_arg, NODE *post_args, const YYLTYPE *loc);
1217static rb_node_hshptn_t *rb_node_hshptn_new(struct parser_params *p, NODE *nd_pconst, NODE *nd_pkwargs, NODE *nd_pkwrestarg, const YYLTYPE *loc);
1218static 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);
1219static rb_node_line_t *rb_node_line_new(struct parser_params *p, const YYLTYPE *loc);
1220static rb_node_file_t *rb_node_file_new(struct parser_params *p, VALUE str, const YYLTYPE *loc);
1221static rb_node_error_t *rb_node_error_new(struct parser_params *p, const YYLTYPE *loc);
1222
1223#define NEW_SCOPE(a,b,loc) (NODE *)rb_node_scope_new(p,a,b,loc)
1224#define NEW_SCOPE2(t,a,b,loc) (NODE *)rb_node_scope_new2(p,t,a,b,loc)
1225#define NEW_BLOCK(a,loc) (NODE *)rb_node_block_new(p,a,loc)
1226#define NEW_IF(c,t,e,loc) (NODE *)rb_node_if_new(p,c,t,e,loc)
1227#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)
1228#define NEW_CASE(h,b,loc,ck_loc,ek_loc) (NODE *)rb_node_case_new(p,h,b,loc,ck_loc,ek_loc)
1229#define NEW_CASE2(b,loc,ck_loc,ek_loc) (NODE *)rb_node_case2_new(p,b,loc,ck_loc,ek_loc)
1230#define NEW_CASE3(h,b,loc,ck_loc,ek_loc) (NODE *)rb_node_case3_new(p,h,b,loc,ck_loc,ek_loc)
1231#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)
1232#define NEW_IN(c,t,e,loc) (NODE *)rb_node_in_new(p,c,t,e,loc)
1233#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)
1234#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)
1235#define NEW_ITER(a,b,loc) (NODE *)rb_node_iter_new(p,a,b,loc)
1236#define NEW_FOR(i,b,loc) (NODE *)rb_node_for_new(p,i,b,loc)
1237#define NEW_FOR_MASGN(v,loc) (NODE *)rb_node_for_masgn_new(p,v,loc)
1238#define NEW_RETRY(loc) (NODE *)rb_node_retry_new(p,loc)
1239#define NEW_BEGIN(b,loc) (NODE *)rb_node_begin_new(p,b,loc)
1240#define NEW_RESCUE(b,res,e,loc) (NODE *)rb_node_rescue_new(p,b,res,e,loc)
1241#define NEW_RESBODY(a,v,ex,n,loc) (NODE *)rb_node_resbody_new(p,a,v,ex,n,loc)
1242#define NEW_ENSURE(b,en,loc) (NODE *)rb_node_ensure_new(p,b,en,loc)
1243#define NEW_AND(f,s,loc,op_loc) (NODE *)rb_node_and_new(p,f,s,loc,op_loc)
1244#define NEW_OR(f,s,loc,op_loc) (NODE *)rb_node_or_new(p,f,s,loc,op_loc)
1245#define NEW_MASGN(l,r,loc) rb_node_masgn_new(p,l,r,loc)
1246#define NEW_LASGN(v,val,loc) (NODE *)rb_node_lasgn_new(p,v,val,loc)
1247#define NEW_DASGN(v,val,loc) (NODE *)rb_node_dasgn_new(p,v,val,loc)
1248#define NEW_GASGN(v,val,loc) (NODE *)rb_node_gasgn_new(p,v,val,loc)
1249#define NEW_IASGN(v,val,loc) (NODE *)rb_node_iasgn_new(p,v,val,loc)
1250#define NEW_CDECL(v,val,path,share,loc) (NODE *)rb_node_cdecl_new(p,v,val,path,share,loc)
1251#define NEW_CVASGN(v,val,loc) (NODE *)rb_node_cvasgn_new(p,v,val,loc)
1252#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)
1253#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)
1254#define NEW_OP_ASGN_OR(i,val,loc) (NODE *)rb_node_op_asgn_or_new(p,i,val,loc)
1255#define NEW_OP_ASGN_AND(i,val,loc) (NODE *)rb_node_op_asgn_and_new(p,i,val,loc)
1256#define NEW_OP_CDECL(v,op,val,share,loc) (NODE *)rb_node_op_cdecl_new(p,v,val,op,share,loc)
1257#define NEW_CALL(r,m,a,loc) (NODE *)rb_node_call_new(p,r,m,a,loc)
1258#define NEW_OPCALL(r,m,a,loc) (NODE *)rb_node_opcall_new(p,r,m,a,loc)
1259#define NEW_FCALL(m,a,loc) rb_node_fcall_new(p,m,a,loc)
1260#define NEW_VCALL(m,loc) (NODE *)rb_node_vcall_new(p,m,loc)
1261#define NEW_QCALL0(r,m,a,loc) (NODE *)rb_node_qcall_new(p,r,m,a,loc)
1262#define NEW_SUPER(a,loc) (NODE *)rb_node_super_new(p,a,loc)
1263#define NEW_ZSUPER(loc) (NODE *)rb_node_zsuper_new(p,loc)
1264#define NEW_LIST(a,loc) (NODE *)rb_node_list_new(p,a,loc)
1265#define NEW_LIST2(h,l,n,loc) (NODE *)rb_node_list_new2(p,h,l,n,loc)
1266#define NEW_ZLIST(loc) (NODE *)rb_node_zlist_new(p,loc)
1267#define NEW_HASH(a,loc) (NODE *)rb_node_hash_new(p,a,loc)
1268#define NEW_RETURN(s,loc,k_loc) (NODE *)rb_node_return_new(p,s,loc,k_loc)
1269#define NEW_YIELD(a,loc) (NODE *)rb_node_yield_new(p,a,loc)
1270#define NEW_LVAR(v,loc) (NODE *)rb_node_lvar_new(p,v,loc)
1271#define NEW_DVAR(v,loc) (NODE *)rb_node_dvar_new(p,v,loc)
1272#define NEW_GVAR(v,loc) (NODE *)rb_node_gvar_new(p,v,loc)
1273#define NEW_IVAR(v,loc) (NODE *)rb_node_ivar_new(p,v,loc)
1274#define NEW_CONST(v,loc) (NODE *)rb_node_const_new(p,v,loc)
1275#define NEW_CVAR(v,loc) (NODE *)rb_node_cvar_new(p,v,loc)
1276#define NEW_NTH_REF(n,loc) (NODE *)rb_node_nth_ref_new(p,n,loc)
1277#define NEW_BACK_REF(n,loc) (NODE *)rb_node_back_ref_new(p,n,loc)
1278#define NEW_MATCH2(n1,n2,loc) (NODE *)rb_node_match2_new(p,n1,n2,loc)
1279#define NEW_MATCH3(r,n2,loc) (NODE *)rb_node_match3_new(p,r,n2,loc)
1280#define NEW_INTEGER(val, base,loc) (NODE *)rb_node_integer_new(p,val,base,loc)
1281#define NEW_FLOAT(val,loc) (NODE *)rb_node_float_new(p,val,loc)
1282#define NEW_RATIONAL(val,base,seen_point,loc) (NODE *)rb_node_rational_new(p,val,base,seen_point,loc)
1283#define NEW_IMAGINARY(val,base,seen_point,numeric_type,loc) (NODE *)rb_node_imaginary_new(p,val,base,seen_point,numeric_type,loc)
1284#define NEW_STR(s,loc) (NODE *)rb_node_str_new(p,s,loc)
1285#define NEW_DSTR0(s,l,n,loc) (NODE *)rb_node_dstr_new0(p,s,l,n,loc)
1286#define NEW_DSTR(s,loc) (NODE *)rb_node_dstr_new(p,s,loc)
1287#define NEW_XSTR(s,loc) (NODE *)rb_node_xstr_new(p,s,loc)
1288#define NEW_DXSTR(s,l,n,loc) (NODE *)rb_node_dxstr_new(p,s,l,n,loc)
1289#define NEW_EVSTR(n,loc) (NODE *)rb_node_evstr_new(p,n,loc)
1290#define NEW_REGX(str,opts,loc) (NODE *)rb_node_regx_new(p,str,opts,loc)
1291#define NEW_ONCE(b,loc) (NODE *)rb_node_once_new(p,b,loc)
1292#define NEW_ARGS(loc) rb_node_args_new(p,loc)
1293#define NEW_ARGS_AUX(r,b,loc) rb_node_args_aux_new(p,r,b,loc)
1294#define NEW_OPT_ARG(v,loc) rb_node_opt_arg_new(p,v,loc)
1295#define NEW_KW_ARG(v,loc) rb_node_kw_arg_new(p,v,loc)
1296#define NEW_POSTARG(i,v,loc) (NODE *)rb_node_postarg_new(p,i,v,loc)
1297#define NEW_ARGSCAT(a,b,loc) (NODE *)rb_node_argscat_new(p,a,b,loc)
1298#define NEW_ARGSPUSH(a,b,loc) (NODE *)rb_node_argspush_new(p,a,b,loc)
1299#define NEW_SPLAT(a,loc,op_loc) (NODE *)rb_node_splat_new(p,a,loc,op_loc)
1300#define NEW_BLOCK_PASS(b,loc,o_loc) rb_node_block_pass_new(p,b,loc,o_loc)
1301#define NEW_DEFN(i,s,loc) (NODE *)rb_node_defn_new(p,i,s,loc)
1302#define NEW_DEFS(r,i,s,loc) (NODE *)rb_node_defs_new(p,r,i,s,loc)
1303#define NEW_ALIAS(n,o,loc,k_loc) (NODE *)rb_node_alias_new(p,n,o,loc,k_loc)
1304#define NEW_VALIAS(n,o,loc,k_loc) (NODE *)rb_node_valias_new(p,n,o,loc,k_loc)
1305#define NEW_UNDEF(i,loc) (NODE *)rb_node_undef_new(p,i,loc)
1306#define NEW_CLASS(n,b,s,loc) (NODE *)rb_node_class_new(p,n,b,s,loc)
1307#define NEW_MODULE(n,b,loc) (NODE *)rb_node_module_new(p,n,b,loc)
1308#define NEW_SCLASS(r,b,loc) (NODE *)rb_node_sclass_new(p,r,b,loc)
1309#define NEW_COLON2(c,i,loc) (NODE *)rb_node_colon2_new(p,c,i,loc)
1310#define NEW_COLON3(i,loc) (NODE *)rb_node_colon3_new(p,i,loc)
1311#define NEW_DOT2(b,e,loc) (NODE *)rb_node_dot2_new(p,b,e,loc)
1312#define NEW_DOT3(b,e,loc) (NODE *)rb_node_dot3_new(p,b,e,loc)
1313#define NEW_SELF(loc) (NODE *)rb_node_self_new(p,loc)
1314#define NEW_NIL(loc) (NODE *)rb_node_nil_new(p,loc)
1315#define NEW_TRUE(loc) (NODE *)rb_node_true_new(p,loc)
1316#define NEW_FALSE(loc) (NODE *)rb_node_false_new(p,loc)
1317#define NEW_ERRINFO(loc) (NODE *)rb_node_errinfo_new(p,loc)
1318#define NEW_DEFINED(e,loc) (NODE *)rb_node_defined_new(p,e,loc)
1319#define NEW_POSTEXE(b,loc) (NODE *)rb_node_postexe_new(p,b,loc)
1320#define NEW_SYM(str,loc) (NODE *)rb_node_sym_new(p,str,loc)
1321#define NEW_DSYM(s,l,n,loc) (NODE *)rb_node_dsym_new(p,s,l,n,loc)
1322#define NEW_ATTRASGN(r,m,a,loc) (NODE *)rb_node_attrasgn_new(p,r,m,a,loc)
1323#define NEW_LAMBDA(a,b,loc) (NODE *)rb_node_lambda_new(p,a,b,loc)
1324#define NEW_ARYPTN(pre,r,post,loc) (NODE *)rb_node_aryptn_new(p,pre,r,post,loc)
1325#define NEW_HSHPTN(c,kw,kwrest,loc) (NODE *)rb_node_hshptn_new(p,c,kw,kwrest,loc)
1326#define NEW_FNDPTN(pre,a,post,loc) (NODE *)rb_node_fndptn_new(p,pre,a,post,loc)
1327#define NEW_LINE(loc) (NODE *)rb_node_line_new(p,loc)
1328#define NEW_FILE(str,loc) (NODE *)rb_node_file_new(p,str,loc)
1329#define NEW_ENCODING(loc) (NODE *)rb_node_encoding_new(p,loc)
1330#define NEW_ERROR(loc) (NODE *)rb_node_error_new(p,loc)
1331
1332enum internal_node_type {
1333 NODE_INTERNAL_ONLY = NODE_LAST,
1334 NODE_DEF_TEMP,
1335 NODE_EXITS,
1336 NODE_INTERNAL_LAST
1337};
1338
1339static const char *
1340parser_node_name(int node)
1341{
1342 switch (node) {
1343 case NODE_DEF_TEMP:
1344 return "NODE_DEF_TEMP";
1345 case NODE_EXITS:
1346 return "NODE_EXITS";
1347 default:
1348 return ruby_node_name(node);
1349 }
1350}
1351
1352/* This node is parse.y internal */
1354 NODE node;
1355
1356 /* for NODE_DEFN/NODE_DEFS */
1357
1358 struct RNode *nd_def;
1359 ID nd_mid;
1360
1361 struct {
1362 int max_numparam;
1363 NODE *numparam_save;
1364 struct lex_context ctxt;
1365 } save;
1366};
1367
1368#define RNODE_DEF_TEMP(node) ((struct RNode_DEF_TEMP *)(node))
1369
1370static rb_node_break_t *rb_node_break_new(struct parser_params *p, NODE *nd_stts, const YYLTYPE *loc, const YYLTYPE *keyword_loc);
1371static rb_node_next_t *rb_node_next_new(struct parser_params *p, NODE *nd_stts, const YYLTYPE *loc, const YYLTYPE *keyword_loc);
1372static rb_node_redo_t *rb_node_redo_new(struct parser_params *p, const YYLTYPE *loc, const YYLTYPE *keyword_loc);
1373static rb_node_def_temp_t *rb_node_def_temp_new(struct parser_params *p, const YYLTYPE *loc);
1374static rb_node_def_temp_t *def_head_save(struct parser_params *p, rb_node_def_temp_t *n);
1375
1376#define NEW_BREAK(s,loc,k_loc) (NODE *)rb_node_break_new(p,s,loc,k_loc)
1377#define NEW_NEXT(s,loc,k_loc) (NODE *)rb_node_next_new(p,s,loc,k_loc)
1378#define NEW_REDO(loc,k_loc) (NODE *)rb_node_redo_new(p,loc,k_loc)
1379#define NEW_DEF_TEMP(loc) rb_node_def_temp_new(p,loc)
1380
1381/* Make a new internal node, which should not be appeared in the
1382 * result AST and does not have node_id and location. */
1383static NODE* node_new_internal(struct parser_params *p, enum node_type type, size_t size, size_t alignment);
1384#define NODE_NEW_INTERNAL(ndtype, type) (type *)node_new_internal(p, (enum node_type)(ndtype), sizeof(type), RUBY_ALIGNOF(type))
1385
1386static NODE *nd_set_loc(NODE *nd, const YYLTYPE *loc);
1387
1388static int
1389parser_get_node_id(struct parser_params *p)
1390{
1391 int node_id = p->node_id;
1392 p->node_id++;
1393 return node_id;
1394}
1395
1396static void
1397anddot_multiple_assignment_check(struct parser_params* p, const YYLTYPE *loc, ID id)
1398{
1399 if (id == tANDDOT) {
1400 yyerror1(loc, "&. inside multiple assignment destination");
1401 }
1402}
1403
1404static inline void
1405set_line_body(NODE *body, int line)
1406{
1407 if (!body) return;
1408 switch (nd_type(body)) {
1409 case NODE_RESCUE:
1410 case NODE_ENSURE:
1411 nd_set_line(body, line);
1412 }
1413}
1414
1415static void
1416set_embraced_location(NODE *node, const rb_code_location_t *beg, const rb_code_location_t *end)
1417{
1418 RNODE_ITER(node)->nd_body->nd_loc = code_loc_gen(beg, end);
1419 nd_set_line(node, beg->end_pos.lineno);
1420}
1421
1422static NODE *
1423last_expr_node(NODE *expr)
1424{
1425 while (expr) {
1426 if (nd_type_p(expr, NODE_BLOCK)) {
1427 expr = RNODE_BLOCK(RNODE_BLOCK(expr)->nd_end)->nd_head;
1428 }
1429 else if (nd_type_p(expr, NODE_BEGIN) && RNODE_BEGIN(expr)->nd_body) {
1430 expr = RNODE_BEGIN(expr)->nd_body;
1431 }
1432 else {
1433 break;
1434 }
1435 }
1436 return expr;
1437}
1438
1439#ifndef RIPPER
1440#define yyparse ruby_yyparse
1441#endif
1442
1443static NODE* cond(struct parser_params *p, NODE *node, const YYLTYPE *loc);
1444static NODE* method_cond(struct parser_params *p, NODE *node, const YYLTYPE *loc);
1445#define new_nil(loc) NEW_NIL(loc)
1446static NODE *new_nil_at(struct parser_params *p, const rb_code_position_t *pos);
1447static NODE *new_if(struct parser_params*,NODE*,NODE*,NODE*,const YYLTYPE*);
1448static NODE *new_unless(struct parser_params*,NODE*,NODE*,NODE*,const YYLTYPE*,const YYLTYPE*,const YYLTYPE*,const YYLTYPE*);
1449static NODE *logop(struct parser_params*,ID,NODE*,NODE*,const YYLTYPE*,const YYLTYPE*);
1450
1451static NODE *newline_node(NODE*);
1452static void fixpos(NODE*,NODE*);
1453
1454static int value_expr_gen(struct parser_params*,NODE*);
1455static void void_expr(struct parser_params*,NODE*);
1456static NODE *remove_begin(NODE*);
1457#define value_expr(node) value_expr_gen(p, (node))
1458static NODE *void_stmts(struct parser_params*,NODE*);
1459static void reduce_nodes(struct parser_params*,NODE**);
1460static void block_dup_check(struct parser_params*,NODE*,NODE*);
1461
1462static NODE *block_append(struct parser_params*,NODE*,NODE*);
1463static NODE *list_append(struct parser_params*,NODE*,NODE*);
1464static NODE *list_concat(NODE*,NODE*);
1465static NODE *arg_append(struct parser_params*,NODE*,NODE*,const YYLTYPE*);
1466static NODE *last_arg_append(struct parser_params *p, NODE *args, NODE *last_arg, const YYLTYPE *loc);
1467static NODE *rest_arg_append(struct parser_params *p, NODE *args, NODE *rest_arg, const YYLTYPE *loc);
1468static NODE *literal_concat(struct parser_params*,NODE*,NODE*,const YYLTYPE*);
1469static NODE *new_evstr(struct parser_params*,NODE*,const YYLTYPE*);
1470static NODE *new_dstr(struct parser_params*,NODE*,const YYLTYPE*);
1471static NODE *str2dstr(struct parser_params*,NODE*);
1472static NODE *evstr2dstr(struct parser_params*,NODE*);
1473static NODE *splat_array(NODE*);
1474static void mark_lvar_used(struct parser_params *p, NODE *rhs);
1475
1476static NODE *call_bin_op(struct parser_params*,NODE*,ID,NODE*,const YYLTYPE*,const YYLTYPE*);
1477static NODE *call_uni_op(struct parser_params*,NODE*,ID,const YYLTYPE*,const YYLTYPE*);
1478static NODE *new_qcall(struct parser_params* p, ID atype, NODE *recv, ID mid, NODE *args, const YYLTYPE *op_loc, const YYLTYPE *loc);
1479static 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);
1480static 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;}
1481
1482static bool args_info_empty_p(struct rb_args_info *args);
1483static 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*);
1484static rb_node_args_t *new_args_tail(struct parser_params*,rb_node_kw_arg_t*,ID,ID,const YYLTYPE*);
1485static NODE *new_array_pattern(struct parser_params *p, NODE *constant, NODE *pre_arg, NODE *aryptn, const YYLTYPE *loc);
1486static NODE *new_array_pattern_tail(struct parser_params *p, NODE *pre_args, int has_rest, NODE *rest_arg, NODE *post_args, const YYLTYPE *loc);
1487static NODE *new_find_pattern(struct parser_params *p, NODE *constant, NODE *fndptn, const YYLTYPE *loc);
1488static NODE *new_find_pattern_tail(struct parser_params *p, NODE *pre_rest_arg, NODE *args, NODE *post_rest_arg, const YYLTYPE *loc);
1489static NODE *new_hash_pattern(struct parser_params *p, NODE *constant, NODE *hshptn, const YYLTYPE *loc);
1490static NODE *new_hash_pattern_tail(struct parser_params *p, NODE *kw_args, ID kw_rest_arg, const YYLTYPE *loc);
1491
1492static rb_node_kw_arg_t *new_kw_arg(struct parser_params *p, NODE *k, const YYLTYPE *loc);
1493static rb_node_args_t *args_with_numbered(struct parser_params*,rb_node_args_t*,int,ID);
1494
1495static NODE* negate_lit(struct parser_params*, NODE*);
1496static NODE *ret_args(struct parser_params*,NODE*);
1497static NODE *arg_blk_pass(NODE*,rb_node_block_pass_t*);
1498static NODE *new_yield(struct parser_params*,NODE*,const YYLTYPE*);
1499static NODE *dsym_node(struct parser_params*,NODE*,const YYLTYPE*);
1500
1501static NODE *gettable(struct parser_params*,ID,const YYLTYPE*);
1502static NODE *assignable(struct parser_params*,ID,NODE*,const YYLTYPE*);
1503
1504static NODE *aryset(struct parser_params*,NODE*,NODE*,const YYLTYPE*);
1505static NODE *attrset(struct parser_params*,NODE*,ID,ID,const YYLTYPE*);
1506
1507static VALUE rb_backref_error(struct parser_params*,NODE*);
1508static NODE *node_assign(struct parser_params*,NODE*,NODE*,struct lex_context,const YYLTYPE*);
1509
1510static NODE *new_op_assign(struct parser_params *p, NODE *lhs, ID op, NODE *rhs, struct lex_context, const YYLTYPE *loc);
1511static 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);
1512static 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);
1513static NODE *new_const_op_assign(struct parser_params *p, NODE *lhs, ID op, NODE *rhs, struct lex_context, const YYLTYPE *loc);
1514static NODE *new_bodystmt(struct parser_params *p, NODE *head, NODE *rescue, NODE *rescue_else, NODE *ensure, const YYLTYPE *loc);
1515
1516static NODE *const_decl(struct parser_params *p, NODE* path, const YYLTYPE *loc);
1517
1518static rb_node_opt_arg_t *opt_arg_append(rb_node_opt_arg_t*, rb_node_opt_arg_t*);
1519static rb_node_kw_arg_t *kwd_append(rb_node_kw_arg_t*, rb_node_kw_arg_t*);
1520
1521static NODE *new_hash(struct parser_params *p, NODE *hash, const YYLTYPE *loc);
1522static NODE *new_unique_key_hash(struct parser_params *p, NODE *hash, const YYLTYPE *loc);
1523
1524static NODE *new_defined(struct parser_params *p, NODE *expr, const YYLTYPE *loc);
1525
1526static NODE *new_regexp(struct parser_params *, NODE *, int, const YYLTYPE *);
1527
1528#define make_list(list, loc) ((list) ? (nd_set_loc(list, loc), list) : NEW_ZLIST(loc))
1529
1530static NODE *new_xstring(struct parser_params *, NODE *, const YYLTYPE *loc);
1531
1532static NODE *symbol_append(struct parser_params *p, NODE *symbols, NODE *symbol);
1533
1534static NODE *match_op(struct parser_params*,NODE*,NODE*,const YYLTYPE*,const YYLTYPE*);
1535
1536static rb_ast_id_table_t *local_tbl(struct parser_params*);
1537
1538static VALUE reg_compile(struct parser_params*, rb_parser_string_t*, int);
1539static void reg_fragment_setenc(struct parser_params*, rb_parser_string_t*, int);
1540int rb_parser_reg_fragment_check(struct parser_params*, rb_parser_string_t*, int, rb_parser_reg_fragment_error_func);
1541static void reg_fragment_error(struct parser_params *, VALUE);
1542#define reg_fragment_check(p, str, option) rb_parser_reg_fragment_check(p, str, option, reg_fragment_error)
1543
1544static int literal_concat0(struct parser_params *p, rb_parser_string_t *head, rb_parser_string_t *tail);
1545static NODE *heredoc_dedent(struct parser_params*,NODE*);
1546
1547static void check_literal_when(struct parser_params *p, NODE *args, const YYLTYPE *loc);
1548
1549#ifdef RIPPER
1550#define get_value(idx) (rb_ary_entry(p->s_value_stack, idx))
1551#define set_value(val) (p->s_lvalue = val)
1552static VALUE assign_error(struct parser_params *p, const char *mesg, VALUE a);
1553static int id_is_var(struct parser_params *p, ID id);
1554#endif
1555
1556RUBY_SYMBOL_EXPORT_BEGIN
1557VALUE rb_parser_reg_compile(struct parser_params* p, VALUE str, int options);
1558int rb_reg_fragment_setenc(struct parser_params*, rb_parser_string_t *, int);
1559enum lex_state_e rb_parser_trace_lex_state(struct parser_params *, enum lex_state_e, enum lex_state_e, int);
1560VALUE rb_parser_lex_state_name(struct parser_params *p, enum lex_state_e state);
1561void rb_parser_show_bitstack(struct parser_params *, stack_type, const char *, int);
1562PRINTF_ARGS(void rb_parser_fatal(struct parser_params *p, const char *fmt, ...), 2, 3);
1563YYLTYPE *rb_parser_set_location_from_strterm_heredoc(struct parser_params *p, rb_strterm_heredoc_t *here, YYLTYPE *yylloc);
1564YYLTYPE *rb_parser_set_location_of_delayed_token(struct parser_params *p, YYLTYPE *yylloc);
1565YYLTYPE *rb_parser_set_location_of_heredoc_end(struct parser_params *p, YYLTYPE *yylloc);
1566YYLTYPE *rb_parser_set_location_of_dummy_end(struct parser_params *p, YYLTYPE *yylloc);
1567YYLTYPE *rb_parser_set_location_of_none(struct parser_params *p, YYLTYPE *yylloc);
1568YYLTYPE *rb_parser_set_location(struct parser_params *p, YYLTYPE *yylloc);
1569void ruby_show_error_line(struct parser_params *p, VALUE errbuf, const YYLTYPE *yylloc, int lineno, rb_parser_string_t *str);
1570RUBY_SYMBOL_EXPORT_END
1571
1572static void flush_string_content(struct parser_params *p, rb_encoding *enc, size_t back);
1573static void error_duplicate_pattern_variable(struct parser_params *p, ID id, const YYLTYPE *loc);
1574static void error_duplicate_pattern_key(struct parser_params *p, ID id, const YYLTYPE *loc);
1575static VALUE formal_argument_error(struct parser_params*, ID);
1576static ID shadowing_lvar(struct parser_params*,ID);
1577static void new_bv(struct parser_params*,ID);
1578
1579static void local_push(struct parser_params*,int);
1580static void local_pop(struct parser_params*);
1581static void local_var(struct parser_params*, ID);
1582static void arg_var(struct parser_params*, ID);
1583static int local_id(struct parser_params *p, ID id);
1584static int local_id_ref(struct parser_params*, ID, ID **);
1585#define internal_id rb_parser_internal_id
1586ID internal_id(struct parser_params*);
1587static NODE *new_args_forward_call(struct parser_params*, NODE*, const YYLTYPE*, const YYLTYPE*);
1588static int check_forwarding_args(struct parser_params*);
1589static void add_forwarding_args(struct parser_params *p);
1590static void forwarding_arg_check(struct parser_params *p, ID arg, ID all, const char *var);
1591
1592static const struct vtable *dyna_push(struct parser_params *);
1593static void dyna_pop(struct parser_params*, const struct vtable *);
1594static int dyna_in_block(struct parser_params*);
1595#define dyna_var(p, id) local_var(p, id)
1596static int dvar_defined(struct parser_params*, ID);
1597#define dvar_defined_ref rb_parser_dvar_defined_ref
1598int dvar_defined_ref(struct parser_params*, ID, ID**);
1599static int dvar_curr(struct parser_params*,ID);
1600
1601static int lvar_defined(struct parser_params*, ID);
1602
1603static NODE *numparam_push(struct parser_params *p);
1604static void numparam_pop(struct parser_params *p, NODE *prev_inner);
1605
1606#define METHOD_NOT '!'
1607
1608#define idFWD_REST '*'
1609#define idFWD_KWREST idPow /* Use simple "**", as tDSTAR is "**arg" */
1610#define idFWD_BLOCK '&'
1611#define idFWD_ALL idDot3
1612#define arg_FWD_BLOCK idFWD_BLOCK
1613
1614#define RE_ONIG_OPTION_IGNORECASE 1
1615#define RE_ONIG_OPTION_EXTEND (RE_ONIG_OPTION_IGNORECASE<<1)
1616#define RE_ONIG_OPTION_MULTILINE (RE_ONIG_OPTION_EXTEND<<1)
1617#define RE_OPTION_ONCE (1<<16)
1618#define RE_OPTION_ENCODING_SHIFT 8
1619#define RE_OPTION_ENCODING(e) (((e)&0xff)<<RE_OPTION_ENCODING_SHIFT)
1620#define RE_OPTION_ENCODING_IDX(o) (((o)>>RE_OPTION_ENCODING_SHIFT)&0xff)
1621#define RE_OPTION_ENCODING_NONE(o) ((o)&RE_OPTION_ARG_ENCODING_NONE)
1622#define RE_OPTION_MASK 0xff
1623#define RE_OPTION_ARG_ENCODING_NONE 32
1624
1625#define CHECK_LITERAL_WHEN (st_table *)1
1626#define CASE_LABELS_ENABLED_P(case_labels) (case_labels && case_labels != CHECK_LITERAL_WHEN)
1627
1628#define yytnamerr(yyres, yystr) (YYSIZE_T)rb_yytnamerr(p, yyres, yystr)
1629RUBY_FUNC_EXPORTED size_t rb_yytnamerr(struct parser_params *p, char *yyres, const char *yystr);
1630
1631#define TOKEN2ID(tok) ( \
1632 tTOKEN_LOCAL_BEGIN<(tok)&&(tok)<tTOKEN_LOCAL_END ? TOKEN2LOCALID(tok) : \
1633 tTOKEN_INSTANCE_BEGIN<(tok)&&(tok)<tTOKEN_INSTANCE_END ? TOKEN2INSTANCEID(tok) : \
1634 tTOKEN_GLOBAL_BEGIN<(tok)&&(tok)<tTOKEN_GLOBAL_END ? TOKEN2GLOBALID(tok) : \
1635 tTOKEN_CONST_BEGIN<(tok)&&(tok)<tTOKEN_CONST_END ? TOKEN2CONSTID(tok) : \
1636 tTOKEN_CLASS_BEGIN<(tok)&&(tok)<tTOKEN_CLASS_END ? TOKEN2CLASSID(tok) : \
1637 tTOKEN_ATTRSET_BEGIN<(tok)&&(tok)<tTOKEN_ATTRSET_END ? TOKEN2ATTRSETID(tok) : \
1638 ((tok) / ((tok)<tPRESERVED_ID_END && ((tok)>=128 || rb_ispunct(tok)))))
1639
1640/****** Ripper *******/
1641
1642#ifdef RIPPER
1643
1644#include "eventids1.h"
1645#include "eventids2.h"
1646
1647extern const struct ripper_parser_ids ripper_parser_ids;
1648
1649static VALUE ripper_dispatch0(struct parser_params*,ID);
1650static VALUE ripper_dispatch1(struct parser_params*,ID,VALUE);
1651static VALUE ripper_dispatch2(struct parser_params*,ID,VALUE,VALUE);
1652static VALUE ripper_dispatch3(struct parser_params*,ID,VALUE,VALUE,VALUE);
1653static VALUE ripper_dispatch4(struct parser_params*,ID,VALUE,VALUE,VALUE,VALUE);
1654static VALUE ripper_dispatch5(struct parser_params*,ID,VALUE,VALUE,VALUE,VALUE,VALUE);
1655static VALUE ripper_dispatch7(struct parser_params*,ID,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE);
1656void ripper_error(struct parser_params *p);
1657
1658#define dispatch0(n) ripper_dispatch0(p, RIPPER_ID(n))
1659#define dispatch1(n,a) ripper_dispatch1(p, RIPPER_ID(n), (a))
1660#define dispatch2(n,a,b) ripper_dispatch2(p, RIPPER_ID(n), (a), (b))
1661#define dispatch3(n,a,b,c) ripper_dispatch3(p, RIPPER_ID(n), (a), (b), (c))
1662#define dispatch4(n,a,b,c,d) ripper_dispatch4(p, RIPPER_ID(n), (a), (b), (c), (d))
1663#define dispatch5(n,a,b,c,d,e) ripper_dispatch5(p, RIPPER_ID(n), (a), (b), (c), (d), (e))
1664#define dispatch7(n,a,b,c,d,e,f,g) ripper_dispatch7(p, RIPPER_ID(n), (a), (b), (c), (d), (e), (f), (g))
1665
1666#define yyparse ripper_yyparse
1667
1668static VALUE
1669aryptn_pre_args(struct parser_params *p, VALUE pre_arg, VALUE pre_args)
1670{
1671 if (!NIL_P(pre_arg)) {
1672 if (!NIL_P(pre_args)) {
1673 rb_ary_unshift(pre_args, pre_arg);
1674 }
1675 else {
1676 pre_args = rb_ary_new_from_args(1, pre_arg);
1677 }
1678 }
1679 return pre_args;
1680}
1681
1682#define ID2VAL(id) STATIC_ID2SYM(id)
1683#define TOKEN2VAL(t) ID2VAL(TOKEN2ID(t))
1684#endif /* RIPPER */
1685
1686#define KWD2EID(t, v) keyword_##t
1687
1688static NODE *
1689new_scope_body(struct parser_params *p, rb_node_args_t *args, NODE *body, const YYLTYPE *loc)
1690{
1691 body = remove_begin(body);
1692 reduce_nodes(p, &body);
1693 NODE *n = NEW_SCOPE(args, body, loc);
1694 nd_set_line(n, loc->end_pos.lineno);
1695 set_line_body(body, loc->beg_pos.lineno);
1696 return n;
1697}
1698
1699static NODE *
1700rescued_expr(struct parser_params *p, NODE *arg, NODE *rescue,
1701 const YYLTYPE *arg_loc, const YYLTYPE *mod_loc, const YYLTYPE *res_loc)
1702{
1703 YYLTYPE loc = code_loc_gen(mod_loc, res_loc);
1704 rescue = NEW_RESBODY(0, 0, remove_begin(rescue), 0, &loc);
1705 loc.beg_pos = arg_loc->beg_pos;
1706 return NEW_RESCUE(arg, rescue, 0, &loc);
1707}
1708
1709static NODE *add_block_exit(struct parser_params *p, NODE *node);
1710static rb_node_exits_t *init_block_exit(struct parser_params *p);
1711static rb_node_exits_t *allow_block_exit(struct parser_params *p);
1712static void restore_block_exit(struct parser_params *p, rb_node_exits_t *exits);
1713static void clear_block_exit(struct parser_params *p, bool error);
1714
1715static void
1716next_rescue_context(struct lex_context *next, const struct lex_context *outer, enum rescue_context def)
1717{
1718 next->in_rescue = outer->in_rescue == after_rescue ? after_rescue : def;
1719}
1720
1721static void
1722restore_defun(struct parser_params *p, rb_node_def_temp_t *temp)
1723{
1724 /* See: def_name action */
1725 struct lex_context ctxt = temp->save.ctxt;
1726 p->ctxt.in_def = ctxt.in_def;
1727 p->ctxt.shareable_constant_value = ctxt.shareable_constant_value;
1728 p->ctxt.in_rescue = ctxt.in_rescue;
1729 p->max_numparam = temp->save.max_numparam;
1730 numparam_pop(p, temp->save.numparam_save);
1731 clear_block_exit(p, true);
1732}
1733
1734static void
1735endless_method_name(struct parser_params *p, ID mid, const YYLTYPE *loc)
1736{
1737 if (is_attrset_id(mid)) {
1738 yyerror1(loc, "setter method cannot be defined in an endless method definition");
1739 }
1740 token_info_drop(p, "def", loc->beg_pos);
1741}
1742
1743#define debug_token_line(p, name, line) do { \
1744 if (p->debug) { \
1745 const char *const pcur = p->lex.pcur; \
1746 const char *const ptok = p->lex.ptok; \
1747 rb_parser_printf(p, name ":%d (%d: %"PRIdPTRDIFF"|%"PRIdPTRDIFF"|%"PRIdPTRDIFF")\n", \
1748 line, p->ruby_sourceline, \
1749 ptok - p->lex.pbeg, pcur - ptok, p->lex.pend - pcur); \
1750 } \
1751 } while (0)
1752
1753#define begin_definition(k, loc_beg, loc_end) \
1754 do { \
1755 if (!(p->ctxt.in_class = (k)[0] != 0)) { \
1756 /* singleton class */ \
1757 p->ctxt.cant_return = !p->ctxt.in_def; \
1758 p->ctxt.in_def = 0; \
1759 } \
1760 else if (p->ctxt.in_def) { \
1761 YYLTYPE loc = code_loc_gen(loc_beg, loc_end); \
1762 yyerror1(&loc, k " definition in method body"); \
1763 } \
1764 else { \
1765 p->ctxt.cant_return = 1; \
1766 } \
1767 local_push(p, 0); \
1768 } while (0)
1769
1770#ifndef RIPPER
1771# define ifndef_ripper(x) (x)
1772# define ifdef_ripper(r,x) (x)
1773#else
1774# define ifndef_ripper(x)
1775# define ifdef_ripper(r,x) (r)
1776#endif
1777
1778# define rb_warn0(fmt) WARN_CALL(WARN_ARGS(fmt, 1))
1779# define rb_warn1(fmt,a) WARN_CALL(WARN_ARGS(fmt, 2), (a))
1780# define rb_warn2(fmt,a,b) WARN_CALL(WARN_ARGS(fmt, 3), (a), (b))
1781# define rb_warn3(fmt,a,b,c) WARN_CALL(WARN_ARGS(fmt, 4), (a), (b), (c))
1782# define rb_warn4(fmt,a,b,c,d) WARN_CALL(WARN_ARGS(fmt, 5), (a), (b), (c), (d))
1783# define rb_warning0(fmt) WARNING_CALL(WARNING_ARGS(fmt, 1))
1784# define rb_warning1(fmt,a) WARNING_CALL(WARNING_ARGS(fmt, 2), (a))
1785# define rb_warning2(fmt,a,b) WARNING_CALL(WARNING_ARGS(fmt, 3), (a), (b))
1786# define rb_warning3(fmt,a,b,c) WARNING_CALL(WARNING_ARGS(fmt, 4), (a), (b), (c))
1787# define rb_warning4(fmt,a,b,c,d) WARNING_CALL(WARNING_ARGS(fmt, 5), (a), (b), (c), (d))
1788# define rb_warn0L(l,fmt) WARN_CALL(WARN_ARGS_L(l, fmt, 1))
1789# define rb_warn1L(l,fmt,a) WARN_CALL(WARN_ARGS_L(l, fmt, 2), (a))
1790# define rb_warn2L(l,fmt,a,b) WARN_CALL(WARN_ARGS_L(l, fmt, 3), (a), (b))
1791# define rb_warn3L(l,fmt,a,b,c) WARN_CALL(WARN_ARGS_L(l, fmt, 4), (a), (b), (c))
1792# define rb_warn4L(l,fmt,a,b,c,d) WARN_CALL(WARN_ARGS_L(l, fmt, 5), (a), (b), (c), (d))
1793# define rb_warning0L(l,fmt) WARNING_CALL(WARNING_ARGS_L(l, fmt, 1))
1794# define rb_warning1L(l,fmt,a) WARNING_CALL(WARNING_ARGS_L(l, fmt, 2), (a))
1795# define rb_warning2L(l,fmt,a,b) WARNING_CALL(WARNING_ARGS_L(l, fmt, 3), (a), (b))
1796# define rb_warning3L(l,fmt,a,b,c) WARNING_CALL(WARNING_ARGS_L(l, fmt, 4), (a), (b), (c))
1797# define rb_warning4L(l,fmt,a,b,c,d) WARNING_CALL(WARNING_ARGS_L(l, fmt, 5), (a), (b), (c), (d))
1798#ifdef RIPPER
1799extern const ID id_warn, id_warning, id_gets, id_assoc;
1800# define ERR_MESG() STR_NEW2(mesg) /* to bypass Ripper DSL */
1801# define WARN_S_L(s,l) STR_NEW(s,l)
1802# define WARN_S(s) STR_NEW2(s)
1803# define WARN_I(i) INT2NUM(i)
1804# define WARN_ID(i) rb_id2str(i)
1805# define PRIsWARN PRIsVALUE
1806# define WARN_ARGS(fmt,n) p->value, id_warn, n, rb_usascii_str_new_lit(fmt)
1807# define WARN_ARGS_L(l,fmt,n) WARN_ARGS(fmt,n)
1808# ifdef HAVE_VA_ARGS_MACRO
1809# define WARN_CALL(...) rb_funcall(__VA_ARGS__)
1810# else
1811# define WARN_CALL rb_funcall
1812# endif
1813# define WARNING_ARGS(fmt,n) p->value, id_warning, n, rb_usascii_str_new_lit(fmt)
1814# define WARNING_ARGS_L(l, fmt,n) WARNING_ARGS(fmt,n)
1815# ifdef HAVE_VA_ARGS_MACRO
1816# define WARNING_CALL(...) rb_funcall(__VA_ARGS__)
1817# else
1818# define WARNING_CALL rb_funcall
1819# endif
1820# define compile_error ripper_compile_error
1821#else
1822# define WARN_S_L(s,l) s
1823# define WARN_S(s) s
1824# define WARN_I(i) i
1825# define WARN_ID(i) rb_id2name(i)
1826# define PRIsWARN PRIsVALUE
1827# define WARN_ARGS(fmt,n) WARN_ARGS_L(p->ruby_sourceline,fmt,n)
1828# define WARN_ARGS_L(l,fmt,n) p->ruby_sourcefile, (l), (fmt)
1829# define WARN_CALL rb_compile_warn
1830# define WARNING_ARGS(fmt,n) WARN_ARGS(fmt,n)
1831# define WARNING_ARGS_L(l,fmt,n) WARN_ARGS_L(l,fmt,n)
1832# define WARNING_CALL rb_compile_warning
1833PRINTF_ARGS(static void parser_compile_error(struct parser_params*, const rb_code_location_t *loc, const char *fmt, ...), 3, 4);
1834# define compile_error(p, ...) parser_compile_error(p, NULL, __VA_ARGS__)
1835#endif
1836
1837#define RNODE_EXITS(node) ((rb_node_exits_t*)(node))
1838
1839static NODE *
1840add_block_exit(struct parser_params *p, NODE *node)
1841{
1842 if (!node) {
1843 compile_error(p, "unexpected null node");
1844 return 0;
1845 }
1846 switch (nd_type(node)) {
1847 case NODE_BREAK: case NODE_NEXT: case NODE_REDO: break;
1848 default:
1849 compile_error(p, "add_block_exit: unexpected node: %s", parser_node_name(nd_type(node)));
1850 return node;
1851 }
1852 if (!p->ctxt.in_defined) {
1853 rb_node_exits_t *exits = p->exits;
1854 if (exits) {
1855 RNODE_EXITS(exits->nd_stts)->nd_chain = node;
1856 exits->nd_stts = node;
1857 }
1858 }
1859 return node;
1860}
1861
1862static rb_node_exits_t *
1863init_block_exit(struct parser_params *p)
1864{
1865 rb_node_exits_t *old = p->exits;
1866 rb_node_exits_t *exits = NODE_NEW_INTERNAL(NODE_EXITS, rb_node_exits_t);
1867 exits->nd_chain = 0;
1868 exits->nd_stts = RNODE(exits);
1869 p->exits = exits;
1870 return old;
1871}
1872
1873static rb_node_exits_t *
1874allow_block_exit(struct parser_params *p)
1875{
1876 rb_node_exits_t *exits = p->exits;
1877 p->exits = 0;
1878 return exits;
1879}
1880
1881static void
1882restore_block_exit(struct parser_params *p, rb_node_exits_t *exits)
1883{
1884 p->exits = exits;
1885}
1886
1887static void
1888clear_block_exit(struct parser_params *p, bool error)
1889{
1890 rb_node_exits_t *exits = p->exits;
1891 if (!exits) return;
1892 if (error) {
1893 for (NODE *e = RNODE(exits); (e = RNODE_EXITS(e)->nd_chain) != 0; ) {
1894 switch (nd_type(e)) {
1895 case NODE_BREAK:
1896 yyerror1(&e->nd_loc, "Invalid break");
1897 break;
1898 case NODE_NEXT:
1899 yyerror1(&e->nd_loc, "Invalid next");
1900 break;
1901 case NODE_REDO:
1902 yyerror1(&e->nd_loc, "Invalid redo");
1903 break;
1904 default:
1905 yyerror1(&e->nd_loc, "unexpected node");
1906 goto end_checks; /* no nd_chain */
1907 }
1908 }
1909 end_checks:;
1910 }
1911 exits->nd_stts = RNODE(exits);
1912 exits->nd_chain = 0;
1913}
1914
1915#define WARN_EOL(tok) \
1916 (looking_at_eol_p(p) ? \
1917 (void)rb_warning0("'" tok "' at the end of line without an expression") : \
1918 (void)0)
1919static int looking_at_eol_p(struct parser_params *p);
1920
1921static NODE *
1922get_nd_value(struct parser_params *p, NODE *node)
1923{
1924 switch (nd_type(node)) {
1925 case NODE_GASGN:
1926 return RNODE_GASGN(node)->nd_value;
1927 case NODE_IASGN:
1928 return RNODE_IASGN(node)->nd_value;
1929 case NODE_LASGN:
1930 return RNODE_LASGN(node)->nd_value;
1931 case NODE_DASGN:
1932 return RNODE_DASGN(node)->nd_value;
1933 case NODE_MASGN:
1934 return RNODE_MASGN(node)->nd_value;
1935 case NODE_CVASGN:
1936 return RNODE_CVASGN(node)->nd_value;
1937 case NODE_CDECL:
1938 return RNODE_CDECL(node)->nd_value;
1939 default:
1940 compile_error(p, "get_nd_value: unexpected node: %s", parser_node_name(nd_type(node)));
1941 return 0;
1942 }
1943}
1944
1945static void
1946set_nd_value(struct parser_params *p, NODE *node, NODE *rhs)
1947{
1948 switch (nd_type(node)) {
1949 case NODE_CDECL:
1950 RNODE_CDECL(node)->nd_value = rhs;
1951 break;
1952 case NODE_GASGN:
1953 RNODE_GASGN(node)->nd_value = rhs;
1954 break;
1955 case NODE_IASGN:
1956 RNODE_IASGN(node)->nd_value = rhs;
1957 break;
1958 case NODE_LASGN:
1959 RNODE_LASGN(node)->nd_value = rhs;
1960 break;
1961 case NODE_DASGN:
1962 RNODE_DASGN(node)->nd_value = rhs;
1963 break;
1964 case NODE_MASGN:
1965 RNODE_MASGN(node)->nd_value = rhs;
1966 break;
1967 case NODE_CVASGN:
1968 RNODE_CVASGN(node)->nd_value = rhs;
1969 break;
1970 default:
1971 compile_error(p, "set_nd_value: unexpected node: %s", parser_node_name(nd_type(node)));
1972 break;
1973 }
1974}
1975
1976static ID
1977get_nd_vid(struct parser_params *p, NODE *node)
1978{
1979 switch (nd_type(node)) {
1980 case NODE_CDECL:
1981 return RNODE_CDECL(node)->nd_vid;
1982 case NODE_GASGN:
1983 return RNODE_GASGN(node)->nd_vid;
1984 case NODE_IASGN:
1985 return RNODE_IASGN(node)->nd_vid;
1986 case NODE_LASGN:
1987 return RNODE_LASGN(node)->nd_vid;
1988 case NODE_DASGN:
1989 return RNODE_DASGN(node)->nd_vid;
1990 case NODE_CVASGN:
1991 return RNODE_CVASGN(node)->nd_vid;
1992 default:
1993 compile_error(p, "get_nd_vid: unexpected node: %s", parser_node_name(nd_type(node)));
1994 return 0;
1995 }
1996}
1997
1998static NODE *
1999get_nd_args(struct parser_params *p, NODE *node)
2000{
2001 switch (nd_type(node)) {
2002 case NODE_CALL:
2003 return RNODE_CALL(node)->nd_args;
2004 case NODE_OPCALL:
2005 return RNODE_OPCALL(node)->nd_args;
2006 case NODE_FCALL:
2007 return RNODE_FCALL(node)->nd_args;
2008 case NODE_QCALL:
2009 return RNODE_QCALL(node)->nd_args;
2010 case NODE_SUPER:
2011 return RNODE_SUPER(node)->nd_args;
2012 case NODE_VCALL:
2013 case NODE_ZSUPER:
2014 case NODE_YIELD:
2015 case NODE_RETURN:
2016 case NODE_BREAK:
2017 case NODE_NEXT:
2018 return 0;
2019 default:
2020 compile_error(p, "get_nd_args: unexpected node: %s", parser_node_name(nd_type(node)));
2021 return 0;
2022 }
2023}
2024
2025static st_index_t
2026djb2(const uint8_t *str, size_t len)
2027{
2028 st_index_t hash = 5381;
2029
2030 for (size_t i = 0; i < len; i++) {
2031 hash = ((hash << 5) + hash) + str[i];
2032 }
2033
2034 return hash;
2035}
2036
2037static st_index_t
2038parser_memhash(const void *ptr, long len)
2039{
2040 return djb2(ptr, len);
2041}
2042
2043#define PARSER_STRING_PTR(str) (str->ptr)
2044#define PARSER_STRING_LEN(str) (str->len)
2045#define PARSER_STRING_END(str) (&str->ptr[str->len])
2046#define STRING_SIZE(str) ((size_t)str->len + 1)
2047#define STRING_TERM_LEN(str) (1)
2048#define STRING_TERM_FILL(str) (str->ptr[str->len] = '\0')
2049#define PARSER_STRING_RESIZE_CAPA_TERM(p,str,capacity,termlen) do {\
2050 SIZED_REALLOC_N(str->ptr, char, (size_t)total + termlen, STRING_SIZE(str)); \
2051 str->len = total; \
2052} while (0)
2053#define STRING_SET_LEN(str, n) do { \
2054 (str)->len = (n); \
2055} while (0)
2056#define PARSER_STRING_GETMEM(str, ptrvar, lenvar) \
2057 ((ptrvar) = str->ptr, \
2058 (lenvar) = str->len)
2059
2060static inline int
2061parser_string_char_at_end(struct parser_params *p, rb_parser_string_t *str, int when_empty)
2062{
2063 return PARSER_STRING_LEN(str) > 0 ? (unsigned char)PARSER_STRING_END(str)[-1] : when_empty;
2064}
2065
2066static rb_parser_string_t *
2067rb_parser_string_new(rb_parser_t *p, const char *ptr, long len)
2068{
2069 rb_parser_string_t *str;
2070
2071 if (len < 0) {
2072 rb_bug("negative string size (or size too big): %ld", len);
2073 }
2074
2075 str = xcalloc(1, sizeof(rb_parser_string_t));
2076 str->ptr = xcalloc(len + 1, sizeof(char));
2077
2078 if (ptr) {
2079 memcpy(PARSER_STRING_PTR(str), ptr, len);
2080 }
2081 STRING_SET_LEN(str, len);
2082 STRING_TERM_FILL(str);
2083 return str;
2084}
2085
2086static rb_parser_string_t *
2087rb_parser_encoding_string_new(rb_parser_t *p, const char *ptr, long len, rb_encoding *enc)
2088{
2089 rb_parser_string_t *str = rb_parser_string_new(p, ptr, len);
2090 str->coderange = RB_PARSER_ENC_CODERANGE_UNKNOWN;
2091 str->enc = enc;
2092 return str;
2093}
2094
2095#ifndef RIPPER
2096rb_parser_string_t *
2097rb_str_to_parser_string(rb_parser_t *p, VALUE str)
2098{
2099 /* Type check */
2100 rb_parser_string_t *ret = rb_parser_encoding_string_new(p, RSTRING_PTR(str), RSTRING_LEN(str), rb_enc_get(str));
2101 RB_GC_GUARD(str);
2102 return ret;
2103}
2104
2105void
2106rb_parser_string_free(rb_parser_t *p, rb_parser_string_t *str)
2107{
2108 if (!str) return;
2109 xfree(PARSER_STRING_PTR(str));
2110 xfree(str);
2111}
2112#endif
2113
2114static st_index_t
2115rb_parser_str_hash(rb_parser_string_t *str)
2116{
2117 return parser_memhash((const void *)PARSER_STRING_PTR(str), PARSER_STRING_LEN(str));
2118}
2119
2120static st_index_t
2121rb_char_p_hash(const char *c)
2122{
2123 return parser_memhash((const void *)c, strlen(c));
2124}
2125
2126static size_t
2127rb_parser_str_capacity(rb_parser_string_t *str, const int termlen)
2128{
2129 return PARSER_STRING_LEN(str);
2130}
2131
2132#ifndef RIPPER
2133static char *
2134rb_parser_string_end(rb_parser_string_t *str)
2135{
2136 return &str->ptr[str->len];
2137}
2138#endif
2139
2140static void
2141rb_parser_string_set_encoding(rb_parser_string_t *str, rb_encoding *enc)
2142{
2143 str->enc = enc;
2144}
2145
2146static rb_encoding *
2147rb_parser_str_get_encoding(rb_parser_string_t *str)
2148{
2149 return str->enc;
2150}
2151
2152#ifndef RIPPER
2153static bool
2154PARSER_ENCODING_IS_ASCII8BIT(struct parser_params *p, rb_parser_string_t *str)
2155{
2156 return rb_parser_str_get_encoding(str) == rb_ascii8bit_encoding();
2157}
2158#endif
2159
2160static int
2161PARSER_ENC_CODERANGE(rb_parser_string_t *str)
2162{
2163 return str->coderange;
2164}
2165
2166static void
2167PARSER_ENC_CODERANGE_SET(rb_parser_string_t *str, int coderange)
2168{
2169 str->coderange = coderange;
2170}
2171
2172static void
2173PARSER_ENCODING_CODERANGE_SET(rb_parser_string_t *str, rb_encoding *enc, enum rb_parser_string_coderange_type cr)
2174{
2175 rb_parser_string_set_encoding(str, enc);
2176 PARSER_ENC_CODERANGE_SET(str, cr);
2177}
2178
2179static void
2180PARSER_ENC_CODERANGE_CLEAR(rb_parser_string_t *str)
2181{
2182 str->coderange = RB_PARSER_ENC_CODERANGE_UNKNOWN;
2183}
2184
2185static bool
2186PARSER_ENC_CODERANGE_ASCIIONLY(rb_parser_string_t *str)
2187{
2188 return PARSER_ENC_CODERANGE(str) == RB_PARSER_ENC_CODERANGE_7BIT;
2189}
2190
2191static bool
2192PARSER_ENC_CODERANGE_CLEAN_P(int cr)
2193{
2194 return cr == RB_PARSER_ENC_CODERANGE_7BIT || cr == RB_PARSER_ENC_CODERANGE_VALID;
2195}
2196
2197static const char *
2198rb_parser_search_nonascii(const char *p, const char *e)
2199{
2200 const char *s = p;
2201
2202 for (; s < e; s++) {
2203 if (*s & 0x80) return s;
2204 }
2205
2206 return NULL;
2207}
2208
2209static int
2210rb_parser_coderange_scan(struct parser_params *p, const char *ptr, long len, rb_encoding *enc)
2211{
2212 const char *e = ptr + len;
2213
2214 if (enc == rb_ascii8bit_encoding()) {
2215 /* enc is ASCII-8BIT. ASCII-8BIT string never be broken. */
2216 ptr = rb_parser_search_nonascii(ptr, e);
2217 return ptr ? RB_PARSER_ENC_CODERANGE_VALID : RB_PARSER_ENC_CODERANGE_7BIT;
2218 }
2219
2220 /* parser string encoding is always asciicompat */
2221 ptr = rb_parser_search_nonascii(ptr, e);
2222 if (!ptr) return RB_PARSER_ENC_CODERANGE_7BIT;
2223 for (;;) {
2224 int ret = rb_enc_precise_mbclen(ptr, e, enc);
2225 if (!MBCLEN_CHARFOUND_P(ret)) return RB_PARSER_ENC_CODERANGE_BROKEN;
2226 ptr += MBCLEN_CHARFOUND_LEN(ret);
2227 if (ptr == e) break;
2228 ptr = rb_parser_search_nonascii(ptr, e);
2229 if (!ptr) break;
2230 }
2231
2232 return RB_PARSER_ENC_CODERANGE_VALID;
2233}
2234
2235static int
2236rb_parser_enc_coderange_scan(struct parser_params *p, rb_parser_string_t *str, rb_encoding *enc)
2237{
2238 return rb_parser_coderange_scan(p, PARSER_STRING_PTR(str), PARSER_STRING_LEN(str), enc);
2239}
2240
2241static int
2242rb_parser_enc_str_coderange(struct parser_params *p, rb_parser_string_t *str)
2243{
2244 int cr = PARSER_ENC_CODERANGE(str);
2245
2246 if (cr == RB_PARSER_ENC_CODERANGE_UNKNOWN) {
2247 cr = rb_parser_enc_coderange_scan(p, str, rb_parser_str_get_encoding(str));
2248 PARSER_ENC_CODERANGE_SET(str, cr);
2249 }
2250
2251 return cr;
2252}
2253
2254static rb_parser_string_t *
2255rb_parser_enc_associate(struct parser_params *p, rb_parser_string_t *str, rb_encoding *enc)
2256{
2257 if (rb_parser_str_get_encoding(str) == enc)
2258 return str;
2259 if (!PARSER_ENC_CODERANGE_ASCIIONLY(str)) {
2260 PARSER_ENC_CODERANGE_CLEAR(str);
2261 }
2262 rb_parser_string_set_encoding(str, enc);
2263 return str;
2264}
2265
2266static bool
2267rb_parser_is_ascii_string(struct parser_params *p, rb_parser_string_t *str)
2268{
2269 return rb_parser_enc_str_coderange(p, str) == RB_PARSER_ENC_CODERANGE_7BIT;
2270}
2271
2272static rb_encoding *
2273rb_parser_enc_compatible(struct parser_params *p, rb_parser_string_t *str1, rb_parser_string_t *str2)
2274{
2275 rb_encoding *enc1 = rb_parser_str_get_encoding(str1);
2276 rb_encoding *enc2 = rb_parser_str_get_encoding(str2);
2277
2278 if (enc1 == NULL || enc2 == NULL)
2279 return 0;
2280
2281 if (enc1 == enc2) {
2282 return enc1;
2283 }
2284
2285 if (PARSER_STRING_LEN(str2) == 0)
2286 return enc1;
2287 if (PARSER_STRING_LEN(str1) == 0)
2288 return rb_parser_is_ascii_string(p, str2) ? enc1 : enc2;
2289
2290 int cr1, cr2;
2291
2292 cr1 = rb_parser_enc_str_coderange(p, str1);
2293 cr2 = rb_parser_enc_str_coderange(p, str2);
2294
2295 if (cr1 != cr2) {
2296 if (cr1 == RB_PARSER_ENC_CODERANGE_7BIT) return enc2;
2297 if (cr2 == RB_PARSER_ENC_CODERANGE_7BIT) return enc1;
2298 }
2299
2300 if (cr2 == RB_PARSER_ENC_CODERANGE_7BIT) {
2301 return enc1;
2302 }
2303
2304 if (cr1 == RB_PARSER_ENC_CODERANGE_7BIT) {
2305 return enc2;
2306 }
2307
2308 return 0;
2309}
2310
2311static void
2312rb_parser_str_modify(rb_parser_string_t *str)
2313{
2314 PARSER_ENC_CODERANGE_CLEAR(str);
2315}
2316
2317static void
2318rb_parser_str_set_len(struct parser_params *p, rb_parser_string_t *str, long len)
2319{
2320 long capa;
2321 const int termlen = STRING_TERM_LEN(str);
2322
2323 if (len > (capa = (long)(rb_parser_str_capacity(str, termlen))) || len < 0) {
2324 rb_bug("probable buffer overflow: %ld for %ld", len, capa);
2325 }
2326
2327 int cr = PARSER_ENC_CODERANGE(str);
2328 if (cr == RB_PARSER_ENC_CODERANGE_UNKNOWN) {
2329 /* Leave unknown. */
2330 }
2331 else if (len > PARSER_STRING_LEN(str)) {
2332 PARSER_ENC_CODERANGE_SET(str, RB_PARSER_ENC_CODERANGE_UNKNOWN);
2333 }
2334 else if (len < PARSER_STRING_LEN(str)) {
2335 if (cr != RB_PARSER_ENC_CODERANGE_7BIT) {
2336 /* ASCII-only string is keeping after truncated. Valid
2337 * and broken may be invalid or valid, leave unknown. */
2338 PARSER_ENC_CODERANGE_SET(str, RB_PARSER_ENC_CODERANGE_UNKNOWN);
2339 }
2340 }
2341
2342 STRING_SET_LEN(str, len);
2343 STRING_TERM_FILL(str);
2344}
2345
2346static rb_parser_string_t *
2347rb_parser_str_buf_cat(struct parser_params *p, rb_parser_string_t *str, const char *ptr, long len)
2348{
2349 rb_parser_str_modify(str);
2350 if (len == 0) return 0;
2351
2352 long total, olen, off = -1;
2353 char *sptr;
2354 const int termlen = STRING_TERM_LEN(str);
2355
2356 PARSER_STRING_GETMEM(str, sptr, olen);
2357 if (ptr >= sptr && ptr <= sptr + olen) {
2358 off = ptr - sptr;
2359 }
2360
2361 if (olen > LONG_MAX - len) {
2362 compile_error(p, "string sizes too big");
2363 return 0;
2364 }
2365 total = olen + len;
2366 PARSER_STRING_RESIZE_CAPA_TERM(p, str, total, termlen);
2367 sptr = PARSER_STRING_PTR(str);
2368 if (off != -1) {
2369 ptr = sptr + off;
2370 }
2371 memcpy(sptr + olen, ptr, len);
2372 STRING_SET_LEN(str, total);
2373 STRING_TERM_FILL(str);
2374
2375 return str;
2376}
2377
2378#define parser_str_cat(str, ptr, len) rb_parser_str_buf_cat(p, str, ptr, len)
2379#define parser_str_cat_cstr(str, lit) rb_parser_str_buf_cat(p, str, lit, strlen(lit))
2380
2381static rb_parser_string_t *
2382rb_parser_enc_cr_str_buf_cat(struct parser_params *p, rb_parser_string_t *str, const char *ptr, long len,
2383 rb_encoding *ptr_enc, int ptr_cr, int *ptr_cr_ret)
2384{
2385 int str_cr, res_cr;
2386 rb_encoding *str_enc, *res_enc;
2387
2388 str_enc = rb_parser_str_get_encoding(str);
2389 str_cr = PARSER_STRING_LEN(str) ? PARSER_ENC_CODERANGE(str) : RB_PARSER_ENC_CODERANGE_7BIT;
2390
2391 if (str_enc == ptr_enc) {
2392 if (str_cr != RB_PARSER_ENC_CODERANGE_UNKNOWN && ptr_cr == RB_PARSER_ENC_CODERANGE_UNKNOWN) {
2393 ptr_cr = rb_parser_coderange_scan(p, ptr, len, ptr_enc);
2394 }
2395 }
2396 else {
2397 /* parser string encoding is always asciicompat */
2398 if (ptr_cr == RB_PARSER_ENC_CODERANGE_UNKNOWN) {
2399 ptr_cr = rb_parser_coderange_scan(p, ptr, len, ptr_enc);
2400 }
2401 if (str_cr == RB_PARSER_ENC_CODERANGE_UNKNOWN) {
2402 if (str_enc == rb_ascii8bit_encoding() || ptr_cr != RB_PARSER_ENC_CODERANGE_7BIT) {
2403 str_cr = rb_parser_enc_str_coderange(p, str);
2404 }
2405 }
2406 }
2407 if (ptr_cr_ret)
2408 *ptr_cr_ret = ptr_cr;
2409
2410 if (str_enc != ptr_enc &&
2411 str_cr != RB_PARSER_ENC_CODERANGE_7BIT &&
2412 ptr_cr != RB_PARSER_ENC_CODERANGE_7BIT) {
2413 goto incompatible;
2414 }
2415
2416 if (str_cr == RB_PARSER_ENC_CODERANGE_UNKNOWN) {
2417 res_enc = str_enc;
2418 res_cr = RB_PARSER_ENC_CODERANGE_UNKNOWN;
2419 }
2420 else if (str_cr == RB_PARSER_ENC_CODERANGE_7BIT) {
2421 if (ptr_cr == RB_PARSER_ENC_CODERANGE_7BIT) {
2422 res_enc = str_enc;
2423 res_cr = RB_PARSER_ENC_CODERANGE_7BIT;
2424 }
2425 else {
2426 res_enc = ptr_enc;
2427 res_cr = ptr_cr;
2428 }
2429 }
2430 else if (str_cr == RB_PARSER_ENC_CODERANGE_VALID) {
2431 res_enc = str_enc;
2432 if (PARSER_ENC_CODERANGE_CLEAN_P(ptr_cr))
2433 res_cr = str_cr;
2434 else
2435 res_cr = ptr_cr;
2436 }
2437 else { /* str_cr == RB_PARSER_ENC_CODERANGE_BROKEN */
2438 res_enc = str_enc;
2439 res_cr = str_cr;
2440 if (0 < len) res_cr = RB_PARSER_ENC_CODERANGE_UNKNOWN;
2441 }
2442
2443 if (len < 0) {
2444 compile_error(p, "negative string size (or size too big)");
2445 }
2446 parser_str_cat(str, ptr, len);
2447 PARSER_ENCODING_CODERANGE_SET(str, res_enc, res_cr);
2448 return str;
2449
2450 incompatible:
2451 compile_error(p, "incompatible character encodings: %s and %s",
2452 rb_enc_name(str_enc), rb_enc_name(ptr_enc));
2454
2455}
2456
2457static rb_parser_string_t *
2458rb_parser_enc_str_buf_cat(struct parser_params *p, rb_parser_string_t *str, const char *ptr, long len,
2459 rb_encoding *ptr_enc)
2460{
2461 return rb_parser_enc_cr_str_buf_cat(p, str, ptr, len, ptr_enc, RB_PARSER_ENC_CODERANGE_UNKNOWN, NULL);
2462}
2463
2464static rb_parser_string_t *
2465rb_parser_str_buf_append(struct parser_params *p, rb_parser_string_t *str, rb_parser_string_t *str2)
2466{
2467 int str2_cr = rb_parser_enc_str_coderange(p, str2);
2468
2469 rb_parser_enc_cr_str_buf_cat(p, str, PARSER_STRING_PTR(str2), PARSER_STRING_LEN(str2),
2470 rb_parser_str_get_encoding(str2), str2_cr, &str2_cr);
2471
2472 PARSER_ENC_CODERANGE_SET(str2, str2_cr);
2473
2474 return str;
2475}
2476
2477static rb_parser_string_t *
2478rb_parser_str_resize(struct parser_params *p, rb_parser_string_t *str, long len)
2479{
2480 if (len < 0) {
2481 rb_bug("negative string size (or size too big)");
2482 }
2483
2484 long slen = PARSER_STRING_LEN(str);
2485
2486 if (slen > len && PARSER_ENC_CODERANGE(str) != RB_PARSER_ENC_CODERANGE_7BIT) {
2487 PARSER_ENC_CODERANGE_CLEAR(str);
2488 }
2489
2490 {
2491 long capa;
2492 const int termlen = STRING_TERM_LEN(str);
2493
2494 if ((capa = slen) < len) {
2495 SIZED_REALLOC_N(str->ptr, char, (size_t)len + termlen, STRING_SIZE(str));
2496 }
2497 else if (len == slen) return str;
2498 STRING_SET_LEN(str, len);
2499 STRING_TERM_FILL(str);
2500 }
2501 return str;
2502}
2503
2504# define PARSER_ENC_STRING_GETMEM(str, ptrvar, lenvar, encvar) \
2505 ((ptrvar) = str->ptr, \
2506 (lenvar) = str->len, \
2507 (encvar) = str->enc)
2508
2509static int
2510rb_parser_string_hash_cmp(rb_parser_string_t *str1, rb_parser_string_t *str2)
2511{
2512 long len1, len2;
2513 const char *ptr1, *ptr2;
2514 rb_encoding *enc1, *enc2;
2515
2516 PARSER_ENC_STRING_GETMEM(str1, ptr1, len1, enc1);
2517 PARSER_ENC_STRING_GETMEM(str2, ptr2, len2, enc2);
2518
2519 return (len1 != len2 ||
2520 enc1 != enc2 ||
2521 memcmp(ptr1, ptr2, len1) != 0);
2522}
2523
2524static void
2525rb_parser_ary_extend(rb_parser_t *p, rb_parser_ary_t *ary, long len)
2526{
2527 long i;
2528 if (ary->capa < len) {
2529 ary->capa = len;
2530 ary->data = (rb_parser_ary_data *)xrealloc(ary->data, sizeof(rb_parser_ary_data) * len);
2531 for (i = ary->len; i < len; i++) {
2532 ary->data[i] = 0;
2533 }
2534 }
2535}
2536
2537/*
2538 * Do not call this directly.
2539 * Use rb_parser_ary_new_capa_for_XXX() instead.
2540 */
2541static rb_parser_ary_t *
2542parser_ary_new_capa(rb_parser_t *p, long len)
2543{
2544 if (len < 0) {
2545 rb_bug("negative array size (or size too big): %ld", len);
2546 }
2547 rb_parser_ary_t *ary = xcalloc(1, sizeof(rb_parser_ary_t));
2548 ary->data_type = 0;
2549 ary->len = 0;
2550 ary->capa = len;
2551 if (0 < len) {
2552 ary->data = (rb_parser_ary_data *)xcalloc(len, sizeof(rb_parser_ary_data));
2553 }
2554 else {
2555 ary->data = NULL;
2556 }
2557 return ary;
2558}
2559
2560#ifndef RIPPER
2561static rb_parser_ary_t *
2562rb_parser_ary_new_capa_for_script_line(rb_parser_t *p, long len)
2563{
2564 rb_parser_ary_t *ary = parser_ary_new_capa(p, len);
2565 ary->data_type = PARSER_ARY_DATA_SCRIPT_LINE;
2566 return ary;
2567}
2568
2569static rb_parser_ary_t *
2570rb_parser_ary_new_capa_for_ast_token(rb_parser_t *p, long len)
2571{
2572 rb_parser_ary_t *ary = parser_ary_new_capa(p, len);
2573 ary->data_type = PARSER_ARY_DATA_AST_TOKEN;
2574 return ary;
2575}
2576#endif
2577
2578static rb_parser_ary_t *
2579rb_parser_ary_new_capa_for_node(rb_parser_t *p, long len)
2580{
2581 rb_parser_ary_t *ary = parser_ary_new_capa(p, len);
2582 ary->data_type = PARSER_ARY_DATA_NODE;
2583 return ary;
2584}
2585
2586/*
2587 * Do not call this directly.
2588 * Use rb_parser_ary_push_XXX() instead.
2589 */
2590static rb_parser_ary_t *
2591parser_ary_push(rb_parser_t *p, rb_parser_ary_t *ary, rb_parser_ary_data val)
2592{
2593 if (ary->len == ary->capa) {
2594 rb_parser_ary_extend(p, ary, ary->len == 0 ? 1 : ary->len * 2);
2595 }
2596 ary->data[ary->len++] = val;
2597 return ary;
2598}
2599
2600#ifndef RIPPER
2601static rb_parser_ary_t *
2602rb_parser_ary_push_ast_token(rb_parser_t *p, rb_parser_ary_t *ary, rb_parser_ast_token_t *val)
2603{
2604 if (ary->data_type != PARSER_ARY_DATA_AST_TOKEN) {
2605 rb_bug("unexpected rb_parser_ary_data_type: %d", ary->data_type);
2606 }
2607 return parser_ary_push(p, ary, val);
2608}
2609
2610static rb_parser_ary_t *
2611rb_parser_ary_push_script_line(rb_parser_t *p, rb_parser_ary_t *ary, rb_parser_string_t *val)
2612{
2613 if (ary->data_type != PARSER_ARY_DATA_SCRIPT_LINE) {
2614 rb_bug("unexpected rb_parser_ary_data_type: %d", ary->data_type);
2615 }
2616 return parser_ary_push(p, ary, val);
2617}
2618#endif
2619
2620static rb_parser_ary_t *
2621rb_parser_ary_push_node(rb_parser_t *p, rb_parser_ary_t *ary, NODE *val)
2622{
2623 if (ary->data_type != PARSER_ARY_DATA_NODE) {
2624 rb_bug("unexpected rb_parser_ary_data_type: %d", ary->data_type);
2625 }
2626 return parser_ary_push(p, ary, val);
2627}
2628
2629#ifndef RIPPER
2630static void
2631rb_parser_ast_token_free(rb_parser_t *p, rb_parser_ast_token_t *token)
2632{
2633 if (!token) return;
2634 rb_parser_string_free(p, token->str);
2635 xfree(token);
2636}
2637
2638static void
2639rb_parser_ary_free(rb_parser_t *p, rb_parser_ary_t *ary)
2640{
2641# define foreach_ary(ptr) \
2642 for (rb_parser_ary_data *ptr = ary->data, *const end_ary_data = ptr + ary->len; \
2643 ptr < end_ary_data; ptr++)
2644 switch (ary->data_type) {
2645 case PARSER_ARY_DATA_AST_TOKEN:
2646 foreach_ary(data) {rb_parser_ast_token_free(p, *data);}
2647 break;
2648 case PARSER_ARY_DATA_SCRIPT_LINE:
2649 foreach_ary(data) {rb_parser_string_free(p, *data);}
2650 break;
2651 case PARSER_ARY_DATA_NODE:
2652 /* Do nothing because nodes are freed when rb_ast_t is freed */
2653 break;
2654 default:
2655 rb_bug("unexpected rb_parser_ary_data_type: %d", ary->data_type);
2656 break;
2657 }
2658# undef foreach_ary
2659 xfree(ary->data);
2660 xfree(ary);
2661}
2662
2663#endif /* !RIPPER */
2664
2665#line 2666 "parse.c"
2666
2667# ifndef YY_CAST
2668# ifdef __cplusplus
2669# define YY_CAST(Type, Val) static_cast<Type> (Val)
2670# define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast<Type> (Val)
2671# else
2672# define YY_CAST(Type, Val) ((Type) (Val))
2673# define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val))
2674# endif
2675# endif
2676# ifndef YY_NULLPTR
2677# if defined __cplusplus
2678# if 201103L <= __cplusplus
2679# define YY_NULLPTR nullptr
2680# else
2681# define YY_NULLPTR 0
2682# endif
2683# else
2684# define YY_NULLPTR ((void*)0)
2685# endif
2686# endif
2687
2688#include "parse.h"
2689/* Symbol kind. */
2690enum yysymbol_kind_t
2691{
2692 YYSYMBOL_YYEMPTY = -2,
2693 YYSYMBOL_YYEOF = 0, /* "end-of-input" */
2694 YYSYMBOL_YYerror = 1, /* error */
2695 YYSYMBOL_YYUNDEF = 2, /* "invalid token" */
2696 YYSYMBOL_keyword_class = 3, /* "'class'" */
2697 YYSYMBOL_keyword_module = 4, /* "'module'" */
2698 YYSYMBOL_keyword_def = 5, /* "'def'" */
2699 YYSYMBOL_keyword_undef = 6, /* "'undef'" */
2700 YYSYMBOL_keyword_begin = 7, /* "'begin'" */
2701 YYSYMBOL_keyword_rescue = 8, /* "'rescue'" */
2702 YYSYMBOL_keyword_ensure = 9, /* "'ensure'" */
2703 YYSYMBOL_keyword_end = 10, /* "'end'" */
2704 YYSYMBOL_keyword_if = 11, /* "'if'" */
2705 YYSYMBOL_keyword_unless = 12, /* "'unless'" */
2706 YYSYMBOL_keyword_then = 13, /* "'then'" */
2707 YYSYMBOL_keyword_elsif = 14, /* "'elsif'" */
2708 YYSYMBOL_keyword_else = 15, /* "'else'" */
2709 YYSYMBOL_keyword_case = 16, /* "'case'" */
2710 YYSYMBOL_keyword_when = 17, /* "'when'" */
2711 YYSYMBOL_keyword_while = 18, /* "'while'" */
2712 YYSYMBOL_keyword_until = 19, /* "'until'" */
2713 YYSYMBOL_keyword_for = 20, /* "'for'" */
2714 YYSYMBOL_keyword_break = 21, /* "'break'" */
2715 YYSYMBOL_keyword_next = 22, /* "'next'" */
2716 YYSYMBOL_keyword_redo = 23, /* "'redo'" */
2717 YYSYMBOL_keyword_retry = 24, /* "'retry'" */
2718 YYSYMBOL_keyword_in = 25, /* "'in'" */
2719 YYSYMBOL_keyword_do = 26, /* "'do'" */
2720 YYSYMBOL_keyword_do_cond = 27, /* "'do' for condition" */
2721 YYSYMBOL_keyword_do_block = 28, /* "'do' for block" */
2722 YYSYMBOL_keyword_do_LAMBDA = 29, /* "'do' for lambda" */
2723 YYSYMBOL_keyword_return = 30, /* "'return'" */
2724 YYSYMBOL_keyword_yield = 31, /* "'yield'" */
2725 YYSYMBOL_keyword_super = 32, /* "'super'" */
2726 YYSYMBOL_keyword_self = 33, /* "'self'" */
2727 YYSYMBOL_keyword_nil = 34, /* "'nil'" */
2728 YYSYMBOL_keyword_true = 35, /* "'true'" */
2729 YYSYMBOL_keyword_false = 36, /* "'false'" */
2730 YYSYMBOL_keyword_and = 37, /* "'and'" */
2731 YYSYMBOL_keyword_or = 38, /* "'or'" */
2732 YYSYMBOL_keyword_not = 39, /* "'not'" */
2733 YYSYMBOL_modifier_if = 40, /* "'if' modifier" */
2734 YYSYMBOL_modifier_unless = 41, /* "'unless' modifier" */
2735 YYSYMBOL_modifier_while = 42, /* "'while' modifier" */
2736 YYSYMBOL_modifier_until = 43, /* "'until' modifier" */
2737 YYSYMBOL_modifier_rescue = 44, /* "'rescue' modifier" */
2738 YYSYMBOL_keyword_alias = 45, /* "'alias'" */
2739 YYSYMBOL_keyword_defined = 46, /* "'defined?'" */
2740 YYSYMBOL_keyword_BEGIN = 47, /* "'BEGIN'" */
2741 YYSYMBOL_keyword_END = 48, /* "'END'" */
2742 YYSYMBOL_keyword__LINE__ = 49, /* "'__LINE__'" */
2743 YYSYMBOL_keyword__FILE__ = 50, /* "'__FILE__'" */
2744 YYSYMBOL_keyword__ENCODING__ = 51, /* "'__ENCODING__'" */
2745 YYSYMBOL_tIDENTIFIER = 52, /* "local variable or method" */
2746 YYSYMBOL_tFID = 53, /* "method" */
2747 YYSYMBOL_tGVAR = 54, /* "global variable" */
2748 YYSYMBOL_tIVAR = 55, /* "instance variable" */
2749 YYSYMBOL_tCONSTANT = 56, /* "constant" */
2750 YYSYMBOL_tCVAR = 57, /* "class variable" */
2751 YYSYMBOL_tLABEL = 58, /* "label" */
2752 YYSYMBOL_tINTEGER = 59, /* "integer literal" */
2753 YYSYMBOL_tFLOAT = 60, /* "float literal" */
2754 YYSYMBOL_tRATIONAL = 61, /* "rational literal" */
2755 YYSYMBOL_tIMAGINARY = 62, /* "imaginary literal" */
2756 YYSYMBOL_tCHAR = 63, /* "char literal" */
2757 YYSYMBOL_tNTH_REF = 64, /* "numbered reference" */
2758 YYSYMBOL_tBACK_REF = 65, /* "back reference" */
2759 YYSYMBOL_tSTRING_CONTENT = 66, /* "literal content" */
2760 YYSYMBOL_tREGEXP_END = 67, /* tREGEXP_END */
2761 YYSYMBOL_tDUMNY_END = 68, /* "dummy end" */
2762 YYSYMBOL_69_ = 69, /* '.' */
2763 YYSYMBOL_70_backslash_ = 70, /* "backslash" */
2764 YYSYMBOL_tSP = 71, /* "escaped space" */
2765 YYSYMBOL_72_escaped_horizontal_tab_ = 72, /* "escaped horizontal tab" */
2766 YYSYMBOL_73_escaped_form_feed_ = 73, /* "escaped form feed" */
2767 YYSYMBOL_74_escaped_carriage_return_ = 74, /* "escaped carriage return" */
2768 YYSYMBOL_75_escaped_vertical_tab_ = 75, /* "escaped vertical tab" */
2769 YYSYMBOL_tUPLUS = 76, /* "unary+" */
2770 YYSYMBOL_tUMINUS = 77, /* "unary-" */
2771 YYSYMBOL_tPOW = 78, /* "**" */
2772 YYSYMBOL_tCMP = 79, /* "<=>" */
2773 YYSYMBOL_tEQ = 80, /* "==" */
2774 YYSYMBOL_tEQQ = 81, /* "===" */
2775 YYSYMBOL_tNEQ = 82, /* "!=" */
2776 YYSYMBOL_tGEQ = 83, /* ">=" */
2777 YYSYMBOL_tLEQ = 84, /* "<=" */
2778 YYSYMBOL_tANDOP = 85, /* "&&" */
2779 YYSYMBOL_tOROP = 86, /* "||" */
2780 YYSYMBOL_tMATCH = 87, /* "=~" */
2781 YYSYMBOL_tNMATCH = 88, /* "!~" */
2782 YYSYMBOL_tDOT2 = 89, /* ".." */
2783 YYSYMBOL_tDOT3 = 90, /* "..." */
2784 YYSYMBOL_tBDOT2 = 91, /* "(.." */
2785 YYSYMBOL_tBDOT3 = 92, /* "(..." */
2786 YYSYMBOL_tAREF = 93, /* "[]" */
2787 YYSYMBOL_tASET = 94, /* "[]=" */
2788 YYSYMBOL_tLSHFT = 95, /* "<<" */
2789 YYSYMBOL_tRSHFT = 96, /* ">>" */
2790 YYSYMBOL_tANDDOT = 97, /* "&." */
2791 YYSYMBOL_tCOLON2 = 98, /* "::" */
2792 YYSYMBOL_tCOLON3 = 99, /* ":: at EXPR_BEG" */
2793 YYSYMBOL_tOP_ASGN = 100, /* "operator-assignment" */
2794 YYSYMBOL_tASSOC = 101, /* "=>" */
2795 YYSYMBOL_tLPAREN = 102, /* "(" */
2796 YYSYMBOL_tLPAREN_ARG = 103, /* "( arg" */
2797 YYSYMBOL_tRPAREN = 104, /* ")" */
2798 YYSYMBOL_tLBRACK = 105, /* "[" */
2799 YYSYMBOL_tLBRACE = 106, /* "{" */
2800 YYSYMBOL_tLBRACE_ARG = 107, /* "{ arg" */
2801 YYSYMBOL_tSTAR = 108, /* "*" */
2802 YYSYMBOL_tDSTAR = 109, /* "**arg" */
2803 YYSYMBOL_tAMPER = 110, /* "&" */
2804 YYSYMBOL_tLAMBDA = 111, /* "->" */
2805 YYSYMBOL_tSYMBEG = 112, /* "symbol literal" */
2806 YYSYMBOL_tSTRING_BEG = 113, /* "string literal" */
2807 YYSYMBOL_tXSTRING_BEG = 114, /* "backtick literal" */
2808 YYSYMBOL_tREGEXP_BEG = 115, /* "regexp literal" */
2809 YYSYMBOL_tWORDS_BEG = 116, /* "word list" */
2810 YYSYMBOL_tQWORDS_BEG = 117, /* "verbatim word list" */
2811 YYSYMBOL_tSYMBOLS_BEG = 118, /* "symbol list" */
2812 YYSYMBOL_tQSYMBOLS_BEG = 119, /* "verbatim symbol list" */
2813 YYSYMBOL_tSTRING_END = 120, /* "terminator" */
2814 YYSYMBOL_tSTRING_DEND = 121, /* "'}'" */
2815 YYSYMBOL_tSTRING_DBEG = 122, /* "'#{'" */
2816 YYSYMBOL_tSTRING_DVAR = 123, /* tSTRING_DVAR */
2817 YYSYMBOL_tLAMBEG = 124, /* tLAMBEG */
2818 YYSYMBOL_tLABEL_END = 125, /* tLABEL_END */
2819 YYSYMBOL_tIGNORED_NL = 126, /* tIGNORED_NL */
2820 YYSYMBOL_tCOMMENT = 127, /* tCOMMENT */
2821 YYSYMBOL_tEMBDOC_BEG = 128, /* tEMBDOC_BEG */
2822 YYSYMBOL_tEMBDOC = 129, /* tEMBDOC */
2823 YYSYMBOL_tEMBDOC_END = 130, /* tEMBDOC_END */
2824 YYSYMBOL_tHEREDOC_BEG = 131, /* tHEREDOC_BEG */
2825 YYSYMBOL_tHEREDOC_END = 132, /* tHEREDOC_END */
2826 YYSYMBOL_k__END__ = 133, /* k__END__ */
2827 YYSYMBOL_tLOWEST = 134, /* tLOWEST */
2828 YYSYMBOL_135_ = 135, /* '=' */
2829 YYSYMBOL_136_ = 136, /* '?' */
2830 YYSYMBOL_137_ = 137, /* ':' */
2831 YYSYMBOL_138_ = 138, /* '>' */
2832 YYSYMBOL_139_ = 139, /* '<' */
2833 YYSYMBOL_140_ = 140, /* '|' */
2834 YYSYMBOL_141_ = 141, /* '^' */
2835 YYSYMBOL_142_ = 142, /* '&' */
2836 YYSYMBOL_143_ = 143, /* '+' */
2837 YYSYMBOL_144_ = 144, /* '-' */
2838 YYSYMBOL_145_ = 145, /* '*' */
2839 YYSYMBOL_146_ = 146, /* '/' */
2840 YYSYMBOL_147_ = 147, /* '%' */
2841 YYSYMBOL_tUMINUS_NUM = 148, /* tUMINUS_NUM */
2842 YYSYMBOL_149_ = 149, /* '!' */
2843 YYSYMBOL_150_ = 150, /* '~' */
2844 YYSYMBOL_tLAST_TOKEN = 151, /* tLAST_TOKEN */
2845 YYSYMBOL_152_ = 152, /* '{' */
2846 YYSYMBOL_153_ = 153, /* '}' */
2847 YYSYMBOL_154_ = 154, /* '[' */
2848 YYSYMBOL_155_n_ = 155, /* '\n' */
2849 YYSYMBOL_156_ = 156, /* ',' */
2850 YYSYMBOL_157_ = 157, /* '`' */
2851 YYSYMBOL_158_ = 158, /* '(' */
2852 YYSYMBOL_159_ = 159, /* ')' */
2853 YYSYMBOL_160_ = 160, /* ']' */
2854 YYSYMBOL_161_ = 161, /* ';' */
2855 YYSYMBOL_162_ = 162, /* ' ' */
2856 YYSYMBOL_YYACCEPT = 163, /* $accept */
2857 YYSYMBOL_164_1 = 164, /* $@1 */
2858 YYSYMBOL_program = 165, /* program */
2859 YYSYMBOL_option_terms = 166, /* option_terms */
2860 YYSYMBOL_top_compstmt = 167, /* top_compstmt */
2861 YYSYMBOL_top_stmts = 168, /* top_stmts */
2862 YYSYMBOL_top_stmt = 169, /* top_stmt */
2863 YYSYMBOL_block_open = 170, /* block_open */
2864 YYSYMBOL_begin_block = 171, /* begin_block */
2865 YYSYMBOL_172_2 = 172, /* $@2 */
2866 YYSYMBOL_173_3 = 173, /* $@3 */
2867 YYSYMBOL_bodystmt = 174, /* bodystmt */
2868 YYSYMBOL_175_4 = 175, /* $@4 */
2869 YYSYMBOL_compstmt = 176, /* compstmt */
2870 YYSYMBOL_stmts = 177, /* stmts */
2871 YYSYMBOL_stmt_or_begin = 178, /* stmt_or_begin */
2872 YYSYMBOL_179_5 = 179, /* $@5 */
2873 YYSYMBOL_allow_exits = 180, /* allow_exits */
2874 YYSYMBOL_k_END = 181, /* k_END */
2875 YYSYMBOL_182_6 = 182, /* $@6 */
2876 YYSYMBOL_stmt = 183, /* stmt */
2877 YYSYMBOL_command_asgn = 184, /* command_asgn */
2878 YYSYMBOL_endless_command = 185, /* endless_command */
2879 YYSYMBOL_option__n_ = 186, /* option_'\n' */
2880 YYSYMBOL_command_rhs = 187, /* command_rhs */
2881 YYSYMBOL_expr = 188, /* expr */
2882 YYSYMBOL_189_7 = 189, /* $@7 */
2883 YYSYMBOL_190_8 = 190, /* $@8 */
2884 YYSYMBOL_def_name = 191, /* def_name */
2885 YYSYMBOL_defn_head = 192, /* defn_head */
2886 YYSYMBOL_193_9 = 193, /* $@9 */
2887 YYSYMBOL_defs_head = 194, /* defs_head */
2888 YYSYMBOL_expr_value = 195, /* expr_value */
2889 YYSYMBOL_196_10 = 196, /* $@10 */
2890 YYSYMBOL_197_11 = 197, /* $@11 */
2891 YYSYMBOL_expr_value_do = 198, /* expr_value_do */
2892 YYSYMBOL_command_call = 199, /* command_call */
2893 YYSYMBOL_block_command = 200, /* block_command */
2894 YYSYMBOL_cmd_brace_block = 201, /* cmd_brace_block */
2895 YYSYMBOL_fcall = 202, /* fcall */
2896 YYSYMBOL_command = 203, /* command */
2897 YYSYMBOL_mlhs = 204, /* mlhs */
2898 YYSYMBOL_mlhs_inner = 205, /* mlhs_inner */
2899 YYSYMBOL_mlhs_basic = 206, /* mlhs_basic */
2900 YYSYMBOL_mlhs_item = 207, /* mlhs_item */
2901 YYSYMBOL_mlhs_head = 208, /* mlhs_head */
2902 YYSYMBOL_mlhs_post = 209, /* mlhs_post */
2903 YYSYMBOL_mlhs_node = 210, /* mlhs_node */
2904 YYSYMBOL_lhs = 211, /* lhs */
2905 YYSYMBOL_cname = 212, /* cname */
2906 YYSYMBOL_cpath = 213, /* cpath */
2907 YYSYMBOL_fname = 214, /* fname */
2908 YYSYMBOL_fitem = 215, /* fitem */
2909 YYSYMBOL_undef_list = 216, /* undef_list */
2910 YYSYMBOL_217_12 = 217, /* $@12 */
2911 YYSYMBOL_op = 218, /* op */
2912 YYSYMBOL_reswords = 219, /* reswords */
2913 YYSYMBOL_arg = 220, /* arg */
2914 YYSYMBOL_endless_arg = 221, /* endless_arg */
2915 YYSYMBOL_relop = 222, /* relop */
2916 YYSYMBOL_rel_expr = 223, /* rel_expr */
2917 YYSYMBOL_lex_ctxt = 224, /* lex_ctxt */
2918 YYSYMBOL_begin_defined = 225, /* begin_defined */
2919 YYSYMBOL_after_rescue = 226, /* after_rescue */
2920 YYSYMBOL_arg_value = 227, /* arg_value */
2921 YYSYMBOL_aref_args = 228, /* aref_args */
2922 YYSYMBOL_arg_rhs = 229, /* arg_rhs */
2923 YYSYMBOL_paren_args = 230, /* paren_args */
2924 YYSYMBOL_opt_paren_args = 231, /* opt_paren_args */
2925 YYSYMBOL_opt_call_args = 232, /* opt_call_args */
2926 YYSYMBOL_call_args = 233, /* call_args */
2927 YYSYMBOL_234_13 = 234, /* $@13 */
2928 YYSYMBOL_command_args = 235, /* command_args */
2929 YYSYMBOL_block_arg = 236, /* block_arg */
2930 YYSYMBOL_opt_block_arg = 237, /* opt_block_arg */
2931 YYSYMBOL_args = 238, /* args */
2932 YYSYMBOL_arg_splat = 239, /* arg_splat */
2933 YYSYMBOL_mrhs_arg = 240, /* mrhs_arg */
2934 YYSYMBOL_mrhs = 241, /* mrhs */
2935 YYSYMBOL_primary = 242, /* primary */
2936 YYSYMBOL_243_14 = 243, /* $@14 */
2937 YYSYMBOL_244_15 = 244, /* $@15 */
2938 YYSYMBOL_245_16 = 245, /* @16 */
2939 YYSYMBOL_246_17 = 246, /* @17 */
2940 YYSYMBOL_247_18 = 247, /* $@18 */
2941 YYSYMBOL_248_19 = 248, /* $@19 */
2942 YYSYMBOL_249_20 = 249, /* $@20 */
2943 YYSYMBOL_250_21 = 250, /* $@21 */
2944 YYSYMBOL_251_22 = 251, /* $@22 */
2945 YYSYMBOL_primary_value = 252, /* primary_value */
2946 YYSYMBOL_k_begin = 253, /* k_begin */
2947 YYSYMBOL_k_if = 254, /* k_if */
2948 YYSYMBOL_k_unless = 255, /* k_unless */
2949 YYSYMBOL_k_while = 256, /* k_while */
2950 YYSYMBOL_k_until = 257, /* k_until */
2951 YYSYMBOL_k_case = 258, /* k_case */
2952 YYSYMBOL_k_for = 259, /* k_for */
2953 YYSYMBOL_k_class = 260, /* k_class */
2954 YYSYMBOL_k_module = 261, /* k_module */
2955 YYSYMBOL_k_def = 262, /* k_def */
2956 YYSYMBOL_k_do = 263, /* k_do */
2957 YYSYMBOL_k_do_block = 264, /* k_do_block */
2958 YYSYMBOL_k_rescue = 265, /* k_rescue */
2959 YYSYMBOL_k_ensure = 266, /* k_ensure */
2960 YYSYMBOL_k_when = 267, /* k_when */
2961 YYSYMBOL_k_else = 268, /* k_else */
2962 YYSYMBOL_k_elsif = 269, /* k_elsif */
2963 YYSYMBOL_k_end = 270, /* k_end */
2964 YYSYMBOL_k_return = 271, /* k_return */
2965 YYSYMBOL_k_yield = 272, /* k_yield */
2966 YYSYMBOL_then = 273, /* then */
2967 YYSYMBOL_do = 274, /* do */
2968 YYSYMBOL_if_tail = 275, /* if_tail */
2969 YYSYMBOL_opt_else = 276, /* opt_else */
2970 YYSYMBOL_for_var = 277, /* for_var */
2971 YYSYMBOL_f_marg = 278, /* f_marg */
2972 YYSYMBOL_f_marg_list = 279, /* f_marg_list */
2973 YYSYMBOL_f_margs = 280, /* f_margs */
2974 YYSYMBOL_f_rest_marg = 281, /* f_rest_marg */
2975 YYSYMBOL_f_any_kwrest = 282, /* f_any_kwrest */
2976 YYSYMBOL_283_23 = 283, /* $@23 */
2977 YYSYMBOL_f_eq = 284, /* f_eq */
2978 YYSYMBOL_f_kwarg_f_block_kw = 285, /* f_kwarg_f_block_kw */
2979 YYSYMBOL_block_args_tail = 286, /* block_args_tail */
2980 YYSYMBOL_excessed_comma = 287, /* excessed_comma */
2981 YYSYMBOL_f_opt_primary_value = 288, /* f_opt_primary_value */
2982 YYSYMBOL_f_optarg_primary_value = 289, /* f_optarg_primary_value */
2983 YYSYMBOL_opt_args_tail_block_args_tail = 290, /* opt_args_tail_block_args_tail */
2984 YYSYMBOL_block_param = 291, /* block_param */
2985 YYSYMBOL_opt_block_param = 292, /* opt_block_param */
2986 YYSYMBOL_block_param_def = 293, /* block_param_def */
2987 YYSYMBOL_opt_bv_decl = 294, /* opt_bv_decl */
2988 YYSYMBOL_bv_decls = 295, /* bv_decls */
2989 YYSYMBOL_bvar = 296, /* bvar */
2990 YYSYMBOL_max_numparam = 297, /* max_numparam */
2991 YYSYMBOL_numparam = 298, /* numparam */
2992 YYSYMBOL_it_id = 299, /* it_id */
2993 YYSYMBOL_300_24 = 300, /* @24 */
2994 YYSYMBOL_301_25 = 301, /* $@25 */
2995 YYSYMBOL_lambda = 302, /* lambda */
2996 YYSYMBOL_f_larglist = 303, /* f_larglist */
2997 YYSYMBOL_lambda_body = 304, /* lambda_body */
2998 YYSYMBOL_305_26 = 305, /* $@26 */
2999 YYSYMBOL_do_block = 306, /* do_block */
3000 YYSYMBOL_block_call = 307, /* block_call */
3001 YYSYMBOL_method_call = 308, /* method_call */
3002 YYSYMBOL_brace_block = 309, /* brace_block */
3003 YYSYMBOL_310_27 = 310, /* @27 */
3004 YYSYMBOL_brace_body = 311, /* brace_body */
3005 YYSYMBOL_312_28 = 312, /* @28 */
3006 YYSYMBOL_do_body = 313, /* do_body */
3007 YYSYMBOL_case_args = 314, /* case_args */
3008 YYSYMBOL_case_body = 315, /* case_body */
3009 YYSYMBOL_cases = 316, /* cases */
3010 YYSYMBOL_p_pvtbl = 317, /* p_pvtbl */
3011 YYSYMBOL_p_pktbl = 318, /* p_pktbl */
3012 YYSYMBOL_p_in_kwarg = 319, /* p_in_kwarg */
3013 YYSYMBOL_320_29 = 320, /* $@29 */
3014 YYSYMBOL_p_case_body = 321, /* p_case_body */
3015 YYSYMBOL_p_cases = 322, /* p_cases */
3016 YYSYMBOL_p_top_expr = 323, /* p_top_expr */
3017 YYSYMBOL_p_top_expr_body = 324, /* p_top_expr_body */
3018 YYSYMBOL_p_expr = 325, /* p_expr */
3019 YYSYMBOL_p_as = 326, /* p_as */
3020 YYSYMBOL_p_alt = 327, /* p_alt */
3021 YYSYMBOL_p_lparen = 328, /* p_lparen */
3022 YYSYMBOL_p_lbracket = 329, /* p_lbracket */
3023 YYSYMBOL_p_expr_basic = 330, /* p_expr_basic */
3024 YYSYMBOL_331_30 = 331, /* $@30 */
3025 YYSYMBOL_p_args = 332, /* p_args */
3026 YYSYMBOL_p_args_head = 333, /* p_args_head */
3027 YYSYMBOL_p_args_tail = 334, /* p_args_tail */
3028 YYSYMBOL_p_find = 335, /* p_find */
3029 YYSYMBOL_p_rest = 336, /* p_rest */
3030 YYSYMBOL_p_args_post = 337, /* p_args_post */
3031 YYSYMBOL_p_arg = 338, /* p_arg */
3032 YYSYMBOL_p_kwargs = 339, /* p_kwargs */
3033 YYSYMBOL_p_kwarg = 340, /* p_kwarg */
3034 YYSYMBOL_p_kw = 341, /* p_kw */
3035 YYSYMBOL_p_kw_label = 342, /* p_kw_label */
3036 YYSYMBOL_p_kwrest = 343, /* p_kwrest */
3037 YYSYMBOL_p_kwnorest = 344, /* p_kwnorest */
3038 YYSYMBOL_p_any_kwrest = 345, /* p_any_kwrest */
3039 YYSYMBOL_p_value = 346, /* p_value */
3040 YYSYMBOL_p_primitive = 347, /* p_primitive */
3041 YYSYMBOL_p_variable = 348, /* p_variable */
3042 YYSYMBOL_p_var_ref = 349, /* p_var_ref */
3043 YYSYMBOL_p_expr_ref = 350, /* p_expr_ref */
3044 YYSYMBOL_p_const = 351, /* p_const */
3045 YYSYMBOL_opt_rescue = 352, /* opt_rescue */
3046 YYSYMBOL_exc_list = 353, /* exc_list */
3047 YYSYMBOL_exc_var = 354, /* exc_var */
3048 YYSYMBOL_opt_ensure = 355, /* opt_ensure */
3049 YYSYMBOL_literal = 356, /* literal */
3050 YYSYMBOL_strings = 357, /* strings */
3051 YYSYMBOL_string = 358, /* string */
3052 YYSYMBOL_string1 = 359, /* string1 */
3053 YYSYMBOL_xstring = 360, /* xstring */
3054 YYSYMBOL_regexp = 361, /* regexp */
3055 YYSYMBOL_nonempty_list__ = 362, /* nonempty_list_' ' */
3056 YYSYMBOL_words_tWORDS_BEG_word_list = 363, /* words_tWORDS_BEG_word_list */
3057 YYSYMBOL_words = 364, /* words */
3058 YYSYMBOL_word_list = 365, /* word_list */
3059 YYSYMBOL_word = 366, /* word */
3060 YYSYMBOL_words_tSYMBOLS_BEG_symbol_list = 367, /* words_tSYMBOLS_BEG_symbol_list */
3061 YYSYMBOL_symbols = 368, /* symbols */
3062 YYSYMBOL_symbol_list = 369, /* symbol_list */
3063 YYSYMBOL_words_tQWORDS_BEG_qword_list = 370, /* words_tQWORDS_BEG_qword_list */
3064 YYSYMBOL_qwords = 371, /* qwords */
3065 YYSYMBOL_words_tQSYMBOLS_BEG_qsym_list = 372, /* words_tQSYMBOLS_BEG_qsym_list */
3066 YYSYMBOL_qsymbols = 373, /* qsymbols */
3067 YYSYMBOL_qword_list = 374, /* qword_list */
3068 YYSYMBOL_qsym_list = 375, /* qsym_list */
3069 YYSYMBOL_string_contents = 376, /* string_contents */
3070 YYSYMBOL_xstring_contents = 377, /* xstring_contents */
3071 YYSYMBOL_regexp_contents = 378, /* regexp_contents */
3072 YYSYMBOL_string_content = 379, /* string_content */
3073 YYSYMBOL_380_31 = 380, /* @31 */
3074 YYSYMBOL_381_32 = 381, /* @32 */
3075 YYSYMBOL_382_33 = 382, /* @33 */
3076 YYSYMBOL_383_34 = 383, /* @34 */
3077 YYSYMBOL_string_dend = 384, /* string_dend */
3078 YYSYMBOL_string_dvar = 385, /* string_dvar */
3079 YYSYMBOL_symbol = 386, /* symbol */
3080 YYSYMBOL_ssym = 387, /* ssym */
3081 YYSYMBOL_sym = 388, /* sym */
3082 YYSYMBOL_dsym = 389, /* dsym */
3083 YYSYMBOL_numeric = 390, /* numeric */
3084 YYSYMBOL_simple_numeric = 391, /* simple_numeric */
3085 YYSYMBOL_nonlocal_var = 392, /* nonlocal_var */
3086 YYSYMBOL_user_variable = 393, /* user_variable */
3087 YYSYMBOL_keyword_variable = 394, /* keyword_variable */
3088 YYSYMBOL_var_ref = 395, /* var_ref */
3089 YYSYMBOL_var_lhs = 396, /* var_lhs */
3090 YYSYMBOL_backref = 397, /* backref */
3091 YYSYMBOL_398_35 = 398, /* $@35 */
3092 YYSYMBOL_superclass = 399, /* superclass */
3093 YYSYMBOL_f_opt_paren_args = 400, /* f_opt_paren_args */
3094 YYSYMBOL_f_paren_args = 401, /* f_paren_args */
3095 YYSYMBOL_f_arglist = 402, /* f_arglist */
3096 YYSYMBOL_403_36 = 403, /* @36 */
3097 YYSYMBOL_f_kwarg_f_kw = 404, /* f_kwarg_f_kw */
3098 YYSYMBOL_args_tail = 405, /* args_tail */
3099 YYSYMBOL_f_opt_arg_value = 406, /* f_opt_arg_value */
3100 YYSYMBOL_f_optarg_arg_value = 407, /* f_optarg_arg_value */
3101 YYSYMBOL_opt_args_tail_args_tail = 408, /* opt_args_tail_args_tail */
3102 YYSYMBOL_f_args = 409, /* f_args */
3103 YYSYMBOL_args_forward = 410, /* args_forward */
3104 YYSYMBOL_f_bad_arg = 411, /* f_bad_arg */
3105 YYSYMBOL_f_norm_arg = 412, /* f_norm_arg */
3106 YYSYMBOL_f_arg_asgn = 413, /* f_arg_asgn */
3107 YYSYMBOL_f_arg_item = 414, /* f_arg_item */
3108 YYSYMBOL_f_arg = 415, /* f_arg */
3109 YYSYMBOL_f_label = 416, /* f_label */
3110 YYSYMBOL_f_kw = 417, /* f_kw */
3111 YYSYMBOL_f_block_kw = 418, /* f_block_kw */
3112 YYSYMBOL_kwrest_mark = 419, /* kwrest_mark */
3113 YYSYMBOL_f_no_kwarg = 420, /* f_no_kwarg */
3114 YYSYMBOL_f_kwrest = 421, /* f_kwrest */
3115 YYSYMBOL_restarg_mark = 422, /* restarg_mark */
3116 YYSYMBOL_f_rest_arg = 423, /* f_rest_arg */
3117 YYSYMBOL_blkarg_mark = 424, /* blkarg_mark */
3118 YYSYMBOL_f_block_arg = 425, /* f_block_arg */
3119 YYSYMBOL_opt_f_block_arg = 426, /* opt_f_block_arg */
3120 YYSYMBOL_singleton = 427, /* singleton */
3121 YYSYMBOL_428_37 = 428, /* $@37 */
3122 YYSYMBOL_assoc_list = 429, /* assoc_list */
3123 YYSYMBOL_assocs = 430, /* assocs */
3124 YYSYMBOL_assoc = 431, /* assoc */
3125 YYSYMBOL_operation = 432, /* operation */
3126 YYSYMBOL_operation2 = 433, /* operation2 */
3127 YYSYMBOL_operation3 = 434, /* operation3 */
3128 YYSYMBOL_dot_or_colon = 435, /* dot_or_colon */
3129 YYSYMBOL_call_op = 436, /* call_op */
3130 YYSYMBOL_call_op2 = 437, /* call_op2 */
3131 YYSYMBOL_rparen = 438, /* rparen */
3132 YYSYMBOL_rbracket = 439, /* rbracket */
3133 YYSYMBOL_rbrace = 440, /* rbrace */
3134 YYSYMBOL_trailer = 441, /* trailer */
3135 YYSYMBOL_term = 442, /* term */
3136 YYSYMBOL_terms = 443, /* terms */
3137 YYSYMBOL_none = 444 /* none */
3138};
3139typedef enum yysymbol_kind_t yysymbol_kind_t;
3140
3141
3142
3143
3144#ifdef short
3145# undef short
3146#endif
3147
3148/* On compilers that do not define __PTRDIFF_MAX__ etc., make sure
3149 <limits.h> and (if available) <stdint.h> are included
3150 so that the code can choose integer types of a good width. */
3151
3152#ifndef __PTRDIFF_MAX__
3153# include <limits.h> /* INFRINGES ON USER NAME SPACE */
3154# if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
3155# include <stdint.h> /* INFRINGES ON USER NAME SPACE */
3156# define YY_STDINT_H
3157# endif
3158#endif
3159
3160/* Narrow types that promote to a signed type and that can represent a
3161 signed or unsigned integer of at least N bits. In tables they can
3162 save space and decrease cache pressure. Promoting to a signed type
3163 helps avoid bugs in integer arithmetic. */
3164
3165#ifdef __INT_LEAST8_MAX__
3166typedef __INT_LEAST8_TYPE__ yytype_int8;
3167#elif defined YY_STDINT_H
3168typedef int_least8_t yytype_int8;
3169#else
3170typedef signed char yytype_int8;
3171#endif
3172
3173#ifdef __INT_LEAST16_MAX__
3174typedef __INT_LEAST16_TYPE__ yytype_int16;
3175#elif defined YY_STDINT_H
3176typedef int_least16_t yytype_int16;
3177#else
3178typedef short yytype_int16;
3179#endif
3180
3181/* Work around bug in HP-UX 11.23, which defines these macros
3182 incorrectly for preprocessor constants. This workaround can likely
3183 be removed in 2023, as HPE has promised support for HP-UX 11.23
3184 (aka HP-UX 11i v2) only through the end of 2022; see Table 2 of
3185 <https://h20195.www2.hpe.com/V2/getpdf.aspx/4AA4-7673ENW.pdf>. */
3186#ifdef __hpux
3187# undef UINT_LEAST8_MAX
3188# undef UINT_LEAST16_MAX
3189# define UINT_LEAST8_MAX 255
3190# define UINT_LEAST16_MAX 65535
3191#endif
3192
3193#if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__
3194typedef __UINT_LEAST8_TYPE__ yytype_uint8;
3195#elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \
3196 && UINT_LEAST8_MAX <= INT_MAX)
3197typedef uint_least8_t yytype_uint8;
3198#elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX
3199typedef unsigned char yytype_uint8;
3200#else
3201typedef short yytype_uint8;
3202#endif
3203
3204#if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__
3205typedef __UINT_LEAST16_TYPE__ yytype_uint16;
3206#elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \
3207 && UINT_LEAST16_MAX <= INT_MAX)
3208typedef uint_least16_t yytype_uint16;
3209#elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX
3210typedef unsigned short yytype_uint16;
3211#else
3212typedef int yytype_uint16;
3213#endif
3214
3215#ifndef YYPTRDIFF_T
3216# if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__
3217# define YYPTRDIFF_T __PTRDIFF_TYPE__
3218# define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__
3219# elif defined PTRDIFF_MAX
3220# ifndef ptrdiff_t
3221# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
3222# endif
3223# define YYPTRDIFF_T ptrdiff_t
3224# define YYPTRDIFF_MAXIMUM PTRDIFF_MAX
3225# else
3226# define YYPTRDIFF_T long
3227# define YYPTRDIFF_MAXIMUM LONG_MAX
3228# endif
3229#endif
3230
3231#ifndef YYSIZE_T
3232# ifdef __SIZE_TYPE__
3233# define YYSIZE_T __SIZE_TYPE__
3234# elif defined size_t
3235# define YYSIZE_T size_t
3236# elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
3237# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
3238# define YYSIZE_T size_t
3239# else
3240# define YYSIZE_T unsigned
3241# endif
3242#endif
3243
3244#define YYSIZE_MAXIMUM \
3245 YY_CAST (YYPTRDIFF_T, \
3246 (YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1) \
3247 ? YYPTRDIFF_MAXIMUM \
3248 : YY_CAST (YYSIZE_T, -1)))
3249
3250#define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X))
3251
3252
3253/* Stored state numbers (used for stacks). */
3254typedef yytype_int16 yy_state_t;
3255
3256/* State numbers in computations. */
3257typedef int yy_state_fast_t;
3258
3259#ifndef YY_
3260# if defined YYENABLE_NLS && YYENABLE_NLS
3261# if ENABLE_NLS
3262# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
3263# define YY_(Msgid) dgettext ("bison-runtime", Msgid)
3264# endif
3265# endif
3266# ifndef YY_
3267# define YY_(Msgid) Msgid
3268# endif
3269#endif
3270
3271
3272#ifndef YY_ATTRIBUTE_PURE
3273# if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__)
3274# define YY_ATTRIBUTE_PURE __attribute__ ((__pure__))
3275# else
3276# define YY_ATTRIBUTE_PURE
3277# endif
3278#endif
3279
3280#ifndef YY_ATTRIBUTE_UNUSED
3281# if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__)
3282# define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
3283# else
3284# define YY_ATTRIBUTE_UNUSED
3285# endif
3286#endif
3287
3288/* Suppress unused-variable warnings by "using" E. */
3289#if ! defined lint || defined __GNUC__
3290# define YY_USE(E) ((void) (E))
3291#else
3292# define YY_USE(E) /* empty */
3293#endif
3294
3295/* Suppress an incorrect diagnostic about yylval being uninitialized. */
3296#if defined __GNUC__ && ! defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__
3297# if __GNUC__ * 100 + __GNUC_MINOR__ < 407
3298# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
3299 _Pragma ("GCC diagnostic push") \
3300 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")
3301# else
3302# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
3303 _Pragma ("GCC diagnostic push") \
3304 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \
3305 _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
3306# endif
3307# define YY_IGNORE_MAYBE_UNINITIALIZED_END \
3308 _Pragma ("GCC diagnostic pop")
3309#else
3310# define YY_INITIAL_VALUE(Value) Value
3311#endif
3312#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
3313# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
3314# define YY_IGNORE_MAYBE_UNINITIALIZED_END
3315#endif
3316#ifndef YY_INITIAL_VALUE
3317# define YY_INITIAL_VALUE(Value) /* Nothing. */
3318#endif
3319
3320#if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__
3321# define YY_IGNORE_USELESS_CAST_BEGIN \
3322 _Pragma ("GCC diagnostic push") \
3323 _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"")
3324# define YY_IGNORE_USELESS_CAST_END \
3325 _Pragma ("GCC diagnostic pop")
3326#endif
3327#ifndef YY_IGNORE_USELESS_CAST_BEGIN
3328# define YY_IGNORE_USELESS_CAST_BEGIN
3329# define YY_IGNORE_USELESS_CAST_END
3330#endif
3331
3332
3333#define YY_ASSERT(E) ((void) (0 && (E)))
3334
3335#if 1
3336
3337/* The parser invokes alloca or malloc; define the necessary symbols. */
3338
3339# ifdef YYSTACK_USE_ALLOCA
3340# if YYSTACK_USE_ALLOCA
3341# ifdef __GNUC__
3342# define YYSTACK_ALLOC __builtin_alloca
3343# elif defined __BUILTIN_VA_ARG_INCR
3344# include <alloca.h> /* INFRINGES ON USER NAME SPACE */
3345# elif defined _AIX
3346# define YYSTACK_ALLOC __alloca
3347# elif defined _MSC_VER
3348# include <malloc.h> /* INFRINGES ON USER NAME SPACE */
3349# define alloca _alloca
3350# else
3351# define YYSTACK_ALLOC alloca
3352# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
3353# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
3354 /* Use EXIT_SUCCESS as a witness for stdlib.h. */
3355# ifndef EXIT_SUCCESS
3356# define EXIT_SUCCESS 0
3357# endif
3358# endif
3359# endif
3360# endif
3361# endif
3362
3363# ifdef YYSTACK_ALLOC
3364 /* Pacify GCC's 'empty if-body' warning. */
3365# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
3366# ifndef YYSTACK_ALLOC_MAXIMUM
3367 /* The OS might guarantee only one guard page at the bottom of the stack,
3368 and a page size can be as small as 4096 bytes. So we cannot safely
3369 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
3370 to allow for a few compiler-allocated temporary stack slots. */
3371# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
3372# endif
3373# else
3374# define YYSTACK_ALLOC YYMALLOC
3375# define YYSTACK_FREE YYFREE
3376# ifndef YYSTACK_ALLOC_MAXIMUM
3377# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
3378# endif
3379# if (defined __cplusplus && ! defined EXIT_SUCCESS \
3380 && ! ((defined YYMALLOC || defined malloc) \
3381 && (defined YYFREE || defined free)))
3382# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
3383# ifndef EXIT_SUCCESS
3384# define EXIT_SUCCESS 0
3385# endif
3386# endif
3387# ifndef YYMALLOC
3388# define YYMALLOC malloc
3389# if ! defined malloc && ! defined EXIT_SUCCESS
3390void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
3391# endif
3392# endif
3393# ifndef YYFREE
3394# define YYFREE free
3395# if ! defined free && ! defined EXIT_SUCCESS
3396void free (void *); /* INFRINGES ON USER NAME SPACE */
3397# endif
3398# endif
3399# endif
3400#endif /* 1 */
3401
3402#if (! defined yyoverflow \
3403 && (! defined __cplusplus \
3404 || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \
3405 && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
3406
3407/* A type that is properly aligned for any stack member. */
3408union yyalloc
3409{
3410 yy_state_t yyss_alloc;
3411 YYSTYPE yyvs_alloc;
3412 YYLTYPE yyls_alloc;
3413};
3414
3415/* The size of the maximum gap between one aligned stack and the next. */
3416# define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1)
3417
3418/* The size of an array large to enough to hold all stacks, each with
3419 N elements. */
3420# define YYSTACK_BYTES(N) \
3421 ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE) \
3422 + YYSIZEOF (YYLTYPE)) \
3423 + 2 * YYSTACK_GAP_MAXIMUM)
3424
3425# define YYCOPY_NEEDED 1
3426
3427/* Relocate STACK from its old location to the new one. The
3428 local variables YYSIZE and YYSTACKSIZE give the old and new number of
3429 elements in the stack, and YYPTR gives the new location of the
3430 stack. Advance YYPTR to a properly aligned location for the next
3431 stack. */
3432# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
3433 do \
3434 { \
3435 YYPTRDIFF_T yynewbytes; \
3436 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
3437 Stack = &yyptr->Stack_alloc; \
3438 yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \
3439 yyptr += yynewbytes / YYSIZEOF (*yyptr); \
3440 } \
3441 while (0)
3442
3443#endif
3444
3445#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
3446/* Copy COUNT objects from SRC to DST. The source and destination do
3447 not overlap. */
3448# ifndef YYCOPY
3449# if defined __GNUC__ && 1 < __GNUC__
3450# define YYCOPY(Dst, Src, Count) \
3451 __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src)))
3452# else
3453# define YYCOPY(Dst, Src, Count) \
3454 do \
3455 { \
3456 YYPTRDIFF_T yyi; \
3457 for (yyi = 0; yyi < (Count); yyi++) \
3458 (Dst)[yyi] = (Src)[yyi]; \
3459 } \
3460 while (0)
3461# endif
3462# endif
3463#endif /* !YYCOPY_NEEDED */
3464
3465/* YYFINAL -- State number of the termination state. */
3466#define YYFINAL 134
3467/* YYLAST -- Last index in YYTABLE. */
3468#define YYLAST 15976
3469
3470/* YYNTOKENS -- Number of terminals. */
3471#define YYNTOKENS 163
3472/* YYNNTS -- Number of nonterminals. */
3473#define YYNNTS 282
3474/* YYNRULES -- Number of rules. */
3475#define YYNRULES 789
3476/* YYNSTATES -- Number of states. */
3477#define YYNSTATES 1354
3478
3479/* YYMAXUTOK -- Last valid token kind. */
3480#define YYMAXUTOK 362
3481
3482
3483/* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM
3484 as returned by yylex, with out-of-bounds checking. */
3485#define YYTRANSLATE(YYX) \
3486 (0 <= (YYX) && (YYX) <= YYMAXUTOK \
3487 ? YY_CAST (yysymbol_kind_t, yytranslate[YYX]) \
3488 : YYSYMBOL_YYUNDEF)
3489
3490/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
3491 as returned by yylex. */
3492static const yytype_uint8 yytranslate[] =
3493{
3494 0, 2, 2, 2, 2, 2, 2, 2, 2, 72,
3495 155, 75, 73, 74, 2, 2, 2, 2, 2, 2,
3496 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3497 2, 2, 162, 149, 2, 2, 2, 147, 142, 2,
3498 158, 159, 145, 143, 156, 144, 69, 146, 2, 2,
3499 2, 2, 2, 2, 2, 2, 2, 2, 137, 161,
3500 139, 135, 138, 136, 2, 2, 2, 2, 2, 2,
3501 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3502 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3503 2, 154, 70, 160, 141, 2, 157, 2, 2, 2,
3504 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3505 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3506 2, 2, 2, 152, 140, 153, 150, 2, 89, 90,
3507 91, 92, 76, 77, 78, 79, 95, 96, 84, 83,
3508 80, 81, 82, 87, 88, 93, 94, 98, 85, 86,
3509 97, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3510 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3511 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3512 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3513 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3514 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3515 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3516 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3517 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3518 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3519 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
3520 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
3521 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
3522 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
3523 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
3524 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
3525 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
3526 65, 66, 67, 68, 71, 99, 100, 101, 102, 103,
3527 104, 105, 106, 107, 108, 109, 110, 111, 112, 113,
3528 114, 115, 116, 117, 118, 119, 120, 121, 122, 123,
3529 124, 125, 126, 127, 128, 129, 130, 131, 132, 133,
3530 134, 148, 151
3531};
3532
3533#if YYDEBUG
3534/* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
3535static const yytype_int16 yyrline[] =
3536{
3537 0, 2968, 2968, 2968, 2994, 2994, 2994, 3000, 3005, 3010,
3538 3017, 3022, 3029, 3031, 3045, 3050, 3041, 3061, 3058, 3071,
3539 3077, 3082, 3087, 3094, 3099, 3098, 3108, 3110, 3117, 3117,
3540 3122, 3127, 3135, 3144, 3151, 3157, 3163, 3174, 3185, 3194,
3541 3207, 3208, 3214, 3219, 3230, 3235, 3236, 3243, 3248, 3253,
3542 3259, 3259, 3264, 3270, 3275, 3281, 3292, 3303, 3311, 3312,
3543 3318, 3318, 3318, 3325, 3330, 3338, 3341, 3342, 3347, 3352,
3544 3357, 3363, 3362, 3376, 3375, 3388, 3391, 3403, 3413, 3412,
3545 3426, 3431, 3437, 3437, 3437, 3444, 3445, 3448, 3449, 3456,
3546 3464, 3471, 3478, 3487, 3492, 3497, 3502, 3507, 3513, 3519,
3547 3525, 3530, 3537, 3546, 3547, 3554, 3555, 3562, 3567, 3572,
3548 3577, 3582, 3587, 3592, 3597, 3602, 3607, 3614, 3615, 3622,
3549 3627, 3634, 3639, 3646, 3646, 3651, 3656, 3662, 3667, 3673,
3550 3678, 3683, 3691, 3691, 3696, 3701, 3706, 3711, 3716, 3721,
3551 3726, 3734, 3742, 3745, 3750, 3755, 3762, 3762, 3763, 3764,
3552 3769, 3772, 3777, 3780, 3785, 3785, 3793, 3794, 3795, 3796,
3553 3797, 3798, 3799, 3800, 3801, 3802, 3803, 3804, 3805, 3806,
3554 3807, 3808, 3809, 3810, 3811, 3812, 3813, 3814, 3815, 3816,
3555 3817, 3818, 3819, 3820, 3821, 3822, 3825, 3825, 3825, 3826,
3556 3826, 3827, 3827, 3827, 3828, 3828, 3828, 3828, 3829, 3829,
3557 3829, 3829, 3830, 3830, 3830, 3831, 3831, 3831, 3831, 3832,
3558 3832, 3832, 3832, 3833, 3833, 3833, 3833, 3834, 3834, 3834,
3559 3834, 3835, 3835, 3835, 3835, 3836, 3836, 3839, 3844, 3849,
3560 3854, 3859, 3864, 3869, 3875, 3881, 3887, 3894, 3901, 3907,
3561 3913, 3919, 3925, 3930, 3935, 3940, 3945, 3950, 3955, 3960,
3562 3965, 3970, 3975, 3980, 3985, 3990, 3991, 3996, 4001, 4006,
3563 4011, 4016, 4021, 4026, 4031, 4036, 4041, 4046, 4052, 4059,
3564 4070, 4081, 4087, 4088, 4094, 4101, 4102, 4103, 4104, 4107,
3565 4112, 4120, 4126, 4133, 4140, 4147, 4148, 4152, 4157, 4164,
3566 4169, 4178, 4183, 4193, 4205, 4206, 4212, 4213, 4214, 4218,
3567 4223, 4230, 4236, 4241, 4247, 4253, 4257, 4257, 4295, 4300,
3568 4308, 4313, 4321, 4326, 4331, 4336, 4344, 4349, 4358, 4359,
3569 4363, 4368, 4373, 4391, 4391, 4391, 4391, 4391, 4391, 4391,
3570 4391, 4392, 4393, 4394, 4400, 4399, 4412, 4412, 4418, 4424,
3571 4429, 4434, 4439, 4445, 4450, 4455, 4460, 4465, 4471, 4476,
3572 4481, 4486, 4487, 4493, 4494, 4503, 4512, 4521, 4531, 4530,
3573 4545, 4544, 4557, 4564, 4607, 4606, 4624, 4623, 4643, 4642,
3574 4661, 4659, 4676, 4674, 4689, 4694, 4699, 4704, 4719, 4726,
3575 4733, 4751, 4758, 4766, 4774, 4781, 4789, 4798, 4807, 4815,
3576 4822, 4829, 4837, 4844, 4850, 4865, 4872, 4877, 4883, 4890,
3577 4897, 4898, 4899, 4902, 4903, 4906, 4907, 4917, 4918, 4925,
3578 4926, 4929, 4934, 4941, 4946, 4953, 4958, 4963, 4968, 4973,
3579 4980, 4986, 4993, 4994, 5001, 5001, 5003, 5003, 5003, 5008,
3580 5013, 5018, 5025, 5033, 5033, 5033, 5033, 5033, 5033, 5038,
3581 5043, 5048, 5053, 5058, 5064, 5069, 5074, 5079, 5084, 5089,
3582 5094, 5099, 5104, 5111, 5112, 5118, 5125, 5135, 5140, 5147,
3583 5149, 5153, 5158, 5164, 5170, 5175, 5182, 5188, 5181, 5214,
3584 5221, 5230, 5237, 5236, 5247, 5255, 5267, 5277, 5286, 5293,
3585 5300, 5311, 5317, 5322, 5328, 5334, 5339, 5344, 5352, 5358,
3586 5366, 5366, 5383, 5383, 5404, 5410, 5415, 5421, 5428, 5438,
3587 5439, 5442, 5443, 5445, 5456, 5453, 5469, 5470, 5473, 5474,
3588 5480, 5488, 5489, 5495, 5501, 5506, 5511, 5518, 5521, 5528,
3589 5531, 5536, 5539, 5546, 5553, 5554, 5555, 5562, 5569, 5576,
3590 5582, 5589, 5596, 5603, 5609, 5614, 5619, 5626, 5625, 5636,
3591 5642, 5650, 5656, 5661, 5666, 5671, 5676, 5679, 5683, 5690,
3592 5695, 5702, 5710, 5716, 5723, 5724, 5731, 5738, 5743, 5748,
3593 5753, 5760, 5762, 5769, 5775, 5787, 5788, 5803, 5808, 5815,
3594 5821, 5822, 5829, 5830, 5837, 5844, 5850, 5856, 5857, 5858,
3595 5859, 5865, 5873, 5873, 5873, 5873, 5873, 5873, 5873, 5873,
3596 5874, 5879, 5882, 5890, 5902, 5909, 5916, 5921, 5926, 5933,
3597 5954, 5957, 5962, 5966, 5969, 5974, 5977, 5984, 5987, 5988,
3598 5991, 6005, 6006, 6007, 6014, 6027, 6039, 6046, 6046, 6046,
3599 6046, 6050, 6054, 6061, 6063, 6070, 6070, 6074, 6078, 6085,
3600 6085, 6088, 6088, 6092, 6096, 6104, 6108, 6116, 6120, 6128,
3601 6132, 6140, 6144, 6170, 6173, 6172, 6187, 6195, 6199, 6186,
3602 6218, 6219, 6222, 6227, 6230, 6231, 6234, 6250, 6251, 6254,
3603 6262, 6263, 6271, 6272, 6273, 6274, 6277, 6278, 6279, 6282,
3604 6282, 6283, 6286, 6287, 6288, 6289, 6290, 6291, 6292, 6295,
3605 6305, 6312, 6312, 6319, 6320, 6324, 6323, 6334, 6340, 6341,
3606 6350, 6360, 6361, 6361, 6378, 6378, 6378, 6383, 6388, 6393,
3607 6398, 6415, 6415, 6415, 6415, 6415, 6415, 6420, 6425, 6430,
3608 6435, 6440, 6445, 6450, 6455, 6460, 6465, 6470, 6475, 6480,
3609 6486, 6493, 6504, 6513, 6522, 6531, 6542, 6543, 6553, 6561,
3610 6566, 6585, 6587, 6598, 6618, 6624, 6632, 6638, 6646, 6647,
3611 6650, 6656, 6662, 6670, 6671, 6674, 6680, 6688, 6689, 6692,
3612 6698, 6706, 6711, 6718, 6724, 6723, 6761, 6762, 6769, 6771,
3613 6796, 6801, 6806, 6813, 6819, 6824, 6833, 6833, 6834, 6837,
3614 6838, 6841, 6842, 6843, 6846, 6847, 6850, 6851, 6854, 6855,
3615 6858, 6861, 6864, 6867, 6868, 6871, 6872, 6879, 6880, 6884
3616};
3617#endif
3618
3620#define YY_ACCESSING_SYMBOL(State) YY_CAST (yysymbol_kind_t, yystos[State])
3621
3622#if 1
3623/* The user-facing name of the symbol whose (internal) number is
3624 YYSYMBOL. No bounds checking. */
3625static const char *yysymbol_name (yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED;
3626
3627/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
3628 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
3629static const char *const yytname[] =
3630{
3631 "\"end-of-input\"", "error", "\"invalid token\"", "\"'class'\"",
3632 "\"'module'\"", "\"'def'\"", "\"'undef'\"", "\"'begin'\"",
3633 "\"'rescue'\"", "\"'ensure'\"", "\"'end'\"", "\"'if'\"", "\"'unless'\"",
3634 "\"'then'\"", "\"'elsif'\"", "\"'else'\"", "\"'case'\"", "\"'when'\"",
3635 "\"'while'\"", "\"'until'\"", "\"'for'\"", "\"'break'\"", "\"'next'\"",
3636 "\"'redo'\"", "\"'retry'\"", "\"'in'\"", "\"'do'\"",
3637 "\"'do' for condition\"", "\"'do' for block\"", "\"'do' for lambda\"",
3638 "\"'return'\"", "\"'yield'\"", "\"'super'\"", "\"'self'\"", "\"'nil'\"",
3639 "\"'true'\"", "\"'false'\"", "\"'and'\"", "\"'or'\"", "\"'not'\"",
3640 "\"'if' modifier\"", "\"'unless' modifier\"", "\"'while' modifier\"",
3641 "\"'until' modifier\"", "\"'rescue' modifier\"", "\"'alias'\"",
3642 "\"'defined?'\"", "\"'BEGIN'\"", "\"'END'\"", "\"'__LINE__'\"",
3643 "\"'__FILE__'\"", "\"'__ENCODING__'\"", "\"local variable or method\"",
3644 "\"method\"", "\"global variable\"", "\"instance variable\"",
3645 "\"constant\"", "\"class variable\"", "\"label\"", "\"integer literal\"",
3646 "\"float literal\"", "\"rational literal\"", "\"imaginary literal\"",
3647 "\"char literal\"", "\"numbered reference\"", "\"back reference\"",
3648 "\"literal content\"", "tREGEXP_END", "\"dummy end\"", "'.'",
3649 "\"backslash\"", "\"escaped space\"", "\"escaped horizontal tab\"",
3650 "\"escaped form feed\"", "\"escaped carriage return\"",
3651 "\"escaped vertical tab\"", "\"unary+\"", "\"unary-\"", "\"**\"",
3652 "\"<=>\"", "\"==\"", "\"===\"", "\"!=\"", "\">=\"", "\"<=\"", "\"&&\"",
3653 "\"||\"", "\"=~\"", "\"!~\"", "\"..\"", "\"...\"", "\"(..\"", "\"(...\"",
3654 "\"[]\"", "\"[]=\"", "\"<<\"", "\">>\"", "\"&.\"", "\"::\"",
3655 "\":: at EXPR_BEG\"", "\"operator-assignment\"", "\"=>\"", "\"(\"",
3656 "\"( arg\"", "\")\"", "\"[\"", "\"{\"", "\"{ arg\"", "\"*\"",
3657 "\"**arg\"", "\"&\"", "\"->\"", "\"symbol literal\"",
3658 "\"string literal\"", "\"backtick literal\"", "\"regexp literal\"",
3659 "\"word list\"", "\"verbatim word list\"", "\"symbol list\"",
3660 "\"verbatim symbol list\"", "\"terminator\"", "\"'}'\"", "\"'#{'\"",
3661 "tSTRING_DVAR", "tLAMBEG", "tLABEL_END", "tIGNORED_NL", "tCOMMENT",
3662 "tEMBDOC_BEG", "tEMBDOC", "tEMBDOC_END", "tHEREDOC_BEG", "tHEREDOC_END",
3663 "k__END__", "tLOWEST", "'='", "'?'", "':'", "'>'", "'<'", "'|'", "'^'",
3664 "'&'", "'+'", "'-'", "'*'", "'/'", "'%'", "tUMINUS_NUM", "'!'", "'~'",
3665 "tLAST_TOKEN", "'{'", "'}'", "'['", "'\\n'", "','", "'`'", "'('", "')'",
3666 "']'", "';'", "' '", "$accept", "$@1", "program", "option_terms",
3667 "top_compstmt", "top_stmts", "top_stmt", "block_open", "begin_block",
3668 "$@2", "$@3", "bodystmt", "$@4", "compstmt", "stmts", "stmt_or_begin",
3669 "$@5", "allow_exits", "k_END", "$@6", "stmt", "command_asgn",
3670 "endless_command", "option_'\\n'", "command_rhs", "expr", "$@7", "$@8",
3671 "def_name", "defn_head", "$@9", "defs_head", "expr_value", "$@10",
3672 "$@11", "expr_value_do", "command_call", "block_command",
3673 "cmd_brace_block", "fcall", "command", "mlhs", "mlhs_inner",
3674 "mlhs_basic", "mlhs_item", "mlhs_head", "mlhs_post", "mlhs_node", "lhs",
3675 "cname", "cpath", "fname", "fitem", "undef_list", "$@12", "op",
3676 "reswords", "arg", "endless_arg", "relop", "rel_expr", "lex_ctxt",
3677 "begin_defined", "after_rescue", "arg_value", "aref_args", "arg_rhs",
3678 "paren_args", "opt_paren_args", "opt_call_args", "call_args", "$@13",
3679 "command_args", "block_arg", "opt_block_arg", "args", "arg_splat",
3680 "mrhs_arg", "mrhs", "primary", "$@14", "$@15", "@16", "@17", "$@18",
3681 "$@19", "$@20", "$@21", "$@22", "primary_value", "k_begin", "k_if",
3682 "k_unless", "k_while", "k_until", "k_case", "k_for", "k_class",
3683 "k_module", "k_def", "k_do", "k_do_block", "k_rescue", "k_ensure",
3684 "k_when", "k_else", "k_elsif", "k_end", "k_return", "k_yield", "then",
3685 "do", "if_tail", "opt_else", "for_var", "f_marg", "f_marg_list",
3686 "f_margs", "f_rest_marg", "f_any_kwrest", "$@23", "f_eq",
3687 "f_kwarg_f_block_kw", "block_args_tail", "excessed_comma",
3688 "f_opt_primary_value", "f_optarg_primary_value",
3689 "opt_args_tail_block_args_tail", "block_param", "opt_block_param",
3690 "block_param_def", "opt_bv_decl", "bv_decls", "bvar", "max_numparam",
3691 "numparam", "it_id", "@24", "$@25", "lambda", "f_larglist",
3692 "lambda_body", "$@26", "do_block", "block_call", "method_call",
3693 "brace_block", "@27", "brace_body", "@28", "do_body", "case_args",
3694 "case_body", "cases", "p_pvtbl", "p_pktbl", "p_in_kwarg", "$@29",
3695 "p_case_body", "p_cases", "p_top_expr", "p_top_expr_body", "p_expr",
3696 "p_as", "p_alt", "p_lparen", "p_lbracket", "p_expr_basic", "$@30",
3697 "p_args", "p_args_head", "p_args_tail", "p_find", "p_rest",
3698 "p_args_post", "p_arg", "p_kwargs", "p_kwarg", "p_kw", "p_kw_label",
3699 "p_kwrest", "p_kwnorest", "p_any_kwrest", "p_value", "p_primitive",
3700 "p_variable", "p_var_ref", "p_expr_ref", "p_const", "opt_rescue",
3701 "exc_list", "exc_var", "opt_ensure", "literal", "strings", "string",
3702 "string1", "xstring", "regexp", "nonempty_list_' '",
3703 "words_tWORDS_BEG_word_list", "words", "word_list", "word",
3704 "words_tSYMBOLS_BEG_symbol_list", "symbols", "symbol_list",
3705 "words_tQWORDS_BEG_qword_list", "qwords",
3706 "words_tQSYMBOLS_BEG_qsym_list", "qsymbols", "qword_list", "qsym_list",
3707 "string_contents", "xstring_contents", "regexp_contents",
3708 "string_content", "@31", "@32", "@33", "@34", "string_dend",
3709 "string_dvar", "symbol", "ssym", "sym", "dsym", "numeric",
3710 "simple_numeric", "nonlocal_var", "user_variable", "keyword_variable",
3711 "var_ref", "var_lhs", "backref", "$@35", "superclass",
3712 "f_opt_paren_args", "f_paren_args", "f_arglist", "@36", "f_kwarg_f_kw",
3713 "args_tail", "f_opt_arg_value", "f_optarg_arg_value",
3714 "opt_args_tail_args_tail", "f_args", "args_forward", "f_bad_arg",
3715 "f_norm_arg", "f_arg_asgn", "f_arg_item", "f_arg", "f_label", "f_kw",
3716 "f_block_kw", "kwrest_mark", "f_no_kwarg", "f_kwrest", "restarg_mark",
3717 "f_rest_arg", "blkarg_mark", "f_block_arg", "opt_f_block_arg",
3718 "singleton", "$@37", "assoc_list", "assocs", "assoc", "operation",
3719 "operation2", "operation3", "dot_or_colon", "call_op", "call_op2",
3720 "rparen", "rbracket", "rbrace", "trailer", "term", "terms", "none", YY_NULLPTR
3721};
3722
3723static const char *
3724yysymbol_name (yysymbol_kind_t yysymbol)
3725{
3726 return yytname[yysymbol];
3727}
3728#endif
3729
3730#define YYPACT_NINF (-1131)
3731
3732#define yypact_value_is_default(Yyn) \
3733 ((Yyn) == YYPACT_NINF)
3734
3735#define YYTABLE_NINF (-790)
3736
3737#define yytable_value_is_error(Yyn) \
3738 ((Yyn) == YYTABLE_NINF)
3739
3740/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
3741 STATE-NUM. */
3742static const yytype_int16 yypact[] =
3743{
3744 -1131, 5518, 148, -1131, -1131, -1131, -1131, 10004, -1131, -1131,
3745 -1131, -1131, -1131, -1131, -1131, 11067, 11067, -1131, -1131, -1131,
3746 -1131, 4490, -1131, -1131, -1131, -1131, 189, 9849, 6, 36,
3747 -1131, -1131, -1131, -1131, 5798, 6426, -1131, -1131, 5955, -1131,
3748 -1131, -1131, -1131, -1131, -1131, -1131, -1131, 12640, 12640, 12640,
3749 12640, 145, 8755, 8914, 11551, 11793, 10307, -1131, 9694, -1131,
3750 -1131, -1131, 59, 59, 59, 59, 1284, 12761, 12640, -1131,
3751 396, -1131, -1131, 1608, -1131, 587, 45, 45, -1131, -1131,
3752 343, 250, 269, -1131, 258, 13366, -1131, 296, 5117, 1173,
3753 486, 680, -1131, 10946, 10946, -1131, -1131, 9379, 13485, 13604,
3754 13723, 9538, 11067, 6897, -1131, 702, 144, -1131, -1131, 313,
3755 -1131, -1131, -1131, -1131, -1131, -1131, -1131, -1131, -1131, -1131,
3756 -1131, -1131, -1131, -1131, -1131, -1131, -1131, 318, 386, -1131,
3757 342, 517, -1131, -1131, -1131, -1131, -1131, -1131, -1131, -1131,
3758 -1131, -1131, -1131, -1131, -1131, -1131, -1131, -1131, -1131, -1131,
3759 -1131, -1131, -1131, -1131, -1131, -1131, -1131, -1131, -1131, -1131,
3760 -1131, -1131, -1131, -1131, -1131, -1131, -1131, -1131, -1131, -1131,
3761 -1131, -1131, -1131, -1131, -1131, -1131, -1131, -1131, -1131, -1131,
3762 -1131, -1131, -1131, -1131, -1131, -1131, -1131, -1131, -1131, -1131,
3763 -1131, -1131, -1131, -1131, -1131, -1131, -1131, -1131, -1131, -1131,
3764 -1131, -1131, -1131, -1131, -1131, -1131, -1131, -1131, -1131, -1131,
3765 -1131, 317, -1131, -1131, -1131, -1131, -1131, -1131, 332, 12640,
3766 476, 8914, 12640, 12640, 12640, -1131, 12640, 45, 45, -1131,
3767 414, 5925, 478, -1131, -1131, 432, -1131, 693, 42, 60,
3768 498, 84, 474, -1131, -1131, 11188, -1131, 11067, -1131, -1131,
3769 10685, 12882, 648, -1131, 491, -1131, 9073, -1131, -1131, -1131,
3770 -1131, -1131, 524, 343, -1131, 700, -1131, 529, 593, 6082,
3771 6082, 845, -1131, 8755, 531, 396, -1131, 1608, 6, 585,
3772 -1131, -1131, 590, 747, 767, -1131, 478, 614, 767, -1131,
3773 6, 718, 1284, 13842, 628, 628, 639, -1131, 715, 745,
3774 798, 880, -1131, -1131, 439, -1131, -1131, 717, 841, 722,
3775 -1131, 653, 653, 653, 653, 755, -1131, -1131, -1131, -1131,
3776 -1131, -1131, -1131, 5671, 670, 10946, 10946, 10946, 10946, -1131,
3777 12882, 12882, 1693, 690, 713, -1131, 1693, -1131, 723, -1131,
3778 -1131, -1131, -1131, 758, -1131, -1131, -1131, -1131, -1131, -1131,
3779 -1131, 8755, 10426, 707, -1131, -1131, 12640, 12640, 12640, 12640,
3780 12640, -1131, -1131, 12640, 12640, 12640, 12640, 12640, 12640, 12640,
3781 12640, -1131, 12640, -1131, -1131, 12640, 12640, 12640, 12640, 12640,
3782 12640, 12640, 12640, 12640, 12640, -1131, -1131, 14235, 11067, 14334,
3783 7684, -1131, 587, 124, 124, 10946, 8602, 8602, -1131, 396,
3784 709, 837, -1131, -1131, 948, 890, 78, 89, 100, 792,
3785 984, 10946, 135, -1131, 791, 1006, -1131, -1131, -1131, -1131,
3786 113, 565, 655, 659, 678, 694, 712, 784, 788, -1131,
3787 -1131, -1131, -1131, 815, -1131, 10545, -1131, -1131, -1131, 15819,
3788 -1131, -1131, -1131, -1131, -1131, -1131, 311, -1131, -1131, -1131,
3789 927, 797, 799, -1131, 12640, 11309, -1131, -1131, 14433, 11067,
3790 14532, -1131, -1131, 11672, -1131, 12640, 6, -1131, 771, 6,
3791 782, -1131, -1131, 796, 67, -1131, -1131, -1131, -1131, -1131,
3792 10004, -1131, -1131, 12640, 829, 14631, 14532, -1131, 36, 6,
3793 -1131, -1131, 5356, 785, 825, -1131, 11551, -1131, -1131, 11793,
3794 -1131, -1131, -1131, 491, 1080, -1131, -1131, 849, -1131, 13842,
3795 14730, 11067, 14829, -1131, -1131, -1131, -1131, -1131, -1131, -1131,
3796 -1131, -1131, -1131, -1131, -1131, 915, 90, 938, 97, 12640,
3797 -1131, -1131, 9226, -1131, -1131, -1131, -1131, -1131, 10825, -1131,
3798 -1131, -1131, -1131, -1131, -1131, -1131, -1131, -1131, -1131, 1332,
3799 -1131, -1131, -1131, -1131, -1131, 866, -1131, 873, -1131, -1131,
3800 886, 6, -1131, -1131, -1131, 816, -1131, 888, 12640, -1131,
3801 652, -1131, -1131, 1003, 908, 1013, -1131, 13003, 7684, 396,
3802 13003, 7684, -1131, 883, -1131, -1131, -1131, 147, 147, 11914,
3803 6, 13842, 913, -1131, 12035, -1131, 593, 5509, 5509, 5509,
3804 5509, 6239, 2169, 5509, 5509, 6082, 6082, 1097, 1097, -1131,
3805 5768, 1579, 1579, 1352, 294, 294, 593, 593, 593, 1479,
3806 1479, 7054, 6112, 7368, 6269, -1131, -1131, 524, -1131, 6,
3807 914, 862, -1131, 895, -1131, -1131, 6583, 147, -1131, -1131,
3808 7837, 1064, 8296, 179, 147, 147, 1062, 1066, 111, 14928,
3809 11067, 15027, -1131, -1131, -1131, 1080, -1131, -1131, -1131, 15126,
3810 11067, 15225, 7684, 12882, -1131, -1131, -1131, 6, -1131, -1131,
3811 -1131, 3269, 13124, 13124, 10004, -1131, 12640, 13245, 13245, 12640,
3812 -1131, 478, -1131, -1131, 474, 4782, 6740, 6, 333, 337,
3813 12640, 12640, -1131, -1131, 11430, -1131, 11672, -1131, -1131, -1131,
3814 12882, 5925, -1131, 336, 524, 524, 13124, -1131, 214, -1131,
3815 -1131, 767, 13842, 849, 473, 610, 6, 488, 668, -1131,
3816 -1131, 795, -1131, 326, -1131, 59, -1131, -1131, 326, 59,
3817 -1131, 593, 934, -1131, 1332, 1662, -1131, 940, 6, 942,
3818 -1131, 568, -1131, -1131, 1207, -1131, 1693, -1131, -1131, 959,
3819 12640, 1693, -1131, -1131, -1131, -1131, -1131, 931, -1131, -1131,
3820 189, 1055, -1131, 5925, 1061, 147, -1131, 1055, 1061, 147,
3821 -1131, -1131, 958, -1131, -1131, -1131, -1131, -1131, 12640, -1131,
3822 956, 960, 1085, -1131, -1131, 849, 13842, 1075, -1131, -1131,
3823 1093, 1004, 7021, -1131, -1131, -1131, 1110, 380, -1131, -1131,
3824 1007, -1131, -1131, -1131, -1131, 758, 981, 939, 11309, -1131,
3825 -1131, -1131, -1131, 758, -1131, -1131, 1143, 928, -1131, 1139,
3826 -1131, -1131, -1131, -1131, -1131, -1131, 12156, 147, -1131, 1062,
3827 147, 137, 161, 6, 130, 156, 8602, 396, 10946, 7684,
3828 1058, 610, -1131, 6, 147, 67, 10159, -1131, 144, 250,
3829 -1131, 2589, -1131, -1131, -1131, -1131, 12640, -1131, 189, -1131,
3830 -1131, -1131, 404, -1131, -1131, 6, 1008, 67, -1131, -1131,
3831 -1131, -1131, 673, -1131, -1131, -1131, -1131, -1131, 653, -1131,
3832 653, 653, 653, -1131, 6, -1131, 1332, -1131, 1539, -1131,
3833 -1131, 1119, 866, -1131, -1131, 1016, 1024, -1131, -1131, 1025,
3834 -1131, 1030, -1131, 1016, 13003, -1131, -1131, -1131, -1131, -1131,
3835 -1131, -1131, 1031, 12277, -1131, 849, 410, -1131, -1131, -1131,
3836 15324, 11067, 15423, -1131, -1131, 12640, 13124, 13124, 1037, -1131,
3837 -1131, -1131, 13124, 13124, -1131, -1131, 12398, 1139, -1131, -1131,
3838 -1131, 8602, 10946, 147, -1131, -1131, 147, -1131, 12640, -1131,
3839 81, -1131, -1131, 147, -1131, 165, 147, 7684, 396, 147,
3840 -1131, -1131, -1131, -1131, -1131, -1131, 13245, 12640, 12640, -1131,
3841 12640, 12640, -1131, 11672, -1131, 1232, 4999, -1131, -1131, 1036,
3842 1038, -1131, 931, -1131, 931, -1131, 1693, -1131, 931, -1131,
3843 -1131, 1055, 1061, 12640, 12640, -1131, -1131, 12640, 1040, 10825,
3844 10825, 13124, 12640, 7211, 7525, 6, 454, 519, 14154, 14154,
3845 5925, -1131, -1131, -1131, -1131, -1131, 13124, -1131, -1131, -1131,
3846 -1131, 956, -1131, 1103, -1131, 1196, -1131, -1131, 124, -1131,
3847 -1131, -1131, 12519, 7990, -1131, -1131, -1131, 147, -1131, -1131,
3848 12640, 1693, -1131, -1131, 92, 1539, 1539, 1016, 1016, 1050,
3849 1016, 5925, 5925, 1069, 1069, 1031, -1131, -1131, 5925, 542,
3850 -1131, -1131, -1131, 1358, 1358, 431, -1131, 1554, 421, 1159,
3851 -1131, 1249, -1131, -1131, 49, -1131, 1073, -1131, -1131, -1131,
3852 1063, -1131, 1074, -1131, 14247, -1131, -1131, -1131, -1131, 878,
3853 -1131, -1131, -1131, 40, -1131, -1131, -1131, -1131, -1131, -1131,
3854 -1131, -1131, -1131, 675, -1131, -1131, -1131, 13961, 124, -1131,
3855 -1131, 8602, -1131, -1131, 8449, 7837, 12640, -1131, 744, 14154,
3856 -1131, 6, 291, -1131, -1131, -1131, 1038, -1131, -1131, 931,
3857 -1131, -1131, 1431, 9226, -1131, -1131, 7684, -1131, -1131, -1131,
3858 -1131, 14247, 229, 6, 1939, -1131, 6, 1077, -1131, 1076,
3859 -1131, -1131, -1131, 1095, -1131, 10946, -1131, 1186, 1939, 14247,
3860 14247, 513, 1145, 1358, 1358, 431, 228, 426, 14154, 14154,
3861 -1131, 1198, -1131, 1124, 126, 180, 219, 7684, 396, -1131,
3862 928, -1131, -1131, -1131, -1131, 124, 975, 1091, 1096, -1131,
3863 9226, -1131, 1016, 866, 1114, -1131, -1131, 1115, 6, 1126,
3864 816, 1117, 14080, -1131, 1118, -1131, -1131, -1131, 238, -1131,
3865 1145, 1123, 1137, -1131, -1131, -1131, -1131, -1131, 6, -1131,
3866 -1131, 1140, -1131, 1152, -1131, -1131, -1131, -1131, -1131, -1131,
3867 -1131, -1131, -1131, -1131, -1131, 6, 6, 6, 6, 6,
3868 6, 226, 15522, 11067, 15621, 1143, -1131, 1196, -1131, -1131,
3869 10946, 10946, 1677, -1131, 7684, 1106, -1131, -1131, 1207, -1131,
3870 1754, -1131, 1142, -1131, 14080, 1754, -1131, -1131, 1224, 1228,
3871 1628, -1131, -1131, 14247, -1131, 513, -1131, 14247, 1939, 335,
3872 -1131, -1131, -1131, -1131, -1131, -1131, 210, 369, 6, 236,
3873 373, -1131, -1131, 8143, -1131, -1131, -1131, 865, -1131, -1131,
3874 147, -1131, -1131, 866, -1131, -1131, 1158, 1162, -1131, 1228,
3875 1174, 1179, -1131, 15720, 1158, 1181, 6, 1181, -1131, -1131,
3876 389, 129, 1677, -1131, -1131, -1131, 1628, -1131, 1628, -1131,
3877 1754, -1131, 1628, -1131, 1141, 1157, -1131, 14247, -1131, -1131,
3878 -1131, -1131, -1131, 1158, 1158, 1203, 1158, -1131, -1131, 1628,
3879 -1131, -1131, 1158, -1131
3880};
3881
3882/* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
3883 Performed when YYTABLE does not specify something else to do. Zero
3884 means the default is an error. */
3885static const yytype_int16 yydefact[] =
3886{
3887 2, 0, 0, 46, 386, 387, 388, 0, 379, 380,
3888 381, 384, 26, 26, 26, 374, 375, 376, 377, 398,
3889 399, 306, 673, 672, 674, 675, 60, 0, 60, 0,
3890 789, 677, 676, 678, 766, 768, 667, 666, 767, 668,
3891 662, 663, 664, 665, 611, 683, 684, 0, 0, 0,
3892 0, 0, 0, 0, 789, 789, 115, 466, 637, 637,
3893 639, 641, 0, 0, 0, 0, 0, 0, 0, 3,
3894 4, 8, 26, 10, 40, 45, 692, 692, 66, 86,
3895 306, 85, 0, 103, 0, 107, 117, 0, 75, 255,
3896 271, 0, 334, 0, 0, 82, 82, 0, 0, 0,
3897 0, 0, 343, 306, 353, 87, 351, 323, 324, 610,
3898 612, 325, 326, 620, 327, 626, 329, 630, 328, 632,
3899 330, 609, 654, 655, 608, 660, 671, 679, 680, 331,
3900 0, 332, 90, 7, 1, 196, 207, 197, 220, 193,
3901 213, 203, 202, 223, 224, 218, 201, 200, 195, 221,
3902 225, 226, 205, 194, 208, 212, 214, 206, 199, 215,
3903 222, 217, 216, 209, 219, 204, 192, 211, 210, 191,
3904 198, 189, 190, 186, 187, 188, 146, 148, 147, 181,
3905 182, 177, 159, 160, 161, 168, 165, 167, 162, 163,
3906 183, 184, 169, 170, 174, 178, 164, 166, 156, 157,
3907 158, 171, 172, 173, 175, 176, 179, 180, 185, 151,
3908 153, 33, 149, 150, 152, 382, 383, 385, 0, 762,
3909 0, 0, 317, 765, 309, 637, 0, 692, 692, 301,
3910 0, 284, 312, 101, 305, 789, 313, 0, 679, 680,
3911 0, 332, 789, 758, 102, 789, 485, 0, 98, 61,
3912 60, 0, 0, 28, 789, 12, 0, 11, 27, 281,
3913 374, 375, 486, 0, 249, 0, 343, 346, 250, 240,
3914 241, 340, 24, 0, 0, 4, 21, 23, 60, 105,
3915 20, 336, 0, 60, 60, 285, 0, 0, 60, 756,
3916 60, 0, 0, 0, 692, 692, 113, 378, 0, 123,
3917 124, 131, 463, 657, 0, 656, 658, 0, 0, 0,
3918 617, 621, 633, 627, 635, 661, 70, 261, 262, 786,
3919 785, 6, 787, 0, 0, 0, 0, 0, 0, 789,
3920 0, 0, 720, 0, 691, 370, 720, 689, 0, 372,
3921 389, 490, 479, 91, 492, 350, 390, 492, 475, 789,
3922 119, 0, 111, 108, 789, 73, 0, 0, 0, 0,
3923 0, 277, 278, 0, 0, 0, 0, 238, 239, 0,
3924 0, 71, 0, 275, 276, 0, 0, 0, 0, 0,
3925 0, 0, 0, 0, 0, 776, 777, 0, 789, 0,
3926 0, 81, 80, 0, 0, 0, 0, 0, 360, 4,
3927 5, 0, 410, 409, 0, 0, 679, 680, 332, 141,
3928 142, 0, 0, 144, 687, 0, 679, 680, 332, 368,
3929 216, 209, 219, 204, 186, 187, 188, 146, 147, 754,
3930 77, 76, 753, 0, 100, 60, 99, 779, 778, 0,
3931 352, 613, 789, 789, 154, 761, 340, 316, 764, 308,
3932 0, 0, 0, 789, 0, 0, 302, 311, 0, 789,
3933 0, 789, 789, 0, 303, 721, 60, 297, 789, 60,
3934 789, 296, 307, 0, 60, 349, 69, 30, 32, 31,
3935 0, 789, 282, 0, 0, 0, 0, 789, 0, 60,
3936 338, 19, 0, 104, 0, 341, 784, 783, 286, 784,
3937 288, 342, 757, 0, 130, 661, 121, 116, 691, 0,
3938 0, 789, 0, 464, 643, 659, 646, 644, 638, 614,
3939 615, 640, 616, 642, 618, 0, 0, 0, 0, 0,
3940 788, 9, 0, 34, 35, 36, 37, 283, 0, 67,
3941 68, 727, 724, 723, 722, 725, 733, 738, 721, 0,
3942 744, 739, 748, 747, 743, 789, 740, 789, 719, 702,
3943 705, 60, 700, 726, 728, 729, 731, 705, 735, 694,
3944 742, 423, 422, 746, 705, 750, 699, 0, 0, 0,
3945 0, 0, 463, 0, 490, 92, 463, 0, 0, 0,
3946 60, 0, 109, 120, 0, 503, 247, 254, 256, 257,
3947 258, 265, 266, 259, 260, 236, 237, 263, 264, 503,
3948 60, 251, 252, 253, 242, 243, 244, 245, 246, 279,
3949 280, 766, 768, 767, 770, 484, 769, 306, 482, 60,
3950 789, 766, 768, 767, 770, 483, 306, 0, 789, 401,
3951 0, 400, 0, 0, 0, 0, 0, 358, 340, 0,
3952 789, 0, 82, 366, 141, 142, 143, 685, 364, 0,
3953 789, 0, 0, 0, 774, 775, 78, 60, 345, 766,
3954 767, 306, 0, 0, 0, 789, 0, 0, 0, 0,
3955 760, 314, 310, 315, 789, 766, 767, 60, 766, 767,
3956 0, 0, 759, 291, 298, 293, 300, 780, 348, 29,
3957 0, 267, 13, 339, 0, 789, 0, 25, 106, 22,
3958 337, 60, 0, 114, 771, 129, 60, 766, 767, 465,
3959 647, 0, 619, 0, 623, 0, 629, 625, 0, 0,
3960 631, 248, 0, 38, 0, 421, 413, 415, 60, 418,
3961 411, 0, 698, 752, 0, 697, 0, 715, 690, 0,
3962 0, 0, 712, 734, 569, 741, 745, 0, 717, 749,
3963 60, 55, 58, 272, 269, 0, 693, 56, 270, 0,
3964 464, 488, 0, 464, 396, 397, 489, 474, 317, 41,
3965 319, 0, 44, 318, 118, 112, 0, 0, 65, 47,
3966 63, 0, 289, 312, 227, 42, 0, 332, 501, 501,
3967 0, 789, 789, 490, 481, 95, 0, 487, 298, 789,
3968 789, 295, 480, 93, 294, 335, 789, 789, 402, 789,
3969 404, 83, 403, 356, 357, 393, 0, 0, 503, 0,
3970 0, 771, 339, 60, 766, 767, 0, 0, 0, 0,
3971 141, 142, 145, 60, 0, 60, 0, 344, 476, 88,
3972 48, 289, 228, 57, 235, 155, 0, 763, 60, 304,
3973 789, 789, 487, 789, 789, 60, 789, 60, 54, 234,
3974 287, 122, 487, 26, 648, 645, 652, 653, 622, 624,
3975 634, 628, 636, 39, 60, 420, 0, 730, 0, 751,
3976 695, 742, 789, 704, 703, 705, 705, 425, 701, 705,
3977 732, 705, 729, 705, 0, 789, 789, 371, 373, 465,
3978 89, 465, 322, 0, 789, 110, 340, 789, 789, 789,
3979 0, 789, 0, 502, 502, 0, 0, 0, 0, 96,
3980 781, 789, 0, 0, 94, 391, 789, 17, 600, 395,
3981 394, 0, 0, 0, 405, 407, 0, 84, 0, 494,
3982 0, 361, 501, 0, 362, 487, 0, 0, 0, 0,
3983 487, 369, 755, 79, 477, 478, 0, 0, 0, 789,
3984 0, 0, 292, 299, 347, 720, 0, 412, 414, 416,
3985 419, 696, 0, 716, 0, 713, 0, 708, 0, 710,
3986 718, 62, 274, 0, 0, 26, 26, 317, 320, 0,
3987 0, 0, 0, 766, 767, 60, 766, 767, 0, 0,
3988 268, 53, 232, 52, 233, 97, 0, 50, 230, 51,
3989 231, 601, 602, 789, 603, 789, 14, 408, 0, 354,
3990 355, 495, 0, 0, 502, 359, 363, 0, 686, 365,
3991 0, 720, 467, 470, 0, 0, 0, 705, 705, 705,
3992 705, 59, 273, 789, 789, 321, 43, 64, 290, 487,
3993 592, 598, 565, 0, 0, 0, 502, 60, 502, 553,
3994 637, 0, 591, 74, 511, 517, 519, 521, 515, 514,
3995 549, 516, 558, 561, 564, 570, 571, 560, 524, 572,
3996 525, 577, 578, 579, 582, 583, 584, 585, 586, 588,
3997 587, 589, 590, 568, 72, 49, 229, 0, 0, 605,
3998 392, 0, 18, 607, 0, 0, 0, 496, 789, 0,
3999 367, 60, 0, 651, 650, 649, 417, 714, 709, 0,
4000 706, 711, 60, 0, 454, 453, 0, 580, 581, 142,
4001 596, 0, 541, 60, 542, 546, 60, 0, 536, 0,
4002 789, 539, 552, 0, 593, 0, 594, 0, 512, 0,
4003 0, 559, 563, 575, 576, 0, 502, 502, 0, 0,
4004 567, 0, 604, 0, 679, 680, 332, 0, 4, 15,
4005 789, 497, 499, 500, 498, 0, 508, 457, 0, 472,
4006 0, 468, 705, 789, 789, 452, 434, 437, 60, 0,
4007 729, 437, 737, 426, 437, 431, 491, 493, 60, 534,
4008 556, 544, 543, 535, 547, 782, 537, 566, 60, 518,
4009 513, 549, 520, 550, 554, 637, 562, 557, 573, 574,
4010 597, 523, 533, 522, 529, 60, 60, 60, 60, 60,
4011 60, 340, 0, 789, 0, 789, 606, 789, 406, 504,
4012 0, 0, 0, 469, 0, 0, 707, 430, 0, 429,
4013 0, 448, 0, 455, 0, 432, 443, 445, 0, 736,
4014 0, 450, 540, 0, 548, 0, 595, 0, 0, 0,
4015 526, 527, 528, 530, 531, 532, 771, 339, 60, 766,
4016 767, 599, 16, 0, 509, 510, 461, 60, 459, 462,
4017 0, 471, 427, 789, 436, 435, 437, 437, 456, 433,
4018 437, 437, 340, 0, 437, 545, 60, 550, 551, 555,
4019 487, 789, 0, 458, 473, 428, 0, 449, 0, 446,
4020 0, 440, 0, 442, 771, 339, 451, 0, 538, 506,
4021 507, 505, 460, 437, 437, 437, 437, 447, 441, 0,
4022 438, 444, 437, 439
4023};
4024
4025/* YYPGOTO[NTERM-NUM]. */
4026static const yytype_int16 yypgoto[] =
4027{
4028 -1131, -1131, -1131, -86, 1039, -1131, 1044, -1131, 882, -1131,
4029 -1131, -540, -1131, -43, 218, 868, -1131, 7, -1131, -1131,
4030 14, 27, -514, 115, -415, 82, -1131, -1131, 515, 2393,
4031 -1131, 2978, -66, -1131, -1131, -60, -22, -1131, -386, 1304,
4032 -12, 1274, -155, 16, -55, -1131, -420, 4, 3359, -395,
4033 1273, -42, -2, -1131, -1131, -5, -1131, 4318, -510, 1286,
4034 -1131, 1293, 897, 433, 2909, -1131, 395, -16, 708, -346,
4035 105, -1131, -34, -378, -199, 112, -384, -1131, -536, -50,
4036 -1131, -1131, -1131, -1131, -1131, -1131, -1131, -1131, -1131, 872,
4037 -1131, -1131, -1131, -1131, -1131, -1131, -1131, -1131, -1131, -1131,
4038 -1131, -1131, -1131, -1131, -1131, 443, -1131, -521, 1689, 2188,
4039 -368, -1131, 205, -775, -1131, -795, -805, 661, 510, -414,
4040 -1131, 199, -1131, 268, -1131, -1130, 140, 255, -1131, 348,
4041 -1131, -1013, -1131, 91, 18, -264, -104, -1131, -1131, 360,
4042 -1131, -1131, -1131, 566, -1131, -1131, -105, -1131, -519, -1131,
4043 1067, -1131, -757, -1131, -726, -508, -503, -1131, 95, -1131,
4044 -1131, -892, -403, -1131, -1131, -1131, -1131, 266, -1131, -232,
4045 -1131, -856, -916, -975, -581, -1049, -1034, -1131, 265, -1131,
4046 -1131, -740, 267, -1131, -600, 272, -1131, -1131, -1131, 188,
4047 -1131, -1131, 190, 756, 1209, -1131, 1327, 1695, 1878, 23,
4048 -1131, 2079, -1131, 911, -1131, 2666, -1131, -1131, 2885, -1131,
4049 2972, -1131, -1131, -51, -1131, -1131, -150, -1131, -1131, -1131,
4050 -1131, -1131, -1131, 20, -1131, -1131, -1131, -1131, 15, -46,
4051 3161, -1, 1338, 3481, 2519, -1131, -1131, 38, 732, 3,
4052 -1131, -1131, -299, -671, 691, -434, -322, -191, -1106, -526,
4053 -254, -732, 162, -449, 697, 185, -439, -1131, -720, -1131,
4054 -712, -1131, -464, -528, -1131, -1131, -1131, 47, -370, -313,
4055 -185, -1131, -1131, -73, -1131, -111, -13, 138, -227, -57,
4056 -63, 55
4057};
4058
4059/* YYDEFGOTO[NTERM-NUM]. */
4060static const yytype_int16 yydefgoto[] =
4061{
4062 0, 1, 2, 321, 69, 70, 71, 256, 257, 1114,
4063 1247, 637, 1025, 638, 275, 276, 488, 215, 72, 480,
4064 277, 74, 761, 473, 789, 75, 609, 595, 430, 227,
4065 846, 228, 393, 395, 947, 396, 78, 79, 585, 263,
4066 81, 82, 278, 83, 84, 85, 507, 86, 230, 413,
4067 414, 209, 210, 211, 674, 624, 213, 88, 764, 383,
4068 89, 537, 483, 538, 232, 282, 794, 625, 812, 466,
4069 467, 247, 248, 234, 456, 630, 236, 782, 783, 90,
4070 390, 494, 829, 646, 839, 837, 662, 578, 581, 265,
4071 92, 93, 94, 95, 96, 97, 98, 99, 100, 101,
4072 344, 347, 936, 1111, 826, 941, 942, 776, 266, 267,
4073 640, 821, 943, 944, 405, 736, 737, 738, 739, 555,
4074 749, 750, 1194, 1304, 1266, 1196, 1197, 1261, 1198, 1133,
4075 1134, 1188, 1297, 1298, 513, 719, 873, 302, 1122, 104,
4076 1042, 1191, 1254, 348, 105, 106, 345, 582, 583, 586,
4077 587, 950, 827, 1184, 923, 1008, 798, 1293, 830, 1341,
4078 1185, 1073, 1210, 1075, 1076, 1168, 1169, 1077, 1275, 1143,
4079 1144, 1145, 1079, 1080, 1223, 1147, 1081, 1082, 1083, 1084,
4080 1085, 556, 1087, 1088, 1089, 1090, 1091, 1092, 1093, 937,
4081 1023, 1108, 1112, 107, 108, 109, 110, 111, 112, 311,
4082 113, 114, 525, 723, 115, 116, 527, 117, 118, 119,
4083 120, 526, 528, 304, 308, 309, 518, 721, 720, 874,
4084 976, 1125, 875, 121, 122, 305, 123, 124, 125, 126,
4085 238, 239, 129, 240, 241, 838, 658, 333, 334, 335,
4086 336, 557, 893, 559, 560, 747, 561, 562, 563, 564,
4087 902, 566, 567, 568, 569, 1203, 570, 571, 572, 573,
4088 574, 575, 576, 742, 433, 663, 287, 470, 243, 132,
4089 704, 628, 666, 661, 439, 475, 807, 1151, 498, 641,
4090 400, 259
4091};
4092
4093/* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
4094 positive, shift that token. If negative, reduce the rule whose
4095 number is the opposite. If YYTABLE_NINF, syntax error. */
4096static const yytype_int16 yytable[] =
4097{
4098 128, 440, 212, 229, 229, 246, 297, 323, 307, 274,
4099 281, 398, 306, 322, 579, 73, 303, 656, 389, 900,
4100 216, 217, 212, 740, 892, 253, 642, 214, 394, 745,
4101 353, 399, 438, 558, 896, 297, 397, 558, 765, 901,
4102 322, 769, 629, 464, 946, 316, 343, 214, 297, 297,
4103 297, 128, 128, 212, 469, 300, 133, 500, 795, 431,
4104 296, 502, 242, 242, 342, 772, 767, 777, 279, 436,
4105 768, 683, 953, 924, 626, 894, 626, 682, 565, 324,
4106 339, 315, 565, 980, 300, 682, 312, 313, 314, 713,
4107 229, 978, 1123, 692, 639, 1212, 212, 407, 417, 417,
4108 417, 284, 288, -132, 330, 331, 799, 280, 280, 285,
4109 289, 1224, 683, 687, -133, 338, 815, 1104, 489, 1199,
4110 233, 244, 844, 823, 824, -140, 626, 235, 235, 692,
4111 1305, 337, 337, 752, 1237, 1240, -139, 639, 1165, -132,
4112 758, 251, -681, 254, 940, 626, 1299, 626, 134, 242,
4113 1157, 1146, 1078, 1078, 828, -135, 725, 774, 521, 523,
4114 -682, 249, -136, 729, 460, 716, 283, 493, 768, 1211,
4115 340, 785, 626, 626, 450, 392, 392, -132, 274, 392,
4116 -789, -137, -673, 1221, 462, 1262, -138, 654, 255, 491,
4117 -134, 655, 486, -133, 1166, -133, 590, 626, 1167, 626,
4118 1305, 271, 627, 332, 636, 1158, 820, 434, 740, 885,
4119 726, -673, 492, 1124, 235, 775, 1299, 730, 322, -140,
4120 128, 310, 249, -136, 1224, 512, 1034, 1186, 1224, 1319,
4121 274, 339, -140, 229, -123, 229, 319, 1032, 506, -139,
4122 1126, 1316, 320, 297, 907, -124, 246, 342, 908, -135,
4123 900, 978, 1236, 1239, 671, 128, -131, 850, 853, 533,
4124 534, 535, 536, 1078, 842, 451, 452, -130, 1086, 1086,
4125 73, 464, 128, 627, 1049, 636, 280, 889, 346, 319,
4126 889, -132, 337, 337, 928, 320, -126, -132, 1319, 279,
4127 457, 868, 300, -127, 242, -766, 341, 457, 339, 959,
4128 471, 705, 297, 1318, 833, 891, 951, 505, 274, 954,
4129 683, 133, -128, 647, 843, 894, 682, -129, 682, -767,
4130 1189, -125, 128, 961, 668, 952, 692, 705, 280, 643,
4131 1157, 651, 474, 476, 319, -133, 626, 73, 626, 1157,
4132 320, -133, 322, 1182, 249, 653, 626, 250, 626, -104,
4133 128, 300, 472, 644, 645, 693, 592, 468, 695, 235,
4134 740, 1183, 740, 698, 981, -136, 915, 279, -766, 340,
4135 -118, -136, 356, 635, -140, 724, 229, 724, 708, 1086,
4136 -140, -139, -138, 249, 634, -556, -137, -139, -60, 128,
4137 991, -135, 514, 249, 992, 128, 128, -135, 497, 497,
4138 1022, 514, -134, 497, 349, 503, 280, 392, 392, 392,
4139 392, 675, 539, 540, 350, 1190, 1009, 1037, -681, 929,
4140 1204, 1086, 1029, 229, 683, 1030, 59, 934, 1086, 1086,
4141 682, 354, 1035, 863, 634, 1036, 861, 864, 1039, 380,
4142 381, 382, 442, 471, 635, 280, -139, 229, 516, 517,
4143 748, 280, 280, -132, 506, 634, 992, 516, 517, 297,
4144 1217, 983, 985, 1137, 1138, 987, 705, 989, -135, 990,
4145 635, -138, -137, 444, -123, 212, 705, 392, 699, 784,
4146 443, 634, 242, 654, 870, 859, -682, 1139, 310, 732,
4147 250, 128, 565, 392, -767, 341, 635, 565, -127, 229,
4148 214, 245, 684, 865, 969, 514, 909, 634, 300, 911,
4149 487, 1011, 1013, -126, 471, -140, 1120, 1017, 1019, 740,
4150 740, -133, 766, 457, -138, 457, 1119, -767, -137, 683,
4151 -138, 128, 446, 900, -137, 1086, 506, 128, 1303, -134,
4152 667, 297, -124, 711, -134, -139, 1339, 235, 1307, 453,
4153 -134, 319, 733, 1311, 809, -378, 847, 320, 1141, 515,
4154 1150, 516, 517, 1228, 1229, 762, 471, 779, 762, 1103,
4155 1103, 1062, 790, 879, -60, 1005, 249, 128, 879, 454,
4156 128, 249, 1033, -378, -378, -60, 822, 280, 455, -135,
4157 300, 547, 836, 805, 900, 682, 1207, 817, 461, 819,
4158 770, 1105, 813, 692, 773, 1074, 1074, 626, -127, 626,
4159 743, 804, 743, 1127, 1128, 1130, 1131, 443, 1345, 810,
4160 811, 788, 551, -126, 330, 331, 1225, 887, -127, -127,
4161 463, -766, -127, 280, -672, 635, 280, 849, 229, 128,
4162 -378, 128, 931, -126, -126, 635, 634, -126, 229, 481,
4163 790, 790, -140, 1043, -137, 811, 634, 871, 1231, 1233,
4164 1115, 128, 297, -672, 1142, 1257, 1259, 859, 1205, 212,
4165 1140, 356, 855, -131, 862, 876, 558, -134, 552, -339,
4166 1103, 1162, 245, 1202, 790, 457, 754, 435, 804, 811,
4167 490, 814, 1315, -128, 214, 280, 1317, 280, -125, 788,
4168 788, 781, 477, 872, 755, 471, 781, -339, -339, 754,
4169 553, 300, 478, 479, 1300, 471, 1074, 280, 1193, 1121,
4170 -103, 565, 1103, 922, -674, 800, 814, 1170, -675, 1103,
4171 1103, 506, 565, 788, 962, 627, 297, 636, 1208, 457,
4172 1177, 866, 558, 964, 806, 845, 878, -677, 880, 385,
4173 495, 881, 882, -674, 972, 1142, 974, -675, 1256, 940,
4174 814, 825, 385, -676, -339, 1142, 1142, 501, -767, 385,
4175 1230, 385, 958, 977, 504, 1325, -677, 386, 387, 1324,
4176 957, -678, 867, 514, 385, 300, 332, 565, 514, 522,
4177 386, 458, -676, 956, 889, 509, 1205, 386, 485, 386,
4178 437, 1205, 806, -128, 431, 995, 1205, 996, -125, 1202,
4179 -678, 1202, 386, 510, -679, 524, 1202, 1249, -766, 891,
4180 955, 1202, 532, -128, -128, 577, 497, -128, -125, -125,
4181 960, 806, -125, 529, 388, 128, 1103, 519, 128, 516,
4182 517, 212, -679, -679, 516, 517, 1193, 459, -688, 36,
4183 37, 1193, 39, -669, 459, 866, 1193, -670, 580, 45,
4184 46, -669, 1205, 593, 1205, 584, 1205, -680, 1205, 511,
4185 530, 938, 945, 91, 945, 904, 1028, 1202, 1200, 1202,
4186 975, 1202, -669, 1202, 664, 1205, -670, 237, 237, -669,
4187 -669, 280, 762, 648, 280, -680, -680, 1288, 1027, -679,
4188 1202, 1038, 249, 496, 790, 790, 635, 514, 895, 229,
4189 790, 790, 1193, 665, 1193, 652, 1193, 634, 1193, 903,
4190 392, 457, 249, 499, 91, 91, 1220, 694, 298, 626,
4191 657, 626, 677, 1044, 678, 1193, 1235, 1238, 696, 237,
4192 128, -118, 939, 940, -766, 487, -669, 743, 806, -332,
4193 -766, -424, -680, 788, 788, 697, 128, 298, 806, 788,
4194 788, 520, 809, 516, 517, 237, 237, 1163, 1164, 237,
4195 404, 415, 415, 966, 237, 128, 471, -332, -332, 790,
4196 -139, 514, 702, 541, 710, 542, 543, 544, 545, 546,
4197 1118, 1024, 1059, 514, 790, 810, 280, -135, 128, 128,
4198 626, -130, 1053, 1054, 514, 712, 1200, 1102, 1102, 547,
4199 -767, 1200, 280, 1056, 1057, 1250, 1251, 385, -126, 1153,
4200 249, 1322, 741, 548, 392, 1156, 508, 508, 788, 744,
4201 -137, 280, 128, 549, -332, 722, 771, 516, 517, 931,
4202 551, 552, 746, 788, 751, 386, 649, 519, 781, 516,
4203 517, -128, 676, -670, 1148, 756, 1234, 297, 727, 705,
4204 516, 517, 1102, 1102, 757, 759, 1102, 852, 854, 786,
4205 808, 1179, 1180, 553, -134, 385, 1200, 818, 1109, 825,
4206 1113, -670, -670, 1102, -771, 852, 854, 883, 280, 1218,
4207 1206, 828, 1246, 91, 897, -125, 886, 1272, 888, 905,
4208 1244, 869, 650, 386, 659, 906, 1175, 1276, 1135, 1135,
4209 128, 910, -312, 128, 128, 492, 913, 237, 1102, 237,
4210 806, 322, 237, 237, 1280, 1281, 1282, -771, 91, 914,
4211 1209, 916, 128, 1213, 1245, 128, -767, 917, -670, 918,
4212 1102, 930, -767, 1102, 925, 91, 1047, 1255, 1048, -340,
4213 1050, 935, 297, 1232, 940, -771, -771, 1102, 1102, 1102,
4214 660, 514, 1102, 1102, 973, 298, 280, 1102, 1102, 280,
4215 280, 755, 982, 945, 1279, 356, 128, -340, -340, 385,
4216 984, 986, 806, 1149, 1294, 1295, 988, -316, 280, 128,
4217 1015, 280, 1045, 385, 1046, 91, -314, 237, 237, 237,
4218 237, 417, 237, 237, 1107, 1110, 1129, 386, 920, 1132,
4219 -771, 1152, -771, 1159, 297, 519, -766, 516, 517, 1160,
4220 1217, 386, 1242, 91, 298, 1283, 1284, 1285, 635, 1215,
4221 1161, 229, 280, 1214, -340, 945, 1187, 392, 1060, 634,
4222 378, 379, 380, 381, 382, 280, 1157, 1187, 743, 743,
4223 1321, 869, 1252, 128, 1241, 1253, 361, 362, 806, 1301,
4224 237, 806, 91, 417, 921, 546, 1263, 237, 91, 91,
4225 1258, 1260, 1102, 1265, 1270, 1320, 1102, 1102, 1243, 1273,
4226 1312, 806, 1308, 237, 541, 547, 542, 543, 544, 545,
4227 546, 1192, 128, 1274, 1201, 484, 1277, 385, 471, -766,
4228 938, 1154, 1113, 36, 37, 80, 39, 237, 1278, 280,
4229 547, 373, 374, 1187, 1326, -767, 551, 552, 1328, 80,
4230 80, 1012, 1014, 258, 548, 386, 1313, 1018, 1020, 1178,
4231 1330, 237, 392, 392, 549, 1332, 1102, 1337, 993, 994,
4232 550, 551, 552, 40, 41, 42, 43, 999, 280, 553,
4233 1000, 1155, 1002, 806, 806, 806, 80, 80, 743, 1349,
4234 709, 963, 1012, 1014, 91, 1018, 1020, 531, 1072, 1072,
4235 707, 80, 402, 419, 553, 384, 945, 554, 700, 848,
4236 1026, 298, 660, 237, 541, 1248, 542, 543, 544, 545,
4237 1041, 22, 23, 24, 25, 884, 979, 80, 80, 1264,
4238 1195, 80, 1136, 806, 91, 1310, 80, 31, 32, 33,
4239 91, 1106, 1323, 1342, 588, 965, 1340, 40, 41, 42,
4240 43, 44, 1306, 1072, 1072, 1222, 1226, 1072, 1227, 1219,
4241 356, 1149, 1314, 1291, 734, 1106, 441, 1292, 728, 432,
4242 735, 890, 899, 1302, 1072, 0, 0, 369, 370, 237,
4243 91, 0, 237, 91, 1338, 0, 1267, 0, 0, 1271,
4244 0, 237, 0, 298, 0, 0, 796, 0, 0, 57,
4245 58, 59, 60, 61, 62, 63, 64, 65, 0, 1072,
4246 0, 0, 0, 541, 0, 542, 543, 544, 545, 546,
4247 1343, 0, 1344, 0, 1346, 378, 379, 380, 381, 382,
4248 0, 1072, 0, 0, 1072, 0, 292, 0, 0, 547,
4249 0, 1352, 91, 0, 91, 0, 0, 0, 1072, 1072,
4250 1072, 0, 237, 1072, 1072, 80, 0, 0, 1072, 1072,
4251 0, 0, 237, 549, 91, 237, 0, 0, 0, 550,
4252 551, 552, 0, 0, 796, 796, 0, 482, 0, 80,
4253 0, 80, 0, 0, 80, 80, 0, 356, 0, 0,
4254 80, 1327, 1329, 0, 0, 1331, 1333, 0, 0, 1336,
4255 0, 0, 237, 553, 369, 370, 554, 80, 796, 0,
4256 0, 0, 0, 0, 298, 0, 249, 22, 23, 24,
4257 25, 541, 0, 542, 543, 544, 545, 0, 1347, 1348,
4258 1350, 1351, 0, 31, 32, 33, 1060, 1353, 0, 0,
4259 1061, 0, 0, 40, 41, 42, 43, 44, 0, 375,
4260 376, 377, 378, 379, 380, 381, 382, 80, 0, 80,
4261 80, 80, 80, 1072, 80, 80, 0, 1072, 1072, 0,
4262 0, 734, 589, 0, 0, 1063, 1064, 594, 325, 326,
4263 327, 328, 329, 1065, 0, 80, 1066, 356, 298, 1067,
4264 1068, 0, 1069, 0, 0, 57, 58, 59, 60, 61,
4265 62, 63, 64, 65, 369, 370, 0, 0, 0, 0,
4266 541, 0, 542, 543, 544, 545, 546, 0, 0, 0,
4267 102, 0, 80, 0, 80, 1071, 0, 1072, 0, 80,
4268 80, 80, 292, 0, 102, 102, 547, 0, 91, 249,
4269 237, 91, 0, 0, 541, 80, 542, 543, 544, 545,
4270 0, 377, 378, 379, 380, 381, 382, 0, 0, 1296,
4271 549, 542, 543, 544, 545, 672, 673, 551, 552, 80,
4272 0, 102, 102, 0, 0, 541, 679, 542, 543, 544,
4273 545, 546, 0, 0, 690, 691, 102, 0, 0, 0,
4274 0, 0, 0, 80, 1094, 1094, 0, 0, 0, 0,
4275 553, 547, 0, 0, 482, 0, 237, 0, 0, 0,
4276 706, 0, 102, 102, 0, 548, 102, 0, 0, 0,
4277 0, 102, 0, 237, 0, 549, 80, 0, 796, 796,
4278 0, 550, 551, 552, 796, 796, 541, 0, 542, 543,
4279 544, 545, 546, 91, 237, 80, 0, 0, 0, 1094,
4280 1094, 0, 0, 1094, 0, 0, 0, 0, 0, 91,
4281 0, 0, 547, 0, 0, 553, 80, 0, 554, 0,
4282 1094, 0, 80, 0, 0, 0, 0, 0, 91, 0,
4283 0, 0, 0, 0, 0, 0, 549, 0, 0, 0,
4284 0, 0, 550, 551, 552, 0, 0, 0, 0, 0,
4285 0, 91, 91, 796, 0, 1094, 0, 0, 0, 0,
4286 0, 80, 80, 0, 80, 80, 0, 0, 796, 0,
4287 0, 0, 0, 80, 0, 0, 553, 1094, 80, 554,
4288 1094, 0, 0, 0, 0, 91, 0, 0, 0, 0,
4289 102, 0, 0, 0, 1094, 1094, 1094, 0, 0, 1094,
4290 1094, 0, 0, 0, 1094, 1094, 0, 0, 0, 0,
4291 0, 816, 0, 0, 102, 0, 102, 0, 0, 102,
4292 102, 0, 0, 0, 80, 102, 80, 0, 0, 0,
4293 0, 0, 0, 0, 80, 0, 0, 0, 0, 0,
4294 0, 0, 102, 0, 80, 0, 80, 80, 856, 0,
4295 0, 0, 22, 23, 24, 25, 80, 80, 0, 1173,
4296 0, 0, 0, 91, 0, 0, 91, 91, 31, 32,
4297 33, 1060, 0, 0, 0, 1061, 0, 0, 40, 41,
4298 42, 43, 44, 0, 80, 91, 0, 0, 91, 0,
4299 80, 0, 102, 0, 102, 102, 102, 102, 0, 102,
4300 102, 0, 0, 0, 0, 0, 0, 237, 0, 1094,
4301 1063, 1064, 0, 1094, 1094, 0, 0, 0, 1065, 0,
4302 102, 1066, 0, 0, 1067, 1068, 0, 1069, 0, 91,
4303 57, 58, 59, 60, 61, 62, 63, 64, 65, 0,
4304 0, 0, 91, 0, 0, 0, 0, 0, 0, 0,
4305 0, 0, 0, 0, 1269, 0, 0, 102, 0, 102,
4306 1071, 0, 0, 0, 102, 102, 102, 292, 0, 0,
4307 0, 0, 0, 1094, 926, 927, 0, 0, 0, 0,
4308 102, 0, 932, 933, 0, 0, 0, 0, 0, 0,
4309 0, 0, 0, 0, 0, 237, 0, 0, 0, 0,
4310 0, 0, 237, 237, 102, 0, 91, 0, 0, 0,
4311 0, 0, 0, 0, 0, 0, 1309, 0, 0, 0,
4312 80, 0, 80, 80, 0, 0, 0, 0, 102, 0,
4313 0, 0, 0, 967, 968, 0, 970, 971, 0, 0,
4314 0, 0, 0, 0, 0, 91, 0, 0, 0, 0,
4315 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4316 0, 102, 0, 0, 0, 0, 0, 0, 0, 103,
4317 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4318 102, 0, 0, 103, 103, 0, 0, 0, 80, 0,
4319 0, 1001, 0, 0, 0, 0, 0, 1095, 1095, 0,
4320 0, 102, 0, 0, 1016, 80, 0, 102, 0, 0,
4321 80, 80, 0, 0, 0, 0, 80, 80, 0, 0,
4322 103, 103, 0, 0, 0, 80, 80, 356, 357, 358,
4323 359, 360, 361, 362, 363, 103, 365, 366, 0, 0,
4324 0, 80, 1040, 0, 369, 370, 102, 102, 0, 102,
4325 102, 0, 1095, 1095, 0, 0, 1095, 0, 102, 0,
4326 80, 103, 103, 102, 0, 103, 0, 0, 0, 0,
4327 103, 0, 0, 1095, 0, 0, 0, 0, 0, 0,
4328 0, 0, 0, 80, 80, 80, 0, 373, 374, 375,
4329 376, 377, 378, 379, 380, 381, 382, 0, 0, 0,
4330 80, 0, 0, 0, 0, 0, 0, 0, 1095, 102,
4331 0, 102, 0, 0, 0, 0, 0, 80, 0, 102,
4332 0, 0, 0, 0, 0, 0, 0, 0, 0, 102,
4333 1095, 102, 102, 1095, 0, 0, 0, 0, 0, 0,
4334 0, 102, 102, 0, 0, 0, 0, 1095, 1095, 1095,
4335 0, 0, 1095, 1095, 0, 0, 0, 1095, 1095, 0,
4336 0, 0, 0, 0, 0, 0, 0, 0, 0, 102,
4337 0, 0, 0, 0, 76, 102, 0, 0, 0, 0,
4338 0, 0, 0, 0, 0, 0, 0, 0, 0, 103,
4339 0, 0, 0, 0, 0, 80, 0, 0, 80, 80,
4340 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4341 0, 0, 0, 103, 0, 103, 0, 80, 103, 103,
4342 80, 0, 0, 1216, 103, 76, 76, 0, 0, 294,
4343 0, 0, 0, 0, 0, 0, 0, 0, 0, 80,
4344 0, 103, 0, 0, 0, 0, 0, 0, 0, 0,
4345 0, 0, 0, 0, 0, 0, 0, 0, 294, 0,
4346 0, 80, 1095, 0, 0, 0, 1095, 1095, 0, 0,
4347 0, 294, 294, 294, 80, 0, 0, 0, 0, 0,
4348 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4349 0, 103, 0, 103, 103, 103, 103, 0, 103, 103,
4350 131, 0, 0, 0, 0, 102, 0, 102, 102, 0,
4351 0, 0, 0, 0, 0, 0, 0, 0, 0, 103,
4352 0, 0, 0, 0, 0, 0, 1095, 80, 0, 0,
4353 0, 0, 0, 0, 80, 80, 0, 0, 80, 0,
4354 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4355 0, 131, 131, 0, 0, 301, 103, 0, 103, 0,
4356 0, 0, 0, 103, 103, 103, 0, 0, 0, 0,
4357 0, 0, 0, 102, 0, 0, 0, 80, 0, 103,
4358 0, 0, 0, 0, 301, 0, 0, 0, 0, 0,
4359 102, 0, 0, 0, 76, 102, 102, 408, 418, 418,
4360 0, 102, 102, 103, 0, 0, 0, 0, 0, 0,
4361 102, 102, 0, 919, 0, 0, 0, 0, 0, 0,
4362 0, 0, 0, 0, 0, 0, 102, 103, 0, 76,
4363 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4364 0, 0, 0, 0, 0, 102, 76, 356, 357, 358,
4365 359, 360, 361, 362, 363, 364, 365, 366, 367, 368,
4366 103, 0, 0, 0, 369, 370, 294, 0, 102, 102,
4367 102, 0, 0, 0, 0, 0, 0, 0, 0, 103,
4368 0, 0, 0, 1096, 1096, 102, 0, 0, 0, 0,
4369 0, 0, 0, 0, 0, 0, 76, 0, 0, 0,
4370 103, 0, 102, 0, 0, 372, 103, 373, 374, 375,
4371 376, 377, 378, 379, 380, 381, 382, 0, 0, 0,
4372 131, 0, 0, 0, 76, 294, 0, 0, 0, 0,
4373 0, 0, 0, 0, 0, 0, 0, 0, 1096, 1096,
4374 0, 0, 1096, 0, 0, 103, 103, 0, 103, 103,
4375 0, 0, 0, 0, 0, 131, 0, 103, 0, 1096,
4376 0, 0, 103, 76, 0, 0, 0, 0, 0, 76,
4377 76, 0, 131, 0, 0, 0, 0, 0, 0, 0,
4378 102, 0, 0, 102, 102, 0, 0, 0, 0, 0,
4379 0, 0, 301, 0, 1096, 0, 0, 0, 0, 0,
4380 0, 0, 102, 0, 0, 102, 0, 0, 103, 0,
4381 103, 0, 0, 0, 0, 0, 1096, 0, 103, 1096,
4382 0, 0, 131, 0, 102, 0, 0, 0, 103, 0,
4383 103, 103, 0, 1096, 1096, 1096, 0, 0, 1096, 1096,
4384 103, 103, 0, 1096, 1096, 0, 102, 0, 0, 0,
4385 131, 301, 0, 0, 0, 0, 0, 0, 0, 102,
4386 0, 0, 0, 0, 0, 76, 1097, 1097, 103, 0,
4387 0, 0, 0, 0, 103, 0, 0, 0, 0, 0,
4388 0, 0, 294, 0, 0, 0, 0, 0, 0, 131,
4389 0, 0, 0, 0, 0, 131, 131, 0, 0, 0,
4390 0, 0, 0, 0, 0, 76, 0, 0, 0, 0,
4391 0, 76, 102, 0, 0, 0, 0, 0, 0, 102,
4392 102, 1097, 1097, 102, 0, 1097, 0, 0, 0, 0,
4393 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4394 0, 0, 1097, 0, 286, 0, 0, 0, 1096, 0,
4395 0, 76, 1096, 1096, 76, 0, 0, 0, 0, 77,
4396 0, 0, 102, 0, 294, 0, 0, 76, 0, 0,
4397 0, 0, 0, 0, 0, 0, 0, 1097, 0, 0,
4398 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4399 0, 131, 0, 0, 0, 0, 0, 0, 0, 1097,
4400 0, 0, 1097, 0, 103, 0, 103, 103, 301, 0,
4401 77, 77, 1096, 76, 295, 76, 1097, 1097, 1097, 0,
4402 0, 1097, 1097, 0, 0, 0, 1097, 1097, 0, 0,
4403 0, 131, 0, 0, 0, 76, 0, 131, 0, 0,
4404 0, 0, 0, 295, 0, 76, 76, 0, 0, 0,
4405 0, 0, 0, 0, 0, 0, 295, 295, 295, 0,
4406 0, 0, 0, 0, 0, 0, 0, 1098, 1098, 0,
4407 0, 0, 103, 0, 0, 0, 0, 131, 0, 76,
4408 131, 0, 0, 0, 0, 294, 0, 0, 0, 103,
4409 301, 0, 0, 797, 103, 103, 0, 0, 0, 0,
4410 103, 103, 0, 0, 0, 0, 0, 0, 445, 103,
4411 103, 447, 448, 449, 0, 0, 0, 0, 0, 0,
4412 0, 0, 1098, 1098, 0, 103, 1098, 0, 0, 0,
4413 0, 1097, 0, 0, 0, 1097, 1097, 0, 0, 131,
4414 0, 131, 127, 1098, 103, 0, 0, 0, 0, 0,
4415 0, 0, 0, 0, 0, 0, 0, 0, 0, 294,
4416 0, 131, 0, 0, 0, 0, 0, 103, 103, 103,
4417 0, 797, 797, 0, 0, 0, 0, 0, 1098, 77,
4418 0, 0, 0, 0, 103, 0, 0, 0, 0, 0,
4419 0, 0, 0, 127, 127, 1097, 0, 299, 0, 0,
4420 1098, 103, 0, 1098, 0, 797, 0, 0, 0, 76,
4421 0, 301, 76, 0, 77, 0, 0, 1098, 1098, 1098,
4422 877, 0, 1098, 1098, 0, 0, 299, 1098, 1098, 0,
4423 0, 77, 0, 0, 0, 0, 0, 0, 0, 406,
4424 416, 416, 416, 0, 0, 0, 0, 0, 0, -789,
4425 0, 295, 0, 0, 0, 0, 0, -789, -789, -789,
4426 0, 0, -789, -789, -789, 0, -789, 0, 0, 0,
4427 0, 0, 0, 0, -789, -789, -789, 0, 0, 103,
4428 0, 77, 103, 103, 0, 301, -789, -789, 0, -789,
4429 -789, -789, -789, -789, 0, 0, 0, 0, 0, 76,
4430 76, 103, 0, 0, 103, 76, 76, 0, 0, 77,
4431 295, 0, 0, 0, 76, 0, 0, -789, -789, 0,
4432 0, 0, 0, 103, 0, 0, 0, 0, 0, 0,
4433 76, 0, 1098, 0, 0, 131, 1098, 1098, 131, 0,
4434 87, 0, 0, 680, 681, 103, -789, -789, 77, 76,
4435 0, 0, 286, 0, 77, 77, 0, 0, 103, 0,
4436 0, 0, 127, 0, 0, 0, 0, 0, 0, 0,
4437 -789, 0, 76, 76, 76, 0, 0, 0, 0, 0,
4438 0, 0, 0, 0, 0, 681, 0, 0, 286, 76,
4439 0, 87, 87, 0, 0, 0, 1098, 127, 0, 0,
4440 0, -789, -789, 0, -789, 0, 76, 245, -789, 0,
4441 -789, 103, 0, 0, 127, 0, 0, 0, 103, 103,
4442 0, 0, 103, 0, 0, 797, 797, 0, 0, 0,
4443 0, 797, 797, 0, 299, 0, 0, 403, 0, 0,
4444 131, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4445 77, 0, 0, 0, 0, 0, 131, 753, 0, 0,
4446 0, 103, 130, 0, 127, 0, 0, 295, 0, 0,
4447 0, 0, 0, 0, 0, 131, 0, 0, 780, 0,
4448 294, 0, 0, 793, 76, 0, 0, 76, 76, 0,
4449 77, 0, 127, 299, 0, 0, 77, 0, 131, 131,
4450 797, 0, 0, 0, 0, 0, 76, 0, 0, 76,
4451 0, 0, 0, 130, 130, 797, 0, 0, 0, 0,
4452 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4453 0, 127, 131, 0, 0, 0, 77, 127, 127, 77,
4454 0, 0, 0, 0, 0, 0, 0, 0, 0, 295,
4455 76, 0, 77, 0, 0, 0, 0, 0, 0, 0,
4456 87, 0, 0, 76, 0, 857, 0, 0, 0, 0,
4457 0, 0, 0, 0, 0, 294, 0, 0, 0, 0,
4458 0, 0, 0, 681, 0, 286, 0, 0, 0, 0,
4459 0, 0, 0, 0, 0, 87, 0, 0, 77, 0,
4460 77, 0, 0, 0, 0, 0, 1176, 0, 0, 0,
4461 131, 0, 87, 131, 131, 0, 0, 0, 0, 0,
4462 77, 0, 0, 0, 0, 0, 0, 76, 0, 0,
4463 77, 77, 131, 127, 0, 131, 0, 294, 0, 898,
4464 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4465 299, 0, 0, 0, 1099, 1099, 0, 0, 0, 0,
4466 0, 0, 87, 0, 77, 0, 76, 912, 0, 0,
4467 295, 0, 0, 127, 0, 0, 131, 0, 0, 127,
4468 0, 0, 130, 0, 0, 0, 0, 0, 0, 131,
4469 87, 0, 0, 0, 0, 0, 0, 681, 0, 0,
4470 0, 418, 0, 0, 0, 0, 0, 0, 0, 1099,
4471 1099, 0, 0, 1099, 0, 949, 0, 130, 0, 127,
4472 0, 0, 127, 0, 0, 0, 0, 0, 0, 87,
4473 1099, 0, 299, 0, 130, 87, 87, 0, 0, 0,
4474 0, 0, 0, 0, 295, 0, 0, 0, 0, 0,
4475 0, 0, 0, 131, 0, 0, 0, 0, 0, 0,
4476 0, 0, 0, 418, 0, 1099, 0, 0, 0, 0,
4477 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4478 0, 127, 0, 127, 130, 0, 0, 1099, 0, 0,
4479 1099, 0, 131, 0, 77, 0, 0, 77, 0, 0,
4480 0, 0, 998, 127, 1099, 1099, 1099, 0, 0, 1099,
4481 1099, 0, 130, 0, 1099, 1099, 0, 0, 0, 0,
4482 0, 0, 0, 0, 0, 1021, 0, 0, 0, 0,
4483 0, 87, 0, 0, 0, 0, 0, 1031, 0, 0,
4484 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4485 0, 130, 0, 299, 0, 0, 0, 130, 130, 0,
4486 0, 0, 286, 0, 0, 0, 0, 0, 0, 0,
4487 0, 87, 0, 1100, 1100, 0, 0, 87, 0, 0,
4488 0, 0, 0, 0, 77, 77, 1055, 0, 0, 0,
4489 77, 77, 0, 0, 0, 0, 0, 0, 0, 77,
4490 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4491 0, 0, 0, 0, 0, 77, 0, 87, 0, 1099,
4492 87, 1117, 0, 1099, 1099, 0, 0, 299, 1100, 1100,
4493 0, 0, 1100, 791, 77, 0, 0, 0, 0, 0,
4494 0, 0, 0, 0, 0, 0, 0, 0, 0, 1100,
4495 0, 0, 0, 130, 0, 0, 0, 77, 77, 77,
4496 1101, 1101, 0, 0, 0, 0, 0, 0, 0, 0,
4497 0, 0, 0, 0, 77, 0, 0, 127, 0, 87,
4498 127, 87, 0, 1099, 1100, 0, 0, 0, 0, 0,
4499 0, 77, 0, 130, 0, 0, 0, 0, 0, 130,
4500 0, 87, 0, 0, 0, 1181, 1100, 0, 0, 1100,
4501 0, 791, 791, 0, 0, 1101, 1101, 0, 0, 1101,
4502 0, 0, 0, 1100, 1100, 1100, 0, 0, 1100, 1100,
4503 0, 0, 0, 1100, 1100, 0, 1101, 0, 0, 130,
4504 0, 0, 130, 0, 0, 791, 0, 0, 0, 0,
4505 0, 0, 0, 0, 0, 130, 0, 0, 0, 0,
4506 0, 0, 0, 0, 0, 295, 0, 0, 0, 77,
4507 0, 1101, 77, 77, 0, 0, 0, 0, 0, 0,
4508 0, 0, 127, 0, 0, 0, 0, 0, 0, 0,
4509 0, 77, 0, 1101, 77, 0, 1101, 0, 127, 0,
4510 0, 130, 0, 130, 0, 0, 0, 0, 0, 0,
4511 1101, 1101, 1101, 0, 0, 1101, 1101, 127, 0, 0,
4512 1101, 1101, 0, 130, 0, 0, 0, 0, 0, 0,
4513 0, 0, 0, 130, 130, 77, 0, 0, 1100, 0,
4514 127, 127, 1100, 1100, 0, 0, 0, 0, 77, 0,
4515 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4516 295, 0, 0, 0, 0, 0, 0, 130, 0, 0,
4517 0, 0, 0, 0, 127, 87, 0, 0, 87, 0,
4518 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4519 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4520 0, 0, 1100, 0, 0, 0, 0, 0, 0, 0,
4521 0, 0, 77, 0, 0, 0, 0, 0, 0, 0,
4522 0, 0, 295, 0, 0, 1101, 0, 0, 0, 1101,
4523 1101, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4524 0, 0, 0, 0, 0, 0, 0, 0, 1174, 0,
4525 0, 77, 127, 0, 0, 127, 127, 0, 0, 0,
4526 0, 0, 0, 0, 0, 791, 791, 0, 0, 0,
4527 0, 791, 791, 0, 127, 0, 0, 127, 0, 0,
4528 87, 0, 0, 0, 0, 0, 0, 0, 0, 1101,
4529 0, 0, 0, 0, 0, 0, 87, 130, 0, 0,
4530 130, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4531 0, 0, 0, 231, 231, 87, 0, 0, 127, 0,
4532 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4533 0, 127, 0, 0, 0, 0, 0, 0, 87, 87,
4534 791, 0, 0, 416, 0, 264, 268, 269, 270, 0,
4535 0, 0, 231, 231, 0, 791, 0, 0, 0, 0,
4536 0, 0, 0, 0, 0, 317, 318, 0, 0, 0,
4537 0, 0, 87, 0, 0, 0, 0, 0, 0, 0,
4538 0, 0, 0, 0, 0, 0, 0, 130, 130, 0,
4539 0, 0, 0, 130, 130, 127, 0, 0, 0, 0,
4540 231, 0, 130, 0, 0, 416, 0, 0, 0, 0,
4541 0, 0, 0, 0, 0, 0, 0, 0, 130, 0,
4542 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4543 0, 0, 0, 0, 127, 0, 0, 130, 0, 0,
4544 0, 0, 0, 0, 0, 0, 1172, 0, 0, 0,
4545 87, 0, 0, 87, 87, 0, 0, 0, 0, 0,
4546 130, 130, 130, 0, 0, 0, 0, 0, 0, 0,
4547 -486, 0, 87, 0, 0, 87, 0, 130, -486, -486,
4548 -486, 0, 0, -486, -486, -486, 0, -486, 0, 0,
4549 0, 0, 0, 0, 130, -486, -486, -486, -486, 0,
4550 0, 0, 0, 0, 0, 0, 0, -486, -486, 0,
4551 -486, -486, -486, -486, -486, 0, 87, 231, 0, 0,
4552 231, 231, 231, 0, 317, 0, 0, 0, 0, 87,
4553 0, 0, 0, 0, 0, 0, 0, 0, -486, -486,
4554 0, 0, 0, 231, 0, 231, 0, 0, -486, -486,
4555 -486, -486, -486, -486, -486, -486, -486, -486, -486, -486,
4556 -486, 0, 0, 0, 0, -486, -486, -486, -486, 0,
4557 0, -486, 130, 0, 0, 130, 130, -486, 0, 0,
4558 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4559 0, -486, 0, 87, 130, 0, 0, 130, 0, 0,
4560 0, 0, 0, 0, 0, 0, -486, 0, -486, -486,
4561 -486, -486, -486, -486, -486, -486, -486, -486, 0, 0,
4562 0, 0, -486, -486, -486, -486, -486, 0, 245, -486,
4563 -486, -486, 87, 0, 0, 0, 0, 0, 130, 0,
4564 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4565 0, 130, 0, 0, 596, 597, 598, 599, 600, 0,
4566 0, 601, 602, 603, 604, 605, 606, 607, 608, 0,
4567 610, 0, 0, 611, 612, 613, 614, 615, 616, 617,
4568 618, 619, 620, 0, 0, 0, 231, 0, 0, 0,
4569 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4570 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4571 0, 0, 0, 0, 0, 130, 0, 0, 0, 0,
4572 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4573 0, 0, 0, 231, 0, 0, 0, 0, 0, 0,
4574 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4575 0, 0, 231, 231, 130, 0, 0, 231, 0, 0,
4576 0, 231, -771, 270, 0, 0, 0, 0, 0, 0,
4577 -771, -771, -771, 0, 0, -771, -771, -771, 0, -771,
4578 0, 701, 0, 0, 0, 0, 0, -771, -771, -771,
4579 -771, -771, 0, 0, 231, 0, 0, 231, 0, -771,
4580 -771, 0, -771, -771, -771, -771, -771, 0, 0, 231,
4581 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4582 0, 0, 0, 0, 0, 0, 0, 731, 0, 0,
4583 -771, -771, 0, 0, 0, 0, 0, 0, 0, 0,
4584 -771, -771, -771, -771, -771, -771, -771, -771, -771, -771,
4585 -771, -771, -771, 0, 0, 0, 0, -771, -771, -771,
4586 -771, 0, 860, -771, 0, 0, 231, 0, 0, -771,
4587 0, 0, 0, 0, 0, 763, 0, 0, 763, 0,
4588 0, 0, 0, -771, 0, 0, -771, 231, 0, 0,
4589 0, 0, 792, 0, 0, 0, 0, -136, -771, -771,
4590 -771, -771, -771, -771, -771, -771, -771, -771, -771, -771,
4591 0, 0, 0, 0, -771, -771, -771, -771, -771, 0,
4592 0, -771, -771, -771, 0, 0, 0, 0, 0, 0,
4593 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4594 0, 0, 0, 0, 0, 0, 0, 0, 231, 0,
4595 0, 0, 0, 0, 0, 0, 0, 0, 231, 0,
4596 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4597 851, 851, 0, 0, 231, 763, 763, 851, 0, -789,
4598 3, 0, 4, 5, 6, 7, 8, 0, 851, 851,
4599 9, 10, 231, 0, 231, 11, 0, 12, 13, 14,
4600 15, 16, 17, 18, 851, 0, 0, 0, 0, 19,
4601 20, 21, 22, 23, 24, 25, 0, 0, 26, 0,
4602 0, 0, 0, 0, 27, 28, 272, 30, 31, 32,
4603 33, 34, 35, 36, 37, 38, 39, 0, 40, 41,
4604 42, 43, 44, 45, 46, 0, 0, 0, 231, 0,
4605 0, 0, 0, 0, 0, 47, 48, 0, 0, 0,
4606 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4607 49, 50, 0, 0, 0, 0, 231, 0, 51, 0,
4608 0, 52, 53, 0, 54, 55, 0, 56, 0, 0,
4609 57, 58, 59, 60, 61, 62, 63, 64, 65, 0,
4610 -789, 0, 0, 0, 0, 0, 231, 0, 0, 0,
4611 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4612 0, 0, 355, 0, 231, 0, 0, 66, 67, 68,
4613 0, 0, 0, 0, -789, 0, 0, 0, 0, 0,
4614 -789, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4615 0, 0, 0, 0, 851, 0, 0, 0, 0, 0,
4616 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4617 0, 0, 0, 0, 0, 356, 357, 358, 359, 360,
4618 361, 362, 363, 364, 365, 366, 367, 368, 0, 0,
4619 0, 0, 369, 370, 0, 0, 0, 0, 371, 0,
4620 0, 0, 763, 0, 0, 0, 0, 0, 0, 0,
4621 0, 231, 0, 0, 0, 0, 0, 0, 0, 231,
4622 0, 0, 0, 1010, 851, 851, 0, 0, 0, 0,
4623 851, 851, 0, 372, 231, 373, 374, 375, 376, 377,
4624 378, 379, 380, 381, 382, 0, 231, 0, 0, 0,
4625 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4626 0, 0, 0, 0, 763, 851, 851, 0, 851, 851,
4627 0, 231, 0, 0, 0, 0, 0, 0, 0, 0,
4628 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4629 0, 1051, 1052, 0, 0, 231, 0, 0, 0, 851,
4630 1058, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4631 0, 0, 0, 0, 851, 0, 0, 0, 0, 0,
4632 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4633 231, 0, 0, 0, 0, 0, -5, 3, 851, 4,
4634 5, 6, 7, 8, -5, -5, -5, 9, 10, 0,
4635 -5, -5, 11, -5, 12, 13, 14, 15, 16, 17,
4636 18, -5, 0, 0, 0, 0, 19, 20, 21, 22,
4637 23, 24, 25, 0, 0, 26, 0, 0, 0, 0,
4638 0, 27, 28, 272, 30, 31, 32, 33, 34, 35,
4639 36, 37, 38, 39, 0, 40, 41, 42, 43, 44,
4640 45, 46, 0, 0, -5, 0, 0, 0, 0, 0,
4641 0, 0, 47, 48, 231, 0, 0, 0, 0, 0,
4642 0, 0, 0, 0, 0, 0, 0, 49, 50, 0,
4643 0, 0, 0, 0, 0, 51, 0, 0, 52, 53,
4644 0, 54, 55, 0, 56, 0, 0, 57, 58, 59,
4645 60, 61, 62, 63, 64, 65, 0, -5, 0, 0,
4646 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4647 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4648 0, 0, 0, 0, 66, 67, 68, 0, 0, -5,
4649 0, 0, 0, 0, 0, -5, 0, 530, -789, 3,
4650 0, 4, 5, 6, 7, 8, 0, 0, 0, 9,
4651 10, 0, 0, 0, 11, 0, 12, 13, 14, 15,
4652 16, 17, 18, 0, 0, 0, 0, 0, 19, 20,
4653 21, 22, 23, 24, 25, 0, 0, 26, 0, 0,
4654 0, 231, 0, 27, 28, 29, 30, 31, 32, 33,
4655 34, 35, 36, 37, 38, 39, 0, 40, 41, 42,
4656 43, 44, 45, 46, 0, 0, 0, 356, -790, -790,
4657 -790, -790, 361, 362, 47, 48, -790, -790, 0, 0,
4658 0, 0, 0, 0, 369, 370, 0, 0, 0, 49,
4659 50, 0, 0, 0, 0, 0, 0, 51, 0, 0,
4660 52, 53, 0, 54, 55, 0, 56, 0, 0, 57,
4661 58, 59, 60, 61, 62, 63, 64, 65, 0, 0,
4662 0, 0, 0, 0, 0, 0, 0, 373, 374, 375,
4663 376, 377, 378, 379, 380, 381, 382, 0, 0, 0,
4664 0, 0, 0, 0, 0, 0, 66, 67, 68, 0,
4665 0, -5, 3, -789, 4, 5, 6, 7, 8, -789,
4666 0, 0, 9, 10, 0, 0, 0, 11, 0, 12,
4667 13, 14, 15, 16, 17, 18, 0, 0, 0, 0,
4668 0, 19, 20, 21, 22, 23, 24, 25, 0, 0,
4669 26, 0, 0, 0, 0, 0, 27, 28, 29, 30,
4670 31, 32, 33, 34, 35, 36, 37, 38, 39, 0,
4671 40, 41, 42, 43, 44, 45, 46, 0, 0, 0,
4672 0, 0, 0, 0, 0, 0, 0, 47, 48, 0,
4673 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4674 0, 0, 49, 50, 0, 0, 0, 0, 0, 0,
4675 51, 0, 0, 52, 53, 0, 54, 55, 0, 56,
4676 0, 0, 57, 58, 59, 60, 61, 62, 63, 64,
4677 65, 0, 0, 0, 0, 0, 0, 0, -669, 0,
4678 0, 0, 0, 0, 0, 0, -669, -669, -669, 0,
4679 0, -669, -669, -669, 0, -669, 0, 0, 0, 66,
4680 67, 68, 0, -669, -5, -669, -669, -669, 0, 0,
4681 0, 0, 530, 0, 0, -669, -669, 0, -669, -669,
4682 -669, -669, -669, 0, 0, 0, 356, 357, 358, 359,
4683 360, 361, 362, 363, 364, 365, 366, 367, 368, 0,
4684 0, 0, 0, 369, 370, 0, -669, -669, 0, 0,
4685 0, 0, 0, 0, 0, 0, -669, -669, -669, -669,
4686 -669, -669, -669, -669, -669, -669, -669, -669, -669, 0,
4687 0, 0, 0, -669, -669, -669, -669, 0, -669, -669,
4688 0, 0, 0, 0, 372, -669, 373, 374, 375, 376,
4689 377, 378, 379, 380, 381, 382, 0, 0, 0, -669,
4690 0, 0, -669, 249, 0, 0, 0, 0, 0, 0,
4691 0, 0, 0, -669, -669, -669, -669, -669, -669, -669,
4692 -669, -669, -669, -669, -669, -669, 0, 0, 0, 0,
4693 0, -669, -669, -669, -669, -670, 0, -669, -669, -669,
4694 0, 0, 0, -670, -670, -670, 0, 0, -670, -670,
4695 -670, 0, -670, 0, 0, 0, 0, 0, 0, 0,
4696 -670, 0, -670, -670, -670, 0, 0, 0, 0, 0,
4697 0, 0, -670, -670, 0, -670, -670, -670, -670, -670,
4698 0, 0, 0, 356, 357, 358, 359, 360, 361, 362,
4699 363, 364, 365, 366, 367, 368, 0, 0, 0, 0,
4700 369, 370, 0, -670, -670, 0, 0, 0, 0, 0,
4701 0, 0, 0, -670, -670, -670, -670, -670, -670, -670,
4702 -670, -670, -670, -670, -670, -670, 0, 0, 0, 0,
4703 -670, -670, -670, -670, 0, -670, -670, 0, 0, 0,
4704 0, 372, -670, 373, 374, 375, 376, 377, 378, 379,
4705 380, 381, 382, 0, 0, 0, -670, 0, 0, -670,
4706 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4707 -670, -670, -670, -670, -670, -670, -670, -670, -670, -670,
4708 -670, -670, -670, 0, 0, 0, 0, 0, -670, -670,
4709 -670, -670, -772, 0, -670, -670, -670, 0, 0, 0,
4710 -772, -772, -772, 0, 0, -772, -772, -772, 0, -772,
4711 0, 0, 0, 0, 0, 0, 0, -772, -772, -772,
4712 -772, -772, 0, 0, 0, 0, 0, 0, 0, -772,
4713 -772, 0, -772, -772, -772, -772, -772, 0, 0, 0,
4714 356, 357, 358, 359, 360, 361, 362, 363, 364, 365,
4715 366, -790, -790, 0, 0, 0, 0, 369, 370, 0,
4716 -772, -772, 0, 0, 0, 0, 0, 0, 0, 0,
4717 -772, -772, -772, -772, -772, -772, -772, -772, -772, -772,
4718 -772, -772, -772, 0, 0, 0, 0, -772, -772, -772,
4719 -772, 0, 0, -772, 0, 0, 0, 0, 0, -772,
4720 373, 374, 375, 376, 377, 378, 379, 380, 381, 382,
4721 0, 0, 0, -772, 0, 0, -772, 0, 0, 0,
4722 0, 0, 0, 0, 0, 0, 0, 0, -772, -772,
4723 -772, -772, -772, -772, -772, -772, -772, -772, -772, -772,
4724 0, 0, 0, 0, -772, -772, -772, -772, -772, -773,
4725 0, -772, -772, -772, 0, 0, 0, -773, -773, -773,
4726 0, 0, -773, -773, -773, 0, -773, 0, 0, 0,
4727 0, 0, 0, 0, -773, -773, -773, -773, -773, 0,
4728 0, 0, 0, 0, 0, 0, -773, -773, 0, -773,
4729 -773, -773, -773, -773, 0, 0, 0, 356, 357, 358,
4730 359, 360, 361, 362, 0, 0, 365, 366, 0, 0,
4731 0, 0, 0, 0, 369, 370, 0, -773, -773, 0,
4732 0, 0, 0, 0, 0, 0, 0, -773, -773, -773,
4733 -773, -773, -773, -773, -773, -773, -773, -773, -773, -773,
4734 0, 0, 0, 0, -773, -773, -773, -773, 0, 0,
4735 -773, 0, 0, 0, 0, 0, -773, 373, 374, 375,
4736 376, 377, 378, 379, 380, 381, 382, 0, 0, 0,
4737 -773, 0, 0, -773, 0, 0, 0, 0, 0, 0,
4738 0, 0, 0, 0, 0, -773, -773, -773, -773, -773,
4739 -773, -773, -773, -773, -773, -773, -773, 0, 0, 0,
4740 0, -773, -773, -773, -773, -773, -333, 0, -773, -773,
4741 -773, 0, 0, 0, -333, -333, -333, 0, 0, -333,
4742 -333, -333, 0, -333, 0, 0, 0, 0, 0, 0,
4743 0, -333, 0, -333, -333, -333, 0, 0, 0, 0,
4744 0, 0, 0, -333, -333, 0, -333, -333, -333, -333,
4745 -333, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4746 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4747 0, 0, 0, 0, -333, -333, 0, 0, 0, 0,
4748 0, 0, 0, 0, -333, -333, -333, -333, -333, -333,
4749 -333, -333, -333, -333, -333, -333, -333, 0, 0, 0,
4750 0, -333, -333, -333, -333, 0, 0, -333, 0, 0,
4751 0, 0, 0, -333, 0, 0, 0, 0, 0, 0,
4752 0, 0, 0, 0, 0, 0, 0, -333, 0, 0,
4753 -333, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4754 0, 0, -333, -333, -333, -333, -333, -333, -333, -333,
4755 -333, -333, -333, -333, 0, 0, 0, 0, 0, -333,
4756 -333, -333, -333, -789, 0, -333, -333, -333, 0, 0,
4757 0, -789, -789, -789, 0, 0, -789, -789, -789, 0,
4758 -789, 0, 0, 0, 0, 0, 0, 0, -789, -789,
4759 -789, -789, 0, 0, 0, 0, 0, 0, 0, 0,
4760 -789, -789, 0, -789, -789, -789, -789, -789, 0, 0,
4761 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4762 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4763 0, -789, -789, 0, 0, 0, 0, 0, 0, 0,
4764 0, -789, -789, -789, -789, -789, -789, -789, -789, -789,
4765 -789, -789, -789, -789, 0, 0, 0, 0, -789, -789,
4766 -789, -789, 0, 0, -789, 0, 0, 0, 0, 0,
4767 -789, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4768 0, 0, 0, 0, -789, 0, 0, 0, 0, 0,
4769 0, 0, 0, 0, 0, 0, 0, 0, 0, -789,
4770 0, -789, -789, -789, -789, -789, -789, -789, -789, -789,
4771 -789, 0, 0, 0, 0, -789, -789, -789, -789, -789,
4772 -339, 245, -789, -789, -789, 0, 0, 0, -339, -339,
4773 -339, 0, 0, -339, -339, -339, 0, -339, 0, 0,
4774 0, 0, 0, 0, 0, -339, 0, -339, -339, 0,
4775 0, 0, 0, 0, 0, 0, 0, -339, -339, 0,
4776 -339, -339, -339, -339, -339, 0, 0, 0, 0, 0,
4777 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4778 0, 0, 0, 0, 0, 0, 0, 0, -339, -339,
4779 0, 0, 0, 0, 0, 0, 0, 0, -339, -339,
4780 -339, -339, -339, -339, -339, -339, -339, -339, -339, -339,
4781 -339, 0, 0, 0, 0, -339, -339, -339, -339, 0,
4782 861, -339, 0, 0, 0, 0, 0, -339, 0, 0,
4783 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4784 0, -339, 0, 0, 0, 0, 0, 0, 0, 0,
4785 0, 0, 0, 0, 0, -138, -339, 0, -339, -339,
4786 -339, -339, -339, -339, -339, -339, -339, -339, 0, 0,
4787 0, 0, 803, -339, -339, -339, -339, -346, 0, -339,
4788 -339, -339, 0, 0, 0, -346, -346, -346, 0, 0,
4789 -346, -346, -346, 0, -346, 0, 0, 0, 0, 0,
4790 0, 0, -346, 0, -346, -346, 0, 0, 0, 0,
4791 0, 0, 0, 0, -346, -346, 0, -346, -346, -346,
4792 -346, -346, 0, 0, 0, 0, 0, 0, 0, 0,
4793 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4794 0, 0, 0, 0, 0, -346, -346, 0, 0, 0,
4795 0, 0, 0, 0, 0, -346, -346, -346, -346, -346,
4796 -346, -346, -346, -346, -346, -346, -346, -346, 0, 0,
4797 0, 0, -346, -346, -346, -346, 0, 0, -346, 0,
4798 0, 0, 0, 0, -346, 0, 0, 0, 0, 0,
4799 0, 0, 0, 0, 0, 0, 0, 0, -346, 0,
4800 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4801 0, 0, 0, -346, 0, -346, -346, -346, -346, -346,
4802 -346, -346, -346, -346, -346, 0, 0, 0, 0, 0,
4803 -346, -346, -346, -346, -771, 435, -346, -346, -346, 0,
4804 0, 0, -771, -771, -771, 919, 0, 0, -771, -771,
4805 0, -771, 0, 0, 0, 0, 0, 0, 0, -771,
4806 -771, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4807 0, -771, -771, 0, -771, -771, -771, -771, -771, 356,
4808 357, 358, 359, 360, 361, 362, 363, 364, 365, 366,
4809 367, 368, 0, 0, 0, 0, 369, 370, 0, 0,
4810 0, 0, -771, -771, 0, 0, 0, 0, 0, 0,
4811 0, 0, -771, -771, -771, -771, -771, -771, -771, -771,
4812 -771, -771, -771, -771, -771, 0, 0, 0, 0, -771,
4813 -771, -771, -771, 0, 801, -771, 0, 372, 0, 373,
4814 374, 375, 376, 377, 378, 379, 380, 381, 382, 0,
4815 0, 0, 0, 0, 0, -771, 0, -284, 0, 0,
4816 0, 0, 0, 0, 0, 0, 0, 0, 0, -136,
4817 -771, 0, -771, -771, -771, -771, -771, -771, -771, -771,
4818 -771, -771, 0, 0, 0, 0, -771, -771, -771, -771,
4819 -127, -771, 0, -771, 0, -771, 0, 0, 0, -771,
4820 -771, -771, 0, 0, 0, -771, -771, 0, -771, 0,
4821 0, 0, 0, 0, 0, 0, -771, -771, 0, 0,
4822 0, 0, 0, 0, 0, 0, 0, 0, -771, -771,
4823 0, -771, -771, -771, -771, -771, 0, 0, 0, 0,
4824 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4825 0, 0, 0, 0, 0, 0, 0, 0, 0, -771,
4826 -771, 0, 0, 0, 0, 0, 0, 0, 0, -771,
4827 -771, -771, -771, -771, -771, -771, -771, -771, -771, -771,
4828 -771, -771, 0, 0, 0, 0, -771, -771, -771, -771,
4829 0, 801, -771, 0, 0, 0, 0, 0, 0, 0,
4830 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4831 0, 0, -771, 0, 0, 0, 0, 0, 0, 0,
4832 0, 0, 0, 0, 0, 0, -136, -771, 0, -771,
4833 -771, -771, -771, -771, -771, -771, -771, -771, -771, 0,
4834 0, 0, 0, -771, -771, -771, -771, -771, -339, 0,
4835 -771, 0, -771, 0, 0, 0, -339, -339, -339, 0,
4836 0, 0, -339, -339, 0, -339, 0, 0, 0, 0,
4837 0, 0, 0, -339, 0, 0, 0, 0, 0, 0,
4838 0, 0, 0, 0, 0, -339, -339, 0, -339, -339,
4839 -339, -339, -339, 0, 0, 0, 0, 0, 0, 0,
4840 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4841 0, 0, 0, 0, 0, 0, -339, -339, 0, 0,
4842 0, 0, 0, 0, 0, 0, -339, -339, -339, -339,
4843 -339, -339, -339, -339, -339, -339, -339, -339, -339, 0,
4844 0, 0, 0, -339, -339, -339, -339, 0, 802, -339,
4845 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4846 0, 0, 0, 0, 0, 0, 0, 0, 0, -339,
4847 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4848 0, 0, 0, -138, -339, 0, -339, -339, -339, -339,
4849 -339, -339, -339, -339, -339, -339, 0, 0, 0, 0,
4850 803, -339, -339, -339, -129, -339, 0, -339, 0, -339,
4851 0, 0, 0, -339, -339, -339, 0, 0, 0, -339,
4852 -339, 0, -339, 0, 0, 0, 0, 0, 0, 0,
4853 -339, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4854 0, 0, -339, -339, 0, -339, -339, -339, -339, -339,
4855 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4856 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4857 0, 0, 0, -339, -339, 0, 0, 0, 0, 0,
4858 0, 0, 0, -339, -339, -339, -339, -339, -339, -339,
4859 -339, -339, -339, -339, -339, -339, 0, 0, 0, 0,
4860 -339, -339, -339, -339, 0, 802, -339, 0, 0, 0,
4861 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4862 0, 0, 0, 0, 0, 0, -339, 0, 0, 0,
4863 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4864 -138, -339, 0, -339, -339, -339, -339, -339, -339, -339,
4865 -339, -339, -339, 0, 0, 0, 0, 803, -339, -339,
4866 -339, -339, 0, 0, -339, 3, -339, 4, 5, 6,
4867 7, 8, -789, -789, -789, 9, 10, 0, 0, -789,
4868 11, 0, 12, 13, 14, 15, 16, 17, 18, 0,
4869 0, 0, 0, 0, 19, 20, 21, 22, 23, 24,
4870 25, 0, 0, 26, 0, 0, 0, 0, 0, 27,
4871 28, 272, 30, 31, 32, 33, 34, 35, 36, 37,
4872 38, 39, 0, 40, 41, 42, 43, 44, 45, 46,
4873 0, 0, -789, 0, 0, 0, 0, 0, 0, 0,
4874 47, 48, 0, 0, 0, 0, 0, 0, 0, 0,
4875 0, 0, 0, 0, 0, 49, 50, 0, 0, 0,
4876 0, 0, 0, 51, 0, 0, 52, 53, 0, 54,
4877 55, 0, 56, 0, 0, 57, 58, 59, 60, 61,
4878 62, 63, 64, 65, 0, 0, 0, 0, 0, 0,
4879 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4880 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4881 0, 0, 66, 67, 68, 0, 0, 0, 3, -789,
4882 4, 5, 6, 7, 8, -789, 0, -789, 9, 10,
4883 0, -789, -789, 11, 0, 12, 13, 14, 15, 16,
4884 17, 18, 0, 0, 0, 0, 0, 19, 20, 21,
4885 22, 23, 24, 25, 0, 0, 26, 0, 0, 0,
4886 0, 0, 27, 28, 272, 30, 31, 32, 33, 34,
4887 35, 36, 37, 38, 39, 0, 40, 41, 42, 43,
4888 44, 45, 46, 0, 0, -789, 0, 0, 0, 0,
4889 0, 0, 0, 47, 48, 0, 0, 0, 0, 0,
4890 0, 0, 0, 0, 0, 0, 0, 0, 49, 50,
4891 0, 0, 0, 0, 0, 0, 51, 0, 0, 52,
4892 53, 0, 54, 55, 0, 56, 0, 0, 57, 58,
4893 59, 60, 61, 62, 63, 64, 65, 0, 0, 0,
4894 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4895 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4896 0, 0, 0, 0, 0, 66, 67, 68, 0, 0,
4897 0, 3, -789, 4, 5, 6, 7, 8, -789, 0,
4898 -789, 9, 10, 0, 0, -789, 11, -789, 12, 13,
4899 14, 15, 16, 17, 18, 0, 0, 0, 0, 0,
4900 19, 20, 21, 22, 23, 24, 25, 0, 0, 26,
4901 0, 0, 0, 0, 0, 27, 28, 272, 30, 31,
4902 32, 33, 34, 35, 36, 37, 38, 39, 0, 40,
4903 41, 42, 43, 44, 45, 46, 0, 0, -789, 0,
4904 0, 0, 0, 0, 0, 0, 47, 48, 0, 0,
4905 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4906 0, 49, 50, 0, 0, 0, 0, 0, 0, 51,
4907 0, 0, 52, 53, 0, 54, 55, 0, 56, 0,
4908 0, 57, 58, 59, 60, 61, 62, 63, 64, 65,
4909 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4910 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4911 0, 0, 0, 0, 0, 0, 0, 0, 66, 67,
4912 68, 0, 0, 0, 3, -789, 4, 5, 6, 7,
4913 8, -789, 0, -789, 9, 10, 0, 0, -789, 11,
4914 0, 12, 13, 14, 15, 16, 17, 18, -789, 0,
4915 0, 0, 0, 19, 20, 21, 22, 23, 24, 25,
4916 0, 0, 26, 0, 0, 0, 0, 0, 27, 28,
4917 272, 30, 31, 32, 33, 34, 35, 36, 37, 38,
4918 39, 0, 40, 41, 42, 43, 44, 45, 46, 0,
4919 0, -789, 0, 0, 0, 0, 0, 0, 0, 47,
4920 48, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4921 0, 0, 0, 0, 49, 50, 0, 0, 0, 0,
4922 0, 0, 51, 0, 0, 52, 53, 0, 54, 55,
4923 0, 56, 0, 0, 57, 58, 59, 60, 61, 62,
4924 63, 64, 65, 0, 0, 0, 0, 0, 0, 0,
4925 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4926 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4927 0, 66, 67, 68, 0, 0, 0, 3, -789, 4,
4928 5, 6, 7, 8, -789, 0, -789, 9, 10, 0,
4929 0, -789, 11, 0, 12, 13, 14, 15, 16, 17,
4930 18, 0, 0, 0, 0, 0, 19, 20, 21, 22,
4931 23, 24, 25, 0, 0, 26, 0, 0, 0, 0,
4932 0, 27, 28, 272, 30, 31, 32, 33, 34, 35,
4933 36, 37, 38, 39, 0, 40, 41, 42, 43, 44,
4934 45, 46, 0, 0, -789, 0, 0, 0, 0, 0,
4935 0, 0, 47, 48, 0, 0, 0, 0, 0, 0,
4936 0, 0, 0, 0, 0, 0, 0, 49, 50, 0,
4937 0, 0, 0, 0, 0, 51, 0, 0, 52, 53,
4938 0, 54, 55, 0, 56, 0, 0, 57, 58, 59,
4939 60, 61, 62, 63, 64, 65, 0, 0, 0, 0,
4940 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4941 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4942 0, 0, 0, 0, 66, 67, 68, 0, 0, 0,
4943 3, -789, 4, 5, 6, 7, 8, -789, -789, -789,
4944 9, 10, 0, 0, 0, 11, 0, 12, 13, 14,
4945 15, 16, 17, 18, 0, 0, 0, 0, 0, 19,
4946 20, 21, 22, 23, 24, 25, 0, 0, 26, 0,
4947 0, 0, 0, 0, 27, 28, 272, 30, 31, 32,
4948 33, 34, 35, 36, 37, 38, 39, 0, 40, 41,
4949 42, 43, 44, 45, 46, 0, 0, -789, 0, 0,
4950 0, 0, 0, 0, 0, 47, 48, 0, 0, 0,
4951 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4952 49, 50, 0, 0, 0, 0, 0, 0, 51, 0,
4953 0, 52, 53, 0, 54, 55, 0, 56, 0, 0,
4954 57, 58, 59, 60, 61, 62, 63, 64, 65, 0,
4955 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4956 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4957 0, 0, 0, 0, 0, 0, 0, 66, 67, 68,
4958 0, 0, 0, 3, -789, 4, 5, 6, 7, 8,
4959 -789, 0, -789, 9, 10, 0, 0, 0, 11, 0,
4960 12, 13, 14, 15, 16, 17, 18, 0, 0, 0,
4961 0, 0, 19, 20, 21, 22, 23, 24, 25, 0,
4962 0, 26, 0, 0, 0, 0, 0, 27, 28, 272,
4963 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
4964 0, 40, 41, 42, 43, 44, 45, 46, 0, 0,
4965 -789, 0, 0, 0, 0, 0, 0, 0, 47, 48,
4966 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4967 0, 0, 0, 49, 50, 0, 0, 0, 0, 0,
4968 0, 51, 0, 0, 52, 53, 0, 54, 55, 0,
4969 56, 0, 0, 57, 58, 59, 60, 61, 62, 63,
4970 64, 65, 0, 0, 0, 0, 0, 0, 0, 0,
4971 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4972 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4973 66, 67, 68, 0, 0, 0, 3, -789, 4, 5,
4974 6, 7, 8, -789, 0, 0, 9, 10, 0, 0,
4975 0, 11, 0, 12, 13, 14, 15, 16, 17, 18,
4976 0, 0, 0, 0, 0, 19, 20, 21, 22, 23,
4977 24, 25, 0, 0, 26, 0, 0, 0, 0, 0,
4978 27, 28, 272, 30, 31, 32, 33, 34, 35, 36,
4979 37, 38, 39, 0, 40, 41, 42, 43, 44, 45,
4980 46, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4981 0, 47, 48, 0, 0, 0, 0, 0, 0, 0,
4982 0, 0, 0, 0, 0, 0, 49, 50, 0, 0,
4983 0, 0, 0, 0, 51, 0, 0, 273, 53, 0,
4984 54, 55, 0, 56, 0, 0, 57, 58, 59, 60,
4985 61, 62, 63, 64, 65, 0, 0, 0, 0, 0,
4986 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4987 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4988 0, 0, 0, 66, 67, 68, 0, 0, 0, 0,
4989 -789, 0, 0, 0, -789, 3, -789, 4, 5, 6,
4990 7, 8, 0, 0, 0, 9, 10, 0, 0, 0,
4991 11, 0, 12, 13, 14, 15, 16, 17, 18, 0,
4992 0, 0, 0, 0, 19, 20, 21, 22, 23, 24,
4993 25, 0, 0, 26, 0, 0, 0, 0, 0, 27,
4994 28, 272, 30, 31, 32, 33, 34, 35, 36, 37,
4995 38, 39, 0, 40, 41, 42, 43, 44, 45, 46,
4996 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4997 47, 48, 0, 0, 0, 0, 0, 0, 0, 0,
4998 0, 0, 0, 0, 0, 49, 50, 0, 0, 0,
4999 0, 0, 0, 51, 0, 0, 52, 53, 0, 54,
5000 55, 0, 56, 0, 0, 57, 58, 59, 60, 61,
5001 62, 63, 64, 65, 0, 0, 0, 0, 0, 0,
5002 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5003 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5004 0, 0, 66, 67, 68, 0, 0, 0, 0, -789,
5005 0, 0, 0, -789, 3, -789, 4, 5, 6, 7,
5006 8, 0, 0, 0, 9, 10, 0, 0, 0, 11,
5007 0, 12, 13, 14, 15, 16, 17, 18, 0, 0,
5008 0, 0, 0, 19, 20, 21, 22, 23, 24, 25,
5009 0, 0, 26, 0, 0, 0, 0, 0, 27, 28,
5010 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
5011 39, 0, 40, 41, 42, 43, 44, 45, 46, 0,
5012 0, 0, 0, 0, 0, 0, 0, 0, 0, 47,
5013 48, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5014 0, 0, 0, 0, 49, 50, 0, 0, 0, 0,
5015 0, 0, 51, 0, 0, 52, 53, 0, 54, 55,
5016 0, 56, 0, 0, 57, 58, 59, 60, 61, 62,
5017 63, 64, 65, 0, 0, 0, 0, 0, 0, 0,
5018 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5019 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5020 0, 66, 67, 68, 0, 0, -789, 3, -789, 4,
5021 5, 6, 7, 8, -789, 0, 0, 9, 10, 0,
5022 0, 0, 11, 0, 12, 13, 14, 15, 16, 17,
5023 18, 0, 0, 0, 0, 0, 19, 20, 21, 22,
5024 23, 24, 25, 0, 0, 26, 0, 0, 0, 0,
5025 0, 27, 28, 272, 30, 31, 32, 33, 34, 35,
5026 36, 37, 38, 39, 0, 40, 41, 42, 43, 44,
5027 45, 46, 0, 0, 0, 0, 0, 0, 0, 0,
5028 0, 0, 47, 48, 0, 0, 0, 0, 0, 0,
5029 0, 0, 0, 0, 0, 0, 0, 49, 50, 0,
5030 0, 0, 0, 0, 0, 51, 0, 0, 52, 53,
5031 0, 54, 55, 0, 56, 0, 0, 57, 58, 59,
5032 60, 61, 62, 63, 64, 65, 0, 0, 0, 0,
5033 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5034 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5035 0, 0, 0, 0, 66, 67, 68, 0, 0, -789,
5036 391, -789, 4, 5, 6, 0, 8, -789, 0, 0,
5037 9, 10, 0, 0, 0, 11, -4, 12, 13, 14,
5038 15, 16, 17, 18, 0, 0, 0, 0, 0, 19,
5039 20, 21, 22, 23, 24, 25, 0, 0, 26, 0,
5040 0, 0, 0, 0, 0, 28, 0, 0, 31, 32,
5041 33, 34, 35, 36, 37, 38, 39, 0, 40, 41,
5042 42, 43, 44, 45, 46, 0, 0, 0, 0, 0,
5043 0, 0, 0, 0, 0, 47, 48, 0, 0, 0,
5044 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5045 49, 50, 0, 0, 0, 0, 0, 0, 220, 0,
5046 0, 221, 53, 0, 54, 55, 0, 0, 0, 0,
5047 57, 58, 59, 60, 61, 62, 63, 64, 65, 0,
5048 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5049 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5050 0, 0, 0, 0, 0, 0, 0, 66, 67, 68,
5051 0, 0, 0, 0, 319, 0, 0, 0, 0, 0,
5052 320, 135, 136, 137, 138, 139, 140, 141, 142, 143,
5053 144, 145, 146, 147, 148, 149, 150, 151, 152, 153,
5054 154, 155, 156, 157, 158, 0, 0, 0, 159, 160,
5055 161, 420, 421, 422, 423, 166, 167, 168, 0, 0,
5056 0, 0, 0, 169, 170, 171, 172, 424, 425, 426,
5057 427, 177, 36, 37, 428, 39, 0, 0, 0, 0,
5058 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5059 0, 0, 0, 0, 179, 180, 181, 182, 183, 184,
5060 185, 186, 187, 0, 0, 188, 189, 0, 0, 0,
5061 0, 190, 191, 192, 193, 0, 0, 0, 0, 0,
5062 0, 0, 0, 0, 0, 0, 194, 195, 0, 0,
5063 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5064 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5065 0, 0, 0, 0, 0, 0, 196, 197, 198, 199,
5066 200, 201, 202, 203, 204, 205, 0, 206, 207, 0,
5067 0, 0, 0, 0, 0, 208, 429, 135, 136, 137,
5068 138, 139, 140, 141, 142, 143, 144, 145, 146, 147,
5069 148, 149, 150, 151, 152, 153, 154, 155, 156, 157,
5070 158, 0, 0, 0, 159, 160, 161, 162, 163, 164,
5071 165, 166, 167, 168, 0, 0, 0, 0, 0, 169,
5072 170, 171, 172, 173, 174, 175, 176, 177, 36, 37,
5073 178, 39, 0, 0, 0, 0, 0, 0, 0, 0,
5074 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5075 179, 180, 181, 182, 183, 184, 185, 186, 187, 0,
5076 0, 188, 189, 0, 0, 0, 0, 190, 191, 192,
5077 193, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5078 0, 0, 194, 195, 0, 0, 0, 0, 0, 0,
5079 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5080 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5081 0, 0, 196, 197, 198, 199, 200, 201, 202, 203,
5082 204, 205, 0, 206, 207, 0, 0, 0, 0, 0,
5083 0, 208, 135, 136, 137, 138, 139, 140, 141, 142,
5084 143, 144, 145, 146, 147, 148, 149, 150, 151, 152,
5085 153, 154, 155, 156, 157, 158, 0, 0, 0, 159,
5086 160, 161, 162, 163, 164, 165, 166, 167, 168, 0,
5087 0, 0, 0, 0, 169, 170, 171, 172, 173, 174,
5088 175, 176, 177, 252, 0, 178, 0, 0, 0, 0,
5089 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5090 0, 0, 0, 0, 0, 179, 180, 181, 182, 183,
5091 184, 185, 186, 187, 0, 0, 188, 189, 0, 0,
5092 0, 0, 190, 191, 192, 193, 0, 0, 0, 0,
5093 0, 0, 0, 0, 0, 0, 0, 194, 195, 0,
5094 0, 58, 0, 0, 0, 0, 0, 0, 0, 0,
5095 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5096 0, 0, 0, 0, 0, 0, 0, 196, 197, 198,
5097 199, 200, 201, 202, 203, 204, 205, 0, 206, 207,
5098 0, 0, 0, 0, 0, 0, 208, 135, 136, 137,
5099 138, 139, 140, 141, 142, 143, 144, 145, 146, 147,
5100 148, 149, 150, 151, 152, 153, 154, 155, 156, 157,
5101 158, 0, 0, 0, 159, 160, 161, 162, 163, 164,
5102 165, 166, 167, 168, 0, 0, 0, 0, 0, 169,
5103 170, 171, 172, 173, 174, 175, 176, 177, 0, 0,
5104 178, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5105 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5106 179, 180, 181, 182, 183, 184, 185, 186, 187, 0,
5107 0, 188, 189, 0, 0, 0, 0, 190, 191, 192,
5108 193, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5109 0, 0, 194, 195, 0, 0, 58, 0, 0, 0,
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, 196, 197, 198, 199, 200, 201, 202, 203,
5113 204, 205, 0, 206, 207, 0, 0, 0, 0, 0,
5114 0, 208, 135, 136, 137, 138, 139, 140, 141, 142,
5115 143, 144, 145, 146, 147, 148, 149, 150, 151, 152,
5116 153, 154, 155, 156, 157, 158, 0, 0, 0, 159,
5117 160, 161, 162, 163, 164, 165, 166, 167, 168, 0,
5118 0, 0, 0, 0, 169, 170, 171, 172, 173, 174,
5119 175, 176, 177, 0, 0, 178, 0, 0, 0, 0,
5120 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5121 0, 0, 0, 0, 0, 179, 180, 181, 182, 183,
5122 184, 185, 186, 187, 0, 0, 188, 189, 0, 0,
5123 0, 0, 190, 191, 192, 193, 0, 0, 0, 0,
5124 0, 0, 0, 0, 0, 0, 0, 194, 195, 0,
5125 0, 0, 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, 196, 197, 198,
5128 199, 200, 201, 202, 203, 204, 205, 0, 206, 207,
5129 4, 5, 6, 0, 8, 0, 208, 0, 9, 10,
5130 0, 0, 0, 11, 0, 12, 13, 14, 260, 261,
5131 17, 18, 0, 0, 0, 0, 0, 19, 20, 262,
5132 22, 23, 24, 25, 0, 0, 218, 0, 0, 0,
5133 0, 0, 0, 290, 0, 0, 31, 32, 33, 34,
5134 35, 36, 37, 38, 39, 0, 40, 41, 42, 43,
5135 44, 45, 46, 0, 0, 0, 0, 0, 0, 0,
5136 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5137 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5138 0, 0, 0, 0, 0, 0, 291, 0, 0, 221,
5139 53, 0, 54, 55, 0, 0, 0, 0, 57, 58,
5140 59, 60, 61, 62, 63, 64, 65, 0, 0, 4,
5141 5, 6, 0, 8, 0, 0, 0, 9, 10, 0,
5142 0, 0, 11, 0, 12, 13, 14, 260, 261, 17,
5143 18, 0, 0, 0, 0, 292, 19, 20, 262, 22,
5144 23, 24, 25, 293, 0, 218, 0, 0, 0, 0,
5145 0, 0, 290, 0, 0, 31, 32, 33, 34, 35,
5146 36, 37, 38, 39, 0, 40, 41, 42, 43, 44,
5147 45, 46, 0, 0, 0, 0, 0, 0, 0, 0,
5148 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5149 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5150 0, 0, 0, 0, 0, 291, 0, 0, 221, 53,
5151 0, 54, 55, 0, 0, 0, 0, 57, 58, 59,
5152 60, 61, 62, 63, 64, 65, 0, 0, 4, 5,
5153 6, 0, 8, 0, 0, 0, 9, 10, 0, 0,
5154 0, 11, 0, 12, 13, 14, 15, 16, 17, 18,
5155 0, 0, 0, 0, 292, 19, 20, 21, 22, 23,
5156 24, 25, 591, 0, 218, 0, 0, 0, 0, 0,
5157 0, 28, 0, 0, 31, 32, 33, 34, 35, 36,
5158 37, 38, 39, 219, 40, 41, 42, 43, 44, 45,
5159 46, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5160 0, 47, 48, 0, 0, 0, 0, 0, 0, 0,
5161 0, 0, 0, 0, 0, 0, 49, 50, 0, 0,
5162 0, 0, 0, 0, 220, 0, 0, 221, 53, 0,
5163 54, 55, 0, 222, 223, 224, 57, 58, 225, 60,
5164 61, 62, 63, 64, 65, 0, 0, 0, 0, 0,
5165 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5166 0, 0, 0, 0, 0, 0, 0, 0, 4, 5,
5167 6, 0, 8, 66, 226, 68, 9, 10, 0, 0,
5168 249, 11, 0, 12, 13, 14, 15, 16, 17, 18,
5169 0, 0, 0, 0, 0, 19, 20, 21, 22, 23,
5170 24, 25, 0, 0, 26, 0, 0, 0, 0, 0,
5171 0, 28, 0, 0, 31, 32, 33, 34, 35, 36,
5172 37, 38, 39, 0, 40, 41, 42, 43, 44, 45,
5173 46, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5174 0, 47, 48, 0, 0, 0, 0, 0, 0, 0,
5175 0, 0, 0, 0, 0, 0, 49, 50, 0, 0,
5176 0, 0, 0, 0, 220, 0, 0, 221, 53, 0,
5177 54, 55, 0, 0, 0, 0, 57, 58, 59, 60,
5178 61, 62, 63, 64, 65, 0, 0, 0, 0, 0,
5179 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5180 0, 0, 0, 0, 0, 0, 3, 0, 4, 5,
5181 6, 7, 8, 66, 67, 68, 9, 10, 0, 0,
5182 249, 11, 0, 12, 13, 14, 15, 16, 17, 18,
5183 0, 0, 0, 0, 0, 19, 20, 21, 22, 23,
5184 24, 25, 0, 0, 26, 0, 0, 0, 0, 0,
5185 27, 28, 0, 30, 31, 32, 33, 34, 35, 36,
5186 37, 38, 39, 0, 40, 41, 42, 43, 44, 45,
5187 46, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5188 0, 47, 48, 0, 0, 0, 0, 0, 0, 0,
5189 0, 0, 0, 0, 0, 0, 49, 50, 0, 0,
5190 0, 0, 0, 0, 51, 0, 0, 52, 53, 0,
5191 54, 55, 0, 56, 0, 0, 57, 58, 59, 60,
5192 61, 62, 63, 64, 65, 0, 0, 391, 0, 4,
5193 5, 6, 0, 8, 0, 0, 0, 9, 10, 0,
5194 0, 0, 11, 0, 12, 13, 14, 15, 16, 17,
5195 18, 0, 0, 66, 67, 68, 19, 20, 21, 22,
5196 23, 24, 25, 0, 0, 26, 0, 0, 0, 0,
5197 0, 0, 28, 0, 0, 31, 32, 33, 34, 35,
5198 36, 37, 38, 39, 0, 40, 41, 42, 43, 44,
5199 45, 46, 0, 0, 0, 0, 0, 0, 0, 0,
5200 0, 0, 47, 48, 0, 0, 0, 0, 0, 0,
5201 0, 0, 0, 0, 0, 0, 0, 49, 50, 0,
5202 0, 0, 0, 0, 0, 220, 0, 0, 221, 53,
5203 0, 54, 55, 0, 0, 0, 0, 57, 58, 59,
5204 60, 61, 62, 63, 64, 65, 0, 0, 0, 0,
5205 4, 5, 6, 0, 8, 0, 0, 0, 9, 10,
5206 0, 0, 0, 11, 0, 12, 13, 14, 15, 16,
5207 17, 18, 0, 0, 66, 67, 68, 19, 20, 21,
5208 22, 23, 24, 25, 0, 0, 218, 0, 0, 0,
5209 0, 0, 0, 28, 0, 0, 31, 32, 33, 34,
5210 35, 36, 37, 38, 39, 219, 40, 41, 42, 43,
5211 44, 45, 46, 0, 0, 0, 0, 0, 0, 0,
5212 0, 0, 0, 47, 48, 0, 0, 0, 0, 0,
5213 0, 0, 0, 0, 0, 0, 0, 0, 49, 50,
5214 0, 0, 0, 0, 0, 0, 220, 0, 0, 221,
5215 53, 0, 54, 55, 0, 222, 223, 224, 57, 58,
5216 225, 60, 61, 62, 63, 64, 65, 0, 0, 0,
5217 0, 4, 5, 6, 0, 8, 0, 0, 0, 9,
5218 10, 0, 0, 0, 11, 0, 12, 13, 14, 15,
5219 16, 17, 18, 0, 0, 66, 226, 68, 19, 20,
5220 21, 22, 23, 24, 25, 0, 0, 218, 0, 0,
5221 0, 0, 0, 0, 28, 0, 0, 31, 32, 33,
5222 34, 35, 36, 37, 38, 39, 219, 40, 41, 42,
5223 43, 44, 45, 46, 0, 0, 0, 0, 0, 0,
5224 0, 0, 0, 0, 47, 48, 0, 0, 0, 0,
5225 0, 0, 0, 0, 0, 0, 0, 0, 0, 49,
5226 465, 0, 0, 0, 0, 0, 0, 220, 0, 0,
5227 221, 53, 0, 54, 55, 0, 222, 223, 224, 57,
5228 58, 225, 60, 61, 62, 63, 64, 65, 0, 0,
5229 0, 0, 4, 5, 6, 0, 8, 0, 0, 0,
5230 9, 10, 0, 0, 0, 11, 0, 12, 13, 14,
5231 260, 261, 17, 18, 0, 0, 66, 226, 68, 19,
5232 20, 262, 22, 23, 24, 25, 0, 0, 218, 0,
5233 0, 0, 0, 0, 0, 28, 0, 0, 31, 32,
5234 33, 34, 35, 36, 37, 38, 39, 219, 40, 41,
5235 42, 43, 44, 45, 46, 0, 0, 0, 0, 0,
5236 0, 0, 0, 0, 0, 47, 48, 0, 0, 0,
5237 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5238 49, 50, 0, 0, 0, 0, 0, 0, 220, 0,
5239 0, 221, 53, 0, 54, 55, 0, 222, 223, 224,
5240 57, 58, 225, 60, 61, 62, 63, 64, 65, 0,
5241 0, 0, 0, 4, 5, 6, 0, 8, 0, 0,
5242 0, 9, 10, 0, 0, 0, 11, 0, 12, 13,
5243 14, 260, 261, 17, 18, 0, 0, 66, 226, 68,
5244 19, 20, 262, 22, 23, 24, 25, 0, 0, 218,
5245 0, 0, 0, 0, 0, 0, 28, 0, 0, 31,
5246 32, 33, 34, 35, 36, 37, 38, 39, 219, 40,
5247 41, 42, 43, 44, 45, 46, 0, 0, 0, 0,
5248 0, 0, 0, 0, 0, 0, 47, 48, 0, 0,
5249 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5250 0, 49, 465, 0, 0, 0, 0, 0, 0, 220,
5251 0, 0, 221, 53, 0, 54, 55, 0, 222, 223,
5252 224, 57, 58, 225, 60, 61, 62, 63, 64, 65,
5253 0, 0, 0, 0, 4, 5, 6, 0, 8, 0,
5254 0, 0, 9, 10, 0, 0, 0, 11, 0, 12,
5255 13, 14, 260, 261, 17, 18, 0, 0, 66, 226,
5256 68, 19, 20, 262, 22, 23, 24, 25, 0, 0,
5257 218, 0, 0, 0, 0, 0, 0, 28, 0, 0,
5258 31, 32, 33, 34, 35, 36, 37, 38, 39, 219,
5259 40, 41, 42, 43, 44, 45, 46, 0, 0, 0,
5260 0, 0, 0, 0, 0, 0, 0, 47, 48, 0,
5261 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5262 0, 0, 49, 50, 0, 0, 0, 0, 0, 0,
5263 220, 0, 0, 221, 53, 0, 54, 55, 0, 222,
5264 223, 0, 57, 58, 225, 60, 61, 62, 63, 64,
5265 65, 0, 0, 0, 0, 4, 5, 6, 0, 8,
5266 0, 0, 0, 9, 10, 0, 0, 0, 11, 0,
5267 12, 13, 14, 260, 261, 17, 18, 0, 0, 66,
5268 226, 68, 19, 20, 262, 22, 23, 24, 25, 0,
5269 0, 218, 0, 0, 0, 0, 0, 0, 28, 0,
5270 0, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5271 219, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5272 0, 0, 0, 0, 0, 0, 0, 0, 47, 48,
5273 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5274 0, 0, 0, 49, 50, 0, 0, 0, 0, 0,
5275 0, 220, 0, 0, 221, 53, 0, 54, 55, 0,
5276 0, 223, 224, 57, 58, 225, 60, 61, 62, 63,
5277 64, 65, 0, 0, 0, 0, 4, 5, 6, 0,
5278 8, 0, 0, 0, 9, 10, 0, 0, 0, 11,
5279 0, 12, 13, 14, 260, 261, 17, 18, 0, 0,
5280 66, 226, 68, 19, 20, 262, 22, 23, 24, 25,
5281 0, 0, 218, 0, 0, 0, 0, 0, 0, 28,
5282 0, 0, 31, 32, 33, 34, 35, 36, 37, 38,
5283 39, 219, 40, 41, 42, 43, 44, 45, 46, 0,
5284 0, 0, 0, 0, 0, 0, 0, 0, 0, 47,
5285 48, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5286 0, 0, 0, 0, 49, 50, 0, 0, 0, 0,
5287 0, 0, 220, 0, 0, 221, 53, 0, 54, 55,
5288 0, 0, 223, 0, 57, 58, 225, 60, 61, 62,
5289 63, 64, 65, 0, 0, 0, 0, 4, 5, 6,
5290 0, 8, 0, 0, 0, 9, 10, 0, 0, 0,
5291 11, 0, 12, 13, 14, 15, 16, 17, 18, 0,
5292 0, 66, 226, 68, 19, 20, 21, 22, 23, 24,
5293 25, 0, 0, 218, 0, 0, 0, 0, 0, 0,
5294 28, 0, 0, 31, 32, 33, 34, 35, 36, 37,
5295 38, 39, 0, 40, 41, 42, 43, 44, 45, 46,
5296 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5297 47, 48, 0, 0, 0, 0, 0, 0, 0, 0,
5298 0, 0, 0, 0, 0, 49, 50, 0, 0, 0,
5299 0, 0, 0, 220, 0, 0, 221, 53, 0, 54,
5300 55, 0, 778, 0, 0, 57, 58, 59, 60, 61,
5301 62, 63, 64, 65, 0, 0, 0, 0, 4, 5,
5302 6, 0, 8, 0, 0, 0, 9, 10, 0, 0,
5303 0, 11, 0, 12, 13, 14, 15, 16, 17, 18,
5304 0, 0, 66, 226, 68, 19, 20, 21, 22, 23,
5305 24, 25, 0, 0, 218, 0, 0, 0, 0, 0,
5306 0, 28, 0, 0, 31, 32, 33, 34, 35, 36,
5307 37, 38, 39, 0, 40, 41, 42, 43, 44, 45,
5308 46, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5309 0, 47, 48, 0, 0, 0, 0, 0, 0, 0,
5310 0, 0, 0, 0, 0, 0, 49, 50, 0, 0,
5311 0, 0, 0, 0, 787, 0, 0, 221, 53, 0,
5312 54, 55, 0, 778, 0, 0, 57, 58, 59, 60,
5313 61, 62, 63, 64, 65, 0, 0, 0, 0, 4,
5314 5, 6, 0, 8, 0, 0, 0, 9, 10, 0,
5315 0, 0, 11, 0, 12, 13, 14, 260, 261, 17,
5316 18, 0, 0, 66, 226, 68, 19, 20, 262, 22,
5317 23, 24, 25, 0, 0, 218, 0, 0, 0, 0,
5318 0, 0, 28, 0, 0, 31, 32, 33, 34, 35,
5319 36, 37, 38, 39, 0, 40, 41, 42, 43, 44,
5320 45, 46, 0, 0, 0, 0, 0, 0, 0, 0,
5321 0, 0, 47, 48, 0, 0, 0, 0, 0, 0,
5322 0, 0, 0, 0, 0, 0, 0, 49, 50, 0,
5323 0, 0, 0, 0, 0, 220, 0, 0, 221, 53,
5324 0, 54, 55, 0, 948, 0, 0, 57, 58, 59,
5325 60, 61, 62, 63, 64, 65, 0, 0, 0, 0,
5326 4, 5, 6, 0, 8, 0, 0, 0, 9, 10,
5327 0, 0, 0, 11, 0, 12, 13, 14, 260, 261,
5328 17, 18, 0, 0, 66, 226, 68, 19, 20, 262,
5329 22, 23, 24, 25, 0, 0, 218, 0, 0, 0,
5330 0, 0, 0, 28, 0, 0, 31, 32, 33, 34,
5331 35, 36, 37, 38, 39, 0, 40, 41, 42, 43,
5332 44, 45, 46, 0, 0, 0, 0, 0, 0, 0,
5333 0, 0, 0, 47, 48, 0, 0, 0, 0, 0,
5334 0, 0, 0, 0, 0, 0, 0, 0, 49, 50,
5335 0, 0, 0, 0, 0, 0, 220, 0, 0, 221,
5336 53, 0, 54, 55, 0, 997, 0, 0, 57, 58,
5337 59, 60, 61, 62, 63, 64, 65, 0, 0, 0,
5338 0, 4, 5, 6, 0, 8, 0, 0, 0, 9,
5339 10, 0, 0, 0, 11, 0, 12, 13, 14, 260,
5340 261, 17, 18, 0, 0, 66, 226, 68, 19, 20,
5341 262, 22, 23, 24, 25, 0, 0, 218, 0, 0,
5342 0, 0, 0, 0, 28, 0, 0, 31, 32, 33,
5343 34, 35, 36, 37, 38, 39, 0, 40, 41, 42,
5344 43, 44, 45, 46, 0, 0, 0, 0, 0, 0,
5345 0, 0, 0, 0, 47, 48, 0, 0, 0, 0,
5346 0, 0, 0, 0, 0, 0, 0, 0, 0, 49,
5347 50, 0, 0, 0, 0, 0, 0, 220, 0, 0,
5348 221, 53, 0, 54, 55, 0, 778, 0, 0, 57,
5349 58, 59, 60, 61, 62, 63, 64, 65, 0, 0,
5350 0, 0, 4, 5, 6, 0, 8, 0, 0, 0,
5351 9, 10, 0, 0, 0, 11, 0, 12, 13, 14,
5352 260, 261, 17, 18, 0, 0, 66, 226, 68, 19,
5353 20, 262, 22, 23, 24, 25, 0, 0, 218, 0,
5354 0, 0, 0, 0, 0, 28, 0, 0, 31, 32,
5355 33, 34, 35, 36, 37, 38, 39, 0, 40, 41,
5356 42, 43, 44, 45, 46, 0, 0, 0, 0, 0,
5357 0, 0, 0, 0, 0, 47, 48, 0, 0, 0,
5358 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5359 49, 50, 0, 0, 0, 0, 0, 0, 220, 0,
5360 0, 221, 53, 0, 54, 55, 0, 1116, 0, 0,
5361 57, 58, 59, 60, 61, 62, 63, 64, 65, 0,
5362 0, 0, 0, 4, 5, 6, 0, 8, 0, 0,
5363 0, 9, 10, 0, 0, 0, 11, 0, 12, 13,
5364 14, 260, 261, 17, 18, 0, 0, 66, 226, 68,
5365 19, 20, 262, 22, 23, 24, 25, 0, 0, 218,
5366 0, 0, 0, 0, 0, 0, 28, 0, 0, 31,
5367 32, 33, 34, 35, 36, 37, 38, 39, 0, 40,
5368 41, 42, 43, 44, 45, 46, 0, 0, 0, 0,
5369 0, 0, 0, 0, 0, 0, 47, 48, 0, 0,
5370 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5371 0, 49, 50, 0, 0, 0, 0, 0, 0, 220,
5372 0, 0, 221, 53, 0, 54, 55, 0, 0, 0,
5373 0, 57, 58, 59, 60, 61, 62, 63, 64, 65,
5374 0, 0, 0, 0, 4, 5, 6, 0, 8, 0,
5375 0, 0, 9, 10, 0, 0, 0, 11, 0, 12,
5376 13, 14, 15, 16, 17, 18, 0, 0, 66, 226,
5377 68, 19, 20, 21, 22, 23, 24, 25, 0, 0,
5378 218, 0, 0, 0, 0, 0, 0, 28, 0, 0,
5379 31, 32, 33, 34, 35, 36, 37, 38, 39, 0,
5380 40, 41, 42, 43, 44, 45, 46, 0, 0, 0,
5381 0, 0, 0, 0, 0, 0, 0, 47, 48, 0,
5382 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5383 0, 0, 49, 50, 0, 0, 0, 0, 0, 0,
5384 220, 0, 0, 221, 53, 0, 54, 55, 0, 0,
5385 0, 0, 57, 58, 59, 60, 61, 62, 63, 64,
5386 65, 0, 0, 0, 0, 4, 5, 6, 0, 8,
5387 0, 0, 0, 9, 10, 0, 0, 0, 11, 0,
5388 12, 13, 14, 15, 16, 17, 18, 0, 0, 66,
5389 226, 68, 19, 20, 21, 22, 23, 24, 25, 0,
5390 0, 26, 0, 0, 0, 0, 0, 0, 28, 0,
5391 0, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5392 0, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5393 0, 0, 0, 0, 0, 0, 0, 0, 47, 48,
5394 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5395 0, 0, 0, 49, 50, 0, 0, 0, 0, 0,
5396 0, 220, 0, 0, 221, 53, 0, 54, 55, 0,
5397 0, 0, 0, 57, 58, 59, 60, 61, 62, 63,
5398 64, 65, 0, 0, 0, 0, 4, 5, 6, 0,
5399 8, 0, 0, 0, 9, 10, 0, 0, 0, 11,
5400 0, 12, 13, 14, 15, 16, 17, 18, 0, 0,
5401 66, 67, 68, 19, 20, 21, 22, 23, 24, 25,
5402 0, 0, 760, 0, 0, 0, 0, 0, 0, 28,
5403 0, 0, 31, 32, 33, 34, 35, 36, 37, 38,
5404 39, 0, 40, 41, 42, 43, 44, 45, 46, 0,
5405 0, 0, 0, 0, 0, 0, 0, 0, 0, 47,
5406 48, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5407 0, 0, 0, 0, 49, 50, 0, 0, 0, 0,
5408 0, 0, 220, 0, 0, 221, 53, 0, 54, 55,
5409 0, 0, 0, 0, 57, 58, 59, 60, 61, 62,
5410 63, 64, 65, 0, 0, 0, 0, 4, 5, 6,
5411 0, 8, 0, 0, 0, 9, 10, 0, 0, 0,
5412 11, 0, 12, 13, 14, 15, 16, 17, 18, 0,
5413 0, 66, 226, 68, 19, 20, 21, 22, 23, 24,
5414 25, 0, 0, 218, 0, 0, 0, 0, 0, 0,
5415 28, 0, 0, 31, 32, 33, 34, 35, 36, 37,
5416 38, 39, 0, 40, 41, 42, 43, 44, 45, 46,
5417 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5418 47, 48, 0, 0, 0, 0, 0, 0, 0, 0,
5419 0, 0, 0, 0, 0, 49, 50, 0, 0, 0,
5420 0, 0, 0, 787, 0, 0, 221, 53, 0, 54,
5421 55, 0, 0, 0, 0, 57, 58, 59, 60, 61,
5422 62, 63, 64, 65, 0, 0, 0, 0, 4, 5,
5423 6, 0, 8, 0, 0, 0, 9, 10, 0, 0,
5424 0, 11, 0, 12, 13, 14, 260, 261, 17, 18,
5425 0, 0, 66, 226, 68, 19, 20, 262, 22, 23,
5426 24, 25, 0, 0, 858, 0, 0, 0, 0, 0,
5427 0, 28, 0, 0, 31, 32, 33, 34, 35, 36,
5428 37, 38, 39, 0, 40, 41, 42, 43, 44, 45,
5429 46, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5430 0, 47, 48, 0, 0, 0, 0, 0, 0, 0,
5431 0, 0, 0, 0, 0, 0, 49, 50, 0, 0,
5432 0, 0, 0, 0, 220, 0, 0, 221, 53, 0,
5433 54, 55, 0, 0, 0, 0, 57, 58, 59, 60,
5434 61, 62, 63, 64, 65, 0, 0, 0, 0, 4,
5435 5, 6, 0, 8, 0, 0, 0, 9, 10, 0,
5436 0, 0, 11, 0, 12, 13, 14, 260, 261, 17,
5437 18, 0, 0, 66, 226, 68, 19, 20, 262, 22,
5438 23, 24, 25, 0, 0, 218, 0, 0, 0, 0,
5439 0, 0, 290, 0, 0, 31, 32, 33, 34, 35,
5440 36, 37, 38, 39, 0, 40, 41, 42, 43, 44,
5441 45, 46, 0, 0, 0, 0, 0, 0, 0, 0,
5442 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5443 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5444 0, 0, 0, 0, 0, 291, 0, 0, 351, 53,
5445 0, 54, 55, 0, 352, 0, 0, 57, 58, 59,
5446 60, 61, 62, 63, 64, 65, 0, 0, 4, 5,
5447 6, 0, 8, 0, 0, 0, 9, 10, 0, 0,
5448 0, 11, 0, 12, 13, 14, 260, 261, 17, 18,
5449 0, 0, 0, 0, 292, 19, 20, 262, 22, 23,
5450 24, 25, 0, 0, 218, 0, 0, 0, 0, 0,
5451 0, 290, 0, 0, 31, 32, 33, 34, 35, 36,
5452 37, 38, 39, 0, 40, 41, 42, 43, 44, 45,
5453 46, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5454 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5455 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5456 0, 0, 0, 0, 401, 0, 0, 52, 53, 0,
5457 54, 55, 0, 56, 0, 0, 57, 58, 59, 60,
5458 61, 62, 63, 64, 65, 0, 0, 4, 5, 6,
5459 0, 8, 0, 0, 0, 9, 10, 0, 0, 0,
5460 11, 0, 12, 13, 14, 260, 261, 17, 18, 0,
5461 0, 0, 0, 292, 19, 20, 262, 22, 23, 24,
5462 25, 0, 0, 218, 0, 0, 0, 0, 0, 0,
5463 290, 0, 0, 31, 32, 33, 409, 35, 36, 37,
5464 410, 39, 0, 40, 41, 42, 43, 44, 45, 46,
5465 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5466 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5467 0, 0, 0, 0, 0, 0, 0, 0, 0, 411,
5468 0, 0, 0, 412, 0, 0, 221, 53, 0, 54,
5469 55, 0, 0, 0, 0, 57, 58, 59, 60, 61,
5470 62, 63, 64, 65, 0, 0, 4, 5, 6, 0,
5471 8, 0, 0, 0, 9, 10, 0, 0, 0, 11,
5472 0, 12, 13, 14, 260, 261, 17, 18, 0, 0,
5473 0, 0, 292, 19, 20, 262, 22, 23, 24, 25,
5474 0, 0, 218, 0, 0, 0, 0, 0, 0, 290,
5475 0, 0, 31, 32, 33, 409, 35, 36, 37, 410,
5476 39, 0, 40, 41, 42, 43, 44, 45, 46, 0,
5477 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5478 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5479 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5480 0, 0, 412, 0, 0, 221, 53, 0, 54, 55,
5481 0, 0, 0, 0, 57, 58, 59, 60, 61, 62,
5482 63, 64, 65, 0, 0, 4, 5, 6, 0, 8,
5483 0, 0, 0, 9, 10, 0, 0, 0, 11, 0,
5484 12, 13, 14, 260, 261, 17, 18, 0, 0, 0,
5485 0, 292, 19, 20, 262, 22, 23, 24, 25, 0,
5486 0, 218, 0, 0, 0, 0, 0, 0, 290, 0,
5487 0, 31, 32, 33, 34, 35, 36, 37, 38, 39,
5488 0, 40, 41, 42, 43, 44, 45, 46, 0, 0,
5489 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5490 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5491 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5492 0, 291, 0, 0, 351, 53, 0, 54, 55, 0,
5493 0, 0, 0, 57, 58, 59, 60, 61, 62, 63,
5494 64, 65, 0, 0, 4, 5, 6, 0, 8, 0,
5495 0, 0, 9, 10, 0, 0, 0, 11, 0, 12,
5496 13, 14, 260, 261, 17, 18, 0, 0, 0, 0,
5497 292, 19, 20, 262, 22, 23, 24, 25, 0, 0,
5498 218, 0, 0, 0, 0, 0, 0, 290, 0, 0,
5499 31, 32, 33, 34, 35, 36, 37, 38, 39, 0,
5500 40, 41, 42, 43, 44, 45, 46, 0, 0, 0,
5501 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5502 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5503 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5504 1171, 0, 0, 221, 53, 0, 54, 55, 0, 0,
5505 0, 0, 57, 58, 59, 60, 61, 62, 63, 64,
5506 65, 0, 0, 4, 5, 6, 0, 8, 0, 0,
5507 0, 9, 10, 0, 0, 0, 11, 0, 12, 13,
5508 14, 260, 261, 17, 18, 0, 0, 0, 0, 292,
5509 19, 20, 262, 22, 23, 24, 25, 0, 0, 218,
5510 0, 0, 0, 0, 0, 0, 290, 0, 0, 31,
5511 32, 33, 34, 35, 36, 37, 38, 39, 0, 40,
5512 41, 42, 43, 44, 45, 46, 0, 0, 0, 0,
5513 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5514 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5515 0, 0, 0, 0, 0, 0, 0, 0, 0, 1268,
5516 0, 0, 221, 53, 0, 54, 55, 22, 23, 24,
5517 25, 57, 58, 59, 60, 61, 62, 63, 64, 65,
5518 0, 0, 0, 31, 32, 33, 1060, 0, 0, 0,
5519 1061, 0, 1062, 40, 41, 42, 43, 44, 0, 0,
5520 0, 0, 0, 0, 0, 0, 0, 0, 292, 0,
5521 0, 0, 547, 0, 0, 0, 0, 0, 0, 0,
5522 0, 0, 0, 0, 0, 1063, 1064, 0, 0, 0,
5523 0, 0, 0, 1065, 0, 0, 1066, 0, 0, 1067,
5524 1068, 0, 1069, 551, 0, 57, 58, 1070, 60, 61,
5525 62, 63, 64, 65, 0, 0, 0, 0, 0, 0,
5526 22, 23, 24, 25, 0, 0, 0, 621, 622, 0,
5527 0, 623, 0, 0, 0, 1071, 31, 32, 33, 1060,
5528 0, 0, 292, 1061, 0, 0, 40, 41, 42, 43,
5529 44, 179, 180, 181, 182, 183, 184, 185, 186, 187,
5530 0, 0, 188, 189, 0, 0, 0, 0, 190, 191,
5531 192, 193, 0, 0, 0, 0, 0, 0, 1063, 1064,
5532 0, 0, 0, 194, 195, 0, 1065, 0, 0, 1066,
5533 0, 0, 1067, 1068, 0, 0, 0, 0, 57, 58,
5534 59, 60, 61, 62, 63, 64, 65, 0, 0, 0,
5535 0, 0, 0, 196, 197, 198, 199, 200, 201, 202,
5536 203, 204, 205, 0, 206, 207, 631, 632, 1071, 0,
5537 633, 0, 208, 245, 0, 292, 0, 0, 0, 0,
5538 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5539 179, 180, 181, 182, 183, 184, 185, 186, 187, 0,
5540 0, 188, 189, 0, 0, 0, 0, 190, 191, 192,
5541 193, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5542 0, 0, 194, 195, 0, 0, 0, 0, 0, 0,
5543 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5544 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5545 0, 0, 196, 197, 198, 199, 200, 201, 202, 203,
5546 204, 205, 0, 206, 207, 685, 622, 0, 0, 686,
5547 0, 208, 245, 0, 0, 0, 0, 0, 0, 0,
5548 0, 0, 0, 0, 0, 0, 0, 0, 0, 179,
5549 180, 181, 182, 183, 184, 185, 186, 187, 0, 0,
5550 188, 189, 0, 0, 0, 0, 190, 191, 192, 193,
5551 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5552 0, 194, 195, 0, 0, 0, 0, 0, 0, 0,
5553 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5554 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5555 0, 196, 197, 198, 199, 200, 201, 202, 203, 204,
5556 205, 0, 206, 207, 688, 632, 0, 0, 689, 0,
5557 208, 245, 0, 0, 0, 0, 0, 0, 0, 0,
5558 0, 0, 0, 0, 0, 0, 0, 0, 179, 180,
5559 181, 182, 183, 184, 185, 186, 187, 0, 0, 188,
5560 189, 0, 0, 0, 0, 190, 191, 192, 193, 0,
5561 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5562 194, 195, 0, 0, 0, 0, 0, 0, 0, 0,
5563 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5564 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5565 196, 197, 198, 199, 200, 201, 202, 203, 204, 205,
5566 0, 206, 207, 685, 622, 0, 0, 703, 0, 208,
5567 245, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5568 0, 0, 0, 0, 0, 0, 0, 179, 180, 181,
5569 182, 183, 184, 185, 186, 187, 0, 0, 188, 189,
5570 0, 0, 0, 0, 190, 191, 192, 193, 0, 0,
5571 0, 0, 0, 0, 0, 0, 0, 0, 0, 194,
5572 195, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5573 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5574 0, 0, 0, 0, 0, 0, 0, 0, 0, 196,
5575 197, 198, 199, 200, 201, 202, 203, 204, 205, 0,
5576 206, 207, 714, 622, 0, 0, 715, 0, 208, 245,
5577 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5578 0, 0, 0, 0, 0, 0, 179, 180, 181, 182,
5579 183, 184, 185, 186, 187, 0, 0, 188, 189, 0,
5580 0, 0, 0, 190, 191, 192, 193, 0, 0, 0,
5581 0, 0, 0, 0, 0, 0, 0, 0, 194, 195,
5582 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5583 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5584 0, 0, 0, 0, 0, 0, 0, 0, 196, 197,
5585 198, 199, 200, 201, 202, 203, 204, 205, 0, 206,
5586 207, 717, 632, 0, 0, 718, 0, 208, 245, 0,
5587 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5588 0, 0, 0, 0, 0, 179, 180, 181, 182, 183,
5589 184, 185, 186, 187, 0, 0, 188, 189, 0, 0,
5590 0, 0, 190, 191, 192, 193, 0, 0, 0, 0,
5591 0, 0, 0, 0, 0, 0, 0, 194, 195, 0,
5592 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5593 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5594 0, 0, 0, 0, 0, 0, 0, 196, 197, 198,
5595 199, 200, 201, 202, 203, 204, 205, 0, 206, 207,
5596 831, 622, 0, 0, 832, 0, 208, 245, 0, 0,
5597 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5598 0, 0, 0, 0, 179, 180, 181, 182, 183, 184,
5599 185, 186, 187, 0, 0, 188, 189, 0, 0, 0,
5600 0, 190, 191, 192, 193, 0, 0, 0, 0, 0,
5601 0, 0, 0, 0, 0, 0, 194, 195, 0, 0,
5602 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5603 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5604 0, 0, 0, 0, 0, 0, 196, 197, 198, 199,
5605 200, 201, 202, 203, 204, 205, 0, 206, 207, 834,
5606 632, 0, 0, 835, 0, 208, 245, 0, 0, 0,
5607 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5608 0, 0, 0, 179, 180, 181, 182, 183, 184, 185,
5609 186, 187, 0, 0, 188, 189, 0, 0, 0, 0,
5610 190, 191, 192, 193, 0, 0, 0, 0, 0, 0,
5611 0, 0, 0, 0, 0, 194, 195, 0, 0, 0,
5612 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5613 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5614 0, 0, 0, 0, 0, 196, 197, 198, 199, 200,
5615 201, 202, 203, 204, 205, 0, 206, 207, 840, 622,
5616 0, 0, 841, 0, 208, 245, 0, 0, 0, 0,
5617 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5618 0, 0, 179, 180, 181, 182, 183, 184, 185, 186,
5619 187, 0, 0, 188, 189, 0, 0, 0, 0, 190,
5620 191, 192, 193, 0, 0, 0, 0, 0, 0, 0,
5621 0, 0, 0, 0, 194, 195, 0, 0, 0, 0,
5622 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5623 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5624 0, 0, 0, 0, 196, 197, 198, 199, 200, 201,
5625 202, 203, 204, 205, 0, 206, 207, 669, 632, 0,
5626 0, 670, 0, 208, 245, 0, 0, 0, 0, 0,
5627 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5628 0, 179, 180, 181, 182, 183, 184, 185, 186, 187,
5629 0, 0, 188, 189, 0, 0, 0, 0, 190, 191,
5630 192, 193, 0, 0, 0, 0, 0, 0, 0, 0,
5631 0, 0, 0, 194, 195, 0, 0, 0, 0, 0,
5632 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5633 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5634 0, 0, 0, 196, 197, 198, 199, 200, 201, 202,
5635 203, 204, 205, 0, 206, 207, 1003, 622, 0, 0,
5636 1004, 0, 208, 245, 0, 0, 0, 0, 0, 0,
5637 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5638 179, 180, 181, 182, 183, 184, 185, 186, 187, 0,
5639 0, 188, 189, 0, 0, 0, 0, 190, 191, 192,
5640 193, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5641 0, 0, 194, 195, 0, 0, 0, 0, 0, 0,
5642 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5643 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5644 0, 0, 196, 197, 198, 199, 200, 201, 202, 203,
5645 204, 205, 0, 206, 207, 1006, 632, 0, 0, 1007,
5646 0, 208, 245, 0, 0, 0, 0, 0, 0, 0,
5647 0, 0, 0, 0, 0, 0, 0, 0, 0, 179,
5648 180, 181, 182, 183, 184, 185, 186, 187, 0, 0,
5649 188, 189, 0, 0, 0, 0, 190, 191, 192, 193,
5650 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5651 0, 194, 195, 0, 0, 0, 0, 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, 196, 197, 198, 199, 200, 201, 202, 203, 204,
5655 205, 0, 206, 207, 1286, 622, 0, 0, 1287, 0,
5656 208, 245, 0, 0, 0, 0, 0, 0, 0, 0,
5657 0, 0, 0, 0, 0, 0, 0, 0, 179, 180,
5658 181, 182, 183, 184, 185, 186, 187, 0, 0, 188,
5659 189, 0, 0, 0, 0, 190, 191, 192, 193, 0,
5660 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5661 194, 195, 0, 0, 0, 0, 0, 0, 0, 0,
5662 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5663 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5664 196, 197, 198, 199, 200, 201, 202, 203, 204, 205,
5665 0, 206, 207, 1289, 632, 0, 0, 1290, 0, 208,
5666 245, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5667 0, 0, 0, 0, 0, 0, 0, 179, 180, 181,
5668 182, 183, 184, 185, 186, 187, 0, 0, 188, 189,
5669 0, 0, 0, 0, 190, 191, 192, 193, 0, 0,
5670 0, 0, 0, 0, 0, 0, 0, 0, 0, 194,
5671 195, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5672 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5673 0, 0, 0, 0, 0, 0, 0, 0, 0, 196,
5674 197, 198, 199, 200, 201, 202, 203, 204, 205, 0,
5675 206, 207, 1334, 622, 0, 0, 1335, 0, 208, 245,
5676 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5677 0, 0, 0, 0, 0, 0, 179, 180, 181, 182,
5678 183, 184, 185, 186, 187, 0, 0, 188, 189, 0,
5679 0, 0, 0, 190, 191, 192, 193, 0, 0, 0,
5680 0, 0, 0, 0, 0, 0, 0, 0, 194, 195,
5681 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5682 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5683 0, 0, 0, 0, 0, 0, 0, 0, 196, 197,
5684 198, 199, 200, 201, 202, 203, 204, 205, 0, 206,
5685 207, 669, 632, 0, 0, 670, 0, 208, 245, 0,
5686 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5687 0, 0, 0, 0, 0, 179, 180, 181, 182, 183,
5688 184, 185, 186, 187, 0, 0, 188, 189, 0, 0,
5689 0, 0, 190, 191, 192, 193, 0, 0, 0, 0,
5690 0, 0, 0, 0, 0, 0, 0, 194, 195, 0,
5691 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5692 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5693 0, 0, 0, 0, 0, 0, 0, 196, 197, 198,
5694 199, 200, 201, 202, 203, 204, 205, 0, 206, 207,
5695 0, 0, 0, 0, 0, 0, 208
5696};
5697
5698static const yytype_int16 yycheck[] =
5699{
5700 1, 106, 7, 15, 16, 21, 56, 70, 59, 52,
5701 53, 97, 58, 70, 336, 1, 58, 412, 91, 751,
5702 13, 14, 27, 549, 744, 27, 394, 7, 94, 557,
5703 85, 97, 105, 332, 746, 85, 96, 336, 578, 751,
5704 97, 581, 388, 242, 819, 67, 80, 27, 98, 99,
5705 100, 52, 53, 58, 245, 56, 1, 284, 594, 101,
5706 56, 288, 15, 16, 80, 584, 580, 588, 52, 103,
5707 580, 455, 829, 799, 387, 746, 389, 455, 332, 72,
5708 77, 66, 336, 888, 85, 463, 63, 64, 65, 509,
5709 102, 886, 0, 463, 13, 1144, 101, 98, 99, 100,
5710 101, 54, 55, 25, 37, 38, 609, 52, 53, 54,
5711 55, 1160, 496, 459, 25, 77, 637, 1009, 273, 1132,
5712 15, 16, 662, 644, 645, 25, 439, 15, 16, 499,
5713 1260, 76, 77, 567, 1168, 1169, 25, 13, 98, 13,
5714 574, 26, 100, 28, 15, 458, 1252, 460, 0, 102,
5715 101, 1067, 1008, 1009, 25, 25, 66, 10, 308, 309,
5716 100, 155, 25, 66, 237, 511, 54, 278, 678, 1144,
5717 26, 591, 485, 486, 225, 93, 94, 135, 221, 97,
5718 135, 25, 69, 1158, 100, 1198, 25, 52, 152, 275,
5719 25, 56, 265, 13, 154, 135, 351, 510, 158, 512,
5720 1330, 56, 387, 158, 389, 156, 27, 102, 734, 735,
5721 120, 98, 275, 121, 102, 68, 1322, 120, 275, 135,
5722 221, 162, 155, 13, 1273, 298, 952, 1119, 1277, 1278,
5723 273, 228, 13, 245, 156, 247, 155, 156, 293, 13,
5724 1045, 1275, 161, 293, 765, 156, 262, 263, 769, 13,
5725 982, 1046, 1168, 1169, 439, 256, 156, 672, 673, 325,
5726 326, 327, 328, 1119, 659, 227, 228, 156, 1008, 1009,
5727 256, 470, 273, 458, 986, 460, 221, 741, 28, 155,
5728 744, 155, 227, 228, 803, 161, 156, 161, 1337, 273,
5729 235, 706, 293, 156, 247, 158, 152, 242, 295, 839,
5730 245, 486, 352, 1278, 650, 744, 827, 292, 351, 830,
5731 694, 256, 156, 399, 660, 986, 694, 156, 696, 158,
5732 29, 156, 323, 844, 435, 828, 696, 512, 273, 395,
5733 101, 404, 250, 251, 155, 155, 649, 323, 651, 101,
5734 161, 161, 399, 1118, 155, 411, 659, 158, 661, 135,
5735 351, 352, 247, 396, 397, 466, 352, 245, 469, 247,
5736 886, 1118, 888, 474, 892, 155, 786, 351, 158, 26,
5737 156, 161, 78, 389, 155, 525, 388, 527, 489, 1119,
5738 161, 155, 13, 155, 389, 156, 13, 161, 160, 390,
5739 904, 155, 66, 155, 904, 396, 397, 161, 283, 284,
5740 936, 66, 13, 288, 135, 290, 351, 325, 326, 327,
5741 328, 100, 330, 331, 156, 124, 924, 957, 100, 805,
5742 1132, 1161, 943, 435, 808, 946, 113, 813, 1168, 1169,
5743 808, 135, 953, 100, 439, 956, 100, 100, 959, 145,
5744 146, 147, 100, 388, 460, 390, 135, 459, 122, 123,
5745 561, 396, 397, 135, 509, 460, 966, 122, 123, 509,
5746 125, 895, 896, 1063, 1064, 899, 651, 901, 135, 903,
5747 486, 135, 135, 156, 156, 480, 661, 395, 480, 590,
5748 100, 486, 435, 52, 711, 684, 100, 56, 162, 532,
5749 158, 492, 746, 411, 158, 152, 512, 751, 25, 511,
5750 480, 158, 455, 694, 100, 66, 770, 512, 509, 773,
5751 100, 926, 927, 25, 459, 135, 1037, 932, 933, 1045,
5752 1046, 135, 579, 468, 155, 470, 1034, 158, 155, 913,
5753 161, 532, 56, 1265, 161, 1275, 591, 538, 1258, 135,
5754 435, 591, 156, 496, 155, 135, 1321, 435, 1260, 135,
5755 161, 155, 538, 1265, 100, 69, 667, 161, 1066, 120,
5756 1068, 122, 123, 1163, 1164, 577, 511, 589, 580, 1008,
5757 1009, 58, 594, 723, 153, 921, 155, 578, 728, 101,
5758 581, 155, 950, 97, 98, 159, 643, 532, 156, 135,
5759 591, 78, 652, 627, 1326, 973, 1136, 640, 100, 642,
5760 582, 1016, 636, 973, 586, 1008, 1009, 920, 135, 922,
5761 555, 627, 557, 1047, 1048, 1049, 1050, 100, 1330, 100,
5762 636, 594, 109, 135, 37, 38, 113, 738, 155, 156,
5763 156, 158, 159, 578, 69, 651, 581, 671, 650, 640,
5764 154, 642, 100, 155, 156, 661, 651, 159, 660, 158,
5765 672, 673, 135, 975, 135, 671, 661, 712, 1166, 1167,
5766 1028, 662, 712, 98, 1067, 1193, 1194, 866, 1132, 674,
5767 1065, 78, 674, 156, 687, 721, 975, 135, 110, 69,
5768 1119, 1084, 158, 1132, 706, 630, 34, 158, 704, 705,
5769 159, 636, 1273, 25, 674, 640, 1277, 642, 25, 672,
5770 673, 589, 54, 716, 52, 650, 594, 97, 98, 34,
5771 142, 712, 64, 65, 1254, 660, 1119, 662, 1132, 1041,
5772 135, 975, 1161, 796, 69, 610, 671, 52, 69, 1168,
5773 1169, 786, 986, 706, 845, 920, 786, 922, 1141, 684,
5774 1108, 694, 1041, 848, 629, 663, 723, 69, 725, 69,
5775 160, 728, 729, 98, 865, 1158, 867, 98, 1192, 15,
5776 705, 17, 69, 69, 154, 1168, 1169, 153, 158, 69,
5777 1165, 69, 838, 884, 56, 1303, 98, 97, 98, 1300,
5778 837, 69, 700, 66, 69, 786, 158, 1041, 66, 67,
5779 97, 98, 98, 836, 1258, 156, 1260, 97, 98, 97,
5780 98, 1265, 687, 135, 846, 909, 1270, 911, 135, 1258,
5781 98, 1260, 97, 98, 69, 162, 1265, 1185, 26, 1258,
5782 833, 1270, 152, 155, 156, 135, 711, 159, 155, 156,
5783 843, 716, 159, 78, 154, 836, 1275, 120, 839, 122,
5784 123, 846, 97, 98, 122, 123, 1260, 154, 135, 54,
5785 55, 1265, 57, 69, 154, 808, 1270, 69, 135, 64,
5786 65, 69, 1326, 156, 1328, 107, 1330, 69, 1332, 154,
5787 161, 816, 817, 1, 819, 760, 942, 1326, 1132, 1328,
5788 873, 1330, 98, 1332, 69, 1349, 98, 15, 16, 97,
5789 98, 836, 904, 56, 839, 97, 98, 1243, 941, 154,
5790 1349, 958, 155, 156, 926, 927, 922, 66, 746, 921,
5791 932, 933, 1326, 98, 1328, 25, 1330, 922, 1332, 757,
5792 838, 866, 155, 156, 52, 53, 1158, 156, 56, 1242,
5793 139, 1244, 135, 976, 135, 1349, 1168, 1169, 156, 67,
5794 941, 156, 14, 15, 152, 100, 154, 892, 833, 69,
5795 158, 135, 154, 926, 927, 159, 957, 85, 843, 932,
5796 933, 120, 100, 122, 123, 93, 94, 89, 90, 97,
5797 98, 99, 100, 858, 102, 976, 921, 97, 98, 1001,
5798 135, 66, 153, 52, 159, 54, 55, 56, 57, 58,
5799 1033, 936, 1005, 66, 1016, 100, 941, 135, 999, 1000,
5800 1313, 156, 995, 996, 66, 156, 1260, 1008, 1009, 78,
5801 26, 1265, 957, 999, 1000, 40, 41, 69, 156, 1070,
5802 155, 156, 156, 92, 942, 1071, 294, 295, 1001, 156,
5803 135, 976, 1033, 102, 154, 120, 153, 122, 123, 100,
5804 109, 110, 156, 1016, 156, 97, 98, 120, 936, 122,
5805 123, 156, 125, 69, 1067, 52, 1167, 1107, 120, 1244,
5806 122, 123, 1063, 1064, 156, 52, 1067, 672, 673, 156,
5807 156, 1114, 1115, 142, 135, 69, 1330, 13, 1023, 17,
5808 1025, 97, 98, 1084, 26, 690, 691, 153, 1033, 1155,
5809 1133, 25, 1178, 221, 135, 156, 156, 1208, 156, 44,
5810 1173, 706, 154, 97, 98, 44, 1107, 1218, 1053, 1054,
5811 1111, 153, 156, 1114, 1115, 1178, 156, 245, 1119, 247,
5812 1005, 1178, 250, 251, 1235, 1236, 1237, 69, 256, 44,
5813 1143, 56, 1133, 1146, 1177, 1136, 152, 44, 154, 135,
5814 1141, 160, 158, 1144, 137, 273, 984, 1190, 986, 69,
5815 988, 8, 1202, 1166, 15, 97, 98, 1158, 1159, 1160,
5816 154, 66, 1163, 1164, 156, 293, 1111, 1168, 1169, 1114,
5817 1115, 52, 156, 1118, 1225, 78, 1177, 97, 98, 69,
5818 156, 156, 1067, 1068, 1250, 1251, 156, 156, 1133, 1190,
5819 153, 1136, 156, 69, 156, 323, 156, 325, 326, 327,
5820 328, 1202, 330, 331, 101, 9, 156, 97, 98, 140,
5821 152, 52, 154, 140, 1264, 120, 158, 122, 123, 156,
5822 125, 97, 98, 351, 352, 1238, 1239, 1240, 1244, 153,
5823 156, 1243, 1177, 156, 154, 1180, 1121, 1155, 52, 1244,
5824 143, 144, 145, 146, 147, 1190, 101, 1132, 1193, 1194,
5825 1293, 856, 161, 1254, 56, 159, 83, 84, 1143, 153,
5826 388, 1146, 390, 1264, 154, 58, 140, 395, 396, 397,
5827 156, 156, 1273, 156, 156, 1288, 1277, 1278, 154, 156,
5828 56, 1166, 140, 411, 52, 78, 54, 55, 56, 57,
5829 58, 1129, 1293, 156, 1132, 256, 156, 69, 1243, 158,
5830 1245, 52, 1247, 54, 55, 1, 57, 435, 156, 1254,
5831 78, 138, 139, 1198, 156, 158, 109, 110, 156, 15,
5832 16, 926, 927, 30, 92, 97, 98, 932, 933, 1111,
5833 156, 459, 1250, 1251, 102, 156, 1337, 156, 905, 906,
5834 108, 109, 110, 59, 60, 61, 62, 914, 1293, 142,
5835 917, 102, 919, 1238, 1239, 1240, 52, 53, 1303, 156,
5836 492, 846, 967, 968, 492, 970, 971, 323, 1008, 1009,
5837 488, 67, 98, 100, 142, 89, 1321, 145, 481, 671,
5838 937, 509, 154, 511, 52, 1180, 54, 55, 56, 57,
5839 158, 33, 34, 35, 36, 734, 886, 93, 94, 1200,
5840 1132, 97, 1054, 1288, 532, 1265, 102, 49, 50, 51,
5841 538, 1016, 1297, 1322, 347, 849, 1321, 59, 60, 61,
5842 62, 63, 1260, 1063, 1064, 1159, 1161, 1067, 1161, 1157,
5843 78, 1316, 1270, 1245, 102, 1040, 109, 1247, 527, 101,
5844 108, 744, 751, 1258, 1084, -1, -1, 95, 96, 577,
5845 578, -1, 580, 581, 1316, -1, 1201, -1, -1, 1204,
5846 -1, 589, -1, 591, -1, -1, 594, -1, -1, 111,
5847 112, 113, 114, 115, 116, 117, 118, 119, -1, 1119,
5848 -1, -1, -1, 52, -1, 54, 55, 56, 57, 58,
5849 1328, -1, 1330, -1, 1332, 143, 144, 145, 146, 147,
5850 -1, 1141, -1, -1, 1144, -1, 148, -1, -1, 78,
5851 -1, 1349, 640, -1, 642, -1, -1, -1, 1158, 1159,
5852 1160, -1, 650, 1163, 1164, 221, -1, -1, 1168, 1169,
5853 -1, -1, 660, 102, 662, 663, -1, -1, -1, 108,
5854 109, 110, -1, -1, 672, 673, -1, 254, -1, 245,
5855 -1, 247, -1, -1, 250, 251, -1, 78, -1, -1,
5856 256, 1306, 1307, -1, -1, 1310, 1311, -1, -1, 1314,
5857 -1, -1, 700, 142, 95, 96, 145, 273, 706, -1,
5858 -1, -1, -1, -1, 712, -1, 155, 33, 34, 35,
5859 36, 52, -1, 54, 55, 56, 57, -1, 1343, 1344,
5860 1345, 1346, -1, 49, 50, 51, 52, 1352, -1, -1,
5861 56, -1, -1, 59, 60, 61, 62, 63, -1, 140,
5862 141, 142, 143, 144, 145, 146, 147, 323, -1, 325,
5863 326, 327, 328, 1273, 330, 331, -1, 1277, 1278, -1,
5864 -1, 102, 349, -1, -1, 91, 92, 354, 40, 41,
5865 42, 43, 44, 99, -1, 351, 102, 78, 786, 105,
5866 106, -1, 108, -1, -1, 111, 112, 113, 114, 115,
5867 116, 117, 118, 119, 95, 96, -1, -1, -1, -1,
5868 52, -1, 54, 55, 56, 57, 58, -1, -1, -1,
5869 1, -1, 388, -1, 390, 141, -1, 1337, -1, 395,
5870 396, 397, 148, -1, 15, 16, 78, -1, 836, 155,
5871 838, 839, -1, -1, 52, 411, 54, 55, 56, 57,
5872 -1, 142, 143, 144, 145, 146, 147, -1, -1, 52,
5873 102, 54, 55, 56, 57, 442, 443, 109, 110, 435,
5874 -1, 52, 53, -1, -1, 52, 453, 54, 55, 56,
5875 57, 58, -1, -1, 461, 462, 67, -1, -1, -1,
5876 -1, -1, -1, 459, 1008, 1009, -1, -1, -1, -1,
5877 142, 78, -1, -1, 481, -1, 904, -1, -1, -1,
5878 487, -1, 93, 94, -1, 92, 97, -1, -1, -1,
5879 -1, 102, -1, 921, -1, 102, 492, -1, 926, 927,
5880 -1, 108, 109, 110, 932, 933, 52, -1, 54, 55,
5881 56, 57, 58, 941, 942, 511, -1, -1, -1, 1063,
5882 1064, -1, -1, 1067, -1, -1, -1, -1, -1, 957,
5883 -1, -1, 78, -1, -1, 142, 532, -1, 145, -1,
5884 1084, -1, 538, -1, -1, -1, -1, -1, 976, -1,
5885 -1, -1, -1, -1, -1, -1, 102, -1, -1, -1,
5886 -1, -1, 108, 109, 110, -1, -1, -1, -1, -1,
5887 -1, 999, 1000, 1001, -1, 1119, -1, -1, -1, -1,
5888 -1, 577, 578, -1, 580, 581, -1, -1, 1016, -1,
5889 -1, -1, -1, 589, -1, -1, 142, 1141, 594, 145,
5890 1144, -1, -1, -1, -1, 1033, -1, -1, -1, -1,
5891 221, -1, -1, -1, 1158, 1159, 1160, -1, -1, 1163,
5892 1164, -1, -1, -1, 1168, 1169, -1, -1, -1, -1,
5893 -1, 638, -1, -1, 245, -1, 247, -1, -1, 250,
5894 251, -1, -1, -1, 640, 256, 642, -1, -1, -1,
5895 -1, -1, -1, -1, 650, -1, -1, -1, -1, -1,
5896 -1, -1, 273, -1, 660, -1, 662, 663, 675, -1,
5897 -1, -1, 33, 34, 35, 36, 672, 673, -1, 1107,
5898 -1, -1, -1, 1111, -1, -1, 1114, 1115, 49, 50,
5899 51, 52, -1, -1, -1, 56, -1, -1, 59, 60,
5900 61, 62, 63, -1, 700, 1133, -1, -1, 1136, -1,
5901 706, -1, 323, -1, 325, 326, 327, 328, -1, 330,
5902 331, -1, -1, -1, -1, -1, -1, 1155, -1, 1273,
5903 91, 92, -1, 1277, 1278, -1, -1, -1, 99, -1,
5904 351, 102, -1, -1, 105, 106, -1, 108, -1, 1177,
5905 111, 112, 113, 114, 115, 116, 117, 118, 119, -1,
5906 -1, -1, 1190, -1, -1, -1, -1, -1, -1, -1,
5907 -1, -1, -1, -1, 1202, -1, -1, 388, -1, 390,
5908 141, -1, -1, -1, 395, 396, 397, 148, -1, -1,
5909 -1, -1, -1, 1337, 801, 802, -1, -1, -1, -1,
5910 411, -1, 809, 810, -1, -1, -1, -1, -1, -1,
5911 -1, -1, -1, -1, -1, 1243, -1, -1, -1, -1,
5912 -1, -1, 1250, 1251, 435, -1, 1254, -1, -1, -1,
5913 -1, -1, -1, -1, -1, -1, 1264, -1, -1, -1,
5914 836, -1, 838, 839, -1, -1, -1, -1, 459, -1,
5915 -1, -1, -1, 860, 861, -1, 863, 864, -1, -1,
5916 -1, -1, -1, -1, -1, 1293, -1, -1, -1, -1,
5917 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5918 -1, 492, -1, -1, -1, -1, -1, -1, -1, 1,
5919 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5920 511, -1, -1, 15, 16, -1, -1, -1, 904, -1,
5921 -1, 918, -1, -1, -1, -1, -1, 1008, 1009, -1,
5922 -1, 532, -1, -1, 931, 921, -1, 538, -1, -1,
5923 926, 927, -1, -1, -1, -1, 932, 933, -1, -1,
5924 52, 53, -1, -1, -1, 941, 942, 78, 79, 80,
5925 81, 82, 83, 84, 85, 67, 87, 88, -1, -1,
5926 -1, 957, 969, -1, 95, 96, 577, 578, -1, 580,
5927 581, -1, 1063, 1064, -1, -1, 1067, -1, 589, -1,
5928 976, 93, 94, 594, -1, 97, -1, -1, -1, -1,
5929 102, -1, -1, 1084, -1, -1, -1, -1, -1, -1,
5930 -1, -1, -1, 999, 1000, 1001, -1, 138, 139, 140,
5931 141, 142, 143, 144, 145, 146, 147, -1, -1, -1,
5932 1016, -1, -1, -1, -1, -1, -1, -1, 1119, 640,
5933 -1, 642, -1, -1, -1, -1, -1, 1033, -1, 650,
5934 -1, -1, -1, -1, -1, -1, -1, -1, -1, 660,
5935 1141, 662, 663, 1144, -1, -1, -1, -1, -1, -1,
5936 -1, 672, 673, -1, -1, -1, -1, 1158, 1159, 1160,
5937 -1, -1, 1163, 1164, -1, -1, -1, 1168, 1169, -1,
5938 -1, -1, -1, -1, -1, -1, -1, -1, -1, 700,
5939 -1, -1, -1, -1, 1, 706, -1, -1, -1, -1,
5940 -1, -1, -1, -1, -1, -1, -1, -1, -1, 221,
5941 -1, -1, -1, -1, -1, 1111, -1, -1, 1114, 1115,
5942 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5943 -1, -1, -1, 245, -1, 247, -1, 1133, 250, 251,
5944 1136, -1, -1, 1150, 256, 52, 53, -1, -1, 56,
5945 -1, -1, -1, -1, -1, -1, -1, -1, -1, 1155,
5946 -1, 273, -1, -1, -1, -1, -1, -1, -1, -1,
5947 -1, -1, -1, -1, -1, -1, -1, -1, 85, -1,
5948 -1, 1177, 1273, -1, -1, -1, 1277, 1278, -1, -1,
5949 -1, 98, 99, 100, 1190, -1, -1, -1, -1, -1,
5950 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5951 -1, 323, -1, 325, 326, 327, 328, -1, 330, 331,
5952 1, -1, -1, -1, -1, 836, -1, 838, 839, -1,
5953 -1, -1, -1, -1, -1, -1, -1, -1, -1, 351,
5954 -1, -1, -1, -1, -1, -1, 1337, 1243, -1, -1,
5955 -1, -1, -1, -1, 1250, 1251, -1, -1, 1254, -1,
5956 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5957 -1, 52, 53, -1, -1, 56, 388, -1, 390, -1,
5958 -1, -1, -1, 395, 396, 397, -1, -1, -1, -1,
5959 -1, -1, -1, 904, -1, -1, -1, 1293, -1, 411,
5960 -1, -1, -1, -1, 85, -1, -1, -1, -1, -1,
5961 921, -1, -1, -1, 221, 926, 927, 98, 99, 100,
5962 -1, 932, 933, 435, -1, -1, -1, -1, -1, -1,
5963 941, 942, -1, 44, -1, -1, -1, -1, -1, -1,
5964 -1, -1, -1, -1, -1, -1, 957, 459, -1, 256,
5965 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5966 -1, -1, -1, -1, -1, 976, 273, 78, 79, 80,
5967 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,
5968 492, -1, -1, -1, 95, 96, 293, -1, 999, 1000,
5969 1001, -1, -1, -1, -1, -1, -1, -1, -1, 511,
5970 -1, -1, -1, 1008, 1009, 1016, -1, -1, -1, -1,
5971 -1, -1, -1, -1, -1, -1, 323, -1, -1, -1,
5972 532, -1, 1033, -1, -1, 136, 538, 138, 139, 140,
5973 141, 142, 143, 144, 145, 146, 147, -1, -1, -1,
5974 221, -1, -1, -1, 351, 352, -1, -1, -1, -1,
5975 -1, -1, -1, -1, -1, -1, -1, -1, 1063, 1064,
5976 -1, -1, 1067, -1, -1, 577, 578, -1, 580, 581,
5977 -1, -1, -1, -1, -1, 256, -1, 589, -1, 1084,
5978 -1, -1, 594, 390, -1, -1, -1, -1, -1, 396,
5979 397, -1, 273, -1, -1, -1, -1, -1, -1, -1,
5980 1111, -1, -1, 1114, 1115, -1, -1, -1, -1, -1,
5981 -1, -1, 293, -1, 1119, -1, -1, -1, -1, -1,
5982 -1, -1, 1133, -1, -1, 1136, -1, -1, 640, -1,
5983 642, -1, -1, -1, -1, -1, 1141, -1, 650, 1144,
5984 -1, -1, 323, -1, 1155, -1, -1, -1, 660, -1,
5985 662, 663, -1, 1158, 1159, 1160, -1, -1, 1163, 1164,
5986 672, 673, -1, 1168, 1169, -1, 1177, -1, -1, -1,
5987 351, 352, -1, -1, -1, -1, -1, -1, -1, 1190,
5988 -1, -1, -1, -1, -1, 492, 1008, 1009, 700, -1,
5989 -1, -1, -1, -1, 706, -1, -1, -1, -1, -1,
5990 -1, -1, 509, -1, -1, -1, -1, -1, -1, 390,
5991 -1, -1, -1, -1, -1, 396, 397, -1, -1, -1,
5992 -1, -1, -1, -1, -1, 532, -1, -1, -1, -1,
5993 -1, 538, 1243, -1, -1, -1, -1, -1, -1, 1250,
5994 1251, 1063, 1064, 1254, -1, 1067, -1, -1, -1, -1,
5995 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5996 -1, -1, 1084, -1, 55, -1, -1, -1, 1273, -1,
5997 -1, 578, 1277, 1278, 581, -1, -1, -1, -1, 1,
5998 -1, -1, 1293, -1, 591, -1, -1, 594, -1, -1,
5999 -1, -1, -1, -1, -1, -1, -1, 1119, -1, -1,
6000 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6001 -1, 492, -1, -1, -1, -1, -1, -1, -1, 1141,
6002 -1, -1, 1144, -1, 836, -1, 838, 839, 509, -1,
6003 52, 53, 1337, 640, 56, 642, 1158, 1159, 1160, -1,
6004 -1, 1163, 1164, -1, -1, -1, 1168, 1169, -1, -1,
6005 -1, 532, -1, -1, -1, 662, -1, 538, -1, -1,
6006 -1, -1, -1, 85, -1, 672, 673, -1, -1, -1,
6007 -1, -1, -1, -1, -1, -1, 98, 99, 100, -1,
6008 -1, -1, -1, -1, -1, -1, -1, 1008, 1009, -1,
6009 -1, -1, 904, -1, -1, -1, -1, 578, -1, 706,
6010 581, -1, -1, -1, -1, 712, -1, -1, -1, 921,
6011 591, -1, -1, 594, 926, 927, -1, -1, -1, -1,
6012 932, 933, -1, -1, -1, -1, -1, -1, 219, 941,
6013 942, 222, 223, 224, -1, -1, -1, -1, -1, -1,
6014 -1, -1, 1063, 1064, -1, 957, 1067, -1, -1, -1,
6015 -1, 1273, -1, -1, -1, 1277, 1278, -1, -1, 640,
6016 -1, 642, 1, 1084, 976, -1, -1, -1, -1, -1,
6017 -1, -1, -1, -1, -1, -1, -1, -1, -1, 786,
6018 -1, 662, -1, -1, -1, -1, -1, 999, 1000, 1001,
6019 -1, 672, 673, -1, -1, -1, -1, -1, 1119, 221,
6020 -1, -1, -1, -1, 1016, -1, -1, -1, -1, -1,
6021 -1, -1, -1, 52, 53, 1337, -1, 56, -1, -1,
6022 1141, 1033, -1, 1144, -1, 706, -1, -1, -1, 836,
6023 -1, 712, 839, -1, 256, -1, -1, 1158, 1159, 1160,
6024 721, -1, 1163, 1164, -1, -1, 85, 1168, 1169, -1,
6025 -1, 273, -1, -1, -1, -1, -1, -1, -1, 98,
6026 99, 100, 101, -1, -1, -1, -1, -1, -1, 0,
6027 -1, 293, -1, -1, -1, -1, -1, 8, 9, 10,
6028 -1, -1, 13, 14, 15, -1, 17, -1, -1, -1,
6029 -1, -1, -1, -1, 25, 26, 27, -1, -1, 1111,
6030 -1, 323, 1114, 1115, -1, 786, 37, 38, -1, 40,
6031 41, 42, 43, 44, -1, -1, -1, -1, -1, 926,
6032 927, 1133, -1, -1, 1136, 932, 933, -1, -1, 351,
6033 352, -1, -1, -1, 941, -1, -1, 68, 69, -1,
6034 -1, -1, -1, 1155, -1, -1, -1, -1, -1, -1,
6035 957, -1, 1273, -1, -1, 836, 1277, 1278, 839, -1,
6036 1, -1, -1, 454, 455, 1177, 97, 98, 390, 976,
6037 -1, -1, 463, -1, 396, 397, -1, -1, 1190, -1,
6038 -1, -1, 221, -1, -1, -1, -1, -1, -1, -1,
6039 121, -1, 999, 1000, 1001, -1, -1, -1, -1, -1,
6040 -1, -1, -1, -1, -1, 496, -1, -1, 499, 1016,
6041 -1, 52, 53, -1, -1, -1, 1337, 256, -1, -1,
6042 -1, 152, 153, -1, 155, -1, 1033, 158, 159, -1,
6043 161, 1243, -1, -1, 273, -1, -1, -1, 1250, 1251,
6044 -1, -1, 1254, -1, -1, 926, 927, -1, -1, -1,
6045 -1, 932, 933, -1, 293, -1, -1, 98, -1, -1,
6046 941, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6047 492, -1, -1, -1, -1, -1, 957, 568, -1, -1,
6048 -1, 1293, 1, -1, 323, -1, -1, 509, -1, -1,
6049 -1, -1, -1, -1, -1, 976, -1, -1, 589, -1,
6050 1107, -1, -1, 594, 1111, -1, -1, 1114, 1115, -1,
6051 532, -1, 351, 352, -1, -1, 538, -1, 999, 1000,
6052 1001, -1, -1, -1, -1, -1, 1133, -1, -1, 1136,
6053 -1, -1, -1, 52, 53, 1016, -1, -1, -1, -1,
6054 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6055 -1, 390, 1033, -1, -1, -1, 578, 396, 397, 581,
6056 -1, -1, -1, -1, -1, -1, -1, -1, -1, 591,
6057 1177, -1, 594, -1, -1, -1, -1, -1, -1, -1,
6058 221, -1, -1, 1190, -1, 676, -1, -1, -1, -1,
6059 -1, -1, -1, -1, -1, 1202, -1, -1, -1, -1,
6060 -1, -1, -1, 694, -1, 696, -1, -1, -1, -1,
6061 -1, -1, -1, -1, -1, 256, -1, -1, 640, -1,
6062 642, -1, -1, -1, -1, -1, 1107, -1, -1, -1,
6063 1111, -1, 273, 1114, 1115, -1, -1, -1, -1, -1,
6064 662, -1, -1, -1, -1, -1, -1, 1254, -1, -1,
6065 672, 673, 1133, 492, -1, 1136, -1, 1264, -1, 750,
6066 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6067 509, -1, -1, -1, 1008, 1009, -1, -1, -1, -1,
6068 -1, -1, 323, -1, 706, -1, 1293, 778, -1, -1,
6069 712, -1, -1, 532, -1, -1, 1177, -1, -1, 538,
6070 -1, -1, 221, -1, -1, -1, -1, -1, -1, 1190,
6071 351, -1, -1, -1, -1, -1, -1, 808, -1, -1,
6072 -1, 1202, -1, -1, -1, -1, -1, -1, -1, 1063,
6073 1064, -1, -1, 1067, -1, 826, -1, 256, -1, 578,
6074 -1, -1, 581, -1, -1, -1, -1, -1, -1, 390,
6075 1084, -1, 591, -1, 273, 396, 397, -1, -1, -1,
6076 -1, -1, -1, -1, 786, -1, -1, -1, -1, -1,
6077 -1, -1, -1, 1254, -1, -1, -1, -1, -1, -1,
6078 -1, -1, -1, 1264, -1, 1119, -1, -1, -1, -1,
6079 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6080 -1, 640, -1, 642, 323, -1, -1, 1141, -1, -1,
6081 1144, -1, 1293, -1, 836, -1, -1, 839, -1, -1,
6082 -1, -1, 913, 662, 1158, 1159, 1160, -1, -1, 1163,
6083 1164, -1, 351, -1, 1168, 1169, -1, -1, -1, -1,
6084 -1, -1, -1, -1, -1, 936, -1, -1, -1, -1,
6085 -1, 492, -1, -1, -1, -1, -1, 948, -1, -1,
6086 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6087 -1, 390, -1, 712, -1, -1, -1, 396, 397, -1,
6088 -1, -1, 973, -1, -1, -1, -1, -1, -1, -1,
6089 -1, 532, -1, 1008, 1009, -1, -1, 538, -1, -1,
6090 -1, -1, -1, -1, 926, 927, 997, -1, -1, -1,
6091 932, 933, -1, -1, -1, -1, -1, -1, -1, 941,
6092 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6093 -1, -1, -1, -1, -1, 957, -1, 578, -1, 1273,
6094 581, 1032, -1, 1277, 1278, -1, -1, 786, 1063, 1064,
6095 -1, -1, 1067, 594, 976, -1, -1, -1, -1, -1,
6096 -1, -1, -1, -1, -1, -1, -1, -1, -1, 1084,
6097 -1, -1, -1, 492, -1, -1, -1, 999, 1000, 1001,
6098 1008, 1009, -1, -1, -1, -1, -1, -1, -1, -1,
6099 -1, -1, -1, -1, 1016, -1, -1, 836, -1, 640,
6100 839, 642, -1, 1337, 1119, -1, -1, -1, -1, -1,
6101 -1, 1033, -1, 532, -1, -1, -1, -1, -1, 538,
6102 -1, 662, -1, -1, -1, 1116, 1141, -1, -1, 1144,
6103 -1, 672, 673, -1, -1, 1063, 1064, -1, -1, 1067,
6104 -1, -1, -1, 1158, 1159, 1160, -1, -1, 1163, 1164,
6105 -1, -1, -1, 1168, 1169, -1, 1084, -1, -1, 578,
6106 -1, -1, 581, -1, -1, 706, -1, -1, -1, -1,
6107 -1, -1, -1, -1, -1, 594, -1, -1, -1, -1,
6108 -1, -1, -1, -1, -1, 1107, -1, -1, -1, 1111,
6109 -1, 1119, 1114, 1115, -1, -1, -1, -1, -1, -1,
6110 -1, -1, 941, -1, -1, -1, -1, -1, -1, -1,
6111 -1, 1133, -1, 1141, 1136, -1, 1144, -1, 957, -1,
6112 -1, 640, -1, 642, -1, -1, -1, -1, -1, -1,
6113 1158, 1159, 1160, -1, -1, 1163, 1164, 976, -1, -1,
6114 1168, 1169, -1, 662, -1, -1, -1, -1, -1, -1,
6115 -1, -1, -1, 672, 673, 1177, -1, -1, 1273, -1,
6116 999, 1000, 1277, 1278, -1, -1, -1, -1, 1190, -1,
6117 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6118 1202, -1, -1, -1, -1, -1, -1, 706, -1, -1,
6119 -1, -1, -1, -1, 1033, 836, -1, -1, 839, -1,
6120 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6121 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6122 -1, -1, 1337, -1, -1, -1, -1, -1, -1, -1,
6123 -1, -1, 1254, -1, -1, -1, -1, -1, -1, -1,
6124 -1, -1, 1264, -1, -1, 1273, -1, -1, -1, 1277,
6125 1278, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6126 -1, -1, -1, -1, -1, -1, -1, -1, 1107, -1,
6127 -1, 1293, 1111, -1, -1, 1114, 1115, -1, -1, -1,
6128 -1, -1, -1, -1, -1, 926, 927, -1, -1, -1,
6129 -1, 932, 933, -1, 1133, -1, -1, 1136, -1, -1,
6130 941, -1, -1, -1, -1, -1, -1, -1, -1, 1337,
6131 -1, -1, -1, -1, -1, -1, 957, 836, -1, -1,
6132 839, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6133 -1, -1, -1, 15, 16, 976, -1, -1, 1177, -1,
6134 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6135 -1, 1190, -1, -1, -1, -1, -1, -1, 999, 1000,
6136 1001, -1, -1, 1202, -1, 47, 48, 49, 50, -1,
6137 -1, -1, 54, 55, -1, 1016, -1, -1, -1, -1,
6138 -1, -1, -1, -1, -1, 67, 68, -1, -1, -1,
6139 -1, -1, 1033, -1, -1, -1, -1, -1, -1, -1,
6140 -1, -1, -1, -1, -1, -1, -1, 926, 927, -1,
6141 -1, -1, -1, 932, 933, 1254, -1, -1, -1, -1,
6142 102, -1, 941, -1, -1, 1264, -1, -1, -1, -1,
6143 -1, -1, -1, -1, -1, -1, -1, -1, 957, -1,
6144 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6145 -1, -1, -1, -1, 1293, -1, -1, 976, -1, -1,
6146 -1, -1, -1, -1, -1, -1, 1107, -1, -1, -1,
6147 1111, -1, -1, 1114, 1115, -1, -1, -1, -1, -1,
6148 999, 1000, 1001, -1, -1, -1, -1, -1, -1, -1,
6149 0, -1, 1133, -1, -1, 1136, -1, 1016, 8, 9,
6150 10, -1, -1, 13, 14, 15, -1, 17, -1, -1,
6151 -1, -1, -1, -1, 1033, 25, 26, 27, 28, -1,
6152 -1, -1, -1, -1, -1, -1, -1, 37, 38, -1,
6153 40, 41, 42, 43, 44, -1, 1177, 219, -1, -1,
6154 222, 223, 224, -1, 226, -1, -1, -1, -1, 1190,
6155 -1, -1, -1, -1, -1, -1, -1, -1, 68, 69,
6156 -1, -1, -1, 245, -1, 247, -1, -1, 78, 79,
6157 80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
6158 90, -1, -1, -1, -1, 95, 96, 97, 98, -1,
6159 -1, 101, 1111, -1, -1, 1114, 1115, 107, -1, -1,
6160 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6161 -1, 121, -1, 1254, 1133, -1, -1, 1136, -1, -1,
6162 -1, -1, -1, -1, -1, -1, 136, -1, 138, 139,
6163 140, 141, 142, 143, 144, 145, 146, 147, -1, -1,
6164 -1, -1, 152, 153, 154, 155, 156, -1, 158, 159,
6165 160, 161, 1293, -1, -1, -1, -1, -1, 1177, -1,
6166 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6167 -1, 1190, -1, -1, 356, 357, 358, 359, 360, -1,
6168 -1, 363, 364, 365, 366, 367, 368, 369, 370, -1,
6169 372, -1, -1, 375, 376, 377, 378, 379, 380, 381,
6170 382, 383, 384, -1, -1, -1, 388, -1, -1, -1,
6171 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6172 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6173 -1, -1, -1, -1, -1, 1254, -1, -1, -1, -1,
6174 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6175 -1, -1, -1, 435, -1, -1, -1, -1, -1, -1,
6176 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6177 -1, -1, 454, 455, 1293, -1, -1, 459, -1, -1,
6178 -1, 463, 0, 465, -1, -1, -1, -1, -1, -1,
6179 8, 9, 10, -1, -1, 13, 14, 15, -1, 17,
6180 -1, 483, -1, -1, -1, -1, -1, 25, 26, 27,
6181 28, 29, -1, -1, 496, -1, -1, 499, -1, 37,
6182 38, -1, 40, 41, 42, 43, 44, -1, -1, 511,
6183 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6184 -1, -1, -1, -1, -1, -1, -1, 529, -1, -1,
6185 68, 69, -1, -1, -1, -1, -1, -1, -1, -1,
6186 78, 79, 80, 81, 82, 83, 84, 85, 86, 87,
6187 88, 89, 90, -1, -1, -1, -1, 95, 96, 97,
6188 98, -1, 100, 101, -1, -1, 568, -1, -1, 107,
6189 -1, -1, -1, -1, -1, 577, -1, -1, 580, -1,
6190 -1, -1, -1, 121, -1, -1, 124, 589, -1, -1,
6191 -1, -1, 594, -1, -1, -1, -1, 135, 136, 137,
6192 138, 139, 140, 141, 142, 143, 144, 145, 146, 147,
6193 -1, -1, -1, -1, 152, 153, 154, 155, 156, -1,
6194 -1, 159, 160, 161, -1, -1, -1, -1, -1, -1,
6195 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6196 -1, -1, -1, -1, -1, -1, -1, -1, 650, -1,
6197 -1, -1, -1, -1, -1, -1, -1, -1, 660, -1,
6198 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6199 672, 673, -1, -1, 676, 677, 678, 679, -1, 0,
6200 1, -1, 3, 4, 5, 6, 7, -1, 690, 691,
6201 11, 12, 694, -1, 696, 16, -1, 18, 19, 20,
6202 21, 22, 23, 24, 706, -1, -1, -1, -1, 30,
6203 31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
6204 -1, -1, -1, -1, 45, 46, 47, 48, 49, 50,
6205 51, 52, 53, 54, 55, 56, 57, -1, 59, 60,
6206 61, 62, 63, 64, 65, -1, -1, -1, 750, -1,
6207 -1, -1, -1, -1, -1, 76, 77, -1, -1, -1,
6208 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6209 91, 92, -1, -1, -1, -1, 778, -1, 99, -1,
6210 -1, 102, 103, -1, 105, 106, -1, 108, -1, -1,
6211 111, 112, 113, 114, 115, 116, 117, 118, 119, -1,
6212 121, -1, -1, -1, -1, -1, 808, -1, -1, -1,
6213 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6214 -1, -1, 25, -1, 826, -1, -1, 148, 149, 150,
6215 -1, -1, -1, -1, 155, -1, -1, -1, -1, -1,
6216 161, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6217 -1, -1, -1, -1, 856, -1, -1, -1, -1, -1,
6218 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6219 -1, -1, -1, -1, -1, 78, 79, 80, 81, 82,
6220 83, 84, 85, 86, 87, 88, 89, 90, -1, -1,
6221 -1, -1, 95, 96, -1, -1, -1, -1, 101, -1,
6222 -1, -1, 904, -1, -1, -1, -1, -1, -1, -1,
6223 -1, 913, -1, -1, -1, -1, -1, -1, -1, 921,
6224 -1, -1, -1, 925, 926, 927, -1, -1, -1, -1,
6225 932, 933, -1, 136, 936, 138, 139, 140, 141, 142,
6226 143, 144, 145, 146, 147, -1, 948, -1, -1, -1,
6227 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6228 -1, -1, -1, -1, 966, 967, 968, -1, 970, 971,
6229 -1, 973, -1, -1, -1, -1, -1, -1, -1, -1,
6230 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6231 -1, 993, 994, -1, -1, 997, -1, -1, -1, 1001,
6232 1002, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6233 -1, -1, -1, -1, 1016, -1, -1, -1, -1, -1,
6234 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6235 1032, -1, -1, -1, -1, -1, 0, 1, 1040, 3,
6236 4, 5, 6, 7, 8, 9, 10, 11, 12, -1,
6237 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
6238 24, 25, -1, -1, -1, -1, 30, 31, 32, 33,
6239 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
6240 -1, 45, 46, 47, 48, 49, 50, 51, 52, 53,
6241 54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
6242 64, 65, -1, -1, 68, -1, -1, -1, -1, -1,
6243 -1, -1, 76, 77, 1116, -1, -1, -1, -1, -1,
6244 -1, -1, -1, -1, -1, -1, -1, 91, 92, -1,
6245 -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
6246 -1, 105, 106, -1, 108, -1, -1, 111, 112, 113,
6247 114, 115, 116, 117, 118, 119, -1, 121, -1, -1,
6248 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6249 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6250 -1, -1, -1, -1, 148, 149, 150, -1, -1, 153,
6251 -1, -1, -1, -1, -1, 159, -1, 161, 0, 1,
6252 -1, 3, 4, 5, 6, 7, -1, -1, -1, 11,
6253 12, -1, -1, -1, 16, -1, 18, 19, 20, 21,
6254 22, 23, 24, -1, -1, -1, -1, -1, 30, 31,
6255 32, 33, 34, 35, 36, -1, -1, 39, -1, -1,
6256 -1, 1243, -1, 45, 46, 47, 48, 49, 50, 51,
6257 52, 53, 54, 55, 56, 57, -1, 59, 60, 61,
6258 62, 63, 64, 65, -1, -1, -1, 78, 79, 80,
6259 81, 82, 83, 84, 76, 77, 87, 88, -1, -1,
6260 -1, -1, -1, -1, 95, 96, -1, -1, -1, 91,
6261 92, -1, -1, -1, -1, -1, -1, 99, -1, -1,
6262 102, 103, -1, 105, 106, -1, 108, -1, -1, 111,
6263 112, 113, 114, 115, 116, 117, 118, 119, -1, -1,
6264 -1, -1, -1, -1, -1, -1, -1, 138, 139, 140,
6265 141, 142, 143, 144, 145, 146, 147, -1, -1, -1,
6266 -1, -1, -1, -1, -1, -1, 148, 149, 150, -1,
6267 -1, 0, 1, 155, 3, 4, 5, 6, 7, 161,
6268 -1, -1, 11, 12, -1, -1, -1, 16, -1, 18,
6269 19, 20, 21, 22, 23, 24, -1, -1, -1, -1,
6270 -1, 30, 31, 32, 33, 34, 35, 36, -1, -1,
6271 39, -1, -1, -1, -1, -1, 45, 46, 47, 48,
6272 49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
6273 59, 60, 61, 62, 63, 64, 65, -1, -1, -1,
6274 -1, -1, -1, -1, -1, -1, -1, 76, 77, -1,
6275 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6276 -1, -1, 91, 92, -1, -1, -1, -1, -1, -1,
6277 99, -1, -1, 102, 103, -1, 105, 106, -1, 108,
6278 -1, -1, 111, 112, 113, 114, 115, 116, 117, 118,
6279 119, -1, -1, -1, -1, -1, -1, -1, 0, -1,
6280 -1, -1, -1, -1, -1, -1, 8, 9, 10, -1,
6281 -1, 13, 14, 15, -1, 17, -1, -1, -1, 148,
6282 149, 150, -1, 25, 153, 27, 28, 29, -1, -1,
6283 -1, -1, 161, -1, -1, 37, 38, -1, 40, 41,
6284 42, 43, 44, -1, -1, -1, 78, 79, 80, 81,
6285 82, 83, 84, 85, 86, 87, 88, 89, 90, -1,
6286 -1, -1, -1, 95, 96, -1, 68, 69, -1, -1,
6287 -1, -1, -1, -1, -1, -1, 78, 79, 80, 81,
6288 82, 83, 84, 85, 86, 87, 88, 89, 90, -1,
6289 -1, -1, -1, 95, 96, 97, 98, -1, 100, 101,
6290 -1, -1, -1, -1, 136, 107, 138, 139, 140, 141,
6291 142, 143, 144, 145, 146, 147, -1, -1, -1, 121,
6292 -1, -1, 124, 155, -1, -1, -1, -1, -1, -1,
6293 -1, -1, -1, 135, 136, 137, 138, 139, 140, 141,
6294 142, 143, 144, 145, 146, 147, -1, -1, -1, -1,
6295 -1, 153, 154, 155, 156, 0, -1, 159, 160, 161,
6296 -1, -1, -1, 8, 9, 10, -1, -1, 13, 14,
6297 15, -1, 17, -1, -1, -1, -1, -1, -1, -1,
6298 25, -1, 27, 28, 29, -1, -1, -1, -1, -1,
6299 -1, -1, 37, 38, -1, 40, 41, 42, 43, 44,
6300 -1, -1, -1, 78, 79, 80, 81, 82, 83, 84,
6301 85, 86, 87, 88, 89, 90, -1, -1, -1, -1,
6302 95, 96, -1, 68, 69, -1, -1, -1, -1, -1,
6303 -1, -1, -1, 78, 79, 80, 81, 82, 83, 84,
6304 85, 86, 87, 88, 89, 90, -1, -1, -1, -1,
6305 95, 96, 97, 98, -1, 100, 101, -1, -1, -1,
6306 -1, 136, 107, 138, 139, 140, 141, 142, 143, 144,
6307 145, 146, 147, -1, -1, -1, 121, -1, -1, 124,
6308 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6309 135, 136, 137, 138, 139, 140, 141, 142, 143, 144,
6310 145, 146, 147, -1, -1, -1, -1, -1, 153, 154,
6311 155, 156, 0, -1, 159, 160, 161, -1, -1, -1,
6312 8, 9, 10, -1, -1, 13, 14, 15, -1, 17,
6313 -1, -1, -1, -1, -1, -1, -1, 25, 26, 27,
6314 28, 29, -1, -1, -1, -1, -1, -1, -1, 37,
6315 38, -1, 40, 41, 42, 43, 44, -1, -1, -1,
6316 78, 79, 80, 81, 82, 83, 84, 85, 86, 87,
6317 88, 89, 90, -1, -1, -1, -1, 95, 96, -1,
6318 68, 69, -1, -1, -1, -1, -1, -1, -1, -1,
6319 78, 79, 80, 81, 82, 83, 84, 85, 86, 87,
6320 88, 89, 90, -1, -1, -1, -1, 95, 96, 97,
6321 98, -1, -1, 101, -1, -1, -1, -1, -1, 107,
6322 138, 139, 140, 141, 142, 143, 144, 145, 146, 147,
6323 -1, -1, -1, 121, -1, -1, 124, -1, -1, -1,
6324 -1, -1, -1, -1, -1, -1, -1, -1, 136, 137,
6325 138, 139, 140, 141, 142, 143, 144, 145, 146, 147,
6326 -1, -1, -1, -1, 152, 153, 154, 155, 156, 0,
6327 -1, 159, 160, 161, -1, -1, -1, 8, 9, 10,
6328 -1, -1, 13, 14, 15, -1, 17, -1, -1, -1,
6329 -1, -1, -1, -1, 25, 26, 27, 28, 29, -1,
6330 -1, -1, -1, -1, -1, -1, 37, 38, -1, 40,
6331 41, 42, 43, 44, -1, -1, -1, 78, 79, 80,
6332 81, 82, 83, 84, -1, -1, 87, 88, -1, -1,
6333 -1, -1, -1, -1, 95, 96, -1, 68, 69, -1,
6334 -1, -1, -1, -1, -1, -1, -1, 78, 79, 80,
6335 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,
6336 -1, -1, -1, -1, 95, 96, 97, 98, -1, -1,
6337 101, -1, -1, -1, -1, -1, 107, 138, 139, 140,
6338 141, 142, 143, 144, 145, 146, 147, -1, -1, -1,
6339 121, -1, -1, 124, -1, -1, -1, -1, -1, -1,
6340 -1, -1, -1, -1, -1, 136, 137, 138, 139, 140,
6341 141, 142, 143, 144, 145, 146, 147, -1, -1, -1,
6342 -1, 152, 153, 154, 155, 156, 0, -1, 159, 160,
6343 161, -1, -1, -1, 8, 9, 10, -1, -1, 13,
6344 14, 15, -1, 17, -1, -1, -1, -1, -1, -1,
6345 -1, 25, -1, 27, 28, 29, -1, -1, -1, -1,
6346 -1, -1, -1, 37, 38, -1, 40, 41, 42, 43,
6347 44, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6348 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6349 -1, -1, -1, -1, 68, 69, -1, -1, -1, -1,
6350 -1, -1, -1, -1, 78, 79, 80, 81, 82, 83,
6351 84, 85, 86, 87, 88, 89, 90, -1, -1, -1,
6352 -1, 95, 96, 97, 98, -1, -1, 101, -1, -1,
6353 -1, -1, -1, 107, -1, -1, -1, -1, -1, -1,
6354 -1, -1, -1, -1, -1, -1, -1, 121, -1, -1,
6355 124, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6356 -1, -1, 136, 137, 138, 139, 140, 141, 142, 143,
6357 144, 145, 146, 147, -1, -1, -1, -1, -1, 153,
6358 154, 155, 156, 0, -1, 159, 160, 161, -1, -1,
6359 -1, 8, 9, 10, -1, -1, 13, 14, 15, -1,
6360 17, -1, -1, -1, -1, -1, -1, -1, 25, 26,
6361 27, 28, -1, -1, -1, -1, -1, -1, -1, -1,
6362 37, 38, -1, 40, 41, 42, 43, 44, -1, -1,
6363 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6364 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6365 -1, 68, 69, -1, -1, -1, -1, -1, -1, -1,
6366 -1, 78, 79, 80, 81, 82, 83, 84, 85, 86,
6367 87, 88, 89, 90, -1, -1, -1, -1, 95, 96,
6368 97, 98, -1, -1, 101, -1, -1, -1, -1, -1,
6369 107, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6370 -1, -1, -1, -1, 121, -1, -1, -1, -1, -1,
6371 -1, -1, -1, -1, -1, -1, -1, -1, -1, 136,
6372 -1, 138, 139, 140, 141, 142, 143, 144, 145, 146,
6373 147, -1, -1, -1, -1, 152, 153, 154, 155, 156,
6374 0, 158, 159, 160, 161, -1, -1, -1, 8, 9,
6375 10, -1, -1, 13, 14, 15, -1, 17, -1, -1,
6376 -1, -1, -1, -1, -1, 25, -1, 27, 28, -1,
6377 -1, -1, -1, -1, -1, -1, -1, 37, 38, -1,
6378 40, 41, 42, 43, 44, -1, -1, -1, -1, -1,
6379 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6380 -1, -1, -1, -1, -1, -1, -1, -1, 68, 69,
6381 -1, -1, -1, -1, -1, -1, -1, -1, 78, 79,
6382 80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
6383 90, -1, -1, -1, -1, 95, 96, 97, 98, -1,
6384 100, 101, -1, -1, -1, -1, -1, 107, -1, -1,
6385 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6386 -1, 121, -1, -1, -1, -1, -1, -1, -1, -1,
6387 -1, -1, -1, -1, -1, 135, 136, -1, 138, 139,
6388 140, 141, 142, 143, 144, 145, 146, 147, -1, -1,
6389 -1, -1, 152, 153, 154, 155, 156, 0, -1, 159,
6390 160, 161, -1, -1, -1, 8, 9, 10, -1, -1,
6391 13, 14, 15, -1, 17, -1, -1, -1, -1, -1,
6392 -1, -1, 25, -1, 27, 28, -1, -1, -1, -1,
6393 -1, -1, -1, -1, 37, 38, -1, 40, 41, 42,
6394 43, 44, -1, -1, -1, -1, -1, -1, -1, -1,
6395 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6396 -1, -1, -1, -1, -1, 68, 69, -1, -1, -1,
6397 -1, -1, -1, -1, -1, 78, 79, 80, 81, 82,
6398 83, 84, 85, 86, 87, 88, 89, 90, -1, -1,
6399 -1, -1, 95, 96, 97, 98, -1, -1, 101, -1,
6400 -1, -1, -1, -1, 107, -1, -1, -1, -1, -1,
6401 -1, -1, -1, -1, -1, -1, -1, -1, 121, -1,
6402 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6403 -1, -1, -1, 136, -1, 138, 139, 140, 141, 142,
6404 143, 144, 145, 146, 147, -1, -1, -1, -1, -1,
6405 153, 154, 155, 156, 0, 158, 159, 160, 161, -1,
6406 -1, -1, 8, 9, 10, 44, -1, -1, 14, 15,
6407 -1, 17, -1, -1, -1, -1, -1, -1, -1, 25,
6408 26, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6409 -1, 37, 38, -1, 40, 41, 42, 43, 44, 78,
6410 79, 80, 81, 82, 83, 84, 85, 86, 87, 88,
6411 89, 90, -1, -1, -1, -1, 95, 96, -1, -1,
6412 -1, -1, 68, 69, -1, -1, -1, -1, -1, -1,
6413 -1, -1, 78, 79, 80, 81, 82, 83, 84, 85,
6414 86, 87, 88, 89, 90, -1, -1, -1, -1, 95,
6415 96, 97, 98, -1, 100, 101, -1, 136, -1, 138,
6416 139, 140, 141, 142, 143, 144, 145, 146, 147, -1,
6417 -1, -1, -1, -1, -1, 121, -1, 156, -1, -1,
6418 -1, -1, -1, -1, -1, -1, -1, -1, -1, 135,
6419 136, -1, 138, 139, 140, 141, 142, 143, 144, 145,
6420 146, 147, -1, -1, -1, -1, 152, 153, 154, 155,
6421 156, 0, -1, 159, -1, 161, -1, -1, -1, 8,
6422 9, 10, -1, -1, -1, 14, 15, -1, 17, -1,
6423 -1, -1, -1, -1, -1, -1, 25, 26, -1, -1,
6424 -1, -1, -1, -1, -1, -1, -1, -1, 37, 38,
6425 -1, 40, 41, 42, 43, 44, -1, -1, -1, -1,
6426 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6427 -1, -1, -1, -1, -1, -1, -1, -1, -1, 68,
6428 69, -1, -1, -1, -1, -1, -1, -1, -1, 78,
6429 79, 80, 81, 82, 83, 84, 85, 86, 87, 88,
6430 89, 90, -1, -1, -1, -1, 95, 96, 97, 98,
6431 -1, 100, 101, -1, -1, -1, -1, -1, -1, -1,
6432 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6433 -1, -1, 121, -1, -1, -1, -1, -1, -1, -1,
6434 -1, -1, -1, -1, -1, -1, 135, 136, -1, 138,
6435 139, 140, 141, 142, 143, 144, 145, 146, 147, -1,
6436 -1, -1, -1, 152, 153, 154, 155, 156, 0, -1,
6437 159, -1, 161, -1, -1, -1, 8, 9, 10, -1,
6438 -1, -1, 14, 15, -1, 17, -1, -1, -1, -1,
6439 -1, -1, -1, 25, -1, -1, -1, -1, -1, -1,
6440 -1, -1, -1, -1, -1, 37, 38, -1, 40, 41,
6441 42, 43, 44, -1, -1, -1, -1, -1, -1, -1,
6442 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6443 -1, -1, -1, -1, -1, -1, 68, 69, -1, -1,
6444 -1, -1, -1, -1, -1, -1, 78, 79, 80, 81,
6445 82, 83, 84, 85, 86, 87, 88, 89, 90, -1,
6446 -1, -1, -1, 95, 96, 97, 98, -1, 100, 101,
6447 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6448 -1, -1, -1, -1, -1, -1, -1, -1, -1, 121,
6449 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6450 -1, -1, -1, 135, 136, -1, 138, 139, 140, 141,
6451 142, 143, 144, 145, 146, 147, -1, -1, -1, -1,
6452 152, 153, 154, 155, 156, 0, -1, 159, -1, 161,
6453 -1, -1, -1, 8, 9, 10, -1, -1, -1, 14,
6454 15, -1, 17, -1, -1, -1, -1, -1, -1, -1,
6455 25, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6456 -1, -1, 37, 38, -1, 40, 41, 42, 43, 44,
6457 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6458 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6459 -1, -1, -1, 68, 69, -1, -1, -1, -1, -1,
6460 -1, -1, -1, 78, 79, 80, 81, 82, 83, 84,
6461 85, 86, 87, 88, 89, 90, -1, -1, -1, -1,
6462 95, 96, 97, 98, -1, 100, 101, -1, -1, -1,
6463 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6464 -1, -1, -1, -1, -1, -1, 121, -1, -1, -1,
6465 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6466 135, 136, -1, 138, 139, 140, 141, 142, 143, 144,
6467 145, 146, 147, -1, -1, -1, -1, 152, 153, 154,
6468 155, 156, -1, -1, 159, 1, 161, 3, 4, 5,
6469 6, 7, 8, 9, 10, 11, 12, -1, -1, 15,
6470 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
6471 -1, -1, -1, -1, 30, 31, 32, 33, 34, 35,
6472 36, -1, -1, 39, -1, -1, -1, -1, -1, 45,
6473 46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
6474 56, 57, -1, 59, 60, 61, 62, 63, 64, 65,
6475 -1, -1, 68, -1, -1, -1, -1, -1, -1, -1,
6476 76, 77, -1, -1, -1, -1, -1, -1, -1, -1,
6477 -1, -1, -1, -1, -1, 91, 92, -1, -1, -1,
6478 -1, -1, -1, 99, -1, -1, 102, 103, -1, 105,
6479 106, -1, 108, -1, -1, 111, 112, 113, 114, 115,
6480 116, 117, 118, 119, -1, -1, -1, -1, -1, -1,
6481 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6482 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6483 -1, -1, 148, 149, 150, -1, -1, -1, 1, 155,
6484 3, 4, 5, 6, 7, 161, -1, 10, 11, 12,
6485 -1, 14, 15, 16, -1, 18, 19, 20, 21, 22,
6486 23, 24, -1, -1, -1, -1, -1, 30, 31, 32,
6487 33, 34, 35, 36, -1, -1, 39, -1, -1, -1,
6488 -1, -1, 45, 46, 47, 48, 49, 50, 51, 52,
6489 53, 54, 55, 56, 57, -1, 59, 60, 61, 62,
6490 63, 64, 65, -1, -1, 68, -1, -1, -1, -1,
6491 -1, -1, -1, 76, 77, -1, -1, -1, -1, -1,
6492 -1, -1, -1, -1, -1, -1, -1, -1, 91, 92,
6493 -1, -1, -1, -1, -1, -1, 99, -1, -1, 102,
6494 103, -1, 105, 106, -1, 108, -1, -1, 111, 112,
6495 113, 114, 115, 116, 117, 118, 119, -1, -1, -1,
6496 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6497 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6498 -1, -1, -1, -1, -1, 148, 149, 150, -1, -1,
6499 -1, 1, 155, 3, 4, 5, 6, 7, 161, -1,
6500 10, 11, 12, -1, -1, 15, 16, 17, 18, 19,
6501 20, 21, 22, 23, 24, -1, -1, -1, -1, -1,
6502 30, 31, 32, 33, 34, 35, 36, -1, -1, 39,
6503 -1, -1, -1, -1, -1, 45, 46, 47, 48, 49,
6504 50, 51, 52, 53, 54, 55, 56, 57, -1, 59,
6505 60, 61, 62, 63, 64, 65, -1, -1, 68, -1,
6506 -1, -1, -1, -1, -1, -1, 76, 77, -1, -1,
6507 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6508 -1, 91, 92, -1, -1, -1, -1, -1, -1, 99,
6509 -1, -1, 102, 103, -1, 105, 106, -1, 108, -1,
6510 -1, 111, 112, 113, 114, 115, 116, 117, 118, 119,
6511 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6512 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6513 -1, -1, -1, -1, -1, -1, -1, -1, 148, 149,
6514 150, -1, -1, -1, 1, 155, 3, 4, 5, 6,
6515 7, 161, -1, 10, 11, 12, -1, -1, 15, 16,
6516 -1, 18, 19, 20, 21, 22, 23, 24, 25, -1,
6517 -1, -1, -1, 30, 31, 32, 33, 34, 35, 36,
6518 -1, -1, 39, -1, -1, -1, -1, -1, 45, 46,
6519 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
6520 57, -1, 59, 60, 61, 62, 63, 64, 65, -1,
6521 -1, 68, -1, -1, -1, -1, -1, -1, -1, 76,
6522 77, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6523 -1, -1, -1, -1, 91, 92, -1, -1, -1, -1,
6524 -1, -1, 99, -1, -1, 102, 103, -1, 105, 106,
6525 -1, 108, -1, -1, 111, 112, 113, 114, 115, 116,
6526 117, 118, 119, -1, -1, -1, -1, -1, -1, -1,
6527 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6528 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6529 -1, 148, 149, 150, -1, -1, -1, 1, 155, 3,
6530 4, 5, 6, 7, 161, -1, 10, 11, 12, -1,
6531 -1, 15, 16, -1, 18, 19, 20, 21, 22, 23,
6532 24, -1, -1, -1, -1, -1, 30, 31, 32, 33,
6533 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
6534 -1, 45, 46, 47, 48, 49, 50, 51, 52, 53,
6535 54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
6536 64, 65, -1, -1, 68, -1, -1, -1, -1, -1,
6537 -1, -1, 76, 77, -1, -1, -1, -1, -1, -1,
6538 -1, -1, -1, -1, -1, -1, -1, 91, 92, -1,
6539 -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
6540 -1, 105, 106, -1, 108, -1, -1, 111, 112, 113,
6541 114, 115, 116, 117, 118, 119, -1, -1, -1, -1,
6542 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6543 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6544 -1, -1, -1, -1, 148, 149, 150, -1, -1, -1,
6545 1, 155, 3, 4, 5, 6, 7, 161, 9, 10,
6546 11, 12, -1, -1, -1, 16, -1, 18, 19, 20,
6547 21, 22, 23, 24, -1, -1, -1, -1, -1, 30,
6548 31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
6549 -1, -1, -1, -1, 45, 46, 47, 48, 49, 50,
6550 51, 52, 53, 54, 55, 56, 57, -1, 59, 60,
6551 61, 62, 63, 64, 65, -1, -1, 68, -1, -1,
6552 -1, -1, -1, -1, -1, 76, 77, -1, -1, -1,
6553 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6554 91, 92, -1, -1, -1, -1, -1, -1, 99, -1,
6555 -1, 102, 103, -1, 105, 106, -1, 108, -1, -1,
6556 111, 112, 113, 114, 115, 116, 117, 118, 119, -1,
6557 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6558 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6559 -1, -1, -1, -1, -1, -1, -1, 148, 149, 150,
6560 -1, -1, -1, 1, 155, 3, 4, 5, 6, 7,
6561 161, -1, 10, 11, 12, -1, -1, -1, 16, -1,
6562 18, 19, 20, 21, 22, 23, 24, -1, -1, -1,
6563 -1, -1, 30, 31, 32, 33, 34, 35, 36, -1,
6564 -1, 39, -1, -1, -1, -1, -1, 45, 46, 47,
6565 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
6566 -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
6567 68, -1, -1, -1, -1, -1, -1, -1, 76, 77,
6568 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6569 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
6570 -1, 99, -1, -1, 102, 103, -1, 105, 106, -1,
6571 108, -1, -1, 111, 112, 113, 114, 115, 116, 117,
6572 118, 119, -1, -1, -1, -1, -1, -1, -1, -1,
6573 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6574 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6575 148, 149, 150, -1, -1, -1, 1, 155, 3, 4,
6576 5, 6, 7, 161, -1, -1, 11, 12, -1, -1,
6577 -1, 16, -1, 18, 19, 20, 21, 22, 23, 24,
6578 -1, -1, -1, -1, -1, 30, 31, 32, 33, 34,
6579 35, 36, -1, -1, 39, -1, -1, -1, -1, -1,
6580 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
6581 55, 56, 57, -1, 59, 60, 61, 62, 63, 64,
6582 65, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6583 -1, 76, 77, -1, -1, -1, -1, -1, -1, -1,
6584 -1, -1, -1, -1, -1, -1, 91, 92, -1, -1,
6585 -1, -1, -1, -1, 99, -1, -1, 102, 103, -1,
6586 105, 106, -1, 108, -1, -1, 111, 112, 113, 114,
6587 115, 116, 117, 118, 119, -1, -1, -1, -1, -1,
6588 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6589 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6590 -1, -1, -1, 148, 149, 150, -1, -1, -1, -1,
6591 155, -1, -1, -1, 159, 1, 161, 3, 4, 5,
6592 6, 7, -1, -1, -1, 11, 12, -1, -1, -1,
6593 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
6594 -1, -1, -1, -1, 30, 31, 32, 33, 34, 35,
6595 36, -1, -1, 39, -1, -1, -1, -1, -1, 45,
6596 46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
6597 56, 57, -1, 59, 60, 61, 62, 63, 64, 65,
6598 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6599 76, 77, -1, -1, -1, -1, -1, -1, -1, -1,
6600 -1, -1, -1, -1, -1, 91, 92, -1, -1, -1,
6601 -1, -1, -1, 99, -1, -1, 102, 103, -1, 105,
6602 106, -1, 108, -1, -1, 111, 112, 113, 114, 115,
6603 116, 117, 118, 119, -1, -1, -1, -1, -1, -1,
6604 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6605 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6606 -1, -1, 148, 149, 150, -1, -1, -1, -1, 155,
6607 -1, -1, -1, 159, 1, 161, 3, 4, 5, 6,
6608 7, -1, -1, -1, 11, 12, -1, -1, -1, 16,
6609 -1, 18, 19, 20, 21, 22, 23, 24, -1, -1,
6610 -1, -1, -1, 30, 31, 32, 33, 34, 35, 36,
6611 -1, -1, 39, -1, -1, -1, -1, -1, 45, 46,
6612 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
6613 57, -1, 59, 60, 61, 62, 63, 64, 65, -1,
6614 -1, -1, -1, -1, -1, -1, -1, -1, -1, 76,
6615 77, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6616 -1, -1, -1, -1, 91, 92, -1, -1, -1, -1,
6617 -1, -1, 99, -1, -1, 102, 103, -1, 105, 106,
6618 -1, 108, -1, -1, 111, 112, 113, 114, 115, 116,
6619 117, 118, 119, -1, -1, -1, -1, -1, -1, -1,
6620 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6621 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6622 -1, 148, 149, 150, -1, -1, 153, 1, 155, 3,
6623 4, 5, 6, 7, 161, -1, -1, 11, 12, -1,
6624 -1, -1, 16, -1, 18, 19, 20, 21, 22, 23,
6625 24, -1, -1, -1, -1, -1, 30, 31, 32, 33,
6626 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
6627 -1, 45, 46, 47, 48, 49, 50, 51, 52, 53,
6628 54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
6629 64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
6630 -1, -1, 76, 77, -1, -1, -1, -1, -1, -1,
6631 -1, -1, -1, -1, -1, -1, -1, 91, 92, -1,
6632 -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
6633 -1, 105, 106, -1, 108, -1, -1, 111, 112, 113,
6634 114, 115, 116, 117, 118, 119, -1, -1, -1, -1,
6635 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6636 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6637 -1, -1, -1, -1, 148, 149, 150, -1, -1, 153,
6638 1, 155, 3, 4, 5, -1, 7, 161, -1, -1,
6639 11, 12, -1, -1, -1, 16, 17, 18, 19, 20,
6640 21, 22, 23, 24, -1, -1, -1, -1, -1, 30,
6641 31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
6642 -1, -1, -1, -1, -1, 46, -1, -1, 49, 50,
6643 51, 52, 53, 54, 55, 56, 57, -1, 59, 60,
6644 61, 62, 63, 64, 65, -1, -1, -1, -1, -1,
6645 -1, -1, -1, -1, -1, 76, 77, -1, -1, -1,
6646 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6647 91, 92, -1, -1, -1, -1, -1, -1, 99, -1,
6648 -1, 102, 103, -1, 105, 106, -1, -1, -1, -1,
6649 111, 112, 113, 114, 115, 116, 117, 118, 119, -1,
6650 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6651 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6652 -1, -1, -1, -1, -1, -1, -1, 148, 149, 150,
6653 -1, -1, -1, -1, 155, -1, -1, -1, -1, -1,
6654 161, 3, 4, 5, 6, 7, 8, 9, 10, 11,
6655 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
6656 22, 23, 24, 25, 26, -1, -1, -1, 30, 31,
6657 32, 33, 34, 35, 36, 37, 38, 39, -1, -1,
6658 -1, -1, -1, 45, 46, 47, 48, 49, 50, 51,
6659 52, 53, 54, 55, 56, 57, -1, -1, -1, -1,
6660 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6661 -1, -1, -1, -1, 76, 77, 78, 79, 80, 81,
6662 82, 83, 84, -1, -1, 87, 88, -1, -1, -1,
6663 -1, 93, 94, 95, 96, -1, -1, -1, -1, -1,
6664 -1, -1, -1, -1, -1, -1, 108, 109, -1, -1,
6665 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6666 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6667 -1, -1, -1, -1, -1, -1, 138, 139, 140, 141,
6668 142, 143, 144, 145, 146, 147, -1, 149, 150, -1,
6669 -1, -1, -1, -1, -1, 157, 158, 3, 4, 5,
6670 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
6671 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
6672 26, -1, -1, -1, 30, 31, 32, 33, 34, 35,
6673 36, 37, 38, 39, -1, -1, -1, -1, -1, 45,
6674 46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
6675 56, 57, -1, -1, -1, -1, -1, -1, -1, -1,
6676 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6677 76, 77, 78, 79, 80, 81, 82, 83, 84, -1,
6678 -1, 87, 88, -1, -1, -1, -1, 93, 94, 95,
6679 96, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6680 -1, -1, 108, 109, -1, -1, -1, -1, -1, -1,
6681 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6682 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6683 -1, -1, 138, 139, 140, 141, 142, 143, 144, 145,
6684 146, 147, -1, 149, 150, -1, -1, -1, -1, -1,
6685 -1, 157, 3, 4, 5, 6, 7, 8, 9, 10,
6686 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
6687 21, 22, 23, 24, 25, 26, -1, -1, -1, 30,
6688 31, 32, 33, 34, 35, 36, 37, 38, 39, -1,
6689 -1, -1, -1, -1, 45, 46, 47, 48, 49, 50,
6690 51, 52, 53, 54, -1, 56, -1, -1, -1, -1,
6691 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6692 -1, -1, -1, -1, -1, 76, 77, 78, 79, 80,
6693 81, 82, 83, 84, -1, -1, 87, 88, -1, -1,
6694 -1, -1, 93, 94, 95, 96, -1, -1, -1, -1,
6695 -1, -1, -1, -1, -1, -1, -1, 108, 109, -1,
6696 -1, 112, -1, -1, -1, -1, -1, -1, -1, -1,
6697 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6698 -1, -1, -1, -1, -1, -1, -1, 138, 139, 140,
6699 141, 142, 143, 144, 145, 146, 147, -1, 149, 150,
6700 -1, -1, -1, -1, -1, -1, 157, 3, 4, 5,
6701 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
6702 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
6703 26, -1, -1, -1, 30, 31, 32, 33, 34, 35,
6704 36, 37, 38, 39, -1, -1, -1, -1, -1, 45,
6705 46, 47, 48, 49, 50, 51, 52, 53, -1, -1,
6706 56, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6707 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6708 76, 77, 78, 79, 80, 81, 82, 83, 84, -1,
6709 -1, 87, 88, -1, -1, -1, -1, 93, 94, 95,
6710 96, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6711 -1, -1, 108, 109, -1, -1, 112, -1, -1, -1,
6712 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6713 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6714 -1, -1, 138, 139, 140, 141, 142, 143, 144, 145,
6715 146, 147, -1, 149, 150, -1, -1, -1, -1, -1,
6716 -1, 157, 3, 4, 5, 6, 7, 8, 9, 10,
6717 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
6718 21, 22, 23, 24, 25, 26, -1, -1, -1, 30,
6719 31, 32, 33, 34, 35, 36, 37, 38, 39, -1,
6720 -1, -1, -1, -1, 45, 46, 47, 48, 49, 50,
6721 51, 52, 53, -1, -1, 56, -1, -1, -1, -1,
6722 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6723 -1, -1, -1, -1, -1, 76, 77, 78, 79, 80,
6724 81, 82, 83, 84, -1, -1, 87, 88, -1, -1,
6725 -1, -1, 93, 94, 95, 96, -1, -1, -1, -1,
6726 -1, -1, -1, -1, -1, -1, -1, 108, 109, -1,
6727 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6728 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6729 -1, -1, -1, -1, -1, -1, -1, 138, 139, 140,
6730 141, 142, 143, 144, 145, 146, 147, -1, 149, 150,
6731 3, 4, 5, -1, 7, -1, 157, -1, 11, 12,
6732 -1, -1, -1, 16, -1, 18, 19, 20, 21, 22,
6733 23, 24, -1, -1, -1, -1, -1, 30, 31, 32,
6734 33, 34, 35, 36, -1, -1, 39, -1, -1, -1,
6735 -1, -1, -1, 46, -1, -1, 49, 50, 51, 52,
6736 53, 54, 55, 56, 57, -1, 59, 60, 61, 62,
6737 63, 64, 65, -1, -1, -1, -1, -1, -1, -1,
6738 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6739 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6740 -1, -1, -1, -1, -1, -1, 99, -1, -1, 102,
6741 103, -1, 105, 106, -1, -1, -1, -1, 111, 112,
6742 113, 114, 115, 116, 117, 118, 119, -1, -1, 3,
6743 4, 5, -1, 7, -1, -1, -1, 11, 12, -1,
6744 -1, -1, 16, -1, 18, 19, 20, 21, 22, 23,
6745 24, -1, -1, -1, -1, 148, 30, 31, 32, 33,
6746 34, 35, 36, 156, -1, 39, -1, -1, -1, -1,
6747 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53,
6748 54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
6749 64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
6750 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6751 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6752 -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
6753 -1, 105, 106, -1, -1, -1, -1, 111, 112, 113,
6754 114, 115, 116, 117, 118, 119, -1, -1, 3, 4,
6755 5, -1, 7, -1, -1, -1, 11, 12, -1, -1,
6756 -1, 16, -1, 18, 19, 20, 21, 22, 23, 24,
6757 -1, -1, -1, -1, 148, 30, 31, 32, 33, 34,
6758 35, 36, 156, -1, 39, -1, -1, -1, -1, -1,
6759 -1, 46, -1, -1, 49, 50, 51, 52, 53, 54,
6760 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
6761 65, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6762 -1, 76, 77, -1, -1, -1, -1, -1, -1, -1,
6763 -1, -1, -1, -1, -1, -1, 91, 92, -1, -1,
6764 -1, -1, -1, -1, 99, -1, -1, 102, 103, -1,
6765 105, 106, -1, 108, 109, 110, 111, 112, 113, 114,
6766 115, 116, 117, 118, 119, -1, -1, -1, -1, -1,
6767 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6768 -1, -1, -1, -1, -1, -1, -1, -1, 3, 4,
6769 5, -1, 7, 148, 149, 150, 11, 12, -1, -1,
6770 155, 16, -1, 18, 19, 20, 21, 22, 23, 24,
6771 -1, -1, -1, -1, -1, 30, 31, 32, 33, 34,
6772 35, 36, -1, -1, 39, -1, -1, -1, -1, -1,
6773 -1, 46, -1, -1, 49, 50, 51, 52, 53, 54,
6774 55, 56, 57, -1, 59, 60, 61, 62, 63, 64,
6775 65, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6776 -1, 76, 77, -1, -1, -1, -1, -1, -1, -1,
6777 -1, -1, -1, -1, -1, -1, 91, 92, -1, -1,
6778 -1, -1, -1, -1, 99, -1, -1, 102, 103, -1,
6779 105, 106, -1, -1, -1, -1, 111, 112, 113, 114,
6780 115, 116, 117, 118, 119, -1, -1, -1, -1, -1,
6781 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6782 -1, -1, -1, -1, -1, -1, 1, -1, 3, 4,
6783 5, 6, 7, 148, 149, 150, 11, 12, -1, -1,
6784 155, 16, -1, 18, 19, 20, 21, 22, 23, 24,
6785 -1, -1, -1, -1, -1, 30, 31, 32, 33, 34,
6786 35, 36, -1, -1, 39, -1, -1, -1, -1, -1,
6787 45, 46, -1, 48, 49, 50, 51, 52, 53, 54,
6788 55, 56, 57, -1, 59, 60, 61, 62, 63, 64,
6789 65, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6790 -1, 76, 77, -1, -1, -1, -1, -1, -1, -1,
6791 -1, -1, -1, -1, -1, -1, 91, 92, -1, -1,
6792 -1, -1, -1, -1, 99, -1, -1, 102, 103, -1,
6793 105, 106, -1, 108, -1, -1, 111, 112, 113, 114,
6794 115, 116, 117, 118, 119, -1, -1, 1, -1, 3,
6795 4, 5, -1, 7, -1, -1, -1, 11, 12, -1,
6796 -1, -1, 16, -1, 18, 19, 20, 21, 22, 23,
6797 24, -1, -1, 148, 149, 150, 30, 31, 32, 33,
6798 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
6799 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53,
6800 54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
6801 64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
6802 -1, -1, 76, 77, -1, -1, -1, -1, -1, -1,
6803 -1, -1, -1, -1, -1, -1, -1, 91, 92, -1,
6804 -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
6805 -1, 105, 106, -1, -1, -1, -1, 111, 112, 113,
6806 114, 115, 116, 117, 118, 119, -1, -1, -1, -1,
6807 3, 4, 5, -1, 7, -1, -1, -1, 11, 12,
6808 -1, -1, -1, 16, -1, 18, 19, 20, 21, 22,
6809 23, 24, -1, -1, 148, 149, 150, 30, 31, 32,
6810 33, 34, 35, 36, -1, -1, 39, -1, -1, -1,
6811 -1, -1, -1, 46, -1, -1, 49, 50, 51, 52,
6812 53, 54, 55, 56, 57, 58, 59, 60, 61, 62,
6813 63, 64, 65, -1, -1, -1, -1, -1, -1, -1,
6814 -1, -1, -1, 76, 77, -1, -1, -1, -1, -1,
6815 -1, -1, -1, -1, -1, -1, -1, -1, 91, 92,
6816 -1, -1, -1, -1, -1, -1, 99, -1, -1, 102,
6817 103, -1, 105, 106, -1, 108, 109, 110, 111, 112,
6818 113, 114, 115, 116, 117, 118, 119, -1, -1, -1,
6819 -1, 3, 4, 5, -1, 7, -1, -1, -1, 11,
6820 12, -1, -1, -1, 16, -1, 18, 19, 20, 21,
6821 22, 23, 24, -1, -1, 148, 149, 150, 30, 31,
6822 32, 33, 34, 35, 36, -1, -1, 39, -1, -1,
6823 -1, -1, -1, -1, 46, -1, -1, 49, 50, 51,
6824 52, 53, 54, 55, 56, 57, 58, 59, 60, 61,
6825 62, 63, 64, 65, -1, -1, -1, -1, -1, -1,
6826 -1, -1, -1, -1, 76, 77, -1, -1, -1, -1,
6827 -1, -1, -1, -1, -1, -1, -1, -1, -1, 91,
6828 92, -1, -1, -1, -1, -1, -1, 99, -1, -1,
6829 102, 103, -1, 105, 106, -1, 108, 109, 110, 111,
6830 112, 113, 114, 115, 116, 117, 118, 119, -1, -1,
6831 -1, -1, 3, 4, 5, -1, 7, -1, -1, -1,
6832 11, 12, -1, -1, -1, 16, -1, 18, 19, 20,
6833 21, 22, 23, 24, -1, -1, 148, 149, 150, 30,
6834 31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
6835 -1, -1, -1, -1, -1, 46, -1, -1, 49, 50,
6836 51, 52, 53, 54, 55, 56, 57, 58, 59, 60,
6837 61, 62, 63, 64, 65, -1, -1, -1, -1, -1,
6838 -1, -1, -1, -1, -1, 76, 77, -1, -1, -1,
6839 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6840 91, 92, -1, -1, -1, -1, -1, -1, 99, -1,
6841 -1, 102, 103, -1, 105, 106, -1, 108, 109, 110,
6842 111, 112, 113, 114, 115, 116, 117, 118, 119, -1,
6843 -1, -1, -1, 3, 4, 5, -1, 7, -1, -1,
6844 -1, 11, 12, -1, -1, -1, 16, -1, 18, 19,
6845 20, 21, 22, 23, 24, -1, -1, 148, 149, 150,
6846 30, 31, 32, 33, 34, 35, 36, -1, -1, 39,
6847 -1, -1, -1, -1, -1, -1, 46, -1, -1, 49,
6848 50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
6849 60, 61, 62, 63, 64, 65, -1, -1, -1, -1,
6850 -1, -1, -1, -1, -1, -1, 76, 77, -1, -1,
6851 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6852 -1, 91, 92, -1, -1, -1, -1, -1, -1, 99,
6853 -1, -1, 102, 103, -1, 105, 106, -1, 108, 109,
6854 110, 111, 112, 113, 114, 115, 116, 117, 118, 119,
6855 -1, -1, -1, -1, 3, 4, 5, -1, 7, -1,
6856 -1, -1, 11, 12, -1, -1, -1, 16, -1, 18,
6857 19, 20, 21, 22, 23, 24, -1, -1, 148, 149,
6858 150, 30, 31, 32, 33, 34, 35, 36, -1, -1,
6859 39, -1, -1, -1, -1, -1, -1, 46, -1, -1,
6860 49, 50, 51, 52, 53, 54, 55, 56, 57, 58,
6861 59, 60, 61, 62, 63, 64, 65, -1, -1, -1,
6862 -1, -1, -1, -1, -1, -1, -1, 76, 77, -1,
6863 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6864 -1, -1, 91, 92, -1, -1, -1, -1, -1, -1,
6865 99, -1, -1, 102, 103, -1, 105, 106, -1, 108,
6866 109, -1, 111, 112, 113, 114, 115, 116, 117, 118,
6867 119, -1, -1, -1, -1, 3, 4, 5, -1, 7,
6868 -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
6869 18, 19, 20, 21, 22, 23, 24, -1, -1, 148,
6870 149, 150, 30, 31, 32, 33, 34, 35, 36, -1,
6871 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
6872 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
6873 58, 59, 60, 61, 62, 63, 64, 65, -1, -1,
6874 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
6875 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6876 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
6877 -1, 99, -1, -1, 102, 103, -1, 105, 106, -1,
6878 -1, 109, 110, 111, 112, 113, 114, 115, 116, 117,
6879 118, 119, -1, -1, -1, -1, 3, 4, 5, -1,
6880 7, -1, -1, -1, 11, 12, -1, -1, -1, 16,
6881 -1, 18, 19, 20, 21, 22, 23, 24, -1, -1,
6882 148, 149, 150, 30, 31, 32, 33, 34, 35, 36,
6883 -1, -1, 39, -1, -1, -1, -1, -1, -1, 46,
6884 -1, -1, 49, 50, 51, 52, 53, 54, 55, 56,
6885 57, 58, 59, 60, 61, 62, 63, 64, 65, -1,
6886 -1, -1, -1, -1, -1, -1, -1, -1, -1, 76,
6887 77, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6888 -1, -1, -1, -1, 91, 92, -1, -1, -1, -1,
6889 -1, -1, 99, -1, -1, 102, 103, -1, 105, 106,
6890 -1, -1, 109, -1, 111, 112, 113, 114, 115, 116,
6891 117, 118, 119, -1, -1, -1, -1, 3, 4, 5,
6892 -1, 7, -1, -1, -1, 11, 12, -1, -1, -1,
6893 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
6894 -1, 148, 149, 150, 30, 31, 32, 33, 34, 35,
6895 36, -1, -1, 39, -1, -1, -1, -1, -1, -1,
6896 46, -1, -1, 49, 50, 51, 52, 53, 54, 55,
6897 56, 57, -1, 59, 60, 61, 62, 63, 64, 65,
6898 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6899 76, 77, -1, -1, -1, -1, -1, -1, -1, -1,
6900 -1, -1, -1, -1, -1, 91, 92, -1, -1, -1,
6901 -1, -1, -1, 99, -1, -1, 102, 103, -1, 105,
6902 106, -1, 108, -1, -1, 111, 112, 113, 114, 115,
6903 116, 117, 118, 119, -1, -1, -1, -1, 3, 4,
6904 5, -1, 7, -1, -1, -1, 11, 12, -1, -1,
6905 -1, 16, -1, 18, 19, 20, 21, 22, 23, 24,
6906 -1, -1, 148, 149, 150, 30, 31, 32, 33, 34,
6907 35, 36, -1, -1, 39, -1, -1, -1, -1, -1,
6908 -1, 46, -1, -1, 49, 50, 51, 52, 53, 54,
6909 55, 56, 57, -1, 59, 60, 61, 62, 63, 64,
6910 65, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6911 -1, 76, 77, -1, -1, -1, -1, -1, -1, -1,
6912 -1, -1, -1, -1, -1, -1, 91, 92, -1, -1,
6913 -1, -1, -1, -1, 99, -1, -1, 102, 103, -1,
6914 105, 106, -1, 108, -1, -1, 111, 112, 113, 114,
6915 115, 116, 117, 118, 119, -1, -1, -1, -1, 3,
6916 4, 5, -1, 7, -1, -1, -1, 11, 12, -1,
6917 -1, -1, 16, -1, 18, 19, 20, 21, 22, 23,
6918 24, -1, -1, 148, 149, 150, 30, 31, 32, 33,
6919 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
6920 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53,
6921 54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
6922 64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
6923 -1, -1, 76, 77, -1, -1, -1, -1, -1, -1,
6924 -1, -1, -1, -1, -1, -1, -1, 91, 92, -1,
6925 -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
6926 -1, 105, 106, -1, 108, -1, -1, 111, 112, 113,
6927 114, 115, 116, 117, 118, 119, -1, -1, -1, -1,
6928 3, 4, 5, -1, 7, -1, -1, -1, 11, 12,
6929 -1, -1, -1, 16, -1, 18, 19, 20, 21, 22,
6930 23, 24, -1, -1, 148, 149, 150, 30, 31, 32,
6931 33, 34, 35, 36, -1, -1, 39, -1, -1, -1,
6932 -1, -1, -1, 46, -1, -1, 49, 50, 51, 52,
6933 53, 54, 55, 56, 57, -1, 59, 60, 61, 62,
6934 63, 64, 65, -1, -1, -1, -1, -1, -1, -1,
6935 -1, -1, -1, 76, 77, -1, -1, -1, -1, -1,
6936 -1, -1, -1, -1, -1, -1, -1, -1, 91, 92,
6937 -1, -1, -1, -1, -1, -1, 99, -1, -1, 102,
6938 103, -1, 105, 106, -1, 108, -1, -1, 111, 112,
6939 113, 114, 115, 116, 117, 118, 119, -1, -1, -1,
6940 -1, 3, 4, 5, -1, 7, -1, -1, -1, 11,
6941 12, -1, -1, -1, 16, -1, 18, 19, 20, 21,
6942 22, 23, 24, -1, -1, 148, 149, 150, 30, 31,
6943 32, 33, 34, 35, 36, -1, -1, 39, -1, -1,
6944 -1, -1, -1, -1, 46, -1, -1, 49, 50, 51,
6945 52, 53, 54, 55, 56, 57, -1, 59, 60, 61,
6946 62, 63, 64, 65, -1, -1, -1, -1, -1, -1,
6947 -1, -1, -1, -1, 76, 77, -1, -1, -1, -1,
6948 -1, -1, -1, -1, -1, -1, -1, -1, -1, 91,
6949 92, -1, -1, -1, -1, -1, -1, 99, -1, -1,
6950 102, 103, -1, 105, 106, -1, 108, -1, -1, 111,
6951 112, 113, 114, 115, 116, 117, 118, 119, -1, -1,
6952 -1, -1, 3, 4, 5, -1, 7, -1, -1, -1,
6953 11, 12, -1, -1, -1, 16, -1, 18, 19, 20,
6954 21, 22, 23, 24, -1, -1, 148, 149, 150, 30,
6955 31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
6956 -1, -1, -1, -1, -1, 46, -1, -1, 49, 50,
6957 51, 52, 53, 54, 55, 56, 57, -1, 59, 60,
6958 61, 62, 63, 64, 65, -1, -1, -1, -1, -1,
6959 -1, -1, -1, -1, -1, 76, 77, -1, -1, -1,
6960 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6961 91, 92, -1, -1, -1, -1, -1, -1, 99, -1,
6962 -1, 102, 103, -1, 105, 106, -1, 108, -1, -1,
6963 111, 112, 113, 114, 115, 116, 117, 118, 119, -1,
6964 -1, -1, -1, 3, 4, 5, -1, 7, -1, -1,
6965 -1, 11, 12, -1, -1, -1, 16, -1, 18, 19,
6966 20, 21, 22, 23, 24, -1, -1, 148, 149, 150,
6967 30, 31, 32, 33, 34, 35, 36, -1, -1, 39,
6968 -1, -1, -1, -1, -1, -1, 46, -1, -1, 49,
6969 50, 51, 52, 53, 54, 55, 56, 57, -1, 59,
6970 60, 61, 62, 63, 64, 65, -1, -1, -1, -1,
6971 -1, -1, -1, -1, -1, -1, 76, 77, -1, -1,
6972 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6973 -1, 91, 92, -1, -1, -1, -1, -1, -1, 99,
6974 -1, -1, 102, 103, -1, 105, 106, -1, -1, -1,
6975 -1, 111, 112, 113, 114, 115, 116, 117, 118, 119,
6976 -1, -1, -1, -1, 3, 4, 5, -1, 7, -1,
6977 -1, -1, 11, 12, -1, -1, -1, 16, -1, 18,
6978 19, 20, 21, 22, 23, 24, -1, -1, 148, 149,
6979 150, 30, 31, 32, 33, 34, 35, 36, -1, -1,
6980 39, -1, -1, -1, -1, -1, -1, 46, -1, -1,
6981 49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
6982 59, 60, 61, 62, 63, 64, 65, -1, -1, -1,
6983 -1, -1, -1, -1, -1, -1, -1, 76, 77, -1,
6984 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6985 -1, -1, 91, 92, -1, -1, -1, -1, -1, -1,
6986 99, -1, -1, 102, 103, -1, 105, 106, -1, -1,
6987 -1, -1, 111, 112, 113, 114, 115, 116, 117, 118,
6988 119, -1, -1, -1, -1, 3, 4, 5, -1, 7,
6989 -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
6990 18, 19, 20, 21, 22, 23, 24, -1, -1, 148,
6991 149, 150, 30, 31, 32, 33, 34, 35, 36, -1,
6992 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
6993 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
6994 -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
6995 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
6996 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
6997 -1, -1, -1, 91, 92, -1, -1, -1, -1, -1,
6998 -1, 99, -1, -1, 102, 103, -1, 105, 106, -1,
6999 -1, -1, -1, 111, 112, 113, 114, 115, 116, 117,
7000 118, 119, -1, -1, -1, -1, 3, 4, 5, -1,
7001 7, -1, -1, -1, 11, 12, -1, -1, -1, 16,
7002 -1, 18, 19, 20, 21, 22, 23, 24, -1, -1,
7003 148, 149, 150, 30, 31, 32, 33, 34, 35, 36,
7004 -1, -1, 39, -1, -1, -1, -1, -1, -1, 46,
7005 -1, -1, 49, 50, 51, 52, 53, 54, 55, 56,
7006 57, -1, 59, 60, 61, 62, 63, 64, 65, -1,
7007 -1, -1, -1, -1, -1, -1, -1, -1, -1, 76,
7008 77, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7009 -1, -1, -1, -1, 91, 92, -1, -1, -1, -1,
7010 -1, -1, 99, -1, -1, 102, 103, -1, 105, 106,
7011 -1, -1, -1, -1, 111, 112, 113, 114, 115, 116,
7012 117, 118, 119, -1, -1, -1, -1, 3, 4, 5,
7013 -1, 7, -1, -1, -1, 11, 12, -1, -1, -1,
7014 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
7015 -1, 148, 149, 150, 30, 31, 32, 33, 34, 35,
7016 36, -1, -1, 39, -1, -1, -1, -1, -1, -1,
7017 46, -1, -1, 49, 50, 51, 52, 53, 54, 55,
7018 56, 57, -1, 59, 60, 61, 62, 63, 64, 65,
7019 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7020 76, 77, -1, -1, -1, -1, -1, -1, -1, -1,
7021 -1, -1, -1, -1, -1, 91, 92, -1, -1, -1,
7022 -1, -1, -1, 99, -1, -1, 102, 103, -1, 105,
7023 106, -1, -1, -1, -1, 111, 112, 113, 114, 115,
7024 116, 117, 118, 119, -1, -1, -1, -1, 3, 4,
7025 5, -1, 7, -1, -1, -1, 11, 12, -1, -1,
7026 -1, 16, -1, 18, 19, 20, 21, 22, 23, 24,
7027 -1, -1, 148, 149, 150, 30, 31, 32, 33, 34,
7028 35, 36, -1, -1, 39, -1, -1, -1, -1, -1,
7029 -1, 46, -1, -1, 49, 50, 51, 52, 53, 54,
7030 55, 56, 57, -1, 59, 60, 61, 62, 63, 64,
7031 65, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7032 -1, 76, 77, -1, -1, -1, -1, -1, -1, -1,
7033 -1, -1, -1, -1, -1, -1, 91, 92, -1, -1,
7034 -1, -1, -1, -1, 99, -1, -1, 102, 103, -1,
7035 105, 106, -1, -1, -1, -1, 111, 112, 113, 114,
7036 115, 116, 117, 118, 119, -1, -1, -1, -1, 3,
7037 4, 5, -1, 7, -1, -1, -1, 11, 12, -1,
7038 -1, -1, 16, -1, 18, 19, 20, 21, 22, 23,
7039 24, -1, -1, 148, 149, 150, 30, 31, 32, 33,
7040 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
7041 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53,
7042 54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
7043 64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
7044 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7045 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7046 -1, -1, -1, -1, -1, 99, -1, -1, 102, 103,
7047 -1, 105, 106, -1, 108, -1, -1, 111, 112, 113,
7048 114, 115, 116, 117, 118, 119, -1, -1, 3, 4,
7049 5, -1, 7, -1, -1, -1, 11, 12, -1, -1,
7050 -1, 16, -1, 18, 19, 20, 21, 22, 23, 24,
7051 -1, -1, -1, -1, 148, 30, 31, 32, 33, 34,
7052 35, 36, -1, -1, 39, -1, -1, -1, -1, -1,
7053 -1, 46, -1, -1, 49, 50, 51, 52, 53, 54,
7054 55, 56, 57, -1, 59, 60, 61, 62, 63, 64,
7055 65, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7056 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7057 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7058 -1, -1, -1, -1, 99, -1, -1, 102, 103, -1,
7059 105, 106, -1, 108, -1, -1, 111, 112, 113, 114,
7060 115, 116, 117, 118, 119, -1, -1, 3, 4, 5,
7061 -1, 7, -1, -1, -1, 11, 12, -1, -1, -1,
7062 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
7063 -1, -1, -1, 148, 30, 31, 32, 33, 34, 35,
7064 36, -1, -1, 39, -1, -1, -1, -1, -1, -1,
7065 46, -1, -1, 49, 50, 51, 52, 53, 54, 55,
7066 56, 57, -1, 59, 60, 61, 62, 63, 64, 65,
7067 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7068 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7069 -1, -1, -1, -1, -1, -1, -1, -1, -1, 95,
7070 -1, -1, -1, 99, -1, -1, 102, 103, -1, 105,
7071 106, -1, -1, -1, -1, 111, 112, 113, 114, 115,
7072 116, 117, 118, 119, -1, -1, 3, 4, 5, -1,
7073 7, -1, -1, -1, 11, 12, -1, -1, -1, 16,
7074 -1, 18, 19, 20, 21, 22, 23, 24, -1, -1,
7075 -1, -1, 148, 30, 31, 32, 33, 34, 35, 36,
7076 -1, -1, 39, -1, -1, -1, -1, -1, -1, 46,
7077 -1, -1, 49, 50, 51, 52, 53, 54, 55, 56,
7078 57, -1, 59, 60, 61, 62, 63, 64, 65, -1,
7079 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7080 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7081 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7082 -1, -1, 99, -1, -1, 102, 103, -1, 105, 106,
7083 -1, -1, -1, -1, 111, 112, 113, 114, 115, 116,
7084 117, 118, 119, -1, -1, 3, 4, 5, -1, 7,
7085 -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
7086 18, 19, 20, 21, 22, 23, 24, -1, -1, -1,
7087 -1, 148, 30, 31, 32, 33, 34, 35, 36, -1,
7088 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
7089 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
7090 -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
7091 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7092 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7093 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7094 -1, 99, -1, -1, 102, 103, -1, 105, 106, -1,
7095 -1, -1, -1, 111, 112, 113, 114, 115, 116, 117,
7096 118, 119, -1, -1, 3, 4, 5, -1, 7, -1,
7097 -1, -1, 11, 12, -1, -1, -1, 16, -1, 18,
7098 19, 20, 21, 22, 23, 24, -1, -1, -1, -1,
7099 148, 30, 31, 32, 33, 34, 35, 36, -1, -1,
7100 39, -1, -1, -1, -1, -1, -1, 46, -1, -1,
7101 49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
7102 59, 60, 61, 62, 63, 64, 65, -1, -1, -1,
7103 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7104 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7105 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7106 99, -1, -1, 102, 103, -1, 105, 106, -1, -1,
7107 -1, -1, 111, 112, 113, 114, 115, 116, 117, 118,
7108 119, -1, -1, 3, 4, 5, -1, 7, -1, -1,
7109 -1, 11, 12, -1, -1, -1, 16, -1, 18, 19,
7110 20, 21, 22, 23, 24, -1, -1, -1, -1, 148,
7111 30, 31, 32, 33, 34, 35, 36, -1, -1, 39,
7112 -1, -1, -1, -1, -1, -1, 46, -1, -1, 49,
7113 50, 51, 52, 53, 54, 55, 56, 57, -1, 59,
7114 60, 61, 62, 63, 64, 65, -1, -1, -1, -1,
7115 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7116 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7117 -1, -1, -1, -1, -1, -1, -1, -1, -1, 99,
7118 -1, -1, 102, 103, -1, 105, 106, 33, 34, 35,
7119 36, 111, 112, 113, 114, 115, 116, 117, 118, 119,
7120 -1, -1, -1, 49, 50, 51, 52, -1, -1, -1,
7121 56, -1, 58, 59, 60, 61, 62, 63, -1, -1,
7122 -1, -1, -1, -1, -1, -1, -1, -1, 148, -1,
7123 -1, -1, 78, -1, -1, -1, -1, -1, -1, -1,
7124 -1, -1, -1, -1, -1, 91, 92, -1, -1, -1,
7125 -1, -1, -1, 99, -1, -1, 102, -1, -1, 105,
7126 106, -1, 108, 109, -1, 111, 112, 113, 114, 115,
7127 116, 117, 118, 119, -1, -1, -1, -1, -1, -1,
7128 33, 34, 35, 36, -1, -1, -1, 52, 53, -1,
7129 -1, 56, -1, -1, -1, 141, 49, 50, 51, 52,
7130 -1, -1, 148, 56, -1, -1, 59, 60, 61, 62,
7131 63, 76, 77, 78, 79, 80, 81, 82, 83, 84,
7132 -1, -1, 87, 88, -1, -1, -1, -1, 93, 94,
7133 95, 96, -1, -1, -1, -1, -1, -1, 91, 92,
7134 -1, -1, -1, 108, 109, -1, 99, -1, -1, 102,
7135 -1, -1, 105, 106, -1, -1, -1, -1, 111, 112,
7136 113, 114, 115, 116, 117, 118, 119, -1, -1, -1,
7137 -1, -1, -1, 138, 139, 140, 141, 142, 143, 144,
7138 145, 146, 147, -1, 149, 150, 52, 53, 141, -1,
7139 56, -1, 157, 158, -1, 148, -1, -1, -1, -1,
7140 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7141 76, 77, 78, 79, 80, 81, 82, 83, 84, -1,
7142 -1, 87, 88, -1, -1, -1, -1, 93, 94, 95,
7143 96, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7144 -1, -1, 108, 109, -1, -1, -1, -1, -1, -1,
7145 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7146 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7147 -1, -1, 138, 139, 140, 141, 142, 143, 144, 145,
7148 146, 147, -1, 149, 150, 52, 53, -1, -1, 56,
7149 -1, 157, 158, -1, -1, -1, -1, -1, -1, -1,
7150 -1, -1, -1, -1, -1, -1, -1, -1, -1, 76,
7151 77, 78, 79, 80, 81, 82, 83, 84, -1, -1,
7152 87, 88, -1, -1, -1, -1, 93, 94, 95, 96,
7153 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7154 -1, 108, 109, -1, -1, -1, -1, -1, -1, -1,
7155 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7156 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7157 -1, 138, 139, 140, 141, 142, 143, 144, 145, 146,
7158 147, -1, 149, 150, 52, 53, -1, -1, 56, -1,
7159 157, 158, -1, -1, -1, -1, -1, -1, -1, -1,
7160 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
7161 78, 79, 80, 81, 82, 83, 84, -1, -1, 87,
7162 88, -1, -1, -1, -1, 93, 94, 95, 96, -1,
7163 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7164 108, 109, -1, -1, -1, -1, -1, -1, -1, -1,
7165 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7166 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7167 138, 139, 140, 141, 142, 143, 144, 145, 146, 147,
7168 -1, 149, 150, 52, 53, -1, -1, 56, -1, 157,
7169 158, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7170 -1, -1, -1, -1, -1, -1, -1, 76, 77, 78,
7171 79, 80, 81, 82, 83, 84, -1, -1, 87, 88,
7172 -1, -1, -1, -1, 93, 94, 95, 96, -1, -1,
7173 -1, -1, -1, -1, -1, -1, -1, -1, -1, 108,
7174 109, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7175 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7176 -1, -1, -1, -1, -1, -1, -1, -1, -1, 138,
7177 139, 140, 141, 142, 143, 144, 145, 146, 147, -1,
7178 149, 150, 52, 53, -1, -1, 56, -1, 157, 158,
7179 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7180 -1, -1, -1, -1, -1, -1, 76, 77, 78, 79,
7181 80, 81, 82, 83, 84, -1, -1, 87, 88, -1,
7182 -1, -1, -1, 93, 94, 95, 96, -1, -1, -1,
7183 -1, -1, -1, -1, -1, -1, -1, -1, 108, 109,
7184 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7185 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7186 -1, -1, -1, -1, -1, -1, -1, -1, 138, 139,
7187 140, 141, 142, 143, 144, 145, 146, 147, -1, 149,
7188 150, 52, 53, -1, -1, 56, -1, 157, 158, -1,
7189 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7190 -1, -1, -1, -1, -1, 76, 77, 78, 79, 80,
7191 81, 82, 83, 84, -1, -1, 87, 88, -1, -1,
7192 -1, -1, 93, 94, 95, 96, -1, -1, -1, -1,
7193 -1, -1, -1, -1, -1, -1, -1, 108, 109, -1,
7194 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7195 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7196 -1, -1, -1, -1, -1, -1, -1, 138, 139, 140,
7197 141, 142, 143, 144, 145, 146, 147, -1, 149, 150,
7198 52, 53, -1, -1, 56, -1, 157, 158, -1, -1,
7199 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7200 -1, -1, -1, -1, 76, 77, 78, 79, 80, 81,
7201 82, 83, 84, -1, -1, 87, 88, -1, -1, -1,
7202 -1, 93, 94, 95, 96, -1, -1, -1, -1, -1,
7203 -1, -1, -1, -1, -1, -1, 108, 109, -1, -1,
7204 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7205 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7206 -1, -1, -1, -1, -1, -1, 138, 139, 140, 141,
7207 142, 143, 144, 145, 146, 147, -1, 149, 150, 52,
7208 53, -1, -1, 56, -1, 157, 158, -1, -1, -1,
7209 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7210 -1, -1, -1, 76, 77, 78, 79, 80, 81, 82,
7211 83, 84, -1, -1, 87, 88, -1, -1, -1, -1,
7212 93, 94, 95, 96, -1, -1, -1, -1, -1, -1,
7213 -1, -1, -1, -1, -1, 108, 109, -1, -1, -1,
7214 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7215 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7216 -1, -1, -1, -1, -1, 138, 139, 140, 141, 142,
7217 143, 144, 145, 146, 147, -1, 149, 150, 52, 53,
7218 -1, -1, 56, -1, 157, 158, -1, -1, -1, -1,
7219 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7220 -1, -1, 76, 77, 78, 79, 80, 81, 82, 83,
7221 84, -1, -1, 87, 88, -1, -1, -1, -1, 93,
7222 94, 95, 96, -1, -1, -1, -1, -1, -1, -1,
7223 -1, -1, -1, -1, 108, 109, -1, -1, -1, -1,
7224 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7225 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7226 -1, -1, -1, -1, 138, 139, 140, 141, 142, 143,
7227 144, 145, 146, 147, -1, 149, 150, 52, 53, -1,
7228 -1, 56, -1, 157, 158, -1, -1, -1, -1, -1,
7229 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7230 -1, 76, 77, 78, 79, 80, 81, 82, 83, 84,
7231 -1, -1, 87, 88, -1, -1, -1, -1, 93, 94,
7232 95, 96, -1, -1, -1, -1, -1, -1, -1, -1,
7233 -1, -1, -1, 108, 109, -1, -1, -1, -1, -1,
7234 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7235 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7236 -1, -1, -1, 138, 139, 140, 141, 142, 143, 144,
7237 145, 146, 147, -1, 149, 150, 52, 53, -1, -1,
7238 56, -1, 157, 158, -1, -1, -1, -1, -1, -1,
7239 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7240 76, 77, 78, 79, 80, 81, 82, 83, 84, -1,
7241 -1, 87, 88, -1, -1, -1, -1, 93, 94, 95,
7242 96, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7243 -1, -1, 108, 109, -1, -1, -1, -1, -1, -1,
7244 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7245 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7246 -1, -1, 138, 139, 140, 141, 142, 143, 144, 145,
7247 146, 147, -1, 149, 150, 52, 53, -1, -1, 56,
7248 -1, 157, 158, -1, -1, -1, -1, -1, -1, -1,
7249 -1, -1, -1, -1, -1, -1, -1, -1, -1, 76,
7250 77, 78, 79, 80, 81, 82, 83, 84, -1, -1,
7251 87, 88, -1, -1, -1, -1, 93, 94, 95, 96,
7252 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7253 -1, 108, 109, -1, -1, -1, -1, -1, -1, -1,
7254 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7255 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7256 -1, 138, 139, 140, 141, 142, 143, 144, 145, 146,
7257 147, -1, 149, 150, 52, 53, -1, -1, 56, -1,
7258 157, 158, -1, -1, -1, -1, -1, -1, -1, -1,
7259 -1, -1, -1, -1, -1, -1, -1, -1, 76, 77,
7260 78, 79, 80, 81, 82, 83, 84, -1, -1, 87,
7261 88, -1, -1, -1, -1, 93, 94, 95, 96, -1,
7262 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7263 108, 109, -1, -1, -1, -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 138, 139, 140, 141, 142, 143, 144, 145, 146, 147,
7267 -1, 149, 150, 52, 53, -1, -1, 56, -1, 157,
7268 158, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7269 -1, -1, -1, -1, -1, -1, -1, 76, 77, 78,
7270 79, 80, 81, 82, 83, 84, -1, -1, 87, 88,
7271 -1, -1, -1, -1, 93, 94, 95, 96, -1, -1,
7272 -1, -1, -1, -1, -1, -1, -1, -1, -1, 108,
7273 109, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7274 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7275 -1, -1, -1, -1, -1, -1, -1, -1, -1, 138,
7276 139, 140, 141, 142, 143, 144, 145, 146, 147, -1,
7277 149, 150, 52, 53, -1, -1, 56, -1, 157, 158,
7278 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7279 -1, -1, -1, -1, -1, -1, 76, 77, 78, 79,
7280 80, 81, 82, 83, 84, -1, -1, 87, 88, -1,
7281 -1, -1, -1, 93, 94, 95, 96, -1, -1, -1,
7282 -1, -1, -1, -1, -1, -1, -1, -1, 108, 109,
7283 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7284 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7285 -1, -1, -1, -1, -1, -1, -1, -1, 138, 139,
7286 140, 141, 142, 143, 144, 145, 146, 147, -1, 149,
7287 150, 52, 53, -1, -1, 56, -1, 157, 158, -1,
7288 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7289 -1, -1, -1, -1, -1, 76, 77, 78, 79, 80,
7290 81, 82, 83, 84, -1, -1, 87, 88, -1, -1,
7291 -1, -1, 93, 94, 95, 96, -1, -1, -1, -1,
7292 -1, -1, -1, -1, -1, -1, -1, 108, 109, -1,
7293 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7294 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
7295 -1, -1, -1, -1, -1, -1, -1, 138, 139, 140,
7296 141, 142, 143, 144, 145, 146, 147, -1, 149, 150,
7297 -1, -1, -1, -1, -1, -1, 157
7298};
7299
7300/* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of
7301 state STATE-NUM. */
7302static const yytype_int16 yystos[] =
7303{
7304 0, 164, 165, 1, 3, 4, 5, 6, 7, 11,
7305 12, 16, 18, 19, 20, 21, 22, 23, 24, 30,
7306 31, 32, 33, 34, 35, 36, 39, 45, 46, 47,
7307 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
7308 59, 60, 61, 62, 63, 64, 65, 76, 77, 91,
7309 92, 99, 102, 103, 105, 106, 108, 111, 112, 113,
7310 114, 115, 116, 117, 118, 119, 148, 149, 150, 167,
7311 168, 169, 181, 183, 184, 188, 192, 194, 199, 200,
7312 202, 203, 204, 206, 207, 208, 210, 211, 220, 223,
7313 242, 252, 253, 254, 255, 256, 257, 258, 259, 260,
7314 261, 262, 271, 272, 302, 307, 308, 356, 357, 358,
7315 359, 360, 361, 363, 364, 367, 368, 370, 371, 372,
7316 373, 386, 387, 389, 390, 391, 392, 393, 394, 395,
7317 396, 397, 432, 444, 0, 3, 4, 5, 6, 7,
7318 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
7319 18, 19, 20, 21, 22, 23, 24, 25, 26, 30,
7320 31, 32, 33, 34, 35, 36, 37, 38, 39, 45,
7321 46, 47, 48, 49, 50, 51, 52, 53, 56, 76,
7322 77, 78, 79, 80, 81, 82, 83, 84, 87, 88,
7323 93, 94, 95, 96, 108, 109, 138, 139, 140, 141,
7324 142, 143, 144, 145, 146, 147, 149, 150, 157, 214,
7325 215, 216, 218, 219, 386, 180, 180, 180, 39, 58,
7326 99, 102, 108, 109, 110, 113, 149, 192, 194, 203,
7327 211, 220, 227, 233, 236, 238, 239, 252, 393, 394,
7328 396, 397, 430, 431, 233, 158, 230, 234, 235, 155,
7329 158, 186, 54, 215, 186, 152, 170, 171, 224, 444,
7330 21, 22, 32, 202, 220, 252, 271, 272, 220, 220,
7331 220, 56, 47, 102, 176, 177, 178, 183, 205, 206,
7332 444, 176, 228, 238, 430, 444, 227, 429, 430, 444,
7333 46, 99, 148, 156, 192, 194, 210, 242, 252, 393,
7334 394, 397, 300, 214, 376, 388, 392, 376, 377, 378,
7335 162, 362, 362, 362, 362, 391, 199, 220, 220, 155,
7336 161, 166, 442, 443, 180, 40, 41, 42, 43, 44,
7337 37, 38, 158, 400, 401, 402, 403, 444, 400, 402,
7338 26, 152, 230, 235, 263, 309, 28, 264, 306, 135,
7339 156, 102, 108, 207, 135, 25, 78, 79, 80, 81,
7340 82, 83, 84, 85, 86, 87, 88, 89, 90, 95,
7341 96, 101, 136, 138, 139, 140, 141, 142, 143, 144,
7342 145, 146, 147, 222, 222, 69, 97, 98, 154, 436,
7343 243, 1, 188, 195, 195, 196, 198, 198, 166, 195,
7344 443, 99, 204, 211, 252, 277, 393, 394, 397, 52,
7345 56, 95, 99, 212, 213, 252, 393, 394, 397, 213,
7346 33, 34, 35, 36, 49, 50, 51, 52, 56, 158,
7347 191, 214, 395, 427, 233, 158, 235, 98, 436, 437,
7348 309, 359, 100, 100, 156, 227, 56, 227, 227, 227,
7349 376, 400, 400, 135, 101, 156, 237, 444, 98, 154,
7350 436, 100, 100, 156, 237, 92, 232, 233, 238, 410,
7351 430, 444, 233, 186, 188, 438, 188, 54, 64, 65,
7352 182, 158, 224, 225, 167, 98, 436, 100, 179, 205,
7353 159, 166, 443, 438, 244, 160, 156, 186, 441, 156,
7354 441, 153, 441, 186, 56, 391, 207, 209, 401, 156,
7355 98, 154, 436, 297, 66, 120, 122, 123, 379, 120,
7356 120, 379, 67, 379, 162, 365, 374, 369, 375, 78,
7357 161, 169, 152, 195, 195, 195, 195, 224, 226, 188,
7358 188, 52, 54, 55, 56, 57, 58, 78, 92, 102,
7359 108, 109, 110, 142, 145, 282, 344, 404, 405, 406,
7360 407, 409, 410, 411, 412, 413, 414, 415, 416, 417,
7361 419, 420, 421, 422, 423, 424, 425, 135, 250, 409,
7362 135, 251, 310, 311, 107, 201, 312, 313, 313, 224,
7363 205, 156, 210, 156, 224, 190, 220, 220, 220, 220,
7364 220, 220, 220, 220, 220, 220, 220, 220, 220, 189,
7365 220, 220, 220, 220, 220, 220, 220, 220, 220, 220,
7366 220, 52, 53, 56, 218, 230, 432, 433, 434, 232,
7367 238, 52, 53, 56, 218, 230, 433, 174, 176, 13,
7368 273, 442, 273, 195, 176, 176, 246, 166, 56, 98,
7369 154, 436, 25, 195, 52, 56, 212, 139, 399, 98,
7370 154, 436, 249, 428, 69, 98, 435, 233, 438, 52,
7371 56, 433, 224, 224, 217, 100, 125, 135, 135, 224,
7372 227, 227, 236, 239, 430, 52, 56, 232, 52, 56,
7373 224, 224, 431, 438, 156, 438, 156, 159, 438, 215,
7374 225, 220, 153, 56, 433, 433, 224, 171, 438, 178,
7375 159, 430, 156, 209, 52, 56, 232, 52, 56, 298,
7376 381, 380, 120, 366, 379, 66, 120, 120, 366, 66,
7377 120, 220, 176, 183, 102, 108, 278, 279, 280, 281,
7378 412, 156, 426, 444, 156, 426, 156, 408, 438, 283,
7379 284, 156, 408, 227, 34, 52, 52, 156, 408, 52,
7380 39, 185, 203, 220, 221, 174, 442, 185, 221, 174,
7381 297, 153, 311, 297, 10, 68, 270, 270, 108, 199,
7382 227, 238, 240, 241, 438, 209, 156, 99, 184, 187,
7383 199, 211, 220, 227, 229, 241, 252, 397, 319, 319,
7384 186, 100, 100, 152, 230, 235, 186, 439, 156, 100,
7385 100, 230, 231, 235, 444, 270, 224, 176, 13, 176,
7386 27, 274, 442, 270, 270, 17, 267, 315, 25, 245,
7387 321, 52, 56, 232, 52, 56, 198, 248, 398, 247,
7388 52, 56, 212, 232, 174, 188, 193, 438, 231, 235,
7389 187, 220, 229, 187, 229, 215, 224, 227, 39, 237,
7390 100, 100, 439, 100, 100, 410, 430, 188, 187, 229,
7391 441, 207, 439, 299, 382, 385, 392, 397, 362, 379,
7392 362, 362, 362, 153, 280, 412, 156, 438, 156, 425,
7393 417, 419, 421, 405, 406, 415, 423, 135, 227, 407,
7394 414, 423, 413, 415, 186, 44, 44, 270, 270, 298,
7395 153, 298, 227, 156, 44, 209, 56, 44, 135, 44,
7396 98, 154, 436, 317, 317, 137, 224, 224, 311, 201,
7397 160, 100, 224, 224, 201, 8, 265, 352, 444, 14,
7398 15, 268, 269, 275, 276, 444, 276, 197, 108, 227,
7399 314, 270, 319, 315, 270, 439, 176, 442, 195, 174,
7400 439, 270, 438, 191, 309, 306, 186, 224, 224, 100,
7401 224, 224, 438, 156, 438, 180, 383, 438, 278, 281,
7402 279, 426, 156, 408, 156, 408, 156, 408, 156, 408,
7403 408, 185, 221, 226, 226, 299, 299, 108, 227, 226,
7404 226, 224, 226, 52, 56, 232, 52, 56, 318, 318,
7405 220, 187, 229, 187, 229, 153, 224, 187, 229, 187,
7406 229, 227, 241, 353, 444, 175, 268, 176, 195, 270,
7407 270, 227, 156, 273, 317, 270, 270, 174, 442, 270,
7408 224, 158, 303, 409, 176, 156, 156, 415, 415, 423,
7409 415, 220, 220, 180, 180, 227, 183, 183, 220, 439,
7410 52, 56, 58, 91, 92, 99, 102, 105, 106, 108,
7411 113, 141, 302, 324, 325, 326, 327, 330, 334, 335,
7412 336, 339, 340, 341, 342, 343, 344, 345, 346, 347,
7413 348, 349, 350, 351, 356, 357, 360, 361, 364, 368,
7414 371, 373, 394, 419, 324, 187, 229, 101, 354, 444,
7415 9, 266, 355, 444, 172, 273, 108, 227, 176, 318,
7416 270, 409, 301, 0, 121, 384, 279, 408, 408, 156,
7417 408, 408, 140, 292, 293, 444, 292, 347, 347, 56,
7418 212, 318, 325, 332, 333, 334, 335, 338, 439, 186,
7419 318, 440, 52, 376, 52, 102, 392, 101, 156, 140,
7420 156, 156, 325, 89, 90, 98, 154, 158, 328, 329,
7421 52, 99, 211, 252, 393, 394, 397, 273, 177, 176,
7422 176, 227, 276, 315, 316, 323, 324, 186, 294, 29,
7423 124, 304, 415, 282, 285, 286, 288, 289, 291, 294,
7424 413, 415, 416, 418, 423, 425, 176, 174, 325, 439,
7425 325, 336, 338, 439, 156, 153, 224, 125, 195, 348,
7426 332, 336, 330, 337, 338, 113, 341, 345, 347, 347,
7427 212, 318, 439, 318, 438, 332, 335, 339, 332, 335,
7428 339, 56, 98, 154, 436, 176, 166, 173, 275, 273,
7429 40, 41, 161, 159, 305, 176, 408, 426, 156, 426,
7430 156, 290, 294, 140, 284, 156, 287, 290, 99, 252,
7431 156, 290, 438, 156, 156, 331, 438, 156, 156, 376,
7432 438, 438, 438, 439, 439, 439, 52, 56, 232, 52,
7433 56, 352, 355, 320, 195, 195, 52, 295, 296, 411,
7434 174, 153, 418, 421, 286, 288, 415, 423, 140, 252,
7435 289, 423, 56, 98, 415, 337, 339, 337, 336, 338,
7436 439, 176, 156, 186, 270, 426, 156, 290, 156, 290,
7437 156, 290, 156, 290, 52, 56, 290, 156, 440, 276,
7438 321, 322, 296, 415, 415, 423, 415, 290, 290, 156,
7439 290, 290, 415, 290
7440};
7441
7442/* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */
7443static const yytype_int16 yyr1[] =
7444{
7445 0, 163, 164, 165, 166, 166, 167, 168, 168, 168,
7446 169, 169, 170, 171, 172, 173, 174, 175, 174, 176,
7447 177, 177, 177, 178, 179, 178, 180, 181, 182, 183,
7448 183, 183, 183, 183, 183, 183, 183, 183, 183, 183,
7449 183, 183, 183, 183, 183, 183, 183, 184, 184, 184,
7450 184, 184, 184, 184, 184, 184, 184, 184, 185, 185,
7451 186, 186, 185, 187, 187, 187, 188, 188, 188, 188,
7452 188, 189, 188, 190, 188, 188, 191, 192, 193, 194,
7453 195, 195, 196, 197, 198, 199, 199, 200, 200, 201,
7454 202, 203, 203, 203, 203, 203, 203, 203, 203, 203,
7455 203, 203, 203, 204, 204, 205, 205, 206, 206, 206,
7456 206, 206, 206, 206, 206, 206, 206, 207, 207, 208,
7457 208, 209, 209, 210, 210, 210, 210, 210, 210, 210,
7458 210, 210, 211, 211, 211, 211, 211, 211, 211, 211,
7459 211, 212, 212, 213, 213, 213, 214, 214, 214, 214,
7460 214, 215, 215, 216, 217, 216, 218, 218, 218, 218,
7461 218, 218, 218, 218, 218, 218, 218, 218, 218, 218,
7462 218, 218, 218, 218, 218, 218, 218, 218, 218, 218,
7463 218, 218, 218, 218, 218, 218, 219, 219, 219, 219,
7464 219, 219, 219, 219, 219, 219, 219, 219, 219, 219,
7465 219, 219, 219, 219, 219, 219, 219, 219, 219, 219,
7466 219, 219, 219, 219, 219, 219, 219, 219, 219, 219,
7467 219, 219, 219, 219, 219, 219, 219, 220, 220, 220,
7468 220, 220, 220, 220, 220, 220, 220, 220, 220, 220,
7469 220, 220, 220, 220, 220, 220, 220, 220, 220, 220,
7470 220, 220, 220, 220, 220, 220, 220, 220, 220, 220,
7471 220, 220, 220, 220, 220, 220, 220, 220, 220, 220,
7472 220, 220, 221, 221, 221, 222, 222, 222, 222, 223,
7473 223, 224, 225, 226, 227, 228, 228, 228, 228, 229,
7474 229, 230, 230, 230, 231, 231, 232, 232, 232, 232,
7475 232, 233, 233, 233, 233, 233, 234, 235, 236, 236,
7476 237, 237, 238, 238, 238, 238, 239, 239, 240, 240,
7477 241, 241, 241, 242, 242, 242, 242, 242, 242, 242,
7478 242, 242, 242, 242, 243, 242, 244, 242, 242, 242,
7479 242, 242, 242, 242, 242, 242, 242, 242, 242, 242,
7480 242, 242, 242, 242, 242, 242, 242, 242, 245, 242,
7481 246, 242, 242, 242, 247, 242, 248, 242, 249, 242,
7482 250, 242, 251, 242, 242, 242, 242, 242, 252, 253,
7483 254, 255, 256, 257, 258, 259, 260, 261, 262, 263,
7484 264, 265, 266, 267, 268, 269, 270, 270, 271, 272,
7485 273, 273, 273, 274, 274, 275, 275, 276, 276, 277,
7486 277, 278, 278, 279, 279, 280, 280, 280, 280, 280,
7487 281, 281, 282, 282, 283, 284, 285, 285, 286, 286,
7488 286, 286, 287, 288, 289, 289, 290, 290, 291, 291,
7489 291, 291, 291, 291, 291, 291, 291, 291, 291, 291,
7490 291, 291, 291, 292, 292, 293, 293, 294, 294, 295,
7491 295, 296, 296, 297, 298, 299, 300, 301, 302, 303,
7492 303, 304, 305, 304, 306, 307, 307, 307, 307, 308,
7493 308, 308, 308, 308, 308, 308, 308, 308, 309, 309,
7494 310, 311, 312, 313, 314, 314, 314, 314, 315, 316,
7495 316, 317, 318, 319, 320, 321, 322, 322, 323, 323,
7496 323, 324, 324, 324, 324, 324, 324, 325, 326, 326,
7497 327, 327, 328, 329, 330, 330, 330, 330, 330, 330,
7498 330, 330, 330, 330, 330, 330, 330, 331, 330, 330,
7499 330, 332, 332, 332, 332, 332, 332, 333, 333, 334,
7500 334, 335, 336, 336, 337, 337, 338, 339, 339, 339,
7501 339, 340, 340, 341, 341, 342, 342, 343, 343, 344,
7502 345, 345, 346, 346, 346, 346, 346, 346, 346, 346,
7503 346, 346, 347, 347, 347, 347, 347, 347, 347, 347,
7504 347, 347, 348, 349, 349, 350, 351, 351, 351, 352,
7505 352, 353, 353, 353, 354, 354, 355, 355, 356, 356,
7506 357, 358, 358, 358, 359, 360, 361, 362, 362, 363,
7507 364, 365, 365, 366, 366, 367, 368, 369, 369, 370,
7508 371, 372, 373, 374, 374, 375, 375, 376, 376, 377,
7509 377, 378, 378, 379, 380, 379, 381, 382, 383, 379,
7510 384, 384, 385, 385, 386, 386, 387, 388, 388, 389,
7511 390, 390, 391, 391, 391, 391, 392, 392, 392, 393,
7512 393, 393, 394, 394, 394, 394, 394, 394, 394, 395,
7513 395, 396, 396, 397, 397, 398, 399, 399, 400, 400,
7514 401, 402, 403, 402, 404, 404, 405, 405, 405, 405,
7515 405, 406, 407, 407, 408, 408, 409, 409, 409, 409,
7516 409, 409, 409, 409, 409, 409, 409, 409, 409, 409,
7517 409, 410, 411, 411, 411, 411, 412, 412, 413, 414,
7518 414, 415, 415, 416, 417, 417, 418, 418, 419, 419,
7519 420, 421, 421, 422, 422, 423, 423, 424, 424, 425,
7520 425, 426, 426, 427, 428, 427, 429, 429, 430, 430,
7521 431, 431, 431, 431, 431, 431, 432, 432, 432, 433,
7522 433, 434, 434, 434, 435, 435, 436, 436, 437, 437,
7523 438, 439, 440, 441, 441, 442, 442, 443, 443, 444
7524};
7525
7526/* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. */
7527static const yytype_int8 yyr2[] =
7528{
7529 0, 2, 0, 2, 0, 1, 2, 1, 1, 3,
7530 1, 2, 1, 3, 0, 0, 8, 0, 5, 2,
7531 1, 1, 3, 1, 0, 3, 0, 2, 0, 4,
7532 3, 3, 3, 2, 3, 3, 3, 3, 4, 5,
7533 1, 4, 4, 7, 4, 1, 1, 4, 4, 7,
7534 6, 6, 6, 6, 5, 4, 4, 4, 1, 4,
7535 0, 1, 3, 1, 4, 1, 1, 3, 3, 3,
7536 2, 0, 7, 0, 7, 1, 1, 2, 0, 5,
7537 1, 1, 0, 0, 4, 1, 1, 1, 4, 3,
7538 1, 2, 3, 4, 5, 4, 5, 6, 2, 2,
7539 2, 2, 2, 1, 3, 1, 3, 1, 2, 3,
7540 5, 2, 4, 2, 4, 1, 3, 1, 3, 2,
7541 3, 1, 3, 1, 1, 4, 3, 3, 3, 3,
7542 2, 1, 1, 1, 4, 3, 3, 3, 3, 2,
7543 1, 1, 1, 2, 1, 3, 1, 1, 1, 1,
7544 1, 1, 1, 1, 0, 4, 1, 1, 1, 1,
7545 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7546 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7547 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7548 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7549 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7550 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7551 1, 1, 1, 1, 1, 1, 1, 4, 4, 7,
7552 6, 6, 6, 6, 5, 4, 3, 3, 2, 2,
7553 2, 2, 3, 3, 3, 3, 3, 3, 4, 2,
7554 2, 3, 3, 3, 3, 1, 3, 3, 3, 3,
7555 3, 2, 2, 3, 3, 3, 3, 4, 6, 4,
7556 4, 1, 1, 4, 3, 1, 1, 1, 1, 3,
7557 3, 1, 1, 1, 1, 1, 2, 4, 2, 1,
7558 4, 3, 5, 3, 1, 1, 1, 1, 2, 4,
7559 2, 1, 2, 2, 4, 1, 0, 2, 2, 1,
7560 2, 1, 1, 1, 3, 3, 2, 1, 1, 1,
7561 3, 4, 2, 1, 1, 1, 1, 1, 1, 1,
7562 1, 1, 1, 1, 0, 4, 0, 4, 3, 3,
7563 2, 3, 3, 1, 4, 3, 1, 6, 4, 3,
7564 2, 1, 2, 1, 6, 6, 4, 4, 0, 6,
7565 0, 5, 5, 6, 0, 6, 0, 7, 0, 5,
7566 0, 5, 0, 5, 1, 1, 1, 1, 1, 1,
7567 1, 1, 2, 2, 1, 2, 1, 1, 1, 1,
7568 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7569 1, 1, 2, 1, 1, 1, 5, 1, 2, 1,
7570 1, 1, 3, 1, 3, 1, 3, 5, 1, 3,
7571 2, 1, 1, 1, 0, 2, 1, 3, 4, 2,
7572 2, 1, 1, 3, 1, 3, 2, 0, 6, 8,
7573 4, 6, 4, 2, 6, 2, 4, 6, 2, 4,
7574 2, 4, 1, 1, 1, 3, 4, 1, 4, 1,
7575 3, 1, 1, 0, 0, 0, 0, 0, 9, 4,
7576 1, 3, 0, 4, 3, 2, 4, 5, 5, 2,
7577 4, 4, 3, 3, 3, 2, 1, 4, 3, 3,
7578 0, 7, 0, 7, 1, 2, 3, 4, 5, 1,
7579 1, 0, 0, 0, 0, 9, 1, 1, 1, 3,
7580 3, 1, 2, 3, 1, 1, 1, 1, 3, 1,
7581 3, 1, 2, 2, 1, 1, 4, 4, 4, 3,
7582 4, 4, 4, 3, 3, 3, 2, 0, 6, 2,
7583 4, 1, 1, 2, 2, 4, 1, 2, 3, 1,
7584 3, 5, 2, 1, 1, 3, 1, 3, 1, 2,
7585 1, 1, 3, 2, 1, 1, 3, 2, 1, 2,
7586 1, 1, 1, 3, 3, 2, 2, 1, 1, 1,
7587 2, 2, 1, 1, 1, 1, 1, 1, 1, 1,
7588 1, 1, 1, 2, 2, 4, 2, 3, 1, 6,
7589 1, 1, 1, 1, 2, 1, 3, 1, 1, 1,
7590 1, 1, 1, 2, 3, 3, 3, 1, 2, 4,
7591 1, 0, 3, 1, 2, 4, 1, 0, 3, 4,
7592 1, 4, 1, 0, 3, 0, 3, 0, 2, 0,
7593 2, 0, 2, 1, 0, 3, 0, 0, 0, 6,
7594 1, 1, 1, 1, 1, 1, 2, 1, 1, 3,
7595 1, 2, 1, 1, 1, 1, 1, 1, 1, 1,
7596 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7597 1, 1, 1, 1, 1, 0, 4, 0, 1, 1,
7598 3, 1, 0, 3, 1, 3, 4, 2, 2, 1,
7599 1, 3, 1, 3, 2, 0, 6, 8, 4, 6,
7600 4, 6, 2, 4, 6, 2, 4, 2, 4, 1,
7601 0, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7602 3, 1, 3, 1, 2, 1, 2, 1, 1, 1,
7603 1, 2, 1, 1, 1, 2, 1, 1, 1, 2,
7604 1, 2, 1, 1, 0, 4, 1, 2, 1, 3,
7605 3, 2, 1, 4, 2, 1, 1, 1, 1, 1,
7606 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
7607 2, 2, 2, 1, 1, 1, 1, 1, 2, 0
7608};
7609
7610
7611enum { YYENOMEM = -2 };
7612
7613#define yyerrok (yyerrstatus = 0)
7614#define yyclearin (yychar = YYEMPTY)
7615
7616#define YYACCEPT goto yyacceptlab
7617#define YYABORT goto yyabortlab
7618#define YYERROR goto yyerrorlab
7619#define YYNOMEM goto yyexhaustedlab
7620
7621
7622#define YYRECOVERING() (!!yyerrstatus)
7623
7624#define YYBACKUP(Token, Value) \
7625 do \
7626 if (yychar == YYEMPTY) \
7627 { \
7628 yychar = (Token); \
7629 yylval = (Value); \
7630 YYPOPSTACK (yylen); \
7631 yystate = *yyssp; \
7632 goto yybackup; \
7633 } \
7634 else \
7635 { \
7636 yyerror (&yylloc, p, YY_("syntax error: cannot back up")); \
7637 YYERROR; \
7638 } \
7639 while (0)
7640
7641/* Backward compatibility with an undocumented macro.
7642 Use YYerror or YYUNDEF. */
7643#define YYERRCODE YYUNDEF
7644
7645/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
7646 If N is 0, then set CURRENT to the empty location which ends
7647 the previous symbol: RHS[0] (always defined). */
7648
7649#ifndef YYLLOC_DEFAULT
7650# define YYLLOC_DEFAULT(Current, Rhs, N) \
7651 do \
7652 if (N) \
7653 { \
7654 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
7655 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
7656 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
7657 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
7658 } \
7659 else \
7660 { \
7661 (Current).first_line = (Current).last_line = \
7662 YYRHSLOC (Rhs, 0).last_line; \
7663 (Current).first_column = (Current).last_column = \
7664 YYRHSLOC (Rhs, 0).last_column; \
7665 } \
7666 while (0)
7667#endif
7668
7669#define YYRHSLOC(Rhs, K) ((Rhs)[K])
7670
7671
7672/* Enable debugging if requested. */
7673#if YYDEBUG
7674
7675# ifndef YYFPRINTF
7676# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
7677# define YYFPRINTF fprintf
7678# endif
7679
7680# define YYDPRINTF(Args) \
7681do { \
7682 if (yydebug) \
7683 YYFPRINTF Args; \
7684} while (0)
7685
7686
7687/* YYLOCATION_PRINT -- Print the location on the stream.
7688 This macro was not mandated originally: define only if we know
7689 we won't break user code: when these are the locations we know. */
7690
7691# ifndef YYLOCATION_PRINT
7692
7693# if defined YY_LOCATION_PRINT
7694
7695 /* Temporary convenience wrapper in case some people defined the
7696 undocumented and private YY_LOCATION_PRINT macros. */
7697# define YYLOCATION_PRINT(File, Loc, p) YY_LOCATION_PRINT(File, *(Loc), p)
7698
7699# elif defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
7700
7701/* Print *YYLOCP on YYO. Private, do not rely on its existence. */
7702
7703YY_ATTRIBUTE_UNUSED
7704static int
7705yy_location_print_ (FILE *yyo, YYLTYPE const * const yylocp)
7706{
7707 int res = 0;
7708 int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0;
7709 if (0 <= yylocp->first_line)
7710 {
7711 res += YYFPRINTF (yyo, "%d", yylocp->first_line);
7712 if (0 <= yylocp->first_column)
7713 res += YYFPRINTF (yyo, ".%d", yylocp->first_column);
7714 }
7715 if (0 <= yylocp->last_line)
7716 {
7717 if (yylocp->first_line < yylocp->last_line)
7718 {
7719 res += YYFPRINTF (yyo, "-%d", yylocp->last_line);
7720 if (0 <= end_col)
7721 res += YYFPRINTF (yyo, ".%d", end_col);
7722 }
7723 else if (0 <= end_col && yylocp->first_column < end_col)
7724 res += YYFPRINTF (yyo, "-%d", end_col);
7725 }
7726 return res;
7727}
7728
7729# define YYLOCATION_PRINT yy_location_print_
7730
7731 /* Temporary convenience wrapper in case some people defined the
7732 undocumented and private YY_LOCATION_PRINT macros. */
7733# define YY_LOCATION_PRINT(File, Loc, p) YYLOCATION_PRINT(File, &(Loc), p)
7734
7735# else
7736
7737# define YYLOCATION_PRINT(File, Loc, p) ((void) 0)
7738 /* Temporary convenience wrapper in case some people defined the
7739 undocumented and private YY_LOCATION_PRINT macros. */
7740# define YY_LOCATION_PRINT YYLOCATION_PRINT
7741
7742# endif
7743# endif /* !defined YYLOCATION_PRINT */
7744
7745
7746# define YY_SYMBOL_PRINT(Title, Kind, Value, Location, p) \
7747do { \
7748 if (yydebug) \
7749 { \
7750 YYFPRINTF (stderr, "%s ", Title); \
7751 yy_symbol_print (stderr, \
7752 Kind, Value, Location, p); \
7753 YYFPRINTF (stderr, "\n"); \
7754 } \
7755} while (0)
7756
7757
7758/*-----------------------------------.
7759| Print this symbol's value on YYO. |
7760`-----------------------------------*/
7761
7762static void
7763yy_symbol_value_print (FILE *yyo,
7764 yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, struct parser_params *p)
7765{
7766 FILE *yyoutput = yyo;
7767 YY_USE (yyoutput);
7768 YY_USE (yylocationp);
7769 YY_USE (p);
7770 if (!yyvaluep)
7771 return;
7772 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
7773switch (yykind)
7774 {
7775 case YYSYMBOL_keyword_class: /* "'class'" */
7776#line 2621 "parse.y"
7777 {
7778 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7779}
7780#line 7781 "parse.c"
7781 break;
7782
7783 case YYSYMBOL_keyword_module: /* "'module'" */
7784#line 2621 "parse.y"
7785 {
7786 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7787}
7788#line 7789 "parse.c"
7789 break;
7790
7791 case YYSYMBOL_keyword_def: /* "'def'" */
7792#line 2621 "parse.y"
7793 {
7794 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7795}
7796#line 7797 "parse.c"
7797 break;
7798
7799 case YYSYMBOL_keyword_undef: /* "'undef'" */
7800#line 2621 "parse.y"
7801 {
7802 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7803}
7804#line 7805 "parse.c"
7805 break;
7806
7807 case YYSYMBOL_keyword_begin: /* "'begin'" */
7808#line 2621 "parse.y"
7809 {
7810 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7811}
7812#line 7813 "parse.c"
7813 break;
7814
7815 case YYSYMBOL_keyword_rescue: /* "'rescue'" */
7816#line 2621 "parse.y"
7817 {
7818 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7819}
7820#line 7821 "parse.c"
7821 break;
7822
7823 case YYSYMBOL_keyword_ensure: /* "'ensure'" */
7824#line 2621 "parse.y"
7825 {
7826 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7827}
7828#line 7829 "parse.c"
7829 break;
7830
7831 case YYSYMBOL_keyword_end: /* "'end'" */
7832#line 2621 "parse.y"
7833 {
7834 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7835}
7836#line 7837 "parse.c"
7837 break;
7838
7839 case YYSYMBOL_keyword_if: /* "'if'" */
7840#line 2621 "parse.y"
7841 {
7842 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7843}
7844#line 7845 "parse.c"
7845 break;
7846
7847 case YYSYMBOL_keyword_unless: /* "'unless'" */
7848#line 2621 "parse.y"
7849 {
7850 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7851}
7852#line 7853 "parse.c"
7853 break;
7854
7855 case YYSYMBOL_keyword_then: /* "'then'" */
7856#line 2621 "parse.y"
7857 {
7858 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7859}
7860#line 7861 "parse.c"
7861 break;
7862
7863 case YYSYMBOL_keyword_elsif: /* "'elsif'" */
7864#line 2621 "parse.y"
7865 {
7866 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7867}
7868#line 7869 "parse.c"
7869 break;
7870
7871 case YYSYMBOL_keyword_else: /* "'else'" */
7872#line 2621 "parse.y"
7873 {
7874 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7875}
7876#line 7877 "parse.c"
7877 break;
7878
7879 case YYSYMBOL_keyword_case: /* "'case'" */
7880#line 2621 "parse.y"
7881 {
7882 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7883}
7884#line 7885 "parse.c"
7885 break;
7886
7887 case YYSYMBOL_keyword_when: /* "'when'" */
7888#line 2621 "parse.y"
7889 {
7890 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7891}
7892#line 7893 "parse.c"
7893 break;
7894
7895 case YYSYMBOL_keyword_while: /* "'while'" */
7896#line 2621 "parse.y"
7897 {
7898 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7899}
7900#line 7901 "parse.c"
7901 break;
7902
7903 case YYSYMBOL_keyword_until: /* "'until'" */
7904#line 2621 "parse.y"
7905 {
7906 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7907}
7908#line 7909 "parse.c"
7909 break;
7910
7911 case YYSYMBOL_keyword_for: /* "'for'" */
7912#line 2621 "parse.y"
7913 {
7914 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7915}
7916#line 7917 "parse.c"
7917 break;
7918
7919 case YYSYMBOL_keyword_break: /* "'break'" */
7920#line 2621 "parse.y"
7921 {
7922 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7923}
7924#line 7925 "parse.c"
7925 break;
7926
7927 case YYSYMBOL_keyword_next: /* "'next'" */
7928#line 2621 "parse.y"
7929 {
7930 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7931}
7932#line 7933 "parse.c"
7933 break;
7934
7935 case YYSYMBOL_keyword_redo: /* "'redo'" */
7936#line 2621 "parse.y"
7937 {
7938 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7939}
7940#line 7941 "parse.c"
7941 break;
7942
7943 case YYSYMBOL_keyword_retry: /* "'retry'" */
7944#line 2621 "parse.y"
7945 {
7946 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7947}
7948#line 7949 "parse.c"
7949 break;
7950
7951 case YYSYMBOL_keyword_in: /* "'in'" */
7952#line 2621 "parse.y"
7953 {
7954 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7955}
7956#line 7957 "parse.c"
7957 break;
7958
7959 case YYSYMBOL_keyword_do: /* "'do'" */
7960#line 2621 "parse.y"
7961 {
7962 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7963}
7964#line 7965 "parse.c"
7965 break;
7966
7967 case YYSYMBOL_keyword_do_cond: /* "'do' for condition" */
7968#line 2621 "parse.y"
7969 {
7970 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7971}
7972#line 7973 "parse.c"
7973 break;
7974
7975 case YYSYMBOL_keyword_do_block: /* "'do' for block" */
7976#line 2621 "parse.y"
7977 {
7978 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7979}
7980#line 7981 "parse.c"
7981 break;
7982
7983 case YYSYMBOL_keyword_do_LAMBDA: /* "'do' for lambda" */
7984#line 2621 "parse.y"
7985 {
7986 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7987}
7988#line 7989 "parse.c"
7989 break;
7990
7991 case YYSYMBOL_keyword_return: /* "'return'" */
7992#line 2621 "parse.y"
7993 {
7994 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
7995}
7996#line 7997 "parse.c"
7997 break;
7998
7999 case YYSYMBOL_keyword_yield: /* "'yield'" */
8000#line 2621 "parse.y"
8001 {
8002 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8003}
8004#line 8005 "parse.c"
8005 break;
8006
8007 case YYSYMBOL_keyword_super: /* "'super'" */
8008#line 2621 "parse.y"
8009 {
8010 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8011}
8012#line 8013 "parse.c"
8013 break;
8014
8015 case YYSYMBOL_keyword_self: /* "'self'" */
8016#line 2621 "parse.y"
8017 {
8018 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8019}
8020#line 8021 "parse.c"
8021 break;
8022
8023 case YYSYMBOL_keyword_nil: /* "'nil'" */
8024#line 2621 "parse.y"
8025 {
8026 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8027}
8028#line 8029 "parse.c"
8029 break;
8030
8031 case YYSYMBOL_keyword_true: /* "'true'" */
8032#line 2621 "parse.y"
8033 {
8034 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8035}
8036#line 8037 "parse.c"
8037 break;
8038
8039 case YYSYMBOL_keyword_false: /* "'false'" */
8040#line 2621 "parse.y"
8041 {
8042 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8043}
8044#line 8045 "parse.c"
8045 break;
8046
8047 case YYSYMBOL_keyword_and: /* "'and'" */
8048#line 2621 "parse.y"
8049 {
8050 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8051}
8052#line 8053 "parse.c"
8053 break;
8054
8055 case YYSYMBOL_keyword_or: /* "'or'" */
8056#line 2621 "parse.y"
8057 {
8058 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8059}
8060#line 8061 "parse.c"
8061 break;
8062
8063 case YYSYMBOL_keyword_not: /* "'not'" */
8064#line 2621 "parse.y"
8065 {
8066 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8067}
8068#line 8069 "parse.c"
8069 break;
8070
8071 case YYSYMBOL_modifier_if: /* "'if' modifier" */
8072#line 2621 "parse.y"
8073 {
8074 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8075}
8076#line 8077 "parse.c"
8077 break;
8078
8079 case YYSYMBOL_modifier_unless: /* "'unless' modifier" */
8080#line 2621 "parse.y"
8081 {
8082 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8083}
8084#line 8085 "parse.c"
8085 break;
8086
8087 case YYSYMBOL_modifier_while: /* "'while' modifier" */
8088#line 2621 "parse.y"
8089 {
8090 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8091}
8092#line 8093 "parse.c"
8093 break;
8094
8095 case YYSYMBOL_modifier_until: /* "'until' modifier" */
8096#line 2621 "parse.y"
8097 {
8098 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8099}
8100#line 8101 "parse.c"
8101 break;
8102
8103 case YYSYMBOL_modifier_rescue: /* "'rescue' modifier" */
8104#line 2621 "parse.y"
8105 {
8106 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8107}
8108#line 8109 "parse.c"
8109 break;
8110
8111 case YYSYMBOL_keyword_alias: /* "'alias'" */
8112#line 2621 "parse.y"
8113 {
8114 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8115}
8116#line 8117 "parse.c"
8117 break;
8118
8119 case YYSYMBOL_keyword_defined: /* "'defined?'" */
8120#line 2621 "parse.y"
8121 {
8122 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8123}
8124#line 8125 "parse.c"
8125 break;
8126
8127 case YYSYMBOL_keyword_BEGIN: /* "'BEGIN'" */
8128#line 2621 "parse.y"
8129 {
8130 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8131}
8132#line 8133 "parse.c"
8133 break;
8134
8135 case YYSYMBOL_keyword_END: /* "'END'" */
8136#line 2621 "parse.y"
8137 {
8138 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8139}
8140#line 8141 "parse.c"
8141 break;
8142
8143 case YYSYMBOL_keyword__LINE__: /* "'__LINE__'" */
8144#line 2621 "parse.y"
8145 {
8146 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8147}
8148#line 8149 "parse.c"
8149 break;
8150
8151 case YYSYMBOL_keyword__FILE__: /* "'__FILE__'" */
8152#line 2621 "parse.y"
8153 {
8154 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8155}
8156#line 8157 "parse.c"
8157 break;
8158
8159 case YYSYMBOL_keyword__ENCODING__: /* "'__ENCODING__'" */
8160#line 2621 "parse.y"
8161 {
8162 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8163}
8164#line 8165 "parse.c"
8165 break;
8166
8167 case YYSYMBOL_tIDENTIFIER: /* "local variable or method" */
8168#line 2621 "parse.y"
8169 {
8170 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8171}
8172#line 8173 "parse.c"
8173 break;
8174
8175 case YYSYMBOL_tFID: /* "method" */
8176#line 2621 "parse.y"
8177 {
8178 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8179}
8180#line 8181 "parse.c"
8181 break;
8182
8183 case YYSYMBOL_tGVAR: /* "global variable" */
8184#line 2621 "parse.y"
8185 {
8186 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8187}
8188#line 8189 "parse.c"
8189 break;
8190
8191 case YYSYMBOL_tIVAR: /* "instance variable" */
8192#line 2621 "parse.y"
8193 {
8194 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8195}
8196#line 8197 "parse.c"
8197 break;
8198
8199 case YYSYMBOL_tCONSTANT: /* "constant" */
8200#line 2621 "parse.y"
8201 {
8202 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8203}
8204#line 8205 "parse.c"
8205 break;
8206
8207 case YYSYMBOL_tCVAR: /* "class variable" */
8208#line 2621 "parse.y"
8209 {
8210 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8211}
8212#line 8213 "parse.c"
8213 break;
8214
8215 case YYSYMBOL_tLABEL: /* "label" */
8216#line 2621 "parse.y"
8217 {
8218 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8219}
8220#line 8221 "parse.c"
8221 break;
8222
8223 case YYSYMBOL_tINTEGER: /* "integer literal" */
8224#line 2624 "parse.y"
8225 {
8226 switch (nd_type(RNODE(((*yyvaluep).node)))) {
8227 case NODE_INTEGER:
8228 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_integer_literal_val(((*yyvaluep).node)));
8229 break;
8230 case NODE_FLOAT:
8231 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_float_literal_val(((*yyvaluep).node)));
8232 break;
8233 case NODE_RATIONAL:
8234 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_rational_literal_val(((*yyvaluep).node)));
8235 break;
8236 case NODE_IMAGINARY:
8237 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_imaginary_literal_val(((*yyvaluep).node)));
8238 break;
8239 default:
8240 break;
8241 }
8242}
8243#line 8244 "parse.c"
8244 break;
8245
8246 case YYSYMBOL_tFLOAT: /* "float literal" */
8247#line 2624 "parse.y"
8248 {
8249 switch (nd_type(RNODE(((*yyvaluep).node)))) {
8250 case NODE_INTEGER:
8251 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_integer_literal_val(((*yyvaluep).node)));
8252 break;
8253 case NODE_FLOAT:
8254 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_float_literal_val(((*yyvaluep).node)));
8255 break;
8256 case NODE_RATIONAL:
8257 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_rational_literal_val(((*yyvaluep).node)));
8258 break;
8259 case NODE_IMAGINARY:
8260 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_imaginary_literal_val(((*yyvaluep).node)));
8261 break;
8262 default:
8263 break;
8264 }
8265}
8266#line 8267 "parse.c"
8267 break;
8268
8269 case YYSYMBOL_tRATIONAL: /* "rational literal" */
8270#line 2624 "parse.y"
8271 {
8272 switch (nd_type(RNODE(((*yyvaluep).node)))) {
8273 case NODE_INTEGER:
8274 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_integer_literal_val(((*yyvaluep).node)));
8275 break;
8276 case NODE_FLOAT:
8277 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_float_literal_val(((*yyvaluep).node)));
8278 break;
8279 case NODE_RATIONAL:
8280 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_rational_literal_val(((*yyvaluep).node)));
8281 break;
8282 case NODE_IMAGINARY:
8283 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_imaginary_literal_val(((*yyvaluep).node)));
8284 break;
8285 default:
8286 break;
8287 }
8288}
8289#line 8290 "parse.c"
8290 break;
8291
8292 case YYSYMBOL_tIMAGINARY: /* "imaginary literal" */
8293#line 2624 "parse.y"
8294 {
8295 switch (nd_type(RNODE(((*yyvaluep).node)))) {
8296 case NODE_INTEGER:
8297 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_integer_literal_val(((*yyvaluep).node)));
8298 break;
8299 case NODE_FLOAT:
8300 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_float_literal_val(((*yyvaluep).node)));
8301 break;
8302 case NODE_RATIONAL:
8303 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_rational_literal_val(((*yyvaluep).node)));
8304 break;
8305 case NODE_IMAGINARY:
8306 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_imaginary_literal_val(((*yyvaluep).node)));
8307 break;
8308 default:
8309 break;
8310 }
8311}
8312#line 8313 "parse.c"
8313 break;
8314
8315 case YYSYMBOL_tCHAR: /* "char literal" */
8316#line 2624 "parse.y"
8317 {
8318 switch (nd_type(RNODE(((*yyvaluep).node)))) {
8319 case NODE_INTEGER:
8320 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_integer_literal_val(((*yyvaluep).node)));
8321 break;
8322 case NODE_FLOAT:
8323 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_float_literal_val(((*yyvaluep).node)));
8324 break;
8325 case NODE_RATIONAL:
8326 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_rational_literal_val(((*yyvaluep).node)));
8327 break;
8328 case NODE_IMAGINARY:
8329 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_imaginary_literal_val(((*yyvaluep).node)));
8330 break;
8331 default:
8332 break;
8333 }
8334}
8335#line 8336 "parse.c"
8336 break;
8337
8338 case YYSYMBOL_tNTH_REF: /* "numbered reference" */
8339#line 2642 "parse.y"
8340 {
8341 rb_parser_printf(p, "$%ld", RNODE_NTH_REF(((*yyvaluep).node))->nd_nth);
8342}
8343#line 8344 "parse.c"
8344 break;
8345
8346 case YYSYMBOL_tBACK_REF: /* "back reference" */
8347#line 2645 "parse.y"
8348 {
8349 rb_parser_printf(p, "$%c", (int)RNODE_BACK_REF(((*yyvaluep).node))->nd_nth);
8350}
8351#line 8352 "parse.c"
8352 break;
8353
8354 case YYSYMBOL_tSTRING_CONTENT: /* "literal content" */
8355#line 2624 "parse.y"
8356 {
8357 switch (nd_type(RNODE(((*yyvaluep).node)))) {
8358 case NODE_INTEGER:
8359 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_integer_literal_val(((*yyvaluep).node)));
8360 break;
8361 case NODE_FLOAT:
8362 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_float_literal_val(((*yyvaluep).node)));
8363 break;
8364 case NODE_RATIONAL:
8365 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_rational_literal_val(((*yyvaluep).node)));
8366 break;
8367 case NODE_IMAGINARY:
8368 rb_parser_printf(p, "%+"PRIsVALUE, rb_node_imaginary_literal_val(((*yyvaluep).node)));
8369 break;
8370 default:
8371 break;
8372 }
8373}
8374#line 8375 "parse.c"
8375 break;
8376
8377 case YYSYMBOL_69_: /* '.' */
8378#line 2621 "parse.y"
8379 {
8380 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8381}
8382#line 8383 "parse.c"
8383 break;
8384
8385 case YYSYMBOL_70_backslash_: /* "backslash" */
8386#line 2621 "parse.y"
8387 {
8388 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8389}
8390#line 8391 "parse.c"
8391 break;
8392
8393 case YYSYMBOL_72_escaped_horizontal_tab_: /* "escaped horizontal tab" */
8394#line 2621 "parse.y"
8395 {
8396 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8397}
8398#line 8399 "parse.c"
8399 break;
8400
8401 case YYSYMBOL_73_escaped_form_feed_: /* "escaped form feed" */
8402#line 2621 "parse.y"
8403 {
8404 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8405}
8406#line 8407 "parse.c"
8407 break;
8408
8409 case YYSYMBOL_74_escaped_carriage_return_: /* "escaped carriage return" */
8410#line 2621 "parse.y"
8411 {
8412 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8413}
8414#line 8415 "parse.c"
8415 break;
8416
8417 case YYSYMBOL_75_escaped_vertical_tab_: /* "escaped vertical tab" */
8418#line 2621 "parse.y"
8419 {
8420 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8421}
8422#line 8423 "parse.c"
8423 break;
8424
8425 case YYSYMBOL_tANDDOT: /* "&." */
8426#line 2621 "parse.y"
8427 {
8428 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8429}
8430#line 8431 "parse.c"
8431 break;
8432
8433 case YYSYMBOL_tCOLON2: /* "::" */
8434#line 2621 "parse.y"
8435 {
8436 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8437}
8438#line 8439 "parse.c"
8439 break;
8440
8441 case YYSYMBOL_tOP_ASGN: /* "operator-assignment" */
8442#line 2621 "parse.y"
8443 {
8444 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8445}
8446#line 8447 "parse.c"
8447 break;
8448
8449 case YYSYMBOL_top_compstmt: /* top_compstmt */
8450#line 2612 "parse.y"
8451 {
8452 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8453 rb_parser_printf(p, "NODE_SPECIAL");
8454 }
8455 else if (((*yyvaluep).node)) {
8456 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8457 }
8458}
8459#line 8460 "parse.c"
8460 break;
8461
8462 case YYSYMBOL_top_stmts: /* top_stmts */
8463#line 2612 "parse.y"
8464 {
8465 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8466 rb_parser_printf(p, "NODE_SPECIAL");
8467 }
8468 else if (((*yyvaluep).node)) {
8469 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8470 }
8471}
8472#line 8473 "parse.c"
8473 break;
8474
8475 case YYSYMBOL_top_stmt: /* top_stmt */
8476#line 2612 "parse.y"
8477 {
8478 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8479 rb_parser_printf(p, "NODE_SPECIAL");
8480 }
8481 else if (((*yyvaluep).node)) {
8482 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8483 }
8484}
8485#line 8486 "parse.c"
8486 break;
8487
8488 case YYSYMBOL_block_open: /* block_open */
8489#line 2612 "parse.y"
8490 {
8491 if ((NODE *)((*yyvaluep).node_exits) == (NODE *)-1) {
8492 rb_parser_printf(p, "NODE_SPECIAL");
8493 }
8494 else if (((*yyvaluep).node_exits)) {
8495 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_exits)))));
8496 }
8497}
8498#line 8499 "parse.c"
8499 break;
8500
8501 case YYSYMBOL_begin_block: /* begin_block */
8502#line 2612 "parse.y"
8503 {
8504 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8505 rb_parser_printf(p, "NODE_SPECIAL");
8506 }
8507 else if (((*yyvaluep).node)) {
8508 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8509 }
8510}
8511#line 8512 "parse.c"
8512 break;
8513
8514 case YYSYMBOL_bodystmt: /* bodystmt */
8515#line 2612 "parse.y"
8516 {
8517 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8518 rb_parser_printf(p, "NODE_SPECIAL");
8519 }
8520 else if (((*yyvaluep).node)) {
8521 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8522 }
8523}
8524#line 8525 "parse.c"
8525 break;
8526
8527 case YYSYMBOL_compstmt: /* compstmt */
8528#line 2612 "parse.y"
8529 {
8530 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8531 rb_parser_printf(p, "NODE_SPECIAL");
8532 }
8533 else if (((*yyvaluep).node)) {
8534 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8535 }
8536}
8537#line 8538 "parse.c"
8538 break;
8539
8540 case YYSYMBOL_stmts: /* stmts */
8541#line 2612 "parse.y"
8542 {
8543 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8544 rb_parser_printf(p, "NODE_SPECIAL");
8545 }
8546 else if (((*yyvaluep).node)) {
8547 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8548 }
8549}
8550#line 8551 "parse.c"
8551 break;
8552
8553 case YYSYMBOL_stmt_or_begin: /* stmt_or_begin */
8554#line 2612 "parse.y"
8555 {
8556 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8557 rb_parser_printf(p, "NODE_SPECIAL");
8558 }
8559 else if (((*yyvaluep).node)) {
8560 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8561 }
8562}
8563#line 8564 "parse.c"
8564 break;
8565
8566 case YYSYMBOL_allow_exits: /* allow_exits */
8567#line 2612 "parse.y"
8568 {
8569 if ((NODE *)((*yyvaluep).node_exits) == (NODE *)-1) {
8570 rb_parser_printf(p, "NODE_SPECIAL");
8571 }
8572 else if (((*yyvaluep).node_exits)) {
8573 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_exits)))));
8574 }
8575}
8576#line 8577 "parse.c"
8577 break;
8578
8579 case YYSYMBOL_stmt: /* stmt */
8580#line 2612 "parse.y"
8581 {
8582 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8583 rb_parser_printf(p, "NODE_SPECIAL");
8584 }
8585 else if (((*yyvaluep).node)) {
8586 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8587 }
8588}
8589#line 8590 "parse.c"
8590 break;
8591
8592 case YYSYMBOL_command_asgn: /* command_asgn */
8593#line 2612 "parse.y"
8594 {
8595 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8596 rb_parser_printf(p, "NODE_SPECIAL");
8597 }
8598 else if (((*yyvaluep).node)) {
8599 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8600 }
8601}
8602#line 8603 "parse.c"
8603 break;
8604
8605 case YYSYMBOL_endless_command: /* endless_command */
8606#line 2612 "parse.y"
8607 {
8608 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8609 rb_parser_printf(p, "NODE_SPECIAL");
8610 }
8611 else if (((*yyvaluep).node)) {
8612 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8613 }
8614}
8615#line 8616 "parse.c"
8616 break;
8617
8618 case YYSYMBOL_command_rhs: /* command_rhs */
8619#line 2612 "parse.y"
8620 {
8621 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8622 rb_parser_printf(p, "NODE_SPECIAL");
8623 }
8624 else if (((*yyvaluep).node)) {
8625 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8626 }
8627}
8628#line 8629 "parse.c"
8629 break;
8630
8631 case YYSYMBOL_expr: /* expr */
8632#line 2612 "parse.y"
8633 {
8634 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8635 rb_parser_printf(p, "NODE_SPECIAL");
8636 }
8637 else if (((*yyvaluep).node)) {
8638 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8639 }
8640}
8641#line 8642 "parse.c"
8642 break;
8643
8644 case YYSYMBOL_def_name: /* def_name */
8645#line 2621 "parse.y"
8646 {
8647 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8648}
8649#line 8650 "parse.c"
8650 break;
8651
8652 case YYSYMBOL_defn_head: /* defn_head */
8653#line 2612 "parse.y"
8654 {
8655 if ((NODE *)((*yyvaluep).node_def_temp) == (NODE *)-1) {
8656 rb_parser_printf(p, "NODE_SPECIAL");
8657 }
8658 else if (((*yyvaluep).node_def_temp)) {
8659 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_def_temp)))));
8660 }
8661}
8662#line 8663 "parse.c"
8663 break;
8664
8665 case YYSYMBOL_defs_head: /* defs_head */
8666#line 2612 "parse.y"
8667 {
8668 if ((NODE *)((*yyvaluep).node_def_temp) == (NODE *)-1) {
8669 rb_parser_printf(p, "NODE_SPECIAL");
8670 }
8671 else if (((*yyvaluep).node_def_temp)) {
8672 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_def_temp)))));
8673 }
8674}
8675#line 8676 "parse.c"
8676 break;
8677
8678 case YYSYMBOL_expr_value: /* expr_value */
8679#line 2612 "parse.y"
8680 {
8681 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8682 rb_parser_printf(p, "NODE_SPECIAL");
8683 }
8684 else if (((*yyvaluep).node)) {
8685 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8686 }
8687}
8688#line 8689 "parse.c"
8689 break;
8690
8691 case YYSYMBOL_expr_value_do: /* expr_value_do */
8692#line 2612 "parse.y"
8693 {
8694 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8695 rb_parser_printf(p, "NODE_SPECIAL");
8696 }
8697 else if (((*yyvaluep).node)) {
8698 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8699 }
8700}
8701#line 8702 "parse.c"
8702 break;
8703
8704 case YYSYMBOL_command_call: /* command_call */
8705#line 2612 "parse.y"
8706 {
8707 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8708 rb_parser_printf(p, "NODE_SPECIAL");
8709 }
8710 else if (((*yyvaluep).node)) {
8711 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8712 }
8713}
8714#line 8715 "parse.c"
8715 break;
8716
8717 case YYSYMBOL_block_command: /* block_command */
8718#line 2612 "parse.y"
8719 {
8720 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8721 rb_parser_printf(p, "NODE_SPECIAL");
8722 }
8723 else if (((*yyvaluep).node)) {
8724 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8725 }
8726}
8727#line 8728 "parse.c"
8728 break;
8729
8730 case YYSYMBOL_cmd_brace_block: /* cmd_brace_block */
8731#line 2612 "parse.y"
8732 {
8733 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8734 rb_parser_printf(p, "NODE_SPECIAL");
8735 }
8736 else if (((*yyvaluep).node)) {
8737 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8738 }
8739}
8740#line 8741 "parse.c"
8741 break;
8742
8743 case YYSYMBOL_fcall: /* fcall */
8744#line 2612 "parse.y"
8745 {
8746 if ((NODE *)((*yyvaluep).node_fcall) == (NODE *)-1) {
8747 rb_parser_printf(p, "NODE_SPECIAL");
8748 }
8749 else if (((*yyvaluep).node_fcall)) {
8750 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_fcall)))));
8751 }
8752}
8753#line 8754 "parse.c"
8754 break;
8755
8756 case YYSYMBOL_command: /* command */
8757#line 2612 "parse.y"
8758 {
8759 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8760 rb_parser_printf(p, "NODE_SPECIAL");
8761 }
8762 else if (((*yyvaluep).node)) {
8763 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8764 }
8765}
8766#line 8767 "parse.c"
8767 break;
8768
8769 case YYSYMBOL_mlhs: /* mlhs */
8770#line 2612 "parse.y"
8771 {
8772 if ((NODE *)((*yyvaluep).node_masgn) == (NODE *)-1) {
8773 rb_parser_printf(p, "NODE_SPECIAL");
8774 }
8775 else if (((*yyvaluep).node_masgn)) {
8776 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_masgn)))));
8777 }
8778}
8779#line 8780 "parse.c"
8780 break;
8781
8782 case YYSYMBOL_mlhs_inner: /* mlhs_inner */
8783#line 2612 "parse.y"
8784 {
8785 if ((NODE *)((*yyvaluep).node_masgn) == (NODE *)-1) {
8786 rb_parser_printf(p, "NODE_SPECIAL");
8787 }
8788 else if (((*yyvaluep).node_masgn)) {
8789 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_masgn)))));
8790 }
8791}
8792#line 8793 "parse.c"
8793 break;
8794
8795 case YYSYMBOL_mlhs_basic: /* mlhs_basic */
8796#line 2612 "parse.y"
8797 {
8798 if ((NODE *)((*yyvaluep).node_masgn) == (NODE *)-1) {
8799 rb_parser_printf(p, "NODE_SPECIAL");
8800 }
8801 else if (((*yyvaluep).node_masgn)) {
8802 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_masgn)))));
8803 }
8804}
8805#line 8806 "parse.c"
8806 break;
8807
8808 case YYSYMBOL_mlhs_item: /* mlhs_item */
8809#line 2612 "parse.y"
8810 {
8811 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8812 rb_parser_printf(p, "NODE_SPECIAL");
8813 }
8814 else if (((*yyvaluep).node)) {
8815 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8816 }
8817}
8818#line 8819 "parse.c"
8819 break;
8820
8821 case YYSYMBOL_mlhs_head: /* mlhs_head */
8822#line 2612 "parse.y"
8823 {
8824 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8825 rb_parser_printf(p, "NODE_SPECIAL");
8826 }
8827 else if (((*yyvaluep).node)) {
8828 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8829 }
8830}
8831#line 8832 "parse.c"
8832 break;
8833
8834 case YYSYMBOL_mlhs_post: /* mlhs_post */
8835#line 2612 "parse.y"
8836 {
8837 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8838 rb_parser_printf(p, "NODE_SPECIAL");
8839 }
8840 else if (((*yyvaluep).node)) {
8841 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8842 }
8843}
8844#line 8845 "parse.c"
8845 break;
8846
8847 case YYSYMBOL_mlhs_node: /* mlhs_node */
8848#line 2612 "parse.y"
8849 {
8850 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8851 rb_parser_printf(p, "NODE_SPECIAL");
8852 }
8853 else if (((*yyvaluep).node)) {
8854 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8855 }
8856}
8857#line 8858 "parse.c"
8858 break;
8859
8860 case YYSYMBOL_lhs: /* lhs */
8861#line 2612 "parse.y"
8862 {
8863 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8864 rb_parser_printf(p, "NODE_SPECIAL");
8865 }
8866 else if (((*yyvaluep).node)) {
8867 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8868 }
8869}
8870#line 8871 "parse.c"
8871 break;
8872
8873 case YYSYMBOL_cname: /* cname */
8874#line 2621 "parse.y"
8875 {
8876 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8877}
8878#line 8879 "parse.c"
8879 break;
8880
8881 case YYSYMBOL_cpath: /* cpath */
8882#line 2612 "parse.y"
8883 {
8884 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8885 rb_parser_printf(p, "NODE_SPECIAL");
8886 }
8887 else if (((*yyvaluep).node)) {
8888 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8889 }
8890}
8891#line 8892 "parse.c"
8892 break;
8893
8894 case YYSYMBOL_fname: /* fname */
8895#line 2621 "parse.y"
8896 {
8897 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8898}
8899#line 8900 "parse.c"
8900 break;
8901
8902 case YYSYMBOL_fitem: /* fitem */
8903#line 2612 "parse.y"
8904 {
8905 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8906 rb_parser_printf(p, "NODE_SPECIAL");
8907 }
8908 else if (((*yyvaluep).node)) {
8909 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8910 }
8911}
8912#line 8913 "parse.c"
8913 break;
8914
8915 case YYSYMBOL_undef_list: /* undef_list */
8916#line 2612 "parse.y"
8917 {
8918 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8919 rb_parser_printf(p, "NODE_SPECIAL");
8920 }
8921 else if (((*yyvaluep).node)) {
8922 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8923 }
8924}
8925#line 8926 "parse.c"
8926 break;
8927
8928 case YYSYMBOL_op: /* op */
8929#line 2621 "parse.y"
8930 {
8931 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8932}
8933#line 8934 "parse.c"
8934 break;
8935
8936 case YYSYMBOL_reswords: /* reswords */
8937#line 2621 "parse.y"
8938 {
8939 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8940}
8941#line 8942 "parse.c"
8942 break;
8943
8944 case YYSYMBOL_arg: /* arg */
8945#line 2612 "parse.y"
8946 {
8947 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8948 rb_parser_printf(p, "NODE_SPECIAL");
8949 }
8950 else if (((*yyvaluep).node)) {
8951 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8952 }
8953}
8954#line 8955 "parse.c"
8955 break;
8956
8957 case YYSYMBOL_endless_arg: /* endless_arg */
8958#line 2612 "parse.y"
8959 {
8960 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8961 rb_parser_printf(p, "NODE_SPECIAL");
8962 }
8963 else if (((*yyvaluep).node)) {
8964 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8965 }
8966}
8967#line 8968 "parse.c"
8968 break;
8969
8970 case YYSYMBOL_relop: /* relop */
8971#line 2621 "parse.y"
8972 {
8973 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
8974}
8975#line 8976 "parse.c"
8976 break;
8977
8978 case YYSYMBOL_rel_expr: /* rel_expr */
8979#line 2612 "parse.y"
8980 {
8981 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8982 rb_parser_printf(p, "NODE_SPECIAL");
8983 }
8984 else if (((*yyvaluep).node)) {
8985 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8986 }
8987}
8988#line 8989 "parse.c"
8989 break;
8990
8991 case YYSYMBOL_arg_value: /* arg_value */
8992#line 2612 "parse.y"
8993 {
8994 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
8995 rb_parser_printf(p, "NODE_SPECIAL");
8996 }
8997 else if (((*yyvaluep).node)) {
8998 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
8999 }
9000}
9001#line 9002 "parse.c"
9002 break;
9003
9004 case YYSYMBOL_aref_args: /* aref_args */
9005#line 2612 "parse.y"
9006 {
9007 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9008 rb_parser_printf(p, "NODE_SPECIAL");
9009 }
9010 else if (((*yyvaluep).node)) {
9011 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9012 }
9013}
9014#line 9015 "parse.c"
9015 break;
9016
9017 case YYSYMBOL_arg_rhs: /* arg_rhs */
9018#line 2612 "parse.y"
9019 {
9020 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9021 rb_parser_printf(p, "NODE_SPECIAL");
9022 }
9023 else if (((*yyvaluep).node)) {
9024 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9025 }
9026}
9027#line 9028 "parse.c"
9028 break;
9029
9030 case YYSYMBOL_paren_args: /* paren_args */
9031#line 2612 "parse.y"
9032 {
9033 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9034 rb_parser_printf(p, "NODE_SPECIAL");
9035 }
9036 else if (((*yyvaluep).node)) {
9037 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9038 }
9039}
9040#line 9041 "parse.c"
9041 break;
9042
9043 case YYSYMBOL_opt_paren_args: /* opt_paren_args */
9044#line 2612 "parse.y"
9045 {
9046 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9047 rb_parser_printf(p, "NODE_SPECIAL");
9048 }
9049 else if (((*yyvaluep).node)) {
9050 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9051 }
9052}
9053#line 9054 "parse.c"
9054 break;
9055
9056 case YYSYMBOL_opt_call_args: /* opt_call_args */
9057#line 2612 "parse.y"
9058 {
9059 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9060 rb_parser_printf(p, "NODE_SPECIAL");
9061 }
9062 else if (((*yyvaluep).node)) {
9063 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9064 }
9065}
9066#line 9067 "parse.c"
9067 break;
9068
9069 case YYSYMBOL_call_args: /* call_args */
9070#line 2612 "parse.y"
9071 {
9072 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9073 rb_parser_printf(p, "NODE_SPECIAL");
9074 }
9075 else if (((*yyvaluep).node)) {
9076 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9077 }
9078}
9079#line 9080 "parse.c"
9080 break;
9081
9082 case YYSYMBOL_command_args: /* command_args */
9083#line 2612 "parse.y"
9084 {
9085 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9086 rb_parser_printf(p, "NODE_SPECIAL");
9087 }
9088 else if (((*yyvaluep).node)) {
9089 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9090 }
9091}
9092#line 9093 "parse.c"
9093 break;
9094
9095 case YYSYMBOL_block_arg: /* block_arg */
9096#line 2612 "parse.y"
9097 {
9098 if ((NODE *)((*yyvaluep).node_block_pass) == (NODE *)-1) {
9099 rb_parser_printf(p, "NODE_SPECIAL");
9100 }
9101 else if (((*yyvaluep).node_block_pass)) {
9102 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_block_pass)))));
9103 }
9104}
9105#line 9106 "parse.c"
9106 break;
9107
9108 case YYSYMBOL_opt_block_arg: /* opt_block_arg */
9109#line 2612 "parse.y"
9110 {
9111 if ((NODE *)((*yyvaluep).node_block_pass) == (NODE *)-1) {
9112 rb_parser_printf(p, "NODE_SPECIAL");
9113 }
9114 else if (((*yyvaluep).node_block_pass)) {
9115 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_block_pass)))));
9116 }
9117}
9118#line 9119 "parse.c"
9119 break;
9120
9121 case YYSYMBOL_args: /* args */
9122#line 2612 "parse.y"
9123 {
9124 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9125 rb_parser_printf(p, "NODE_SPECIAL");
9126 }
9127 else if (((*yyvaluep).node)) {
9128 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9129 }
9130}
9131#line 9132 "parse.c"
9132 break;
9133
9134 case YYSYMBOL_arg_splat: /* arg_splat */
9135#line 2612 "parse.y"
9136 {
9137 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9138 rb_parser_printf(p, "NODE_SPECIAL");
9139 }
9140 else if (((*yyvaluep).node)) {
9141 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9142 }
9143}
9144#line 9145 "parse.c"
9145 break;
9146
9147 case YYSYMBOL_mrhs_arg: /* mrhs_arg */
9148#line 2612 "parse.y"
9149 {
9150 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9151 rb_parser_printf(p, "NODE_SPECIAL");
9152 }
9153 else if (((*yyvaluep).node)) {
9154 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9155 }
9156}
9157#line 9158 "parse.c"
9158 break;
9159
9160 case YYSYMBOL_mrhs: /* mrhs */
9161#line 2612 "parse.y"
9162 {
9163 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9164 rb_parser_printf(p, "NODE_SPECIAL");
9165 }
9166 else if (((*yyvaluep).node)) {
9167 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9168 }
9169}
9170#line 9171 "parse.c"
9171 break;
9172
9173 case YYSYMBOL_primary: /* primary */
9174#line 2612 "parse.y"
9175 {
9176 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9177 rb_parser_printf(p, "NODE_SPECIAL");
9178 }
9179 else if (((*yyvaluep).node)) {
9180 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9181 }
9182}
9183#line 9184 "parse.c"
9184 break;
9185
9186 case YYSYMBOL_primary_value: /* primary_value */
9187#line 2612 "parse.y"
9188 {
9189 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9190 rb_parser_printf(p, "NODE_SPECIAL");
9191 }
9192 else if (((*yyvaluep).node)) {
9193 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9194 }
9195}
9196#line 9197 "parse.c"
9197 break;
9198
9199 case YYSYMBOL_k_while: /* k_while */
9200#line 2612 "parse.y"
9201 {
9202 if ((NODE *)((*yyvaluep).node_exits) == (NODE *)-1) {
9203 rb_parser_printf(p, "NODE_SPECIAL");
9204 }
9205 else if (((*yyvaluep).node_exits)) {
9206 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_exits)))));
9207 }
9208}
9209#line 9210 "parse.c"
9210 break;
9211
9212 case YYSYMBOL_k_until: /* k_until */
9213#line 2612 "parse.y"
9214 {
9215 if ((NODE *)((*yyvaluep).node_exits) == (NODE *)-1) {
9216 rb_parser_printf(p, "NODE_SPECIAL");
9217 }
9218 else if (((*yyvaluep).node_exits)) {
9219 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_exits)))));
9220 }
9221}
9222#line 9223 "parse.c"
9223 break;
9224
9225 case YYSYMBOL_k_for: /* k_for */
9226#line 2612 "parse.y"
9227 {
9228 if ((NODE *)((*yyvaluep).node_exits) == (NODE *)-1) {
9229 rb_parser_printf(p, "NODE_SPECIAL");
9230 }
9231 else if (((*yyvaluep).node_exits)) {
9232 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_exits)))));
9233 }
9234}
9235#line 9236 "parse.c"
9236 break;
9237
9238 case YYSYMBOL_k_def: /* k_def */
9239#line 2612 "parse.y"
9240 {
9241 if ((NODE *)((*yyvaluep).node_def_temp) == (NODE *)-1) {
9242 rb_parser_printf(p, "NODE_SPECIAL");
9243 }
9244 else if (((*yyvaluep).node_def_temp)) {
9245 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_def_temp)))));
9246 }
9247}
9248#line 9249 "parse.c"
9249 break;
9250
9251 case YYSYMBOL_if_tail: /* if_tail */
9252#line 2612 "parse.y"
9253 {
9254 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9255 rb_parser_printf(p, "NODE_SPECIAL");
9256 }
9257 else if (((*yyvaluep).node)) {
9258 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9259 }
9260}
9261#line 9262 "parse.c"
9262 break;
9263
9264 case YYSYMBOL_opt_else: /* opt_else */
9265#line 2612 "parse.y"
9266 {
9267 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9268 rb_parser_printf(p, "NODE_SPECIAL");
9269 }
9270 else if (((*yyvaluep).node)) {
9271 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9272 }
9273}
9274#line 9275 "parse.c"
9275 break;
9276
9277 case YYSYMBOL_for_var: /* for_var */
9278#line 2612 "parse.y"
9279 {
9280 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9281 rb_parser_printf(p, "NODE_SPECIAL");
9282 }
9283 else if (((*yyvaluep).node)) {
9284 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9285 }
9286}
9287#line 9288 "parse.c"
9288 break;
9289
9290 case YYSYMBOL_f_marg: /* f_marg */
9291#line 2612 "parse.y"
9292 {
9293 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9294 rb_parser_printf(p, "NODE_SPECIAL");
9295 }
9296 else if (((*yyvaluep).node)) {
9297 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9298 }
9299}
9300#line 9301 "parse.c"
9301 break;
9302
9303 case YYSYMBOL_f_marg_list: /* f_marg_list */
9304#line 2612 "parse.y"
9305 {
9306 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9307 rb_parser_printf(p, "NODE_SPECIAL");
9308 }
9309 else if (((*yyvaluep).node)) {
9310 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9311 }
9312}
9313#line 9314 "parse.c"
9314 break;
9315
9316 case YYSYMBOL_f_margs: /* f_margs */
9317#line 2612 "parse.y"
9318 {
9319 if ((NODE *)((*yyvaluep).node_masgn) == (NODE *)-1) {
9320 rb_parser_printf(p, "NODE_SPECIAL");
9321 }
9322 else if (((*yyvaluep).node_masgn)) {
9323 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_masgn)))));
9324 }
9325}
9326#line 9327 "parse.c"
9327 break;
9328
9329 case YYSYMBOL_f_rest_marg: /* f_rest_marg */
9330#line 2612 "parse.y"
9331 {
9332 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9333 rb_parser_printf(p, "NODE_SPECIAL");
9334 }
9335 else if (((*yyvaluep).node)) {
9336 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9337 }
9338}
9339#line 9340 "parse.c"
9340 break;
9341
9342 case YYSYMBOL_f_any_kwrest: /* f_any_kwrest */
9343#line 2621 "parse.y"
9344 {
9345 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9346}
9347#line 9348 "parse.c"
9348 break;
9349
9350 case YYSYMBOL_f_kwarg_f_block_kw: /* f_kwarg_f_block_kw */
9351#line 2612 "parse.y"
9352 {
9353 if ((NODE *)((*yyvaluep).node_kw_arg) == (NODE *)-1) {
9354 rb_parser_printf(p, "NODE_SPECIAL");
9355 }
9356 else if (((*yyvaluep).node_kw_arg)) {
9357 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_kw_arg)))));
9358 }
9359}
9360#line 9361 "parse.c"
9361 break;
9362
9363 case YYSYMBOL_block_args_tail: /* block_args_tail */
9364#line 2612 "parse.y"
9365 {
9366 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9367 rb_parser_printf(p, "NODE_SPECIAL");
9368 }
9369 else if (((*yyvaluep).node_args)) {
9370 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9371 }
9372}
9373#line 9374 "parse.c"
9374 break;
9375
9376 case YYSYMBOL_excessed_comma: /* excessed_comma */
9377#line 2621 "parse.y"
9378 {
9379 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9380}
9381#line 9382 "parse.c"
9382 break;
9383
9384 case YYSYMBOL_f_opt_primary_value: /* f_opt_primary_value */
9385#line 2612 "parse.y"
9386 {
9387 if ((NODE *)((*yyvaluep).node_opt_arg) == (NODE *)-1) {
9388 rb_parser_printf(p, "NODE_SPECIAL");
9389 }
9390 else if (((*yyvaluep).node_opt_arg)) {
9391 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_opt_arg)))));
9392 }
9393}
9394#line 9395 "parse.c"
9395 break;
9396
9397 case YYSYMBOL_f_optarg_primary_value: /* f_optarg_primary_value */
9398#line 2612 "parse.y"
9399 {
9400 if ((NODE *)((*yyvaluep).node_opt_arg) == (NODE *)-1) {
9401 rb_parser_printf(p, "NODE_SPECIAL");
9402 }
9403 else if (((*yyvaluep).node_opt_arg)) {
9404 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_opt_arg)))));
9405 }
9406}
9407#line 9408 "parse.c"
9408 break;
9409
9410 case YYSYMBOL_opt_args_tail_block_args_tail: /* opt_args_tail_block_args_tail */
9411#line 2612 "parse.y"
9412 {
9413 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9414 rb_parser_printf(p, "NODE_SPECIAL");
9415 }
9416 else if (((*yyvaluep).node_args)) {
9417 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9418 }
9419}
9420#line 9421 "parse.c"
9421 break;
9422
9423 case YYSYMBOL_block_param: /* block_param */
9424#line 2612 "parse.y"
9425 {
9426 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9427 rb_parser_printf(p, "NODE_SPECIAL");
9428 }
9429 else if (((*yyvaluep).node_args)) {
9430 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9431 }
9432}
9433#line 9434 "parse.c"
9434 break;
9435
9436 case YYSYMBOL_opt_block_param: /* opt_block_param */
9437#line 2612 "parse.y"
9438 {
9439 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9440 rb_parser_printf(p, "NODE_SPECIAL");
9441 }
9442 else if (((*yyvaluep).node_args)) {
9443 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9444 }
9445}
9446#line 9447 "parse.c"
9447 break;
9448
9449 case YYSYMBOL_block_param_def: /* block_param_def */
9450#line 2612 "parse.y"
9451 {
9452 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9453 rb_parser_printf(p, "NODE_SPECIAL");
9454 }
9455 else if (((*yyvaluep).node_args)) {
9456 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9457 }
9458}
9459#line 9460 "parse.c"
9460 break;
9461
9462 case YYSYMBOL_opt_bv_decl: /* opt_bv_decl */
9463#line 2621 "parse.y"
9464 {
9465 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9466}
9467#line 9468 "parse.c"
9468 break;
9469
9470 case YYSYMBOL_bv_decls: /* bv_decls */
9471#line 2621 "parse.y"
9472 {
9473 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9474}
9475#line 9476 "parse.c"
9476 break;
9477
9478 case YYSYMBOL_bvar: /* bvar */
9479#line 2621 "parse.y"
9480 {
9481 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9482}
9483#line 9484 "parse.c"
9484 break;
9485
9486 case YYSYMBOL_numparam: /* numparam */
9487#line 2612 "parse.y"
9488 {
9489 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9490 rb_parser_printf(p, "NODE_SPECIAL");
9491 }
9492 else if (((*yyvaluep).node)) {
9493 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9494 }
9495}
9496#line 9497 "parse.c"
9497 break;
9498
9499 case YYSYMBOL_it_id: /* it_id */
9500#line 2621 "parse.y"
9501 {
9502 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9503}
9504#line 9505 "parse.c"
9505 break;
9506
9507 case YYSYMBOL_lambda: /* lambda */
9508#line 2612 "parse.y"
9509 {
9510 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9511 rb_parser_printf(p, "NODE_SPECIAL");
9512 }
9513 else if (((*yyvaluep).node)) {
9514 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9515 }
9516}
9517#line 9518 "parse.c"
9518 break;
9519
9520 case YYSYMBOL_f_larglist: /* f_larglist */
9521#line 2612 "parse.y"
9522 {
9523 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
9524 rb_parser_printf(p, "NODE_SPECIAL");
9525 }
9526 else if (((*yyvaluep).node_args)) {
9527 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
9528 }
9529}
9530#line 9531 "parse.c"
9531 break;
9532
9533 case YYSYMBOL_lambda_body: /* lambda_body */
9534#line 2612 "parse.y"
9535 {
9536 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9537 rb_parser_printf(p, "NODE_SPECIAL");
9538 }
9539 else if (((*yyvaluep).node)) {
9540 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9541 }
9542}
9543#line 9544 "parse.c"
9544 break;
9545
9546 case YYSYMBOL_do_block: /* do_block */
9547#line 2612 "parse.y"
9548 {
9549 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9550 rb_parser_printf(p, "NODE_SPECIAL");
9551 }
9552 else if (((*yyvaluep).node)) {
9553 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9554 }
9555}
9556#line 9557 "parse.c"
9557 break;
9558
9559 case YYSYMBOL_block_call: /* block_call */
9560#line 2612 "parse.y"
9561 {
9562 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9563 rb_parser_printf(p, "NODE_SPECIAL");
9564 }
9565 else if (((*yyvaluep).node)) {
9566 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9567 }
9568}
9569#line 9570 "parse.c"
9570 break;
9571
9572 case YYSYMBOL_method_call: /* method_call */
9573#line 2612 "parse.y"
9574 {
9575 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9576 rb_parser_printf(p, "NODE_SPECIAL");
9577 }
9578 else if (((*yyvaluep).node)) {
9579 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9580 }
9581}
9582#line 9583 "parse.c"
9583 break;
9584
9585 case YYSYMBOL_brace_block: /* brace_block */
9586#line 2612 "parse.y"
9587 {
9588 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9589 rb_parser_printf(p, "NODE_SPECIAL");
9590 }
9591 else if (((*yyvaluep).node)) {
9592 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9593 }
9594}
9595#line 9596 "parse.c"
9596 break;
9597
9598 case YYSYMBOL_brace_body: /* brace_body */
9599#line 2612 "parse.y"
9600 {
9601 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9602 rb_parser_printf(p, "NODE_SPECIAL");
9603 }
9604 else if (((*yyvaluep).node)) {
9605 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9606 }
9607}
9608#line 9609 "parse.c"
9609 break;
9610
9611 case YYSYMBOL_do_body: /* do_body */
9612#line 2612 "parse.y"
9613 {
9614 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9615 rb_parser_printf(p, "NODE_SPECIAL");
9616 }
9617 else if (((*yyvaluep).node)) {
9618 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9619 }
9620}
9621#line 9622 "parse.c"
9622 break;
9623
9624 case YYSYMBOL_case_args: /* case_args */
9625#line 2612 "parse.y"
9626 {
9627 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9628 rb_parser_printf(p, "NODE_SPECIAL");
9629 }
9630 else if (((*yyvaluep).node)) {
9631 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9632 }
9633}
9634#line 9635 "parse.c"
9635 break;
9636
9637 case YYSYMBOL_case_body: /* case_body */
9638#line 2612 "parse.y"
9639 {
9640 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9641 rb_parser_printf(p, "NODE_SPECIAL");
9642 }
9643 else if (((*yyvaluep).node)) {
9644 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9645 }
9646}
9647#line 9648 "parse.c"
9648 break;
9649
9650 case YYSYMBOL_cases: /* cases */
9651#line 2612 "parse.y"
9652 {
9653 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9654 rb_parser_printf(p, "NODE_SPECIAL");
9655 }
9656 else if (((*yyvaluep).node)) {
9657 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9658 }
9659}
9660#line 9661 "parse.c"
9661 break;
9662
9663 case YYSYMBOL_p_case_body: /* p_case_body */
9664#line 2612 "parse.y"
9665 {
9666 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9667 rb_parser_printf(p, "NODE_SPECIAL");
9668 }
9669 else if (((*yyvaluep).node)) {
9670 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9671 }
9672}
9673#line 9674 "parse.c"
9674 break;
9675
9676 case YYSYMBOL_p_cases: /* p_cases */
9677#line 2612 "parse.y"
9678 {
9679 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9680 rb_parser_printf(p, "NODE_SPECIAL");
9681 }
9682 else if (((*yyvaluep).node)) {
9683 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9684 }
9685}
9686#line 9687 "parse.c"
9687 break;
9688
9689 case YYSYMBOL_p_top_expr: /* p_top_expr */
9690#line 2612 "parse.y"
9691 {
9692 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9693 rb_parser_printf(p, "NODE_SPECIAL");
9694 }
9695 else if (((*yyvaluep).node)) {
9696 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9697 }
9698}
9699#line 9700 "parse.c"
9700 break;
9701
9702 case YYSYMBOL_p_top_expr_body: /* p_top_expr_body */
9703#line 2612 "parse.y"
9704 {
9705 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9706 rb_parser_printf(p, "NODE_SPECIAL");
9707 }
9708 else if (((*yyvaluep).node)) {
9709 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9710 }
9711}
9712#line 9713 "parse.c"
9713 break;
9714
9715 case YYSYMBOL_p_expr: /* p_expr */
9716#line 2612 "parse.y"
9717 {
9718 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9719 rb_parser_printf(p, "NODE_SPECIAL");
9720 }
9721 else if (((*yyvaluep).node)) {
9722 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9723 }
9724}
9725#line 9726 "parse.c"
9726 break;
9727
9728 case YYSYMBOL_p_as: /* p_as */
9729#line 2612 "parse.y"
9730 {
9731 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9732 rb_parser_printf(p, "NODE_SPECIAL");
9733 }
9734 else if (((*yyvaluep).node)) {
9735 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9736 }
9737}
9738#line 9739 "parse.c"
9739 break;
9740
9741 case YYSYMBOL_p_alt: /* p_alt */
9742#line 2612 "parse.y"
9743 {
9744 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9745 rb_parser_printf(p, "NODE_SPECIAL");
9746 }
9747 else if (((*yyvaluep).node)) {
9748 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9749 }
9750}
9751#line 9752 "parse.c"
9752 break;
9753
9754 case YYSYMBOL_p_expr_basic: /* p_expr_basic */
9755#line 2612 "parse.y"
9756 {
9757 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9758 rb_parser_printf(p, "NODE_SPECIAL");
9759 }
9760 else if (((*yyvaluep).node)) {
9761 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9762 }
9763}
9764#line 9765 "parse.c"
9765 break;
9766
9767 case YYSYMBOL_p_args: /* p_args */
9768#line 2612 "parse.y"
9769 {
9770 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9771 rb_parser_printf(p, "NODE_SPECIAL");
9772 }
9773 else if (((*yyvaluep).node)) {
9774 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9775 }
9776}
9777#line 9778 "parse.c"
9778 break;
9779
9780 case YYSYMBOL_p_args_head: /* p_args_head */
9781#line 2612 "parse.y"
9782 {
9783 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9784 rb_parser_printf(p, "NODE_SPECIAL");
9785 }
9786 else if (((*yyvaluep).node)) {
9787 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9788 }
9789}
9790#line 9791 "parse.c"
9791 break;
9792
9793 case YYSYMBOL_p_args_tail: /* p_args_tail */
9794#line 2612 "parse.y"
9795 {
9796 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9797 rb_parser_printf(p, "NODE_SPECIAL");
9798 }
9799 else if (((*yyvaluep).node)) {
9800 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9801 }
9802}
9803#line 9804 "parse.c"
9804 break;
9805
9806 case YYSYMBOL_p_find: /* p_find */
9807#line 2612 "parse.y"
9808 {
9809 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9810 rb_parser_printf(p, "NODE_SPECIAL");
9811 }
9812 else if (((*yyvaluep).node)) {
9813 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9814 }
9815}
9816#line 9817 "parse.c"
9817 break;
9818
9819 case YYSYMBOL_p_rest: /* p_rest */
9820#line 2612 "parse.y"
9821 {
9822 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9823 rb_parser_printf(p, "NODE_SPECIAL");
9824 }
9825 else if (((*yyvaluep).node)) {
9826 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9827 }
9828}
9829#line 9830 "parse.c"
9830 break;
9831
9832 case YYSYMBOL_p_args_post: /* p_args_post */
9833#line 2612 "parse.y"
9834 {
9835 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9836 rb_parser_printf(p, "NODE_SPECIAL");
9837 }
9838 else if (((*yyvaluep).node)) {
9839 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9840 }
9841}
9842#line 9843 "parse.c"
9843 break;
9844
9845 case YYSYMBOL_p_arg: /* p_arg */
9846#line 2612 "parse.y"
9847 {
9848 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9849 rb_parser_printf(p, "NODE_SPECIAL");
9850 }
9851 else if (((*yyvaluep).node)) {
9852 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9853 }
9854}
9855#line 9856 "parse.c"
9856 break;
9857
9858 case YYSYMBOL_p_kwargs: /* p_kwargs */
9859#line 2612 "parse.y"
9860 {
9861 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9862 rb_parser_printf(p, "NODE_SPECIAL");
9863 }
9864 else if (((*yyvaluep).node)) {
9865 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9866 }
9867}
9868#line 9869 "parse.c"
9869 break;
9870
9871 case YYSYMBOL_p_kwarg: /* p_kwarg */
9872#line 2612 "parse.y"
9873 {
9874 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9875 rb_parser_printf(p, "NODE_SPECIAL");
9876 }
9877 else if (((*yyvaluep).node)) {
9878 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9879 }
9880}
9881#line 9882 "parse.c"
9882 break;
9883
9884 case YYSYMBOL_p_kw: /* p_kw */
9885#line 2612 "parse.y"
9886 {
9887 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9888 rb_parser_printf(p, "NODE_SPECIAL");
9889 }
9890 else if (((*yyvaluep).node)) {
9891 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9892 }
9893}
9894#line 9895 "parse.c"
9895 break;
9896
9897 case YYSYMBOL_p_kw_label: /* p_kw_label */
9898#line 2621 "parse.y"
9899 {
9900 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9901}
9902#line 9903 "parse.c"
9903 break;
9904
9905 case YYSYMBOL_p_kwrest: /* p_kwrest */
9906#line 2621 "parse.y"
9907 {
9908 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9909}
9910#line 9911 "parse.c"
9911 break;
9912
9913 case YYSYMBOL_p_kwnorest: /* p_kwnorest */
9914#line 2621 "parse.y"
9915 {
9916 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9917}
9918#line 9919 "parse.c"
9919 break;
9920
9921 case YYSYMBOL_p_any_kwrest: /* p_any_kwrest */
9922#line 2621 "parse.y"
9923 {
9924 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
9925}
9926#line 9927 "parse.c"
9927 break;
9928
9929 case YYSYMBOL_p_value: /* p_value */
9930#line 2612 "parse.y"
9931 {
9932 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9933 rb_parser_printf(p, "NODE_SPECIAL");
9934 }
9935 else if (((*yyvaluep).node)) {
9936 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9937 }
9938}
9939#line 9940 "parse.c"
9940 break;
9941
9942 case YYSYMBOL_p_primitive: /* p_primitive */
9943#line 2612 "parse.y"
9944 {
9945 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9946 rb_parser_printf(p, "NODE_SPECIAL");
9947 }
9948 else if (((*yyvaluep).node)) {
9949 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9950 }
9951}
9952#line 9953 "parse.c"
9953 break;
9954
9955 case YYSYMBOL_p_variable: /* p_variable */
9956#line 2612 "parse.y"
9957 {
9958 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9959 rb_parser_printf(p, "NODE_SPECIAL");
9960 }
9961 else if (((*yyvaluep).node)) {
9962 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9963 }
9964}
9965#line 9966 "parse.c"
9966 break;
9967
9968 case YYSYMBOL_p_var_ref: /* p_var_ref */
9969#line 2612 "parse.y"
9970 {
9971 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9972 rb_parser_printf(p, "NODE_SPECIAL");
9973 }
9974 else if (((*yyvaluep).node)) {
9975 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9976 }
9977}
9978#line 9979 "parse.c"
9979 break;
9980
9981 case YYSYMBOL_p_expr_ref: /* p_expr_ref */
9982#line 2612 "parse.y"
9983 {
9984 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9985 rb_parser_printf(p, "NODE_SPECIAL");
9986 }
9987 else if (((*yyvaluep).node)) {
9988 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
9989 }
9990}
9991#line 9992 "parse.c"
9992 break;
9993
9994 case YYSYMBOL_p_const: /* p_const */
9995#line 2612 "parse.y"
9996 {
9997 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
9998 rb_parser_printf(p, "NODE_SPECIAL");
9999 }
10000 else if (((*yyvaluep).node)) {
10001 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10002 }
10003}
10004#line 10005 "parse.c"
10005 break;
10006
10007 case YYSYMBOL_opt_rescue: /* opt_rescue */
10008#line 2612 "parse.y"
10009 {
10010 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10011 rb_parser_printf(p, "NODE_SPECIAL");
10012 }
10013 else if (((*yyvaluep).node)) {
10014 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10015 }
10016}
10017#line 10018 "parse.c"
10018 break;
10019
10020 case YYSYMBOL_exc_list: /* exc_list */
10021#line 2612 "parse.y"
10022 {
10023 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10024 rb_parser_printf(p, "NODE_SPECIAL");
10025 }
10026 else if (((*yyvaluep).node)) {
10027 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10028 }
10029}
10030#line 10031 "parse.c"
10031 break;
10032
10033 case YYSYMBOL_exc_var: /* exc_var */
10034#line 2612 "parse.y"
10035 {
10036 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10037 rb_parser_printf(p, "NODE_SPECIAL");
10038 }
10039 else if (((*yyvaluep).node)) {
10040 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10041 }
10042}
10043#line 10044 "parse.c"
10044 break;
10045
10046 case YYSYMBOL_opt_ensure: /* opt_ensure */
10047#line 2612 "parse.y"
10048 {
10049 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10050 rb_parser_printf(p, "NODE_SPECIAL");
10051 }
10052 else if (((*yyvaluep).node)) {
10053 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10054 }
10055}
10056#line 10057 "parse.c"
10057 break;
10058
10059 case YYSYMBOL_literal: /* literal */
10060#line 2612 "parse.y"
10061 {
10062 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10063 rb_parser_printf(p, "NODE_SPECIAL");
10064 }
10065 else if (((*yyvaluep).node)) {
10066 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10067 }
10068}
10069#line 10070 "parse.c"
10070 break;
10071
10072 case YYSYMBOL_strings: /* strings */
10073#line 2612 "parse.y"
10074 {
10075 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10076 rb_parser_printf(p, "NODE_SPECIAL");
10077 }
10078 else if (((*yyvaluep).node)) {
10079 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10080 }
10081}
10082#line 10083 "parse.c"
10083 break;
10084
10085 case YYSYMBOL_string: /* string */
10086#line 2612 "parse.y"
10087 {
10088 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10089 rb_parser_printf(p, "NODE_SPECIAL");
10090 }
10091 else if (((*yyvaluep).node)) {
10092 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10093 }
10094}
10095#line 10096 "parse.c"
10096 break;
10097
10098 case YYSYMBOL_string1: /* string1 */
10099#line 2612 "parse.y"
10100 {
10101 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10102 rb_parser_printf(p, "NODE_SPECIAL");
10103 }
10104 else if (((*yyvaluep).node)) {
10105 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10106 }
10107}
10108#line 10109 "parse.c"
10109 break;
10110
10111 case YYSYMBOL_xstring: /* xstring */
10112#line 2612 "parse.y"
10113 {
10114 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10115 rb_parser_printf(p, "NODE_SPECIAL");
10116 }
10117 else if (((*yyvaluep).node)) {
10118 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10119 }
10120}
10121#line 10122 "parse.c"
10122 break;
10123
10124 case YYSYMBOL_regexp: /* regexp */
10125#line 2612 "parse.y"
10126 {
10127 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10128 rb_parser_printf(p, "NODE_SPECIAL");
10129 }
10130 else if (((*yyvaluep).node)) {
10131 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10132 }
10133}
10134#line 10135 "parse.c"
10135 break;
10136
10137 case YYSYMBOL_words_tWORDS_BEG_word_list: /* words_tWORDS_BEG_word_list */
10138#line 2612 "parse.y"
10139 {
10140 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10141 rb_parser_printf(p, "NODE_SPECIAL");
10142 }
10143 else if (((*yyvaluep).node)) {
10144 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10145 }
10146}
10147#line 10148 "parse.c"
10148 break;
10149
10150 case YYSYMBOL_words: /* words */
10151#line 2612 "parse.y"
10152 {
10153 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10154 rb_parser_printf(p, "NODE_SPECIAL");
10155 }
10156 else if (((*yyvaluep).node)) {
10157 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10158 }
10159}
10160#line 10161 "parse.c"
10161 break;
10162
10163 case YYSYMBOL_word_list: /* word_list */
10164#line 2612 "parse.y"
10165 {
10166 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10167 rb_parser_printf(p, "NODE_SPECIAL");
10168 }
10169 else if (((*yyvaluep).node)) {
10170 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10171 }
10172}
10173#line 10174 "parse.c"
10174 break;
10175
10176 case YYSYMBOL_word: /* word */
10177#line 2612 "parse.y"
10178 {
10179 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10180 rb_parser_printf(p, "NODE_SPECIAL");
10181 }
10182 else if (((*yyvaluep).node)) {
10183 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10184 }
10185}
10186#line 10187 "parse.c"
10187 break;
10188
10189 case YYSYMBOL_words_tSYMBOLS_BEG_symbol_list: /* words_tSYMBOLS_BEG_symbol_list */
10190#line 2612 "parse.y"
10191 {
10192 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10193 rb_parser_printf(p, "NODE_SPECIAL");
10194 }
10195 else if (((*yyvaluep).node)) {
10196 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10197 }
10198}
10199#line 10200 "parse.c"
10200 break;
10201
10202 case YYSYMBOL_symbols: /* symbols */
10203#line 2612 "parse.y"
10204 {
10205 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10206 rb_parser_printf(p, "NODE_SPECIAL");
10207 }
10208 else if (((*yyvaluep).node)) {
10209 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10210 }
10211}
10212#line 10213 "parse.c"
10213 break;
10214
10215 case YYSYMBOL_symbol_list: /* symbol_list */
10216#line 2612 "parse.y"
10217 {
10218 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10219 rb_parser_printf(p, "NODE_SPECIAL");
10220 }
10221 else if (((*yyvaluep).node)) {
10222 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10223 }
10224}
10225#line 10226 "parse.c"
10226 break;
10227
10228 case YYSYMBOL_words_tQWORDS_BEG_qword_list: /* words_tQWORDS_BEG_qword_list */
10229#line 2612 "parse.y"
10230 {
10231 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10232 rb_parser_printf(p, "NODE_SPECIAL");
10233 }
10234 else if (((*yyvaluep).node)) {
10235 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10236 }
10237}
10238#line 10239 "parse.c"
10239 break;
10240
10241 case YYSYMBOL_qwords: /* qwords */
10242#line 2612 "parse.y"
10243 {
10244 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10245 rb_parser_printf(p, "NODE_SPECIAL");
10246 }
10247 else if (((*yyvaluep).node)) {
10248 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10249 }
10250}
10251#line 10252 "parse.c"
10252 break;
10253
10254 case YYSYMBOL_words_tQSYMBOLS_BEG_qsym_list: /* words_tQSYMBOLS_BEG_qsym_list */
10255#line 2612 "parse.y"
10256 {
10257 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10258 rb_parser_printf(p, "NODE_SPECIAL");
10259 }
10260 else if (((*yyvaluep).node)) {
10261 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10262 }
10263}
10264#line 10265 "parse.c"
10265 break;
10266
10267 case YYSYMBOL_qsymbols: /* qsymbols */
10268#line 2612 "parse.y"
10269 {
10270 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10271 rb_parser_printf(p, "NODE_SPECIAL");
10272 }
10273 else if (((*yyvaluep).node)) {
10274 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10275 }
10276}
10277#line 10278 "parse.c"
10278 break;
10279
10280 case YYSYMBOL_qword_list: /* qword_list */
10281#line 2612 "parse.y"
10282 {
10283 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10284 rb_parser_printf(p, "NODE_SPECIAL");
10285 }
10286 else if (((*yyvaluep).node)) {
10287 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10288 }
10289}
10290#line 10291 "parse.c"
10291 break;
10292
10293 case YYSYMBOL_qsym_list: /* qsym_list */
10294#line 2612 "parse.y"
10295 {
10296 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10297 rb_parser_printf(p, "NODE_SPECIAL");
10298 }
10299 else if (((*yyvaluep).node)) {
10300 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10301 }
10302}
10303#line 10304 "parse.c"
10304 break;
10305
10306 case YYSYMBOL_string_contents: /* string_contents */
10307#line 2612 "parse.y"
10308 {
10309 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10310 rb_parser_printf(p, "NODE_SPECIAL");
10311 }
10312 else if (((*yyvaluep).node)) {
10313 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10314 }
10315}
10316#line 10317 "parse.c"
10317 break;
10318
10319 case YYSYMBOL_xstring_contents: /* xstring_contents */
10320#line 2612 "parse.y"
10321 {
10322 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10323 rb_parser_printf(p, "NODE_SPECIAL");
10324 }
10325 else if (((*yyvaluep).node)) {
10326 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10327 }
10328}
10329#line 10330 "parse.c"
10330 break;
10331
10332 case YYSYMBOL_regexp_contents: /* regexp_contents */
10333#line 2612 "parse.y"
10334 {
10335 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10336 rb_parser_printf(p, "NODE_SPECIAL");
10337 }
10338 else if (((*yyvaluep).node)) {
10339 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10340 }
10341}
10342#line 10343 "parse.c"
10343 break;
10344
10345 case YYSYMBOL_string_content: /* string_content */
10346#line 2612 "parse.y"
10347 {
10348 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10349 rb_parser_printf(p, "NODE_SPECIAL");
10350 }
10351 else if (((*yyvaluep).node)) {
10352 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10353 }
10354}
10355#line 10356 "parse.c"
10356 break;
10357
10358 case YYSYMBOL_string_dvar: /* string_dvar */
10359#line 2612 "parse.y"
10360 {
10361 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10362 rb_parser_printf(p, "NODE_SPECIAL");
10363 }
10364 else if (((*yyvaluep).node)) {
10365 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10366 }
10367}
10368#line 10369 "parse.c"
10369 break;
10370
10371 case YYSYMBOL_symbol: /* symbol */
10372#line 2612 "parse.y"
10373 {
10374 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10375 rb_parser_printf(p, "NODE_SPECIAL");
10376 }
10377 else if (((*yyvaluep).node)) {
10378 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10379 }
10380}
10381#line 10382 "parse.c"
10382 break;
10383
10384 case YYSYMBOL_ssym: /* ssym */
10385#line 2612 "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_sym: /* sym */
10398#line 2621 "parse.y"
10399 {
10400 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10401}
10402#line 10403 "parse.c"
10403 break;
10404
10405 case YYSYMBOL_dsym: /* dsym */
10406#line 2612 "parse.y"
10407 {
10408 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10409 rb_parser_printf(p, "NODE_SPECIAL");
10410 }
10411 else if (((*yyvaluep).node)) {
10412 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10413 }
10414}
10415#line 10416 "parse.c"
10416 break;
10417
10418 case YYSYMBOL_numeric: /* numeric */
10419#line 2612 "parse.y"
10420 {
10421 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10422 rb_parser_printf(p, "NODE_SPECIAL");
10423 }
10424 else if (((*yyvaluep).node)) {
10425 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10426 }
10427}
10428#line 10429 "parse.c"
10429 break;
10430
10431 case YYSYMBOL_simple_numeric: /* simple_numeric */
10432#line 2612 "parse.y"
10433 {
10434 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10435 rb_parser_printf(p, "NODE_SPECIAL");
10436 }
10437 else if (((*yyvaluep).node)) {
10438 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10439 }
10440}
10441#line 10442 "parse.c"
10442 break;
10443
10444 case YYSYMBOL_nonlocal_var: /* nonlocal_var */
10445#line 2621 "parse.y"
10446 {
10447 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10448}
10449#line 10450 "parse.c"
10450 break;
10451
10452 case YYSYMBOL_user_variable: /* user_variable */
10453#line 2621 "parse.y"
10454 {
10455 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10456}
10457#line 10458 "parse.c"
10458 break;
10459
10460 case YYSYMBOL_keyword_variable: /* keyword_variable */
10461#line 2621 "parse.y"
10462 {
10463 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10464}
10465#line 10466 "parse.c"
10466 break;
10467
10468 case YYSYMBOL_var_ref: /* var_ref */
10469#line 2612 "parse.y"
10470 {
10471 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10472 rb_parser_printf(p, "NODE_SPECIAL");
10473 }
10474 else if (((*yyvaluep).node)) {
10475 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10476 }
10477}
10478#line 10479 "parse.c"
10479 break;
10480
10481 case YYSYMBOL_var_lhs: /* var_lhs */
10482#line 2612 "parse.y"
10483 {
10484 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10485 rb_parser_printf(p, "NODE_SPECIAL");
10486 }
10487 else if (((*yyvaluep).node)) {
10488 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10489 }
10490}
10491#line 10492 "parse.c"
10492 break;
10493
10494 case YYSYMBOL_backref: /* backref */
10495#line 2612 "parse.y"
10496 {
10497 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10498 rb_parser_printf(p, "NODE_SPECIAL");
10499 }
10500 else if (((*yyvaluep).node)) {
10501 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10502 }
10503}
10504#line 10505 "parse.c"
10505 break;
10506
10507 case YYSYMBOL_superclass: /* superclass */
10508#line 2612 "parse.y"
10509 {
10510 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10511 rb_parser_printf(p, "NODE_SPECIAL");
10512 }
10513 else if (((*yyvaluep).node)) {
10514 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10515 }
10516}
10517#line 10518 "parse.c"
10518 break;
10519
10520 case YYSYMBOL_f_opt_paren_args: /* f_opt_paren_args */
10521#line 2612 "parse.y"
10522 {
10523 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
10524 rb_parser_printf(p, "NODE_SPECIAL");
10525 }
10526 else if (((*yyvaluep).node_args)) {
10527 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
10528 }
10529}
10530#line 10531 "parse.c"
10531 break;
10532
10533 case YYSYMBOL_f_paren_args: /* f_paren_args */
10534#line 2612 "parse.y"
10535 {
10536 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
10537 rb_parser_printf(p, "NODE_SPECIAL");
10538 }
10539 else if (((*yyvaluep).node_args)) {
10540 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
10541 }
10542}
10543#line 10544 "parse.c"
10544 break;
10545
10546 case YYSYMBOL_f_arglist: /* f_arglist */
10547#line 2612 "parse.y"
10548 {
10549 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
10550 rb_parser_printf(p, "NODE_SPECIAL");
10551 }
10552 else if (((*yyvaluep).node_args)) {
10553 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
10554 }
10555}
10556#line 10557 "parse.c"
10557 break;
10558
10559 case YYSYMBOL_f_kwarg_f_kw: /* f_kwarg_f_kw */
10560#line 2612 "parse.y"
10561 {
10562 if ((NODE *)((*yyvaluep).node_kw_arg) == (NODE *)-1) {
10563 rb_parser_printf(p, "NODE_SPECIAL");
10564 }
10565 else if (((*yyvaluep).node_kw_arg)) {
10566 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_kw_arg)))));
10567 }
10568}
10569#line 10570 "parse.c"
10570 break;
10571
10572 case YYSYMBOL_args_tail: /* args_tail */
10573#line 2612 "parse.y"
10574 {
10575 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
10576 rb_parser_printf(p, "NODE_SPECIAL");
10577 }
10578 else if (((*yyvaluep).node_args)) {
10579 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
10580 }
10581}
10582#line 10583 "parse.c"
10583 break;
10584
10585 case YYSYMBOL_f_opt_arg_value: /* f_opt_arg_value */
10586#line 2612 "parse.y"
10587 {
10588 if ((NODE *)((*yyvaluep).node_opt_arg) == (NODE *)-1) {
10589 rb_parser_printf(p, "NODE_SPECIAL");
10590 }
10591 else if (((*yyvaluep).node_opt_arg)) {
10592 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_opt_arg)))));
10593 }
10594}
10595#line 10596 "parse.c"
10596 break;
10597
10598 case YYSYMBOL_f_optarg_arg_value: /* f_optarg_arg_value */
10599#line 2612 "parse.y"
10600 {
10601 if ((NODE *)((*yyvaluep).node_opt_arg) == (NODE *)-1) {
10602 rb_parser_printf(p, "NODE_SPECIAL");
10603 }
10604 else if (((*yyvaluep).node_opt_arg)) {
10605 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_opt_arg)))));
10606 }
10607}
10608#line 10609 "parse.c"
10609 break;
10610
10611 case YYSYMBOL_opt_args_tail_args_tail: /* opt_args_tail_args_tail */
10612#line 2612 "parse.y"
10613 {
10614 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
10615 rb_parser_printf(p, "NODE_SPECIAL");
10616 }
10617 else if (((*yyvaluep).node_args)) {
10618 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
10619 }
10620}
10621#line 10622 "parse.c"
10622 break;
10623
10624 case YYSYMBOL_f_args: /* f_args */
10625#line 2612 "parse.y"
10626 {
10627 if ((NODE *)((*yyvaluep).node_args) == (NODE *)-1) {
10628 rb_parser_printf(p, "NODE_SPECIAL");
10629 }
10630 else if (((*yyvaluep).node_args)) {
10631 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args)))));
10632 }
10633}
10634#line 10635 "parse.c"
10635 break;
10636
10637 case YYSYMBOL_args_forward: /* args_forward */
10638#line 2621 "parse.y"
10639 {
10640 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10641}
10642#line 10643 "parse.c"
10643 break;
10644
10645 case YYSYMBOL_f_bad_arg: /* f_bad_arg */
10646#line 2621 "parse.y"
10647 {
10648 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10649}
10650#line 10651 "parse.c"
10651 break;
10652
10653 case YYSYMBOL_f_norm_arg: /* f_norm_arg */
10654#line 2621 "parse.y"
10655 {
10656 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10657}
10658#line 10659 "parse.c"
10659 break;
10660
10661 case YYSYMBOL_f_arg_asgn: /* f_arg_asgn */
10662#line 2621 "parse.y"
10663 {
10664 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10665}
10666#line 10667 "parse.c"
10667 break;
10668
10669 case YYSYMBOL_f_arg_item: /* f_arg_item */
10670#line 2612 "parse.y"
10671 {
10672 if ((NODE *)((*yyvaluep).node_args_aux) == (NODE *)-1) {
10673 rb_parser_printf(p, "NODE_SPECIAL");
10674 }
10675 else if (((*yyvaluep).node_args_aux)) {
10676 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args_aux)))));
10677 }
10678}
10679#line 10680 "parse.c"
10680 break;
10681
10682 case YYSYMBOL_f_arg: /* f_arg */
10683#line 2612 "parse.y"
10684 {
10685 if ((NODE *)((*yyvaluep).node_args_aux) == (NODE *)-1) {
10686 rb_parser_printf(p, "NODE_SPECIAL");
10687 }
10688 else if (((*yyvaluep).node_args_aux)) {
10689 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_args_aux)))));
10690 }
10691}
10692#line 10693 "parse.c"
10693 break;
10694
10695 case YYSYMBOL_f_label: /* f_label */
10696#line 2621 "parse.y"
10697 {
10698 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10699}
10700#line 10701 "parse.c"
10701 break;
10702
10703 case YYSYMBOL_f_kw: /* f_kw */
10704#line 2612 "parse.y"
10705 {
10706 if ((NODE *)((*yyvaluep).node_kw_arg) == (NODE *)-1) {
10707 rb_parser_printf(p, "NODE_SPECIAL");
10708 }
10709 else if (((*yyvaluep).node_kw_arg)) {
10710 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_kw_arg)))));
10711 }
10712}
10713#line 10714 "parse.c"
10714 break;
10715
10716 case YYSYMBOL_f_block_kw: /* f_block_kw */
10717#line 2612 "parse.y"
10718 {
10719 if ((NODE *)((*yyvaluep).node_kw_arg) == (NODE *)-1) {
10720 rb_parser_printf(p, "NODE_SPECIAL");
10721 }
10722 else if (((*yyvaluep).node_kw_arg)) {
10723 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node_kw_arg)))));
10724 }
10725}
10726#line 10727 "parse.c"
10727 break;
10728
10729 case YYSYMBOL_f_no_kwarg: /* f_no_kwarg */
10730#line 2621 "parse.y"
10731 {
10732 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10733}
10734#line 10735 "parse.c"
10735 break;
10736
10737 case YYSYMBOL_f_kwrest: /* f_kwrest */
10738#line 2621 "parse.y"
10739 {
10740 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10741}
10742#line 10743 "parse.c"
10743 break;
10744
10745 case YYSYMBOL_f_rest_arg: /* f_rest_arg */
10746#line 2621 "parse.y"
10747 {
10748 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10749}
10750#line 10751 "parse.c"
10751 break;
10752
10753 case YYSYMBOL_f_block_arg: /* f_block_arg */
10754#line 2621 "parse.y"
10755 {
10756 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10757}
10758#line 10759 "parse.c"
10759 break;
10760
10761 case YYSYMBOL_opt_f_block_arg: /* opt_f_block_arg */
10762#line 2621 "parse.y"
10763 {
10764 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10765}
10766#line 10767 "parse.c"
10767 break;
10768
10769 case YYSYMBOL_singleton: /* singleton */
10770#line 2612 "parse.y"
10771 {
10772 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10773 rb_parser_printf(p, "NODE_SPECIAL");
10774 }
10775 else if (((*yyvaluep).node)) {
10776 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10777 }
10778}
10779#line 10780 "parse.c"
10780 break;
10781
10782 case YYSYMBOL_assoc_list: /* assoc_list */
10783#line 2612 "parse.y"
10784 {
10785 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10786 rb_parser_printf(p, "NODE_SPECIAL");
10787 }
10788 else if (((*yyvaluep).node)) {
10789 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10790 }
10791}
10792#line 10793 "parse.c"
10793 break;
10794
10795 case YYSYMBOL_assocs: /* assocs */
10796#line 2612 "parse.y"
10797 {
10798 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10799 rb_parser_printf(p, "NODE_SPECIAL");
10800 }
10801 else if (((*yyvaluep).node)) {
10802 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10803 }
10804}
10805#line 10806 "parse.c"
10806 break;
10807
10808 case YYSYMBOL_assoc: /* assoc */
10809#line 2612 "parse.y"
10810 {
10811 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10812 rb_parser_printf(p, "NODE_SPECIAL");
10813 }
10814 else if (((*yyvaluep).node)) {
10815 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10816 }
10817}
10818#line 10819 "parse.c"
10819 break;
10820
10821 case YYSYMBOL_operation: /* operation */
10822#line 2621 "parse.y"
10823 {
10824 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10825}
10826#line 10827 "parse.c"
10827 break;
10828
10829 case YYSYMBOL_operation2: /* operation2 */
10830#line 2621 "parse.y"
10831 {
10832 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10833}
10834#line 10835 "parse.c"
10835 break;
10836
10837 case YYSYMBOL_operation3: /* operation3 */
10838#line 2621 "parse.y"
10839 {
10840 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10841}
10842#line 10843 "parse.c"
10843 break;
10844
10845 case YYSYMBOL_dot_or_colon: /* dot_or_colon */
10846#line 2621 "parse.y"
10847 {
10848 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10849}
10850#line 10851 "parse.c"
10851 break;
10852
10853 case YYSYMBOL_call_op: /* call_op */
10854#line 2621 "parse.y"
10855 {
10856 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10857}
10858#line 10859 "parse.c"
10859 break;
10860
10861 case YYSYMBOL_call_op2: /* call_op2 */
10862#line 2621 "parse.y"
10863 {
10864 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).id)));
10865}
10866#line 10867 "parse.c"
10867 break;
10868
10869 case YYSYMBOL_none: /* none */
10870#line 2612 "parse.y"
10871 {
10872 if ((NODE *)((*yyvaluep).node) == (NODE *)-1) {
10873 rb_parser_printf(p, "NODE_SPECIAL");
10874 }
10875 else if (((*yyvaluep).node)) {
10876 rb_parser_printf(p, "%s", parser_node_name(nd_type(RNODE(((*yyvaluep).node)))));
10877 }
10878}
10879#line 10880 "parse.c"
10880 break;
10881
10882 default:
10883 break;
10884 }
10885 YY_IGNORE_MAYBE_UNINITIALIZED_END
10886}
10887
10888
10889/*---------------------------.
10890| Print this symbol on YYO. |
10891`---------------------------*/
10892
10893static void
10894yy_symbol_print (FILE *yyo,
10895 yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, struct parser_params *p)
10896{
10897 YYFPRINTF (yyo, "%s %s (",
10898 yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name (yykind));
10899
10900 YYLOCATION_PRINT (yyo, yylocationp, p);
10901 YYFPRINTF (yyo, ": ");
10902 yy_symbol_value_print (yyo, yykind, yyvaluep, yylocationp, p);
10903 YYFPRINTF (yyo, ")");
10904}
10905
10906/*------------------------------------------------------------------.
10907| yy_stack_print -- Print the state stack from its BOTTOM up to its |
10908| TOP (included). |
10909`------------------------------------------------------------------*/
10910
10911static void
10912yy_stack_print (yy_state_t *yybottom, yy_state_t *yytop, struct parser_params *p)
10913{
10914 YYFPRINTF (stderr, "Stack now");
10915 for (; yybottom <= yytop; yybottom++)
10916 {
10917 int yybot = *yybottom;
10918 YYFPRINTF (stderr, " %d", yybot);
10919 }
10920 YYFPRINTF (stderr, "\n");
10921}
10922
10923# define YY_STACK_PRINT(Bottom, Top, p) \
10924do { \
10925 if (yydebug) \
10926 yy_stack_print ((Bottom), (Top), p); \
10927} while (0)
10928
10929
10930/*------------------------------------------------.
10931| Report that the YYRULE is going to be reduced. |
10932`------------------------------------------------*/
10933
10934static void
10935yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp,
10936 int yyrule, struct parser_params *p)
10937{
10938 int yylno = yyrline[yyrule];
10939 int yynrhs = yyr2[yyrule];
10940 int yyi;
10941 YYFPRINTF (stderr, "Reducing stack by rule %d (line %d):\n",
10942 yyrule - 1, yylno);
10943 /* The symbols being reduced. */
10944 for (yyi = 0; yyi < yynrhs; yyi++)
10945 {
10946 YYFPRINTF (stderr, " $%d = ", yyi + 1);
10947 yy_symbol_print (stderr,
10948 YY_ACCESSING_SYMBOL (+yyssp[yyi + 1 - yynrhs]),
10949 &yyvsp[(yyi + 1) - (yynrhs)],
10950 &(yylsp[(yyi + 1) - (yynrhs)]), p);
10951 YYFPRINTF (stderr, "\n");
10952 }
10953}
10954
10955# define YY_REDUCE_PRINT(Rule, p) \
10956do { \
10957 if (yydebug) \
10958 yy_reduce_print (yyssp, yyvsp, yylsp, Rule, p); \
10959} while (0)
10960
10961/* Nonzero means print parse trace. It is left uninitialized so that
10962 multiple parsers can coexist. */
10963#ifndef yydebug
10964int yydebug;
10965#endif
10966#else /* !YYDEBUG */
10967# define YYDPRINTF(Args) ((void) 0)
10968# define YY_SYMBOL_PRINT(Title, Kind, Value, Location, p)
10969# define YY_STACK_PRINT(Bottom, Top, p)
10970# define YY_REDUCE_PRINT(Rule, p)
10971#endif /* !YYDEBUG */
10972
10973
10974/* YYINITDEPTH -- initial size of the parser's stacks. */
10975#ifndef YYINITDEPTH
10976# define YYINITDEPTH 200
10977#endif
10978
10979/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
10980 if the built-in stack extension method is used).
10981
10982 Do not make this value too large; the results are undefined if
10983 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
10984 evaluated with infinite-precision integer arithmetic. */
10985
10986#ifndef YYMAXDEPTH
10987# define YYMAXDEPTH 10000
10988#endif
10989
10990
10991/* Context of a parse error. */
10992typedef struct
10993{
10994 yy_state_t *yyssp;
10995 yysymbol_kind_t yytoken;
10996 YYLTYPE *yylloc;
10997} yypcontext_t;
10998
10999/* Put in YYARG at most YYARGN of the expected tokens given the
11000 current YYCTX, and return the number of tokens stored in YYARG. If
11001 YYARG is null, return the number of expected tokens (guaranteed to
11002 be less than YYNTOKENS). Return YYENOMEM on memory exhaustion.
11003 Return 0 if there are more than YYARGN expected tokens, yet fill
11004 YYARG up to YYARGN. */
11005static int
11006yypcontext_expected_tokens (const yypcontext_t *yyctx,
11007 yysymbol_kind_t yyarg[], int yyargn)
11008{
11009 /* Actual size of YYARG. */
11010 int yycount = 0;
11011 int yyn = yypact[+*yyctx->yyssp];
11012 if (!yypact_value_is_default (yyn))
11013 {
11014 /* Start YYX at -YYN if negative to avoid negative indexes in
11015 YYCHECK. In other words, skip the first -YYN actions for
11016 this state because they are default actions. */
11017 int yyxbegin = yyn < 0 ? -yyn : 0;
11018 /* Stay within bounds of both yycheck and yytname. */
11019 int yychecklim = YYLAST - yyn + 1;
11020 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
11021 int yyx;
11022 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
11023 if (yycheck[yyx + yyn] == yyx && yyx != YYSYMBOL_YYerror
11024 && !yytable_value_is_error (yytable[yyx + yyn]))
11025 {
11026 if (!yyarg)
11027 ++yycount;
11028 else if (yycount == yyargn)
11029 return 0;
11030 else
11031 yyarg[yycount++] = YY_CAST (yysymbol_kind_t, yyx);
11032 }
11033 }
11034 if (yyarg && yycount == 0 && 0 < yyargn)
11035 yyarg[0] = YYSYMBOL_YYEMPTY;
11036 return yycount;
11037}
11038
11039
11040
11041
11042#ifndef yystrlen
11043# if defined __GLIBC__ && defined _STRING_H
11044# define yystrlen(S) (YY_CAST (YYPTRDIFF_T, strlen (S)))
11045# else
11046/* Return the length of YYSTR. */
11047static YYPTRDIFF_T
11048yystrlen (const char *yystr)
11049{
11050 YYPTRDIFF_T yylen;
11051 for (yylen = 0; yystr[yylen]; yylen++)
11052 continue;
11053 return yylen;
11054}
11055# endif
11056#endif
11057
11058#ifndef yystpcpy
11059# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
11060# define yystpcpy stpcpy
11061# else
11062/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
11063 YYDEST. */
11064static char *
11065yystpcpy (char *yydest, const char *yysrc)
11066{
11067 char *yyd = yydest;
11068 const char *yys = yysrc;
11069
11070 while ((*yyd++ = *yys++) != '\0')
11071 continue;
11072
11073 return yyd - 1;
11074}
11075# endif
11076#endif
11077
11078#ifndef yytnamerr
11079/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
11080 quotes and backslashes, so that it's suitable for yyerror. The
11081 heuristic is that double-quoting is unnecessary unless the string
11082 contains an apostrophe, a comma, or backslash (other than
11083 backslash-backslash). YYSTR is taken from yytname. If YYRES is
11084 null, do not copy; instead, return the length of what the result
11085 would have been. */
11086static YYPTRDIFF_T
11087yytnamerr (char *yyres, const char *yystr)
11088{
11089 if (*yystr == '"')
11090 {
11091 YYPTRDIFF_T yyn = 0;
11092 char const *yyp = yystr;
11093 for (;;)
11094 switch (*++yyp)
11095 {
11096 case '\'':
11097 case ',':
11098 goto do_not_strip_quotes;
11099
11100 case '\\':
11101 if (*++yyp != '\\')
11102 goto do_not_strip_quotes;
11103 else
11104 goto append;
11105
11106 append:
11107 default:
11108 if (yyres)
11109 yyres[yyn] = *yyp;
11110 yyn++;
11111 break;
11112
11113 case '"':
11114 if (yyres)
11115 yyres[yyn] = '\0';
11116 return yyn;
11117 }
11118 do_not_strip_quotes: ;
11119 }
11120
11121 if (yyres)
11122 return yystpcpy (yyres, yystr) - yyres;
11123 else
11124 return yystrlen (yystr);
11125}
11126#endif
11127
11128
11129static int
11130yy_syntax_error_arguments (const yypcontext_t *yyctx,
11131 yysymbol_kind_t yyarg[], int yyargn)
11132{
11133 /* Actual size of YYARG. */
11134 int yycount = 0;
11135 /* There are many possibilities here to consider:
11136 - If this state is a consistent state with a default action, then
11137 the only way this function was invoked is if the default action
11138 is an error action. In that case, don't check for expected
11139 tokens because there are none.
11140 - The only way there can be no lookahead present (in yychar) is if
11141 this state is a consistent state with a default action. Thus,
11142 detecting the absence of a lookahead is sufficient to determine
11143 that there is no unexpected or expected token to report. In that
11144 case, just report a simple "syntax error".
11145 - Don't assume there isn't a lookahead just because this state is a
11146 consistent state with a default action. There might have been a
11147 previous inconsistent state, consistent state with a non-default
11148 action, or user semantic action that manipulated yychar.
11149 - Of course, the expected token list depends on states to have
11150 correct lookahead information, and it depends on the parser not
11151 to perform extra reductions after fetching a lookahead from the
11152 scanner and before detecting a syntax error. Thus, state merging
11153 (from LALR or IELR) and default reductions corrupt the expected
11154 token list. However, the list is correct for canonical LR with
11155 one exception: it will still contain any token that will not be
11156 accepted due to an error action in a later state.
11157 */
11158 if (yyctx->yytoken != YYSYMBOL_YYEMPTY)
11159 {
11160 int yyn;
11161 if (yyarg)
11162 yyarg[yycount] = yyctx->yytoken;
11163 ++yycount;
11164 yyn = yypcontext_expected_tokens (yyctx,
11165 yyarg ? yyarg + 1 : yyarg, yyargn - 1);
11166 if (yyn == YYENOMEM)
11167 return YYENOMEM;
11168 else
11169 yycount += yyn;
11170 }
11171 return yycount;
11172}
11173
11174/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
11175 about the unexpected token YYTOKEN for the state stack whose top is
11176 YYSSP.
11177
11178 Return 0 if *YYMSG was successfully written. Return -1 if *YYMSG is
11179 not large enough to hold the message. In that case, also set
11180 *YYMSG_ALLOC to the required number of bytes. Return YYENOMEM if the
11181 required number of bytes is too large to store. */
11182static int
11183yysyntax_error (YYPTRDIFF_T *yymsg_alloc, char **yymsg,
11184 const yypcontext_t *yyctx, struct parser_params *p)
11185{
11186 enum { YYARGS_MAX = 5 };
11187 /* Internationalized format string. */
11188 const char *yyformat = YY_NULLPTR;
11189 /* Arguments of yyformat: reported tokens (one for the "unexpected",
11190 one per "expected"). */
11191 yysymbol_kind_t yyarg[YYARGS_MAX];
11192 /* Cumulated lengths of YYARG. */
11193 YYPTRDIFF_T yysize = 0;
11194
11195 /* Actual size of YYARG. */
11196 int yycount = yy_syntax_error_arguments (yyctx, yyarg, YYARGS_MAX);
11197 if (yycount == YYENOMEM)
11198 return YYENOMEM;
11199
11200 switch (yycount)
11201 {
11202#define YYCASE_(N, S) \
11203 case N: \
11204 yyformat = S; \
11205 break
11206 default: /* Avoid compiler warnings. */
11207 YYCASE_(0, YY_("syntax error"));
11208 YYCASE_(1, YY_("syntax error, unexpected %s"));
11209 YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
11210 YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
11211 YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
11212 YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
11213#undef YYCASE_
11214 }
11215
11216 /* Compute error message size. Don't count the "%s"s, but reserve
11217 room for the terminator. */
11218 yysize = yystrlen (yyformat) - 2 * yycount + 1;
11219 {
11220 int yyi;
11221 for (yyi = 0; yyi < yycount; ++yyi)
11222 {
11223 YYPTRDIFF_T yysize1
11224 = yysize + yytnamerr (YY_NULLPTR, yytname[yyarg[yyi]]);
11225 if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)
11226 yysize = yysize1;
11227 else
11228 return YYENOMEM;
11229 }
11230 }
11231
11232 if (*yymsg_alloc < yysize)
11233 {
11234 *yymsg_alloc = 2 * yysize;
11235 if (! (yysize <= *yymsg_alloc
11236 && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
11237 *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
11238 return -1;
11239 }
11240
11241 /* Avoid sprintf, as that infringes on the user's name space.
11242 Don't have undefined behavior even if the translation
11243 produced a string with the wrong number of "%s"s. */
11244 {
11245 char *yyp = *yymsg;
11246 int yyi = 0;
11247 while ((*yyp = *yyformat) != '\0')
11248 if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
11249 {
11250 yyp += yytnamerr (yyp, yytname[yyarg[yyi++]]);
11251 yyformat += 2;
11252 }
11253 else
11254 {
11255 ++yyp;
11256 ++yyformat;
11257 }
11258 }
11259 return 0;
11260}
11261
11262
11263/*-----------------------------------------------.
11264| Release the memory associated to this symbol. |
11265`-----------------------------------------------*/
11266
11267static void
11268yydestruct (const char *yymsg,
11269 yysymbol_kind_t yykind, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, struct parser_params *p)
11270{
11271 YY_USE (yyvaluep);
11272 YY_USE (yylocationp);
11273 YY_USE (p);
11274 if (!yymsg)
11275 yymsg = "Deleting";
11276 YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp, p);
11277
11278 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
11279 switch (yykind)
11280 {
11281 case YYSYMBOL_245_16: /* @16 */
11282#line 2649 "parse.y"
11283 {
11284 if (CASE_LABELS_ENABLED_P(((*yyvaluep).labels))) st_free_table(((*yyvaluep).labels));
11285}
11286#line 11287 "parse.c"
11287 break;
11288
11289 case YYSYMBOL_246_17: /* @17 */
11290#line 2649 "parse.y"
11291 {
11292 if (CASE_LABELS_ENABLED_P(((*yyvaluep).labels))) st_free_table(((*yyvaluep).labels));
11293}
11294#line 11295 "parse.c"
11295 break;
11296
11297 default:
11298 break;
11299 }
11300 YY_IGNORE_MAYBE_UNINITIALIZED_END
11301}
11302
11303
11304
11305
11306
11307
11308/*----------.
11309| yyparse. |
11310`----------*/
11311
11312int
11313yyparse (struct parser_params *p)
11314{
11315/* Lookahead token kind. */
11316int yychar;
11317
11318
11319/* The semantic value of the lookahead symbol. */
11320/* Default value used for initialization, for pacifying older GCCs
11321 or non-GCC compilers. */
11322#ifdef __cplusplus
11323static const YYSTYPE yyval_default = {};
11324(void) yyval_default;
11325#else
11326YY_INITIAL_VALUE (static const YYSTYPE yyval_default;)
11327#endif
11328YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
11329
11330/* Location data for the lookahead symbol. */
11331static const YYLTYPE yyloc_default
11332# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
11333 = { 1, 1, 1, 1 }
11334# endif
11335;
11336YYLTYPE yylloc = yyloc_default;
11337
11338 /* Number of syntax errors so far. */
11339 int yynerrs = 0;
11340 YY_USE (yynerrs); /* Silence compiler warning. */
11341
11342 yy_state_fast_t yystate = 0;
11343 /* Number of tokens to shift before error messages enabled. */
11344 int yyerrstatus = 0;
11345
11346 /* Refer to the stacks through separate pointers, to allow yyoverflow
11347 to reallocate them elsewhere. */
11348
11349 /* Their size. */
11350 YYPTRDIFF_T yystacksize = YYINITDEPTH;
11351
11352 /* The state stack: array, bottom, top. */
11353 yy_state_t yyssa[YYINITDEPTH];
11354 yy_state_t *yyss = yyssa;
11355 yy_state_t *yyssp = yyss;
11356
11357 /* The semantic value stack: array, bottom, top. */
11358 YYSTYPE yyvsa[YYINITDEPTH];
11359 YYSTYPE *yyvs = yyvsa;
11360 YYSTYPE *yyvsp = yyvs;
11361
11362 /* The location stack: array, bottom, top. */
11363 YYLTYPE yylsa[YYINITDEPTH];
11364 YYLTYPE *yyls = yylsa;
11365 YYLTYPE *yylsp = yyls;
11366
11367 int yyn;
11368 /* The return value of yyparse. */
11369 int yyresult;
11370 /* Lookahead symbol kind. */
11371 yysymbol_kind_t yytoken = YYSYMBOL_YYEMPTY;
11372 /* The variables used to return semantic value and location from the
11373 action routines. */
11374 YYSTYPE yyval;
11375 YYLTYPE yyloc;
11376
11377 /* The locations where the error started and ended. */
11378 YYLTYPE yyerror_range[3];
11379
11380 /* Buffer for error messages, and its allocated size. */
11381 char yymsgbuf[128];
11382 char *yymsg = yymsgbuf;
11383 YYPTRDIFF_T yymsg_alloc = sizeof yymsgbuf;
11384
11385#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N))
11386
11387 /* The number of symbols on the RHS of the reduced rule.
11388 Keep to zero when no symbol should be popped. */
11389 int yylen = 0;
11390
11391 YYDPRINTF ((stderr, "Starting parse\n"));
11392
11393 yychar = YYEMPTY; /* Cause a token to be read. */
11394
11395
11396 /* User initialization code. */
11397#line 2656 "parse.y"
11398 {
11399 RUBY_SET_YYLLOC_OF_NONE(yylloc);
11400}
11401
11402#line 11403 "parse.c"
11403
11404 yylsp[0] = yylloc;
11405 goto yysetstate;
11406
11407
11408/*------------------------------------------------------------.
11409| yynewstate -- push a new state, which is found in yystate. |
11410`------------------------------------------------------------*/
11411yynewstate:
11412 /* In all cases, when you get here, the value and location stacks
11413 have just been pushed. So pushing a state here evens the stacks. */
11414 yyssp++;
11415
11416
11417/*--------------------------------------------------------------------.
11418| yysetstate -- set current state (the top of the stack) to yystate. |
11419`--------------------------------------------------------------------*/
11420yysetstate:
11421 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
11422 YY_ASSERT (0 <= yystate && yystate < YYNSTATES);
11423 YY_IGNORE_USELESS_CAST_BEGIN
11424 *yyssp = YY_CAST (yy_state_t, yystate);
11425 YY_IGNORE_USELESS_CAST_END
11426 YY_STACK_PRINT (yyss, yyssp, p);
11427
11428 if (yyss + yystacksize - 1 <= yyssp)
11429#if !defined yyoverflow && !defined YYSTACK_RELOCATE
11430 YYNOMEM;
11431#else
11432 {
11433 /* Get the current used size of the three stacks, in elements. */
11434 YYPTRDIFF_T yysize = yyssp - yyss + 1;
11435
11436# if defined yyoverflow
11437 {
11438 /* Give user a chance to reallocate the stack. Use copies of
11439 these so that the &'s don't force the real ones into
11440 memory. */
11441 yy_state_t *yyss1 = yyss;
11442 YYSTYPE *yyvs1 = yyvs;
11443 YYLTYPE *yyls1 = yyls;
11444
11445 /* Each stack pointer address is followed by the size of the
11446 data in use in that stack, in bytes. This used to be a
11447 conditional around just the two extra args, but that might
11448 be undefined if yyoverflow is a macro. */
11449 yyoverflow (YY_("memory exhausted"),
11450 &yyss1, yysize * YYSIZEOF (*yyssp),
11451 &yyvs1, yysize * YYSIZEOF (*yyvsp),
11452 &yyls1, yysize * YYSIZEOF (*yylsp),
11453 &yystacksize);
11454 yyss = yyss1;
11455 yyvs = yyvs1;
11456 yyls = yyls1;
11457 }
11458# else /* defined YYSTACK_RELOCATE */
11459 /* Extend the stack our own way. */
11460 if (YYMAXDEPTH <= yystacksize)
11461 YYNOMEM;
11462 yystacksize *= 2;
11463 if (YYMAXDEPTH < yystacksize)
11464 yystacksize = YYMAXDEPTH;
11465
11466 {
11467 yy_state_t *yyss1 = yyss;
11468 union yyalloc *yyptr =
11469 YY_CAST (union yyalloc *,
11470 YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize))));
11471 if (! yyptr)
11472 YYNOMEM;
11473 YYSTACK_RELOCATE (yyss_alloc, yyss);
11474 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
11475 YYSTACK_RELOCATE (yyls_alloc, yyls);
11476# undef YYSTACK_RELOCATE
11477 if (yyss1 != yyssa)
11478 YYSTACK_FREE (yyss1);
11479 }
11480# endif
11481
11482 yyssp = yyss + yysize - 1;
11483 yyvsp = yyvs + yysize - 1;
11484 yylsp = yyls + yysize - 1;
11485
11486 YY_IGNORE_USELESS_CAST_BEGIN
11487 YYDPRINTF ((stderr, "Stack size increased to %ld\n",
11488 YY_CAST (long, yystacksize)));
11489 YY_IGNORE_USELESS_CAST_END
11490
11491 if (yyss + yystacksize - 1 <= yyssp)
11492 YYABORT;
11493 }
11494#endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */
11495
11496
11497 if (yystate == YYFINAL)
11498 YYACCEPT;
11499
11500 goto yybackup;
11501
11502
11503/*-----------.
11504| yybackup. |
11505`-----------*/
11506yybackup:
11507 /* Do appropriate processing given the current state. Read a
11508 lookahead token if we need one and don't already have one. */
11509
11510 /* First try to decide what to do without reference to lookahead token. */
11511 yyn = yypact[yystate];
11512 if (yypact_value_is_default (yyn))
11513 goto yydefault;
11514
11515 /* Not known => get a lookahead token if don't already have one. */
11516
11517 /* YYCHAR is either empty, or end-of-input, or a valid lookahead. */
11518 if (yychar == YYEMPTY)
11519 {
11520 YYDPRINTF ((stderr, "Reading a token\n"));
11521 yychar = yylex (&yylval, &yylloc, p);
11522 }
11523
11524 if (yychar <= END_OF_INPUT)
11525 {
11526 yychar = END_OF_INPUT;
11527 yytoken = YYSYMBOL_YYEOF;
11528 YYDPRINTF ((stderr, "Now at end of input.\n"));
11529 }
11530 else if (yychar == YYerror)
11531 {
11532 /* The scanner already issued an error message, process directly
11533 to error recovery. But do not keep the error token as
11534 lookahead, it is too special and may lead us to an endless
11535 loop in error recovery. */
11536 yychar = YYUNDEF;
11537 yytoken = YYSYMBOL_YYerror;
11538 yyerror_range[1] = yylloc;
11539 goto yyerrlab1;
11540 }
11541 else
11542 {
11543 yytoken = YYTRANSLATE (yychar);
11544 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc, p);
11545 }
11546
11547 /* If the proper action on seeing token YYTOKEN is to reduce or to
11548 detect an error, take that action. */
11549 yyn += yytoken;
11550 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
11551 goto yydefault;
11552 yyn = yytable[yyn];
11553 if (yyn <= 0)
11554 {
11555 if (yytable_value_is_error (yyn))
11556 goto yyerrlab;
11557 yyn = -yyn;
11558 goto yyreduce;
11559 }
11560
11561 /* Count tokens shifted since error; after three, turn off error
11562 status. */
11563 if (yyerrstatus)
11564 yyerrstatus--;
11565
11566 /* Shift the lookahead token. */
11567 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc, p);
11568 yystate = yyn;
11569 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
11570 *++yyvsp = yylval;
11571 YY_IGNORE_MAYBE_UNINITIALIZED_END
11572 *++yylsp = yylloc;
11573 /* %after-shift code. */
11574#line 2659 "parse.y"
11575 {after_shift(p);}
11576#line 11577 "parse.c"
11577
11578
11579 /* Discard the shifted token. */
11580 yychar = YYEMPTY;
11581 goto yynewstate;
11582
11583
11584/*-----------------------------------------------------------.
11585| yydefault -- do the default action for the current state. |
11586`-----------------------------------------------------------*/
11587yydefault:
11588 yyn = yydefact[yystate];
11589 if (yyn == 0)
11590 goto yyerrlab;
11591 goto yyreduce;
11592
11593
11594/*-----------------------------.
11595| yyreduce -- do a reduction. |
11596`-----------------------------*/
11597yyreduce:
11598 /* yyn is the number of a rule to reduce with. */
11599 yylen = yyr2[yyn];
11600
11601 /* If YYLEN is nonzero, implement the default value of the action:
11602 '$$ = $1'.
11603
11604 Otherwise, the following line sets YYVAL to garbage.
11605 This behavior is undocumented and Bison
11606 users should not rely upon it. Assigning to YYVAL
11607 unconditionally makes the parser a bit smaller, and it avoids a
11608 GCC warning that YYVAL may be used uninitialized. */
11609 yyval = yyvsp[1-yylen];
11610 /* %before-reduce function. */
11611#line 2660 "parse.y"
11612 {before_reduce(yylen, p);}
11613#line 11614 "parse.c"
11614
11615
11616 /* Default location. */
11617 YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
11618 yyerror_range[1] = yyloc;
11619 YY_REDUCE_PRINT (yyn, p);
11620 switch (yyn)
11621 {
11622 case 2: /* $@1: %empty */
11623#line 2968 "parse.y"
11624 {
11625 SET_LEX_STATE(EXPR_BEG);
11626 local_push(p, ifndef_ripper(1)+0);
11627 /* jumps are possible in the top-level loop. */
11628 if (!ifndef_ripper(p->do_loop) + 0) init_block_exit(p);
11629 }
11630#line 11631 "parse.c"
11631 break;
11632
11633 case 3: /* program: $@1 top_compstmt */
11634#line 2975 "parse.y"
11635 {
11636 if ((yyvsp[0].node) && !compile_for_eval) {
11637 NODE *node = (yyvsp[0].node);
11638 /* last expression should not be void */
11639 if (nd_type_p(node, NODE_BLOCK)) {
11640 while (RNODE_BLOCK(node)->nd_next) {
11641 node = RNODE_BLOCK(node)->nd_next;
11642 }
11643 node = RNODE_BLOCK(node)->nd_head;
11644 }
11645 node = remove_begin(node);
11646 void_expr(p, node);
11647 }
11648 p->eval_tree = NEW_SCOPE(0, block_append(p, p->eval_tree, (yyvsp[0].node)), &(yyloc));
11649 /*% ripper[final]: program!($:2) %*/
11650 local_pop(p);
11651 }
11652#line 11653 "parse.c"
11653 break;
11654
11655 case 6: /* top_compstmt: top_stmts option_terms */
11656#line 2995 "parse.y"
11657 {
11658 void_stmts(p, (yyval.node) = (yyvsp[-1].node));
11659 }
11660#line 11661 "parse.c"
11661 break;
11662
11663 case 7: /* top_stmts: none */
11664#line 3001 "parse.y"
11665 {
11666 (yyval.node) = NEW_BEGIN(0, &(yyloc));
11667 /*% ripper: stmts_add!(stmts_new!, void_stmt!) %*/
11668 }
11669#line 11670 "parse.c"
11670 break;
11671
11672 case 8: /* top_stmts: top_stmt */
11673#line 3006 "parse.y"
11674 {
11675 (yyval.node) = newline_node((yyvsp[0].node));
11676 /*% ripper: stmts_add!(stmts_new!, $:1) %*/
11677 }
11678#line 11679 "parse.c"
11679 break;
11680
11681 case 9: /* top_stmts: top_stmts terms top_stmt */
11682#line 3011 "parse.y"
11683 {
11684 (yyval.node) = block_append(p, (yyvsp[-2].node), newline_node((yyvsp[0].node)));
11685 /*% ripper: stmts_add!($:1, $:3) %*/
11686 }
11687#line 11688 "parse.c"
11688 break;
11689
11690 case 10: /* top_stmt: stmt */
11691#line 3018 "parse.y"
11692 {
11693 clear_block_exit(p, true);
11694 (yyval.node) = (yyvsp[0].node);
11695 }
11696#line 11697 "parse.c"
11697 break;
11698
11699 case 11: /* top_stmt: "'BEGIN'" begin_block */
11700#line 3023 "parse.y"
11701 {
11702 (yyval.node) = (yyvsp[0].node);
11703 /*% ripper: $:2 %*/
11704 }
11705#line 11706 "parse.c"
11706 break;
11707
11708 case 12: /* block_open: '{' */
11709#line 3029 "parse.y"
11710 {(yyval.node_exits) = init_block_exit(p);}
11711#line 11712 "parse.c"
11712 break;
11713
11714 case 13: /* begin_block: block_open top_compstmt '}' */
11715#line 3032 "parse.y"
11716 {
11717 restore_block_exit(p, (yyvsp[-2].node_exits));
11718 p->eval_tree_begin = block_append(p, p->eval_tree_begin,
11719 NEW_BEGIN((yyvsp[-1].node), &(yyloc)));
11720 (yyval.node) = NEW_BEGIN(0, &(yyloc));
11721 /*% ripper: BEGIN!($:2) %*/
11722 }
11723#line 11724 "parse.c"
11724 break;
11725
11726 case 14: /* $@2: %empty */
11727#line 3045 "parse.y"
11728 {
11729 if (!(yyvsp[-1].node)) yyerror1(&(yylsp[0]), "else without rescue is useless");
11730 next_rescue_context(&p->ctxt, &(yyvsp[-2].ctxt), after_else);
11731 }
11732#line 11733 "parse.c"
11733 break;
11734
11735 case 15: /* $@3: %empty */
11736#line 3050 "parse.y"
11737 {
11738 next_rescue_context(&p->ctxt, &(yyvsp[-4].ctxt), after_ensure);
11739 }
11740#line 11741 "parse.c"
11741 break;
11742
11743 case 16: /* bodystmt: compstmt lex_ctxt opt_rescue k_else $@2 compstmt $@3 opt_ensure */
11744#line 3054 "parse.y"
11745 {
11746 (yyval.node) = new_bodystmt(p, (yyvsp[-7].node), (yyvsp[-5].node), (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
11747 /*% ripper: bodystmt!($:body, $:opt_rescue, $:elsebody, $:opt_ensure) %*/
11748 }
11749#line 11750 "parse.c"
11750 break;
11751
11752 case 17: /* $@4: %empty */
11753#line 3061 "parse.y"
11754 {
11755 next_rescue_context(&p->ctxt, &(yyvsp[-1].ctxt), after_ensure);
11756 }
11757#line 11758 "parse.c"
11758 break;
11759
11760 case 18: /* bodystmt: compstmt lex_ctxt opt_rescue $@4 opt_ensure */
11761#line 3065 "parse.y"
11762 {
11763 (yyval.node) = new_bodystmt(p, (yyvsp[-4].node), (yyvsp[-2].node), 0, (yyvsp[0].node), &(yyloc));
11764 /*% ripper: bodystmt!($:body, $:opt_rescue, Qnil, $:opt_ensure) %*/
11765 }
11766#line 11767 "parse.c"
11767 break;
11768
11769 case 19: /* compstmt: stmts option_terms */
11770#line 3072 "parse.y"
11771 {
11772 void_stmts(p, (yyval.node) = (yyvsp[-1].node));
11773 }
11774#line 11775 "parse.c"
11775 break;
11776
11777 case 20: /* stmts: none */
11778#line 3078 "parse.y"
11779 {
11780 (yyval.node) = NEW_BEGIN(0, &(yyloc));
11781 /*% ripper: stmts_add!(stmts_new!, void_stmt!) %*/
11782 }
11783#line 11784 "parse.c"
11784 break;
11785
11786 case 21: /* stmts: stmt_or_begin */
11787#line 3083 "parse.y"
11788 {
11789 (yyval.node) = newline_node((yyvsp[0].node));
11790 /*% ripper: stmts_add!(stmts_new!, $:1) %*/
11791 }
11792#line 11793 "parse.c"
11793 break;
11794
11795 case 22: /* stmts: stmts terms stmt_or_begin */
11796#line 3088 "parse.y"
11797 {
11798 (yyval.node) = block_append(p, (yyvsp[-2].node), newline_node((yyvsp[0].node)));
11799 /*% ripper: stmts_add!($:1, $:3) %*/
11800 }
11801#line 11802 "parse.c"
11802 break;
11803
11804 case 23: /* stmt_or_begin: stmt */
11805#line 3095 "parse.y"
11806 {
11807 (yyval.node) = (yyvsp[0].node);
11808 }
11809#line 11810 "parse.c"
11810 break;
11811
11812 case 24: /* $@5: %empty */
11813#line 3099 "parse.y"
11814 {
11815 yyerror1(&(yylsp[0]), "BEGIN is permitted only at toplevel");
11816 }
11817#line 11818 "parse.c"
11818 break;
11819
11820 case 25: /* stmt_or_begin: "'BEGIN'" $@5 begin_block */
11821#line 3103 "parse.y"
11822 {
11823 (yyval.node) = (yyvsp[0].node);
11824 }
11825#line 11826 "parse.c"
11826 break;
11827
11828 case 26: /* allow_exits: %empty */
11829#line 3108 "parse.y"
11830 {(yyval.node_exits) = allow_block_exit(p);}
11831#line 11832 "parse.c"
11832 break;
11833
11834 case 27: /* k_END: "'END'" lex_ctxt */
11835#line 3111 "parse.y"
11836 {
11837 (yyval.ctxt) = (yyvsp[0].ctxt);
11838 p->ctxt.in_rescue = before_rescue;
11839 /*% ripper: $:2 %*/
11840 }
11841#line 11842 "parse.c"
11842 break;
11843
11844 case 28: /* $@6: %empty */
11845#line 3117 "parse.y"
11846 {SET_LEX_STATE(EXPR_FNAME|EXPR_FITEM);}
11847#line 11848 "parse.c"
11848 break;
11849
11850 case 29: /* stmt: "'alias'" fitem $@6 fitem */
11851#line 3118 "parse.y"
11852 {
11853 (yyval.node) = NEW_ALIAS((yyvsp[-2].node), (yyvsp[0].node), &(yyloc), &(yylsp[-3]));
11854 /*% ripper: alias!($:2, $:4) %*/
11855 }
11856#line 11857 "parse.c"
11857 break;
11858
11859 case 30: /* stmt: "'alias'" "global variable" "global variable" */
11860#line 3123 "parse.y"
11861 {
11862 (yyval.node) = NEW_VALIAS((yyvsp[-1].id), (yyvsp[0].id), &(yyloc), &(yylsp[-2]));
11863 /*% ripper: var_alias!($:2, $:3) %*/
11864 }
11865#line 11866 "parse.c"
11866 break;
11867
11868 case 31: /* stmt: "'alias'" "global variable" "back reference" */
11869#line 3128 "parse.y"
11870 {
11871 char buf[2];
11872 buf[0] = '$';
11873 buf[1] = (char)RNODE_BACK_REF((yyvsp[0].node))->nd_nth;
11874 (yyval.node) = NEW_VALIAS((yyvsp[-1].id), rb_intern2(buf, 2), &(yyloc), &(yylsp[-2]));
11875 /*% ripper: var_alias!($:2, $:3) %*/
11876 }
11877#line 11878 "parse.c"
11878 break;
11879
11880 case 32: /* stmt: "'alias'" "global variable" "numbered reference" */
11881#line 3136 "parse.y"
11882 {
11883 static const char mesg[] = "can't make alias for the number variables";
11884 /*%%%*/
11885 yyerror1(&(yylsp[0]), mesg);
11886 /*% %*/
11887 (yyval.node) = NEW_ERROR(&(yyloc));
11888 /*% ripper[error]: alias_error!(ERR_MESG(), $:3) %*/
11889 }
11890#line 11891 "parse.c"
11891 break;
11892
11893 case 33: /* stmt: "'undef'" undef_list */
11894#line 3145 "parse.y"
11895 {
11896 nd_set_first_loc((yyvsp[0].node), (yylsp[-1]).beg_pos);
11897 RNODE_UNDEF((yyvsp[0].node))->keyword_loc = (yylsp[-1]);
11898 (yyval.node) = (yyvsp[0].node);
11899 /*% ripper: undef!($:2) %*/
11900 }
11901#line 11902 "parse.c"
11902 break;
11903
11904 case 34: /* stmt: stmt "'if' modifier" expr_value */
11905#line 3152 "parse.y"
11906 {
11907 (yyval.node) = new_if(p, (yyvsp[0].node), remove_begin((yyvsp[-2].node)), 0, &(yyloc));
11908 fixpos((yyval.node), (yyvsp[0].node));
11909 /*% ripper: if_mod!($:3, $:1) %*/
11910 }
11911#line 11912 "parse.c"
11912 break;
11913
11914 case 35: /* stmt: stmt "'unless' modifier" expr_value */
11915#line 3158 "parse.y"
11916 {
11917 (yyval.node) = new_unless(p, (yyvsp[0].node), remove_begin((yyvsp[-2].node)), 0, &(yyloc), &(yylsp[-1]), &NULL_LOC, &NULL_LOC);
11918 fixpos((yyval.node), (yyvsp[0].node));
11919 /*% ripper: unless_mod!($:3, $:1) %*/
11920 }
11921#line 11922 "parse.c"
11922 break;
11923
11924 case 36: /* stmt: stmt "'while' modifier" expr_value */
11925#line 3164 "parse.y"
11926 {
11927 clear_block_exit(p, false);
11928 if ((yyvsp[-2].node) && nd_type_p((yyvsp[-2].node), NODE_BEGIN)) {
11929 (yyval.node) = NEW_WHILE(cond(p, (yyvsp[0].node), &(yylsp[0])), RNODE_BEGIN((yyvsp[-2].node))->nd_body, 0, &(yyloc), &(yylsp[-1]), &NULL_LOC);
11930 }
11931 else {
11932 (yyval.node) = NEW_WHILE(cond(p, (yyvsp[0].node), &(yylsp[0])), (yyvsp[-2].node), 1, &(yyloc), &(yylsp[-1]), &NULL_LOC);
11933 }
11934 /*% ripper: while_mod!($:3, $:1) %*/
11935 }
11936#line 11937 "parse.c"
11937 break;
11938
11939 case 37: /* stmt: stmt "'until' modifier" expr_value */
11940#line 3175 "parse.y"
11941 {
11942 clear_block_exit(p, false);
11943 if ((yyvsp[-2].node) && nd_type_p((yyvsp[-2].node), NODE_BEGIN)) {
11944 (yyval.node) = NEW_UNTIL(cond(p, (yyvsp[0].node), &(yylsp[0])), RNODE_BEGIN((yyvsp[-2].node))->nd_body, 0, &(yyloc), &(yylsp[-1]), &NULL_LOC);
11945 }
11946 else {
11947 (yyval.node) = NEW_UNTIL(cond(p, (yyvsp[0].node), &(yylsp[0])), (yyvsp[-2].node), 1, &(yyloc), &(yylsp[-1]), &NULL_LOC);
11948 }
11949 /*% ripper: until_mod!($:3, $:1) %*/
11950 }
11951#line 11952 "parse.c"
11952 break;
11953
11954 case 38: /* stmt: stmt "'rescue' modifier" after_rescue stmt */
11955#line 3186 "parse.y"
11956 {
11957 p->ctxt.in_rescue = (yyvsp[-1].ctxt).in_rescue;
11958 NODE *resq;
11959 YYLTYPE loc = code_loc_gen(&(yylsp[-2]), &(yylsp[0]));
11960 resq = NEW_RESBODY(0, 0, remove_begin((yyvsp[0].node)), 0, &loc);
11961 (yyval.node) = NEW_RESCUE(remove_begin((yyvsp[-3].node)), resq, 0, &(yyloc));
11962 /*% ripper: rescue_mod!($:1, $:4) %*/
11963 }
11964#line 11965 "parse.c"
11965 break;
11966
11967 case 39: /* stmt: k_END allow_exits '{' compstmt '}' */
11968#line 3195 "parse.y"
11969 {
11970 if (p->ctxt.in_def) {
11971 rb_warn0("END in method; use at_exit");
11972 }
11973 restore_block_exit(p, (yyvsp[-3].node_exits));
11974 p->ctxt = (yyvsp[-4].ctxt);
11975 {
11976 NODE *scope = NEW_SCOPE2(0 /* tbl */, 0 /* args */, (yyvsp[-1].node) /* body */, &(yyloc));
11977 (yyval.node) = NEW_POSTEXE(scope, &(yyloc));
11978 }
11979 /*% ripper: END!($:compstmt) %*/
11980 }
11981#line 11982 "parse.c"
11982 break;
11983
11984 case 41: /* stmt: mlhs '=' lex_ctxt command_call */
11985#line 3209 "parse.y"
11986 {
11987 value_expr((yyvsp[0].node));
11988 (yyval.node) = node_assign(p, (NODE *)(yyvsp[-3].node_masgn), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
11989 /*% ripper: massign!($:1, $:4) %*/
11990 }
11991#line 11992 "parse.c"
11992 break;
11993
11994 case 42: /* stmt: lhs '=' lex_ctxt mrhs */
11995#line 3215 "parse.y"
11996 {
11997 (yyval.node) = node_assign(p, (yyvsp[-3].node), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
11998 /*% ripper: assign!($:1, $:4) %*/
11999 }
12000#line 12001 "parse.c"
12001 break;
12002
12003 case 43: /* stmt: mlhs '=' lex_ctxt mrhs_arg "'rescue' modifier" after_rescue stmt */
12004#line 3221 "parse.y"
12005 {
12006 p->ctxt.in_rescue = (yyvsp[-4].ctxt).in_rescue;
12007 YYLTYPE loc = code_loc_gen(&(yylsp[-2]), &(yylsp[0]));
12008 (yyvsp[0].node) = NEW_RESBODY(0, 0, remove_begin((yyvsp[0].node)), 0, &loc);
12009 loc.beg_pos = (yylsp[-3]).beg_pos;
12010 (yyvsp[-3].node) = NEW_RESCUE((yyvsp[-3].node), (yyvsp[0].node), 0, &loc);
12011 (yyval.node) = node_assign(p, (NODE *)(yyvsp[-6].node_masgn), (yyvsp[-3].node), (yyvsp[-4].ctxt), &(yyloc));
12012 /*% ripper: massign!($:1, rescue_mod!($:4, $:7)) %*/
12013 }
12014#line 12015 "parse.c"
12015 break;
12016
12017 case 44: /* stmt: mlhs '=' lex_ctxt mrhs_arg */
12018#line 3231 "parse.y"
12019 {
12020 (yyval.node) = node_assign(p, (NODE *)(yyvsp[-3].node_masgn), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
12021 /*% ripper: massign!($:1, $:4) %*/
12022 }
12023#line 12024 "parse.c"
12024 break;
12025
12026 case 46: /* stmt: error */
12027#line 3237 "parse.y"
12028 {
12029 (void)yynerrs;
12030 (yyval.node) = NEW_ERROR(&(yyloc));
12031 }
12032#line 12033 "parse.c"
12033 break;
12034
12035 case 47: /* command_asgn: lhs '=' lex_ctxt command_rhs */
12036#line 3244 "parse.y"
12037 {
12038 (yyval.node) = node_assign(p, (yyvsp[-3].node), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
12039 /*% ripper: assign!($:1, $:4) %*/
12040 }
12041#line 12042 "parse.c"
12042 break;
12043
12044 case 48: /* command_asgn: var_lhs "operator-assignment" lex_ctxt command_rhs */
12045#line 3249 "parse.y"
12046 {
12047 (yyval.node) = new_op_assign(p, (yyvsp[-3].node), (yyvsp[-2].id), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
12048 /*% ripper: opassign!($:1, $:2, $:4) %*/
12049 }
12050#line 12051 "parse.c"
12051 break;
12052
12053 case 49: /* command_asgn: primary_value '[' opt_call_args rbracket "operator-assignment" lex_ctxt command_rhs */
12054#line 3254 "parse.y"
12055 {
12056 (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]));
12057 /*% ripper: opassign!(aref_field!($:1, $:3), $:5, $:7) %*/
12058
12059 }
12060#line 12061 "parse.c"
12061 break;
12062
12063 case 50: /* command_asgn: primary_value call_op "local variable or method" "operator-assignment" lex_ctxt command_rhs */
12064#line 3260 "parse.y"
12065 {
12066 (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]));
12067 /*% ripper: opassign!(field!($:1, $:2, $:3), $:4, $:6) %*/
12068 }
12069#line 12070 "parse.c"
12070 break;
12071
12072 case 51: /* command_asgn: primary_value call_op "constant" "operator-assignment" lex_ctxt command_rhs */
12073#line 3260 "parse.y"
12074 {
12075 (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]));
12076 /*% ripper: opassign!(field!($:1, $:2, $:3), $:4, $:6) %*/
12077 }
12078#line 12079 "parse.c"
12079 break;
12080
12081 case 52: /* command_asgn: primary_value "::" "constant" "operator-assignment" lex_ctxt command_rhs */
12082#line 3265 "parse.y"
12083 {
12084 YYLTYPE loc = code_loc_gen(&(yylsp[-5]), &(yylsp[-3]));
12085 (yyval.node) = new_const_op_assign(p, NEW_COLON2((yyvsp[-5].node), (yyvsp[-3].id), &loc), (yyvsp[-2].id), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
12086 /*% ripper: opassign!(const_path_field!($:1, $:3), $:4, $:6) %*/
12087 }
12088#line 12089 "parse.c"
12089 break;
12090
12091 case 53: /* command_asgn: primary_value "::" "local variable or method" "operator-assignment" lex_ctxt command_rhs */
12092#line 3271 "parse.y"
12093 {
12094 (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]));
12095 /*% ripper: opassign!(field!($:1, $:2, $:3), $:4, $:6) %*/
12096 }
12097#line 12098 "parse.c"
12098 break;
12099
12100 case 54: /* command_asgn: ":: at EXPR_BEG" "constant" "operator-assignment" lex_ctxt command_rhs */
12101#line 3276 "parse.y"
12102 {
12103 YYLTYPE loc = code_loc_gen(&(yylsp[-4]), &(yylsp[-3]));
12104 (yyval.node) = new_const_op_assign(p, NEW_COLON3((yyvsp[-3].id), &loc), (yyvsp[-2].id), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
12105 /*% ripper: opassign!(top_const_field!($:2), $:3, $:5) %*/
12106 }
12107#line 12108 "parse.c"
12108 break;
12109
12110 case 55: /* command_asgn: defn_head f_opt_paren_args '=' endless_command */
12111#line 3282 "parse.y"
12112 {
12113 endless_method_name(p, (yyvsp[-3].node_def_temp)->nd_mid, &(yylsp[-3]));
12114 restore_defun(p, (yyvsp[-3].node_def_temp));
12115 (yyvsp[0].node) = new_scope_body(p, (yyvsp[-2].node_args), (yyvsp[0].node), &(yyloc));
12116 ((yyval.node) = (yyvsp[-3].node_def_temp)->nd_def)->nd_loc = (yyloc);
12117 RNODE_DEFN((yyval.node))->nd_defn = (yyvsp[0].node);
12118 /*% ripper: bodystmt!($:bodystmt, Qnil, Qnil, Qnil) %*/
12119 /*% ripper: def!($:head, $:args, $:$) %*/
12120 local_pop(p);
12121 }
12122#line 12123 "parse.c"
12123 break;
12124
12125 case 56: /* command_asgn: defs_head f_opt_paren_args '=' endless_command */
12126#line 3293 "parse.y"
12127 {
12128 endless_method_name(p, (yyvsp[-3].node_def_temp)->nd_mid, &(yylsp[-3]));
12129 restore_defun(p, (yyvsp[-3].node_def_temp));
12130 (yyvsp[0].node) = new_scope_body(p, (yyvsp[-2].node_args), (yyvsp[0].node), &(yyloc));
12131 ((yyval.node) = (yyvsp[-3].node_def_temp)->nd_def)->nd_loc = (yyloc);
12132 RNODE_DEFS((yyval.node))->nd_defn = (yyvsp[0].node);
12133 /*% ripper: bodystmt!($:bodystmt, Qnil, Qnil, Qnil) %*/
12134 /*% ripper: defs!(*$:head[0..2], $:args, $:$) %*/
12135 local_pop(p);
12136 }
12137#line 12138 "parse.c"
12138 break;
12139
12140 case 57: /* command_asgn: backref "operator-assignment" lex_ctxt command_rhs */
12141#line 3304 "parse.y"
12142 {
12143 VALUE MAYBE_UNUSED(e) = rb_backref_error(p, (yyvsp[-3].node));
12144 (yyval.node) = NEW_ERROR(&(yyloc));
12145 /*% ripper[error]: assign_error!(?e, opassign!(var_field!($:1), $:2, $:4)) %*/
12146 }
12147#line 12148 "parse.c"
12148 break;
12149
12150 case 59: /* endless_command: endless_command "'rescue' modifier" after_rescue arg */
12151#line 3313 "parse.y"
12152 {
12153 p->ctxt.in_rescue = (yyvsp[-1].ctxt).in_rescue;
12154 (yyval.node) = rescued_expr(p, (yyvsp[-3].node), (yyvsp[0].node), &(yylsp[-3]), &(yylsp[-2]), &(yylsp[0]));
12155 /*% ripper: rescue_mod!($:1, $:4) %*/
12156 }
12157#line 12158 "parse.c"
12158 break;
12159
12160 case 62: /* endless_command: "'not'" option_'\n' endless_command */
12161#line 3319 "parse.y"
12162 {
12163 (yyval.node) = call_uni_op(p, method_cond(p, (yyvsp[0].node), &(yylsp[0])), METHOD_NOT, &(yylsp[-2]), &(yyloc));
12164 /*% ripper: unary!(ID2VAL(idNOT), $:3) %*/
12165 }
12166#line 12167 "parse.c"
12167 break;
12168
12169 case 63: /* command_rhs: command_call */
12170#line 3326 "parse.y"
12171 {
12172 value_expr((yyvsp[0].node));
12173 (yyval.node) = (yyvsp[0].node);
12174 }
12175#line 12176 "parse.c"
12176 break;
12177
12178 case 64: /* command_rhs: command_call "'rescue' modifier" after_rescue stmt */
12179#line 3331 "parse.y"
12180 {
12181 p->ctxt.in_rescue = (yyvsp[-1].ctxt).in_rescue;
12182 YYLTYPE loc = code_loc_gen(&(yylsp[-2]), &(yylsp[0]));
12183 value_expr((yyvsp[-3].node));
12184 (yyval.node) = NEW_RESCUE((yyvsp[-3].node), NEW_RESBODY(0, 0, remove_begin((yyvsp[0].node)), 0, &loc), 0, &(yyloc));
12185 /*% ripper: rescue_mod!($:1, $:4) %*/
12186 }
12187#line 12188 "parse.c"
12188 break;
12189
12190 case 67: /* expr: expr "'and'" expr */
12191#line 3343 "parse.y"
12192 {
12193 (yyval.node) = logop(p, idAND, (yyvsp[-2].node), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
12194 /*% ripper: binary!($:1, ID2VAL(idAND), $:3) %*/
12195 }
12196#line 12197 "parse.c"
12197 break;
12198
12199 case 68: /* expr: expr "'or'" expr */
12200#line 3348 "parse.y"
12201 {
12202 (yyval.node) = logop(p, idOR, (yyvsp[-2].node), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
12203 /*% ripper: binary!($:1, ID2VAL(idOR), $:3) %*/
12204 }
12205#line 12206 "parse.c"
12206 break;
12207
12208 case 69: /* expr: "'not'" option_'\n' expr */
12209#line 3353 "parse.y"
12210 {
12211 (yyval.node) = call_uni_op(p, method_cond(p, (yyvsp[0].node), &(yylsp[0])), METHOD_NOT, &(yylsp[-2]), &(yyloc));
12212 /*% ripper: unary!(ID2VAL(idNOT), $:3) %*/
12213 }
12214#line 12215 "parse.c"
12215 break;
12216
12217 case 70: /* expr: '!' command_call */
12218#line 3358 "parse.y"
12219 {
12220 (yyval.node) = call_uni_op(p, method_cond(p, (yyvsp[0].node), &(yylsp[0])), '!', &(yylsp[-1]), &(yyloc));
12221 /*% ripper: unary!(ID2VAL('\'!\''), $:2) %*/
12222 }
12223#line 12224 "parse.c"
12224 break;
12225
12226 case 71: /* $@7: %empty */
12227#line 3363 "parse.y"
12228 {
12229 value_expr((yyvsp[-1].node));
12230 }
12231#line 12232 "parse.c"
12232 break;
12233
12234 case 72: /* expr: arg "=>" $@7 p_in_kwarg p_pvtbl p_pktbl p_top_expr_body */
12235#line 3368 "parse.y"
12236 {
12237 pop_pktbl(p, (yyvsp[-1].tbl));
12238 pop_pvtbl(p, (yyvsp[-2].tbl));
12239 p->ctxt.in_kwarg = (yyvsp[-3].ctxt).in_kwarg;
12240 (yyval.node) = NEW_CASE3((yyvsp[-6].node), NEW_IN((yyvsp[0].node), 0, 0, &(yylsp[0])), &(yyloc), &NULL_LOC, &NULL_LOC);
12241 /*% ripper: case!($:arg, in!($:body, Qnil, Qnil)) %*/
12242 }
12243#line 12244 "parse.c"
12244 break;
12245
12246 case 73: /* $@8: %empty */
12247#line 3376 "parse.y"
12248 {
12249 value_expr((yyvsp[-1].node));
12250 }
12251#line 12252 "parse.c"
12252 break;
12253
12254 case 74: /* expr: arg "'in'" $@8 p_in_kwarg p_pvtbl p_pktbl p_top_expr_body */
12255#line 3381 "parse.y"
12256 {
12257 pop_pktbl(p, (yyvsp[-1].tbl));
12258 pop_pvtbl(p, (yyvsp[-2].tbl));
12259 p->ctxt.in_kwarg = (yyvsp[-3].ctxt).in_kwarg;
12260 (yyval.node) = NEW_CASE3((yyvsp[-6].node), NEW_IN((yyvsp[0].node), NEW_TRUE(&(yylsp[0])), NEW_FALSE(&(yylsp[0])), &(yylsp[0])), &(yyloc), &NULL_LOC, &NULL_LOC);
12261 /*% ripper: case!($:arg, in!($:body, Qnil, Qnil)) %*/
12262 }
12263#line 12264 "parse.c"
12264 break;
12265
12266 case 76: /* def_name: fname */
12267#line 3392 "parse.y"
12268 {
12269 ID fname = (yyvsp[0].id);
12270 numparam_name(p, fname);
12271 local_push(p, 0);
12272 p->ctxt.in_def = 1;
12273 p->ctxt.in_rescue = before_rescue;
12274 p->ctxt.cant_return = 0;
12275 (yyval.id) = (yyvsp[0].id);
12276 }
12277#line 12278 "parse.c"
12278 break;
12279
12280 case 77: /* defn_head: k_def def_name */
12281#line 3404 "parse.y"
12282 {
12283 (yyval.node_def_temp) = def_head_save(p, (yyvsp[-1].node_def_temp));
12284 (yyval.node_def_temp)->nd_mid = (yyvsp[0].id);
12285 (yyval.node_def_temp)->nd_def = NEW_DEFN((yyvsp[0].id), 0, &(yyloc));
12286 /*% ripper: $:def_name %*/
12287 }
12288#line 12289 "parse.c"
12289 break;
12290
12291 case 78: /* $@9: %empty */
12292#line 3413 "parse.y"
12293 {
12294 SET_LEX_STATE(EXPR_FNAME);
12295 }
12296#line 12297 "parse.c"
12297 break;
12298
12299 case 79: /* defs_head: k_def singleton dot_or_colon $@9 def_name */
12300#line 3417 "parse.y"
12301 {
12302 SET_LEX_STATE(EXPR_ENDFN|EXPR_LABEL); /* force for args */
12303 (yyval.node_def_temp) = def_head_save(p, (yyvsp[-4].node_def_temp));
12304 (yyval.node_def_temp)->nd_mid = (yyvsp[0].id);
12305 (yyval.node_def_temp)->nd_def = NEW_DEFS((yyvsp[-3].node), (yyvsp[0].id), 0, &(yyloc));
12306 /*% ripper: [$:singleton, $:dot_or_colon, $:def_name] %*/
12307 }
12308#line 12309 "parse.c"
12309 break;
12310
12311 case 80: /* expr_value: expr */
12312#line 3427 "parse.y"
12313 {
12314 value_expr((yyvsp[0].node));
12315 (yyval.node) = (yyvsp[0].node);
12316 }
12317#line 12318 "parse.c"
12318 break;
12319
12320 case 81: /* expr_value: error */
12321#line 3432 "parse.y"
12322 {
12323 (yyval.node) = NEW_ERROR(&(yyloc));
12324 }
12325#line 12326 "parse.c"
12326 break;
12327
12328 case 82: /* $@10: %empty */
12329#line 3437 "parse.y"
12330 {COND_PUSH(1);}
12331#line 12332 "parse.c"
12332 break;
12333
12334 case 83: /* $@11: %empty */
12335#line 3437 "parse.y"
12336 {COND_POP();}
12337#line 12338 "parse.c"
12338 break;
12339
12340 case 84: /* expr_value_do: $@10 expr_value do $@11 */
12341#line 3438 "parse.y"
12342 {
12343 (yyval.node) = (yyvsp[-2].node);
12344 /*% ripper: $:2 %*/
12345 }
12346#line 12347 "parse.c"
12347 break;
12348
12349 case 88: /* block_command: block_call call_op2 operation2 command_args */
12350#line 3450 "parse.y"
12351 {
12352 (yyval.node) = new_qcall(p, (yyvsp[-2].id), (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
12353 /*% ripper: method_add_arg!(call!($:1, $:2, $:3), $:4) %*/
12354 }
12355#line 12356 "parse.c"
12356 break;
12357
12358 case 89: /* cmd_brace_block: "{ arg" brace_body '}' */
12359#line 3457 "parse.y"
12360 {
12361 (yyval.node) = (yyvsp[-1].node);
12362 set_embraced_location((yyval.node), &(yylsp[-2]), &(yylsp[0]));
12363 /*% ripper: $:2 %*/
12364 }
12365#line 12366 "parse.c"
12366 break;
12367
12368 case 90: /* fcall: operation */
12369#line 3465 "parse.y"
12370 {
12371 (yyval.node_fcall) = NEW_FCALL((yyvsp[0].id), 0, &(yyloc));
12372 /*% ripper: $:1 %*/
12373 }
12374#line 12375 "parse.c"
12375 break;
12376
12377 case 91: /* command: fcall command_args */
12378#line 3472 "parse.y"
12379 {
12380 (yyvsp[-1].node_fcall)->nd_args = (yyvsp[0].node);
12381 nd_set_last_loc((yyvsp[-1].node_fcall), (yylsp[0]).end_pos);
12382 (yyval.node) = (NODE *)(yyvsp[-1].node_fcall);
12383 /*% ripper: command!($:1, $:2) %*/
12384 }
12385#line 12386 "parse.c"
12386 break;
12387
12388 case 92: /* command: fcall command_args cmd_brace_block */
12389#line 3479 "parse.y"
12390 {
12391 block_dup_check(p, (yyvsp[-1].node), (yyvsp[0].node));
12392 (yyvsp[-2].node_fcall)->nd_args = (yyvsp[-1].node);
12393 (yyval.node) = method_add_block(p, (NODE *)(yyvsp[-2].node_fcall), (yyvsp[0].node), &(yyloc));
12394 fixpos((yyval.node), RNODE((yyvsp[-2].node_fcall)));
12395 nd_set_last_loc((yyvsp[-2].node_fcall), (yylsp[-1]).end_pos);
12396 /*% ripper: method_add_block!(command!($:1, $:2), $:3) %*/
12397 }
12398#line 12399 "parse.c"
12399 break;
12400
12401 case 93: /* command: primary_value call_op operation2 command_args */
12402#line 3488 "parse.y"
12403 {
12404 (yyval.node) = new_command_qcall(p, (yyvsp[-2].id), (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), 0, &(yylsp[-1]), &(yyloc));
12405 /*% ripper: command_call!($:1, $:2, $:3, $:4) %*/
12406 }
12407#line 12408 "parse.c"
12408 break;
12409
12410 case 94: /* command: primary_value call_op operation2 command_args cmd_brace_block */
12411#line 3493 "parse.y"
12412 {
12413 (yyval.node) = new_command_qcall(p, (yyvsp[-3].id), (yyvsp[-4].node), (yyvsp[-2].id), (yyvsp[-1].node), (yyvsp[0].node), &(yylsp[-2]), &(yyloc));
12414 /*% ripper: method_add_block!(command_call!($:1, $:2, $:3, $:4), $:5) %*/
12415 }
12416#line 12417 "parse.c"
12417 break;
12418
12419 case 95: /* command: primary_value "::" operation2 command_args */
12420#line 3498 "parse.y"
12421 {
12422 (yyval.node) = new_command_qcall(p, idCOLON2, (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), 0, &(yylsp[-1]), &(yyloc));
12423 /*% ripper: command_call!($:1, $:2, $:3, $:4) %*/
12424 }
12425#line 12426 "parse.c"
12426 break;
12427
12428 case 96: /* command: primary_value "::" operation2 command_args cmd_brace_block */
12429#line 3503 "parse.y"
12430 {
12431 (yyval.node) = new_command_qcall(p, idCOLON2, (yyvsp[-4].node), (yyvsp[-2].id), (yyvsp[-1].node), (yyvsp[0].node), &(yylsp[-2]), &(yyloc));
12432 /*% ripper: method_add_block!(command_call!($:1, $:2, $:3, $:4), $:5) %*/
12433 }
12434#line 12435 "parse.c"
12435 break;
12436
12437 case 97: /* command: primary_value "::" "constant" '{' brace_body '}' */
12438#line 3508 "parse.y"
12439 {
12440 set_embraced_location((yyvsp[-1].node), &(yylsp[-2]), &(yylsp[0]));
12441 (yyval.node) = new_command_qcall(p, idCOLON2, (yyvsp[-5].node), (yyvsp[-3].id), 0, (yyvsp[-1].node), &(yylsp[-3]), &(yyloc));
12442 /*% ripper: method_add_block!(command_call!($:1, $:2, $:3, Qnil), $:5) %*/
12443 }
12444#line 12445 "parse.c"
12445 break;
12446
12447 case 98: /* command: "'super'" command_args */
12448#line 3514 "parse.y"
12449 {
12450 (yyval.node) = NEW_SUPER((yyvsp[0].node), &(yyloc));
12451 fixpos((yyval.node), (yyvsp[0].node));
12452 /*% ripper: super!($:2) %*/
12453 }
12454#line 12455 "parse.c"
12455 break;
12456
12457 case 99: /* command: k_yield command_args */
12458#line 3520 "parse.y"
12459 {
12460 (yyval.node) = new_yield(p, (yyvsp[0].node), &(yyloc));
12461 fixpos((yyval.node), (yyvsp[0].node));
12462 /*% ripper: yield!($:2) %*/
12463 }
12464#line 12465 "parse.c"
12465 break;
12466
12467 case 100: /* command: k_return call_args */
12468#line 3526 "parse.y"
12469 {
12470 (yyval.node) = NEW_RETURN(ret_args(p, (yyvsp[0].node)), &(yyloc), &(yylsp[-1]));
12471 /*% ripper: return!($:2) %*/
12472 }
12473#line 12474 "parse.c"
12474 break;
12475
12476 case 101: /* command: "'break'" call_args */
12477#line 3531 "parse.y"
12478 {
12479 NODE *args = 0;
12480 args = ret_args(p, (yyvsp[0].node));
12481 (yyval.node) = add_block_exit(p, NEW_BREAK(args, &(yyloc), &(yylsp[-1])));
12482 /*% ripper: break!($:2) %*/
12483 }
12484#line 12485 "parse.c"
12485 break;
12486
12487 case 102: /* command: "'next'" call_args */
12488#line 3538 "parse.y"
12489 {
12490 NODE *args = 0;
12491 args = ret_args(p, (yyvsp[0].node));
12492 (yyval.node) = add_block_exit(p, NEW_NEXT(args, &(yyloc), &(yylsp[-1])));
12493 /*% ripper: next!($:2) %*/
12494 }
12495#line 12496 "parse.c"
12496 break;
12497
12498 case 104: /* mlhs: "(" mlhs_inner rparen */
12499#line 3548 "parse.y"
12500 {
12501 (yyval.node_masgn) = (yyvsp[-1].node_masgn);
12502 /*% ripper: mlhs_paren!($:2) %*/
12503 }
12504#line 12505 "parse.c"
12505 break;
12506
12507 case 106: /* mlhs_inner: "(" mlhs_inner rparen */
12508#line 3556 "parse.y"
12509 {
12510 (yyval.node_masgn) = NEW_MASGN(NEW_LIST((NODE *)(yyvsp[-1].node_masgn), &(yyloc)), 0, &(yyloc));
12511 /*% ripper: mlhs_paren!($:2) %*/
12512 }
12513#line 12514 "parse.c"
12514 break;
12515
12516 case 107: /* mlhs_basic: mlhs_head */
12517#line 3563 "parse.y"
12518 {
12519 (yyval.node_masgn) = NEW_MASGN((yyvsp[0].node), 0, &(yyloc));
12520 /*% ripper: $:1 %*/
12521 }
12522#line 12523 "parse.c"
12523 break;
12524
12525 case 108: /* mlhs_basic: mlhs_head mlhs_item */
12526#line 3568 "parse.y"
12527 {
12528 (yyval.node_masgn) = NEW_MASGN(list_append(p, (yyvsp[-1].node), (yyvsp[0].node)), 0, &(yyloc));
12529 /*% ripper: mlhs_add!($:1, $:2) %*/
12530 }
12531#line 12532 "parse.c"
12532 break;
12533
12534 case 109: /* mlhs_basic: mlhs_head "*" mlhs_node */
12535#line 3573 "parse.y"
12536 {
12537 (yyval.node_masgn) = NEW_MASGN((yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
12538 /*% ripper: mlhs_add_star!($:1, $:3) %*/
12539 }
12540#line 12541 "parse.c"
12541 break;
12542
12543 case 110: /* mlhs_basic: mlhs_head "*" mlhs_node ',' mlhs_post */
12544#line 3578 "parse.y"
12545 {
12546 (yyval.node_masgn) = NEW_MASGN((yyvsp[-4].node), NEW_POSTARG((yyvsp[-2].node),(yyvsp[0].node),&(yyloc)), &(yyloc));
12547 /*% ripper: mlhs_add_post!(mlhs_add_star!($:1, $:3), $:5) %*/
12548 }
12549#line 12550 "parse.c"
12550 break;
12551
12552 case 111: /* mlhs_basic: mlhs_head "*" */
12553#line 3583 "parse.y"
12554 {
12555 (yyval.node_masgn) = NEW_MASGN((yyvsp[-1].node), NODE_SPECIAL_NO_NAME_REST, &(yyloc));
12556 /*% ripper: mlhs_add_star!($:1, Qnil) %*/
12557 }
12558#line 12559 "parse.c"
12559 break;
12560
12561 case 112: /* mlhs_basic: mlhs_head "*" ',' mlhs_post */
12562#line 3588 "parse.y"
12563 {
12564 (yyval.node_masgn) = NEW_MASGN((yyvsp[-3].node), NEW_POSTARG(NODE_SPECIAL_NO_NAME_REST, (yyvsp[0].node), &(yyloc)), &(yyloc));
12565 /*% ripper: mlhs_add_post!(mlhs_add_star!($:1, Qnil), $:4) %*/
12566 }
12567#line 12568 "parse.c"
12568 break;
12569
12570 case 113: /* mlhs_basic: "*" mlhs_node */
12571#line 3593 "parse.y"
12572 {
12573 (yyval.node_masgn) = NEW_MASGN(0, (yyvsp[0].node), &(yyloc));
12574 /*% ripper: mlhs_add_star!(mlhs_new!, $:2) %*/
12575 }
12576#line 12577 "parse.c"
12577 break;
12578
12579 case 114: /* mlhs_basic: "*" mlhs_node ',' mlhs_post */
12580#line 3598 "parse.y"
12581 {
12582 (yyval.node_masgn) = NEW_MASGN(0, NEW_POSTARG((yyvsp[-2].node),(yyvsp[0].node),&(yyloc)), &(yyloc));
12583 /*% ripper: mlhs_add_post!(mlhs_add_star!(mlhs_new!, $:2), $:4) %*/
12584 }
12585#line 12586 "parse.c"
12586 break;
12587
12588 case 115: /* mlhs_basic: "*" */
12589#line 3603 "parse.y"
12590 {
12591 (yyval.node_masgn) = NEW_MASGN(0, NODE_SPECIAL_NO_NAME_REST, &(yyloc));
12592 /*% ripper: mlhs_add_star!(mlhs_new!, Qnil) %*/
12593 }
12594#line 12595 "parse.c"
12595 break;
12596
12597 case 116: /* mlhs_basic: "*" ',' mlhs_post */
12598#line 3608 "parse.y"
12599 {
12600 (yyval.node_masgn) = NEW_MASGN(0, NEW_POSTARG(NODE_SPECIAL_NO_NAME_REST, (yyvsp[0].node), &(yyloc)), &(yyloc));
12601 /*% ripper: mlhs_add_post!(mlhs_add_star!(mlhs_new!, Qnil), $:3) %*/
12602 }
12603#line 12604 "parse.c"
12604 break;
12605
12606 case 118: /* mlhs_item: "(" mlhs_inner rparen */
12607#line 3616 "parse.y"
12608 {
12609 (yyval.node) = (NODE *)(yyvsp[-1].node_masgn);
12610 /*% ripper: mlhs_paren!($:2) %*/
12611 }
12612#line 12613 "parse.c"
12613 break;
12614
12615 case 119: /* mlhs_head: mlhs_item ',' */
12616#line 3623 "parse.y"
12617 {
12618 (yyval.node) = NEW_LIST((yyvsp[-1].node), &(yylsp[-1]));
12619 /*% ripper: mlhs_add!(mlhs_new!, $:1) %*/
12620 }
12621#line 12622 "parse.c"
12622 break;
12623
12624 case 120: /* mlhs_head: mlhs_head mlhs_item ',' */
12625#line 3628 "parse.y"
12626 {
12627 (yyval.node) = list_append(p, (yyvsp[-2].node), (yyvsp[-1].node));
12628 /*% ripper: mlhs_add!($:1, $:2) %*/
12629 }
12630#line 12631 "parse.c"
12631 break;
12632
12633 case 121: /* mlhs_post: mlhs_item */
12634#line 3635 "parse.y"
12635 {
12636 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
12637 /*% ripper: mlhs_add!(mlhs_new!, $:1) %*/
12638 }
12639#line 12640 "parse.c"
12640 break;
12641
12642 case 122: /* mlhs_post: mlhs_post ',' mlhs_item */
12643#line 3640 "parse.y"
12644 {
12645 (yyval.node) = list_append(p, (yyvsp[-2].node), (yyvsp[0].node));
12646 /*% ripper: mlhs_add!($:1, $:3) %*/
12647 }
12648#line 12649 "parse.c"
12649 break;
12650
12651 case 123: /* mlhs_node: user_variable */
12652#line 3647 "parse.y"
12653 {
12654 /*% ripper: var_field!($:1) %*/
12655 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
12656 }
12657#line 12658 "parse.c"
12658 break;
12659
12660 case 124: /* mlhs_node: keyword_variable */
12661#line 3647 "parse.y"
12662 {
12663 /*% ripper: var_field!($:1) %*/
12664 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
12665 }
12666#line 12667 "parse.c"
12667 break;
12668
12669 case 125: /* mlhs_node: primary_value '[' opt_call_args rbracket */
12670#line 3652 "parse.y"
12671 {
12672 (yyval.node) = aryset(p, (yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
12673 /*% ripper: aref_field!($:1, $:3) %*/
12674 }
12675#line 12676 "parse.c"
12676 break;
12677
12678 case 126: /* mlhs_node: primary_value call_op "local variable or method" */
12679#line 3657 "parse.y"
12680 {
12681 anddot_multiple_assignment_check(p, &(yylsp[-1]), (yyvsp[-1].id));
12682 (yyval.node) = attrset(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].id), &(yyloc));
12683 /*% ripper: field!($:1, $:2, $:3) %*/
12684 }
12685#line 12686 "parse.c"
12686 break;
12687
12688 case 127: /* mlhs_node: primary_value "::" "local variable or method" */
12689#line 3663 "parse.y"
12690 {
12691 (yyval.node) = attrset(p, (yyvsp[-2].node), idCOLON2, (yyvsp[0].id), &(yyloc));
12692 /*% ripper: const_path_field!($:1, $:3) %*/
12693 }
12694#line 12695 "parse.c"
12695 break;
12696
12697 case 128: /* mlhs_node: primary_value call_op "constant" */
12698#line 3668 "parse.y"
12699 {
12700 anddot_multiple_assignment_check(p, &(yylsp[-1]), (yyvsp[-1].id));
12701 (yyval.node) = attrset(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].id), &(yyloc));
12702 /*% ripper: field!($:1, $:2, $:3) %*/
12703 }
12704#line 12705 "parse.c"
12705 break;
12706
12707 case 129: /* mlhs_node: primary_value "::" "constant" */
12708#line 3674 "parse.y"
12709 {
12710 /*% ripper: const_path_field!($:1, $:3) %*/
12711 (yyval.node) = const_decl(p, NEW_COLON2((yyvsp[-2].node), (yyvsp[0].id), &(yyloc)), &(yyloc));
12712 }
12713#line 12714 "parse.c"
12714 break;
12715
12716 case 130: /* mlhs_node: ":: at EXPR_BEG" "constant" */
12717#line 3679 "parse.y"
12718 {
12719 /*% ripper: top_const_field!($:2) %*/
12720 (yyval.node) = const_decl(p, NEW_COLON3((yyvsp[0].id), &(yyloc)), &(yyloc));
12721 }
12722#line 12723 "parse.c"
12723 break;
12724
12725 case 131: /* mlhs_node: backref */
12726#line 3684 "parse.y"
12727 {
12728 VALUE MAYBE_UNUSED(e) = rb_backref_error(p, (yyvsp[0].node));
12729 (yyval.node) = NEW_ERROR(&(yyloc));
12730 /*% ripper[error]: assign_error!(?e, var_field!($:1)) %*/
12731 }
12732#line 12733 "parse.c"
12733 break;
12734
12735 case 132: /* lhs: user_variable */
12736#line 3692 "parse.y"
12737 {
12738 /*% ripper: var_field!($:1) %*/
12739 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
12740 }
12741#line 12742 "parse.c"
12742 break;
12743
12744 case 133: /* lhs: keyword_variable */
12745#line 3692 "parse.y"
12746 {
12747 /*% ripper: var_field!($:1) %*/
12748 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
12749 }
12750#line 12751 "parse.c"
12751 break;
12752
12753 case 134: /* lhs: primary_value '[' opt_call_args rbracket */
12754#line 3697 "parse.y"
12755 {
12756 (yyval.node) = aryset(p, (yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
12757 /*% ripper: aref_field!($:1, $:3) %*/
12758 }
12759#line 12760 "parse.c"
12760 break;
12761
12762 case 135: /* lhs: primary_value call_op "local variable or method" */
12763#line 3702 "parse.y"
12764 {
12765 (yyval.node) = attrset(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].id), &(yyloc));
12766 /*% ripper: field!($:1, $:2, $:3) %*/
12767 }
12768#line 12769 "parse.c"
12769 break;
12770
12771 case 136: /* lhs: primary_value "::" "local variable or method" */
12772#line 3707 "parse.y"
12773 {
12774 (yyval.node) = attrset(p, (yyvsp[-2].node), idCOLON2, (yyvsp[0].id), &(yyloc));
12775 /*% ripper: field!($:1, $:2, $:3) %*/
12776 }
12777#line 12778 "parse.c"
12778 break;
12779
12780 case 137: /* lhs: primary_value call_op "constant" */
12781#line 3712 "parse.y"
12782 {
12783 (yyval.node) = attrset(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].id), &(yyloc));
12784 /*% ripper: field!($:1, $:2, $:3) %*/
12785 }
12786#line 12787 "parse.c"
12787 break;
12788
12789 case 138: /* lhs: primary_value "::" "constant" */
12790#line 3717 "parse.y"
12791 {
12792 /*% ripper: const_path_field!($:1, $:3) %*/
12793 (yyval.node) = const_decl(p, NEW_COLON2((yyvsp[-2].node), (yyvsp[0].id), &(yyloc)), &(yyloc));
12794 }
12795#line 12796 "parse.c"
12796 break;
12797
12798 case 139: /* lhs: ":: at EXPR_BEG" "constant" */
12799#line 3722 "parse.y"
12800 {
12801 /*% ripper: top_const_field!($:2) %*/
12802 (yyval.node) = const_decl(p, NEW_COLON3((yyvsp[0].id), &(yyloc)), &(yyloc));
12803 }
12804#line 12805 "parse.c"
12805 break;
12806
12807 case 140: /* lhs: backref */
12808#line 3727 "parse.y"
12809 {
12810 VALUE MAYBE_UNUSED(e) = rb_backref_error(p, (yyvsp[0].node));
12811 (yyval.node) = NEW_ERROR(&(yyloc));
12812 /*% ripper[error]: assign_error!(?e, var_field!($:1)) %*/
12813 }
12814#line 12815 "parse.c"
12815 break;
12816
12817 case 141: /* cname: "local variable or method" */
12818#line 3735 "parse.y"
12819 {
12820 static const char mesg[] = "class/module name must be CONSTANT";
12821 /*%%%*/
12822 yyerror1(&(yylsp[0]), mesg);
12823 /*% %*/
12824 /*% ripper[error]: class_name_error!(ERR_MESG(), $:1) %*/
12825 }
12826#line 12827 "parse.c"
12827 break;
12828
12829 case 143: /* cpath: ":: at EXPR_BEG" cname */
12830#line 3746 "parse.y"
12831 {
12832 (yyval.node) = NEW_COLON3((yyvsp[0].id), &(yyloc));
12833 /*% ripper: top_const_ref!($:2) %*/
12834 }
12835#line 12836 "parse.c"
12836 break;
12837
12838 case 144: /* cpath: cname */
12839#line 3751 "parse.y"
12840 {
12841 (yyval.node) = NEW_COLON2(0, (yyvsp[0].id), &(yyloc));
12842 /*% ripper: const_ref!($:1) %*/
12843 }
12844#line 12845 "parse.c"
12845 break;
12846
12847 case 145: /* cpath: primary_value "::" cname */
12848#line 3756 "parse.y"
12849 {
12850 (yyval.node) = NEW_COLON2((yyvsp[-2].node), (yyvsp[0].id), &(yyloc));
12851 /*% ripper: const_path_ref!($:1, $:3) %*/
12852 }
12853#line 12854 "parse.c"
12854 break;
12855
12856 case 149: /* fname: op */
12857#line 3765 "parse.y"
12858 {
12859 SET_LEX_STATE(EXPR_ENDFN);
12860 (yyval.id) = (yyvsp[0].id);
12861 }
12862#line 12863 "parse.c"
12863 break;
12864
12865 case 151: /* fitem: fname */
12866#line 3773 "parse.y"
12867 {
12868 (yyval.node) = NEW_SYM(rb_id2str((yyvsp[0].id)), &(yyloc));
12869 /*% ripper: symbol_literal!($:1) %*/
12870 }
12871#line 12872 "parse.c"
12872 break;
12873
12874 case 153: /* undef_list: fitem */
12875#line 3781 "parse.y"
12876 {
12877 (yyval.node) = NEW_UNDEF((yyvsp[0].node), &(yyloc));
12878 /*% ripper: rb_ary_new3(1, $:1) %*/
12879 }
12880#line 12881 "parse.c"
12881 break;
12882
12883 case 154: /* $@12: %empty */
12884#line 3785 "parse.y"
12885 {SET_LEX_STATE(EXPR_FNAME|EXPR_FITEM);}
12886#line 12887 "parse.c"
12887 break;
12888
12889 case 155: /* undef_list: undef_list ',' $@12 fitem */
12890#line 3786 "parse.y"
12891 {
12892 nd_set_last_loc((yyvsp[-3].node), (yylsp[0]).end_pos);
12893 rb_parser_ary_push_node(p, RNODE_UNDEF((yyvsp[-3].node))->nd_undefs, (yyvsp[0].node));
12894 /*% ripper: rb_ary_push($:1, $:4) %*/
12895 }
12896#line 12897 "parse.c"
12897 break;
12898
12899 case 156: /* op: '|' */
12900#line 3793 "parse.y"
12901 { (yyval.id) = '|'; }
12902#line 12903 "parse.c"
12903 break;
12904
12905 case 157: /* op: '^' */
12906#line 3794 "parse.y"
12907 { (yyval.id) = '^'; }
12908#line 12909 "parse.c"
12909 break;
12910
12911 case 158: /* op: '&' */
12912#line 3795 "parse.y"
12913 { (yyval.id) = '&'; }
12914#line 12915 "parse.c"
12915 break;
12916
12917 case 159: /* op: "<=>" */
12918#line 3796 "parse.y"
12919 { (yyval.id) = tCMP; }
12920#line 12921 "parse.c"
12921 break;
12922
12923 case 160: /* op: "==" */
12924#line 3797 "parse.y"
12925 { (yyval.id) = tEQ; }
12926#line 12927 "parse.c"
12927 break;
12928
12929 case 161: /* op: "===" */
12930#line 3798 "parse.y"
12931 { (yyval.id) = tEQQ; }
12932#line 12933 "parse.c"
12933 break;
12934
12935 case 162: /* op: "=~" */
12936#line 3799 "parse.y"
12937 { (yyval.id) = tMATCH; }
12938#line 12939 "parse.c"
12939 break;
12940
12941 case 163: /* op: "!~" */
12942#line 3800 "parse.y"
12943 { (yyval.id) = tNMATCH; }
12944#line 12945 "parse.c"
12945 break;
12946
12947 case 164: /* op: '>' */
12948#line 3801 "parse.y"
12949 { (yyval.id) = '>'; }
12950#line 12951 "parse.c"
12951 break;
12952
12953 case 165: /* op: ">=" */
12954#line 3802 "parse.y"
12955 { (yyval.id) = tGEQ; }
12956#line 12957 "parse.c"
12957 break;
12958
12959 case 166: /* op: '<' */
12960#line 3803 "parse.y"
12961 { (yyval.id) = '<'; }
12962#line 12963 "parse.c"
12963 break;
12964
12965 case 167: /* op: "<=" */
12966#line 3804 "parse.y"
12967 { (yyval.id) = tLEQ; }
12968#line 12969 "parse.c"
12969 break;
12970
12971 case 168: /* op: "!=" */
12972#line 3805 "parse.y"
12973 { (yyval.id) = tNEQ; }
12974#line 12975 "parse.c"
12975 break;
12976
12977 case 169: /* op: "<<" */
12978#line 3806 "parse.y"
12979 { (yyval.id) = tLSHFT; }
12980#line 12981 "parse.c"
12981 break;
12982
12983 case 170: /* op: ">>" */
12984#line 3807 "parse.y"
12985 { (yyval.id) = tRSHFT; }
12986#line 12987 "parse.c"
12987 break;
12988
12989 case 171: /* op: '+' */
12990#line 3808 "parse.y"
12991 { (yyval.id) = '+'; }
12992#line 12993 "parse.c"
12993 break;
12994
12995 case 172: /* op: '-' */
12996#line 3809 "parse.y"
12997 { (yyval.id) = '-'; }
12998#line 12999 "parse.c"
12999 break;
13000
13001 case 173: /* op: '*' */
13002#line 3810 "parse.y"
13003 { (yyval.id) = '*'; }
13004#line 13005 "parse.c"
13005 break;
13006
13007 case 174: /* op: "*" */
13008#line 3811 "parse.y"
13009 { (yyval.id) = '*'; }
13010#line 13011 "parse.c"
13011 break;
13012
13013 case 175: /* op: '/' */
13014#line 3812 "parse.y"
13015 { (yyval.id) = '/'; }
13016#line 13017 "parse.c"
13017 break;
13018
13019 case 176: /* op: '%' */
13020#line 3813 "parse.y"
13021 { (yyval.id) = '%'; }
13022#line 13023 "parse.c"
13023 break;
13024
13025 case 177: /* op: "**" */
13026#line 3814 "parse.y"
13027 { (yyval.id) = tPOW; }
13028#line 13029 "parse.c"
13029 break;
13030
13031 case 178: /* op: "**arg" */
13032#line 3815 "parse.y"
13033 { (yyval.id) = tDSTAR; }
13034#line 13035 "parse.c"
13035 break;
13036
13037 case 179: /* op: '!' */
13038#line 3816 "parse.y"
13039 { (yyval.id) = '!'; }
13040#line 13041 "parse.c"
13041 break;
13042
13043 case 180: /* op: '~' */
13044#line 3817 "parse.y"
13045 { (yyval.id) = '~'; }
13046#line 13047 "parse.c"
13047 break;
13048
13049 case 181: /* op: "unary+" */
13050#line 3818 "parse.y"
13051 { (yyval.id) = tUPLUS; }
13052#line 13053 "parse.c"
13053 break;
13054
13055 case 182: /* op: "unary-" */
13056#line 3819 "parse.y"
13057 { (yyval.id) = tUMINUS; }
13058#line 13059 "parse.c"
13059 break;
13060
13061 case 183: /* op: "[]" */
13062#line 3820 "parse.y"
13063 { (yyval.id) = tAREF; }
13064#line 13065 "parse.c"
13065 break;
13066
13067 case 184: /* op: "[]=" */
13068#line 3821 "parse.y"
13069 { (yyval.id) = tASET; }
13070#line 13071 "parse.c"
13071 break;
13072
13073 case 185: /* op: '`' */
13074#line 3822 "parse.y"
13075 { (yyval.id) = '`'; }
13076#line 13077 "parse.c"
13077 break;
13078
13079 case 227: /* arg: lhs '=' lex_ctxt arg_rhs */
13080#line 3840 "parse.y"
13081 {
13082 (yyval.node) = node_assign(p, (yyvsp[-3].node), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
13083 /*% ripper: assign!($:1, $:4) %*/
13084 }
13085#line 13086 "parse.c"
13086 break;
13087
13088 case 228: /* arg: var_lhs "operator-assignment" lex_ctxt arg_rhs */
13089#line 3845 "parse.y"
13090 {
13091 (yyval.node) = new_op_assign(p, (yyvsp[-3].node), (yyvsp[-2].id), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
13092 /*% ripper: opassign!($:1, $:2, $:4) %*/
13093 }
13094#line 13095 "parse.c"
13095 break;
13096
13097 case 229: /* arg: primary_value '[' opt_call_args rbracket "operator-assignment" lex_ctxt arg_rhs */
13098#line 3850 "parse.y"
13099 {
13100 (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]));
13101 /*% ripper: opassign!(aref_field!($:1, $:3), $:5, $:7) %*/
13102 }
13103#line 13104 "parse.c"
13104 break;
13105
13106 case 230: /* arg: primary_value call_op "local variable or method" "operator-assignment" lex_ctxt arg_rhs */
13107#line 3855 "parse.y"
13108 {
13109 (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]));
13110 /*% ripper: opassign!(field!($:1, $:2, $:3), $:4, $:6) %*/
13111 }
13112#line 13113 "parse.c"
13113 break;
13114
13115 case 231: /* arg: primary_value call_op "constant" "operator-assignment" lex_ctxt arg_rhs */
13116#line 3860 "parse.y"
13117 {
13118 (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]));
13119 /*% ripper: opassign!(field!($:1, $:2, $:3), $:4, $:6) %*/
13120 }
13121#line 13122 "parse.c"
13122 break;
13123
13124 case 232: /* arg: primary_value "::" "local variable or method" "operator-assignment" lex_ctxt arg_rhs */
13125#line 3865 "parse.y"
13126 {
13127 (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]));
13128 /*% ripper: opassign!(field!($:1, $:2, $:3), $:4, $:6) %*/
13129 }
13130#line 13131 "parse.c"
13131 break;
13132
13133 case 233: /* arg: primary_value "::" "constant" "operator-assignment" lex_ctxt arg_rhs */
13134#line 3870 "parse.y"
13135 {
13136 YYLTYPE loc = code_loc_gen(&(yylsp[-5]), &(yylsp[-3]));
13137 (yyval.node) = new_const_op_assign(p, NEW_COLON2((yyvsp[-5].node), (yyvsp[-3].id), &loc), (yyvsp[-2].id), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
13138 /*% ripper: opassign!(const_path_field!($:1, $:3), $:4, $:6) %*/
13139 }
13140#line 13141 "parse.c"
13141 break;
13142
13143 case 234: /* arg: ":: at EXPR_BEG" "constant" "operator-assignment" lex_ctxt arg_rhs */
13144#line 3876 "parse.y"
13145 {
13146 YYLTYPE loc = code_loc_gen(&(yylsp[-4]), &(yylsp[-3]));
13147 (yyval.node) = new_const_op_assign(p, NEW_COLON3((yyvsp[-3].id), &loc), (yyvsp[-2].id), (yyvsp[0].node), (yyvsp[-1].ctxt), &(yyloc));
13148 /*% ripper: opassign!(top_const_field!($:2), $:3, $:5) %*/
13149 }
13150#line 13151 "parse.c"
13151 break;
13152
13153 case 235: /* arg: backref "operator-assignment" lex_ctxt arg_rhs */
13154#line 3882 "parse.y"
13155 {
13156 VALUE MAYBE_UNUSED(e) = rb_backref_error(p, (yyvsp[-3].node));
13157 (yyval.node) = NEW_ERROR(&(yyloc));
13158 /*% ripper[error]: assign_error!(?e, opassign!(var_field!($:1), $:2, $:4)) %*/
13159 }
13160#line 13161 "parse.c"
13161 break;
13162
13163 case 236: /* arg: arg ".." arg */
13164#line 3888 "parse.y"
13165 {
13166 value_expr((yyvsp[-2].node));
13167 value_expr((yyvsp[0].node));
13168 (yyval.node) = NEW_DOT2((yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
13169 /*% ripper: dot2!($:1, $:3) %*/
13170 }
13171#line 13172 "parse.c"
13172 break;
13173
13174 case 237: /* arg: arg "..." arg */
13175#line 3895 "parse.y"
13176 {
13177 value_expr((yyvsp[-2].node));
13178 value_expr((yyvsp[0].node));
13179 (yyval.node) = NEW_DOT3((yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
13180 /*% ripper: dot3!($:1, $:3) %*/
13181 }
13182#line 13183 "parse.c"
13183 break;
13184
13185 case 238: /* arg: arg ".." */
13186#line 3902 "parse.y"
13187 {
13188 value_expr((yyvsp[-1].node));
13189 (yyval.node) = NEW_DOT2((yyvsp[-1].node), new_nil_at(p, &(yylsp[0]).end_pos), &(yyloc));
13190 /*% ripper: dot2!($:1, Qnil) %*/
13191 }
13192#line 13193 "parse.c"
13193 break;
13194
13195 case 239: /* arg: arg "..." */
13196#line 3908 "parse.y"
13197 {
13198 value_expr((yyvsp[-1].node));
13199 (yyval.node) = NEW_DOT3((yyvsp[-1].node), new_nil_at(p, &(yylsp[0]).end_pos), &(yyloc));
13200 /*% ripper: dot3!($:1, Qnil) %*/
13201 }
13202#line 13203 "parse.c"
13203 break;
13204
13205 case 240: /* arg: "(.." arg */
13206#line 3914 "parse.y"
13207 {
13208 value_expr((yyvsp[0].node));
13209 (yyval.node) = NEW_DOT2(new_nil_at(p, &(yylsp[-1]).beg_pos), (yyvsp[0].node), &(yyloc));
13210 /*% ripper: dot2!(Qnil, $:2) %*/
13211 }
13212#line 13213 "parse.c"
13213 break;
13214
13215 case 241: /* arg: "(..." arg */
13216#line 3920 "parse.y"
13217 {
13218 value_expr((yyvsp[0].node));
13219 (yyval.node) = NEW_DOT3(new_nil_at(p, &(yylsp[-1]).beg_pos), (yyvsp[0].node), &(yyloc));
13220 /*% ripper: dot3!(Qnil, $:2) %*/
13221 }
13222#line 13223 "parse.c"
13223 break;
13224
13225 case 242: /* arg: arg '+' arg */
13226#line 3926 "parse.y"
13227 {
13228 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '+', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13229 /*% ripper: binary!($:1, ID2VAL('\'+\''), $:3) %*/
13230 }
13231#line 13232 "parse.c"
13232 break;
13233
13234 case 243: /* arg: arg '-' arg */
13235#line 3931 "parse.y"
13236 {
13237 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '-', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13238 /*% ripper: binary!($:1, ID2VAL('\'-\''), $:3) %*/
13239 }
13240#line 13241 "parse.c"
13241 break;
13242
13243 case 244: /* arg: arg '*' arg */
13244#line 3936 "parse.y"
13245 {
13246 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '*', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13247 /*% ripper: binary!($:1, ID2VAL('\'*\''), $:3) %*/
13248 }
13249#line 13250 "parse.c"
13250 break;
13251
13252 case 245: /* arg: arg '/' arg */
13253#line 3941 "parse.y"
13254 {
13255 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '/', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13256 /*% ripper: binary!($:1, ID2VAL('\'/\''), $:3) %*/
13257 }
13258#line 13259 "parse.c"
13259 break;
13260
13261 case 246: /* arg: arg '%' arg */
13262#line 3946 "parse.y"
13263 {
13264 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '%', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13265 /*% ripper: binary!($:1, ID2VAL('\'%\''), $:3) %*/
13266 }
13267#line 13268 "parse.c"
13268 break;
13269
13270 case 247: /* arg: arg "**" arg */
13271#line 3951 "parse.y"
13272 {
13273 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idPow, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13274 /*% ripper: binary!($:1, ID2VAL(idPow), $:3) %*/
13275 }
13276#line 13277 "parse.c"
13277 break;
13278
13279 case 248: /* arg: tUMINUS_NUM simple_numeric "**" arg */
13280#line 3956 "parse.y"
13281 {
13282 (yyval.node) = call_uni_op(p, call_bin_op(p, (yyvsp[-2].node), idPow, (yyvsp[0].node), &(yylsp[-2]), &(yyloc)), idUMinus, &(yylsp[-3]), &(yyloc));
13283 /*% ripper: unary!(ID2VAL(idUMinus), binary!($:2, ID2VAL(idPow), $:4)) %*/
13284 }
13285#line 13286 "parse.c"
13286 break;
13287
13288 case 249: /* arg: "unary+" arg */
13289#line 3961 "parse.y"
13290 {
13291 (yyval.node) = call_uni_op(p, (yyvsp[0].node), idUPlus, &(yylsp[-1]), &(yyloc));
13292 /*% ripper: unary!(ID2VAL(idUPlus), $:2) %*/
13293 }
13294#line 13295 "parse.c"
13295 break;
13296
13297 case 250: /* arg: "unary-" arg */
13298#line 3966 "parse.y"
13299 {
13300 (yyval.node) = call_uni_op(p, (yyvsp[0].node), idUMinus, &(yylsp[-1]), &(yyloc));
13301 /*% ripper: unary!(ID2VAL(idUMinus), $:2) %*/
13302 }
13303#line 13304 "parse.c"
13304 break;
13305
13306 case 251: /* arg: arg '|' arg */
13307#line 3971 "parse.y"
13308 {
13309 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '|', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13310 /*% ripper: binary!($:1, ID2VAL('\'|\''), $:3) %*/
13311 }
13312#line 13313 "parse.c"
13313 break;
13314
13315 case 252: /* arg: arg '^' arg */
13316#line 3976 "parse.y"
13317 {
13318 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '^', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13319 /*% ripper: binary!($:1, ID2VAL('\'^\''), $:3) %*/
13320 }
13321#line 13322 "parse.c"
13322 break;
13323
13324 case 253: /* arg: arg '&' arg */
13325#line 3981 "parse.y"
13326 {
13327 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '&', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13328 /*% ripper: binary!($:1, ID2VAL('\'&\''), $:3) %*/
13329 }
13330#line 13331 "parse.c"
13331 break;
13332
13333 case 254: /* arg: arg "<=>" arg */
13334#line 3986 "parse.y"
13335 {
13336 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idCmp, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13337 /*% ripper: binary!($:1, ID2VAL(idCmp), $:3) %*/
13338 }
13339#line 13340 "parse.c"
13340 break;
13341
13342 case 256: /* arg: arg "==" arg */
13343#line 3992 "parse.y"
13344 {
13345 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idEq, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13346 /*% ripper: binary!($:1, ID2VAL(idEq), $:3) %*/
13347 }
13348#line 13349 "parse.c"
13349 break;
13350
13351 case 257: /* arg: arg "===" arg */
13352#line 3997 "parse.y"
13353 {
13354 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idEqq, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13355 /*% ripper: binary!($:1, ID2VAL(idEqq), $:3) %*/
13356 }
13357#line 13358 "parse.c"
13358 break;
13359
13360 case 258: /* arg: arg "!=" arg */
13361#line 4002 "parse.y"
13362 {
13363 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idNeq, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13364 /*% ripper: binary!($:1, ID2VAL(idNeq), $:3) %*/
13365 }
13366#line 13367 "parse.c"
13367 break;
13368
13369 case 259: /* arg: arg "=~" arg */
13370#line 4007 "parse.y"
13371 {
13372 (yyval.node) = match_op(p, (yyvsp[-2].node), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13373 /*% ripper: binary!($:1, ID2VAL(idEqTilde), $:3) %*/
13374 }
13375#line 13376 "parse.c"
13376 break;
13377
13378 case 260: /* arg: arg "!~" arg */
13379#line 4012 "parse.y"
13380 {
13381 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idNeqTilde, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13382 /*% ripper: binary!($:1, ID2VAL(idNeqTilde), $:3) %*/
13383 }
13384#line 13385 "parse.c"
13385 break;
13386
13387 case 261: /* arg: '!' arg */
13388#line 4017 "parse.y"
13389 {
13390 (yyval.node) = call_uni_op(p, method_cond(p, (yyvsp[0].node), &(yylsp[0])), '!', &(yylsp[-1]), &(yyloc));
13391 /*% ripper: unary!(ID2VAL('\'!\''), $:2) %*/
13392 }
13393#line 13394 "parse.c"
13394 break;
13395
13396 case 262: /* arg: '~' arg */
13397#line 4022 "parse.y"
13398 {
13399 (yyval.node) = call_uni_op(p, (yyvsp[0].node), '~', &(yylsp[-1]), &(yyloc));
13400 /*% ripper: unary!(ID2VAL('\'~\''), $:2) %*/
13401 }
13402#line 13403 "parse.c"
13403 break;
13404
13405 case 263: /* arg: arg "<<" arg */
13406#line 4027 "parse.y"
13407 {
13408 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idLTLT, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13409 /*% ripper: binary!($:1, ID2VAL(idLTLT), $:3) %*/
13410 }
13411#line 13412 "parse.c"
13412 break;
13413
13414 case 264: /* arg: arg ">>" arg */
13415#line 4032 "parse.y"
13416 {
13417 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idGTGT, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13418 /*% ripper: binary!($:1, ID2VAL(idGTGT), $:3) %*/
13419 }
13420#line 13421 "parse.c"
13421 break;
13422
13423 case 265: /* arg: arg "&&" arg */
13424#line 4037 "parse.y"
13425 {
13426 (yyval.node) = logop(p, idANDOP, (yyvsp[-2].node), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13427 /*% ripper: binary!($:1, ID2VAL(idANDOP), $:3) %*/
13428 }
13429#line 13430 "parse.c"
13430 break;
13431
13432 case 266: /* arg: arg "||" arg */
13433#line 4042 "parse.y"
13434 {
13435 (yyval.node) = logop(p, idOROP, (yyvsp[-2].node), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13436 /*% ripper: binary!($:1, ID2VAL(idOROP), $:3) %*/
13437 }
13438#line 13439 "parse.c"
13439 break;
13440
13441 case 267: /* arg: "'defined?'" option_'\n' begin_defined arg */
13442#line 4047 "parse.y"
13443 {
13444 p->ctxt.in_defined = (yyvsp[-1].ctxt).in_defined;
13445 (yyval.node) = new_defined(p, (yyvsp[0].node), &(yyloc));
13446 /*% ripper: defined!($:4) %*/
13447 }
13448#line 13449 "parse.c"
13449 break;
13450
13451 case 268: /* arg: arg '?' arg option_'\n' ':' arg */
13452#line 4053 "parse.y"
13453 {
13454 value_expr((yyvsp[-5].node));
13455 (yyval.node) = new_if(p, (yyvsp[-5].node), (yyvsp[-3].node), (yyvsp[0].node), &(yyloc));
13456 fixpos((yyval.node), (yyvsp[-5].node));
13457 /*% ripper: ifop!($:1, $:3, $:6) %*/
13458 }
13459#line 13460 "parse.c"
13460 break;
13461
13462 case 269: /* arg: defn_head f_opt_paren_args '=' endless_arg */
13463#line 4060 "parse.y"
13464 {
13465 endless_method_name(p, (yyvsp[-3].node_def_temp)->nd_mid, &(yylsp[-3]));
13466 restore_defun(p, (yyvsp[-3].node_def_temp));
13467 (yyvsp[0].node) = new_scope_body(p, (yyvsp[-2].node_args), (yyvsp[0].node), &(yyloc));
13468 ((yyval.node) = (yyvsp[-3].node_def_temp)->nd_def)->nd_loc = (yyloc);
13469 RNODE_DEFN((yyval.node))->nd_defn = (yyvsp[0].node);
13470 /*% ripper: bodystmt!($:bodystmt, Qnil, Qnil, Qnil) %*/
13471 /*% ripper: def!($:head, $:args, $:$) %*/
13472 local_pop(p);
13473 }
13474#line 13475 "parse.c"
13475 break;
13476
13477 case 270: /* arg: defs_head f_opt_paren_args '=' endless_arg */
13478#line 4071 "parse.y"
13479 {
13480 endless_method_name(p, (yyvsp[-3].node_def_temp)->nd_mid, &(yylsp[-3]));
13481 restore_defun(p, (yyvsp[-3].node_def_temp));
13482 (yyvsp[0].node) = new_scope_body(p, (yyvsp[-2].node_args), (yyvsp[0].node), &(yyloc));
13483 ((yyval.node) = (yyvsp[-3].node_def_temp)->nd_def)->nd_loc = (yyloc);
13484 RNODE_DEFS((yyval.node))->nd_defn = (yyvsp[0].node);
13485 /*% ripper: bodystmt!($:bodystmt, Qnil, Qnil, Qnil) %*/
13486 /*% ripper: defs!(*$:head[0..2], $:args, $:$) %*/
13487 local_pop(p);
13488 }
13489#line 13490 "parse.c"
13490 break;
13491
13492 case 271: /* arg: primary */
13493#line 4082 "parse.y"
13494 {
13495 (yyval.node) = (yyvsp[0].node);
13496 }
13497#line 13498 "parse.c"
13498 break;
13499
13500 case 273: /* endless_arg: endless_arg "'rescue' modifier" after_rescue arg */
13501#line 4089 "parse.y"
13502 {
13503 p->ctxt.in_rescue = (yyvsp[-1].ctxt).in_rescue;
13504 (yyval.node) = rescued_expr(p, (yyvsp[-3].node), (yyvsp[0].node), &(yylsp[-3]), &(yylsp[-2]), &(yylsp[0]));
13505 /*% ripper: rescue_mod!($:1, $:4) %*/
13506 }
13507#line 13508 "parse.c"
13508 break;
13509
13510 case 274: /* endless_arg: "'not'" option_'\n' endless_arg */
13511#line 4095 "parse.y"
13512 {
13513 (yyval.node) = call_uni_op(p, method_cond(p, (yyvsp[0].node), &(yylsp[0])), METHOD_NOT, &(yylsp[-2]), &(yyloc));
13514 /*% ripper: unary!(ID2VAL(idNOT), $:3) %*/
13515 }
13516#line 13517 "parse.c"
13517 break;
13518
13519 case 275: /* relop: '>' */
13520#line 4101 "parse.y"
13521 {(yyval.id) = '>';}
13522#line 13523 "parse.c"
13523 break;
13524
13525 case 276: /* relop: '<' */
13526#line 4102 "parse.y"
13527 {(yyval.id) = '<';}
13528#line 13529 "parse.c"
13529 break;
13530
13531 case 277: /* relop: ">=" */
13532#line 4103 "parse.y"
13533 {(yyval.id) = idGE;}
13534#line 13535 "parse.c"
13535 break;
13536
13537 case 278: /* relop: "<=" */
13538#line 4104 "parse.y"
13539 {(yyval.id) = idLE;}
13540#line 13541 "parse.c"
13541 break;
13542
13543 case 279: /* rel_expr: arg relop arg */
13544#line 4108 "parse.y"
13545 {
13546 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13547 /*% ripper: binary!($:1, ID2VAL($2), $:3) %*/
13548 }
13549#line 13550 "parse.c"
13550 break;
13551
13552 case 280: /* rel_expr: rel_expr relop arg */
13553#line 4113 "parse.y"
13554 {
13555 rb_warning1("comparison '%s' after comparison", WARN_ID((yyvsp[-1].id)));
13556 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
13557 /*% ripper: binary!($:1, ID2VAL($2), $:3) %*/
13558 }
13559#line 13560 "parse.c"
13560 break;
13561
13562 case 281: /* lex_ctxt: none */
13563#line 4121 "parse.y"
13564 {
13565 (yyval.ctxt) = p->ctxt;
13566 }
13567#line 13568 "parse.c"
13568 break;
13569
13570 case 282: /* begin_defined: lex_ctxt */
13571#line 4127 "parse.y"
13572 {
13573 p->ctxt.in_defined = 1;
13574 (yyval.ctxt) = (yyvsp[0].ctxt);
13575 }
13576#line 13577 "parse.c"
13577 break;
13578
13579 case 283: /* after_rescue: lex_ctxt */
13580#line 4134 "parse.y"
13581 {
13582 p->ctxt.in_rescue = after_rescue;
13583 (yyval.ctxt) = (yyvsp[0].ctxt);
13584 }
13585#line 13586 "parse.c"
13586 break;
13587
13588 case 284: /* arg_value: arg */
13589#line 4141 "parse.y"
13590 {
13591 value_expr((yyvsp[0].node));
13592 (yyval.node) = (yyvsp[0].node);
13593 }
13594#line 13595 "parse.c"
13595 break;
13596
13597 case 286: /* aref_args: args trailer */
13598#line 4149 "parse.y"
13599 {
13600 (yyval.node) = (yyvsp[-1].node);
13601 }
13602#line 13603 "parse.c"
13603 break;
13604
13605 case 287: /* aref_args: args ',' assocs trailer */
13606#line 4153 "parse.y"
13607 {
13608 (yyval.node) = (yyvsp[-1].node) ? arg_append(p, (yyvsp[-3].node), new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yyloc)) : (yyvsp[-3].node);
13609 /*% ripper: args_add!($:1, bare_assoc_hash!($:3)) %*/
13610 }
13611#line 13612 "parse.c"
13612 break;
13613
13614 case 288: /* aref_args: assocs trailer */
13615#line 4158 "parse.y"
13616 {
13617 (yyval.node) = (yyvsp[-1].node) ? NEW_LIST(new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yyloc)) : 0;
13618 /*% ripper: args_add!(args_new!, bare_assoc_hash!($:1)) %*/
13619 }
13620#line 13621 "parse.c"
13621 break;
13622
13623 case 289: /* arg_rhs: arg */
13624#line 4165 "parse.y"
13625 {
13626 value_expr((yyvsp[0].node));
13627 (yyval.node) = (yyvsp[0].node);
13628 }
13629#line 13630 "parse.c"
13630 break;
13631
13632 case 290: /* arg_rhs: arg "'rescue' modifier" after_rescue arg */
13633#line 4170 "parse.y"
13634 {
13635 p->ctxt.in_rescue = (yyvsp[-1].ctxt).in_rescue;
13636 value_expr((yyvsp[-3].node));
13637 (yyval.node) = rescued_expr(p, (yyvsp[-3].node), (yyvsp[0].node), &(yylsp[-3]), &(yylsp[-2]), &(yylsp[0]));
13638 /*% ripper: rescue_mod!($:1, $:4) %*/
13639 }
13640#line 13641 "parse.c"
13641 break;
13642
13643 case 291: /* paren_args: '(' opt_call_args rparen */
13644#line 4179 "parse.y"
13645 {
13646 (yyval.node) = (yyvsp[-1].node);
13647 /*% ripper: arg_paren!($:2) %*/
13648 }
13649#line 13650 "parse.c"
13650 break;
13651
13652 case 292: /* paren_args: '(' args ',' args_forward rparen */
13653#line 4184 "parse.y"
13654 {
13655 if (!check_forwarding_args(p)) {
13656 (yyval.node) = 0;
13657 }
13658 else {
13659 (yyval.node) = new_args_forward_call(p, (yyvsp[-3].node), &(yylsp[-1]), &(yyloc));
13660 /*% ripper: arg_paren!(args_add!($:2, $:4)) %*/
13661 }
13662 }
13663#line 13664 "parse.c"
13664 break;
13665
13666 case 293: /* paren_args: '(' args_forward rparen */
13667#line 4194 "parse.y"
13668 {
13669 if (!check_forwarding_args(p)) {
13670 (yyval.node) = 0;
13671 }
13672 else {
13673 (yyval.node) = new_args_forward_call(p, 0, &(yylsp[-1]), &(yyloc));
13674 /*% ripper: arg_paren!($:2) %*/
13675 }
13676 }
13677#line 13678 "parse.c"
13678 break;
13679
13680 case 295: /* opt_paren_args: paren_args */
13681#line 4207 "parse.y"
13682 {
13683 (yyval.node) = (yyvsp[0].node) ? (yyvsp[0].node) : NODE_SPECIAL_EMPTY_ARGS;
13684 }
13685#line 13686 "parse.c"
13686 break;
13687
13688 case 298: /* opt_call_args: args ',' */
13689#line 4215 "parse.y"
13690 {
13691 (yyval.node) = (yyvsp[-1].node);
13692 }
13693#line 13694 "parse.c"
13694 break;
13695
13696 case 299: /* opt_call_args: args ',' assocs ',' */
13697#line 4219 "parse.y"
13698 {
13699 (yyval.node) = (yyvsp[-1].node) ? arg_append(p, (yyvsp[-3].node), new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yyloc)) : (yyvsp[-3].node);
13700 /*% ripper: args_add!($:1, bare_assoc_hash!($:3)) %*/
13701 }
13702#line 13703 "parse.c"
13703 break;
13704
13705 case 300: /* opt_call_args: assocs ',' */
13706#line 4224 "parse.y"
13707 {
13708 (yyval.node) = (yyvsp[-1].node) ? NEW_LIST(new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yylsp[-1])) : 0;
13709 /*% ripper: args_add!(args_new!, bare_assoc_hash!($:1)) %*/
13710 }
13711#line 13712 "parse.c"
13712 break;
13713
13714 case 301: /* call_args: command */
13715#line 4231 "parse.y"
13716 {
13717 value_expr((yyvsp[0].node));
13718 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
13719 /*% ripper: args_add!(args_new!, $:1) %*/
13720 }
13721#line 13722 "parse.c"
13722 break;
13723
13724 case 302: /* call_args: args opt_block_arg */
13725#line 4237 "parse.y"
13726 {
13727 (yyval.node) = arg_blk_pass((yyvsp[-1].node), (yyvsp[0].node_block_pass));
13728 /*% ripper: args_add_block!($:1, $:2) %*/
13729 }
13730#line 13731 "parse.c"
13731 break;
13732
13733 case 303: /* call_args: assocs opt_block_arg */
13734#line 4242 "parse.y"
13735 {
13736 (yyval.node) = (yyvsp[-1].node) ? NEW_LIST(new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yylsp[-1])) : 0;
13737 (yyval.node) = arg_blk_pass((yyval.node), (yyvsp[0].node_block_pass));
13738 /*% ripper: args_add_block!(args_add!(args_new!, bare_assoc_hash!($:1)), $:2) %*/
13739 }
13740#line 13741 "parse.c"
13741 break;
13742
13743 case 304: /* call_args: args ',' assocs opt_block_arg */
13744#line 4248 "parse.y"
13745 {
13746 (yyval.node) = (yyvsp[-1].node) ? arg_append(p, (yyvsp[-3].node), new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yyloc)) : (yyvsp[-3].node);
13747 (yyval.node) = arg_blk_pass((yyval.node), (yyvsp[0].node_block_pass));
13748 /*% ripper: args_add_block!(args_add!($:1, bare_assoc_hash!($:3)), $:4) %*/
13749 }
13750#line 13751 "parse.c"
13751 break;
13752
13753 case 306: /* $@13: %empty */
13754#line 4257 "parse.y"
13755 {
13756 /* If call_args starts with a open paren '(' or '[',
13757 * look-ahead reading of the letters calls CMDARG_PUSH(0),
13758 * but the push must be done after CMDARG_PUSH(1).
13759 * So this code makes them consistent by first cancelling
13760 * the premature CMDARG_PUSH(0), doing CMDARG_PUSH(1),
13761 * and finally redoing CMDARG_PUSH(0).
13762 */
13763 int lookahead = 0;
13764 switch (yychar) {
13765 case '(': case tLPAREN: case tLPAREN_ARG: case '[': case tLBRACK:
13766 lookahead = 1;
13767 }
13768 if (lookahead) CMDARG_POP();
13769 CMDARG_PUSH(1);
13770 if (lookahead) CMDARG_PUSH(0);
13771 }
13772#line 13773 "parse.c"
13773 break;
13774
13775 case 307: /* command_args: $@13 call_args */
13776#line 4275 "parse.y"
13777 {
13778 /* call_args can be followed by tLBRACE_ARG (that does CMDARG_PUSH(0) in the lexer)
13779 * but the push must be done after CMDARG_POP() in the parser.
13780 * So this code does CMDARG_POP() to pop 0 pushed by tLBRACE_ARG,
13781 * CMDARG_POP() to pop 1 pushed by command_args,
13782 * and CMDARG_PUSH(0) to restore back the flag set by tLBRACE_ARG.
13783 */
13784 int lookahead = 0;
13785 switch (yychar) {
13786 case tLBRACE_ARG:
13787 lookahead = 1;
13788 }
13789 if (lookahead) CMDARG_POP();
13790 CMDARG_POP();
13791 if (lookahead) CMDARG_PUSH(0);
13792 (yyval.node) = (yyvsp[0].node);
13793 /*% ripper: $:2 %*/
13794 }
13795#line 13796 "parse.c"
13796 break;
13797
13798 case 308: /* block_arg: "&" arg_value */
13799#line 4296 "parse.y"
13800 {
13801 (yyval.node_block_pass) = NEW_BLOCK_PASS((yyvsp[0].node), &(yyloc), &(yylsp[-1]));
13802 /*% ripper: $:2 %*/
13803 }
13804#line 13805 "parse.c"
13805 break;
13806
13807 case 309: /* block_arg: "&" */
13808#line 4301 "parse.y"
13809 {
13810 forwarding_arg_check(p, idFWD_BLOCK, idFWD_ALL, "block");
13811 (yyval.node_block_pass) = NEW_BLOCK_PASS(NEW_LVAR(idFWD_BLOCK, &(yylsp[0])), &(yyloc), &(yylsp[0]));
13812 /*% ripper: Qnil %*/
13813 }
13814#line 13815 "parse.c"
13815 break;
13816
13817 case 310: /* opt_block_arg: ',' block_arg */
13818#line 4309 "parse.y"
13819 {
13820 (yyval.node_block_pass) = (yyvsp[0].node_block_pass);
13821 /*% ripper: $:2 %*/
13822 }
13823#line 13824 "parse.c"
13824 break;
13825
13826 case 311: /* opt_block_arg: none */
13827#line 4314 "parse.y"
13828 {
13829 (yyval.node_block_pass) = 0;
13830 /*% ripper: Qfalse %*/
13831 }
13832#line 13833 "parse.c"
13833 break;
13834
13835 case 312: /* args: arg_value */
13836#line 4322 "parse.y"
13837 {
13838 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
13839 /*% ripper: args_add!(args_new!, $:arg_value) %*/
13840 }
13841#line 13842 "parse.c"
13842 break;
13843
13844 case 313: /* args: arg_splat */
13845#line 4327 "parse.y"
13846 {
13847 (yyval.node) = (yyvsp[0].node);
13848 /*% ripper: args_add_star!(args_new!, $:arg_splat) %*/
13849 }
13850#line 13851 "parse.c"
13851 break;
13852
13853 case 314: /* args: args ',' arg_value */
13854#line 4332 "parse.y"
13855 {
13856 (yyval.node) = last_arg_append(p, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
13857 /*% ripper: args_add!($:non_last_args, $:arg_value) %*/
13858 }
13859#line 13860 "parse.c"
13860 break;
13861
13862 case 315: /* args: args ',' arg_splat */
13863#line 4337 "parse.y"
13864 {
13865 (yyval.node) = rest_arg_append(p, (yyvsp[-2].node), RNODE_SPLAT((yyvsp[0].node))->nd_head, &(yyloc));
13866 /*% ripper: args_add_star!($:non_last_args, $:arg_splat) %*/
13867 }
13868#line 13869 "parse.c"
13869 break;
13870
13871 case 316: /* arg_splat: "*" arg_value */
13872#line 4345 "parse.y"
13873 {
13874 (yyval.node) = NEW_SPLAT((yyvsp[0].node), &(yyloc), &(yylsp[-1]));
13875 /*% ripper: $:arg_value %*/
13876 }
13877#line 13878 "parse.c"
13878 break;
13879
13880 case 317: /* arg_splat: "*" */
13881#line 4350 "parse.y"
13882 {
13883 forwarding_arg_check(p, idFWD_REST, idFWD_ALL, "rest");
13884 (yyval.node) = NEW_SPLAT(NEW_LVAR(idFWD_REST, &(yylsp[0])), &(yyloc), &(yylsp[0]));
13885 /*% ripper: Qnil %*/
13886 }
13887#line 13888 "parse.c"
13888 break;
13889
13890 case 320: /* mrhs: args ',' arg_value */
13891#line 4364 "parse.y"
13892 {
13893 (yyval.node) = last_arg_append(p, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
13894 /*% ripper: mrhs_add!(mrhs_new_from_args!($:args), $:arg_value) %*/
13895 }
13896#line 13897 "parse.c"
13897 break;
13898
13899 case 321: /* mrhs: args ',' "*" arg_value */
13900#line 4369 "parse.y"
13901 {
13902 (yyval.node) = rest_arg_append(p, (yyvsp[-3].node), (yyvsp[0].node), &(yyloc));
13903 /*% ripper: mrhs_add_star!(mrhs_new_from_args!($:args), $:arg_value) %*/
13904 }
13905#line 13906 "parse.c"
13906 break;
13907
13908 case 322: /* mrhs: "*" arg_value */
13909#line 4374 "parse.y"
13910 {
13911 (yyval.node) = NEW_SPLAT((yyvsp[0].node), &(yyloc), &(yylsp[-1]));
13912 /*% ripper: mrhs_add_star!(mrhs_new!, $:arg_value) %*/
13913 }
13914#line 13915 "parse.c"
13915 break;
13916
13917 case 333: /* primary: "method" */
13918#line 4395 "parse.y"
13919 {
13920 (yyval.node) = (NODE *)NEW_FCALL((yyvsp[0].id), 0, &(yyloc));
13921 /*% ripper: method_add_arg!(fcall!($:1), args_new!) %*/
13922 }
13923#line 13924 "parse.c"
13924 break;
13925
13926 case 334: /* $@14: %empty */
13927#line 4400 "parse.y"
13928 {
13929 CMDARG_PUSH(0);
13930 }
13931#line 13932 "parse.c"
13932 break;
13933
13934 case 335: /* primary: k_begin $@14 bodystmt k_end */
13935#line 4405 "parse.y"
13936 {
13937 CMDARG_POP();
13938 set_line_body((yyvsp[-1].node), (yylsp[-3]).end_pos.lineno);
13939 (yyval.node) = NEW_BEGIN((yyvsp[-1].node), &(yyloc));
13940 nd_set_line((yyval.node), (yylsp[-3]).end_pos.lineno);
13941 /*% ripper: begin!($:3) %*/
13942 }
13943#line 13944 "parse.c"
13944 break;
13945
13946 case 336: /* $@15: %empty */
13947#line 4412 "parse.y"
13948 {SET_LEX_STATE(EXPR_ENDARG);}
13949#line 13950 "parse.c"
13950 break;
13951
13952 case 337: /* primary: "( arg" compstmt $@15 ')' */
13953#line 4413 "parse.y"
13954 {
13955 if (nd_type_p((yyvsp[-2].node), NODE_SELF)) RNODE_SELF((yyvsp[-2].node))->nd_state = 0;
13956 (yyval.node) = (yyvsp[-2].node);
13957 /*% ripper: paren!($:2) %*/
13958 }
13959#line 13960 "parse.c"
13960 break;
13961
13962 case 338: /* primary: "(" compstmt ')' */
13963#line 4419 "parse.y"
13964 {
13965 if (nd_type_p((yyvsp[-1].node), NODE_SELF)) RNODE_SELF((yyvsp[-1].node))->nd_state = 0;
13966 (yyval.node) = NEW_BLOCK((yyvsp[-1].node), &(yyloc));
13967 /*% ripper: paren!($:2) %*/
13968 }
13969#line 13970 "parse.c"
13970 break;
13971
13972 case 339: /* primary: primary_value "::" "constant" */
13973#line 4425 "parse.y"
13974 {
13975 (yyval.node) = NEW_COLON2((yyvsp[-2].node), (yyvsp[0].id), &(yyloc));
13976 /*% ripper: const_path_ref!($:1, $:3) %*/
13977 }
13978#line 13979 "parse.c"
13979 break;
13980
13981 case 340: /* primary: ":: at EXPR_BEG" "constant" */
13982#line 4430 "parse.y"
13983 {
13984 (yyval.node) = NEW_COLON3((yyvsp[0].id), &(yyloc));
13985 /*% ripper: top_const_ref!($:2) %*/
13986 }
13987#line 13988 "parse.c"
13988 break;
13989
13990 case 341: /* primary: "[" aref_args ']' */
13991#line 4435 "parse.y"
13992 {
13993 (yyval.node) = make_list((yyvsp[-1].node), &(yyloc));
13994 /*% ripper: array!($:2) %*/
13995 }
13996#line 13997 "parse.c"
13997 break;
13998
13999 case 342: /* primary: "{" assoc_list '}' */
14000#line 4440 "parse.y"
14001 {
14002 (yyval.node) = new_hash(p, (yyvsp[-1].node), &(yyloc));
14003 RNODE_HASH((yyval.node))->nd_brace = TRUE;
14004 /*% ripper: hash!($:2) %*/
14005 }
14006#line 14007 "parse.c"
14007 break;
14008
14009 case 343: /* primary: k_return */
14010#line 4446 "parse.y"
14011 {
14012 (yyval.node) = NEW_RETURN(0, &(yyloc), &(yylsp[0]));
14013 /*% ripper: return0! %*/
14014 }
14015#line 14016 "parse.c"
14016 break;
14017
14018 case 344: /* primary: k_yield '(' call_args rparen */
14019#line 4451 "parse.y"
14020 {
14021 (yyval.node) = new_yield(p, (yyvsp[-1].node), &(yyloc));
14022 /*% ripper: yield!(paren!($:3)) %*/
14023 }
14024#line 14025 "parse.c"
14025 break;
14026
14027 case 345: /* primary: k_yield '(' rparen */
14028#line 4456 "parse.y"
14029 {
14030 (yyval.node) = NEW_YIELD(0, &(yyloc));
14031 /*% ripper: yield!(paren!(args_new!)) %*/
14032 }
14033#line 14034 "parse.c"
14034 break;
14035
14036 case 346: /* primary: k_yield */
14037#line 4461 "parse.y"
14038 {
14039 (yyval.node) = NEW_YIELD(0, &(yyloc));
14040 /*% ripper: yield0! %*/
14041 }
14042#line 14043 "parse.c"
14043 break;
14044
14045 case 347: /* primary: "'defined?'" option_'\n' '(' begin_defined expr rparen */
14046#line 4466 "parse.y"
14047 {
14048 p->ctxt.in_defined = (yyvsp[-2].ctxt).in_defined;
14049 (yyval.node) = new_defined(p, (yyvsp[-1].node), &(yyloc));
14050 /*% ripper: defined!($:5) %*/
14051 }
14052#line 14053 "parse.c"
14053 break;
14054
14055 case 348: /* primary: "'not'" '(' expr rparen */
14056#line 4472 "parse.y"
14057 {
14058 (yyval.node) = call_uni_op(p, method_cond(p, (yyvsp[-1].node), &(yylsp[-1])), METHOD_NOT, &(yylsp[-3]), &(yyloc));
14059 /*% ripper: unary!(ID2VAL(idNOT), $:3) %*/
14060 }
14061#line 14062 "parse.c"
14062 break;
14063
14064 case 349: /* primary: "'not'" '(' rparen */
14065#line 4477 "parse.y"
14066 {
14067 (yyval.node) = call_uni_op(p, method_cond(p, new_nil(&(yylsp[-1])), &(yylsp[-1])), METHOD_NOT, &(yylsp[-2]), &(yyloc));
14068 /*% ripper: unary!(ID2VAL(idNOT), Qnil) %*/
14069 }
14070#line 14071 "parse.c"
14071 break;
14072
14073 case 350: /* primary: fcall brace_block */
14074#line 4482 "parse.y"
14075 {
14076 (yyval.node) = method_add_block(p, (NODE *)(yyvsp[-1].node_fcall), (yyvsp[0].node), &(yyloc));
14077 /*% ripper: method_add_block!(method_add_arg!(fcall!($:1), args_new!), $:2) %*/
14078 }
14079#line 14080 "parse.c"
14080 break;
14081
14082 case 352: /* primary: method_call brace_block */
14083#line 4488 "parse.y"
14084 {
14085 block_dup_check(p, get_nd_args(p, (yyvsp[-1].node)), (yyvsp[0].node));
14086 (yyval.node) = method_add_block(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
14087 /*% ripper: method_add_block!($:1, $:2) %*/
14088 }
14089#line 14090 "parse.c"
14090 break;
14091
14092 case 354: /* primary: k_if expr_value then compstmt if_tail k_end */
14093#line 4498 "parse.y"
14094 {
14095 (yyval.node) = new_if(p, (yyvsp[-4].node), (yyvsp[-2].node), (yyvsp[-1].node), &(yyloc));
14096 fixpos((yyval.node), (yyvsp[-4].node));
14097 /*% ripper: if!($:2, $:4, $:5) %*/
14098 }
14099#line 14100 "parse.c"
14100 break;
14101
14102 case 355: /* primary: k_unless expr_value then compstmt opt_else k_end */
14103#line 4507 "parse.y"
14104 {
14105 (yyval.node) = new_unless(p, (yyvsp[-4].node), (yyvsp[-2].node), (yyvsp[-1].node), &(yyloc), &(yylsp[-5]), &(yylsp[-3]), &(yylsp[0]));
14106 fixpos((yyval.node), (yyvsp[-4].node));
14107 /*% ripper: unless!($:2, $:4, $:5) %*/
14108 }
14109#line 14110 "parse.c"
14110 break;
14111
14112 case 356: /* primary: k_while expr_value_do compstmt k_end */
14113#line 4515 "parse.y"
14114 {
14115 restore_block_exit(p, (yyvsp[-3].node_exits));
14116 (yyval.node) = NEW_WHILE(cond(p, (yyvsp[-2].node), &(yylsp[-2])), (yyvsp[-1].node), 1, &(yyloc), &(yylsp[-3]), &(yylsp[0]));
14117 fixpos((yyval.node), (yyvsp[-2].node));
14118 /*% ripper: while!($:2, $:3) %*/
14119 }
14120#line 14121 "parse.c"
14121 break;
14122
14123 case 357: /* primary: k_until expr_value_do compstmt k_end */
14124#line 4524 "parse.y"
14125 {
14126 restore_block_exit(p, (yyvsp[-3].node_exits));
14127 (yyval.node) = NEW_UNTIL(cond(p, (yyvsp[-2].node), &(yylsp[-2])), (yyvsp[-1].node), 1, &(yyloc), &(yylsp[-3]), &(yylsp[0]));
14128 fixpos((yyval.node), (yyvsp[-2].node));
14129 /*% ripper: until!($:2, $:3) %*/
14130 }
14131#line 14132 "parse.c"
14132 break;
14133
14134 case 358: /* @16: %empty */
14135#line 4531 "parse.y"
14136 {
14137 (yyval.labels) = p->case_labels;
14138 p->case_labels = CHECK_LITERAL_WHEN;
14139 }
14140#line 14141 "parse.c"
14141 break;
14142
14143 case 359: /* primary: k_case expr_value option_terms @16 case_body k_end */
14144#line 4537 "parse.y"
14145 {
14146 if (CASE_LABELS_ENABLED_P(p->case_labels)) st_free_table(p->case_labels);
14147 p->case_labels = (yyvsp[-2].labels);
14148 (yyval.node) = NEW_CASE((yyvsp[-4].node), (yyvsp[-1].node), &(yyloc), &(yylsp[-5]), &(yylsp[0]));
14149 fixpos((yyval.node), (yyvsp[-4].node));
14150 /*% ripper: case!($:2, $:5) %*/
14151 }
14152#line 14153 "parse.c"
14153 break;
14154
14155 case 360: /* @17: %empty */
14156#line 4545 "parse.y"
14157 {
14158 (yyval.labels) = p->case_labels;
14159 p->case_labels = 0;
14160 }
14161#line 14162 "parse.c"
14162 break;
14163
14164 case 361: /* primary: k_case option_terms @17 case_body k_end */
14165#line 4551 "parse.y"
14166 {
14167 if (p->case_labels) st_free_table(p->case_labels);
14168 p->case_labels = (yyvsp[-2].labels);
14169 (yyval.node) = NEW_CASE2((yyvsp[-1].node), &(yyloc), &(yylsp[-4]), &(yylsp[0]));
14170 /*% ripper: case!(Qnil, $:4) %*/
14171 }
14172#line 14173 "parse.c"
14173 break;
14174
14175 case 362: /* primary: k_case expr_value option_terms p_case_body k_end */
14176#line 4560 "parse.y"
14177 {
14178 (yyval.node) = NEW_CASE3((yyvsp[-3].node), (yyvsp[-1].node), &(yyloc), &(yylsp[-4]), &(yylsp[0]));
14179 /*% ripper: case!($:2, $:4) %*/
14180 }
14181#line 14182 "parse.c"
14182 break;
14183
14184 case 363: /* primary: k_for for_var "'in'" expr_value_do compstmt k_end */
14185#line 4567 "parse.y"
14186 {
14187 restore_block_exit(p, (yyvsp[-5].node_exits));
14188 /*
14189 * for a, b, c in e
14190 * #=>
14191 * e.each{|*x| a, b, c = x}
14192 *
14193 * for a in e
14194 * #=>
14195 * e.each{|x| a, = x}
14196 */
14197 ID id = internal_id(p);
14198 rb_node_args_aux_t *m = NEW_ARGS_AUX(0, 0, &NULL_LOC);
14199 rb_node_args_t *args;
14200 NODE *scope, *internal_var = NEW_DVAR(id, &(yylsp[-4]));
14201 rb_ast_id_table_t *tbl = rb_ast_new_local_table(p->ast, 1);
14202 tbl->ids[0] = id; /* internal id */
14203
14204 switch (nd_type((yyvsp[-4].node))) {
14205 case NODE_LASGN:
14206 case NODE_DASGN: /* e.each {|internal_var| a = internal_var; ... } */
14207 set_nd_value(p, (yyvsp[-4].node), internal_var);
14208 id = 0;
14209 m->nd_plen = 1;
14210 m->nd_next = (yyvsp[-4].node);
14211 break;
14212 case NODE_MASGN: /* e.each {|*internal_var| a, b, c = (internal_var.length == 1 && Array === (tmp = internal_var[0]) ? tmp : internal_var); ... } */
14213 m->nd_next = node_assign(p, (yyvsp[-4].node), NEW_FOR_MASGN(internal_var, &(yylsp[-4])), NO_LEX_CTXT, &(yylsp[-4]));
14214 break;
14215 default: /* e.each {|*internal_var| @a, B, c[1], d.attr = internal_val; ... } */
14216 m->nd_next = node_assign(p, (NODE *)NEW_MASGN(NEW_LIST((yyvsp[-4].node), &(yylsp[-4])), 0, &(yylsp[-4])), internal_var, NO_LEX_CTXT, &(yylsp[-4]));
14217 }
14218 /* {|*internal_id| <m> = internal_id; ... } */
14219 args = new_args(p, m, 0, id, 0, new_args_tail(p, 0, 0, 0, &(yylsp[-4])), &(yylsp[-4]));
14220 scope = NEW_SCOPE2(tbl, args, (yyvsp[-1].node), &(yyloc));
14221 (yyval.node) = NEW_FOR((yyvsp[-2].node), scope, &(yyloc));
14222 fixpos((yyval.node), (yyvsp[-4].node));
14223 /*% ripper: for!($:2, $:4, $:5) %*/
14224 }
14225#line 14226 "parse.c"
14226 break;
14227
14228 case 364: /* $@18: %empty */
14229#line 4607 "parse.y"
14230 {
14231 begin_definition("class", &(yylsp[-2]), &(yylsp[-1]));
14232 }
14233#line 14234 "parse.c"
14234 break;
14235
14236 case 365: /* primary: k_class cpath superclass $@18 bodystmt k_end */
14237#line 4612 "parse.y"
14238 {
14239 (yyval.node) = NEW_CLASS((yyvsp[-4].node), (yyvsp[-1].node), (yyvsp[-3].node), &(yyloc));
14240 nd_set_line(RNODE_CLASS((yyval.node))->nd_body, (yylsp[0]).end_pos.lineno);
14241 set_line_body((yyvsp[-1].node), (yylsp[-3]).end_pos.lineno);
14242 nd_set_line((yyval.node), (yylsp[-3]).end_pos.lineno);
14243 /*% ripper: class!($:cpath, $:superclass, $:bodystmt) %*/
14244 local_pop(p);
14245 p->ctxt.in_class = (yyvsp[-5].ctxt).in_class;
14246 p->ctxt.cant_return = (yyvsp[-5].ctxt).cant_return;
14247 p->ctxt.shareable_constant_value = (yyvsp[-5].ctxt).shareable_constant_value;
14248 }
14249#line 14250 "parse.c"
14250 break;
14251
14252 case 366: /* $@19: %empty */
14253#line 4624 "parse.y"
14254 {
14255 begin_definition("", &(yylsp[-2]), &(yylsp[-1]));
14256 }
14257#line 14258 "parse.c"
14258 break;
14259
14260 case 367: /* primary: k_class "<<" expr_value $@19 term bodystmt k_end */
14261#line 4630 "parse.y"
14262 {
14263 (yyval.node) = NEW_SCLASS((yyvsp[-4].node), (yyvsp[-1].node), &(yyloc));
14264 nd_set_line(RNODE_SCLASS((yyval.node))->nd_body, (yylsp[0]).end_pos.lineno);
14265 set_line_body((yyvsp[-1].node), nd_line((yyvsp[-4].node)));
14266 fixpos((yyval.node), (yyvsp[-4].node));
14267 /*% ripper: sclass!($:expr_value, $:bodystmt) %*/
14268 local_pop(p);
14269 p->ctxt.in_def = (yyvsp[-6].ctxt).in_def;
14270 p->ctxt.in_class = (yyvsp[-6].ctxt).in_class;
14271 p->ctxt.cant_return = (yyvsp[-6].ctxt).cant_return;
14272 p->ctxt.shareable_constant_value = (yyvsp[-6].ctxt).shareable_constant_value;
14273 }
14274#line 14275 "parse.c"
14275 break;
14276
14277 case 368: /* $@20: %empty */
14278#line 4643 "parse.y"
14279 {
14280 begin_definition("module", &(yylsp[-1]), &(yylsp[0]));
14281 }
14282#line 14283 "parse.c"
14283 break;
14284
14285 case 369: /* primary: k_module cpath $@20 bodystmt k_end */
14286#line 4648 "parse.y"
14287 {
14288 (yyval.node) = NEW_MODULE((yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
14289 nd_set_line(RNODE_MODULE((yyval.node))->nd_body, (yylsp[0]).end_pos.lineno);
14290 set_line_body((yyvsp[-1].node), (yylsp[-3]).end_pos.lineno);
14291 nd_set_line((yyval.node), (yylsp[-3]).end_pos.lineno);
14292 /*% ripper: module!($:cpath, $:bodystmt) %*/
14293 local_pop(p);
14294 p->ctxt.in_class = (yyvsp[-4].ctxt).in_class;
14295 p->ctxt.cant_return = (yyvsp[-4].ctxt).cant_return;
14296 p->ctxt.shareable_constant_value = (yyvsp[-4].ctxt).shareable_constant_value;
14297 }
14298#line 14299 "parse.c"
14299 break;
14300
14301 case 370: /* $@21: %empty */
14302#line 4661 "parse.y"
14303 {
14304 push_end_expect_token_locations(p, &(yylsp[-1]).beg_pos);
14305 }
14306#line 14307 "parse.c"
14307 break;
14308
14309 case 371: /* primary: defn_head f_arglist $@21 bodystmt k_end */
14310#line 4666 "parse.y"
14311 {
14312 restore_defun(p, (yyvsp[-4].node_def_temp));
14313 (yyvsp[-1].node) = new_scope_body(p, (yyvsp[-3].node_args), (yyvsp[-1].node), &(yyloc));
14314 ((yyval.node) = (yyvsp[-4].node_def_temp)->nd_def)->nd_loc = (yyloc);
14315 RNODE_DEFN((yyval.node))->nd_defn = (yyvsp[-1].node);
14316 /*% ripper: def!($:head, $:args, $:bodystmt) %*/
14317 local_pop(p);
14318 }
14319#line 14320 "parse.c"
14320 break;
14321
14322 case 372: /* $@22: %empty */
14323#line 4676 "parse.y"
14324 {
14325 push_end_expect_token_locations(p, &(yylsp[-1]).beg_pos);
14326 }
14327#line 14328 "parse.c"
14328 break;
14329
14330 case 373: /* primary: defs_head f_arglist $@22 bodystmt k_end */
14331#line 4681 "parse.y"
14332 {
14333 restore_defun(p, (yyvsp[-4].node_def_temp));
14334 (yyvsp[-1].node) = new_scope_body(p, (yyvsp[-3].node_args), (yyvsp[-1].node), &(yyloc));
14335 ((yyval.node) = (yyvsp[-4].node_def_temp)->nd_def)->nd_loc = (yyloc);
14336 RNODE_DEFS((yyval.node))->nd_defn = (yyvsp[-1].node);
14337 /*% ripper: defs!(*$:head[0..2], $:args, $:bodystmt) %*/
14338 local_pop(p);
14339 }
14340#line 14341 "parse.c"
14341 break;
14342
14343 case 374: /* primary: "'break'" */
14344#line 4690 "parse.y"
14345 {
14346 (yyval.node) = add_block_exit(p, NEW_BREAK(0, &(yyloc), &(yylsp[0])));
14347 /*% ripper: break!(args_new!) %*/
14348 }
14349#line 14350 "parse.c"
14350 break;
14351
14352 case 375: /* primary: "'next'" */
14353#line 4695 "parse.y"
14354 {
14355 (yyval.node) = add_block_exit(p, NEW_NEXT(0, &(yyloc), &(yylsp[0])));
14356 /*% ripper: next!(args_new!) %*/
14357 }
14358#line 14359 "parse.c"
14359 break;
14360
14361 case 376: /* primary: "'redo'" */
14362#line 4700 "parse.y"
14363 {
14364 (yyval.node) = add_block_exit(p, NEW_REDO(&(yyloc), &(yylsp[0])));
14365 /*% ripper: redo! %*/
14366 }
14367#line 14368 "parse.c"
14368 break;
14369
14370 case 377: /* primary: "'retry'" */
14371#line 4705 "parse.y"
14372 {
14373 if (!p->ctxt.in_defined) {
14374 switch (p->ctxt.in_rescue) {
14375 case before_rescue: yyerror1(&(yylsp[0]), "Invalid retry without rescue"); break;
14376 case after_rescue: /* ok */ break;
14377 case after_else: yyerror1(&(yylsp[0]), "Invalid retry after else"); break;
14378 case after_ensure: yyerror1(&(yylsp[0]), "Invalid retry after ensure"); break;
14379 }
14380 }
14381 (yyval.node) = NEW_RETRY(&(yyloc));
14382 /*% ripper: retry! %*/
14383 }
14384#line 14385 "parse.c"
14385 break;
14386
14387 case 378: /* primary_value: primary */
14388#line 4720 "parse.y"
14389 {
14390 value_expr((yyvsp[0].node));
14391 (yyval.node) = (yyvsp[0].node);
14392 }
14393#line 14394 "parse.c"
14394 break;
14395
14396 case 379: /* k_begin: "'begin'" */
14397#line 4727 "parse.y"
14398 {
14399 token_info_push(p, "begin", &(yyloc));
14400 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
14401 }
14402#line 14403 "parse.c"
14403 break;
14404
14405 case 380: /* k_if: "'if'" */
14406#line 4734 "parse.y"
14407 {
14408 WARN_EOL("if");
14409 token_info_push(p, "if", &(yyloc));
14410 if (p->token_info && p->token_info->nonspc &&
14411 p->token_info->next && !strcmp(p->token_info->next->token, "else")) {
14412 const char *tok = p->lex.ptok - rb_strlen_lit("if");
14413 const char *beg = p->lex.pbeg + p->token_info->next->beg.column;
14414 beg += rb_strlen_lit("else");
14415 while (beg < tok && ISSPACE(*beg)) beg++;
14416 if (beg == tok) {
14417 p->token_info->nonspc = 0;
14418 }
14419 }
14420 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
14421 }
14422#line 14423 "parse.c"
14423 break;
14424
14425 case 381: /* k_unless: "'unless'" */
14426#line 4752 "parse.y"
14427 {
14428 token_info_push(p, "unless", &(yyloc));
14429 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
14430 }
14431#line 14432 "parse.c"
14432 break;
14433
14434 case 382: /* k_while: "'while'" allow_exits */
14435#line 4759 "parse.y"
14436 {
14437 (yyval.node_exits) = (yyvsp[0].node_exits);
14438 token_info_push(p, "while", &(yyloc));
14439 push_end_expect_token_locations(p, &(yylsp[-1]).beg_pos);
14440 }
14441#line 14442 "parse.c"
14442 break;
14443
14444 case 383: /* k_until: "'until'" allow_exits */
14445#line 4767 "parse.y"
14446 {
14447 (yyval.node_exits) = (yyvsp[0].node_exits);
14448 token_info_push(p, "until", &(yyloc));
14449 push_end_expect_token_locations(p, &(yylsp[-1]).beg_pos);
14450 }
14451#line 14452 "parse.c"
14452 break;
14453
14454 case 384: /* k_case: "'case'" */
14455#line 4775 "parse.y"
14456 {
14457 token_info_push(p, "case", &(yyloc));
14458 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
14459 }
14460#line 14461 "parse.c"
14461 break;
14462
14463 case 385: /* k_for: "'for'" allow_exits */
14464#line 4782 "parse.y"
14465 {
14466 (yyval.node_exits) = (yyvsp[0].node_exits);
14467 token_info_push(p, "for", &(yyloc));
14468 push_end_expect_token_locations(p, &(yylsp[-1]).beg_pos);
14469 }
14470#line 14471 "parse.c"
14471 break;
14472
14473 case 386: /* k_class: "'class'" */
14474#line 4790 "parse.y"
14475 {
14476 token_info_push(p, "class", &(yyloc));
14477 (yyval.ctxt) = p->ctxt;
14478 p->ctxt.in_rescue = before_rescue;
14479 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
14480 }
14481#line 14482 "parse.c"
14482 break;
14483
14484 case 387: /* k_module: "'module'" */
14485#line 4799 "parse.y"
14486 {
14487 token_info_push(p, "module", &(yyloc));
14488 (yyval.ctxt) = p->ctxt;
14489 p->ctxt.in_rescue = before_rescue;
14490 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
14491 }
14492#line 14493 "parse.c"
14493 break;
14494
14495 case 388: /* k_def: "'def'" */
14496#line 4808 "parse.y"
14497 {
14498 token_info_push(p, "def", &(yyloc));
14499 (yyval.node_def_temp) = NEW_DEF_TEMP(&(yyloc));
14500 p->ctxt.in_argdef = 1;
14501 }
14502#line 14503 "parse.c"
14503 break;
14504
14505 case 389: /* k_do: "'do'" */
14506#line 4816 "parse.y"
14507 {
14508 token_info_push(p, "do", &(yyloc));
14509 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
14510 }
14511#line 14512 "parse.c"
14512 break;
14513
14514 case 390: /* k_do_block: "'do' for block" */
14515#line 4823 "parse.y"
14516 {
14517 token_info_push(p, "do", &(yyloc));
14518 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
14519 }
14520#line 14521 "parse.c"
14521 break;
14522
14523 case 391: /* k_rescue: "'rescue'" */
14524#line 4830 "parse.y"
14525 {
14526 token_info_warn(p, "rescue", p->token_info, 1, &(yyloc));
14527 (yyval.ctxt) = p->ctxt;
14528 p->ctxt.in_rescue = after_rescue;
14529 }
14530#line 14531 "parse.c"
14531 break;
14532
14533 case 392: /* k_ensure: "'ensure'" */
14534#line 4838 "parse.y"
14535 {
14536 token_info_warn(p, "ensure", p->token_info, 1, &(yyloc));
14537 (yyval.ctxt) = p->ctxt;
14538 }
14539#line 14540 "parse.c"
14540 break;
14541
14542 case 393: /* k_when: "'when'" */
14543#line 4845 "parse.y"
14544 {
14545 token_info_warn(p, "when", p->token_info, 0, &(yyloc));
14546 }
14547#line 14548 "parse.c"
14548 break;
14549
14550 case 394: /* k_else: "'else'" */
14551#line 4851 "parse.y"
14552 {
14553 token_info *ptinfo_beg = p->token_info;
14554 int same = ptinfo_beg && strcmp(ptinfo_beg->token, "case") != 0;
14555 token_info_warn(p, "else", p->token_info, same, &(yyloc));
14556 if (same) {
14557 token_info e;
14558 e.next = ptinfo_beg->next;
14559 e.token = "else";
14560 token_info_setup(&e, p->lex.pbeg, &(yyloc));
14561 if (!e.nonspc) *ptinfo_beg = e;
14562 }
14563 }
14564#line 14565 "parse.c"
14565 break;
14566
14567 case 395: /* k_elsif: "'elsif'" */
14568#line 4866 "parse.y"
14569 {
14570 WARN_EOL("elsif");
14571 token_info_warn(p, "elsif", p->token_info, 1, &(yyloc));
14572 }
14573#line 14574 "parse.c"
14574 break;
14575
14576 case 396: /* k_end: "'end'" */
14577#line 4873 "parse.y"
14578 {
14579 token_info_pop(p, "end", &(yyloc));
14580 pop_end_expect_token_locations(p);
14581 }
14582#line 14583 "parse.c"
14583 break;
14584
14585 case 397: /* k_end: "dummy end" */
14586#line 4878 "parse.y"
14587 {
14588 compile_error(p, "syntax error, unexpected end-of-input");
14589 }
14590#line 14591 "parse.c"
14591 break;
14592
14593 case 398: /* k_return: "'return'" */
14594#line 4884 "parse.y"
14595 {
14596 if (p->ctxt.cant_return && !dyna_in_block(p))
14597 yyerror1(&(yylsp[0]), "Invalid return in class/module body");
14598 }
14599#line 14600 "parse.c"
14600 break;
14601
14602 case 399: /* k_yield: "'yield'" */
14603#line 4891 "parse.y"
14604 {
14605 if (!p->ctxt.in_defined && !p->ctxt.in_def && !compile_for_eval)
14606 yyerror1(&(yylsp[0]), "Invalid yield");
14607 }
14608#line 14609 "parse.c"
14609 break;
14610
14611 case 406: /* if_tail: k_elsif expr_value then compstmt if_tail */
14612#line 4910 "parse.y"
14613 {
14614 (yyval.node) = new_if(p, (yyvsp[-3].node), (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
14615 fixpos((yyval.node), (yyvsp[-3].node));
14616 /*% ripper: elsif!($:2, $:4, $:5) %*/
14617 }
14618#line 14619 "parse.c"
14619 break;
14620
14621 case 408: /* opt_else: k_else compstmt */
14622#line 4919 "parse.y"
14623 {
14624 (yyval.node) = (yyvsp[0].node);
14625 /*% ripper: else!($:2) %*/
14626 }
14627#line 14628 "parse.c"
14628 break;
14629
14630 case 411: /* f_marg: f_norm_arg */
14631#line 4930 "parse.y"
14632 {
14633 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
14634 mark_lvar_used(p, (yyval.node));
14635 }
14636#line 14637 "parse.c"
14637 break;
14638
14639 case 412: /* f_marg: "(" f_margs rparen */
14640#line 4935 "parse.y"
14641 {
14642 (yyval.node) = (NODE *)(yyvsp[-1].node_masgn);
14643 /*% ripper: mlhs_paren!($:2) %*/
14644 }
14645#line 14646 "parse.c"
14646 break;
14647
14648 case 413: /* f_marg_list: f_marg */
14649#line 4942 "parse.y"
14650 {
14651 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
14652 /*% ripper: mlhs_add!(mlhs_new!, $:1) %*/
14653 }
14654#line 14655 "parse.c"
14655 break;
14656
14657 case 414: /* f_marg_list: f_marg_list ',' f_marg */
14658#line 4947 "parse.y"
14659 {
14660 (yyval.node) = list_append(p, (yyvsp[-2].node), (yyvsp[0].node));
14661 /*% ripper: mlhs_add!($:1, $:3) %*/
14662 }
14663#line 14664 "parse.c"
14664 break;
14665
14666 case 415: /* f_margs: f_marg_list */
14667#line 4954 "parse.y"
14668 {
14669 (yyval.node_masgn) = NEW_MASGN((yyvsp[0].node), 0, &(yyloc));
14670 /*% ripper: $:1 %*/
14671 }
14672#line 14673 "parse.c"
14673 break;
14674
14675 case 416: /* f_margs: f_marg_list ',' f_rest_marg */
14676#line 4959 "parse.y"
14677 {
14678 (yyval.node_masgn) = NEW_MASGN((yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
14679 /*% ripper: mlhs_add_star!($:1, $:3) %*/
14680 }
14681#line 14682 "parse.c"
14682 break;
14683
14684 case 417: /* f_margs: f_marg_list ',' f_rest_marg ',' f_marg_list */
14685#line 4964 "parse.y"
14686 {
14687 (yyval.node_masgn) = NEW_MASGN((yyvsp[-4].node), NEW_POSTARG((yyvsp[-2].node), (yyvsp[0].node), &(yyloc)), &(yyloc));
14688 /*% ripper: mlhs_add_post!(mlhs_add_star!($:1, $:3), $:5) %*/
14689 }
14690#line 14691 "parse.c"
14691 break;
14692
14693 case 418: /* f_margs: f_rest_marg */
14694#line 4969 "parse.y"
14695 {
14696 (yyval.node_masgn) = NEW_MASGN(0, (yyvsp[0].node), &(yyloc));
14697 /*% ripper: mlhs_add_star!(mlhs_new!, $:1) %*/
14698 }
14699#line 14700 "parse.c"
14700 break;
14701
14702 case 419: /* f_margs: f_rest_marg ',' f_marg_list */
14703#line 4974 "parse.y"
14704 {
14705 (yyval.node_masgn) = NEW_MASGN(0, NEW_POSTARG((yyvsp[-2].node), (yyvsp[0].node), &(yyloc)), &(yyloc));
14706 /*% ripper: mlhs_add_post!(mlhs_add_star!(mlhs_new!, $:1), $:3) %*/
14707 }
14708#line 14709 "parse.c"
14709 break;
14710
14711 case 420: /* f_rest_marg: "*" f_norm_arg */
14712#line 4981 "parse.y"
14713 {
14714 /*% ripper: $:2 %*/
14715 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
14716 mark_lvar_used(p, (yyval.node));
14717 }
14718#line 14719 "parse.c"
14719 break;
14720
14721 case 421: /* f_rest_marg: "*" */
14722#line 4987 "parse.y"
14723 {
14724 (yyval.node) = NODE_SPECIAL_NO_NAME_REST;
14725 /*% ripper: Qnil %*/
14726 }
14727#line 14728 "parse.c"
14728 break;
14729
14730 case 423: /* f_any_kwrest: f_no_kwarg */
14731#line 4995 "parse.y"
14732 {
14733 (yyval.id) = idNil;
14734 /*% ripper: ID2VAL(idNil) %*/
14735 }
14736#line 14737 "parse.c"
14737 break;
14738
14739 case 424: /* $@23: %empty */
14740#line 5001 "parse.y"
14741 {p->ctxt.in_argdef = 0;}
14742#line 14743 "parse.c"
14743 break;
14744
14745 case 426: /* f_kwarg_f_block_kw: f_block_kw */
14746#line 2935 "parse.y"
14747 {
14748 (yyval.node_kw_arg) = (yyvsp[0].node_kw_arg);
14749 /*% ripper: rb_ary_new3(1, $:1) %*/
14750 }
14751#line 14752 "parse.c"
14752 break;
14753
14754 case 427: /* f_kwarg_f_block_kw: f_kwarg_f_block_kw ',' f_block_kw */
14755#line 2940 "parse.y"
14756 {
14757 (yyval.node_kw_arg) = kwd_append((yyvsp[-2].node_kw_arg), (yyvsp[0].node_kw_arg));
14758 /*% ripper: rb_ary_push($:1, $:3) %*/
14759 }
14760#line 14761 "parse.c"
14761 break;
14762
14763 case 428: /* block_args_tail: f_kwarg_f_block_kw ',' f_kwrest opt_f_block_arg */
14764#line 5004 "parse.y"
14765 {
14766 (yyval.node_args) = new_args_tail(p, (yyvsp[-3].node_kw_arg), (yyvsp[-1].id), (yyvsp[0].id), &(yylsp[-1]));
14767 /*% ripper: [$:1, $:3, $:4] %*/
14768 }
14769#line 14770 "parse.c"
14770 break;
14771
14772 case 429: /* block_args_tail: f_kwarg_f_block_kw opt_f_block_arg */
14773#line 5009 "parse.y"
14774 {
14775 (yyval.node_args) = new_args_tail(p, (yyvsp[-1].node_kw_arg), 0, (yyvsp[0].id), &(yylsp[-1]));
14776 /*% ripper: [$:1, Qnil, $:2] %*/
14777 }
14778#line 14779 "parse.c"
14779 break;
14780
14781 case 430: /* block_args_tail: f_any_kwrest opt_f_block_arg */
14782#line 5014 "parse.y"
14783 {
14784 (yyval.node_args) = new_args_tail(p, 0, (yyvsp[-1].id), (yyvsp[0].id), &(yylsp[-1]));
14785 /*% ripper: [Qnil, $:1, $:2] %*/
14786 }
14787#line 14788 "parse.c"
14788 break;
14789
14790 case 431: /* block_args_tail: f_block_arg */
14791#line 5019 "parse.y"
14792 {
14793 (yyval.node_args) = new_args_tail(p, 0, 0, (yyvsp[0].id), &(yylsp[0]));
14794 /*% ripper: [Qnil, Qnil, $:1] %*/
14795 }
14796#line 14797 "parse.c"
14797 break;
14798
14799 case 432: /* excessed_comma: ',' */
14800#line 5026 "parse.y"
14801 {
14802 /* magic number for rest_id in iseq_set_arguments() */
14803 (yyval.id) = NODE_SPECIAL_EXCESSIVE_COMMA;
14804 /*% ripper: excessed_comma! %*/
14805 }
14806#line 14807 "parse.c"
14807 break;
14808
14809 case 433: /* f_opt_primary_value: f_arg_asgn f_eq primary_value */
14810#line 2913 "parse.y"
14811 {
14812 p->ctxt.in_argdef = 1;
14813 (yyval.node_opt_arg) = NEW_OPT_ARG(assignable(p, (yyvsp[-2].id), (yyvsp[0].node), &(yyloc)), &(yyloc));
14814 /*% ripper: [$:$, $:3] %*/
14815 }
14816#line 14817 "parse.c"
14817 break;
14818
14819 case 434: /* f_optarg_primary_value: f_opt_primary_value */
14820#line 2922 "parse.y"
14821 {
14822 (yyval.node_opt_arg) = (yyvsp[0].node_opt_arg);
14823 /*% ripper: rb_ary_new3(1, $:1) %*/
14824 }
14825#line 14826 "parse.c"
14826 break;
14827
14828 case 435: /* f_optarg_primary_value: f_optarg_primary_value ',' f_opt_primary_value */
14829#line 2927 "parse.y"
14830 {
14831 (yyval.node_opt_arg) = opt_arg_append((yyvsp[-2].node_opt_arg), (yyvsp[0].node_opt_arg));
14832 /*% ripper: rb_ary_push($:1, $:3) %*/
14833 }
14834#line 14835 "parse.c"
14835 break;
14836
14837 case 436: /* opt_args_tail_block_args_tail: ',' block_args_tail */
14838#line 2948 "parse.y"
14839 {
14840 (yyval.node_args) = (yyvsp[0].node_args);
14841 /*% ripper: $:2 %*/
14842 }
14843#line 14844 "parse.c"
14844 break;
14845
14846 case 437: /* opt_args_tail_block_args_tail: %empty */
14847#line 2953 "parse.y"
14848 {
14849 (yyval.node_args) = new_args_tail(p, 0, 0, 0, &(yylsp[0]));
14850 /*% ripper: [Qnil, Qnil, Qnil] %*/
14851 }
14852#line 14853 "parse.c"
14853 break;
14854
14855 case 438: /* block_param: f_arg ',' f_optarg_primary_value ',' f_rest_arg opt_args_tail_block_args_tail */
14856#line 5034 "parse.y"
14857 {
14858 (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));
14859 /*% ripper: params!($:1, $:3, $:5, Qnil, *$:6[0..2]) %*/
14860 }
14861#line 14862 "parse.c"
14862 break;
14863
14864 case 439: /* block_param: f_arg ',' f_optarg_primary_value ',' f_rest_arg ',' f_arg opt_args_tail_block_args_tail */
14865#line 5039 "parse.y"
14866 {
14867 (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));
14868 /*% ripper: params!($:1, $:3, $:5, $:7, *$:8[0..2]) %*/
14869 }
14870#line 14871 "parse.c"
14871 break;
14872
14873 case 440: /* block_param: f_arg ',' f_optarg_primary_value opt_args_tail_block_args_tail */
14874#line 5044 "parse.y"
14875 {
14876 (yyval.node_args) = new_args(p, (yyvsp[-3].node_args_aux), (yyvsp[-1].node_opt_arg), 0, 0, (yyvsp[0].node_args), &(yyloc));
14877 /*% ripper: params!($:1, $:3, Qnil, Qnil, *$:4[0..2]) %*/
14878 }
14879#line 14880 "parse.c"
14880 break;
14881
14882 case 441: /* block_param: f_arg ',' f_optarg_primary_value ',' f_arg opt_args_tail_block_args_tail */
14883#line 5049 "parse.y"
14884 {
14885 (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));
14886 /*% ripper: params!($:1, $:3, Qnil, $:5, *$:6[0..2]) %*/
14887 }
14888#line 14889 "parse.c"
14889 break;
14890
14891 case 442: /* block_param: f_arg ',' f_rest_arg opt_args_tail_block_args_tail */
14892#line 5054 "parse.y"
14893 {
14894 (yyval.node_args) = new_args(p, (yyvsp[-3].node_args_aux), 0, (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
14895 /*% ripper: params!($:1, Qnil, $:3, Qnil, *$:4[0..2]) %*/
14896 }
14897#line 14898 "parse.c"
14898 break;
14899
14900 case 443: /* block_param: f_arg excessed_comma */
14901#line 5059 "parse.y"
14902 {
14903 (yyval.node_args) = new_args_tail(p, 0, 0, 0, &(yylsp[0]));
14904 (yyval.node_args) = new_args(p, (yyvsp[-1].node_args_aux), 0, (yyvsp[0].id), 0, (yyval.node_args), &(yyloc));
14905 /*% ripper: params!($:1, Qnil, $:2, Qnil, Qnil, Qnil, Qnil) %*/
14906 }
14907#line 14908 "parse.c"
14908 break;
14909
14910 case 444: /* block_param: f_arg ',' f_rest_arg ',' f_arg opt_args_tail_block_args_tail */
14911#line 5065 "parse.y"
14912 {
14913 (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));
14914 /*% ripper: params!($:1, Qnil, $:3, $:5, *$:6[0..2]) %*/
14915 }
14916#line 14917 "parse.c"
14917 break;
14918
14919 case 445: /* block_param: f_arg opt_args_tail_block_args_tail */
14920#line 5070 "parse.y"
14921 {
14922 (yyval.node_args) = new_args(p, (yyvsp[-1].node_args_aux), 0, 0, 0, (yyvsp[0].node_args), &(yyloc));
14923 /*% ripper: params!($:1, Qnil, Qnil, Qnil, *$:2[0..2]) %*/
14924 }
14925#line 14926 "parse.c"
14926 break;
14927
14928 case 446: /* block_param: f_optarg_primary_value ',' f_rest_arg opt_args_tail_block_args_tail */
14929#line 5075 "parse.y"
14930 {
14931 (yyval.node_args) = new_args(p, 0, (yyvsp[-3].node_opt_arg), (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
14932 /*% ripper: params!(Qnil, $:1, $:3, Qnil, *$:4[0..2]) %*/
14933 }
14934#line 14935 "parse.c"
14935 break;
14936
14937 case 447: /* block_param: f_optarg_primary_value ',' f_rest_arg ',' f_arg opt_args_tail_block_args_tail */
14938#line 5080 "parse.y"
14939 {
14940 (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));
14941 /*% ripper: params!(Qnil, $:1, $:3, $:5, *$:6[0..2]) %*/
14942 }
14943#line 14944 "parse.c"
14944 break;
14945
14946 case 448: /* block_param: f_optarg_primary_value opt_args_tail_block_args_tail */
14947#line 5085 "parse.y"
14948 {
14949 (yyval.node_args) = new_args(p, 0, (yyvsp[-1].node_opt_arg), 0, 0, (yyvsp[0].node_args), &(yyloc));
14950 /*% ripper: params!(Qnil, $:1, Qnil, Qnil, *$:2[0..2]) %*/
14951 }
14952#line 14953 "parse.c"
14953 break;
14954
14955 case 449: /* block_param: f_optarg_primary_value ',' f_arg opt_args_tail_block_args_tail */
14956#line 5090 "parse.y"
14957 {
14958 (yyval.node_args) = new_args(p, 0, (yyvsp[-3].node_opt_arg), 0, (yyvsp[-1].node_args_aux), (yyvsp[0].node_args), &(yyloc));
14959 /*% ripper: params!(Qnil, $:1, Qnil, $:3, *$:4[0..2]) %*/
14960 }
14961#line 14962 "parse.c"
14962 break;
14963
14964 case 450: /* block_param: f_rest_arg opt_args_tail_block_args_tail */
14965#line 5095 "parse.y"
14966 {
14967 (yyval.node_args) = new_args(p, 0, 0, (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
14968 /*% ripper: params!(Qnil, Qnil, $:1, Qnil, *$:2[0..2]) %*/
14969 }
14970#line 14971 "parse.c"
14971 break;
14972
14973 case 451: /* block_param: f_rest_arg ',' f_arg opt_args_tail_block_args_tail */
14974#line 5100 "parse.y"
14975 {
14976 (yyval.node_args) = new_args(p, 0, 0, (yyvsp[-3].id), (yyvsp[-1].node_args_aux), (yyvsp[0].node_args), &(yyloc));
14977 /*% ripper: params!(Qnil, Qnil, $:1, $:3, *$:4[0..2]) %*/
14978 }
14979#line 14980 "parse.c"
14980 break;
14981
14982 case 452: /* block_param: block_args_tail */
14983#line 5105 "parse.y"
14984 {
14985 (yyval.node_args) = new_args(p, 0, 0, 0, 0, (yyvsp[0].node_args), &(yyloc));
14986 /*% ripper: params!(Qnil, Qnil, Qnil, Qnil, *$:1[0..2]) %*/
14987 }
14988#line 14989 "parse.c"
14989 break;
14990
14991 case 454: /* opt_block_param: block_param_def */
14992#line 5113 "parse.y"
14993 {
14994 p->command_start = TRUE;
14995 }
14996#line 14997 "parse.c"
14997 break;
14998
14999 case 455: /* block_param_def: '|' opt_bv_decl '|' */
15000#line 5119 "parse.y"
15001 {
15002 p->max_numparam = ORDINAL_PARAM;
15003 p->ctxt.in_argdef = 0;
15004 (yyval.node_args) = 0;
15005 /*% ripper: block_var!(params!(Qnil,Qnil,Qnil,Qnil,Qnil,Qnil,Qnil), $:2) %*/
15006 }
15007#line 15008 "parse.c"
15008 break;
15009
15010 case 456: /* block_param_def: '|' block_param opt_bv_decl '|' */
15011#line 5126 "parse.y"
15012 {
15013 p->max_numparam = ORDINAL_PARAM;
15014 p->ctxt.in_argdef = 0;
15015 (yyval.node_args) = (yyvsp[-2].node_args);
15016 /*% ripper: block_var!($:2, $:3) %*/
15017 }
15018#line 15019 "parse.c"
15019 break;
15020
15021 case 457: /* opt_bv_decl: option_'\n' */
15022#line 5136 "parse.y"
15023 {
15024 (yyval.id) = 0;
15025 /*% ripper: Qfalse %*/
15026 }
15027#line 15028 "parse.c"
15028 break;
15029
15030 case 458: /* opt_bv_decl: option_'\n' ';' bv_decls option_'\n' */
15031#line 5141 "parse.y"
15032 {
15033 (yyval.id) = 0;
15034 /*% ripper: $:3 %*/
15035 }
15036#line 15037 "parse.c"
15037 break;
15038
15039 case 461: /* bvar: "local variable or method" */
15040#line 5154 "parse.y"
15041 {
15042 new_bv(p, (yyvsp[0].id));
15043 /*% ripper: $:1 %*/
15044 }
15045#line 15046 "parse.c"
15046 break;
15047
15048 case 462: /* bvar: f_bad_arg */
15049#line 5159 "parse.y"
15050 {
15051 (yyval.id) = 0;
15052 }
15053#line 15054 "parse.c"
15054 break;
15055
15056 case 463: /* max_numparam: %empty */
15057#line 5164 "parse.y"
15058 {
15059 (yyval.num) = p->max_numparam;
15060 p->max_numparam = 0;
15061 }
15062#line 15063 "parse.c"
15063 break;
15064
15065 case 464: /* numparam: %empty */
15066#line 5170 "parse.y"
15067 {
15068 (yyval.node) = numparam_push(p);
15069 }
15070#line 15071 "parse.c"
15071 break;
15072
15073 case 465: /* it_id: %empty */
15074#line 5175 "parse.y"
15075 {
15076 (yyval.id) = p->it_id;
15077 p->it_id = 0;
15078 }
15079#line 15080 "parse.c"
15080 break;
15081
15082 case 466: /* @24: %empty */
15083#line 5182 "parse.y"
15084 {
15085 token_info_push(p, "->", &(yylsp[0]));
15086 (yyval.vars) = dyna_push(p);
15087 }
15088#line 15089 "parse.c"
15089 break;
15090
15091 case 467: /* $@25: %empty */
15092#line 5188 "parse.y"
15093 {
15094 CMDARG_PUSH(0);
15095 }
15096#line 15097 "parse.c"
15097 break;
15098
15099 case 468: /* lambda: "->" @24 max_numparam numparam it_id allow_exits f_larglist $@25 lambda_body */
15100#line 5192 "parse.y"
15101 {
15102 int max_numparam = p->max_numparam;
15103 ID it_id = p->it_id;
15104 p->lex.lpar_beg = (yyvsp[-8].num);
15105 p->max_numparam = (yyvsp[-6].num);
15106 p->it_id = (yyvsp[-4].id);
15107 restore_block_exit(p, (yyvsp[-3].node_exits));
15108 CMDARG_POP();
15109 (yyvsp[-2].node_args) = args_with_numbered(p, (yyvsp[-2].node_args), max_numparam, it_id);
15110 {
15111 YYLTYPE loc = code_loc_gen(&(yylsp[-2]), &(yylsp[0]));
15112 (yyval.node) = NEW_LAMBDA((yyvsp[-2].node_args), (yyvsp[0].node), &loc);
15113 nd_set_line(RNODE_LAMBDA((yyval.node))->nd_body, (yylsp[0]).end_pos.lineno);
15114 nd_set_line((yyval.node), (yylsp[-2]).end_pos.lineno);
15115 nd_set_first_loc((yyval.node), (yylsp[-8]).beg_pos);
15116 }
15117 /*% ripper: lambda!($:args, $:body) %*/
15118 numparam_pop(p, (yyvsp[-5].node));
15119 dyna_pop(p, (yyvsp[-7].vars));
15120 }
15121#line 15122 "parse.c"
15122 break;
15123
15124 case 469: /* f_larglist: '(' f_args opt_bv_decl ')' */
15125#line 5215 "parse.y"
15126 {
15127 p->ctxt.in_argdef = 0;
15128 (yyval.node_args) = (yyvsp[-2].node_args);
15129 p->max_numparam = ORDINAL_PARAM;
15130 /*% ripper: paren!($:2) %*/
15131 }
15132#line 15133 "parse.c"
15133 break;
15134
15135 case 470: /* f_larglist: f_args */
15136#line 5222 "parse.y"
15137 {
15138 p->ctxt.in_argdef = 0;
15139 if (!args_info_empty_p(&(yyvsp[0].node_args)->nd_ainfo))
15140 p->max_numparam = ORDINAL_PARAM;
15141 (yyval.node_args) = (yyvsp[0].node_args);
15142 }
15143#line 15144 "parse.c"
15144 break;
15145
15146 case 471: /* lambda_body: tLAMBEG compstmt '}' */
15147#line 5231 "parse.y"
15148 {
15149 token_info_pop(p, "}", &(yylsp[0]));
15150 (yyval.node) = (yyvsp[-1].node);
15151 /*% ripper: $:2 %*/
15152 }
15153#line 15154 "parse.c"
15154 break;
15155
15156 case 472: /* $@26: %empty */
15157#line 5237 "parse.y"
15158 {
15159 push_end_expect_token_locations(p, &(yylsp[0]).beg_pos);
15160 }
15161#line 15162 "parse.c"
15162 break;
15163
15164 case 473: /* lambda_body: "'do' for lambda" $@26 bodystmt k_end */
15165#line 5241 "parse.y"
15166 {
15167 (yyval.node) = (yyvsp[-1].node);
15168 /*% ripper: $:3 %*/
15169 }
15170#line 15171 "parse.c"
15171 break;
15172
15173 case 474: /* do_block: k_do_block do_body k_end */
15174#line 5248 "parse.y"
15175 {
15176 (yyval.node) = (yyvsp[-1].node);
15177 set_embraced_location((yyval.node), &(yylsp[-2]), &(yylsp[0]));
15178 /*% ripper: $:2 %*/
15179 }
15180#line 15181 "parse.c"
15181 break;
15182
15183 case 475: /* block_call: command do_block */
15184#line 5256 "parse.y"
15185 {
15186 if (nd_type_p((yyvsp[-1].node), NODE_YIELD)) {
15187 compile_error(p, "block given to yield");
15188 }
15189 else {
15190 block_dup_check(p, get_nd_args(p, (yyvsp[-1].node)), (yyvsp[0].node));
15191 }
15192 (yyval.node) = method_add_block(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
15193 fixpos((yyval.node), (yyvsp[-1].node));
15194 /*% ripper: method_add_block!($:1, $:2) %*/
15195 }
15196#line 15197 "parse.c"
15197 break;
15198
15199 case 476: /* block_call: block_call call_op2 operation2 opt_paren_args */
15200#line 5268 "parse.y"
15201 {
15202 bool has_args = (yyvsp[0].node) != 0;
15203 if (NODE_EMPTY_ARGS_P((yyvsp[0].node))) (yyvsp[0].node) = 0;
15204 (yyval.node) = new_qcall(p, (yyvsp[-2].id), (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
15205 /*% ripper: call!($:1, $:2, $:3) %*/
15206 if (has_args) {
15207 /*% ripper: method_add_arg!($:$, $:4) %*/
15208 }
15209 }
15210#line 15211 "parse.c"
15211 break;
15212
15213 case 477: /* block_call: block_call call_op2 operation2 opt_paren_args brace_block */
15214#line 5278 "parse.y"
15215 {
15216 if (NODE_EMPTY_ARGS_P((yyvsp[-1].node))) (yyvsp[-1].node) = 0;
15217 (yyval.node) = new_command_qcall(p, (yyvsp[-3].id), (yyvsp[-4].node), (yyvsp[-2].id), (yyvsp[-1].node), (yyvsp[0].node), &(yylsp[-2]), &(yyloc));
15218 /*% ripper: command_call!($:1, $:2, $:3, $:4) %*/
15219 if ((yyvsp[0].node)) {
15220 /*% ripper: method_add_block!($:$, $:5) %*/
15221 }
15222 }
15223#line 15224 "parse.c"
15224 break;
15225
15226 case 478: /* block_call: block_call call_op2 operation2 command_args do_block */
15227#line 5287 "parse.y"
15228 {
15229 (yyval.node) = new_command_qcall(p, (yyvsp[-3].id), (yyvsp[-4].node), (yyvsp[-2].id), (yyvsp[-1].node), (yyvsp[0].node), &(yylsp[-2]), &(yyloc));
15230 /*% ripper: method_add_block!(command_call!($:1, $:2, $:3, $:4), $:5) %*/
15231 }
15232#line 15233 "parse.c"
15233 break;
15234
15235 case 479: /* method_call: fcall paren_args */
15236#line 5294 "parse.y"
15237 {
15238 (yyvsp[-1].node_fcall)->nd_args = (yyvsp[0].node);
15239 (yyval.node) = (NODE *)(yyvsp[-1].node_fcall);
15240 nd_set_last_loc((yyvsp[-1].node_fcall), (yylsp[0]).end_pos);
15241 /*% ripper: method_add_arg!(fcall!($:1), $:2) %*/
15242 }
15243#line 15244 "parse.c"
15244 break;
15245
15246 case 480: /* method_call: primary_value call_op operation2 opt_paren_args */
15247#line 5301 "parse.y"
15248 {
15249 bool has_args = (yyvsp[0].node) != 0;
15250 if (NODE_EMPTY_ARGS_P((yyvsp[0].node))) (yyvsp[0].node) = 0;
15251 (yyval.node) = new_qcall(p, (yyvsp[-2].id), (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
15252 nd_set_line((yyval.node), (yylsp[-1]).end_pos.lineno);
15253 /*% ripper: call!($:1, $:2, $:3) %*/
15254 if (has_args) {
15255 /*% ripper: method_add_arg!($:$, $:4) %*/
15256 }
15257 }
15258#line 15259 "parse.c"
15259 break;
15260
15261 case 481: /* method_call: primary_value "::" operation2 paren_args */
15262#line 5312 "parse.y"
15263 {
15264 (yyval.node) = new_qcall(p, idCOLON2, (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
15265 nd_set_line((yyval.node), (yylsp[-1]).end_pos.lineno);
15266 /*% ripper: method_add_arg!(call!($:1, $:2, $:3), $:4) %*/
15267 }
15268#line 15269 "parse.c"
15269 break;
15270
15271 case 482: /* method_call: primary_value "::" operation3 */
15272#line 5318 "parse.y"
15273 {
15274 (yyval.node) = new_qcall(p, idCOLON2, (yyvsp[-2].node), (yyvsp[0].id), 0, &(yylsp[0]), &(yyloc));
15275 /*% ripper: call!($:1, $:2, $:3) %*/
15276 }
15277#line 15278 "parse.c"
15278 break;
15279
15280 case 483: /* method_call: primary_value call_op paren_args */
15281#line 5323 "parse.y"
15282 {
15283 (yyval.node) = new_qcall(p, (yyvsp[-1].id), (yyvsp[-2].node), idCall, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
15284 nd_set_line((yyval.node), (yylsp[-1]).end_pos.lineno);
15285 /*% ripper: method_add_arg!(call!($:1, $:2, ID2VAL(idCall)), $:3) %*/
15286 }
15287#line 15288 "parse.c"
15288 break;
15289
15290 case 484: /* method_call: primary_value "::" paren_args */
15291#line 5329 "parse.y"
15292 {
15293 (yyval.node) = new_qcall(p, idCOLON2, (yyvsp[-2].node), idCall, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
15294 nd_set_line((yyval.node), (yylsp[-1]).end_pos.lineno);
15295 /*% ripper: method_add_arg!(call!($:1, $:2, ID2VAL(idCall)), $:3) %*/
15296 }
15297#line 15298 "parse.c"
15298 break;
15299
15300 case 485: /* method_call: "'super'" paren_args */
15301#line 5335 "parse.y"
15302 {
15303 (yyval.node) = NEW_SUPER((yyvsp[0].node), &(yyloc));
15304 /*% ripper: super!($:2) %*/
15305 }
15306#line 15307 "parse.c"
15307 break;
15308
15309 case 486: /* method_call: "'super'" */
15310#line 5340 "parse.y"
15311 {
15312 (yyval.node) = NEW_ZSUPER(&(yyloc));
15313 /*% ripper: zsuper! %*/
15314 }
15315#line 15316 "parse.c"
15316 break;
15317
15318 case 487: /* method_call: primary_value '[' opt_call_args rbracket */
15319#line 5345 "parse.y"
15320 {
15321 (yyval.node) = NEW_CALL((yyvsp[-3].node), tAREF, (yyvsp[-1].node), &(yyloc));
15322 fixpos((yyval.node), (yyvsp[-3].node));
15323 /*% ripper: aref!($:1, $:3) %*/
15324 }
15325#line 15326 "parse.c"
15326 break;
15327
15328 case 488: /* brace_block: '{' brace_body '}' */
15329#line 5353 "parse.y"
15330 {
15331 (yyval.node) = (yyvsp[-1].node);
15332 set_embraced_location((yyval.node), &(yylsp[-2]), &(yylsp[0]));
15333 /*% ripper: $:2 %*/
15334 }
15335#line 15336 "parse.c"
15336 break;
15337
15338 case 489: /* brace_block: k_do do_body k_end */
15339#line 5359 "parse.y"
15340 {
15341 (yyval.node) = (yyvsp[-1].node);
15342 set_embraced_location((yyval.node), &(yylsp[-2]), &(yylsp[0]));
15343 /*% ripper: $:2 %*/
15344 }
15345#line 15346 "parse.c"
15346 break;
15347
15348 case 490: /* @27: %empty */
15349#line 5366 "parse.y"
15350 {(yyval.vars) = dyna_push(p);}
15351#line 15352 "parse.c"
15352 break;
15353
15354 case 491: /* brace_body: @27 max_numparam numparam it_id allow_exits opt_block_param compstmt */
15355#line 5369 "parse.y"
15356 {
15357 int max_numparam = p->max_numparam;
15358 ID it_id = p->it_id;
15359 p->max_numparam = (yyvsp[-5].num);
15360 p->it_id = (yyvsp[-3].id);
15361 (yyvsp[-1].node_args) = args_with_numbered(p, (yyvsp[-1].node_args), max_numparam, it_id);
15362 (yyval.node) = NEW_ITER((yyvsp[-1].node_args), (yyvsp[0].node), &(yyloc));
15363 /*% ripper: brace_block!($:args, $:compstmt) %*/
15364 restore_block_exit(p, (yyvsp[-2].node_exits));
15365 numparam_pop(p, (yyvsp[-4].node));
15366 dyna_pop(p, (yyvsp[-6].vars));
15367 }
15368#line 15369 "parse.c"
15369 break;
15370
15371 case 492: /* @28: %empty */
15372#line 5383 "parse.y"
15373 {
15374 (yyval.vars) = dyna_push(p);
15375 CMDARG_PUSH(0);
15376 }
15377#line 15378 "parse.c"
15378 break;
15379
15380 case 493: /* do_body: @28 max_numparam numparam it_id allow_exits opt_block_param bodystmt */
15381#line 5389 "parse.y"
15382 {
15383 int max_numparam = p->max_numparam;
15384 ID it_id = p->it_id;
15385 p->max_numparam = (yyvsp[-5].num);
15386 p->it_id = (yyvsp[-3].id);
15387 (yyvsp[-1].node_args) = args_with_numbered(p, (yyvsp[-1].node_args), max_numparam, it_id);
15388 (yyval.node) = NEW_ITER((yyvsp[-1].node_args), (yyvsp[0].node), &(yyloc));
15389 /*% ripper: do_block!($:args, $:bodystmt) %*/
15390 CMDARG_POP();
15391 restore_block_exit(p, (yyvsp[-2].node_exits));
15392 numparam_pop(p, (yyvsp[-4].node));
15393 dyna_pop(p, (yyvsp[-6].vars));
15394 }
15395#line 15396 "parse.c"
15396 break;
15397
15398 case 494: /* case_args: arg_value */
15399#line 5405 "parse.y"
15400 {
15401 check_literal_when(p, (yyvsp[0].node), &(yylsp[0]));
15402 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
15403 /*% ripper: args_add!(args_new!, $:arg_value) %*/
15404 }
15405#line 15406 "parse.c"
15406 break;
15407
15408 case 495: /* case_args: "*" arg_value */
15409#line 5411 "parse.y"
15410 {
15411 (yyval.node) = NEW_SPLAT((yyvsp[0].node), &(yyloc), &(yylsp[-1]));
15412 /*% ripper: args_add_star!(args_new!, $:arg_value) %*/
15413 }
15414#line 15415 "parse.c"
15415 break;
15416
15417 case 496: /* case_args: case_args ',' arg_value */
15418#line 5416 "parse.y"
15419 {
15420 check_literal_when(p, (yyvsp[0].node), &(yylsp[0]));
15421 (yyval.node) = last_arg_append(p, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
15422 /*% ripper: args_add!($:non_last_args, $:arg_value) %*/
15423 }
15424#line 15425 "parse.c"
15425 break;
15426
15427 case 497: /* case_args: case_args ',' "*" arg_value */
15428#line 5422 "parse.y"
15429 {
15430 (yyval.node) = rest_arg_append(p, (yyvsp[-3].node), (yyvsp[0].node), &(yyloc));
15431 /*% ripper: args_add_star!($:non_last_args, $:arg_value) %*/
15432 }
15433#line 15434 "parse.c"
15434 break;
15435
15436 case 498: /* case_body: k_when case_args then compstmt cases */
15437#line 5431 "parse.y"
15438 {
15439 (yyval.node) = NEW_WHEN((yyvsp[-3].node), (yyvsp[-1].node), (yyvsp[0].node), &(yyloc), &(yylsp[-4]), &(yylsp[-2]));
15440 fixpos((yyval.node), (yyvsp[-3].node));
15441 /*% ripper: when!($:2, $:4, $:5) %*/
15442 }
15443#line 15444 "parse.c"
15444 break;
15445
15446 case 501: /* p_pvtbl: %empty */
15447#line 5442 "parse.y"
15448 {(yyval.tbl) = p->pvtbl; p->pvtbl = st_init_numtable();}
15449#line 15450 "parse.c"
15450 break;
15451
15452 case 502: /* p_pktbl: %empty */
15453#line 5443 "parse.y"
15454 {(yyval.tbl) = p->pktbl; p->pktbl = 0;}
15455#line 15456 "parse.c"
15456 break;
15457
15458 case 503: /* p_in_kwarg: %empty */
15459#line 5445 "parse.y"
15460 {
15461 (yyval.ctxt) = p->ctxt;
15462 SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
15463 p->command_start = FALSE;
15464 p->ctxt.in_kwarg = 1;
15465 }
15466#line 15467 "parse.c"
15467 break;
15468
15469 case 504: /* $@29: %empty */
15470#line 5456 "parse.y"
15471 {
15472 pop_pktbl(p, (yyvsp[-2].tbl));
15473 pop_pvtbl(p, (yyvsp[-3].tbl));
15474 p->ctxt.in_kwarg = (yyvsp[-4].ctxt).in_kwarg;
15475 }
15476#line 15477 "parse.c"
15477 break;
15478
15479 case 505: /* p_case_body: "'in'" p_in_kwarg p_pvtbl p_pktbl p_top_expr then $@29 compstmt p_cases */
15480#line 5463 "parse.y"
15481 {
15482 (yyval.node) = NEW_IN((yyvsp[-4].node), (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
15483 /*% ripper: in!($:expr, $:compstmt, $:cases) %*/
15484 }
15485#line 15486 "parse.c"
15486 break;
15487
15488 case 509: /* p_top_expr: p_top_expr_body "'if' modifier" expr_value */
15489#line 5475 "parse.y"
15490 {
15491 (yyval.node) = new_if(p, (yyvsp[0].node), (yyvsp[-2].node), 0, &(yyloc));
15492 fixpos((yyval.node), (yyvsp[0].node));
15493 /*% ripper: if_mod!($:3, $:1) %*/
15494 }
15495#line 15496 "parse.c"
15496 break;
15497
15498 case 510: /* p_top_expr: p_top_expr_body "'unless' modifier" expr_value */
15499#line 5481 "parse.y"
15500 {
15501 (yyval.node) = new_unless(p, (yyvsp[0].node), (yyvsp[-2].node), 0, &(yyloc), &(yylsp[-1]), &NULL_LOC, &NULL_LOC);
15502 fixpos((yyval.node), (yyvsp[0].node));
15503 /*% ripper: unless_mod!($:3, $:1) %*/
15504 }
15505#line 15506 "parse.c"
15506 break;
15507
15508 case 512: /* p_top_expr_body: p_expr ',' */
15509#line 5490 "parse.y"
15510 {
15511 (yyval.node) = new_array_pattern_tail(p, 0, 1, 0, 0, &(yyloc));
15512 (yyval.node) = new_array_pattern(p, 0, (yyvsp[-1].node), (yyval.node), &(yyloc));
15513 /*% ripper: aryptn!(Qnil, [$:1], Qnil, Qnil) %*/
15514 }
15515#line 15516 "parse.c"
15516 break;
15517
15518 case 513: /* p_top_expr_body: p_expr ',' p_args */
15519#line 5496 "parse.y"
15520 {
15521 (yyval.node) = new_array_pattern(p, 0, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
15522 nd_set_first_loc((yyval.node), (yylsp[-2]).beg_pos);
15523 /*% ripper: aryptn!(Qnil, aryptn_pre_args(p, $:1, $:3[0]), *$:3[1..2]) %*/
15524 }
15525#line 15526 "parse.c"
15526 break;
15527
15528 case 514: /* p_top_expr_body: p_find */
15529#line 5502 "parse.y"
15530 {
15531 (yyval.node) = new_find_pattern(p, 0, (yyvsp[0].node), &(yyloc));
15532 /*% ripper: fndptn!(Qnil, *$:1[0..2]) %*/
15533 }
15534#line 15535 "parse.c"
15535 break;
15536
15537 case 515: /* p_top_expr_body: p_args_tail */
15538#line 5507 "parse.y"
15539 {
15540 (yyval.node) = new_array_pattern(p, 0, 0, (yyvsp[0].node), &(yyloc));
15541 /*% ripper: aryptn!(Qnil, *$:1[0..2]) %*/
15542 }
15543#line 15544 "parse.c"
15544 break;
15545
15546 case 516: /* p_top_expr_body: p_kwargs */
15547#line 5512 "parse.y"
15548 {
15549 (yyval.node) = new_hash_pattern(p, 0, (yyvsp[0].node), &(yyloc));
15550 /*% ripper: hshptn!(Qnil, *$:1[0..1]) %*/
15551 }
15552#line 15553 "parse.c"
15553 break;
15554
15555 case 518: /* p_as: p_expr "=>" p_variable */
15556#line 5522 "parse.y"
15557 {
15558 NODE *n = NEW_LIST((yyvsp[-2].node), &(yyloc));
15559 n = list_append(p, n, (yyvsp[0].node));
15560 (yyval.node) = new_hash(p, n, &(yyloc));
15561 /*% ripper: binary!($:1, ID2VAL((id_assoc)), $:3) %*/
15562 }
15563#line 15564 "parse.c"
15564 break;
15565
15566 case 520: /* p_alt: p_alt '|' p_expr_basic */
15567#line 5532 "parse.y"
15568 {
15569 (yyval.node) = NEW_OR((yyvsp[-2].node), (yyvsp[0].node), &(yyloc), &(yylsp[-1]));
15570 /*% ripper: binary!($:1, ID2VAL(idOr), $:3) %*/
15571 }
15572#line 15573 "parse.c"
15573 break;
15574
15575 case 522: /* p_lparen: '(' p_pktbl */
15576#line 5540 "parse.y"
15577 {
15578 (yyval.tbl) = (yyvsp[0].tbl);
15579 /*% ripper: $:2 %*/
15580 }
15581#line 15582 "parse.c"
15582 break;
15583
15584 case 523: /* p_lbracket: '[' p_pktbl */
15585#line 5547 "parse.y"
15586 {
15587 (yyval.tbl) = (yyvsp[0].tbl);
15588 /*% ripper: $:2 %*/
15589 }
15590#line 15591 "parse.c"
15591 break;
15592
15593 case 526: /* p_expr_basic: p_const p_lparen p_args rparen */
15594#line 5556 "parse.y"
15595 {
15596 pop_pktbl(p, (yyvsp[-2].tbl));
15597 (yyval.node) = new_array_pattern(p, (yyvsp[-3].node), 0, (yyvsp[-1].node), &(yyloc));
15598 nd_set_first_loc((yyval.node), (yylsp[-3]).beg_pos);
15599 /*% ripper: aryptn!($:p_const, *$:p_args[0..2]) %*/
15600 }
15601#line 15602 "parse.c"
15602 break;
15603
15604 case 527: /* p_expr_basic: p_const p_lparen p_find rparen */
15605#line 5563 "parse.y"
15606 {
15607 pop_pktbl(p, (yyvsp[-2].tbl));
15608 (yyval.node) = new_find_pattern(p, (yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
15609 nd_set_first_loc((yyval.node), (yylsp[-3]).beg_pos);
15610 /*% ripper: fndptn!($:p_const, *$:p_find[0..2]) %*/
15611 }
15612#line 15613 "parse.c"
15613 break;
15614
15615 case 528: /* p_expr_basic: p_const p_lparen p_kwargs rparen */
15616#line 5570 "parse.y"
15617 {
15618 pop_pktbl(p, (yyvsp[-2].tbl));
15619 (yyval.node) = new_hash_pattern(p, (yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
15620 nd_set_first_loc((yyval.node), (yylsp[-3]).beg_pos);
15621 /*% ripper: hshptn!($:p_const, *$:p_kwargs[0..1]) %*/
15622 }
15623#line 15624 "parse.c"
15624 break;
15625
15626 case 529: /* p_expr_basic: p_const '(' rparen */
15627#line 5577 "parse.y"
15628 {
15629 (yyval.node) = new_array_pattern_tail(p, 0, 0, 0, 0, &(yyloc));
15630 (yyval.node) = new_array_pattern(p, (yyvsp[-2].node), 0, (yyval.node), &(yyloc));
15631 /*% ripper: aryptn!($:p_const, Qnil, Qnil, Qnil) %*/
15632 }
15633#line 15634 "parse.c"
15634 break;
15635
15636 case 530: /* p_expr_basic: p_const p_lbracket p_args rbracket */
15637#line 5583 "parse.y"
15638 {
15639 pop_pktbl(p, (yyvsp[-2].tbl));
15640 (yyval.node) = new_array_pattern(p, (yyvsp[-3].node), 0, (yyvsp[-1].node), &(yyloc));
15641 nd_set_first_loc((yyval.node), (yylsp[-3]).beg_pos);
15642 /*% ripper: aryptn!($:p_const, *$:p_args[0..2]) %*/
15643 }
15644#line 15645 "parse.c"
15645 break;
15646
15647 case 531: /* p_expr_basic: p_const p_lbracket p_find rbracket */
15648#line 5590 "parse.y"
15649 {
15650 pop_pktbl(p, (yyvsp[-2].tbl));
15651 (yyval.node) = new_find_pattern(p, (yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
15652 nd_set_first_loc((yyval.node), (yylsp[-3]).beg_pos);
15653 /*% ripper: fndptn!($:p_const, *$:p_find[0..2]) %*/
15654 }
15655#line 15656 "parse.c"
15656 break;
15657
15658 case 532: /* p_expr_basic: p_const p_lbracket p_kwargs rbracket */
15659#line 5597 "parse.y"
15660 {
15661 pop_pktbl(p, (yyvsp[-2].tbl));
15662 (yyval.node) = new_hash_pattern(p, (yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
15663 nd_set_first_loc((yyval.node), (yylsp[-3]).beg_pos);
15664 /*% ripper: hshptn!($:p_const, *$:p_kwargs[0..1]) %*/
15665 }
15666#line 15667 "parse.c"
15667 break;
15668
15669 case 533: /* p_expr_basic: p_const '[' rbracket */
15670#line 5604 "parse.y"
15671 {
15672 (yyval.node) = new_array_pattern_tail(p, 0, 0, 0, 0, &(yyloc));
15673 (yyval.node) = new_array_pattern(p, (yyvsp[-2].node), 0, (yyval.node), &(yyloc));
15674 /*% ripper: aryptn!($:1, Qnil, Qnil, Qnil) %*/
15675 }
15676#line 15677 "parse.c"
15677 break;
15678
15679 case 534: /* p_expr_basic: "[" p_args rbracket */
15680#line 5610 "parse.y"
15681 {
15682 (yyval.node) = new_array_pattern(p, 0, 0, (yyvsp[-1].node), &(yyloc));
15683 /*% ripper: aryptn!(Qnil, *$:p_args[0..2]) %*/
15684 }
15685#line 15686 "parse.c"
15686 break;
15687
15688 case 535: /* p_expr_basic: "[" p_find rbracket */
15689#line 5615 "parse.y"
15690 {
15691 (yyval.node) = new_find_pattern(p, 0, (yyvsp[-1].node), &(yyloc));
15692 /*% ripper: fndptn!(Qnil, *$:p_find[0..2]) %*/
15693 }
15694#line 15695 "parse.c"
15695 break;
15696
15697 case 536: /* p_expr_basic: "[" rbracket */
15698#line 5620 "parse.y"
15699 {
15700 (yyval.node) = new_array_pattern_tail(p, 0, 0, 0, 0, &(yyloc));
15701 (yyval.node) = new_array_pattern(p, 0, 0, (yyval.node), &(yyloc));
15702 /*% ripper: aryptn!(Qnil, Qnil, Qnil, Qnil) %*/
15703 }
15704#line 15705 "parse.c"
15705 break;
15706
15707 case 537: /* $@30: %empty */
15708#line 5626 "parse.y"
15709 {
15710 p->ctxt.in_kwarg = 0;
15711 }
15712#line 15713 "parse.c"
15713 break;
15714
15715 case 538: /* p_expr_basic: "{" p_pktbl lex_ctxt $@30 p_kwargs rbrace */
15716#line 5630 "parse.y"
15717 {
15718 pop_pktbl(p, (yyvsp[-4].tbl));
15719 p->ctxt.in_kwarg = (yyvsp[-3].ctxt).in_kwarg;
15720 (yyval.node) = new_hash_pattern(p, 0, (yyvsp[-1].node), &(yyloc));
15721 /*% ripper: hshptn!(Qnil, *$:p_kwargs[0..1]) %*/
15722 }
15723#line 15724 "parse.c"
15724 break;
15725
15726 case 539: /* p_expr_basic: "{" rbrace */
15727#line 5637 "parse.y"
15728 {
15729 (yyval.node) = new_hash_pattern_tail(p, 0, 0, &(yyloc));
15730 (yyval.node) = new_hash_pattern(p, 0, (yyval.node), &(yyloc));
15731 /*% ripper: hshptn!(Qnil, Qnil, Qnil) %*/
15732 }
15733#line 15734 "parse.c"
15734 break;
15735
15736 case 540: /* p_expr_basic: "(" p_pktbl p_expr rparen */
15737#line 5643 "parse.y"
15738 {
15739 pop_pktbl(p, (yyvsp[-2].tbl));
15740 (yyval.node) = (yyvsp[-1].node);
15741 /*% ripper: $:p_expr %*/
15742 }
15743#line 15744 "parse.c"
15744 break;
15745
15746 case 541: /* p_args: p_expr */
15747#line 5651 "parse.y"
15748 {
15749 NODE *pre_args = NEW_LIST((yyvsp[0].node), &(yyloc));
15750 (yyval.node) = new_array_pattern_tail(p, pre_args, 0, 0, 0, &(yyloc));
15751 /*% ripper: [[$:1], Qnil, Qnil] %*/
15752 }
15753#line 15754 "parse.c"
15754 break;
15755
15756 case 542: /* p_args: p_args_head */
15757#line 5657 "parse.y"
15758 {
15759 (yyval.node) = new_array_pattern_tail(p, (yyvsp[0].node), 1, 0, 0, &(yyloc));
15760 /*% ripper: [$:1, Qnil, Qnil] %*/
15761 }
15762#line 15763 "parse.c"
15763 break;
15764
15765 case 543: /* p_args: p_args_head p_arg */
15766#line 5662 "parse.y"
15767 {
15768 (yyval.node) = new_array_pattern_tail(p, list_concat((yyvsp[-1].node), (yyvsp[0].node)), 0, 0, 0, &(yyloc));
15769 /*% ripper: [rb_ary_concat($:1, $:2), Qnil, Qnil] %*/
15770 }
15771#line 15772 "parse.c"
15772 break;
15773
15774 case 544: /* p_args: p_args_head p_rest */
15775#line 5667 "parse.y"
15776 {
15777 (yyval.node) = new_array_pattern_tail(p, (yyvsp[-1].node), 1, (yyvsp[0].node), 0, &(yyloc));
15778 /*% ripper: [$:1, $:2, Qnil] %*/
15779 }
15780#line 15781 "parse.c"
15781 break;
15782
15783 case 545: /* p_args: p_args_head p_rest ',' p_args_post */
15784#line 5672 "parse.y"
15785 {
15786 (yyval.node) = new_array_pattern_tail(p, (yyvsp[-3].node), 1, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
15787 /*% ripper: [$:1, $:2, $:4] %*/
15788 }
15789#line 15790 "parse.c"
15790 break;
15791
15792 case 547: /* p_args_head: p_arg ',' */
15793#line 5680 "parse.y"
15794 {
15795 (yyval.node) = (yyvsp[-1].node);
15796 }
15797#line 15798 "parse.c"
15798 break;
15799
15800 case 548: /* p_args_head: p_args_head p_arg ',' */
15801#line 5684 "parse.y"
15802 {
15803 (yyval.node) = list_concat((yyvsp[-2].node), (yyvsp[-1].node));
15804 /*% ripper: rb_ary_concat($:1, $:2) %*/
15805 }
15806#line 15807 "parse.c"
15807 break;
15808
15809 case 549: /* p_args_tail: p_rest */
15810#line 5691 "parse.y"
15811 {
15812 (yyval.node) = new_array_pattern_tail(p, 0, 1, (yyvsp[0].node), 0, &(yyloc));
15813 /*% ripper: [Qnil, $:1, Qnil] %*/
15814 }
15815#line 15816 "parse.c"
15816 break;
15817
15818 case 550: /* p_args_tail: p_rest ',' p_args_post */
15819#line 5696 "parse.y"
15820 {
15821 (yyval.node) = new_array_pattern_tail(p, 0, 1, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
15822 /*% ripper: [Qnil, $:1, $:3] %*/
15823 }
15824#line 15825 "parse.c"
15825 break;
15826
15827 case 551: /* p_find: p_rest ',' p_args_post ',' p_rest */
15828#line 5703 "parse.y"
15829 {
15830 (yyval.node) = new_find_pattern_tail(p, (yyvsp[-4].node), (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
15831 /*% ripper: [$:1, $:3, $:5] %*/
15832 }
15833#line 15834 "parse.c"
15834 break;
15835
15836 case 552: /* p_rest: "*" "local variable or method" */
15837#line 5711 "parse.y"
15838 {
15839 error_duplicate_pattern_variable(p, (yyvsp[0].id), &(yylsp[0]));
15840 /*% ripper: var_field!($:2) %*/
15841 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
15842 }
15843#line 15844 "parse.c"
15844 break;
15845
15846 case 553: /* p_rest: "*" */
15847#line 5717 "parse.y"
15848 {
15849 (yyval.node) = 0;
15850 /*% ripper: var_field!(Qnil) %*/
15851 }
15852#line 15853 "parse.c"
15853 break;
15854
15855 case 555: /* p_args_post: p_args_post ',' p_arg */
15856#line 5725 "parse.y"
15857 {
15858 (yyval.node) = list_concat((yyvsp[-2].node), (yyvsp[0].node));
15859 /*% ripper: rb_ary_concat($:1, $:3) %*/
15860 }
15861#line 15862 "parse.c"
15862 break;
15863
15864 case 556: /* p_arg: p_expr */
15865#line 5732 "parse.y"
15866 {
15867 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
15868 /*% ripper: [$:1] %*/
15869 }
15870#line 15871 "parse.c"
15871 break;
15872
15873 case 557: /* p_kwargs: p_kwarg ',' p_any_kwrest */
15874#line 5739 "parse.y"
15875 {
15876 (yyval.node) = new_hash_pattern_tail(p, new_unique_key_hash(p, (yyvsp[-2].node), &(yyloc)), (yyvsp[0].id), &(yyloc));
15877 /*% ripper: [$:1, $:3] %*/
15878 }
15879#line 15880 "parse.c"
15880 break;
15881
15882 case 558: /* p_kwargs: p_kwarg */
15883#line 5744 "parse.y"
15884 {
15885 (yyval.node) = new_hash_pattern_tail(p, new_unique_key_hash(p, (yyvsp[0].node), &(yyloc)), 0, &(yyloc));
15886 /*% ripper: [$:1, Qnil] %*/
15887 }
15888#line 15889 "parse.c"
15889 break;
15890
15891 case 559: /* p_kwargs: p_kwarg ',' */
15892#line 5749 "parse.y"
15893 {
15894 (yyval.node) = new_hash_pattern_tail(p, new_unique_key_hash(p, (yyvsp[-1].node), &(yyloc)), 0, &(yyloc));
15895 /*% ripper: [$:1, Qnil] %*/
15896 }
15897#line 15898 "parse.c"
15898 break;
15899
15900 case 560: /* p_kwargs: p_any_kwrest */
15901#line 5754 "parse.y"
15902 {
15903 (yyval.node) = new_hash_pattern_tail(p, new_hash(p, 0, &(yyloc)), (yyvsp[0].id), &(yyloc));
15904 /*% ripper: [[], $:1] %*/
15905 }
15906#line 15907 "parse.c"
15907 break;
15908
15909 case 562: /* p_kwarg: p_kwarg ',' p_kw */
15910#line 5763 "parse.y"
15911 {
15912 (yyval.node) = list_concat((yyvsp[-2].node), (yyvsp[0].node));
15913 /*% ripper: rb_ary_push($:1, $:3) %*/
15914 }
15915#line 15916 "parse.c"
15916 break;
15917
15918 case 563: /* p_kw: p_kw_label p_expr */
15919#line 5770 "parse.y"
15920 {
15921 error_duplicate_pattern_key(p, (yyvsp[-1].id), &(yylsp[-1]));
15922 (yyval.node) = list_append(p, NEW_LIST(NEW_SYM(rb_id2str((yyvsp[-1].id)), &(yylsp[-1])), &(yyloc)), (yyvsp[0].node));
15923 /*% ripper: [$:1, $:2] %*/
15924 }
15925#line 15926 "parse.c"
15926 break;
15927
15928 case 564: /* p_kw: p_kw_label */
15929#line 5776 "parse.y"
15930 {
15931 error_duplicate_pattern_key(p, (yyvsp[0].id), &(yylsp[0]));
15932 if ((yyvsp[0].id) && !is_local_id((yyvsp[0].id))) {
15933 yyerror1(&(yylsp[0]), "key must be valid as local variables");
15934 }
15935 error_duplicate_pattern_variable(p, (yyvsp[0].id), &(yylsp[0]));
15936 (yyval.node) = list_append(p, NEW_LIST(NEW_SYM(rb_id2str((yyvsp[0].id)), &(yyloc)), &(yyloc)), assignable(p, (yyvsp[0].id), 0, &(yyloc)));
15937 /*% ripper: [$:1, Qnil] %*/
15938 }
15939#line 15940 "parse.c"
15940 break;
15941
15942 case 566: /* p_kw_label: "string literal" string_contents tLABEL_END */
15943#line 5789 "parse.y"
15944 {
15945 YYLTYPE loc = code_loc_gen(&(yylsp[-2]), &(yylsp[0]));
15946 if (!(yyvsp[-1].node) || nd_type_p((yyvsp[-1].node), NODE_STR)) {
15947 NODE *node = dsym_node(p, (yyvsp[-1].node), &loc);
15948 (yyval.id) = rb_sym2id(rb_node_sym_string_val(node));
15949 }
15950 else {
15951 yyerror1(&loc, "symbol literal with interpolation is not allowed");
15952 (yyval.id) = rb_intern_str(STR_NEW0());
15953 }
15954 /*% ripper: $:2 %*/
15955 }
15956#line 15957 "parse.c"
15957 break;
15958
15959 case 567: /* p_kwrest: kwrest_mark "local variable or method" */
15960#line 5804 "parse.y"
15961 {
15962 (yyval.id) = (yyvsp[0].id);
15963 /*% ripper: var_field!($:2) %*/
15964 }
15965#line 15966 "parse.c"
15966 break;
15967
15968 case 568: /* p_kwrest: kwrest_mark */
15969#line 5809 "parse.y"
15970 {
15971 (yyval.id) = 0;
15972 /*% ripper: Qnil %*/
15973 }
15974#line 15975 "parse.c"
15975 break;
15976
15977 case 569: /* p_kwnorest: kwrest_mark "'nil'" */
15978#line 5816 "parse.y"
15979 {
15980 (yyval.id) = 0;
15981 }
15982#line 15983 "parse.c"
15983 break;
15984
15985 case 571: /* p_any_kwrest: p_kwnorest */
15986#line 5823 "parse.y"
15987 {
15988 (yyval.id) = idNil;
15989 /*% ripper: var_field!(ID2VAL(idNil)) %*/
15990 }
15991#line 15992 "parse.c"
15992 break;
15993
15994 case 573: /* p_value: p_primitive ".." p_primitive */
15995#line 5831 "parse.y"
15996 {
15997 value_expr((yyvsp[-2].node));
15998 value_expr((yyvsp[0].node));
15999 (yyval.node) = NEW_DOT2((yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
16000 /*% ripper: dot2!($:1, $:3) %*/
16001 }
16002#line 16003 "parse.c"
16003 break;
16004
16005 case 574: /* p_value: p_primitive "..." p_primitive */
16006#line 5838 "parse.y"
16007 {
16008 value_expr((yyvsp[-2].node));
16009 value_expr((yyvsp[0].node));
16010 (yyval.node) = NEW_DOT3((yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
16011 /*% ripper: dot3!($:1, $:3) %*/
16012 }
16013#line 16014 "parse.c"
16014 break;
16015
16016 case 575: /* p_value: p_primitive ".." */
16017#line 5845 "parse.y"
16018 {
16019 value_expr((yyvsp[-1].node));
16020 (yyval.node) = NEW_DOT2((yyvsp[-1].node), new_nil_at(p, &(yylsp[0]).end_pos), &(yyloc));
16021 /*% ripper: dot2!($:1, Qnil) %*/
16022 }
16023#line 16024 "parse.c"
16024 break;
16025
16026 case 576: /* p_value: p_primitive "..." */
16027#line 5851 "parse.y"
16028 {
16029 value_expr((yyvsp[-1].node));
16030 (yyval.node) = NEW_DOT3((yyvsp[-1].node), new_nil_at(p, &(yylsp[0]).end_pos), &(yyloc));
16031 /*% ripper: dot3!($:1, Qnil) %*/
16032 }
16033#line 16034 "parse.c"
16034 break;
16035
16036 case 580: /* p_value: "(.." p_primitive */
16037#line 5860 "parse.y"
16038 {
16039 value_expr((yyvsp[0].node));
16040 (yyval.node) = NEW_DOT2(new_nil_at(p, &(yylsp[-1]).beg_pos), (yyvsp[0].node), &(yyloc));
16041 /*% ripper: dot2!(Qnil, $:2) %*/
16042 }
16043#line 16044 "parse.c"
16044 break;
16045
16046 case 581: /* p_value: "(..." p_primitive */
16047#line 5866 "parse.y"
16048 {
16049 value_expr((yyvsp[0].node));
16050 (yyval.node) = NEW_DOT3(new_nil_at(p, &(yylsp[-1]).beg_pos), (yyvsp[0].node), &(yyloc));
16051 /*% ripper: dot3!(Qnil, $:2) %*/
16052 }
16053#line 16054 "parse.c"
16054 break;
16055
16056 case 590: /* p_primitive: keyword_variable */
16057#line 5875 "parse.y"
16058 {
16059 if (!((yyval.node) = gettable(p, (yyvsp[0].id), &(yyloc)))) (yyval.node) = NEW_ERROR(&(yyloc));
16060 /*% ripper: var_ref!($:1) %*/
16061 }
16062#line 16063 "parse.c"
16063 break;
16064
16065 case 592: /* p_variable: "local variable or method" */
16066#line 5883 "parse.y"
16067 {
16068 error_duplicate_pattern_variable(p, (yyvsp[0].id), &(yylsp[0]));
16069 /*% ripper: var_field!($:1) %*/
16070 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
16071 }
16072#line 16073 "parse.c"
16073 break;
16074
16075 case 593: /* p_var_ref: '^' "local variable or method" */
16076#line 5891 "parse.y"
16077 {
16078 NODE *n = gettable(p, (yyvsp[0].id), &(yyloc));
16079 if (!n) {
16080 n = NEW_ERROR(&(yyloc));
16081 }
16082 else if (!(nd_type_p(n, NODE_LVAR) || nd_type_p(n, NODE_DVAR))) {
16083 compile_error(p, "%"PRIsVALUE": no such local variable", rb_id2str((yyvsp[0].id)));
16084 }
16085 (yyval.node) = n;
16086 /*% ripper: var_ref!($:2) %*/
16087 }
16088#line 16089 "parse.c"
16089 break;
16090
16091 case 594: /* p_var_ref: '^' nonlocal_var */
16092#line 5903 "parse.y"
16093 {
16094 if (!((yyval.node) = gettable(p, (yyvsp[0].id), &(yyloc)))) (yyval.node) = NEW_ERROR(&(yyloc));
16095 /*% ripper: var_ref!($:2) %*/
16096 }
16097#line 16098 "parse.c"
16098 break;
16099
16100 case 595: /* p_expr_ref: '^' "(" expr_value rparen */
16101#line 5910 "parse.y"
16102 {
16103 (yyval.node) = NEW_BLOCK((yyvsp[-1].node), &(yyloc));
16104 /*% ripper: begin!($:3) %*/
16105 }
16106#line 16107 "parse.c"
16107 break;
16108
16109 case 596: /* p_const: ":: at EXPR_BEG" cname */
16110#line 5917 "parse.y"
16111 {
16112 (yyval.node) = NEW_COLON3((yyvsp[0].id), &(yyloc));
16113 /*% ripper: top_const_ref!($:2) %*/
16114 }
16115#line 16116 "parse.c"
16116 break;
16117
16118 case 597: /* p_const: p_const "::" cname */
16119#line 5922 "parse.y"
16120 {
16121 (yyval.node) = NEW_COLON2((yyvsp[-2].node), (yyvsp[0].id), &(yyloc));
16122 /*% ripper: const_path_ref!($:1, $:3) %*/
16123 }
16124#line 16125 "parse.c"
16125 break;
16126
16127 case 598: /* p_const: "constant" */
16128#line 5927 "parse.y"
16129 {
16130 (yyval.node) = gettable(p, (yyvsp[0].id), &(yyloc));
16131 /*% ripper: var_ref!($:1) %*/
16132 }
16133#line 16134 "parse.c"
16134 break;
16135
16136 case 599: /* opt_rescue: k_rescue exc_list exc_var then compstmt opt_rescue */
16137#line 5936 "parse.y"
16138 {
16139 NODE *err = (yyvsp[-3].node);
16140 if ((yyvsp[-3].node)) {
16141 err = NEW_ERRINFO(&(yylsp[-3]));
16142 err = node_assign(p, (yyvsp[-3].node), err, NO_LEX_CTXT, &(yylsp[-3]));
16143 }
16144 (yyval.node) = NEW_RESBODY((yyvsp[-4].node), (yyvsp[-3].node), (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
16145 if ((yyvsp[-4].node)) {
16146 fixpos((yyval.node), (yyvsp[-4].node));
16147 }
16148 else if ((yyvsp[-3].node)) {
16149 fixpos((yyval.node), (yyvsp[-3].node));
16150 }
16151 else {
16152 fixpos((yyval.node), (yyvsp[-1].node));
16153 }
16154 /*% ripper: rescue!($:2, $:3, $:5, $:6) %*/
16155 }
16156#line 16157 "parse.c"
16157 break;
16158
16159 case 601: /* exc_list: arg_value */
16160#line 5958 "parse.y"
16161 {
16162 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
16163 /*% ripper: rb_ary_new3(1, $:1) %*/
16164 }
16165#line 16166 "parse.c"
16166 break;
16167
16168 case 602: /* exc_list: mrhs */
16169#line 5963 "parse.y"
16170 {
16171 if (!((yyval.node) = splat_array((yyvsp[0].node)))) (yyval.node) = (yyvsp[0].node);
16172 }
16173#line 16174 "parse.c"
16174 break;
16175
16176 case 604: /* exc_var: "=>" lhs */
16177#line 5970 "parse.y"
16178 {
16179 (yyval.node) = (yyvsp[0].node);
16180 /*% ripper: $:2 %*/
16181 }
16182#line 16183 "parse.c"
16183 break;
16184
16185 case 606: /* opt_ensure: k_ensure stmts option_terms */
16186#line 5978 "parse.y"
16187 {
16188 p->ctxt.in_rescue = (yyvsp[-2].ctxt).in_rescue;
16189 (yyval.node) = (yyvsp[-1].node);
16190 void_expr(p, void_stmts(p, (yyval.node)));
16191 /*% ripper: ensure!($:2) %*/
16192 }
16193#line 16194 "parse.c"
16194 break;
16195
16196 case 610: /* strings: string */
16197#line 5992 "parse.y"
16198 {
16199 NODE *node = (yyvsp[0].node);
16200 if (!node) {
16201 node = NEW_STR(STRING_NEW0(), &(yyloc));
16202 }
16203 else {
16204 node = evstr2dstr(p, node);
16205 }
16206 (yyval.node) = node;
16207 /*% ripper: $:1 %*/
16208 }
16209#line 16210 "parse.c"
16210 break;
16211
16212 case 613: /* string: string string1 */
16213#line 6008 "parse.y"
16214 {
16215 (yyval.node) = literal_concat(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
16216 /*% ripper: string_concat!($:1, $:2) %*/
16217 }
16218#line 16219 "parse.c"
16219 break;
16220
16221 case 614: /* string1: "string literal" string_contents "terminator" */
16222#line 6015 "parse.y"
16223 {
16224 (yyval.node) = heredoc_dedent(p, (yyvsp[-1].node));
16225 if ((yyval.node)) nd_set_loc((yyval.node), &(yyloc));
16226 /*% ripper: $:2 %*/
16227 if (p->heredoc_indent > 0) {
16228 /*% ripper: heredoc_dedent!($:$, INT2NUM(%{p->heredoc_indent})) %*/
16229 p->heredoc_indent = 0;
16230 }
16231 /*% ripper: string_literal!($:$) %*/
16232 }
16233#line 16234 "parse.c"
16234 break;
16235
16236 case 615: /* xstring: "backtick literal" xstring_contents "terminator" */
16237#line 6028 "parse.y"
16238 {
16239 (yyval.node) = new_xstring(p, heredoc_dedent(p, (yyvsp[-1].node)), &(yyloc));
16240 /*% ripper: $:2 %*/
16241 if (p->heredoc_indent > 0) {
16242 /*% ripper: heredoc_dedent!($:$, INT2NUM(%{p->heredoc_indent})) %*/
16243 p->heredoc_indent = 0;
16244 }
16245 /*% ripper: xstring_literal!($:$) %*/
16246 }
16247#line 16248 "parse.c"
16248 break;
16249
16250 case 616: /* regexp: "regexp literal" regexp_contents tREGEXP_END */
16251#line 6040 "parse.y"
16252 {
16253 (yyval.node) = new_regexp(p, (yyvsp[-1].node), (yyvsp[0].num), &(yyloc));
16254 /*% ripper: regexp_literal!($:2, $:3) %*/
16255 }
16256#line 16257 "parse.c"
16257 break;
16258
16259 case 619: /* words_tWORDS_BEG_word_list: "word list" nonempty_list_' ' word_list "terminator" */
16260#line 2961 "parse.y"
16261 {
16262 (yyval.node) = make_list((yyvsp[-1].node), &(yyloc));
16263 /*% ripper: array!($:3) %*/
16264 }
16265#line 16266 "parse.c"
16266 break;
16267
16268 case 621: /* word_list: %empty */
16269#line 6050 "parse.y"
16270 {
16271 (yyval.node) = 0;
16272 /*% ripper: words_new! %*/
16273 }
16274#line 16275 "parse.c"
16275 break;
16276
16277 case 622: /* word_list: word_list word nonempty_list_' ' */
16278#line 6055 "parse.y"
16279 {
16280 (yyval.node) = list_append(p, (yyvsp[-2].node), evstr2dstr(p, (yyvsp[-1].node)));
16281 /*% ripper: words_add!($:1, $:2) %*/
16282 }
16283#line 16284 "parse.c"
16284 break;
16285
16286 case 624: /* word: word string_content */
16287#line 6064 "parse.y"
16288 {
16289 (yyval.node) = literal_concat(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
16290 /*% ripper: word_add!($:1, $:2) %*/
16291 }
16292#line 16293 "parse.c"
16293 break;
16294
16295 case 625: /* words_tSYMBOLS_BEG_symbol_list: "symbol list" nonempty_list_' ' symbol_list "terminator" */
16296#line 2961 "parse.y"
16297 {
16298 (yyval.node) = make_list((yyvsp[-1].node), &(yyloc));
16299 /*% ripper: array!($:3) %*/
16300 }
16301#line 16302 "parse.c"
16302 break;
16303
16304 case 627: /* symbol_list: %empty */
16305#line 6074 "parse.y"
16306 {
16307 (yyval.node) = 0;
16308 /*% ripper: symbols_new! %*/
16309 }
16310#line 16311 "parse.c"
16311 break;
16312
16313 case 628: /* symbol_list: symbol_list word nonempty_list_' ' */
16314#line 6079 "parse.y"
16315 {
16316 (yyval.node) = symbol_append(p, (yyvsp[-2].node), evstr2dstr(p, (yyvsp[-1].node)));
16317 /*% ripper: symbols_add!($:1, $:2) %*/
16318 }
16319#line 16320 "parse.c"
16320 break;
16321
16322 case 629: /* words_tQWORDS_BEG_qword_list: "verbatim word list" nonempty_list_' ' qword_list "terminator" */
16323#line 2961 "parse.y"
16324 {
16325 (yyval.node) = make_list((yyvsp[-1].node), &(yyloc));
16326 /*% ripper: array!($:3) %*/
16327 }
16328#line 16329 "parse.c"
16329 break;
16330
16331 case 631: /* words_tQSYMBOLS_BEG_qsym_list: "verbatim symbol list" nonempty_list_' ' qsym_list "terminator" */
16332#line 2961 "parse.y"
16333 {
16334 (yyval.node) = make_list((yyvsp[-1].node), &(yyloc));
16335 /*% ripper: array!($:3) %*/
16336 }
16337#line 16338 "parse.c"
16338 break;
16339
16340 case 633: /* qword_list: %empty */
16341#line 6092 "parse.y"
16342 {
16343 (yyval.node) = 0;
16344 /*% ripper: qwords_new! %*/
16345 }
16346#line 16347 "parse.c"
16347 break;
16348
16349 case 634: /* qword_list: qword_list "literal content" nonempty_list_' ' */
16350#line 6097 "parse.y"
16351 {
16352 (yyval.node) = list_append(p, (yyvsp[-2].node), (yyvsp[-1].node));
16353 /*% ripper: qwords_add!($:1, $:2) %*/
16354 }
16355#line 16356 "parse.c"
16356 break;
16357
16358 case 635: /* qsym_list: %empty */
16359#line 6104 "parse.y"
16360 {
16361 (yyval.node) = 0;
16362 /*% ripper: qsymbols_new! %*/
16363 }
16364#line 16365 "parse.c"
16365 break;
16366
16367 case 636: /* qsym_list: qsym_list "literal content" nonempty_list_' ' */
16368#line 6109 "parse.y"
16369 {
16370 (yyval.node) = symbol_append(p, (yyvsp[-2].node), (yyvsp[-1].node));
16371 /*% ripper: qsymbols_add!($:1, $:2) %*/
16372 }
16373#line 16374 "parse.c"
16374 break;
16375
16376 case 637: /* string_contents: %empty */
16377#line 6116 "parse.y"
16378 {
16379 (yyval.node) = 0;
16380 /*% ripper: string_content! %*/
16381 }
16382#line 16383 "parse.c"
16383 break;
16384
16385 case 638: /* string_contents: string_contents string_content */
16386#line 6121 "parse.y"
16387 {
16388 (yyval.node) = literal_concat(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
16389 /*% ripper: string_add!($:1, $:2) %*/
16390 }
16391#line 16392 "parse.c"
16392 break;
16393
16394 case 639: /* xstring_contents: %empty */
16395#line 6128 "parse.y"
16396 {
16397 (yyval.node) = 0;
16398 /*% ripper: xstring_new! %*/
16399 }
16400#line 16401 "parse.c"
16401 break;
16402
16403 case 640: /* xstring_contents: xstring_contents string_content */
16404#line 6133 "parse.y"
16405 {
16406 (yyval.node) = literal_concat(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
16407 /*% ripper: xstring_add!($:1, $:2) %*/
16408 }
16409#line 16410 "parse.c"
16410 break;
16411
16412 case 641: /* regexp_contents: %empty */
16413#line 6140 "parse.y"
16414 {
16415 (yyval.node) = 0;
16416 /*% ripper: regexp_new! %*/
16417 }
16418#line 16419 "parse.c"
16419 break;
16420
16421 case 642: /* regexp_contents: regexp_contents string_content */
16422#line 6145 "parse.y"
16423 {
16424 NODE *head = (yyvsp[-1].node), *tail = (yyvsp[0].node);
16425 if (!head) {
16426 (yyval.node) = tail;
16427 }
16428 else if (!tail) {
16429 (yyval.node) = head;
16430 }
16431 else {
16432 switch (nd_type(head)) {
16433 case NODE_STR:
16434 head = str2dstr(p, head);
16435 break;
16436 case NODE_DSTR:
16437 break;
16438 default:
16439 head = list_append(p, NEW_DSTR(0, &(yyloc)), head);
16440 break;
16441 }
16442 (yyval.node) = list_append(p, head, tail);
16443 }
16444 /*% ripper: regexp_add!($:1, $:2) %*/
16445 }
16446#line 16447 "parse.c"
16447 break;
16448
16449 case 644: /* @31: %empty */
16450#line 6173 "parse.y"
16451 {
16452 /* need to backup p->lex.strterm so that a string literal `%&foo,#$&,bar&` can be parsed */
16453 (yyval.strterm) = p->lex.strterm;
16454 p->lex.strterm = 0;
16455 SET_LEX_STATE(EXPR_BEG);
16456 }
16457#line 16458 "parse.c"
16458 break;
16459
16460 case 645: /* string_content: tSTRING_DVAR @31 string_dvar */
16461#line 6180 "parse.y"
16462 {
16463 p->lex.strterm = (yyvsp[-1].strterm);
16464 (yyval.node) = NEW_EVSTR((yyvsp[0].node), &(yyloc));
16465 nd_set_line((yyval.node), (yylsp[0]).end_pos.lineno);
16466 /*% ripper: string_dvar!($:3) %*/
16467 }
16468#line 16469 "parse.c"
16469 break;
16470
16471 case 646: /* @32: %empty */
16472#line 6187 "parse.y"
16473 {
16474 CMDARG_PUSH(0);
16475 COND_PUSH(0);
16476 /* need to backup p->lex.strterm so that a string literal `%!foo,#{ !0 },bar!` can be parsed */
16477 (yyval.strterm) = p->lex.strterm;
16478 p->lex.strterm = 0;
16479 SET_LEX_STATE(EXPR_BEG);
16480 }
16481#line 16482 "parse.c"
16482 break;
16483
16484 case 647: /* @33: %empty */
16485#line 6195 "parse.y"
16486 {
16487 (yyval.num) = p->lex.brace_nest;
16488 p->lex.brace_nest = 0;
16489 }
16490#line 16491 "parse.c"
16491 break;
16492
16493 case 648: /* @34: %empty */
16494#line 6199 "parse.y"
16495 {
16496 (yyval.num) = p->heredoc_indent;
16497 p->heredoc_indent = 0;
16498 }
16499#line 16500 "parse.c"
16500 break;
16501
16502 case 649: /* string_content: "'#{'" @32 @33 @34 compstmt string_dend */
16503#line 6204 "parse.y"
16504 {
16505 COND_POP();
16506 CMDARG_POP();
16507 p->lex.strterm = (yyvsp[-4].strterm);
16508 SET_LEX_STATE((yyvsp[-5].state));
16509 p->lex.brace_nest = (yyvsp[-3].num);
16510 p->heredoc_indent = (yyvsp[-2].num);
16511 p->heredoc_line_indent = -1;
16512 if ((yyvsp[-1].node)) nd_unset_fl_newline((yyvsp[-1].node));
16513 (yyval.node) = new_evstr(p, (yyvsp[-1].node), &(yyloc));
16514 /*% ripper: string_embexpr!($:compstmt) %*/
16515 }
16516#line 16517 "parse.c"
16517 break;
16518
16519 case 652: /* string_dvar: nonlocal_var */
16520#line 6223 "parse.y"
16521 {
16522 if (!((yyval.node) = gettable(p, (yyvsp[0].id), &(yyloc)))) (yyval.node) = NEW_ERROR(&(yyloc));
16523 /*% ripper: var_ref!($:1) %*/
16524 }
16525#line 16526 "parse.c"
16526 break;
16527
16528 case 656: /* ssym: "symbol literal" sym */
16529#line 6235 "parse.y"
16530 {
16531 SET_LEX_STATE(EXPR_END);
16532 VALUE str = rb_id2str((yyvsp[0].id));
16533 /*
16534 * TODO:
16535 * set_yylval_noname sets invalid id to yylval.
16536 * This branch can be removed once yylval is changed to
16537 * hold lexed string.
16538 */
16539 if (!str) str = STR_NEW0();
16540 (yyval.node) = NEW_SYM(str, &(yyloc));
16541 /*% ripper: symbol_literal!(symbol!($:2)) %*/
16542 }
16543#line 16544 "parse.c"
16544 break;
16545
16546 case 659: /* dsym: "symbol literal" string_contents "terminator" */
16547#line 6255 "parse.y"
16548 {
16549 SET_LEX_STATE(EXPR_END);
16550 (yyval.node) = dsym_node(p, (yyvsp[-1].node), &(yyloc));
16551 /*% ripper: dyna_symbol!($:2) %*/
16552 }
16553#line 16554 "parse.c"
16554 break;
16555
16556 case 661: /* numeric: tUMINUS_NUM simple_numeric */
16557#line 6264 "parse.y"
16558 {
16559 (yyval.node) = (yyvsp[0].node);
16560 negate_lit(p, (yyval.node));
16561 /*% ripper: unary!(ID2VAL(idUMinus), $:2) %*/
16562 }
16563#line 16564 "parse.c"
16564 break;
16565
16566 case 672: /* keyword_variable: "'nil'" */
16567#line 6286 "parse.y"
16568 {(yyval.id) = KWD2EID(nil, (yyvsp[0].id));}
16569#line 16570 "parse.c"
16570 break;
16571
16572 case 673: /* keyword_variable: "'self'" */
16573#line 6287 "parse.y"
16574 {(yyval.id) = KWD2EID(self, (yyvsp[0].id));}
16575#line 16576 "parse.c"
16576 break;
16577
16578 case 674: /* keyword_variable: "'true'" */
16579#line 6288 "parse.y"
16580 {(yyval.id) = KWD2EID(true, (yyvsp[0].id));}
16581#line 16582 "parse.c"
16582 break;
16583
16584 case 675: /* keyword_variable: "'false'" */
16585#line 6289 "parse.y"
16586 {(yyval.id) = KWD2EID(false, (yyvsp[0].id));}
16587#line 16588 "parse.c"
16588 break;
16589
16590 case 676: /* keyword_variable: "'__FILE__'" */
16591#line 6290 "parse.y"
16592 {(yyval.id) = KWD2EID(_FILE__, (yyvsp[0].id));}
16593#line 16594 "parse.c"
16594 break;
16595
16596 case 677: /* keyword_variable: "'__LINE__'" */
16597#line 6291 "parse.y"
16598 {(yyval.id) = KWD2EID(_LINE__, (yyvsp[0].id));}
16599#line 16600 "parse.c"
16600 break;
16601
16602 case 678: /* keyword_variable: "'__ENCODING__'" */
16603#line 6292 "parse.y"
16604 {(yyval.id) = KWD2EID(_ENCODING__, (yyvsp[0].id));}
16605#line 16606 "parse.c"
16606 break;
16607
16608 case 679: /* var_ref: user_variable */
16609#line 6296 "parse.y"
16610 {
16611 if (!((yyval.node) = gettable(p, (yyvsp[0].id), &(yyloc)))) (yyval.node) = NEW_ERROR(&(yyloc));
16612 if (ifdef_ripper(id_is_var(p, (yyvsp[0].id)), false)) {
16613 /*% ripper: var_ref!($:1) %*/
16614 }
16615 else {
16616 /*% ripper: vcall!($:1) %*/
16617 }
16618 }
16619#line 16620 "parse.c"
16620 break;
16621
16622 case 680: /* var_ref: keyword_variable */
16623#line 6306 "parse.y"
16624 {
16625 if (!((yyval.node) = gettable(p, (yyvsp[0].id), &(yyloc)))) (yyval.node) = NEW_ERROR(&(yyloc));
16626 /*% ripper: var_ref!($:1) %*/
16627 }
16628#line 16629 "parse.c"
16629 break;
16630
16631 case 681: /* var_lhs: user_variable */
16632#line 6313 "parse.y"
16633 {
16634 /*% ripper: var_field!($:1) %*/
16635 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
16636 }
16637#line 16638 "parse.c"
16638 break;
16639
16640 case 682: /* var_lhs: keyword_variable */
16641#line 6313 "parse.y"
16642 {
16643 /*% ripper: var_field!($:1) %*/
16644 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
16645 }
16646#line 16647 "parse.c"
16647 break;
16648
16649 case 685: /* $@35: %empty */
16650#line 6324 "parse.y"
16651 {
16652 SET_LEX_STATE(EXPR_BEG);
16653 p->command_start = TRUE;
16654 }
16655#line 16656 "parse.c"
16656 break;
16657
16658 case 686: /* superclass: '<' $@35 expr_value term */
16659#line 6329 "parse.y"
16660 {
16661 (yyval.node) = (yyvsp[-1].node);
16662 /*% ripper: $:3 %*/
16663 }
16664#line 16665 "parse.c"
16665 break;
16666
16667 case 687: /* superclass: %empty */
16668#line 6334 "parse.y"
16669 {
16670 (yyval.node) = 0;
16671 /*% ripper: Qnil %*/
16672 }
16673#line 16674 "parse.c"
16674 break;
16675
16676 case 689: /* f_opt_paren_args: none */
16677#line 6342 "parse.y"
16678 {
16679 p->ctxt.in_argdef = 0;
16680 (yyval.node_args) = new_args_tail(p, 0, 0, 0, &(yylsp[-1]));
16681 (yyval.node_args) = new_args(p, 0, 0, 0, 0, (yyval.node_args), &(yylsp[-1]));
16682 /*% ripper: params!(Qnil, Qnil, Qnil, Qnil, Qnil, Qnil, Qnil) %*/
16683 }
16684#line 16685 "parse.c"
16685 break;
16686
16687 case 690: /* f_paren_args: '(' f_args rparen */
16688#line 6351 "parse.y"
16689 {
16690 (yyval.node_args) = (yyvsp[-1].node_args);
16691 /*% ripper: paren!($:2) %*/
16692 SET_LEX_STATE(EXPR_BEG);
16693 p->command_start = TRUE;
16694 p->ctxt.in_argdef = 0;
16695 }
16696#line 16697 "parse.c"
16697 break;
16698
16699 case 692: /* @36: %empty */
16700#line 6361 "parse.y"
16701 {
16702 (yyval.ctxt) = p->ctxt;
16703 p->ctxt.in_kwarg = 1;
16704 p->ctxt.in_argdef = 1;
16705 SET_LEX_STATE(p->lex.state|EXPR_LABEL); /* force for args */
16706 }
16707#line 16708 "parse.c"
16708 break;
16709
16710 case 693: /* f_arglist: @36 f_args term */
16711#line 6368 "parse.y"
16712 {
16713 p->ctxt.in_kwarg = (yyvsp[-2].ctxt).in_kwarg;
16714 p->ctxt.in_argdef = 0;
16715 (yyval.node_args) = (yyvsp[-1].node_args);
16716 SET_LEX_STATE(EXPR_BEG);
16717 p->command_start = TRUE;
16718 /*% ripper: $:2 %*/
16719 }
16720#line 16721 "parse.c"
16721 break;
16722
16723 case 694: /* f_kwarg_f_kw: f_kw */
16724#line 2935 "parse.y"
16725 {
16726 (yyval.node_kw_arg) = (yyvsp[0].node_kw_arg);
16727 /*% ripper: rb_ary_new3(1, $:1) %*/
16728 }
16729#line 16730 "parse.c"
16730 break;
16731
16732 case 695: /* f_kwarg_f_kw: f_kwarg_f_kw ',' f_kw */
16733#line 2940 "parse.y"
16734 {
16735 (yyval.node_kw_arg) = kwd_append((yyvsp[-2].node_kw_arg), (yyvsp[0].node_kw_arg));
16736 /*% ripper: rb_ary_push($:1, $:3) %*/
16737 }
16738#line 16739 "parse.c"
16739 break;
16740
16741 case 696: /* args_tail: f_kwarg_f_kw ',' f_kwrest opt_f_block_arg */
16742#line 6379 "parse.y"
16743 {
16744 (yyval.node_args) = new_args_tail(p, (yyvsp[-3].node_kw_arg), (yyvsp[-1].id), (yyvsp[0].id), &(yylsp[-1]));
16745 /*% ripper: [$:1, $:3, $:4] %*/
16746 }
16747#line 16748 "parse.c"
16748 break;
16749
16750 case 697: /* args_tail: f_kwarg_f_kw opt_f_block_arg */
16751#line 6384 "parse.y"
16752 {
16753 (yyval.node_args) = new_args_tail(p, (yyvsp[-1].node_kw_arg), 0, (yyvsp[0].id), &(yylsp[-1]));
16754 /*% ripper: [$:1, Qnil, $:2] %*/
16755 }
16756#line 16757 "parse.c"
16757 break;
16758
16759 case 698: /* args_tail: f_any_kwrest opt_f_block_arg */
16760#line 6389 "parse.y"
16761 {
16762 (yyval.node_args) = new_args_tail(p, 0, (yyvsp[-1].id), (yyvsp[0].id), &(yylsp[-1]));
16763 /*% ripper: [Qnil, $:1, $:2] %*/
16764 }
16765#line 16766 "parse.c"
16766 break;
16767
16768 case 699: /* args_tail: f_block_arg */
16769#line 6394 "parse.y"
16770 {
16771 (yyval.node_args) = new_args_tail(p, 0, 0, (yyvsp[0].id), &(yylsp[0]));
16772 /*% ripper: [Qnil, Qnil, $:1] %*/
16773 }
16774#line 16775 "parse.c"
16775 break;
16776
16777 case 700: /* args_tail: args_forward */
16778#line 6399 "parse.y"
16779 {
16780 ID fwd = (yyvsp[0].id);
16781 if (lambda_beginning_p() ||
16782 (p->lex.lpar_beg >= 0 && p->lex.lpar_beg+1 == p->lex.paren_nest)) {
16783 yyerror0("unexpected ... in lambda argument");
16784 fwd = 0;
16785 }
16786 else {
16787 add_forwarding_args(p);
16788 }
16789 (yyval.node_args) = new_args_tail(p, 0, fwd, arg_FWD_BLOCK, &(yylsp[0]));
16790 (yyval.node_args)->nd_ainfo.forwarding = 1;
16791 /*% ripper: [Qnil, $:1, Qnil] %*/
16792 }
16793#line 16794 "parse.c"
16794 break;
16795
16796 case 701: /* f_opt_arg_value: f_arg_asgn f_eq arg_value */
16797#line 2913 "parse.y"
16798 {
16799 p->ctxt.in_argdef = 1;
16800 (yyval.node_opt_arg) = NEW_OPT_ARG(assignable(p, (yyvsp[-2].id), (yyvsp[0].node), &(yyloc)), &(yyloc));
16801 /*% ripper: [$:$, $:3] %*/
16802 }
16803#line 16804 "parse.c"
16804 break;
16805
16806 case 702: /* f_optarg_arg_value: f_opt_arg_value */
16807#line 2922 "parse.y"
16808 {
16809 (yyval.node_opt_arg) = (yyvsp[0].node_opt_arg);
16810 /*% ripper: rb_ary_new3(1, $:1) %*/
16811 }
16812#line 16813 "parse.c"
16813 break;
16814
16815 case 703: /* f_optarg_arg_value: f_optarg_arg_value ',' f_opt_arg_value */
16816#line 2927 "parse.y"
16817 {
16818 (yyval.node_opt_arg) = opt_arg_append((yyvsp[-2].node_opt_arg), (yyvsp[0].node_opt_arg));
16819 /*% ripper: rb_ary_push($:1, $:3) %*/
16820 }
16821#line 16822 "parse.c"
16822 break;
16823
16824 case 704: /* opt_args_tail_args_tail: ',' args_tail */
16825#line 2948 "parse.y"
16826 {
16827 (yyval.node_args) = (yyvsp[0].node_args);
16828 /*% ripper: $:2 %*/
16829 }
16830#line 16831 "parse.c"
16831 break;
16832
16833 case 705: /* opt_args_tail_args_tail: %empty */
16834#line 2953 "parse.y"
16835 {
16836 (yyval.node_args) = new_args_tail(p, 0, 0, 0, &(yylsp[0]));
16837 /*% ripper: [Qnil, Qnil, Qnil] %*/
16838 }
16839#line 16840 "parse.c"
16840 break;
16841
16842 case 706: /* f_args: f_arg ',' f_optarg_arg_value ',' f_rest_arg opt_args_tail_args_tail */
16843#line 6416 "parse.y"
16844 {
16845 (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));
16846 /*% ripper: params!($:1, $:3, $:5, Qnil, *$:6[0..2]) %*/
16847 }
16848#line 16849 "parse.c"
16849 break;
16850
16851 case 707: /* f_args: f_arg ',' f_optarg_arg_value ',' f_rest_arg ',' f_arg opt_args_tail_args_tail */
16852#line 6421 "parse.y"
16853 {
16854 (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));
16855 /*% ripper: params!($:1, $:3, $:5, $:7, *$:8[0..2]) %*/
16856 }
16857#line 16858 "parse.c"
16858 break;
16859
16860 case 708: /* f_args: f_arg ',' f_optarg_arg_value opt_args_tail_args_tail */
16861#line 6426 "parse.y"
16862 {
16863 (yyval.node_args) = new_args(p, (yyvsp[-3].node_args_aux), (yyvsp[-1].node_opt_arg), 0, 0, (yyvsp[0].node_args), &(yyloc));
16864 /*% ripper: params!($:1, $:3, Qnil, Qnil, *$:4[0..2]) %*/
16865 }
16866#line 16867 "parse.c"
16867 break;
16868
16869 case 709: /* f_args: f_arg ',' f_optarg_arg_value ',' f_arg opt_args_tail_args_tail */
16870#line 6431 "parse.y"
16871 {
16872 (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));
16873 /*% ripper: params!($:1, $:3, Qnil, $:5, *$:6[0..2]) %*/
16874 }
16875#line 16876 "parse.c"
16876 break;
16877
16878 case 710: /* f_args: f_arg ',' f_rest_arg opt_args_tail_args_tail */
16879#line 6436 "parse.y"
16880 {
16881 (yyval.node_args) = new_args(p, (yyvsp[-3].node_args_aux), 0, (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
16882 /*% ripper: params!($:1, Qnil, $:3, Qnil, *$:4[0..2]) %*/
16883 }
16884#line 16885 "parse.c"
16885 break;
16886
16887 case 711: /* f_args: f_arg ',' f_rest_arg ',' f_arg opt_args_tail_args_tail */
16888#line 6441 "parse.y"
16889 {
16890 (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));
16891 /*% ripper: params!($:1, Qnil, $:3, $:5, *$:6[0..2]) %*/
16892 }
16893#line 16894 "parse.c"
16894 break;
16895
16896 case 712: /* f_args: f_arg opt_args_tail_args_tail */
16897#line 6446 "parse.y"
16898 {
16899 (yyval.node_args) = new_args(p, (yyvsp[-1].node_args_aux), 0, 0, 0, (yyvsp[0].node_args), &(yyloc));
16900 /*% ripper: params!($:1, Qnil, Qnil, Qnil, *$:2[0..2]) %*/
16901 }
16902#line 16903 "parse.c"
16903 break;
16904
16905 case 713: /* f_args: f_optarg_arg_value ',' f_rest_arg opt_args_tail_args_tail */
16906#line 6451 "parse.y"
16907 {
16908 (yyval.node_args) = new_args(p, 0, (yyvsp[-3].node_opt_arg), (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
16909 /*% ripper: params!(Qnil, $:1, $:3, Qnil, *$:4[0..2]) %*/
16910 }
16911#line 16912 "parse.c"
16912 break;
16913
16914 case 714: /* f_args: f_optarg_arg_value ',' f_rest_arg ',' f_arg opt_args_tail_args_tail */
16915#line 6456 "parse.y"
16916 {
16917 (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));
16918 /*% ripper: params!(Qnil, $:1, $:3, $:5, *$:6[0..2]) %*/
16919 }
16920#line 16921 "parse.c"
16921 break;
16922
16923 case 715: /* f_args: f_optarg_arg_value opt_args_tail_args_tail */
16924#line 6461 "parse.y"
16925 {
16926 (yyval.node_args) = new_args(p, 0, (yyvsp[-1].node_opt_arg), 0, 0, (yyvsp[0].node_args), &(yyloc));
16927 /*% ripper: params!(Qnil, $:1, Qnil, Qnil, *$:2[0..2]) %*/
16928 }
16929#line 16930 "parse.c"
16930 break;
16931
16932 case 716: /* f_args: f_optarg_arg_value ',' f_arg opt_args_tail_args_tail */
16933#line 6466 "parse.y"
16934 {
16935 (yyval.node_args) = new_args(p, 0, (yyvsp[-3].node_opt_arg), 0, (yyvsp[-1].node_args_aux), (yyvsp[0].node_args), &(yyloc));
16936 /*% ripper: params!(Qnil, $:1, Qnil, $:3, *$:4[0..2]) %*/
16937 }
16938#line 16939 "parse.c"
16939 break;
16940
16941 case 717: /* f_args: f_rest_arg opt_args_tail_args_tail */
16942#line 6471 "parse.y"
16943 {
16944 (yyval.node_args) = new_args(p, 0, 0, (yyvsp[-1].id), 0, (yyvsp[0].node_args), &(yyloc));
16945 /*% ripper: params!(Qnil, Qnil, $:1, Qnil, *$:2[0..2]) %*/
16946 }
16947#line 16948 "parse.c"
16948 break;
16949
16950 case 718: /* f_args: f_rest_arg ',' f_arg opt_args_tail_args_tail */
16951#line 6476 "parse.y"
16952 {
16953 (yyval.node_args) = new_args(p, 0, 0, (yyvsp[-3].id), (yyvsp[-1].node_args_aux), (yyvsp[0].node_args), &(yyloc));
16954 /*% ripper: params!(Qnil, Qnil, $:1, $:3, *$:4[0..2]) %*/
16955 }
16956#line 16957 "parse.c"
16957 break;
16958
16959 case 719: /* f_args: args_tail */
16960#line 6481 "parse.y"
16961 {
16962 (yyval.node_args) = new_args(p, 0, 0, 0, 0, (yyvsp[0].node_args), &(yyloc));
16963 /*% ripper: params!(Qnil, Qnil, Qnil, Qnil, *$:1[0..2]) %*/
16964 }
16965#line 16966 "parse.c"
16966 break;
16967
16968 case 720: /* f_args: %empty */
16969#line 6486 "parse.y"
16970 {
16971 (yyval.node_args) = new_args_tail(p, 0, 0, 0, &(yylsp[0]));
16972 (yyval.node_args) = new_args(p, 0, 0, 0, 0, (yyval.node_args), &(yylsp[0]));
16973 /*% ripper: params!(Qnil, Qnil, Qnil, Qnil, Qnil, Qnil, Qnil) %*/
16974 }
16975#line 16976 "parse.c"
16976 break;
16977
16978 case 721: /* args_forward: "(..." */
16979#line 6494 "parse.y"
16980 {
16981#ifdef FORWARD_ARGS_WITH_RUBY2_KEYWORDS
16982 (yyval.id) = 0;
16983#else
16984 (yyval.id) = idFWD_KWREST;
16985#endif
16986 /*% ripper: args_forward! %*/
16987 }
16988#line 16989 "parse.c"
16989 break;
16990
16991 case 722: /* f_bad_arg: "constant" */
16992#line 6505 "parse.y"
16993 {
16994 static const char mesg[] = "formal argument cannot be a constant";
16995 /*%%%*/
16996 yyerror1(&(yylsp[0]), mesg);
16997 /*% %*/
16998 (yyval.id) = 0;
16999 /*% ripper[error]: param_error!(ERR_MESG(), $:1) %*/
17000 }
17001#line 17002 "parse.c"
17002 break;
17003
17004 case 723: /* f_bad_arg: "instance variable" */
17005#line 6514 "parse.y"
17006 {
17007 static const char mesg[] = "formal argument cannot be an instance variable";
17008 /*%%%*/
17009 yyerror1(&(yylsp[0]), mesg);
17010 /*% %*/
17011 (yyval.id) = 0;
17012 /*% ripper[error]: param_error!(ERR_MESG(), $:1) %*/
17013 }
17014#line 17015 "parse.c"
17015 break;
17016
17017 case 724: /* f_bad_arg: "global variable" */
17018#line 6523 "parse.y"
17019 {
17020 static const char mesg[] = "formal argument cannot be a global variable";
17021 /*%%%*/
17022 yyerror1(&(yylsp[0]), mesg);
17023 /*% %*/
17024 (yyval.id) = 0;
17025 /*% ripper[error]: param_error!(ERR_MESG(), $:1) %*/
17026 }
17027#line 17028 "parse.c"
17028 break;
17029
17030 case 725: /* f_bad_arg: "class variable" */
17031#line 6532 "parse.y"
17032 {
17033 static const char mesg[] = "formal argument cannot be a class variable";
17034 /*%%%*/
17035 yyerror1(&(yylsp[0]), mesg);
17036 /*% %*/
17037 (yyval.id) = 0;
17038 /*% ripper[error]: param_error!(ERR_MESG(), $:1) %*/
17039 }
17040#line 17041 "parse.c"
17041 break;
17042
17043 case 727: /* f_norm_arg: "local variable or method" */
17044#line 6544 "parse.y"
17045 {
17046 VALUE e = formal_argument_error(p, (yyval.id) = (yyvsp[0].id));
17047 if (e) {
17048 /*% ripper[error]: param_error!(?e, $:1) %*/
17049 }
17050 p->max_numparam = ORDINAL_PARAM;
17051 }
17052#line 17053 "parse.c"
17053 break;
17054
17055 case 728: /* f_arg_asgn: f_norm_arg */
17056#line 6554 "parse.y"
17057 {
17058 ID id = (yyvsp[0].id);
17059 arg_var(p, id);
17060 (yyval.id) = (yyvsp[0].id);
17061 }
17062#line 17063 "parse.c"
17063 break;
17064
17065 case 729: /* f_arg_item: f_arg_asgn */
17066#line 6562 "parse.y"
17067 {
17068 (yyval.node_args_aux) = NEW_ARGS_AUX((yyvsp[0].id), 1, &NULL_LOC);
17069 /*% ripper: $:1 %*/
17070 }
17071#line 17072 "parse.c"
17072 break;
17073
17074 case 730: /* f_arg_item: "(" f_margs rparen */
17075#line 6567 "parse.y"
17076 {
17077 ID tid = internal_id(p);
17078 YYLTYPE loc;
17079 loc.beg_pos = (yylsp[-1]).beg_pos;
17080 loc.end_pos = (yylsp[-1]).beg_pos;
17081 arg_var(p, tid);
17082 if (dyna_in_block(p)) {
17083 (yyvsp[-1].node_masgn)->nd_value = NEW_DVAR(tid, &loc);
17084 }
17085 else {
17086 (yyvsp[-1].node_masgn)->nd_value = NEW_LVAR(tid, &loc);
17087 }
17088 (yyval.node_args_aux) = NEW_ARGS_AUX(tid, 1, &NULL_LOC);
17089 (yyval.node_args_aux)->nd_next = (NODE *)(yyvsp[-1].node_masgn);
17090 /*% ripper: mlhs_paren!($:2) %*/
17091 }
17092#line 17093 "parse.c"
17093 break;
17094
17095 case 732: /* f_arg: f_arg ',' f_arg_item */
17096#line 6588 "parse.y"
17097 {
17098 (yyval.node_args_aux) = (yyvsp[-2].node_args_aux);
17099 (yyval.node_args_aux)->nd_plen++;
17100 (yyval.node_args_aux)->nd_next = block_append(p, (yyval.node_args_aux)->nd_next, (yyvsp[0].node_args_aux)->nd_next);
17101 rb_discard_node(p, (NODE *)(yyvsp[0].node_args_aux));
17102 /*% ripper: rb_ary_push($:1, $:3) %*/
17103 }
17104#line 17105 "parse.c"
17105 break;
17106
17107 case 733: /* f_label: "label" */
17108#line 6599 "parse.y"
17109 {
17110 VALUE e = formal_argument_error(p, (yyval.id) = (yyvsp[0].id));
17111 if (e) {
17112 (yyval.id) = 0;
17113 /*% ripper[error]: param_error!(?e, $:1) %*/
17114 }
17115 /*
17116 * Workaround for Prism::ParseTest#test_filepath for
17117 * "unparser/corpus/literal/def.txt"
17118 *
17119 * See the discussion on https://github.com/ruby/ruby/pull/9923
17120 */
17121 arg_var(p, ifdef_ripper(0, (yyvsp[0].id)));
17122 /*% ripper: $:1 %*/
17123 p->max_numparam = ORDINAL_PARAM;
17124 p->ctxt.in_argdef = 0;
17125 }
17126#line 17127 "parse.c"
17127 break;
17128
17129 case 734: /* f_kw: f_label arg_value */
17130#line 6619 "parse.y"
17131 {
17132 p->ctxt.in_argdef = 1;
17133 (yyval.node_kw_arg) = new_kw_arg(p, assignable(p, (yyvsp[-1].id), (yyvsp[0].node), &(yyloc)), &(yyloc));
17134 /*% ripper: [$:$, $:2] %*/
17135 }
17136#line 17137 "parse.c"
17137 break;
17138
17139 case 735: /* f_kw: f_label */
17140#line 6625 "parse.y"
17141 {
17142 p->ctxt.in_argdef = 1;
17143 (yyval.node_kw_arg) = new_kw_arg(p, assignable(p, (yyvsp[0].id), NODE_SPECIAL_REQUIRED_KEYWORD, &(yyloc)), &(yyloc));
17144 /*% ripper: [$:$, 0] %*/
17145 }
17146#line 17147 "parse.c"
17147 break;
17148
17149 case 736: /* f_block_kw: f_label primary_value */
17150#line 6633 "parse.y"
17151 {
17152 p->ctxt.in_argdef = 1;
17153 (yyval.node_kw_arg) = new_kw_arg(p, assignable(p, (yyvsp[-1].id), (yyvsp[0].node), &(yyloc)), &(yyloc));
17154 /*% ripper: [$:$, $:2] %*/
17155 }
17156#line 17157 "parse.c"
17157 break;
17158
17159 case 737: /* f_block_kw: f_label */
17160#line 6639 "parse.y"
17161 {
17162 p->ctxt.in_argdef = 1;
17163 (yyval.node_kw_arg) = new_kw_arg(p, assignable(p, (yyvsp[0].id), NODE_SPECIAL_REQUIRED_KEYWORD, &(yyloc)), &(yyloc));
17164 /*% ripper: [$:$, 0] %*/
17165 }
17166#line 17167 "parse.c"
17167 break;
17168
17169 case 740: /* f_no_kwarg: p_kwnorest */
17170#line 6651 "parse.y"
17171 {
17172 /*% ripper: nokw_param!(Qnil) %*/
17173 }
17174#line 17175 "parse.c"
17175 break;
17176
17177 case 741: /* f_kwrest: kwrest_mark "local variable or method" */
17178#line 6657 "parse.y"
17179 {
17180 arg_var(p, shadowing_lvar(p, (yyvsp[0].id)));
17181 (yyval.id) = (yyvsp[0].id);
17182 /*% ripper: kwrest_param!($:2) %*/
17183 }
17184#line 17185 "parse.c"
17185 break;
17186
17187 case 742: /* f_kwrest: kwrest_mark */
17188#line 6663 "parse.y"
17189 {
17190 arg_var(p, idFWD_KWREST);
17191 (yyval.id) = idFWD_KWREST;
17192 /*% ripper: kwrest_param!(Qnil) %*/
17193 }
17194#line 17195 "parse.c"
17195 break;
17196
17197 case 745: /* f_rest_arg: restarg_mark "local variable or method" */
17198#line 6675 "parse.y"
17199 {
17200 arg_var(p, shadowing_lvar(p, (yyvsp[0].id)));
17201 (yyval.id) = (yyvsp[0].id);
17202 /*% ripper: rest_param!($:2) %*/
17203 }
17204#line 17205 "parse.c"
17205 break;
17206
17207 case 746: /* f_rest_arg: restarg_mark */
17208#line 6681 "parse.y"
17209 {
17210 arg_var(p, idFWD_REST);
17211 (yyval.id) = idFWD_REST;
17212 /*% ripper: rest_param!(Qnil) %*/
17213 }
17214#line 17215 "parse.c"
17215 break;
17216
17217 case 749: /* f_block_arg: blkarg_mark "local variable or method" */
17218#line 6693 "parse.y"
17219 {
17220 arg_var(p, shadowing_lvar(p, (yyvsp[0].id)));
17221 (yyval.id) = (yyvsp[0].id);
17222 /*% ripper: blockarg!($:2) %*/
17223 }
17224#line 17225 "parse.c"
17225 break;
17226
17227 case 750: /* f_block_arg: blkarg_mark */
17228#line 6699 "parse.y"
17229 {
17230 arg_var(p, idFWD_BLOCK);
17231 (yyval.id) = idFWD_BLOCK;
17232 /*% ripper: blockarg!(Qnil) %*/
17233 }
17234#line 17235 "parse.c"
17235 break;
17236
17237 case 751: /* opt_f_block_arg: ',' f_block_arg */
17238#line 6707 "parse.y"
17239 {
17240 (yyval.id) = (yyvsp[0].id);
17241 /*% ripper: $:2 %*/
17242 }
17243#line 17244 "parse.c"
17244 break;
17245
17246 case 752: /* opt_f_block_arg: none */
17247#line 6712 "parse.y"
17248 {
17249 (yyval.id) = 0;
17250 /*% ripper: Qnil %*/
17251 }
17252#line 17253 "parse.c"
17253 break;
17254
17255 case 753: /* singleton: var_ref */
17256#line 6719 "parse.y"
17257 {
17258 value_expr((yyvsp[0].node));
17259 (yyval.node) = (yyvsp[0].node);
17260 }
17261#line 17262 "parse.c"
17262 break;
17263
17264 case 754: /* $@37: %empty */
17265#line 6724 "parse.y"
17266 {
17267 SET_LEX_STATE(EXPR_BEG);
17268 p->ctxt.in_argdef = 0;
17269 }
17270#line 17271 "parse.c"
17271 break;
17272
17273 case 755: /* singleton: '(' $@37 expr rparen */
17274#line 6729 "parse.y"
17275 {
17276 p->ctxt.in_argdef = 1;
17277 NODE *expr = last_expr_node((yyvsp[-1].node));
17278 switch (nd_type(expr)) {
17279 case NODE_STR:
17280 case NODE_DSTR:
17281 case NODE_XSTR:
17282 case NODE_DXSTR:
17283 case NODE_REGX:
17284 case NODE_DREGX:
17285 case NODE_SYM:
17286 case NODE_LINE:
17287 case NODE_FILE:
17288 case NODE_ENCODING:
17289 case NODE_INTEGER:
17290 case NODE_FLOAT:
17291 case NODE_RATIONAL:
17292 case NODE_IMAGINARY:
17293 case NODE_DSYM:
17294 case NODE_LIST:
17295 case NODE_ZLIST:
17296 yyerror1(&expr->nd_loc, "can't define singleton method for literals");
17297 break;
17298 default:
17299 value_expr((yyvsp[-1].node));
17300 break;
17301 }
17302 (yyval.node) = (yyvsp[-1].node);
17303 /*% ripper: paren!($:3) %*/
17304 }
17305#line 17306 "parse.c"
17306 break;
17307
17308 case 757: /* assoc_list: assocs trailer */
17309#line 6763 "parse.y"
17310 {
17311 (yyval.node) = (yyvsp[-1].node);
17312 /*% ripper: assoclist_from_args!($:1) %*/
17313 }
17314#line 17315 "parse.c"
17315 break;
17316
17317 case 759: /* assocs: assocs ',' assoc */
17318#line 6772 "parse.y"
17319 {
17320 NODE *assocs = (yyvsp[-2].node);
17321 NODE *tail = (yyvsp[0].node);
17322 if (!assocs) {
17323 assocs = tail;
17324 }
17325 else if (tail) {
17326 if (RNODE_LIST(assocs)->nd_head) {
17327 NODE *n = RNODE_LIST(tail)->nd_next;
17328 if (!RNODE_LIST(tail)->nd_head && nd_type_p(n, NODE_LIST) &&
17329 nd_type_p((n = RNODE_LIST(n)->nd_head), NODE_HASH)) {
17330 /* DSTAR */
17331 tail = RNODE_HASH(n)->nd_head;
17332 }
17333 }
17334 if (tail) {
17335 assocs = list_concat(assocs, tail);
17336 }
17337 }
17338 (yyval.node) = assocs;
17339 /*% ripper: rb_ary_push($:1, $:3) %*/
17340 }
17341#line 17342 "parse.c"
17342 break;
17343
17344 case 760: /* assoc: arg_value "=>" arg_value */
17345#line 6797 "parse.y"
17346 {
17347 (yyval.node) = list_append(p, NEW_LIST((yyvsp[-2].node), &(yyloc)), (yyvsp[0].node));
17348 /*% ripper: assoc_new!($:1, $:3) %*/
17349 }
17350#line 17351 "parse.c"
17351 break;
17352
17353 case 761: /* assoc: "label" arg_value */
17354#line 6802 "parse.y"
17355 {
17356 (yyval.node) = list_append(p, NEW_LIST(NEW_SYM(rb_id2str((yyvsp[-1].id)), &(yylsp[-1])), &(yyloc)), (yyvsp[0].node));
17357 /*% ripper: assoc_new!($:1, $:2) %*/
17358 }
17359#line 17360 "parse.c"
17360 break;
17361
17362 case 762: /* assoc: "label" */
17363#line 6807 "parse.y"
17364 {
17365 NODE *val = gettable(p, (yyvsp[0].id), &(yyloc));
17366 if (!val) val = NEW_ERROR(&(yyloc));
17367 (yyval.node) = list_append(p, NEW_LIST(NEW_SYM(rb_id2str((yyvsp[0].id)), &(yylsp[0])), &(yyloc)), val);
17368 /*% ripper: assoc_new!($:1, Qnil) %*/
17369 }
17370#line 17371 "parse.c"
17371 break;
17372
17373 case 763: /* assoc: "string literal" string_contents tLABEL_END arg_value */
17374#line 6814 "parse.y"
17375 {
17376 YYLTYPE loc = code_loc_gen(&(yylsp[-3]), &(yylsp[-1]));
17377 (yyval.node) = list_append(p, NEW_LIST(dsym_node(p, (yyvsp[-2].node), &loc), &loc), (yyvsp[0].node));
17378 /*% ripper: assoc_new!(dyna_symbol!($:2), $:4) %*/
17379 }
17380#line 17381 "parse.c"
17381 break;
17382
17383 case 764: /* assoc: "**arg" arg_value */
17384#line 6820 "parse.y"
17385 {
17386 (yyval.node) = list_append(p, NEW_LIST(0, &(yyloc)), (yyvsp[0].node));
17387 /*% ripper: assoc_splat!($:2) %*/
17388 }
17389#line 17390 "parse.c"
17390 break;
17391
17392 case 765: /* assoc: "**arg" */
17393#line 6825 "parse.y"
17394 {
17395 forwarding_arg_check(p, idFWD_KWREST, idFWD_ALL, "keyword rest");
17396 (yyval.node) = list_append(p, NEW_LIST(0, &(yyloc)),
17397 NEW_LVAR(idFWD_KWREST, &(yyloc)));
17398 /*% ripper: assoc_splat!(Qnil) %*/
17399 }
17400#line 17401 "parse.c"
17401 break;
17402
17403 case 785: /* term: ';' */
17404#line 6871 "parse.y"
17405 {yyerrok;token_flush(p);}
17406#line 17407 "parse.c"
17407 break;
17408
17409 case 786: /* term: '\n' */
17410#line 6873 "parse.y"
17411 {
17412 (yyloc).end_pos = (yyloc).beg_pos;
17413 token_flush(p);
17414 }
17415#line 17416 "parse.c"
17416 break;
17417
17418 case 788: /* terms: terms ';' */
17419#line 6880 "parse.y"
17420 {yyerrok;}
17421#line 17422 "parse.c"
17422 break;
17423
17424 case 789: /* none: %empty */
17425#line 6884 "parse.y"
17426 {
17427 (yyval.node) = 0;
17428 }
17429#line 17430 "parse.c"
17430 break;
17431
17432
17433#line 17434 "parse.c"
17434
17435 default: break;
17436 }
17437 /* User semantic actions sometimes alter yychar, and that requires
17438 that yytoken be updated with the new translation. We take the
17439 approach of translating immediately before every use of yytoken.
17440 One alternative is translating here after every semantic action,
17441 but that translation would be missed if the semantic action invokes
17442 YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
17443 if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
17444 incorrect destructor might then be invoked immediately. In the
17445 case of YYERROR or YYBACKUP, subsequent parser actions might lead
17446 to an incorrect destructor call or verbose syntax error message
17447 before the lookahead is translated. */
17448 YY_SYMBOL_PRINT ("-> $$ =", YY_CAST (yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc, p);
17449
17450 YYPOPSTACK (yylen);
17451 /* %after-reduce function. */
17452#line 2661 "parse.y"
17453 {after_reduce(yylen, p);}
17454#line 17455 "parse.c"
17455
17456 yylen = 0;
17457
17458 *++yyvsp = yyval;
17459 *++yylsp = yyloc;
17460
17461 /* Now 'shift' the result of the reduction. Determine what state
17462 that goes to, based on the state we popped back to and the rule
17463 number reduced by. */
17464 {
17465 const int yylhs = yyr1[yyn] - YYNTOKENS;
17466 const int yyi = yypgoto[yylhs] + *yyssp;
17467 yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp
17468 ? yytable[yyi]
17469 : yydefgoto[yylhs]);
17470 }
17471
17472 goto yynewstate;
17473
17474
17475/*--------------------------------------.
17476| yyerrlab -- here on detecting error. |
17477`--------------------------------------*/
17478yyerrlab:
17479 /* Make sure we have latest lookahead translation. See comments at
17480 user semantic actions for why this is necessary. */
17481 yytoken = yychar == YYEMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE (yychar);
17482 /* If not already recovering from an error, report this error. */
17483 if (!yyerrstatus)
17484 {
17485 ++yynerrs;
17486 {
17487 yypcontext_t yyctx
17488 = {yyssp, yytoken, &yylloc};
17489 char const *yymsgp = YY_("syntax error");
17490 int yysyntax_error_status;
17491 yysyntax_error_status = yysyntax_error (&yymsg_alloc, &yymsg, &yyctx, p);
17492 if (yysyntax_error_status == 0)
17493 yymsgp = yymsg;
17494 else if (yysyntax_error_status == -1)
17495 {
17496 if (yymsg != yymsgbuf)
17497 YYSTACK_FREE (yymsg);
17498 yymsg = YY_CAST (char *,
17499 YYSTACK_ALLOC (YY_CAST (YYSIZE_T, yymsg_alloc)));
17500 if (yymsg)
17501 {
17502 yysyntax_error_status
17503 = yysyntax_error (&yymsg_alloc, &yymsg, &yyctx, p);
17504 yymsgp = yymsg;
17505 }
17506 else
17507 {
17508 yymsg = yymsgbuf;
17509 yymsg_alloc = sizeof yymsgbuf;
17510 yysyntax_error_status = YYENOMEM;
17511 }
17512 }
17513 yyerror (&yylloc, p, yymsgp);
17514 if (yysyntax_error_status == YYENOMEM)
17515 YYNOMEM;
17516 }
17517 }
17518
17519 yyerror_range[1] = yylloc;
17520 if (yyerrstatus == 3)
17521 {
17522 /* If just tried and failed to reuse lookahead token after an
17523 error, discard it. */
17524
17525 if (yychar <= END_OF_INPUT)
17526 {
17527 /* Return failure if at end of input. */
17528 if (yychar == END_OF_INPUT)
17529 YYABORT;
17530 }
17531 else
17532 {
17533 yydestruct ("Error: discarding",
17534 yytoken, &yylval, &yylloc, p);
17535 yychar = YYEMPTY;
17536 }
17537 }
17538
17539 /* Else will try to reuse lookahead token after shifting the error
17540 token. */
17541 goto yyerrlab1;
17542
17543
17544/*---------------------------------------------------.
17545| yyerrorlab -- error raised explicitly by YYERROR. |
17546`---------------------------------------------------*/
17547yyerrorlab:
17548 /* Pacify compilers when the user code never invokes YYERROR and the
17549 label yyerrorlab therefore never appears in user code. */
17550 if (0)
17551 YYERROR;
17552 ++yynerrs;
17553
17554 /* Do not reclaim the symbols of the rule whose action triggered
17555 this YYERROR. */
17556 YYPOPSTACK (yylen);
17557 /* %after-pop-stack function. */
17558#line 2663 "parse.y"
17559 {after_pop_stack(yylen, p);}
17560#line 17561 "parse.c"
17561
17562 yylen = 0;
17563 YY_STACK_PRINT (yyss, yyssp, p);
17564 yystate = *yyssp;
17565 goto yyerrlab1;
17566
17567
17568/*-------------------------------------------------------------.
17569| yyerrlab1 -- common code for both syntax error and YYERROR. |
17570`-------------------------------------------------------------*/
17571yyerrlab1:
17572 yyerrstatus = 3; /* Each real token shifted decrements this. */
17573
17574 /* Pop stack until we find a state that shifts the error token. */
17575 for (;;)
17576 {
17577 yyn = yypact[yystate];
17578 if (!yypact_value_is_default (yyn))
17579 {
17580 yyn += YYSYMBOL_YYerror;
17581 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror)
17582 {
17583 yyn = yytable[yyn];
17584 if (0 < yyn)
17585 break;
17586 }
17587 }
17588
17589 /* Pop the current state because it cannot handle the error token. */
17590 if (yyssp == yyss)
17591 YYABORT;
17592
17593 yyerror_range[1] = *yylsp;
17594 yydestruct ("Error: popping",
17595 YY_ACCESSING_SYMBOL (yystate), yyvsp, yylsp, p);
17596 YYPOPSTACK (1);
17597 /* %after-pop-stack function. */
17598#line 2663 "parse.y"
17599 {after_pop_stack(1, p);}
17600#line 17601 "parse.c"
17601
17602 yystate = *yyssp;
17603 YY_STACK_PRINT (yyss, yyssp, p);
17604 }
17605
17606 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
17607 *++yyvsp = yylval;
17608 YY_IGNORE_MAYBE_UNINITIALIZED_END
17609
17610 yyerror_range[2] = yylloc;
17611 ++yylsp;
17612 YYLLOC_DEFAULT (*yylsp, yyerror_range, 2);
17613
17614 /* Shift the error token. */
17615 YY_SYMBOL_PRINT ("Shifting", YY_ACCESSING_SYMBOL (yyn), yyvsp, yylsp, p);
17616 /* %after-shift-error-token code. */
17617#line 2662 "parse.y"
17618 {after_shift_error_token(p);}
17619#line 17620 "parse.c"
17620
17621
17622 yystate = yyn;
17623 goto yynewstate;
17624
17625
17626/*-------------------------------------.
17627| yyacceptlab -- YYACCEPT comes here. |
17628`-------------------------------------*/
17629yyacceptlab:
17630 yyresult = 0;
17631 goto yyreturnlab;
17632
17633
17634/*-----------------------------------.
17635| yyabortlab -- YYABORT comes here. |
17636`-----------------------------------*/
17637yyabortlab:
17638 yyresult = 1;
17639 goto yyreturnlab;
17640
17641
17642/*-----------------------------------------------------------.
17643| yyexhaustedlab -- YYNOMEM (memory exhaustion) comes here. |
17644`-----------------------------------------------------------*/
17645yyexhaustedlab:
17646 yyerror (&yylloc, p, YY_("memory exhausted"));
17647 yyresult = 2;
17648 goto yyreturnlab;
17649
17650
17651/*----------------------------------------------------------.
17652| yyreturnlab -- parsing is finished, clean up and return. |
17653`----------------------------------------------------------*/
17654yyreturnlab:
17655 if (yychar != YYEMPTY)
17656 {
17657 /* Make sure we have latest lookahead translation. See comments at
17658 user semantic actions for why this is necessary. */
17659 yytoken = YYTRANSLATE (yychar);
17660 yydestruct ("Cleanup: discarding lookahead",
17661 yytoken, &yylval, &yylloc, p);
17662 }
17663 /* Do not reclaim the symbols of the rule whose action triggered
17664 this YYABORT or YYACCEPT. */
17665 YYPOPSTACK (yylen);
17666 YY_STACK_PRINT (yyss, yyssp, p);
17667 while (yyssp != yyss)
17668 {
17669 yydestruct ("Cleanup: popping",
17670 YY_ACCESSING_SYMBOL (+*yyssp), yyvsp, yylsp, p);
17671 YYPOPSTACK (1);
17672 }
17673#ifndef yyoverflow
17674 if (yyss != yyssa)
17675 YYSTACK_FREE (yyss);
17676#endif
17677 if (yymsg != yymsgbuf)
17678 YYSTACK_FREE (yymsg);
17679 return yyresult;
17680}
17681
17682#line 6888 "parse.y"
17683
17684# undef p
17685# undef yylex
17686# undef yylval
17687# define yylval (*p->lval)
17688
17689static int regx_options(struct parser_params*);
17690static int tokadd_string(struct parser_params*,int,int,int,long*,rb_encoding**,rb_encoding**);
17691static void tokaddmbc(struct parser_params *p, int c, rb_encoding *enc);
17692static enum yytokentype parse_string(struct parser_params*,rb_strterm_literal_t*);
17693static enum yytokentype here_document(struct parser_params*,rb_strterm_heredoc_t*);
17694
17695#define set_parser_s_value(x) (ifdef_ripper(p->s_value = (x), (void)0))
17696
17697# define set_yylval_node(x) { \
17698 YYLTYPE _cur_loc; \
17699 rb_parser_set_location(p, &_cur_loc); \
17700 yylval.node = (x); \
17701 set_parser_s_value(STR_NEW(p->lex.ptok, p->lex.pcur-p->lex.ptok)); \
17702}
17703# define set_yylval_str(x) \
17704do { \
17705 set_yylval_node(NEW_STR(x, &_cur_loc)); \
17706 set_parser_s_value(rb_str_new_mutable_parser_string(x)); \
17707} while(0)
17708# define set_yylval_num(x) { \
17709 yylval.num = (x); \
17710 set_parser_s_value(x); \
17711}
17712# define set_yylval_id(x) (yylval.id = (x))
17713# define set_yylval_name(x) { \
17714 (yylval.id = (x)); \
17715 set_parser_s_value(ID2SYM(x)); \
17716}
17717# define yylval_id() (yylval.id)
17718
17719#define set_yylval_noname() set_yylval_id(keyword_nil)
17720#define has_delayed_token(p) (p->delayed.token != NULL)
17721
17722#ifndef RIPPER
17723#define literal_flush(p, ptr) ((p)->lex.ptok = (ptr))
17724#define dispatch_scan_event(p, t) parser_dispatch_scan_event(p, t, __LINE__)
17725
17726static bool
17727parser_has_token(struct parser_params *p)
17728{
17729 const char *const pcur = p->lex.pcur;
17730 const char *const ptok = p->lex.ptok;
17731 if (p->keep_tokens && (pcur < ptok)) {
17732 rb_bug("lex.pcur < lex.ptok. (line: %d) %"PRIdPTRDIFF"|%"PRIdPTRDIFF"|%"PRIdPTRDIFF"",
17733 p->ruby_sourceline, ptok - p->lex.pbeg, pcur - ptok, p->lex.pend - pcur);
17734 }
17735 return pcur > ptok;
17736}
17737
17738static const char *
17739escaped_char(int c)
17740{
17741 switch (c) {
17742 case '"': return "\\\"";
17743 case '\\': return "\\\\";
17744 case '\0': return "\\0";
17745 case '\n': return "\\n";
17746 case '\r': return "\\r";
17747 case '\t': return "\\t";
17748 case '\f': return "\\f";
17749 case '\013': return "\\v";
17750 case '\010': return "\\b";
17751 case '\007': return "\\a";
17752 case '\033': return "\\e";
17753 case '\x7f': return "\\c?";
17754 }
17755 return NULL;
17756}
17757
17758static rb_parser_string_t *
17759rb_parser_str_escape(struct parser_params *p, rb_parser_string_t *str)
17760{
17761 rb_encoding *enc = p->enc;
17762 const char *ptr = str->ptr;
17763 const char *pend = ptr + str->len;
17764 const char *prev = ptr;
17765 char charbuf[5] = {'\\', 'x', 0, 0, 0};
17766 rb_parser_string_t * result = rb_parser_string_new(p, 0, 0);
17767
17768 while (ptr < pend) {
17769 unsigned int c;
17770 const char *cc;
17771 int n = rb_enc_precise_mbclen(ptr, pend, enc);
17772 if (!MBCLEN_CHARFOUND_P(n)) {
17773 if (ptr > prev) parser_str_cat(result, prev, ptr - prev);
17774 n = rb_enc_mbminlen(enc);
17775 if (pend < ptr + n)
17776 n = (int)(pend - ptr);
17777 while (n--) {
17778 c = *ptr & 0xf0 >> 4;
17779 charbuf[2] = (c < 10) ? '0' + c : 'A' + c - 10;
17780 c = *ptr & 0x0f;
17781 charbuf[3] = (c < 10) ? '0' + c : 'A' + c - 10;
17782 parser_str_cat(result, charbuf, 4);
17783 prev = ++ptr;
17784 }
17785 continue;
17786 }
17787 n = MBCLEN_CHARFOUND_LEN(n);
17788 c = rb_enc_mbc_to_codepoint(ptr, pend, enc);
17789 ptr += n;
17790 cc = escaped_char(c);
17791 if (cc) {
17792 if (ptr - n > prev) parser_str_cat(result, prev, ptr - n - prev);
17793 parser_str_cat_cstr(result, cc);
17794 prev = ptr;
17795 }
17796 else if (rb_enc_isascii(c, enc) && ISPRINT(c)) {
17797 }
17798 else {
17799 if (ptr - n > prev) {
17800 parser_str_cat(result, prev, ptr - n - prev);
17801 prev = ptr - n;
17802 }
17803 parser_str_cat(result, prev, ptr - prev);
17804 prev = ptr;
17805 }
17806 }
17807 if (ptr > prev) parser_str_cat(result, prev, ptr - prev);
17808
17809 return result;
17810}
17811
17812static void
17813parser_append_tokens(struct parser_params *p, rb_parser_string_t *str, enum yytokentype t, int line)
17814{
17815 rb_parser_ast_token_t *token = xcalloc(1, sizeof(rb_parser_ast_token_t));
17816 token->id = p->token_id;
17817 token->type_name = parser_token2char(p, t);
17818 token->str = str;
17819 token->loc.beg_pos = p->yylloc->beg_pos;
17820 token->loc.end_pos = p->yylloc->end_pos;
17821 rb_parser_ary_push_ast_token(p, p->tokens, token);
17822 p->token_id++;
17823
17824 if (p->debug) {
17825 rb_parser_string_t *str_escaped = rb_parser_str_escape(p, str);
17826 rb_parser_printf(p, "Append tokens (line: %d) [%d, :%s, \"%s\", [%d, %d, %d, %d]]\n",
17827 line, token->id, token->type_name, str_escaped->ptr,
17828 token->loc.beg_pos.lineno, token->loc.beg_pos.column,
17829 token->loc.end_pos.lineno, token->loc.end_pos.column);
17830 rb_parser_string_free(p, str_escaped);
17831 }
17832}
17833
17834static void
17835parser_dispatch_scan_event(struct parser_params *p, enum yytokentype t, int line)
17836{
17837 debug_token_line(p, "parser_dispatch_scan_event", line);
17838
17839 if (!parser_has_token(p)) return;
17840
17841 RUBY_SET_YYLLOC(*p->yylloc);
17842
17843 if (p->keep_tokens) {
17844 rb_parser_string_t *str = rb_parser_encoding_string_new(p, p->lex.ptok, p->lex.pcur - p->lex.ptok, p->enc);
17845 parser_append_tokens(p, str, t, line);
17846 }
17847
17848 token_flush(p);
17849}
17850
17851#define dispatch_delayed_token(p, t) parser_dispatch_delayed_token(p, t, __LINE__)
17852static void
17853parser_dispatch_delayed_token(struct parser_params *p, enum yytokentype t, int line)
17854{
17855 debug_token_line(p, "parser_dispatch_delayed_token", line);
17856
17857 if (!has_delayed_token(p)) return;
17858
17859 RUBY_SET_YYLLOC_OF_DELAYED_TOKEN(*p->yylloc);
17860
17861 if (p->keep_tokens) {
17862 /* p->delayed.token is freed by rb_parser_tokens_free */
17863 parser_append_tokens(p, p->delayed.token, t, line);
17864 } else {
17865 rb_parser_string_free(p, p->delayed.token);
17866 }
17867
17868 p->delayed.token = NULL;
17869}
17870#else
17871#define literal_flush(p, ptr) ((void)(ptr))
17872
17873static int
17874ripper_has_scan_event(struct parser_params *p)
17875{
17876 if (p->lex.pcur < p->lex.ptok) rb_raise(rb_eRuntimeError, "lex.pcur < lex.ptok");
17877 return p->lex.pcur > p->lex.ptok;
17878}
17879
17880static VALUE
17881ripper_scan_event_val(struct parser_params *p, enum yytokentype t)
17882{
17883 VALUE str = STR_NEW(p->lex.ptok, p->lex.pcur - p->lex.ptok);
17884 VALUE rval = ripper_dispatch1(p, ripper_token2eventid(t), str);
17885 RUBY_SET_YYLLOC(*p->yylloc);
17886 token_flush(p);
17887 return rval;
17888}
17889
17890static void
17891ripper_dispatch_scan_event(struct parser_params *p, enum yytokentype t)
17892{
17893 if (!ripper_has_scan_event(p)) return;
17894
17895 set_parser_s_value(ripper_scan_event_val(p, t));
17896}
17897#define dispatch_scan_event(p, t) ripper_dispatch_scan_event(p, t)
17898
17899static void
17900ripper_dispatch_delayed_token(struct parser_params *p, enum yytokentype t)
17901{
17902 /* save and adjust the location to delayed token for callbacks */
17903 int saved_line = p->ruby_sourceline;
17904 const char *saved_tokp = p->lex.ptok;
17905 VALUE s_value, str;
17906
17907 if (!has_delayed_token(p)) return;
17908 p->ruby_sourceline = p->delayed.beg_line;
17909 p->lex.ptok = p->lex.pbeg + p->delayed.beg_col;
17910 str = rb_str_new_mutable_parser_string(p->delayed.token);
17911 rb_parser_string_free(p, p->delayed.token);
17912 s_value = ripper_dispatch1(p, ripper_token2eventid(t), str);
17913 set_parser_s_value(s_value);
17914 p->delayed.token = NULL;
17915 p->ruby_sourceline = saved_line;
17916 p->lex.ptok = saved_tokp;
17917}
17918#define dispatch_delayed_token(p, t) ripper_dispatch_delayed_token(p, t)
17919#endif /* RIPPER */
17920
17921static inline int
17922is_identchar(struct parser_params *p, const char *ptr, const char *MAYBE_UNUSED(ptr_end), rb_encoding *enc)
17923{
17924 return rb_enc_isalnum((unsigned char)*ptr, enc) || *ptr == '_' || !ISASCII(*ptr);
17925}
17926
17927static inline int
17928parser_is_identchar(struct parser_params *p)
17929{
17930 return !(p)->eofp && is_identchar(p, p->lex.pcur-1, p->lex.pend, p->enc);
17931}
17932
17933static inline int
17934parser_isascii(struct parser_params *p)
17935{
17936 return ISASCII(*(p->lex.pcur-1));
17937}
17938
17939static void
17940token_info_setup(token_info *ptinfo, const char *ptr, const rb_code_location_t *loc)
17941{
17942 int column = 1, nonspc = 0, i;
17943 for (i = 0; i < loc->beg_pos.column; i++, ptr++) {
17944 if (*ptr == '\t') {
17945 column = (((column - 1) / TAB_WIDTH) + 1) * TAB_WIDTH;
17946 }
17947 column++;
17948 if (*ptr != ' ' && *ptr != '\t') {
17949 nonspc = 1;
17950 }
17951 }
17952
17953 ptinfo->beg = loc->beg_pos;
17954 ptinfo->indent = column;
17955 ptinfo->nonspc = nonspc;
17956}
17957
17958static void
17959token_info_push(struct parser_params *p, const char *token, const rb_code_location_t *loc)
17960{
17961 token_info *ptinfo;
17962
17963 if (!p->token_info_enabled) return;
17964 ptinfo = ALLOC(token_info);
17965 ptinfo->token = token;
17966 ptinfo->next = p->token_info;
17967 token_info_setup(ptinfo, p->lex.pbeg, loc);
17968
17969 p->token_info = ptinfo;
17970}
17971
17972static void
17973token_info_pop(struct parser_params *p, const char *token, const rb_code_location_t *loc)
17974{
17975 token_info *ptinfo_beg = p->token_info;
17976
17977 if (!ptinfo_beg) return;
17978
17979 /* indentation check of matched keywords (begin..end, if..end, etc.) */
17980 token_info_warn(p, token, ptinfo_beg, 1, loc);
17981
17982 p->token_info = ptinfo_beg->next;
17983 ruby_sized_xfree(ptinfo_beg, sizeof(*ptinfo_beg));
17984}
17985
17986static void
17987token_info_drop(struct parser_params *p, const char *token, rb_code_position_t beg_pos)
17988{
17989 token_info *ptinfo_beg = p->token_info;
17990
17991 if (!ptinfo_beg) return;
17992 p->token_info = ptinfo_beg->next;
17993
17994 if (ptinfo_beg->beg.lineno != beg_pos.lineno ||
17995 ptinfo_beg->beg.column != beg_pos.column ||
17996 strcmp(ptinfo_beg->token, token)) {
17997 compile_error(p, "token position mismatch: %d:%d:%s expected but %d:%d:%s",
17998 beg_pos.lineno, beg_pos.column, token,
17999 ptinfo_beg->beg.lineno, ptinfo_beg->beg.column,
18000 ptinfo_beg->token);
18001 }
18002
18003 ruby_sized_xfree(ptinfo_beg, sizeof(*ptinfo_beg));
18004}
18005
18006static void
18007token_info_warn(struct parser_params *p, const char *token, token_info *ptinfo_beg, int same, const rb_code_location_t *loc)
18008{
18009 token_info ptinfo_end_body, *ptinfo_end = &ptinfo_end_body;
18010 if (!p->token_info_enabled) return;
18011 if (!ptinfo_beg) return;
18012 token_info_setup(ptinfo_end, p->lex.pbeg, loc);
18013 if (ptinfo_beg->beg.lineno == ptinfo_end->beg.lineno) return; /* ignore one-line block */
18014 if (ptinfo_beg->nonspc || ptinfo_end->nonspc) return; /* ignore keyword in the middle of a line */
18015 if (ptinfo_beg->indent == ptinfo_end->indent) return; /* the indents are matched */
18016 if (!same && ptinfo_beg->indent < ptinfo_end->indent) return;
18017 rb_warn3L(ptinfo_end->beg.lineno,
18018 "mismatched indentations at '%s' with '%s' at %d",
18019 WARN_S(token), WARN_S(ptinfo_beg->token), WARN_I(ptinfo_beg->beg.lineno));
18020}
18021
18022static int
18023parser_precise_mbclen(struct parser_params *p, const char *ptr)
18024{
18025 int len = rb_enc_precise_mbclen(ptr, p->lex.pend, p->enc);
18026 if (!MBCLEN_CHARFOUND_P(len)) {
18027 compile_error(p, "invalid multibyte char (%s)", rb_enc_name(p->enc));
18028 return -1;
18029 }
18030 return len;
18031}
18032
18033#ifndef RIPPER
18034static inline void
18035parser_show_error_line(struct parser_params *p, const YYLTYPE *yylloc)
18036{
18037 rb_parser_string_t *str;
18038 int lineno = p->ruby_sourceline;
18039 if (!yylloc) {
18040 return;
18041 }
18042 else if (yylloc->beg_pos.lineno == lineno) {
18043 str = p->lex.lastline;
18044 }
18045 else {
18046 return;
18047 }
18048 ruby_show_error_line(p, p->error_buffer, yylloc, lineno, str);
18049}
18050
18051static int
18052parser_yyerror(struct parser_params *p, const rb_code_location_t *yylloc, const char *msg)
18053{
18054#if 0
18055 YYLTYPE current;
18056
18057 if (!yylloc) {
18058 yylloc = RUBY_SET_YYLLOC(current);
18059 }
18060 else if ((p->ruby_sourceline != yylloc->beg_pos.lineno &&
18061 p->ruby_sourceline != yylloc->end_pos.lineno)) {
18062 yylloc = 0;
18063 }
18064#endif
18065 parser_compile_error(p, yylloc, "%s", msg);
18066 parser_show_error_line(p, yylloc);
18067 return 0;
18068}
18069
18070static int
18071parser_yyerror0(struct parser_params *p, const char *msg)
18072{
18073 YYLTYPE current;
18074 return parser_yyerror(p, RUBY_SET_YYLLOC(current), msg);
18075}
18076
18077void
18078ruby_show_error_line(struct parser_params *p, VALUE errbuf, const YYLTYPE *yylloc, int lineno, rb_parser_string_t *str)
18079{
18080 VALUE mesg;
18081 const int max_line_margin = 30;
18082 const char *ptr, *ptr_end, *pt, *pb;
18083 const char *pre = "", *post = "", *pend;
18084 const char *code = "", *caret = "";
18085 const char *lim;
18086 const char *const pbeg = PARSER_STRING_PTR(str);
18087 char *buf;
18088 long len;
18089 int i;
18090
18091 if (!yylloc) return;
18092 pend = rb_parser_string_end(str);
18093 if (pend > pbeg && pend[-1] == '\n') {
18094 if (--pend > pbeg && pend[-1] == '\r') --pend;
18095 }
18096
18097 pt = pend;
18098 if (lineno == yylloc->end_pos.lineno &&
18099 (pend - pbeg) > yylloc->end_pos.column) {
18100 pt = pbeg + yylloc->end_pos.column;
18101 }
18102
18103 ptr = ptr_end = pt;
18104 lim = ptr - pbeg > max_line_margin ? ptr - max_line_margin : pbeg;
18105 while ((lim < ptr) && (*(ptr-1) != '\n')) ptr--;
18106
18107 lim = pend - ptr_end > max_line_margin ? ptr_end + max_line_margin : pend;
18108 while ((ptr_end < lim) && (*ptr_end != '\n') && (*ptr_end != '\r')) ptr_end++;
18109
18110 len = ptr_end - ptr;
18111 if (len > 4) {
18112 if (ptr > pbeg) {
18113 ptr = rb_enc_prev_char(pbeg, ptr, pt, rb_parser_str_get_encoding(str));
18114 if (ptr > pbeg) pre = "...";
18115 }
18116 if (ptr_end < pend) {
18117 ptr_end = rb_enc_prev_char(pt, ptr_end, pend, rb_parser_str_get_encoding(str));
18118 if (ptr_end < pend) post = "...";
18119 }
18120 }
18121 pb = pbeg;
18122 if (lineno == yylloc->beg_pos.lineno) {
18123 pb += yylloc->beg_pos.column;
18124 if (pb > pt) pb = pt;
18125 }
18126 if (pb < ptr) pb = ptr;
18127 if (len <= 4 && yylloc->beg_pos.lineno == yylloc->end_pos.lineno) {
18128 return;
18129 }
18130 if (RTEST(errbuf)) {
18131 mesg = rb_attr_get(errbuf, idMesg);
18132 if (char_at_end(p, mesg, '\n') != '\n')
18133 rb_str_cat_cstr(mesg, "\n");
18134 }
18135 else {
18136 mesg = rb_enc_str_new(0, 0, rb_parser_str_get_encoding(str));
18137 }
18138 if (!errbuf && rb_stderr_tty_p()) {
18139#define CSI_BEGIN "\033["
18140#define CSI_SGR "m"
18141 rb_str_catf(mesg,
18142 CSI_BEGIN""CSI_SGR"%s" /* pre */
18143 CSI_BEGIN"1"CSI_SGR"%.*s"
18144 CSI_BEGIN"1;4"CSI_SGR"%.*s"
18145 CSI_BEGIN";1"CSI_SGR"%.*s"
18146 CSI_BEGIN""CSI_SGR"%s" /* post */
18147 "\n",
18148 pre,
18149 (int)(pb - ptr), ptr,
18150 (int)(pt - pb), pb,
18151 (int)(ptr_end - pt), pt,
18152 post);
18153 }
18154 else {
18155 char *p2;
18156
18157 len = ptr_end - ptr;
18158 lim = pt < pend ? pt : pend;
18159 i = (int)(lim - ptr);
18160 buf = ALLOCA_N(char, i+2);
18161 code = ptr;
18162 caret = p2 = buf;
18163 if (ptr <= pb) {
18164 while (ptr < pb) {
18165 *p2++ = *ptr++ == '\t' ? '\t' : ' ';
18166 }
18167 *p2++ = '^';
18168 ptr++;
18169 }
18170 if (lim > ptr) {
18171 memset(p2, '~', (lim - ptr));
18172 p2 += (lim - ptr);
18173 }
18174 *p2 = '\0';
18175 rb_str_catf(mesg, "%s%.*s%s\n""%s%s\n",
18176 pre, (int)len, code, post,
18177 pre, caret);
18178 }
18179 if (!errbuf) rb_write_error_str(mesg);
18180}
18181#else
18182
18183static int
18184parser_yyerror(struct parser_params *p, const YYLTYPE *yylloc, const char *msg)
18185{
18186 const char *pcur = 0, *ptok = 0;
18187 if (p->ruby_sourceline == yylloc->beg_pos.lineno &&
18188 p->ruby_sourceline == yylloc->end_pos.lineno) {
18189 pcur = p->lex.pcur;
18190 ptok = p->lex.ptok;
18191 p->lex.ptok = p->lex.pbeg + yylloc->beg_pos.column;
18192 p->lex.pcur = p->lex.pbeg + yylloc->end_pos.column;
18193 }
18194 parser_yyerror0(p, msg);
18195 if (pcur) {
18196 p->lex.ptok = ptok;
18197 p->lex.pcur = pcur;
18198 }
18199 return 0;
18200}
18201
18202static int
18203parser_yyerror0(struct parser_params *p, const char *msg)
18204{
18205 dispatch1(parse_error, STR_NEW2(msg));
18206 ripper_error(p);
18207 return 0;
18208}
18209
18210static inline void
18211parser_show_error_line(struct parser_params *p, const YYLTYPE *yylloc)
18212{
18213}
18214#endif /* !RIPPER */
18215
18216static int
18217vtable_size(const struct vtable *tbl)
18218{
18219 if (!DVARS_TERMINAL_P(tbl)) {
18220 return tbl->pos;
18221 }
18222 else {
18223 return 0;
18224 }
18225}
18226
18227static struct vtable *
18228vtable_alloc_gen(struct parser_params *p, int line, struct vtable *prev)
18229{
18230 struct vtable *tbl = ALLOC(struct vtable);
18231 tbl->pos = 0;
18232 tbl->capa = 8;
18233 tbl->tbl = ALLOC_N(ID, tbl->capa);
18234 tbl->prev = prev;
18235#ifndef RIPPER
18236 if (p->debug) {
18237 rb_parser_printf(p, "vtable_alloc:%d: %p\n", line, (void *)tbl);
18238 }
18239#endif
18240 return tbl;
18241}
18242#define vtable_alloc(prev) vtable_alloc_gen(p, __LINE__, prev)
18243
18244static void
18245vtable_free_gen(struct parser_params *p, int line, const char *name,
18246 struct vtable *tbl)
18247{
18248#ifndef RIPPER
18249 if (p->debug) {
18250 rb_parser_printf(p, "vtable_free:%d: %s(%p)\n", line, name, (void *)tbl);
18251 }
18252#endif
18253 if (!DVARS_TERMINAL_P(tbl)) {
18254 if (tbl->tbl) {
18255 ruby_sized_xfree(tbl->tbl, tbl->capa * sizeof(ID));
18256 }
18257 ruby_sized_xfree(tbl, sizeof(*tbl));
18258 }
18259}
18260#define vtable_free(tbl) vtable_free_gen(p, __LINE__, #tbl, tbl)
18261
18262static void
18263vtable_add_gen(struct parser_params *p, int line, const char *name,
18264 struct vtable *tbl, ID id)
18265{
18266#ifndef RIPPER
18267 if (p->debug) {
18268 rb_parser_printf(p, "vtable_add:%d: %s(%p), %s\n",
18269 line, name, (void *)tbl, rb_id2name(id));
18270 }
18271#endif
18272 if (DVARS_TERMINAL_P(tbl)) {
18273 rb_parser_fatal(p, "vtable_add: vtable is not allocated (%p)", (void *)tbl);
18274 return;
18275 }
18276 if (tbl->pos == tbl->capa) {
18277 tbl->capa = tbl->capa * 2;
18278 SIZED_REALLOC_N(tbl->tbl, ID, tbl->capa, tbl->pos);
18279 }
18280 tbl->tbl[tbl->pos++] = id;
18281}
18282#define vtable_add(tbl, id) vtable_add_gen(p, __LINE__, #tbl, tbl, id)
18283
18284static void
18285vtable_pop_gen(struct parser_params *p, int line, const char *name,
18286 struct vtable *tbl, int n)
18287{
18288 if (p->debug) {
18289 rb_parser_printf(p, "vtable_pop:%d: %s(%p), %d\n",
18290 line, name, (void *)tbl, n);
18291 }
18292 if (tbl->pos < n) {
18293 rb_parser_fatal(p, "vtable_pop: unreachable (%d < %d)", tbl->pos, n);
18294 return;
18295 }
18296 tbl->pos -= n;
18297}
18298#define vtable_pop(tbl, n) vtable_pop_gen(p, __LINE__, #tbl, tbl, n)
18299
18300static int
18301vtable_included(const struct vtable * tbl, ID id)
18302{
18303 int i;
18304
18305 if (!DVARS_TERMINAL_P(tbl)) {
18306 for (i = 0; i < tbl->pos; i++) {
18307 if (tbl->tbl[i] == id) {
18308 return i+1;
18309 }
18310 }
18311 }
18312 return 0;
18313}
18314
18315static void parser_prepare(struct parser_params *p);
18316
18317static int
18318e_option_supplied(struct parser_params *p)
18319{
18320 return strcmp(p->ruby_sourcefile, "-e") == 0;
18321}
18322
18323#ifndef RIPPER
18324static NODE *parser_append_options(struct parser_params *p, NODE *node);
18325
18326static VALUE
18327yycompile0(VALUE arg)
18328{
18329 int n;
18330 NODE *tree;
18331 struct parser_params *p = (struct parser_params *)arg;
18332 int cov = FALSE;
18333
18334 if (!compile_for_eval && !NIL_P(p->ruby_sourcefile_string) && !e_option_supplied(p)) {
18335 cov = TRUE;
18336 }
18337
18338 if (p->debug_lines) {
18339 p->ast->body.script_lines = p->debug_lines;
18340 }
18341
18342 parser_prepare(p);
18343#define RUBY_DTRACE_PARSE_HOOK(name) \
18344 if (RUBY_DTRACE_PARSE_##name##_ENABLED()) { \
18345 RUBY_DTRACE_PARSE_##name(p->ruby_sourcefile, p->ruby_sourceline); \
18346 }
18347 RUBY_DTRACE_PARSE_HOOK(BEGIN);
18348 n = yyparse(p);
18349 RUBY_DTRACE_PARSE_HOOK(END);
18350
18351 p->debug_lines = 0;
18352
18353 xfree(p->lex.strterm);
18354 p->lex.strterm = 0;
18355 p->lex.pcur = p->lex.pbeg = p->lex.pend = 0;
18356 if (n || p->error_p) {
18357 VALUE mesg = p->error_buffer;
18358 if (!mesg) {
18359 mesg = syntax_error_new();
18360 }
18361 if (!p->error_tolerant) {
18362 rb_set_errinfo(mesg);
18363 return FALSE;
18364 }
18365 }
18366 tree = p->eval_tree;
18367 if (!tree) {
18368 tree = NEW_NIL(&NULL_LOC);
18369 }
18370 else {
18371 rb_parser_ary_t *tokens = p->tokens;
18372 NODE *prelude;
18373 NODE *body = parser_append_options(p, RNODE_SCOPE(tree)->nd_body);
18374 prelude = block_append(p, p->eval_tree_begin, body);
18375 RNODE_SCOPE(tree)->nd_body = prelude;
18376 p->ast->body.frozen_string_literal = p->frozen_string_literal;
18377 p->ast->body.coverage_enabled = cov;
18378 if (p->keep_tokens) {
18379 p->ast->node_buffer->tokens = tokens;
18380 p->tokens = NULL;
18381 }
18382 }
18383 p->ast->body.root = tree;
18384 p->ast->body.line_count = p->line_count;
18385 return TRUE;
18386}
18387
18388static rb_ast_t *
18389yycompile(struct parser_params *p, VALUE fname, int line)
18390{
18391 rb_ast_t *ast;
18392 if (NIL_P(fname)) {
18393 p->ruby_sourcefile_string = Qnil;
18394 p->ruby_sourcefile = "(none)";
18395 }
18396 else {
18397 p->ruby_sourcefile_string = rb_str_to_interned_str(fname);
18398 p->ruby_sourcefile = StringValueCStr(fname);
18399 }
18400 p->ruby_sourceline = line - 1;
18401
18402 p->lvtbl = NULL;
18403
18404 p->ast = ast = rb_ast_new();
18405 compile_callback(yycompile0, (VALUE)p);
18406 p->ast = 0;
18407
18408 while (p->lvtbl) {
18409 local_pop(p);
18410 }
18411
18412 return ast;
18413}
18414#endif /* !RIPPER */
18415
18416static rb_encoding *
18417must_be_ascii_compatible(struct parser_params *p, rb_parser_string_t *s)
18418{
18419 rb_encoding *enc = rb_parser_str_get_encoding(s);
18420 if (!rb_enc_asciicompat(enc)) {
18421 rb_raise(rb_eArgError, "invalid source encoding");
18422 }
18423 return enc;
18424}
18425
18426static rb_parser_string_t *
18427lex_getline(struct parser_params *p)
18428{
18429 rb_parser_string_t *line = (*p->lex.gets)(p, p->lex.input, p->line_count);
18430 if (!line) return 0;
18431 p->line_count++;
18432 string_buffer_append(p, line);
18433 must_be_ascii_compatible(p, line);
18434 return line;
18435}
18436
18437#ifndef RIPPER
18438rb_ast_t*
18439rb_parser_compile(rb_parser_t *p, rb_parser_lex_gets_func *gets, VALUE fname, rb_parser_input_data input, int line)
18440{
18441 p->lex.gets = gets;
18442 p->lex.input = input;
18443 p->lex.pbeg = p->lex.pcur = p->lex.pend = 0;
18444
18445 return yycompile(p, fname, line);
18446}
18447#endif /* !RIPPER */
18448
18449#define STR_FUNC_ESCAPE 0x01
18450#define STR_FUNC_EXPAND 0x02
18451#define STR_FUNC_REGEXP 0x04
18452#define STR_FUNC_QWORDS 0x08
18453#define STR_FUNC_SYMBOL 0x10
18454#define STR_FUNC_INDENT 0x20
18455#define STR_FUNC_LABEL 0x40
18456#define STR_FUNC_LIST 0x4000
18457#define STR_FUNC_TERM 0x8000
18458
18459enum string_type {
18460 str_label = STR_FUNC_LABEL,
18461 str_squote = (0),
18462 str_dquote = (STR_FUNC_EXPAND),
18463 str_xquote = (STR_FUNC_EXPAND),
18464 str_regexp = (STR_FUNC_REGEXP|STR_FUNC_ESCAPE|STR_FUNC_EXPAND),
18465 str_sword = (STR_FUNC_QWORDS|STR_FUNC_LIST),
18466 str_dword = (STR_FUNC_QWORDS|STR_FUNC_EXPAND|STR_FUNC_LIST),
18467 str_ssym = (STR_FUNC_SYMBOL),
18468 str_dsym = (STR_FUNC_SYMBOL|STR_FUNC_EXPAND)
18469};
18470
18471static rb_parser_string_t *
18472parser_str_new(struct parser_params *p, const char *ptr, long len, rb_encoding *enc, int func, rb_encoding *enc0)
18473{
18474 rb_parser_string_t *pstr;
18475
18476 pstr = rb_parser_encoding_string_new(p, ptr, len, enc);
18477
18478 if (!(func & STR_FUNC_REGEXP)) {
18479 if (rb_parser_is_ascii_string(p, pstr)) {
18480 }
18481 else if (rb_is_usascii_enc((void *)enc0) && enc != rb_utf8_encoding()) {
18482 /* everything is valid in ASCII-8BIT */
18483 enc = rb_ascii8bit_encoding();
18484 PARSER_ENCODING_CODERANGE_SET(pstr, enc, RB_PARSER_ENC_CODERANGE_VALID);
18485 }
18486 }
18487
18488 return pstr;
18489}
18490
18491static int
18492strterm_is_heredoc(rb_strterm_t *strterm)
18493{
18494 return strterm->heredoc;
18495}
18496
18497static rb_strterm_t *
18498new_strterm(struct parser_params *p, int func, int term, int paren)
18499{
18500 rb_strterm_t *strterm = ZALLOC(rb_strterm_t);
18501 strterm->u.literal.func = func;
18502 strterm->u.literal.term = term;
18503 strterm->u.literal.paren = paren;
18504 return strterm;
18505}
18506
18507static rb_strterm_t *
18508new_heredoc(struct parser_params *p)
18509{
18510 rb_strterm_t *strterm = ZALLOC(rb_strterm_t);
18511 strterm->heredoc = true;
18512 return strterm;
18513}
18514
18515#define peek(p,c) peek_n(p, (c), 0)
18516#define peek_n(p,c,n) (!lex_eol_n_p(p, n) && (c) == (unsigned char)(p)->lex.pcur[n])
18517#define peekc(p) peekc_n(p, 0)
18518#define peekc_n(p,n) (lex_eol_n_p(p, n) ? -1 : (unsigned char)(p)->lex.pcur[n])
18519
18520#define add_delayed_token(p, tok, end) parser_add_delayed_token(p, tok, end, __LINE__)
18521static void
18522parser_add_delayed_token(struct parser_params *p, const char *tok, const char *end, int line)
18523{
18524 debug_token_line(p, "add_delayed_token", line);
18525
18526 if (tok < end) {
18527 if (has_delayed_token(p)) {
18528 bool next_line = parser_string_char_at_end(p, p->delayed.token, 0) == '\n';
18529 int end_line = (next_line ? 1 : 0) + p->delayed.end_line;
18530 int end_col = (next_line ? 0 : p->delayed.end_col);
18531 if (end_line != p->ruby_sourceline || end_col != tok - p->lex.pbeg) {
18532 dispatch_delayed_token(p, tSTRING_CONTENT);
18533 }
18534 }
18535 if (!has_delayed_token(p)) {
18536 p->delayed.token = rb_parser_string_new(p, 0, 0);
18537 rb_parser_enc_associate(p, p->delayed.token, p->enc);
18538 p->delayed.beg_line = p->ruby_sourceline;
18539 p->delayed.beg_col = rb_long2int(tok - p->lex.pbeg);
18540 }
18541 parser_str_cat(p->delayed.token, tok, end - tok);
18542 p->delayed.end_line = p->ruby_sourceline;
18543 p->delayed.end_col = rb_long2int(end - p->lex.pbeg);
18544 p->lex.ptok = end;
18545 }
18546}
18547
18548static void
18549set_lastline(struct parser_params *p, rb_parser_string_t *str)
18550{
18551 p->lex.pbeg = p->lex.pcur = PARSER_STRING_PTR(str);
18552 p->lex.pend = p->lex.pcur + PARSER_STRING_LEN(str);
18553 p->lex.lastline = str;
18554}
18555
18556static int
18557nextline(struct parser_params *p, int set_encoding)
18558{
18559 rb_parser_string_t *str = p->lex.nextline;
18560 p->lex.nextline = 0;
18561 if (!str) {
18562 if (p->eofp)
18563 return -1;
18564
18565 if (!lex_eol_ptr_p(p, p->lex.pbeg) && *(p->lex.pend-1) != '\n') {
18566 goto end_of_input;
18567 }
18568
18569 if (!p->lex.input || !(str = lex_getline(p))) {
18570 end_of_input:
18571 p->eofp = 1;
18572 lex_goto_eol(p);
18573 return -1;
18574 }
18575#ifndef RIPPER
18576 if (p->debug_lines) {
18577 if (set_encoding) rb_parser_enc_associate(p, str, p->enc);
18578 rb_parser_string_t *copy = rb_parser_string_deep_copy(p, str);
18579 rb_parser_ary_push_script_line(p, p->debug_lines, copy);
18580 }
18581#endif
18582 p->cr_seen = FALSE;
18583 }
18584 else if (str == AFTER_HEREDOC_WITHOUT_TERMINTOR) {
18585 /* after here-document without terminator */
18586 goto end_of_input;
18587 }
18588 add_delayed_token(p, p->lex.ptok, p->lex.pend);
18589 if (p->heredoc_end > 0) {
18590 p->ruby_sourceline = p->heredoc_end;
18591 p->heredoc_end = 0;
18592 }
18593 p->ruby_sourceline++;
18594 set_lastline(p, str);
18595 token_flush(p);
18596 return 0;
18597}
18598
18599static int
18600parser_cr(struct parser_params *p, int c)
18601{
18602 if (peek(p, '\n')) {
18603 p->lex.pcur++;
18604 c = '\n';
18605 }
18606 return c;
18607}
18608
18609static inline int
18610nextc0(struct parser_params *p, int set_encoding)
18611{
18612 int c;
18613
18614 if (UNLIKELY(lex_eol_p(p) || p->eofp || p->lex.nextline > AFTER_HEREDOC_WITHOUT_TERMINTOR)) {
18615 if (nextline(p, set_encoding)) return -1;
18616 }
18617 c = (unsigned char)*p->lex.pcur++;
18618 if (UNLIKELY(c == '\r')) {
18619 c = parser_cr(p, c);
18620 }
18621
18622 return c;
18623}
18624#define nextc(p) nextc0(p, TRUE)
18625
18626static void
18627pushback(struct parser_params *p, int c)
18628{
18629 if (c == -1) return;
18630 p->eofp = 0;
18631 p->lex.pcur--;
18632 if (p->lex.pcur > p->lex.pbeg && p->lex.pcur[0] == '\n' && p->lex.pcur[-1] == '\r') {
18633 p->lex.pcur--;
18634 }
18635}
18636
18637#define was_bol(p) ((p)->lex.pcur == (p)->lex.pbeg + 1)
18638
18639#define tokfix(p) ((p)->tokenbuf[(p)->tokidx]='\0')
18640#define tok(p) (p)->tokenbuf
18641#define toklen(p) (p)->tokidx
18642
18643static int
18644looking_at_eol_p(struct parser_params *p)
18645{
18646 const char *ptr = p->lex.pcur;
18647 while (!lex_eol_ptr_p(p, ptr)) {
18648 int c = (unsigned char)*ptr++;
18649 int eol = (c == '\n' || c == '#');
18650 if (eol || !ISSPACE(c)) {
18651 return eol;
18652 }
18653 }
18654 return TRUE;
18655}
18656
18657static char*
18658newtok(struct parser_params *p)
18659{
18660 p->tokidx = 0;
18661 if (!p->tokenbuf) {
18662 p->toksiz = 60;
18663 p->tokenbuf = ALLOC_N(char, 60);
18664 }
18665 if (p->toksiz > 4096) {
18666 p->toksiz = 60;
18667 REALLOC_N(p->tokenbuf, char, 60);
18668 }
18669 return p->tokenbuf;
18670}
18671
18672static char *
18673tokspace(struct parser_params *p, int n)
18674{
18675 p->tokidx += n;
18676
18677 if (p->tokidx >= p->toksiz) {
18678 do {p->toksiz *= 2;} while (p->toksiz < p->tokidx);
18679 REALLOC_N(p->tokenbuf, char, p->toksiz);
18680 }
18681 return &p->tokenbuf[p->tokidx-n];
18682}
18683
18684static void
18685tokadd(struct parser_params *p, int c)
18686{
18687 p->tokenbuf[p->tokidx++] = (char)c;
18688 if (p->tokidx >= p->toksiz) {
18689 p->toksiz *= 2;
18690 REALLOC_N(p->tokenbuf, char, p->toksiz);
18691 }
18692}
18693
18694static int
18695tok_hex(struct parser_params *p, size_t *numlen)
18696{
18697 int c;
18698
18699 c = (int)ruby_scan_hex(p->lex.pcur, 2, numlen);
18700 if (!*numlen) {
18701 flush_string_content(p, p->enc, rb_strlen_lit("\\x"));
18702 yyerror0("invalid hex escape");
18703 dispatch_scan_event(p, tSTRING_CONTENT);
18704 return 0;
18705 }
18706 p->lex.pcur += *numlen;
18707 return c;
18708}
18709
18710#define tokcopy(p, n) memcpy(tokspace(p, n), (p)->lex.pcur - (n), (n))
18711
18712static int
18713escaped_control_code(int c)
18714{
18715 int c2 = 0;
18716 switch (c) {
18717 case ' ':
18718 c2 = 's';
18719 break;
18720 case '\n':
18721 c2 = 'n';
18722 break;
18723 case '\t':
18724 c2 = 't';
18725 break;
18726 case '\v':
18727 c2 = 'v';
18728 break;
18729 case '\r':
18730 c2 = 'r';
18731 break;
18732 case '\f':
18733 c2 = 'f';
18734 break;
18735 }
18736 return c2;
18737}
18738
18739#define WARN_SPACE_CHAR(c, prefix) \
18740 rb_warn1("invalid character syntax; use "prefix"\\%c", WARN_I(c))
18741
18742static int
18743tokadd_codepoint(struct parser_params *p, rb_encoding **encp,
18744 int regexp_literal, const char *begin)
18745{
18746 const int wide = !begin;
18747 size_t numlen;
18748 int codepoint = (int)ruby_scan_hex(p->lex.pcur, wide ? p->lex.pend - p->lex.pcur : 4, &numlen);
18749
18750 p->lex.pcur += numlen;
18751 if (p->lex.strterm == NULL ||
18752 strterm_is_heredoc(p->lex.strterm) ||
18753 (p->lex.strterm->u.literal.func != str_regexp)) {
18754 if (!begin) begin = p->lex.pcur;
18755 if (wide ? (numlen == 0 || numlen > 6) : (numlen < 4)) {
18756 flush_string_content(p, rb_utf8_encoding(), p->lex.pcur - begin);
18757 yyerror0("invalid Unicode escape");
18758 dispatch_scan_event(p, tSTRING_CONTENT);
18759 return wide && numlen > 0;
18760 }
18761 if (codepoint > 0x10ffff) {
18762 flush_string_content(p, rb_utf8_encoding(), p->lex.pcur - begin);
18763 yyerror0("invalid Unicode codepoint (too large)");
18764 dispatch_scan_event(p, tSTRING_CONTENT);
18765 return wide;
18766 }
18767 if ((codepoint & 0xfffff800) == 0xd800) {
18768 flush_string_content(p, rb_utf8_encoding(), p->lex.pcur - begin);
18769 yyerror0("invalid Unicode codepoint");
18770 dispatch_scan_event(p, tSTRING_CONTENT);
18771 return wide;
18772 }
18773 }
18774 if (regexp_literal) {
18775 tokcopy(p, (int)numlen);
18776 }
18777 else if (codepoint >= 0x80) {
18778 rb_encoding *utf8 = rb_utf8_encoding();
18779 if (*encp && utf8 != *encp) {
18780 YYLTYPE loc = RUBY_INIT_YYLLOC();
18781 compile_error(p, "UTF-8 mixed within %s source", rb_enc_name(*encp));
18782 parser_show_error_line(p, &loc);
18783 return wide;
18784 }
18785 *encp = utf8;
18786 tokaddmbc(p, codepoint, *encp);
18787 }
18788 else {
18789 tokadd(p, codepoint);
18790 }
18791 return TRUE;
18792}
18793
18794static int tokadd_mbchar(struct parser_params *p, int c);
18795
18796static int
18797tokskip_mbchar(struct parser_params *p)
18798{
18799 int len = parser_precise_mbclen(p, p->lex.pcur-1);
18800 if (len > 0) {
18801 p->lex.pcur += len - 1;
18802 }
18803 return len;
18804}
18805
18806/* return value is for ?\u3042 */
18807static void
18808tokadd_utf8(struct parser_params *p, rb_encoding **encp,
18809 int term, int symbol_literal, int regexp_literal)
18810{
18811 /*
18812 * If `term` is not -1, then we allow multiple codepoints in \u{}
18813 * upto `term` byte, otherwise we're parsing a character literal.
18814 * And then add the codepoints to the current token.
18815 */
18816 static const char multiple_codepoints[] = "Multiple codepoints at single character literal";
18817
18818 const int open_brace = '{', close_brace = '}';
18819
18820 if (regexp_literal) { tokadd(p, '\\'); tokadd(p, 'u'); }
18821
18822 if (peek(p, open_brace)) { /* handle \u{...} form */
18823 if (regexp_literal && p->lex.strterm->u.literal.func == str_regexp) {
18824 /*
18825 * Skip parsing validation code and copy bytes as-is until term or
18826 * closing brace, in order to correctly handle extended regexps where
18827 * invalid unicode escapes are allowed in comments. The regexp parser
18828 * does its own validation and will catch any issues.
18829 */
18830 tokadd(p, open_brace);
18831 while (!lex_eol_ptr_p(p, ++p->lex.pcur)) {
18832 int c = peekc(p);
18833 if (c == close_brace) {
18834 tokadd(p, c);
18835 ++p->lex.pcur;
18836 break;
18837 }
18838 else if (c == term) {
18839 break;
18840 }
18841 if (c == '\\' && !lex_eol_n_p(p, 1)) {
18842 tokadd(p, c);
18843 c = *++p->lex.pcur;
18844 }
18845 tokadd_mbchar(p, c);
18846 }
18847 }
18848 else {
18849 const char *second = NULL;
18850 int c, last = nextc(p);
18851 if (lex_eol_p(p)) goto unterminated;
18852 while (ISSPACE(c = peekc(p)) && !lex_eol_ptr_p(p, ++p->lex.pcur));
18853 while (c != close_brace) {
18854 if (c == term) goto unterminated;
18855 if (second == multiple_codepoints)
18856 second = p->lex.pcur;
18857 if (regexp_literal) tokadd(p, last);
18858 if (!tokadd_codepoint(p, encp, regexp_literal, NULL)) {
18859 break;
18860 }
18861 while (ISSPACE(c = peekc(p))) {
18862 if (lex_eol_ptr_p(p, ++p->lex.pcur)) goto unterminated;
18863 last = c;
18864 }
18865 if (term == -1 && !second)
18866 second = multiple_codepoints;
18867 }
18868
18869 if (c != close_brace) {
18870 unterminated:
18871 flush_string_content(p, rb_utf8_encoding(), 0);
18872 yyerror0("unterminated Unicode escape");
18873 dispatch_scan_event(p, tSTRING_CONTENT);
18874 return;
18875 }
18876 if (second && second != multiple_codepoints) {
18877 const char *pcur = p->lex.pcur;
18878 p->lex.pcur = second;
18879 dispatch_scan_event(p, tSTRING_CONTENT);
18880 token_flush(p);
18881 p->lex.pcur = pcur;
18882 yyerror0(multiple_codepoints);
18883 token_flush(p);
18884 }
18885
18886 if (regexp_literal) tokadd(p, close_brace);
18887 nextc(p);
18888 }
18889 }
18890 else { /* handle \uxxxx form */
18891 if (!tokadd_codepoint(p, encp, regexp_literal, p->lex.pcur - rb_strlen_lit("\\u"))) {
18892 token_flush(p);
18893 return;
18894 }
18895 }
18896}
18897
18898#define ESCAPE_CONTROL 1
18899#define ESCAPE_META 2
18900
18901static int
18902read_escape(struct parser_params *p, int flags, const char *begin)
18903{
18904 int c;
18905 size_t numlen;
18906
18907 switch (c = nextc(p)) {
18908 case '\\': /* Backslash */
18909 return c;
18910
18911 case 'n': /* newline */
18912 return '\n';
18913
18914 case 't': /* horizontal tab */
18915 return '\t';
18916
18917 case 'r': /* carriage-return */
18918 return '\r';
18919
18920 case 'f': /* form-feed */
18921 return '\f';
18922
18923 case 'v': /* vertical tab */
18924 return '\13';
18925
18926 case 'a': /* alarm(bell) */
18927 return '\007';
18928
18929 case 'e': /* escape */
18930 return 033;
18931
18932 case '0': case '1': case '2': case '3': /* octal constant */
18933 case '4': case '5': case '6': case '7':
18934 pushback(p, c);
18935 c = (int)ruby_scan_oct(p->lex.pcur, 3, &numlen);
18936 p->lex.pcur += numlen;
18937 return c;
18938
18939 case 'x': /* hex constant */
18940 c = tok_hex(p, &numlen);
18941 if (numlen == 0) return 0;
18942 return c;
18943
18944 case 'b': /* backspace */
18945 return '\010';
18946
18947 case 's': /* space */
18948 return ' ';
18949
18950 case 'M':
18951 if (flags & ESCAPE_META) goto eof;
18952 if ((c = nextc(p)) != '-') {
18953 goto eof;
18954 }
18955 if ((c = nextc(p)) == '\\') {
18956 switch (peekc(p)) {
18957 case 'u': case 'U':
18958 nextc(p);
18959 goto eof;
18960 }
18961 return read_escape(p, flags|ESCAPE_META, begin) | 0x80;
18962 }
18963 else if (c == -1) goto eof;
18964 else if (!ISASCII(c)) {
18965 tokskip_mbchar(p);
18966 goto eof;
18967 }
18968 else {
18969 int c2 = escaped_control_code(c);
18970 if (c2) {
18971 if (ISCNTRL(c) || !(flags & ESCAPE_CONTROL)) {
18972 WARN_SPACE_CHAR(c2, "\\M-");
18973 }
18974 else {
18975 WARN_SPACE_CHAR(c2, "\\C-\\M-");
18976 }
18977 }
18978 else if (ISCNTRL(c)) goto eof;
18979 return ((c & 0xff) | 0x80);
18980 }
18981
18982 case 'C':
18983 if ((c = nextc(p)) != '-') {
18984 goto eof;
18985 }
18986 case 'c':
18987 if (flags & ESCAPE_CONTROL) goto eof;
18988 if ((c = nextc(p))== '\\') {
18989 switch (peekc(p)) {
18990 case 'u': case 'U':
18991 nextc(p);
18992 goto eof;
18993 }
18994 c = read_escape(p, flags|ESCAPE_CONTROL, begin);
18995 }
18996 else if (c == '?')
18997 return 0177;
18998 else if (c == -1) goto eof;
18999 else if (!ISASCII(c)) {
19000 tokskip_mbchar(p);
19001 goto eof;
19002 }
19003 else {
19004 int c2 = escaped_control_code(c);
19005 if (c2) {
19006 if (ISCNTRL(c)) {
19007 if (flags & ESCAPE_META) {
19008 WARN_SPACE_CHAR(c2, "\\M-");
19009 }
19010 else {
19011 WARN_SPACE_CHAR(c2, "");
19012 }
19013 }
19014 else {
19015 if (flags & ESCAPE_META) {
19016 WARN_SPACE_CHAR(c2, "\\M-\\C-");
19017 }
19018 else {
19019 WARN_SPACE_CHAR(c2, "\\C-");
19020 }
19021 }
19022 }
19023 else if (ISCNTRL(c)) goto eof;
19024 }
19025 return c & 0x9f;
19026
19027 eof:
19028 case -1:
19029 flush_string_content(p, p->enc, p->lex.pcur - begin);
19030 yyerror0("Invalid escape character syntax");
19031 dispatch_scan_event(p, tSTRING_CONTENT);
19032 return '\0';
19033
19034 default:
19035 return c;
19036 }
19037}
19038
19039static void
19040tokaddmbc(struct parser_params *p, int c, rb_encoding *enc)
19041{
19042 int len = rb_enc_codelen(c, enc);
19043 rb_enc_mbcput(c, tokspace(p, len), enc);
19044}
19045
19046static int
19047tokadd_escape(struct parser_params *p)
19048{
19049 int c;
19050 size_t numlen;
19051 const char *begin = p->lex.pcur;
19052
19053 switch (c = nextc(p)) {
19054 case '\n':
19055 return 0; /* just ignore */
19056
19057 case '0': case '1': case '2': case '3': /* octal constant */
19058 case '4': case '5': case '6': case '7':
19059 {
19060 ruby_scan_oct(--p->lex.pcur, 3, &numlen);
19061 if (numlen == 0) goto eof;
19062 p->lex.pcur += numlen;
19063 tokcopy(p, (int)numlen + 1);
19064 }
19065 return 0;
19066
19067 case 'x': /* hex constant */
19068 {
19069 tok_hex(p, &numlen);
19070 if (numlen == 0) return -1;
19071 tokcopy(p, (int)numlen + 2);
19072 }
19073 return 0;
19074
19075 eof:
19076 case -1:
19077 flush_string_content(p, p->enc, p->lex.pcur - begin);
19078 yyerror0("Invalid escape character syntax");
19079 token_flush(p);
19080 return -1;
19081
19082 default:
19083 tokadd(p, '\\');
19084 tokadd(p, c);
19085 }
19086 return 0;
19087}
19088
19089static int
19090char_to_option(int c)
19091{
19092 int val;
19093
19094 switch (c) {
19095 case 'i':
19096 val = RE_ONIG_OPTION_IGNORECASE;
19097 break;
19098 case 'x':
19099 val = RE_ONIG_OPTION_EXTEND;
19100 break;
19101 case 'm':
19102 val = RE_ONIG_OPTION_MULTILINE;
19103 break;
19104 default:
19105 val = 0;
19106 break;
19107 }
19108 return val;
19109}
19110
19111#define ARG_ENCODING_FIXED 16
19112#define ARG_ENCODING_NONE 32
19113#define ENC_ASCII8BIT 1
19114#define ENC_EUC_JP 2
19115#define ENC_Windows_31J 3
19116#define ENC_UTF8 4
19117
19118static int
19119char_to_option_kcode(int c, int *option, int *kcode)
19120{
19121 *option = 0;
19122
19123 switch (c) {
19124 case 'n':
19125 *kcode = ENC_ASCII8BIT;
19126 return (*option = ARG_ENCODING_NONE);
19127 case 'e':
19128 *kcode = ENC_EUC_JP;
19129 break;
19130 case 's':
19131 *kcode = ENC_Windows_31J;
19132 break;
19133 case 'u':
19134 *kcode = ENC_UTF8;
19135 break;
19136 default:
19137 *kcode = -1;
19138 return (*option = char_to_option(c));
19139 }
19140 *option = ARG_ENCODING_FIXED;
19141 return 1;
19142}
19143
19144static int
19145regx_options(struct parser_params *p)
19146{
19147 int kcode = 0;
19148 int kopt = 0;
19149 int options = 0;
19150 int c, opt, kc;
19151
19152 newtok(p);
19153 while (c = nextc(p), ISALPHA(c)) {
19154 if (c == 'o') {
19155 options |= RE_OPTION_ONCE;
19156 }
19157 else if (char_to_option_kcode(c, &opt, &kc)) {
19158 if (kc >= 0) {
19159 if (kc != ENC_ASCII8BIT) kcode = c;
19160 kopt = opt;
19161 }
19162 else {
19163 options |= opt;
19164 }
19165 }
19166 else {
19167 tokadd(p, c);
19168 }
19169 }
19170 options |= kopt;
19171 pushback(p, c);
19172 if (toklen(p)) {
19173 YYLTYPE loc = RUBY_INIT_YYLLOC();
19174 tokfix(p);
19175 compile_error(p, "unknown regexp option%s - %*s",
19176 toklen(p) > 1 ? "s" : "", toklen(p), tok(p));
19177 parser_show_error_line(p, &loc);
19178 }
19179 return options | RE_OPTION_ENCODING(kcode);
19180}
19181
19182static int
19183tokadd_mbchar(struct parser_params *p, int c)
19184{
19185 int len = parser_precise_mbclen(p, p->lex.pcur-1);
19186 if (len < 0) return -1;
19187 tokadd(p, c);
19188 p->lex.pcur += --len;
19189 if (len > 0) tokcopy(p, len);
19190 return c;
19191}
19192
19193static inline int
19194simple_re_meta(int c)
19195{
19196 switch (c) {
19197 case '$': case '*': case '+': case '.':
19198 case '?': case '^': case '|':
19199 case ')': case ']': case '}': case '>':
19200 return TRUE;
19201 default:
19202 return FALSE;
19203 }
19204}
19205
19206static int
19207parser_update_heredoc_indent(struct parser_params *p, int c)
19208{
19209 if (p->heredoc_line_indent == -1) {
19210 if (c == '\n') p->heredoc_line_indent = 0;
19211 }
19212 else {
19213 if (c == ' ') {
19214 p->heredoc_line_indent++;
19215 return TRUE;
19216 }
19217 else if (c == '\t') {
19218 int w = (p->heredoc_line_indent / TAB_WIDTH) + 1;
19219 p->heredoc_line_indent = w * TAB_WIDTH;
19220 return TRUE;
19221 }
19222 else if (c != '\n') {
19223 if (p->heredoc_indent > p->heredoc_line_indent) {
19224 p->heredoc_indent = p->heredoc_line_indent;
19225 }
19226 p->heredoc_line_indent = -1;
19227 }
19228 else {
19229 /* Whitespace only line has no indentation */
19230 p->heredoc_line_indent = 0;
19231 }
19232 }
19233 return FALSE;
19234}
19235
19236static void
19237parser_mixed_error(struct parser_params *p, rb_encoding *enc1, rb_encoding *enc2)
19238{
19239 YYLTYPE loc = RUBY_INIT_YYLLOC();
19240 const char *n1 = rb_enc_name(enc1), *n2 = rb_enc_name(enc2);
19241 compile_error(p, "%s mixed within %s source", n1, n2);
19242 parser_show_error_line(p, &loc);
19243}
19244
19245static void
19246parser_mixed_escape(struct parser_params *p, const char *beg, rb_encoding *enc1, rb_encoding *enc2)
19247{
19248 const char *pos = p->lex.pcur;
19249 p->lex.pcur = beg;
19250 parser_mixed_error(p, enc1, enc2);
19251 p->lex.pcur = pos;
19252}
19253
19254static inline char
19255nibble_char_upper(unsigned int c)
19256{
19257 c &= 0xf;
19258 return c + (c < 10 ? '0' : 'A' - 10);
19259}
19260
19261static int
19262tokadd_string(struct parser_params *p,
19263 int func, int term, int paren, long *nest,
19264 rb_encoding **encp, rb_encoding **enc)
19265{
19266 int c;
19267 bool erred = false;
19268#ifdef RIPPER
19269 const int heredoc_end = (p->heredoc_end ? p->heredoc_end + 1 : 0);
19270 int top_of_line = FALSE;
19271#endif
19272
19273#define mixed_error(enc1, enc2) \
19274 (void)(erred || (parser_mixed_error(p, enc1, enc2), erred = true))
19275#define mixed_escape(beg, enc1, enc2) \
19276 (void)(erred || (parser_mixed_escape(p, beg, enc1, enc2), erred = true))
19277
19278 while ((c = nextc(p)) != -1) {
19279 if (p->heredoc_indent > 0) {
19280 parser_update_heredoc_indent(p, c);
19281 }
19282#ifdef RIPPER
19283 if (top_of_line && heredoc_end == p->ruby_sourceline) {
19284 pushback(p, c);
19285 break;
19286 }
19287#endif
19288
19289 if (paren && c == paren) {
19290 ++*nest;
19291 }
19292 else if (c == term) {
19293 if (!nest || !*nest) {
19294 pushback(p, c);
19295 break;
19296 }
19297 --*nest;
19298 }
19299 else if ((func & STR_FUNC_EXPAND) && c == '#' && !lex_eol_p(p)) {
19300 unsigned char c2 = *p->lex.pcur;
19301 if (c2 == '$' || c2 == '@' || c2 == '{') {
19302 pushback(p, c);
19303 break;
19304 }
19305 }
19306 else if (c == '\\') {
19307 c = nextc(p);
19308 switch (c) {
19309 case '\n':
19310 if (func & STR_FUNC_QWORDS) break;
19311 if (func & STR_FUNC_EXPAND) {
19312 if (!(func & STR_FUNC_INDENT) || (p->heredoc_indent < 0))
19313 continue;
19314 if (c == term) {
19315 c = '\\';
19316 goto terminate;
19317 }
19318 }
19319 tokadd(p, '\\');
19320 break;
19321
19322 case '\\':
19323 if (func & STR_FUNC_ESCAPE) tokadd(p, c);
19324 break;
19325
19326 case 'u':
19327 if ((func & STR_FUNC_EXPAND) == 0) {
19328 tokadd(p, '\\');
19329 break;
19330 }
19331 tokadd_utf8(p, enc, term,
19332 func & STR_FUNC_SYMBOL,
19333 func & STR_FUNC_REGEXP);
19334 continue;
19335
19336 default:
19337 if (c == -1) return -1;
19338 if (!ISASCII(c)) {
19339 if ((func & STR_FUNC_EXPAND) == 0) tokadd(p, '\\');
19340 goto non_ascii;
19341 }
19342 if (func & STR_FUNC_REGEXP) {
19343 switch (c) {
19344 case 'c':
19345 case 'C':
19346 case 'M': {
19347 pushback(p, c);
19348 c = read_escape(p, 0, p->lex.pcur - 1);
19349
19350 char *t = tokspace(p, rb_strlen_lit("\\x00"));
19351 *t++ = '\\';
19352 *t++ = 'x';
19353 *t++ = nibble_char_upper(c >> 4);
19354 *t++ = nibble_char_upper(c);
19355 continue;
19356 }
19357 }
19358
19359 if (c == term && !simple_re_meta(c)) {
19360 tokadd(p, c);
19361 continue;
19362 }
19363 pushback(p, c);
19364 if ((c = tokadd_escape(p)) < 0)
19365 return -1;
19366 if (*enc && *enc != *encp) {
19367 mixed_escape(p->lex.ptok+2, *enc, *encp);
19368 }
19369 continue;
19370 }
19371 else if (func & STR_FUNC_EXPAND) {
19372 pushback(p, c);
19373 if (func & STR_FUNC_ESCAPE) tokadd(p, '\\');
19374 c = read_escape(p, 0, p->lex.pcur - 1);
19375 }
19376 else if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) {
19377 /* ignore backslashed spaces in %w */
19378 }
19379 else if (c != term && !(paren && c == paren)) {
19380 tokadd(p, '\\');
19381 pushback(p, c);
19382 continue;
19383 }
19384 }
19385 }
19386 else if (!parser_isascii(p)) {
19387 non_ascii:
19388 if (!*enc) {
19389 *enc = *encp;
19390 }
19391 else if (*enc != *encp) {
19392 mixed_error(*enc, *encp);
19393 continue;
19394 }
19395 if (tokadd_mbchar(p, c) == -1) return -1;
19396 continue;
19397 }
19398 else if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) {
19399 pushback(p, c);
19400 break;
19401 }
19402 if (c & 0x80) {
19403 if (!*enc) {
19404 *enc = *encp;
19405 }
19406 else if (*enc != *encp) {
19407 mixed_error(*enc, *encp);
19408 continue;
19409 }
19410 }
19411 tokadd(p, c);
19412#ifdef RIPPER
19413 top_of_line = (c == '\n');
19414#endif
19415 }
19416 terminate:
19417 if (*enc) *encp = *enc;
19418 return c;
19419}
19420
19421#define NEW_STRTERM(func, term, paren) new_strterm(p, func, term, paren)
19422
19423static void
19424flush_string_content(struct parser_params *p, rb_encoding *enc, size_t back)
19425{
19426 p->lex.pcur -= back;
19427 if (has_delayed_token(p)) {
19428 ptrdiff_t len = p->lex.pcur - p->lex.ptok;
19429 if (len > 0) {
19430 rb_parser_enc_str_buf_cat(p, p->delayed.token, p->lex.ptok, len, enc);
19431 p->delayed.end_line = p->ruby_sourceline;
19432 p->delayed.end_col = rb_long2int(p->lex.pcur - p->lex.pbeg);
19433 }
19434 dispatch_delayed_token(p, tSTRING_CONTENT);
19435 p->lex.ptok = p->lex.pcur;
19436 }
19437 dispatch_scan_event(p, tSTRING_CONTENT);
19438 p->lex.pcur += back;
19439}
19440
19441/* this can be shared with ripper, since it's independent from struct
19442 * parser_params. */
19443#ifndef RIPPER
19444#define BIT(c, idx) (((c) / 32 - 1 == idx) ? (1U << ((c) % 32)) : 0)
19445#define SPECIAL_PUNCT(idx) ( \
19446 BIT('~', idx) | BIT('*', idx) | BIT('$', idx) | BIT('?', idx) | \
19447 BIT('!', idx) | BIT('@', idx) | BIT('/', idx) | BIT('\\', idx) | \
19448 BIT(';', idx) | BIT(',', idx) | BIT('.', idx) | BIT('=', idx) | \
19449 BIT(':', idx) | BIT('<', idx) | BIT('>', idx) | BIT('\"', idx) | \
19450 BIT('&', idx) | BIT('`', idx) | BIT('\'', idx) | BIT('+', idx) | \
19451 BIT('0', idx))
19452const uint_least32_t ruby_global_name_punct_bits[] = {
19453 SPECIAL_PUNCT(0),
19454 SPECIAL_PUNCT(1),
19455 SPECIAL_PUNCT(2),
19456};
19457#undef BIT
19458#undef SPECIAL_PUNCT
19459#endif
19460
19461static enum yytokentype
19462parser_peek_variable_name(struct parser_params *p)
19463{
19464 int c;
19465 const char *ptr = p->lex.pcur;
19466
19467 if (lex_eol_ptr_n_p(p, ptr, 1)) return 0;
19468 c = *ptr++;
19469 switch (c) {
19470 case '$':
19471 if ((c = *ptr) == '-') {
19472 if (lex_eol_ptr_p(p, ++ptr)) return 0;
19473 c = *ptr;
19474 }
19475 else if (is_global_name_punct(c) || ISDIGIT(c)) {
19476 return tSTRING_DVAR;
19477 }
19478 break;
19479 case '@':
19480 if ((c = *ptr) == '@') {
19481 if (lex_eol_ptr_p(p, ++ptr)) return 0;
19482 c = *ptr;
19483 }
19484 break;
19485 case '{':
19486 p->lex.pcur = ptr;
19487 p->command_start = TRUE;
19488 yylval.state = p->lex.state;
19489 return tSTRING_DBEG;
19490 default:
19491 return 0;
19492 }
19493 if (!ISASCII(c) || c == '_' || ISALPHA(c))
19494 return tSTRING_DVAR;
19495 return 0;
19496}
19497
19498#define IS_ARG() IS_lex_state(EXPR_ARG_ANY)
19499#define IS_END() IS_lex_state(EXPR_END_ANY)
19500#define IS_BEG() (IS_lex_state(EXPR_BEG_ANY) || IS_lex_state_all(EXPR_ARG|EXPR_LABELED))
19501#define IS_SPCARG(c) (IS_ARG() && space_seen && !ISSPACE(c))
19502#define IS_LABEL_POSSIBLE() (\
19503 (IS_lex_state(EXPR_LABEL|EXPR_ENDFN) && !cmd_state) || \
19504 IS_ARG())
19505#define IS_LABEL_SUFFIX(n) (peek_n(p, ':',(n)) && !peek_n(p, ':', (n)+1))
19506#define IS_AFTER_OPERATOR() IS_lex_state(EXPR_FNAME | EXPR_DOT)
19507
19508static inline enum yytokentype
19509parser_string_term(struct parser_params *p, int func)
19510{
19511 xfree(p->lex.strterm);
19512 p->lex.strterm = 0;
19513 if (func & STR_FUNC_REGEXP) {
19514 set_yylval_num(regx_options(p));
19515 dispatch_scan_event(p, tREGEXP_END);
19516 SET_LEX_STATE(EXPR_END);
19517 return tREGEXP_END;
19518 }
19519 if ((func & STR_FUNC_LABEL) && IS_LABEL_SUFFIX(0)) {
19520 nextc(p);
19521 SET_LEX_STATE(EXPR_ARG|EXPR_LABELED);
19522 return tLABEL_END;
19523 }
19524 SET_LEX_STATE(EXPR_END);
19525 return tSTRING_END;
19526}
19527
19528static enum yytokentype
19529parse_string(struct parser_params *p, rb_strterm_literal_t *quote)
19530{
19531 int func = quote->func;
19532 int term = quote->term;
19533 int paren = quote->paren;
19534 int c, space = 0;
19535 rb_encoding *enc = p->enc;
19536 rb_encoding *base_enc = 0;
19537 rb_parser_string_t *lit;
19538
19539 if (func & STR_FUNC_TERM) {
19540 if (func & STR_FUNC_QWORDS) nextc(p); /* delayed term */
19541 SET_LEX_STATE(EXPR_END);
19542 xfree(p->lex.strterm);
19543 p->lex.strterm = 0;
19544 return func & STR_FUNC_REGEXP ? tREGEXP_END : tSTRING_END;
19545 }
19546 c = nextc(p);
19547 if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) {
19548 while (c != '\n' && ISSPACE(c = nextc(p)));
19549 space = 1;
19550 }
19551 if (func & STR_FUNC_LIST) {
19552 quote->func &= ~STR_FUNC_LIST;
19553 space = 1;
19554 }
19555 if (c == term && !quote->nest) {
19556 if (func & STR_FUNC_QWORDS) {
19557 quote->func |= STR_FUNC_TERM;
19558 pushback(p, c); /* dispatch the term at tSTRING_END */
19559 add_delayed_token(p, p->lex.ptok, p->lex.pcur);
19560 return ' ';
19561 }
19562 return parser_string_term(p, func);
19563 }
19564 if (space) {
19565 if (!ISSPACE(c)) pushback(p, c);
19566 add_delayed_token(p, p->lex.ptok, p->lex.pcur);
19567 return ' ';
19568 }
19569 newtok(p);
19570 if ((func & STR_FUNC_EXPAND) && c == '#') {
19571 enum yytokentype t = parser_peek_variable_name(p);
19572 if (t) return t;
19573 tokadd(p, '#');
19574 c = nextc(p);
19575 }
19576 pushback(p, c);
19577 if (tokadd_string(p, func, term, paren, &quote->nest,
19578 &enc, &base_enc) == -1) {
19579 if (p->eofp) {
19580#ifndef RIPPER
19581# define unterminated_literal(mesg) yyerror0(mesg)
19582#else
19583# define unterminated_literal(mesg) compile_error(p, mesg)
19584#endif
19585 literal_flush(p, p->lex.pcur);
19586 if (func & STR_FUNC_QWORDS) {
19587 /* no content to add, bailing out here */
19588 unterminated_literal("unterminated list meets end of file");
19589 xfree(p->lex.strterm);
19590 p->lex.strterm = 0;
19591 return tSTRING_END;
19592 }
19593 if (func & STR_FUNC_REGEXP) {
19594 unterminated_literal("unterminated regexp meets end of file");
19595 }
19596 else {
19597 unterminated_literal("unterminated string meets end of file");
19598 }
19599 quote->func |= STR_FUNC_TERM;
19600 }
19601 }
19602
19603 tokfix(p);
19604 lit = STR_NEW3(tok(p), toklen(p), enc, func);
19605 set_yylval_str(lit);
19606 flush_string_content(p, enc, 0);
19607
19608 return tSTRING_CONTENT;
19609}
19610
19611static enum yytokentype
19612heredoc_identifier(struct parser_params *p)
19613{
19614 /*
19615 * term_len is length of `<<"END"` except `END`,
19616 * in this case term_len is 4 (<, <, " and ").
19617 */
19618 long len, offset = p->lex.pcur - p->lex.pbeg;
19619 int c = nextc(p), term, func = 0, quote = 0;
19620 enum yytokentype token = tSTRING_BEG;
19621 int indent = 0;
19622
19623 if (c == '-') {
19624 c = nextc(p);
19625 func = STR_FUNC_INDENT;
19626 offset++;
19627 }
19628 else if (c == '~') {
19629 c = nextc(p);
19630 func = STR_FUNC_INDENT;
19631 offset++;
19632 indent = INT_MAX;
19633 }
19634 switch (c) {
19635 case '\'':
19636 func |= str_squote; goto quoted;
19637 case '"':
19638 func |= str_dquote; goto quoted;
19639 case '`':
19640 token = tXSTRING_BEG;
19641 func |= str_xquote; goto quoted;
19642
19643 quoted:
19644 quote++;
19645 offset++;
19646 term = c;
19647 len = 0;
19648 while ((c = nextc(p)) != term) {
19649 if (c == -1 || c == '\r' || c == '\n') {
19650 yyerror0("unterminated here document identifier");
19651 return -1;
19652 }
19653 }
19654 break;
19655
19656 default:
19657 if (!parser_is_identchar(p)) {
19658 pushback(p, c);
19659 if (func & STR_FUNC_INDENT) {
19660 pushback(p, indent > 0 ? '~' : '-');
19661 }
19662 return 0;
19663 }
19664 func |= str_dquote;
19665 do {
19666 int n = parser_precise_mbclen(p, p->lex.pcur-1);
19667 if (n < 0) return 0;
19668 p->lex.pcur += --n;
19669 } while ((c = nextc(p)) != -1 && parser_is_identchar(p));
19670 pushback(p, c);
19671 break;
19672 }
19673
19674 len = p->lex.pcur - (p->lex.pbeg + offset) - quote;
19675 if ((unsigned long)len >= HERETERM_LENGTH_MAX)
19676 yyerror0("too long here document identifier");
19677 dispatch_scan_event(p, tHEREDOC_BEG);
19678 lex_goto_eol(p);
19679
19680 p->lex.strterm = new_heredoc(p);
19681 rb_strterm_heredoc_t *here = &p->lex.strterm->u.heredoc;
19682 here->offset = offset;
19683 here->sourceline = p->ruby_sourceline;
19684 here->length = (unsigned)len;
19685 here->quote = quote;
19686 here->func = func;
19687 here->lastline = p->lex.lastline;
19688
19689 token_flush(p);
19690 p->heredoc_indent = indent;
19691 p->heredoc_line_indent = 0;
19692 return token;
19693}
19694
19695static void
19696heredoc_restore(struct parser_params *p, rb_strterm_heredoc_t *here)
19697{
19698 rb_parser_string_t *line;
19699 rb_strterm_t *term = p->lex.strterm;
19700
19701 p->lex.strterm = 0;
19702 line = here->lastline;
19703 p->lex.lastline = line;
19704 p->lex.pbeg = PARSER_STRING_PTR(line);
19705 p->lex.pend = p->lex.pbeg + PARSER_STRING_LEN(line);
19706 p->lex.pcur = p->lex.pbeg + here->offset + here->length + here->quote;
19707 p->lex.ptok = p->lex.pbeg + here->offset - here->quote;
19708 p->heredoc_end = p->ruby_sourceline;
19709 p->ruby_sourceline = (int)here->sourceline;
19710 if (p->eofp) p->lex.nextline = AFTER_HEREDOC_WITHOUT_TERMINTOR;
19711 p->eofp = 0;
19712 xfree(term);
19713}
19714
19715static int
19716dedent_string_column(const char *str, long len, int width)
19717{
19718 int i, col = 0;
19719
19720 for (i = 0; i < len && col < width; i++) {
19721 if (str[i] == ' ') {
19722 col++;
19723 }
19724 else if (str[i] == '\t') {
19725 int n = TAB_WIDTH * (col / TAB_WIDTH + 1);
19726 if (n > width) break;
19727 col = n;
19728 }
19729 else {
19730 break;
19731 }
19732 }
19733
19734 return i;
19735}
19736
19737static int
19738dedent_string(struct parser_params *p, rb_parser_string_t *string, int width)
19739{
19740 char *str;
19741 long len;
19742 int i;
19743
19744 len = PARSER_STRING_LEN(string);
19745 str = PARSER_STRING_PTR(string);
19746
19747 i = dedent_string_column(str, len, width);
19748 if (!i) return 0;
19749
19750 rb_parser_str_modify(string);
19751 str = PARSER_STRING_PTR(string);
19752 if (PARSER_STRING_LEN(string) != len)
19753 rb_fatal("literal string changed: %s", PARSER_STRING_PTR(string));
19754 MEMMOVE(str, str + i, char, len - i);
19755 rb_parser_str_set_len(p, string, len - i);
19756 return i;
19757}
19758
19759static NODE *
19760heredoc_dedent(struct parser_params *p, NODE *root)
19761{
19762 NODE *node, *str_node, *prev_node;
19763 int indent = p->heredoc_indent;
19764 rb_parser_string_t *prev_lit = 0;
19765
19766 if (indent <= 0) return root;
19767 if (!root) return root;
19768
19769 prev_node = node = str_node = root;
19770 if (nd_type_p(root, NODE_LIST)) str_node = RNODE_LIST(root)->nd_head;
19771
19772 while (str_node) {
19773 rb_parser_string_t *lit = RNODE_STR(str_node)->string;
19774 if (nd_fl_newline(str_node)) {
19775 dedent_string(p, lit, indent);
19776 }
19777 if (!prev_lit) {
19778 prev_lit = lit;
19779 }
19780 else if (!literal_concat0(p, prev_lit, lit)) {
19781 return 0;
19782 }
19783 else {
19784 NODE *end = RNODE_LIST(node)->as.nd_end;
19785 node = RNODE_LIST(prev_node)->nd_next = RNODE_LIST(node)->nd_next;
19786 if (!node) {
19787 if (nd_type_p(prev_node, NODE_DSTR))
19788 nd_set_type(prev_node, NODE_STR);
19789 break;
19790 }
19791 RNODE_LIST(node)->as.nd_end = end;
19792 goto next_str;
19793 }
19794
19795 str_node = 0;
19796 while ((nd_type_p(node, NODE_LIST) || nd_type_p(node, NODE_DSTR)) && (node = RNODE_LIST(prev_node = node)->nd_next) != 0) {
19797 next_str:
19798 if (!nd_type_p(node, NODE_LIST)) break;
19799 if ((str_node = RNODE_LIST(node)->nd_head) != 0) {
19800 enum node_type type = nd_type(str_node);
19801 if (type == NODE_STR || type == NODE_DSTR) break;
19802 prev_lit = 0;
19803 str_node = 0;
19804 }
19805 }
19806 }
19807 return root;
19808}
19809
19810static int
19811whole_match_p(struct parser_params *p, const char *eos, long len, int indent)
19812{
19813 const char *beg = p->lex.pbeg;
19814 const char *ptr = p->lex.pend;
19815
19816 if (ptr - beg < len) return FALSE;
19817 if (ptr > beg && ptr[-1] == '\n') {
19818 if (--ptr > beg && ptr[-1] == '\r') --ptr;
19819 if (ptr - beg < len) return FALSE;
19820 }
19821 if (strncmp(eos, ptr -= len, len)) return FALSE;
19822 if (indent) {
19823 while (beg < ptr && ISSPACE(*beg)) beg++;
19824 }
19825 return beg == ptr;
19826}
19827
19828static int
19829word_match_p(struct parser_params *p, const char *word, long len)
19830{
19831 if (strncmp(p->lex.pcur, word, len)) return 0;
19832 if (lex_eol_n_p(p, len)) return 1;
19833 int c = (unsigned char)p->lex.pcur[len];
19834 if (ISSPACE(c)) return 1;
19835 switch (c) {
19836 case '\0': case '\004': case '\032': return 1;
19837 }
19838 return 0;
19839}
19840
19841#define NUM_SUFFIX_R (1<<0)
19842#define NUM_SUFFIX_I (1<<1)
19843#define NUM_SUFFIX_ALL 3
19844
19845static int
19846number_literal_suffix(struct parser_params *p, int mask)
19847{
19848 int c, result = 0;
19849 const char *lastp = p->lex.pcur;
19850
19851 while ((c = nextc(p)) != -1) {
19852 if ((mask & NUM_SUFFIX_I) && c == 'i') {
19853 result |= (mask & NUM_SUFFIX_I);
19854 mask &= ~NUM_SUFFIX_I;
19855 /* r after i, rational of complex is disallowed */
19856 mask &= ~NUM_SUFFIX_R;
19857 continue;
19858 }
19859 if ((mask & NUM_SUFFIX_R) && c == 'r') {
19860 result |= (mask & NUM_SUFFIX_R);
19861 mask &= ~NUM_SUFFIX_R;
19862 continue;
19863 }
19864 if (!ISASCII(c) || ISALPHA(c) || c == '_') {
19865 p->lex.pcur = lastp;
19866 literal_flush(p, p->lex.pcur);
19867 return 0;
19868 }
19869 pushback(p, c);
19870 break;
19871 }
19872 return result;
19873}
19874
19875static enum yytokentype
19876set_number_literal(struct parser_params *p, enum yytokentype type, int suffix, int base, int seen_point)
19877{
19878 enum rb_numeric_type numeric_type = integer_literal;
19879
19880 if (type == tFLOAT) {
19881 numeric_type = float_literal;
19882 }
19883
19884 if (suffix & NUM_SUFFIX_R) {
19885 type = tRATIONAL;
19886 numeric_type = rational_literal;
19887 }
19888 if (suffix & NUM_SUFFIX_I) {
19889 type = tIMAGINARY;
19890 }
19891
19892 switch (type) {
19893 case tINTEGER:
19894 set_yylval_node(NEW_INTEGER(strdup(tok(p)), base, &_cur_loc));
19895 break;
19896 case tFLOAT:
19897 set_yylval_node(NEW_FLOAT(strdup(tok(p)), &_cur_loc));
19898 break;
19899 case tRATIONAL:
19900 set_yylval_node(NEW_RATIONAL(strdup(tok(p)), base, seen_point, &_cur_loc));
19901 break;
19902 case tIMAGINARY:
19903 set_yylval_node(NEW_IMAGINARY(strdup(tok(p)), base, seen_point, numeric_type, &_cur_loc));
19904 (void)numeric_type; /* for ripper */
19905 break;
19906 default:
19907 rb_bug("unexpected token: %d", type);
19908 }
19909 SET_LEX_STATE(EXPR_END);
19910 return type;
19911}
19912
19913#define dispatch_heredoc_end(p) parser_dispatch_heredoc_end(p, __LINE__)
19914static void
19915parser_dispatch_heredoc_end(struct parser_params *p, int line)
19916{
19917 if (has_delayed_token(p))
19918 dispatch_delayed_token(p, tSTRING_CONTENT);
19919
19920#ifdef RIPPER
19921 VALUE str = STR_NEW(p->lex.ptok, p->lex.pend - p->lex.ptok);
19922 ripper_dispatch1(p, ripper_token2eventid(tHEREDOC_END), str);
19923#else
19924 if (p->keep_tokens) {
19925 rb_parser_string_t *str = rb_parser_encoding_string_new(p, p->lex.ptok, p->lex.pend - p->lex.ptok, p->enc);
19926 RUBY_SET_YYLLOC_OF_HEREDOC_END(*p->yylloc);
19927 parser_append_tokens(p, str, tHEREDOC_END, line);
19928 }
19929#endif
19930
19931 RUBY_SET_YYLLOC_FROM_STRTERM_HEREDOC(*p->yylloc);
19932 lex_goto_eol(p);
19933 token_flush(p);
19934}
19935
19936static enum yytokentype
19937here_document(struct parser_params *p, rb_strterm_heredoc_t *here)
19938{
19939 int c, func, indent = 0;
19940 const char *eos, *ptr, *ptr_end;
19941 long len;
19942 rb_parser_string_t *str = 0;
19943 rb_encoding *enc = p->enc;
19944 rb_encoding *base_enc = 0;
19945 int bol;
19946#ifdef RIPPER
19947 VALUE s_value;
19948#endif
19949
19950 eos = PARSER_STRING_PTR(here->lastline) + here->offset;
19951 len = here->length;
19952 indent = (func = here->func) & STR_FUNC_INDENT;
19953
19954 if ((c = nextc(p)) == -1) {
19955 error:
19956#ifdef RIPPER
19957 if (!has_delayed_token(p)) {
19958 dispatch_scan_event(p, tSTRING_CONTENT);
19959 }
19960 else {
19961 if ((len = p->lex.pcur - p->lex.ptok) > 0) {
19962 if (!(func & STR_FUNC_REGEXP)) {
19963 int cr = ENC_CODERANGE_UNKNOWN;
19964 rb_str_coderange_scan_restartable(p->lex.ptok, p->lex.pcur, enc, &cr);
19965 if (cr != ENC_CODERANGE_7BIT &&
19966 rb_is_usascii_enc(p->enc) &&
19967 enc != rb_utf8_encoding()) {
19968 enc = rb_ascii8bit_encoding();
19969 }
19970 }
19971 rb_parser_enc_str_buf_cat(p, p->delayed.token, p->lex.ptok, len, enc);
19972 }
19973 dispatch_delayed_token(p, tSTRING_CONTENT);
19974 }
19975 lex_goto_eol(p);
19976#endif
19977 heredoc_restore(p, &p->lex.strterm->u.heredoc);
19978 compile_error(p, "can't find string \"%.*s\" anywhere before EOF",
19979 (int)len, eos);
19980 token_flush(p);
19981 SET_LEX_STATE(EXPR_END);
19982 return tSTRING_END;
19983 }
19984 bol = was_bol(p);
19985 if (!bol) {
19986 /* not beginning of line, cannot be the terminator */
19987 }
19988 else if (p->heredoc_line_indent == -1) {
19989 /* `heredoc_line_indent == -1` means
19990 * - "after an interpolation in the same line", or
19991 * - "in a continuing line"
19992 */
19993 p->heredoc_line_indent = 0;
19994 }
19995 else if (whole_match_p(p, eos, len, indent)) {
19996 dispatch_heredoc_end(p);
19997 restore:
19998 heredoc_restore(p, &p->lex.strterm->u.heredoc);
19999 token_flush(p);
20000 SET_LEX_STATE(EXPR_END);
20001 return tSTRING_END;
20002 }
20003
20004 if (!(func & STR_FUNC_EXPAND)) {
20005 do {
20006 ptr = PARSER_STRING_PTR(p->lex.lastline);
20007 ptr_end = p->lex.pend;
20008 if (ptr_end > ptr) {
20009 switch (ptr_end[-1]) {
20010 case '\n':
20011 if (--ptr_end == ptr || ptr_end[-1] != '\r') {
20012 ptr_end++;
20013 break;
20014 }
20015 case '\r':
20016 --ptr_end;
20017 }
20018 }
20019
20020 if (p->heredoc_indent > 0) {
20021 long i = 0;
20022 while (ptr + i < ptr_end && parser_update_heredoc_indent(p, ptr[i]))
20023 i++;
20024 p->heredoc_line_indent = 0;
20025 }
20026
20027 if (str)
20028 parser_str_cat(str, ptr, ptr_end - ptr);
20029 else
20030 str = rb_parser_encoding_string_new(p, ptr, ptr_end - ptr, enc);
20031 if (!lex_eol_ptr_p(p, ptr_end)) parser_str_cat_cstr(str, "\n");
20032 lex_goto_eol(p);
20033 if (p->heredoc_indent > 0) {
20034 goto flush_str;
20035 }
20036 if (nextc(p) == -1) {
20037 if (str) {
20038 rb_parser_string_free(p, str);
20039 str = 0;
20040 }
20041 goto error;
20042 }
20043 } while (!whole_match_p(p, eos, len, indent));
20044 }
20045 else {
20046 /* int mb = ENC_CODERANGE_7BIT, *mbp = &mb;*/
20047 newtok(p);
20048 if (c == '#') {
20049 enum yytokentype t = parser_peek_variable_name(p);
20050 if (p->heredoc_line_indent != -1) {
20051 if (p->heredoc_indent > p->heredoc_line_indent) {
20052 p->heredoc_indent = p->heredoc_line_indent;
20053 }
20054 p->heredoc_line_indent = -1;
20055 }
20056 if (t) return t;
20057 tokadd(p, '#');
20058 c = nextc(p);
20059 }
20060 do {
20061 pushback(p, c);
20062 enc = p->enc;
20063 if ((c = tokadd_string(p, func, '\n', 0, NULL, &enc, &base_enc)) == -1) {
20064 if (p->eofp) goto error;
20065 goto restore;
20066 }
20067 if (c != '\n') {
20068 if (c == '\\') p->heredoc_line_indent = -1;
20069 flush:
20070 str = STR_NEW3(tok(p), toklen(p), enc, func);
20071 flush_str:
20072 set_yylval_str(str);
20073#ifndef RIPPER
20074 if (bol) nd_set_fl_newline(yylval.node);
20075#endif
20076 flush_string_content(p, enc, 0);
20077 return tSTRING_CONTENT;
20078 }
20079 tokadd(p, nextc(p));
20080 if (p->heredoc_indent > 0) {
20081 lex_goto_eol(p);
20082 goto flush;
20083 }
20084 /* if (mbp && mb == ENC_CODERANGE_UNKNOWN) mbp = 0;*/
20085 if ((c = nextc(p)) == -1) goto error;
20086 } while (!whole_match_p(p, eos, len, indent));
20087 str = STR_NEW3(tok(p), toklen(p), enc, func);
20088 }
20089 dispatch_heredoc_end(p);
20090 heredoc_restore(p, &p->lex.strterm->u.heredoc);
20091 token_flush(p);
20092 p->lex.strterm = NEW_STRTERM(func | STR_FUNC_TERM, 0, 0);
20093#ifdef RIPPER
20094 /* Preserve s_value for set_yylval_str */
20095 s_value = p->s_value;
20096#endif
20097 set_yylval_str(str);
20098#ifdef RIPPER
20099 set_parser_s_value(s_value);
20100#endif
20101
20102#ifndef RIPPER
20103 if (bol) nd_set_fl_newline(yylval.node);
20104#endif
20105 return tSTRING_CONTENT;
20106}
20107
20108#include "lex.c"
20109
20110static int
20111arg_ambiguous(struct parser_params *p, char c)
20112{
20113#ifndef RIPPER
20114 if (c == '/') {
20115 rb_warning1("ambiguity between regexp and two divisions: wrap regexp in parentheses or add a space after '%c' operator", WARN_I(c));
20116 }
20117 else {
20118 rb_warning1("ambiguous first argument; put parentheses or a space even after '%c' operator", WARN_I(c));
20119 }
20120#else
20121 dispatch1(arg_ambiguous, rb_usascii_str_new(&c, 1));
20122#endif
20123 return TRUE;
20124}
20125
20126/* returns true value if formal argument error;
20127 * Qtrue, or error message if ripper */
20128static VALUE
20129formal_argument_error(struct parser_params *p, ID id)
20130{
20131 switch (id_type(id)) {
20132 case ID_LOCAL:
20133 break;
20134#ifndef RIPPER
20135# define ERR(mesg) (yyerror0(mesg), Qtrue)
20136#else
20137# define ERR(mesg) WARN_S(mesg)
20138#endif
20139 case ID_CONST:
20140 return ERR("formal argument cannot be a constant");
20141 case ID_INSTANCE:
20142 return ERR("formal argument cannot be an instance variable");
20143 case ID_GLOBAL:
20144 return ERR("formal argument cannot be a global variable");
20145 case ID_CLASS:
20146 return ERR("formal argument cannot be a class variable");
20147 default:
20148 return ERR("formal argument must be local variable");
20149#undef ERR
20150 }
20151 shadowing_lvar(p, id);
20152
20153 return Qfalse;
20154}
20155
20156static int
20157lvar_defined(struct parser_params *p, ID id)
20158{
20159 return (dyna_in_block(p) && dvar_defined(p, id)) || local_id(p, id);
20160}
20161
20162/* emacsen -*- hack */
20163static long
20164parser_encode_length(struct parser_params *p, const char *name, long len)
20165{
20166 long nlen;
20167
20168 if (len > 5 && name[nlen = len - 5] == '-') {
20169 if (rb_memcicmp(name + nlen + 1, "unix", 4) == 0)
20170 return nlen;
20171 }
20172 if (len > 4 && name[nlen = len - 4] == '-') {
20173 if (rb_memcicmp(name + nlen + 1, "dos", 3) == 0)
20174 return nlen;
20175 if (rb_memcicmp(name + nlen + 1, "mac", 3) == 0 &&
20176 !(len == 8 && rb_memcicmp(name, "utf8-mac", len) == 0))
20177 /* exclude UTF8-MAC because the encoding named "UTF8" doesn't exist in Ruby */
20178 return nlen;
20179 }
20180 return len;
20181}
20182
20183static void
20184parser_set_encode(struct parser_params *p, const char *name)
20185{
20186 rb_encoding *enc;
20187 VALUE excargs[3];
20188 int idx = 0;
20189
20190 const char *wrong = 0;
20191 switch (*name) {
20192 case 'e': case 'E': wrong = "external"; break;
20193 case 'i': case 'I': wrong = "internal"; break;
20194 case 'f': case 'F': wrong = "filesystem"; break;
20195 case 'l': case 'L': wrong = "locale"; break;
20196 }
20197 if (wrong && STRCASECMP(name, wrong) == 0) goto unknown;
20198 idx = rb_enc_find_index(name);
20199 if (idx < 0) {
20200 unknown:
20201 excargs[1] = rb_sprintf("unknown encoding name: %s", name);
20202 error:
20203 excargs[0] = rb_eArgError;
20204 excargs[2] = rb_make_backtrace();
20205 rb_ary_unshift(excargs[2], rb_sprintf("%"PRIsVALUE":%d", p->ruby_sourcefile_string, p->ruby_sourceline));
20206 VALUE exc = rb_make_exception(3, excargs);
20207 ruby_show_error_line(p, exc, &(YYLTYPE)RUBY_INIT_YYLLOC(), p->ruby_sourceline, p->lex.lastline);
20208
20209 rb_ast_free(p->ast);
20210 p->ast = NULL;
20211
20212 rb_exc_raise(exc);
20213 }
20214 enc = rb_enc_from_index(idx);
20215 if (!rb_enc_asciicompat(enc)) {
20216 excargs[1] = rb_sprintf("%s is not ASCII compatible", rb_enc_name(enc));
20217 goto error;
20218 }
20219 p->enc = enc;
20220#ifndef RIPPER
20221 if (p->debug_lines) {
20222 long i;
20223 for (i = 0; i < p->debug_lines->len; i++) {
20224 rb_parser_enc_associate(p, p->debug_lines->data[i], enc);
20225 }
20226 }
20227#endif
20228}
20229
20230static bool
20231comment_at_top(struct parser_params *p)
20232{
20233 if (p->token_seen) return false;
20234 return (p->line_count == (p->has_shebang ? 2 : 1));
20235}
20236
20237typedef long (*rb_magic_comment_length_t)(struct parser_params *p, const char *name, long len);
20238typedef void (*rb_magic_comment_setter_t)(struct parser_params *p, const char *name, const char *val);
20239
20240static int parser_invalid_pragma_value(struct parser_params *p, const char *name, const char *val);
20241
20242static void
20243magic_comment_encoding(struct parser_params *p, const char *name, const char *val)
20244{
20245 if (!comment_at_top(p)) {
20246 return;
20247 }
20248 parser_set_encode(p, val);
20249}
20250
20251static int
20252parser_get_bool(struct parser_params *p, const char *name, const char *val)
20253{
20254 switch (*val) {
20255 case 't': case 'T':
20256 if (STRCASECMP(val, "true") == 0) {
20257 return TRUE;
20258 }
20259 break;
20260 case 'f': case 'F':
20261 if (STRCASECMP(val, "false") == 0) {
20262 return FALSE;
20263 }
20264 break;
20265 }
20266 return parser_invalid_pragma_value(p, name, val);
20267}
20268
20269static int
20270parser_invalid_pragma_value(struct parser_params *p, const char *name, const char *val)
20271{
20272 rb_warning2("invalid value for %s: %s", WARN_S(name), WARN_S(val));
20273 return -1;
20274}
20275
20276static void
20277parser_set_token_info(struct parser_params *p, const char *name, const char *val)
20278{
20279 int b = parser_get_bool(p, name, val);
20280 if (b >= 0) p->token_info_enabled = b;
20281}
20282
20283static void
20284parser_set_frozen_string_literal(struct parser_params *p, const char *name, const char *val)
20285{
20286 int b;
20287
20288 if (p->token_seen) {
20289 rb_warning1("'%s' is ignored after any tokens", WARN_S(name));
20290 return;
20291 }
20292
20293 b = parser_get_bool(p, name, val);
20294 if (b < 0) return;
20295
20296 p->frozen_string_literal = b;
20297}
20298
20299static void
20300parser_set_shareable_constant_value(struct parser_params *p, const char *name, const char *val)
20301{
20302 for (const char *s = p->lex.pbeg, *e = p->lex.pcur; s < e; ++s) {
20303 if (*s == ' ' || *s == '\t') continue;
20304 if (*s == '#') break;
20305 rb_warning1("'%s' is ignored unless in comment-only line", WARN_S(name));
20306 return;
20307 }
20308
20309 switch (*val) {
20310 case 'n': case 'N':
20311 if (STRCASECMP(val, "none") == 0) {
20312 p->ctxt.shareable_constant_value = rb_parser_shareable_none;
20313 return;
20314 }
20315 break;
20316 case 'l': case 'L':
20317 if (STRCASECMP(val, "literal") == 0) {
20318 p->ctxt.shareable_constant_value = rb_parser_shareable_literal;
20319 return;
20320 }
20321 break;
20322 case 'e': case 'E':
20323 if (STRCASECMP(val, "experimental_copy") == 0) {
20324 p->ctxt.shareable_constant_value = rb_parser_shareable_copy;
20325 return;
20326 }
20327 if (STRCASECMP(val, "experimental_everything") == 0) {
20328 p->ctxt.shareable_constant_value = rb_parser_shareable_everything;
20329 return;
20330 }
20331 break;
20332 }
20333 parser_invalid_pragma_value(p, name, val);
20334}
20335
20336# if WARN_PAST_SCOPE
20337static void
20338parser_set_past_scope(struct parser_params *p, const char *name, const char *val)
20339{
20340 int b = parser_get_bool(p, name, val);
20341 if (b >= 0) p->past_scope_enabled = b;
20342}
20343# endif
20344
20346 const char *name;
20347 rb_magic_comment_setter_t func;
20348 rb_magic_comment_length_t length;
20349};
20350
20351static const struct magic_comment magic_comments[] = {
20352 {"coding", magic_comment_encoding, parser_encode_length},
20353 {"encoding", magic_comment_encoding, parser_encode_length},
20354 {"frozen_string_literal", parser_set_frozen_string_literal},
20355 {"shareable_constant_value", parser_set_shareable_constant_value},
20356 {"warn_indent", parser_set_token_info},
20357# if WARN_PAST_SCOPE
20358 {"warn_past_scope", parser_set_past_scope},
20359# endif
20360};
20361
20362static const char *
20363magic_comment_marker(const char *str, long len)
20364{
20365 long i = 2;
20366
20367 while (i < len) {
20368 switch (str[i]) {
20369 case '-':
20370 if (str[i-1] == '*' && str[i-2] == '-') {
20371 return str + i + 1;
20372 }
20373 i += 2;
20374 break;
20375 case '*':
20376 if (i + 1 >= len) return 0;
20377 if (str[i+1] != '-') {
20378 i += 4;
20379 }
20380 else if (str[i-1] != '-') {
20381 i += 2;
20382 }
20383 else {
20384 return str + i + 2;
20385 }
20386 break;
20387 default:
20388 i += 3;
20389 break;
20390 }
20391 }
20392 return 0;
20393}
20394
20395static int
20396parser_magic_comment(struct parser_params *p, const char *str, long len)
20397{
20398 int indicator = 0;
20399 VALUE name = 0, val = 0;
20400 const char *beg, *end, *vbeg, *vend;
20401#define str_copy(_s, _p, _n) ((_s) \
20402 ? (void)(rb_str_resize((_s), (_n)), \
20403 MEMCPY(RSTRING_PTR(_s), (_p), char, (_n)), (_s)) \
20404 : (void)((_s) = STR_NEW((_p), (_n))))
20405
20406 if (len <= 7) return FALSE;
20407 if (!!(beg = magic_comment_marker(str, len))) {
20408 if (!(end = magic_comment_marker(beg, str + len - beg)))
20409 return FALSE;
20410 indicator = TRUE;
20411 str = beg;
20412 len = end - beg - 3;
20413 }
20414
20415 /* %r"([^\\s\'\":;]+)\\s*:\\s*(\"(?:\\\\.|[^\"])*\"|[^\"\\s;]+)[\\s;]*" */
20416 while (len > 0) {
20417 const struct magic_comment *mc = magic_comments;
20418 char *s;
20419 int i;
20420 long n = 0;
20421
20422 for (; len > 0 && *str; str++, --len) {
20423 switch (*str) {
20424 case '\'': case '"': case ':': case ';':
20425 continue;
20426 }
20427 if (!ISSPACE(*str)) break;
20428 }
20429 for (beg = str; len > 0; str++, --len) {
20430 switch (*str) {
20431 case '\'': case '"': case ':': case ';':
20432 break;
20433 default:
20434 if (ISSPACE(*str)) break;
20435 continue;
20436 }
20437 break;
20438 }
20439 for (end = str; len > 0 && ISSPACE(*str); str++, --len);
20440 if (!len) break;
20441 if (*str != ':') {
20442 if (!indicator) return FALSE;
20443 continue;
20444 }
20445
20446 do str++; while (--len > 0 && ISSPACE(*str));
20447 if (!len) break;
20448 const char *tok_beg = str;
20449 if (*str == '"') {
20450 for (vbeg = ++str; --len > 0 && *str != '"'; str++) {
20451 if (*str == '\\') {
20452 --len;
20453 ++str;
20454 }
20455 }
20456 vend = str;
20457 if (len) {
20458 --len;
20459 ++str;
20460 }
20461 }
20462 else {
20463 for (vbeg = str; len > 0 && *str != '"' && *str != ';' && !ISSPACE(*str); --len, str++);
20464 vend = str;
20465 }
20466 const char *tok_end = str;
20467 if (indicator) {
20468 while (len > 0 && (*str == ';' || ISSPACE(*str))) --len, str++;
20469 }
20470 else {
20471 while (len > 0 && (ISSPACE(*str))) --len, str++;
20472 if (len) return FALSE;
20473 }
20474
20475 n = end - beg;
20476 str_copy(name, beg, n);
20477 s = RSTRING_PTR(name);
20478 for (i = 0; i < n; ++i) {
20479 if (s[i] == '-') s[i] = '_';
20480 }
20481 do {
20482 if (STRNCASECMP(mc->name, s, n) == 0 && !mc->name[n]) {
20483 n = vend - vbeg;
20484 if (mc->length) {
20485 n = (*mc->length)(p, vbeg, n);
20486 }
20487 str_copy(val, vbeg, n);
20488 p->lex.ptok = tok_beg;
20489 p->lex.pcur = tok_end;
20490 (*mc->func)(p, mc->name, RSTRING_PTR(val));
20491 break;
20492 }
20493 } while (++mc < magic_comments + numberof(magic_comments));
20494#ifdef RIPPER
20495 str_copy(val, vbeg, vend - vbeg);
20496 dispatch2(magic_comment, name, val);
20497#endif
20498 }
20499
20500 return TRUE;
20501}
20502
20503static void
20504set_file_encoding(struct parser_params *p, const char *str, const char *send)
20505{
20506 int sep = 0;
20507 const char *beg = str;
20508 VALUE s;
20509
20510 for (;;) {
20511 if (send - str <= 6) return;
20512 switch (str[6]) {
20513 case 'C': case 'c': str += 6; continue;
20514 case 'O': case 'o': str += 5; continue;
20515 case 'D': case 'd': str += 4; continue;
20516 case 'I': case 'i': str += 3; continue;
20517 case 'N': case 'n': str += 2; continue;
20518 case 'G': case 'g': str += 1; continue;
20519 case '=': case ':':
20520 sep = 1;
20521 str += 6;
20522 break;
20523 default:
20524 str += 6;
20525 if (ISSPACE(*str)) break;
20526 continue;
20527 }
20528 if (STRNCASECMP(str-6, "coding", 6) == 0) break;
20529 sep = 0;
20530 }
20531 for (;;) {
20532 do {
20533 if (++str >= send) return;
20534 } while (ISSPACE(*str));
20535 if (sep) break;
20536 if (*str != '=' && *str != ':') return;
20537 sep = 1;
20538 str++;
20539 }
20540 beg = str;
20541 while ((*str == '-' || *str == '_' || ISALNUM(*str)) && ++str < send);
20542 s = rb_str_new(beg, parser_encode_length(p, beg, str - beg));
20543 p->lex.ptok = beg;
20544 p->lex.pcur = str;
20545 parser_set_encode(p, RSTRING_PTR(s));
20546 rb_str_resize(s, 0);
20547}
20548
20549static void
20550parser_prepare(struct parser_params *p)
20551{
20552 int c = nextc0(p, FALSE);
20553 p->token_info_enabled = !compile_for_eval && RTEST(ruby_verbose);
20554 switch (c) {
20555 case '#':
20556 if (peek(p, '!')) p->has_shebang = 1;
20557 break;
20558 case 0xef: /* UTF-8 BOM marker */
20559 if (!lex_eol_n_p(p, 2) &&
20560 (unsigned char)p->lex.pcur[0] == 0xbb &&
20561 (unsigned char)p->lex.pcur[1] == 0xbf) {
20562 p->enc = rb_utf8_encoding();
20563 p->lex.pcur += 2;
20564#ifndef RIPPER
20565 if (p->debug_lines) {
20566 rb_parser_string_set_encoding(p->lex.lastline, p->enc);
20567 }
20568#endif
20569 p->lex.pbeg = p->lex.pcur;
20570 token_flush(p);
20571 return;
20572 }
20573 break;
20574 case -1: /* end of script. */
20575 return;
20576 }
20577 pushback(p, c);
20578 p->enc = rb_parser_str_get_encoding(p->lex.lastline);
20579}
20580
20581#ifndef RIPPER
20582#define ambiguous_operator(tok, op, syn) ( \
20583 rb_warning0("'"op"' after local variable or literal is interpreted as binary operator"), \
20584 rb_warning0("even though it seems like "syn""))
20585#else
20586#define ambiguous_operator(tok, op, syn) \
20587 dispatch2(operator_ambiguous, TOKEN2VAL(tok), rb_str_new_cstr(syn))
20588#endif
20589#define warn_balanced(tok, op, syn) ((void) \
20590 (!IS_lex_state_for(last_state, EXPR_CLASS|EXPR_DOT|EXPR_FNAME|EXPR_ENDFN) && \
20591 space_seen && !ISSPACE(c) && \
20592 (ambiguous_operator(tok, op, syn), 0)), \
20593 (enum yytokentype)(tok))
20594
20595static enum yytokentype
20596no_digits(struct parser_params *p)
20597{
20598 yyerror0("numeric literal without digits");
20599 if (peek(p, '_')) nextc(p);
20600 /* dummy 0, for tUMINUS_NUM at numeric */
20601 return set_number_literal(p, tINTEGER, 0, 10, 0);
20602}
20603
20604static enum yytokentype
20605parse_numeric(struct parser_params *p, int c)
20606{
20607 int is_float, seen_point, seen_e, nondigit;
20608 int suffix;
20609
20610 is_float = seen_point = seen_e = nondigit = 0;
20611 SET_LEX_STATE(EXPR_END);
20612 newtok(p);
20613 if (c == '-' || c == '+') {
20614 tokadd(p, c);
20615 c = nextc(p);
20616 }
20617 if (c == '0') {
20618 int start = toklen(p);
20619 c = nextc(p);
20620 if (c == 'x' || c == 'X') {
20621 /* hexadecimal */
20622 c = nextc(p);
20623 if (c != -1 && ISXDIGIT(c)) {
20624 do {
20625 if (c == '_') {
20626 if (nondigit) break;
20627 nondigit = c;
20628 continue;
20629 }
20630 if (!ISXDIGIT(c)) break;
20631 nondigit = 0;
20632 tokadd(p, c);
20633 } while ((c = nextc(p)) != -1);
20634 }
20635 pushback(p, c);
20636 tokfix(p);
20637 if (toklen(p) == start) {
20638 return no_digits(p);
20639 }
20640 else if (nondigit) goto trailing_uc;
20641 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
20642 return set_number_literal(p, tINTEGER, suffix, 16, 0);
20643 }
20644 if (c == 'b' || c == 'B') {
20645 /* binary */
20646 c = nextc(p);
20647 if (c == '0' || c == '1') {
20648 do {
20649 if (c == '_') {
20650 if (nondigit) break;
20651 nondigit = c;
20652 continue;
20653 }
20654 if (c != '0' && c != '1') break;
20655 nondigit = 0;
20656 tokadd(p, c);
20657 } while ((c = nextc(p)) != -1);
20658 }
20659 pushback(p, c);
20660 tokfix(p);
20661 if (toklen(p) == start) {
20662 return no_digits(p);
20663 }
20664 else if (nondigit) goto trailing_uc;
20665 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
20666 return set_number_literal(p, tINTEGER, suffix, 2, 0);
20667 }
20668 if (c == 'd' || c == 'D') {
20669 /* decimal */
20670 c = nextc(p);
20671 if (c != -1 && ISDIGIT(c)) {
20672 do {
20673 if (c == '_') {
20674 if (nondigit) break;
20675 nondigit = c;
20676 continue;
20677 }
20678 if (!ISDIGIT(c)) break;
20679 nondigit = 0;
20680 tokadd(p, c);
20681 } while ((c = nextc(p)) != -1);
20682 }
20683 pushback(p, c);
20684 tokfix(p);
20685 if (toklen(p) == start) {
20686 return no_digits(p);
20687 }
20688 else if (nondigit) goto trailing_uc;
20689 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
20690 return set_number_literal(p, tINTEGER, suffix, 10, 0);
20691 }
20692 if (c == '_') {
20693 /* 0_0 */
20694 goto octal_number;
20695 }
20696 if (c == 'o' || c == 'O') {
20697 /* prefixed octal */
20698 c = nextc(p);
20699 if (c == -1 || c == '_' || !ISDIGIT(c)) {
20700 tokfix(p);
20701 return no_digits(p);
20702 }
20703 }
20704 if (c >= '0' && c <= '7') {
20705 /* octal */
20706 octal_number:
20707 do {
20708 if (c == '_') {
20709 if (nondigit) break;
20710 nondigit = c;
20711 continue;
20712 }
20713 if (c < '0' || c > '9') break;
20714 if (c > '7') goto invalid_octal;
20715 nondigit = 0;
20716 tokadd(p, c);
20717 } while ((c = nextc(p)) != -1);
20718 if (toklen(p) > start) {
20719 pushback(p, c);
20720 tokfix(p);
20721 if (nondigit) goto trailing_uc;
20722 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
20723 return set_number_literal(p, tINTEGER, suffix, 8, 0);
20724 }
20725 if (nondigit) {
20726 pushback(p, c);
20727 goto trailing_uc;
20728 }
20729 }
20730 if (c > '7' && c <= '9') {
20731 invalid_octal:
20732 yyerror0("Invalid octal digit");
20733 }
20734 else if (c == '.' || c == 'e' || c == 'E') {
20735 tokadd(p, '0');
20736 }
20737 else {
20738 pushback(p, c);
20739 tokfix(p);
20740 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
20741 return set_number_literal(p, tINTEGER, suffix, 10, 0);
20742 }
20743 }
20744
20745 for (;;) {
20746 switch (c) {
20747 case '0': case '1': case '2': case '3': case '4':
20748 case '5': case '6': case '7': case '8': case '9':
20749 nondigit = 0;
20750 tokadd(p, c);
20751 break;
20752
20753 case '.':
20754 if (nondigit) goto trailing_uc;
20755 if (seen_point || seen_e) {
20756 goto decode_num;
20757 }
20758 else {
20759 int c0 = nextc(p);
20760 if (c0 == -1 || !ISDIGIT(c0)) {
20761 pushback(p, c0);
20762 goto decode_num;
20763 }
20764 c = c0;
20765 }
20766 seen_point = toklen(p);
20767 tokadd(p, '.');
20768 tokadd(p, c);
20769 is_float++;
20770 nondigit = 0;
20771 break;
20772
20773 case 'e':
20774 case 'E':
20775 if (nondigit) {
20776 pushback(p, c);
20777 c = nondigit;
20778 goto decode_num;
20779 }
20780 if (seen_e) {
20781 goto decode_num;
20782 }
20783 nondigit = c;
20784 c = nextc(p);
20785 if (c != '-' && c != '+' && !ISDIGIT(c)) {
20786 pushback(p, c);
20787 c = nondigit;
20788 nondigit = 0;
20789 goto decode_num;
20790 }
20791 tokadd(p, nondigit);
20792 seen_e++;
20793 is_float++;
20794 tokadd(p, c);
20795 nondigit = (c == '-' || c == '+') ? c : 0;
20796 break;
20797
20798 case '_': /* `_' in number just ignored */
20799 if (nondigit) goto decode_num;
20800 nondigit = c;
20801 break;
20802
20803 default:
20804 goto decode_num;
20805 }
20806 c = nextc(p);
20807 }
20808
20809 decode_num:
20810 pushback(p, c);
20811 if (nondigit) {
20812 trailing_uc:
20813 literal_flush(p, p->lex.pcur - 1);
20814 YYLTYPE loc = RUBY_INIT_YYLLOC();
20815 compile_error(p, "trailing '%c' in number", nondigit);
20816 parser_show_error_line(p, &loc);
20817 }
20818 tokfix(p);
20819 if (is_float) {
20820 enum yytokentype type = tFLOAT;
20821
20822 suffix = number_literal_suffix(p, seen_e ? NUM_SUFFIX_I : NUM_SUFFIX_ALL);
20823 if (suffix & NUM_SUFFIX_R) {
20824 type = tRATIONAL;
20825 }
20826 else {
20827 strtod(tok(p), 0);
20828 if (errno == ERANGE) {
20829 rb_warning1("Float %s out of range", WARN_S(tok(p)));
20830 errno = 0;
20831 }
20832 }
20833 return set_number_literal(p, type, suffix, 0, seen_point);
20834 }
20835 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
20836 return set_number_literal(p, tINTEGER, suffix, 10, 0);
20837}
20838
20839static enum yytokentype
20840parse_qmark(struct parser_params *p, int space_seen)
20841{
20842 rb_encoding *enc;
20843 register int c;
20844 rb_parser_string_t *lit;
20845 const char *start = p->lex.pcur;
20846
20847 if (IS_END()) {
20848 SET_LEX_STATE(EXPR_VALUE);
20849 return '?';
20850 }
20851 c = nextc(p);
20852 if (c == -1) {
20853 compile_error(p, "incomplete character syntax");
20854 return 0;
20855 }
20856 if (rb_enc_isspace(c, p->enc)) {
20857 if (!IS_ARG()) {
20858 int c2 = escaped_control_code(c);
20859 if (c2) {
20860 WARN_SPACE_CHAR(c2, "?");
20861 }
20862 }
20863 ternary:
20864 pushback(p, c);
20865 SET_LEX_STATE(EXPR_VALUE);
20866 return '?';
20867 }
20868 newtok(p);
20869 enc = p->enc;
20870 int w = parser_precise_mbclen(p, start);
20871 if (is_identchar(p, start, p->lex.pend, p->enc) &&
20872 !(lex_eol_ptr_n_p(p, start, w) || !is_identchar(p, start + w, p->lex.pend, p->enc))) {
20873 if (space_seen) {
20874 const char *ptr = start;
20875 do {
20876 int n = parser_precise_mbclen(p, ptr);
20877 if (n < 0) return -1;
20878 ptr += n;
20879 } while (!lex_eol_ptr_p(p, ptr) && is_identchar(p, ptr, p->lex.pend, p->enc));
20880 rb_warn2("'?' just followed by '%.*s' is interpreted as" \
20881 " a conditional operator, put a space after '?'",
20882 WARN_I((int)(ptr - start)), WARN_S_L(start, (ptr - start)));
20883 }
20884 goto ternary;
20885 }
20886 else if (c == '\\') {
20887 if (peek(p, 'u')) {
20888 nextc(p);
20889 enc = rb_utf8_encoding();
20890 tokadd_utf8(p, &enc, -1, 0, 0);
20891 }
20892 else if (!ISASCII(c = peekc(p)) && c != -1) {
20893 nextc(p);
20894 if (tokadd_mbchar(p, c) == -1) return 0;
20895 }
20896 else {
20897 c = read_escape(p, 0, p->lex.pcur - rb_strlen_lit("?\\"));
20898 tokadd(p, c);
20899 }
20900 }
20901 else {
20902 if (tokadd_mbchar(p, c) == -1) return 0;
20903 }
20904 tokfix(p);
20905 lit = STR_NEW3(tok(p), toklen(p), enc, 0);
20906 set_yylval_str(lit);
20907 SET_LEX_STATE(EXPR_END);
20908 return tCHAR;
20909}
20910
20911static enum yytokentype
20912parse_percent(struct parser_params *p, const int space_seen, const enum lex_state_e last_state)
20913{
20914 register int c;
20915 const char *ptok = p->lex.pcur;
20916
20917 if (IS_BEG()) {
20918 int term;
20919 int paren;
20920
20921 c = nextc(p);
20922 quotation:
20923 if (c == -1) goto unterminated;
20924 if (!ISALNUM(c)) {
20925 term = c;
20926 if (!ISASCII(c)) goto unknown;
20927 c = 'Q';
20928 }
20929 else {
20930 term = nextc(p);
20931 if (rb_enc_isalnum(term, p->enc) || !parser_isascii(p)) {
20932 unknown:
20933 pushback(p, term);
20934 c = parser_precise_mbclen(p, p->lex.pcur);
20935 if (c < 0) return 0;
20936 p->lex.pcur += c;
20937 yyerror0("unknown type of %string");
20938 return 0;
20939 }
20940 }
20941 if (term == -1) {
20942 unterminated:
20943 compile_error(p, "unterminated quoted string meets end of file");
20944 return 0;
20945 }
20946 paren = term;
20947 if (term == '(') term = ')';
20948 else if (term == '[') term = ']';
20949 else if (term == '{') term = '}';
20950 else if (term == '<') term = '>';
20951 else paren = 0;
20952
20953 p->lex.ptok = ptok-1;
20954 switch (c) {
20955 case 'Q':
20956 p->lex.strterm = NEW_STRTERM(str_dquote, term, paren);
20957 return tSTRING_BEG;
20958
20959 case 'q':
20960 p->lex.strterm = NEW_STRTERM(str_squote, term, paren);
20961 return tSTRING_BEG;
20962
20963 case 'W':
20964 p->lex.strterm = NEW_STRTERM(str_dword, term, paren);
20965 return tWORDS_BEG;
20966
20967 case 'w':
20968 p->lex.strterm = NEW_STRTERM(str_sword, term, paren);
20969 return tQWORDS_BEG;
20970
20971 case 'I':
20972 p->lex.strterm = NEW_STRTERM(str_dword, term, paren);
20973 return tSYMBOLS_BEG;
20974
20975 case 'i':
20976 p->lex.strterm = NEW_STRTERM(str_sword, term, paren);
20977 return tQSYMBOLS_BEG;
20978
20979 case 'x':
20980 p->lex.strterm = NEW_STRTERM(str_xquote, term, paren);
20981 return tXSTRING_BEG;
20982
20983 case 'r':
20984 p->lex.strterm = NEW_STRTERM(str_regexp, term, paren);
20985 return tREGEXP_BEG;
20986
20987 case 's':
20988 p->lex.strterm = NEW_STRTERM(str_ssym, term, paren);
20989 SET_LEX_STATE(EXPR_FNAME|EXPR_FITEM);
20990 return tSYMBEG;
20991
20992 default:
20993 yyerror0("unknown type of %string");
20994 return 0;
20995 }
20996 }
20997 if ((c = nextc(p)) == '=') {
20998 set_yylval_id('%');
20999 SET_LEX_STATE(EXPR_BEG);
21000 return tOP_ASGN;
21001 }
21002 if (IS_SPCARG(c) || (IS_lex_state(EXPR_FITEM) && c == 's')) {
21003 goto quotation;
21004 }
21005 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
21006 pushback(p, c);
21007 return warn_balanced('%', "%%", "string literal");
21008}
21009
21010static int
21011tokadd_ident(struct parser_params *p, int c)
21012{
21013 do {
21014 if (tokadd_mbchar(p, c) == -1) return -1;
21015 c = nextc(p);
21016 } while (parser_is_identchar(p));
21017 pushback(p, c);
21018 return 0;
21019}
21020
21021static ID
21022tokenize_ident(struct parser_params *p)
21023{
21024 ID ident = TOK_INTERN();
21025
21026 set_yylval_name(ident);
21027
21028 return ident;
21029}
21030
21031static int
21032parse_numvar(struct parser_params *p)
21033{
21034 size_t len;
21035 int overflow;
21036 unsigned long n = ruby_scan_digits(tok(p)+1, toklen(p)-1, 10, &len, &overflow);
21037 const unsigned long nth_ref_max =
21039 /* NTH_REF is left-shifted to be ORed with back-ref flag and
21040 * turned into a Fixnum, in compile.c */
21041
21042 if (overflow || n > nth_ref_max) {
21043 /* compile_error()? */
21044 rb_warn1("'%s' is too big for a number variable, always nil", WARN_S(tok(p)));
21045 return 0; /* $0 is $PROGRAM_NAME, not NTH_REF */
21046 }
21047 else {
21048 return (int)n;
21049 }
21050}
21051
21052static enum yytokentype
21053parse_gvar(struct parser_params *p, const enum lex_state_e last_state)
21054{
21055 const char *ptr = p->lex.pcur;
21056 register int c;
21057
21058 SET_LEX_STATE(EXPR_END);
21059 p->lex.ptok = ptr - 1; /* from '$' */
21060 newtok(p);
21061 c = nextc(p);
21062 switch (c) {
21063 case '_': /* $_: last read line string */
21064 c = nextc(p);
21065 if (parser_is_identchar(p)) {
21066 tokadd(p, '$');
21067 tokadd(p, '_');
21068 break;
21069 }
21070 pushback(p, c);
21071 c = '_';
21072 /* fall through */
21073 case '~': /* $~: match-data */
21074 case '*': /* $*: argv */
21075 case '$': /* $$: pid */
21076 case '?': /* $?: last status */
21077 case '!': /* $!: error string */
21078 case '@': /* $@: error position */
21079 case '/': /* $/: input record separator */
21080 case '\\': /* $\: output record separator */
21081 case ';': /* $;: field separator */
21082 case ',': /* $,: output field separator */
21083 case '.': /* $.: last read line number */
21084 case '=': /* $=: ignorecase */
21085 case ':': /* $:: load path */
21086 case '<': /* $<: default input handle */
21087 case '>': /* $>: default output handle */
21088 case '\"': /* $": already loaded files */
21089 tokadd(p, '$');
21090 tokadd(p, c);
21091 goto gvar;
21092
21093 case '-':
21094 tokadd(p, '$');
21095 tokadd(p, c);
21096 c = nextc(p);
21097 if (parser_is_identchar(p)) {
21098 if (tokadd_mbchar(p, c) == -1) return 0;
21099 }
21100 else {
21101 pushback(p, c);
21102 pushback(p, '-');
21103 return '$';
21104 }
21105 gvar:
21106 tokenize_ident(p);
21107 return tGVAR;
21108
21109 case '&': /* $&: last match */
21110 case '`': /* $`: string before last match */
21111 case '\'': /* $': string after last match */
21112 case '+': /* $+: string matches last paren. */
21113 if (IS_lex_state_for(last_state, EXPR_FNAME)) {
21114 tokadd(p, '$');
21115 tokadd(p, c);
21116 goto gvar;
21117 }
21118 set_yylval_node(NEW_BACK_REF(c, &_cur_loc));
21119 return tBACK_REF;
21120
21121 case '1': case '2': case '3':
21122 case '4': case '5': case '6':
21123 case '7': case '8': case '9':
21124 tokadd(p, '$');
21125 do {
21126 tokadd(p, c);
21127 c = nextc(p);
21128 } while (c != -1 && ISDIGIT(c));
21129 pushback(p, c);
21130 if (IS_lex_state_for(last_state, EXPR_FNAME)) goto gvar;
21131 tokfix(p);
21132 c = parse_numvar(p);
21133 set_yylval_node(NEW_NTH_REF(c, &_cur_loc));
21134 return tNTH_REF;
21135
21136 default:
21137 if (!parser_is_identchar(p)) {
21138 YYLTYPE loc = RUBY_INIT_YYLLOC();
21139 if (c == -1 || ISSPACE(c)) {
21140 compile_error(p, "'$' without identifiers is not allowed as a global variable name");
21141 }
21142 else {
21143 pushback(p, c);
21144 compile_error(p, "'$%c' is not allowed as a global variable name", c);
21145 }
21146 parser_show_error_line(p, &loc);
21147 set_yylval_noname();
21148 return tGVAR;
21149 }
21150 /* fall through */
21151 case '0':
21152 tokadd(p, '$');
21153 }
21154
21155 if (tokadd_ident(p, c)) return 0;
21156 SET_LEX_STATE(EXPR_END);
21157 if (VALID_SYMNAME_P(tok(p), toklen(p), p->enc, ID_GLOBAL)) {
21158 tokenize_ident(p);
21159 }
21160 else {
21161 compile_error(p, "'%.*s' is not allowed as a global variable name", toklen(p), tok(p));
21162 set_yylval_noname();
21163 }
21164 return tGVAR;
21165}
21166
21167static bool
21168parser_numbered_param(struct parser_params *p, int n)
21169{
21170 if (n < 0) return false;
21171
21172 if (DVARS_TERMINAL_P(p->lvtbl->args) || DVARS_TERMINAL_P(p->lvtbl->args->prev)) {
21173 return false;
21174 }
21175 if (p->max_numparam == ORDINAL_PARAM) {
21176 compile_error(p, "ordinary parameter is defined");
21177 return false;
21178 }
21179 struct vtable *args = p->lvtbl->args;
21180 if (p->max_numparam < n) {
21181 p->max_numparam = n;
21182 }
21183 while (n > args->pos) {
21184 vtable_add(args, NUMPARAM_IDX_TO_ID(args->pos+1));
21185 }
21186 return true;
21187}
21188
21189static enum yytokentype
21190parse_atmark(struct parser_params *p, const enum lex_state_e last_state)
21191{
21192 const char *ptr = p->lex.pcur;
21193 enum yytokentype result = tIVAR;
21194 register int c = nextc(p);
21195 YYLTYPE loc;
21196
21197 p->lex.ptok = ptr - 1; /* from '@' */
21198 newtok(p);
21199 tokadd(p, '@');
21200 if (c == '@') {
21201 result = tCVAR;
21202 tokadd(p, '@');
21203 c = nextc(p);
21204 }
21205 SET_LEX_STATE(IS_lex_state_for(last_state, EXPR_FNAME) ? EXPR_ENDFN : EXPR_END);
21206 if (c == -1 || !parser_is_identchar(p)) {
21207 pushback(p, c);
21208 RUBY_SET_YYLLOC(loc);
21209 if (result == tIVAR) {
21210 compile_error(p, "'@' without identifiers is not allowed as an instance variable name");
21211 }
21212 else {
21213 compile_error(p, "'@@' without identifiers is not allowed as a class variable name");
21214 }
21215 parser_show_error_line(p, &loc);
21216 set_yylval_noname();
21217 SET_LEX_STATE(EXPR_END);
21218 return result;
21219 }
21220 else if (ISDIGIT(c)) {
21221 pushback(p, c);
21222 RUBY_SET_YYLLOC(loc);
21223 if (result == tIVAR) {
21224 compile_error(p, "'@%c' is not allowed as an instance variable name", c);
21225 }
21226 else {
21227 compile_error(p, "'@@%c' is not allowed as a class variable name", c);
21228 }
21229 parser_show_error_line(p, &loc);
21230 set_yylval_noname();
21231 SET_LEX_STATE(EXPR_END);
21232 return result;
21233 }
21234
21235 if (tokadd_ident(p, c)) return 0;
21236 tokenize_ident(p);
21237 return result;
21238}
21239
21240static enum yytokentype
21241parse_ident(struct parser_params *p, int c, int cmd_state)
21242{
21243 enum yytokentype result;
21244 bool is_ascii = true;
21245 const enum lex_state_e last_state = p->lex.state;
21246 ID ident;
21247 int enforce_keyword_end = 0;
21248
21249 do {
21250 if (!ISASCII(c)) is_ascii = false;
21251 if (tokadd_mbchar(p, c) == -1) return 0;
21252 c = nextc(p);
21253 } while (parser_is_identchar(p));
21254 if ((c == '!' || c == '?') && !peek(p, '=')) {
21255 result = tFID;
21256 tokadd(p, c);
21257 }
21258 else if (c == '=' && IS_lex_state(EXPR_FNAME) &&
21259 (!peek(p, '~') && !peek(p, '>') && (!peek(p, '=') || (peek_n(p, '>', 1))))) {
21260 result = tIDENTIFIER;
21261 tokadd(p, c);
21262 }
21263 else {
21264 result = tCONSTANT; /* assume provisionally */
21265 pushback(p, c);
21266 }
21267 tokfix(p);
21268
21269 if (IS_LABEL_POSSIBLE()) {
21270 if (IS_LABEL_SUFFIX(0)) {
21271 SET_LEX_STATE(EXPR_ARG|EXPR_LABELED);
21272 nextc(p);
21273 tokenize_ident(p);
21274 return tLABEL;
21275 }
21276 }
21277
21278#ifndef RIPPER
21279 if (peek_end_expect_token_locations(p)) {
21280 const rb_code_position_t *end_pos;
21281 int lineno, column;
21282 int beg_pos = (int)(p->lex.ptok - p->lex.pbeg);
21283
21284 end_pos = peek_end_expect_token_locations(p)->pos;
21285 lineno = end_pos->lineno;
21286 column = end_pos->column;
21287
21288 if (p->debug) {
21289 rb_parser_printf(p, "enforce_keyword_end check. current: (%d, %d), peek: (%d, %d)\n",
21290 p->ruby_sourceline, beg_pos, lineno, column);
21291 }
21292
21293 if ((p->ruby_sourceline > lineno) && (beg_pos <= column)) {
21294 const struct kwtable *kw;
21295
21296 if ((IS_lex_state(EXPR_DOT)) && (kw = rb_reserved_word(tok(p), toklen(p))) && (kw && kw->id[0] == keyword_end)) {
21297 if (p->debug) rb_parser_printf(p, "enforce_keyword_end is enabled\n");
21298 enforce_keyword_end = 1;
21299 }
21300 }
21301 }
21302#endif
21303
21304 if (is_ascii && (!IS_lex_state(EXPR_DOT) || enforce_keyword_end)) {
21305 const struct kwtable *kw;
21306
21307 /* See if it is a reserved word. */
21308 kw = rb_reserved_word(tok(p), toklen(p));
21309 if (kw) {
21310 enum lex_state_e state = p->lex.state;
21311 if (IS_lex_state_for(state, EXPR_FNAME)) {
21312 SET_LEX_STATE(EXPR_ENDFN);
21313 set_yylval_name(rb_intern2(tok(p), toklen(p)));
21314 return kw->id[0];
21315 }
21316 SET_LEX_STATE(kw->state);
21317 if (IS_lex_state(EXPR_BEG)) {
21318 p->command_start = TRUE;
21319 }
21320 if (kw->id[0] == keyword_do) {
21321 if (lambda_beginning_p()) {
21322 p->lex.lpar_beg = -1; /* make lambda_beginning_p() == FALSE in the body of "-> do ... end" */
21323 return keyword_do_LAMBDA;
21324 }
21325 if (COND_P()) return keyword_do_cond;
21326 if (CMDARG_P() && !IS_lex_state_for(state, EXPR_CMDARG))
21327 return keyword_do_block;
21328 return keyword_do;
21329 }
21330 if (IS_lex_state_for(state, (EXPR_BEG | EXPR_LABELED | EXPR_CLASS)))
21331 return kw->id[0];
21332 else {
21333 if (kw->id[0] != kw->id[1])
21334 SET_LEX_STATE(EXPR_BEG | EXPR_LABEL);
21335 return kw->id[1];
21336 }
21337 }
21338 }
21339
21340 if (IS_lex_state(EXPR_BEG_ANY | EXPR_ARG_ANY | EXPR_DOT)) {
21341 if (cmd_state) {
21342 SET_LEX_STATE(EXPR_CMDARG);
21343 }
21344 else {
21345 SET_LEX_STATE(EXPR_ARG);
21346 }
21347 }
21348 else if (p->lex.state == EXPR_FNAME) {
21349 SET_LEX_STATE(EXPR_ENDFN);
21350 }
21351 else {
21352 SET_LEX_STATE(EXPR_END);
21353 }
21354
21355 ident = tokenize_ident(p);
21356 if (result == tCONSTANT && is_local_id(ident)) result = tIDENTIFIER;
21357 if (!IS_lex_state_for(last_state, EXPR_DOT|EXPR_FNAME) &&
21358 (result == tIDENTIFIER) && /* not EXPR_FNAME, not attrasgn */
21359 (lvar_defined(p, ident) || NUMPARAM_ID_P(ident))) {
21360 SET_LEX_STATE(EXPR_END|EXPR_LABEL);
21361 }
21362 return result;
21363}
21364
21365static void
21366warn_cr(struct parser_params *p)
21367{
21368 if (!p->cr_seen) {
21369 p->cr_seen = TRUE;
21370 /* carried over with p->lex.nextline for nextc() */
21371 rb_warn0("encountered \\r in middle of line, treated as a mere space");
21372 }
21373}
21374
21375static enum yytokentype
21376parser_yylex(struct parser_params *p)
21377{
21378 register int c;
21379 int space_seen = 0;
21380 int cmd_state;
21381 int label;
21382 enum lex_state_e last_state;
21383 int fallthru = FALSE;
21384 int token_seen = p->token_seen;
21385
21386 if (p->lex.strterm) {
21387 if (strterm_is_heredoc(p->lex.strterm)) {
21388 token_flush(p);
21389 return here_document(p, &p->lex.strterm->u.heredoc);
21390 }
21391 else {
21392 token_flush(p);
21393 return parse_string(p, &p->lex.strterm->u.literal);
21394 }
21395 }
21396 cmd_state = p->command_start;
21397 p->command_start = FALSE;
21398 p->token_seen = TRUE;
21399#ifndef RIPPER
21400 token_flush(p);
21401#endif
21402 retry:
21403 last_state = p->lex.state;
21404 switch (c = nextc(p)) {
21405 case '\0': /* NUL */
21406 case '\004': /* ^D */
21407 case '\032': /* ^Z */
21408 case -1: /* end of script. */
21409 p->eofp = 1;
21410#ifndef RIPPER
21411 if (p->end_expect_token_locations) {
21412 pop_end_expect_token_locations(p);
21413 RUBY_SET_YYLLOC_OF_DUMMY_END(*p->yylloc);
21414 return tDUMNY_END;
21415 }
21416#endif
21417 /* Set location for end-of-input because dispatch_scan_event is not called. */
21418 RUBY_SET_YYLLOC(*p->yylloc);
21419 return END_OF_INPUT;
21420
21421 /* white spaces */
21422 case '\r':
21423 warn_cr(p);
21424 /* fall through */
21425 case ' ': case '\t': case '\f':
21426 case '\13': /* '\v' */
21427 space_seen = 1;
21428 while ((c = nextc(p))) {
21429 switch (c) {
21430 case '\r':
21431 warn_cr(p);
21432 /* fall through */
21433 case ' ': case '\t': case '\f':
21434 case '\13': /* '\v' */
21435 break;
21436 default:
21437 goto outofloop;
21438 }
21439 }
21440 outofloop:
21441 pushback(p, c);
21442 dispatch_scan_event(p, tSP);
21443#ifndef RIPPER
21444 token_flush(p);
21445#endif
21446 goto retry;
21447
21448 case '#': /* it's a comment */
21449 p->token_seen = token_seen;
21450 const char *const pcur = p->lex.pcur, *const ptok = p->lex.ptok;
21451 /* no magic_comment in shebang line */
21452 if (!parser_magic_comment(p, p->lex.pcur, p->lex.pend - p->lex.pcur)) {
21453 if (comment_at_top(p)) {
21454 set_file_encoding(p, p->lex.pcur, p->lex.pend);
21455 }
21456 }
21457 p->lex.pcur = pcur, p->lex.ptok = ptok;
21458 lex_goto_eol(p);
21459 dispatch_scan_event(p, tCOMMENT);
21460 fallthru = TRUE;
21461 /* fall through */
21462 case '\n':
21463 p->token_seen = token_seen;
21464 rb_parser_string_t *prevline = p->lex.lastline;
21465 c = (IS_lex_state(EXPR_BEG|EXPR_CLASS|EXPR_FNAME|EXPR_DOT) &&
21466 !IS_lex_state(EXPR_LABELED));
21467 if (c || IS_lex_state_all(EXPR_ARG|EXPR_LABELED)) {
21468 if (!fallthru) {
21469 dispatch_scan_event(p, tIGNORED_NL);
21470 }
21471 fallthru = FALSE;
21472 if (!c && p->ctxt.in_kwarg) {
21473 goto normal_newline;
21474 }
21475 goto retry;
21476 }
21477 while (1) {
21478 switch (c = nextc(p)) {
21479 case ' ': case '\t': case '\f': case '\r':
21480 case '\13': /* '\v' */
21481 space_seen = 1;
21482 break;
21483 case '#':
21484 pushback(p, c);
21485 if (space_seen) {
21486 dispatch_scan_event(p, tSP);
21487 token_flush(p);
21488 }
21489 goto retry;
21490 case '&':
21491 case '.': {
21492 dispatch_delayed_token(p, tIGNORED_NL);
21493 if (peek(p, '.') == (c == '&')) {
21494 pushback(p, c);
21495 dispatch_scan_event(p, tSP);
21496 goto retry;
21497 }
21498 }
21499 default:
21500 p->ruby_sourceline--;
21501 p->lex.nextline = p->lex.lastline;
21502 set_lastline(p, prevline);
21503 case -1: /* EOF no decrement*/
21504 if (c == -1 && space_seen) {
21505 dispatch_scan_event(p, tSP);
21506 }
21507 lex_goto_eol(p);
21508 if (c != -1) {
21509 token_flush(p);
21510 RUBY_SET_YYLLOC(*p->yylloc);
21511 }
21512 goto normal_newline;
21513 }
21514 }
21515 normal_newline:
21516 p->command_start = TRUE;
21517 SET_LEX_STATE(EXPR_BEG);
21518 return '\n';
21519
21520 case '*':
21521 if ((c = nextc(p)) == '*') {
21522 if ((c = nextc(p)) == '=') {
21523 set_yylval_id(idPow);
21524 SET_LEX_STATE(EXPR_BEG);
21525 return tOP_ASGN;
21526 }
21527 pushback(p, c);
21528 if (IS_SPCARG(c)) {
21529 rb_warning0("'**' interpreted as argument prefix");
21530 c = tDSTAR;
21531 }
21532 else if (IS_BEG()) {
21533 c = tDSTAR;
21534 }
21535 else {
21536 c = warn_balanced((enum ruby_method_ids)tPOW, "**", "argument prefix");
21537 }
21538 }
21539 else {
21540 if (c == '=') {
21541 set_yylval_id('*');
21542 SET_LEX_STATE(EXPR_BEG);
21543 return tOP_ASGN;
21544 }
21545 pushback(p, c);
21546 if (IS_SPCARG(c)) {
21547 rb_warning0("'*' interpreted as argument prefix");
21548 c = tSTAR;
21549 }
21550 else if (IS_BEG()) {
21551 c = tSTAR;
21552 }
21553 else {
21554 c = warn_balanced('*', "*", "argument prefix");
21555 }
21556 }
21557 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
21558 return c;
21559
21560 case '!':
21561 c = nextc(p);
21562 if (IS_AFTER_OPERATOR()) {
21563 SET_LEX_STATE(EXPR_ARG);
21564 if (c == '@') {
21565 return '!';
21566 }
21567 }
21568 else {
21569 SET_LEX_STATE(EXPR_BEG);
21570 }
21571 if (c == '=') {
21572 return tNEQ;
21573 }
21574 if (c == '~') {
21575 return tNMATCH;
21576 }
21577 pushback(p, c);
21578 return '!';
21579
21580 case '=':
21581 if (was_bol(p)) {
21582 /* skip embedded rd document */
21583 if (word_match_p(p, "begin", 5)) {
21584 int first_p = TRUE;
21585
21586 lex_goto_eol(p);
21587 dispatch_scan_event(p, tEMBDOC_BEG);
21588 for (;;) {
21589 lex_goto_eol(p);
21590 if (!first_p) {
21591 dispatch_scan_event(p, tEMBDOC);
21592 }
21593 first_p = FALSE;
21594 c = nextc(p);
21595 if (c == -1) {
21596 compile_error(p, "embedded document meets end of file");
21597 return END_OF_INPUT;
21598 }
21599 if (c == '=' && word_match_p(p, "end", 3)) {
21600 break;
21601 }
21602 pushback(p, c);
21603 }
21604 lex_goto_eol(p);
21605 dispatch_scan_event(p, tEMBDOC_END);
21606 goto retry;
21607 }
21608 }
21609
21610 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
21611 if ((c = nextc(p)) == '=') {
21612 if ((c = nextc(p)) == '=') {
21613 return tEQQ;
21614 }
21615 pushback(p, c);
21616 return tEQ;
21617 }
21618 if (c == '~') {
21619 return tMATCH;
21620 }
21621 else if (c == '>') {
21622 return tASSOC;
21623 }
21624 pushback(p, c);
21625 return '=';
21626
21627 case '<':
21628 c = nextc(p);
21629 if (c == '<' &&
21630 !IS_lex_state(EXPR_DOT | EXPR_CLASS) &&
21631 !IS_END() &&
21632 (!IS_ARG() || IS_lex_state(EXPR_LABELED) || space_seen)) {
21633 enum yytokentype token = heredoc_identifier(p);
21634 if (token) return token < 0 ? 0 : token;
21635 }
21636 if (IS_AFTER_OPERATOR()) {
21637 SET_LEX_STATE(EXPR_ARG);
21638 }
21639 else {
21640 if (IS_lex_state(EXPR_CLASS))
21641 p->command_start = TRUE;
21642 SET_LEX_STATE(EXPR_BEG);
21643 }
21644 if (c == '=') {
21645 if ((c = nextc(p)) == '>') {
21646 return tCMP;
21647 }
21648 pushback(p, c);
21649 return tLEQ;
21650 }
21651 if (c == '<') {
21652 if ((c = nextc(p)) == '=') {
21653 set_yylval_id(idLTLT);
21654 SET_LEX_STATE(EXPR_BEG);
21655 return tOP_ASGN;
21656 }
21657 pushback(p, c);
21658 return warn_balanced((enum ruby_method_ids)tLSHFT, "<<", "here document");
21659 }
21660 pushback(p, c);
21661 return '<';
21662
21663 case '>':
21664 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
21665 if ((c = nextc(p)) == '=') {
21666 return tGEQ;
21667 }
21668 if (c == '>') {
21669 if ((c = nextc(p)) == '=') {
21670 set_yylval_id(idGTGT);
21671 SET_LEX_STATE(EXPR_BEG);
21672 return tOP_ASGN;
21673 }
21674 pushback(p, c);
21675 return tRSHFT;
21676 }
21677 pushback(p, c);
21678 return '>';
21679
21680 case '"':
21681 label = (IS_LABEL_POSSIBLE() ? str_label : 0);
21682 p->lex.strterm = NEW_STRTERM(str_dquote | label, '"', 0);
21683 p->lex.ptok = p->lex.pcur-1;
21684 return tSTRING_BEG;
21685
21686 case '`':
21687 if (IS_lex_state(EXPR_FNAME)) {
21688 SET_LEX_STATE(EXPR_ENDFN);
21689 return c;
21690 }
21691 if (IS_lex_state(EXPR_DOT)) {
21692 if (cmd_state)
21693 SET_LEX_STATE(EXPR_CMDARG);
21694 else
21695 SET_LEX_STATE(EXPR_ARG);
21696 return c;
21697 }
21698 p->lex.strterm = NEW_STRTERM(str_xquote, '`', 0);
21699 return tXSTRING_BEG;
21700
21701 case '\'':
21702 label = (IS_LABEL_POSSIBLE() ? str_label : 0);
21703 p->lex.strterm = NEW_STRTERM(str_squote | label, '\'', 0);
21704 p->lex.ptok = p->lex.pcur-1;
21705 return tSTRING_BEG;
21706
21707 case '?':
21708 return parse_qmark(p, space_seen);
21709
21710 case '&':
21711 if ((c = nextc(p)) == '&') {
21712 SET_LEX_STATE(EXPR_BEG);
21713 if ((c = nextc(p)) == '=') {
21714 set_yylval_id(idANDOP);
21715 SET_LEX_STATE(EXPR_BEG);
21716 return tOP_ASGN;
21717 }
21718 pushback(p, c);
21719 return tANDOP;
21720 }
21721 else if (c == '=') {
21722 set_yylval_id('&');
21723 SET_LEX_STATE(EXPR_BEG);
21724 return tOP_ASGN;
21725 }
21726 else if (c == '.') {
21727 set_yylval_id(idANDDOT);
21728 SET_LEX_STATE(EXPR_DOT);
21729 return tANDDOT;
21730 }
21731 pushback(p, c);
21732 if (IS_SPCARG(c)) {
21733 if ((c != ':') ||
21734 (c = peekc_n(p, 1)) == -1 ||
21735 !(c == '\'' || c == '"' ||
21736 is_identchar(p, (p->lex.pcur+1), p->lex.pend, p->enc))) {
21737 rb_warning0("'&' interpreted as argument prefix");
21738 }
21739 c = tAMPER;
21740 }
21741 else if (IS_BEG()) {
21742 c = tAMPER;
21743 }
21744 else {
21745 c = warn_balanced('&', "&", "argument prefix");
21746 }
21747 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
21748 return c;
21749
21750 case '|':
21751 if ((c = nextc(p)) == '|') {
21752 SET_LEX_STATE(EXPR_BEG);
21753 if ((c = nextc(p)) == '=') {
21754 set_yylval_id(idOROP);
21755 SET_LEX_STATE(EXPR_BEG);
21756 return tOP_ASGN;
21757 }
21758 pushback(p, c);
21759 if (IS_lex_state_for(last_state, EXPR_BEG)) {
21760 c = '|';
21761 pushback(p, '|');
21762 return c;
21763 }
21764 return tOROP;
21765 }
21766 if (c == '=') {
21767 set_yylval_id('|');
21768 SET_LEX_STATE(EXPR_BEG);
21769 return tOP_ASGN;
21770 }
21771 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG|EXPR_LABEL);
21772 pushback(p, c);
21773 return '|';
21774
21775 case '+':
21776 c = nextc(p);
21777 if (IS_AFTER_OPERATOR()) {
21778 SET_LEX_STATE(EXPR_ARG);
21779 if (c == '@') {
21780 return tUPLUS;
21781 }
21782 pushback(p, c);
21783 return '+';
21784 }
21785 if (c == '=') {
21786 set_yylval_id('+');
21787 SET_LEX_STATE(EXPR_BEG);
21788 return tOP_ASGN;
21789 }
21790 if (IS_BEG() || (IS_SPCARG(c) && arg_ambiguous(p, '+'))) {
21791 SET_LEX_STATE(EXPR_BEG);
21792 pushback(p, c);
21793 if (c != -1 && ISDIGIT(c)) {
21794 return parse_numeric(p, '+');
21795 }
21796 return tUPLUS;
21797 }
21798 SET_LEX_STATE(EXPR_BEG);
21799 pushback(p, c);
21800 return warn_balanced('+', "+", "unary operator");
21801
21802 case '-':
21803 c = nextc(p);
21804 if (IS_AFTER_OPERATOR()) {
21805 SET_LEX_STATE(EXPR_ARG);
21806 if (c == '@') {
21807 return tUMINUS;
21808 }
21809 pushback(p, c);
21810 return '-';
21811 }
21812 if (c == '=') {
21813 set_yylval_id('-');
21814 SET_LEX_STATE(EXPR_BEG);
21815 return tOP_ASGN;
21816 }
21817 if (c == '>') {
21818 SET_LEX_STATE(EXPR_ENDFN);
21819 yylval.num = p->lex.lpar_beg;
21820 p->lex.lpar_beg = p->lex.paren_nest;
21821 return tLAMBDA;
21822 }
21823 if (IS_BEG() || (IS_SPCARG(c) && arg_ambiguous(p, '-'))) {
21824 SET_LEX_STATE(EXPR_BEG);
21825 pushback(p, c);
21826 if (c != -1 && ISDIGIT(c)) {
21827 return tUMINUS_NUM;
21828 }
21829 return tUMINUS;
21830 }
21831 SET_LEX_STATE(EXPR_BEG);
21832 pushback(p, c);
21833 return warn_balanced('-', "-", "unary operator");
21834
21835 case '.': {
21836 int is_beg = IS_BEG();
21837 SET_LEX_STATE(EXPR_BEG);
21838 if ((c = nextc(p)) == '.') {
21839 if ((c = nextc(p)) == '.') {
21840 if (p->ctxt.in_argdef || IS_LABEL_POSSIBLE()) {
21841 SET_LEX_STATE(EXPR_ENDARG);
21842 return tBDOT3;
21843 }
21844 if (p->lex.paren_nest == 0 && looking_at_eol_p(p)) {
21845 rb_warn0("... at EOL, should be parenthesized?");
21846 }
21847 return is_beg ? tBDOT3 : tDOT3;
21848 }
21849 pushback(p, c);
21850 return is_beg ? tBDOT2 : tDOT2;
21851 }
21852 pushback(p, c);
21853 if (c != -1 && ISDIGIT(c)) {
21854 char prev = p->lex.pcur-1 > p->lex.pbeg ? *(p->lex.pcur-2) : 0;
21855 parse_numeric(p, '.');
21856 if (ISDIGIT(prev)) {
21857 yyerror0("unexpected fraction part after numeric literal");
21858 }
21859 else {
21860 yyerror0("no .<digit> floating literal anymore; put 0 before dot");
21861 }
21862 SET_LEX_STATE(EXPR_END);
21863 p->lex.ptok = p->lex.pcur;
21864 goto retry;
21865 }
21866 set_yylval_id('.');
21867 SET_LEX_STATE(EXPR_DOT);
21868 return '.';
21869 }
21870
21871 case '0': case '1': case '2': case '3': case '4':
21872 case '5': case '6': case '7': case '8': case '9':
21873 return parse_numeric(p, c);
21874
21875 case ')':
21876 COND_POP();
21877 CMDARG_POP();
21878 SET_LEX_STATE(EXPR_ENDFN);
21879 p->lex.paren_nest--;
21880 return c;
21881
21882 case ']':
21883 COND_POP();
21884 CMDARG_POP();
21885 SET_LEX_STATE(EXPR_END);
21886 p->lex.paren_nest--;
21887 return c;
21888
21889 case '}':
21890 /* tSTRING_DEND does COND_POP and CMDARG_POP in the yacc's rule */
21891 if (!p->lex.brace_nest--) return tSTRING_DEND;
21892 COND_POP();
21893 CMDARG_POP();
21894 SET_LEX_STATE(EXPR_END);
21895 p->lex.paren_nest--;
21896 return c;
21897
21898 case ':':
21899 c = nextc(p);
21900 if (c == ':') {
21901 if (IS_BEG() || IS_lex_state(EXPR_CLASS) || IS_SPCARG(-1)) {
21902 SET_LEX_STATE(EXPR_BEG);
21903 return tCOLON3;
21904 }
21905 set_yylval_id(idCOLON2);
21906 SET_LEX_STATE(EXPR_DOT);
21907 return tCOLON2;
21908 }
21909 if (IS_END() || ISSPACE(c) || c == '#') {
21910 pushback(p, c);
21911 c = warn_balanced(':', ":", "symbol literal");
21912 SET_LEX_STATE(EXPR_BEG);
21913 return c;
21914 }
21915 switch (c) {
21916 case '\'':
21917 p->lex.strterm = NEW_STRTERM(str_ssym, c, 0);
21918 break;
21919 case '"':
21920 p->lex.strterm = NEW_STRTERM(str_dsym, c, 0);
21921 break;
21922 default:
21923 pushback(p, c);
21924 break;
21925 }
21926 SET_LEX_STATE(EXPR_FNAME);
21927 return tSYMBEG;
21928
21929 case '/':
21930 if (IS_BEG()) {
21931 p->lex.strterm = NEW_STRTERM(str_regexp, '/', 0);
21932 return tREGEXP_BEG;
21933 }
21934 if ((c = nextc(p)) == '=') {
21935 set_yylval_id('/');
21936 SET_LEX_STATE(EXPR_BEG);
21937 return tOP_ASGN;
21938 }
21939 pushback(p, c);
21940 if (IS_SPCARG(c)) {
21941 arg_ambiguous(p, '/');
21942 p->lex.strterm = NEW_STRTERM(str_regexp, '/', 0);
21943 return tREGEXP_BEG;
21944 }
21945 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
21946 return warn_balanced('/', "/", "regexp literal");
21947
21948 case '^':
21949 if ((c = nextc(p)) == '=') {
21950 set_yylval_id('^');
21951 SET_LEX_STATE(EXPR_BEG);
21952 return tOP_ASGN;
21953 }
21954 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
21955 pushback(p, c);
21956 return '^';
21957
21958 case ';':
21959 SET_LEX_STATE(EXPR_BEG);
21960 p->command_start = TRUE;
21961 return ';';
21962
21963 case ',':
21964 SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
21965 return ',';
21966
21967 case '~':
21968 if (IS_AFTER_OPERATOR()) {
21969 if ((c = nextc(p)) != '@') {
21970 pushback(p, c);
21971 }
21972 SET_LEX_STATE(EXPR_ARG);
21973 }
21974 else {
21975 SET_LEX_STATE(EXPR_BEG);
21976 }
21977 return '~';
21978
21979 case '(':
21980 if (IS_BEG()) {
21981 c = tLPAREN;
21982 }
21983 else if (!space_seen) {
21984 /* foo( ... ) => method call, no ambiguity */
21985 }
21986 else if (IS_ARG() || IS_lex_state_all(EXPR_END|EXPR_LABEL)) {
21987 c = tLPAREN_ARG;
21988 }
21989 else if (IS_lex_state(EXPR_ENDFN) && !lambda_beginning_p()) {
21990 rb_warning0("parentheses after method name is interpreted as "
21991 "an argument list, not a decomposed argument");
21992 }
21993 p->lex.paren_nest++;
21994 COND_PUSH(0);
21995 CMDARG_PUSH(0);
21996 SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
21997 return c;
21998
21999 case '[':
22000 p->lex.paren_nest++;
22001 if (IS_AFTER_OPERATOR()) {
22002 if ((c = nextc(p)) == ']') {
22003 p->lex.paren_nest--;
22004 SET_LEX_STATE(EXPR_ARG);
22005 if ((c = nextc(p)) == '=') {
22006 return tASET;
22007 }
22008 pushback(p, c);
22009 return tAREF;
22010 }
22011 pushback(p, c);
22012 SET_LEX_STATE(EXPR_ARG|EXPR_LABEL);
22013 return '[';
22014 }
22015 else if (IS_BEG()) {
22016 c = tLBRACK;
22017 }
22018 else if (IS_ARG() && (space_seen || IS_lex_state(EXPR_LABELED))) {
22019 c = tLBRACK;
22020 }
22021 SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
22022 COND_PUSH(0);
22023 CMDARG_PUSH(0);
22024 return c;
22025
22026 case '{':
22027 ++p->lex.brace_nest;
22028 if (lambda_beginning_p())
22029 c = tLAMBEG;
22030 else if (IS_lex_state(EXPR_LABELED))
22031 c = tLBRACE; /* hash */
22032 else if (IS_lex_state(EXPR_ARG_ANY | EXPR_END | EXPR_ENDFN))
22033 c = '{'; /* block (primary) */
22034 else if (IS_lex_state(EXPR_ENDARG))
22035 c = tLBRACE_ARG; /* block (expr) */
22036 else
22037 c = tLBRACE; /* hash */
22038 if (c != tLBRACE) {
22039 p->command_start = TRUE;
22040 SET_LEX_STATE(EXPR_BEG);
22041 }
22042 else {
22043 SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
22044 }
22045 ++p->lex.paren_nest; /* after lambda_beginning_p() */
22046 COND_PUSH(0);
22047 CMDARG_PUSH(0);
22048 return c;
22049
22050 case '\\':
22051 c = nextc(p);
22052 if (c == '\n') {
22053 space_seen = 1;
22054 dispatch_scan_event(p, tSP);
22055 goto retry; /* skip \\n */
22056 }
22057 if (c == ' ') return tSP;
22058 if (ISSPACE(c)) return c;
22059 pushback(p, c);
22060 return '\\';
22061
22062 case '%':
22063 return parse_percent(p, space_seen, last_state);
22064
22065 case '$':
22066 return parse_gvar(p, last_state);
22067
22068 case '@':
22069 return parse_atmark(p, last_state);
22070
22071 case '_':
22072 if (was_bol(p) && whole_match_p(p, "__END__", 7, 0)) {
22073 p->ruby__end__seen = 1;
22074 p->eofp = 1;
22075#ifdef RIPPER
22076 lex_goto_eol(p);
22077 dispatch_scan_event(p, k__END__);
22078#endif
22079 return END_OF_INPUT;
22080 }
22081 newtok(p);
22082 break;
22083
22084 default:
22085 if (!parser_is_identchar(p)) {
22086 compile_error(p, "Invalid char '\\x%02X' in expression", c);
22087 token_flush(p);
22088 goto retry;
22089 }
22090
22091 newtok(p);
22092 break;
22093 }
22094
22095 return parse_ident(p, c, cmd_state);
22096}
22097
22098static enum yytokentype
22099yylex(YYSTYPE *lval, YYLTYPE *yylloc, struct parser_params *p)
22100{
22101 enum yytokentype t;
22102
22103 p->lval = lval;
22104 lval->node = 0;
22105 p->yylloc = yylloc;
22106
22107 t = parser_yylex(p);
22108
22109 if (has_delayed_token(p))
22110 dispatch_delayed_token(p, t);
22111 else if (t != END_OF_INPUT)
22112 dispatch_scan_event(p, t);
22113
22114 return t;
22115}
22116
22117#define LVAR_USED ((ID)1 << (sizeof(ID) * CHAR_BIT - 1))
22118
22119static NODE*
22120node_new_internal(struct parser_params *p, enum node_type type, size_t size, size_t alignment)
22121{
22122 NODE *n = rb_ast_newnode(p->ast, type, size, alignment);
22123
22124 rb_node_init(n, type);
22125 return n;
22126}
22127
22128static NODE *
22129nd_set_loc(NODE *nd, const YYLTYPE *loc)
22130{
22131 nd->nd_loc = *loc;
22132 nd_set_line(nd, loc->beg_pos.lineno);
22133 return nd;
22134}
22135
22136static NODE*
22137node_newnode(struct parser_params *p, enum node_type type, size_t size, size_t alignment, const rb_code_location_t *loc)
22138{
22139 NODE *n = node_new_internal(p, type, size, alignment);
22140
22141 nd_set_loc(n, loc);
22142 nd_set_node_id(n, parser_get_node_id(p));
22143 return n;
22144}
22145
22146#define NODE_NEWNODE(node_type, type, loc) (type *)(node_newnode(p, node_type, sizeof(type), RUBY_ALIGNOF(type), loc))
22147
22148static rb_node_scope_t *
22149rb_node_scope_new(struct parser_params *p, rb_node_args_t *nd_args, NODE *nd_body, const YYLTYPE *loc)
22150{
22151 rb_ast_id_table_t *nd_tbl;
22152 nd_tbl = local_tbl(p);
22153 rb_node_scope_t *n = NODE_NEWNODE(NODE_SCOPE, rb_node_scope_t, loc);
22154 n->nd_tbl = nd_tbl;
22155 n->nd_body = nd_body;
22156 n->nd_args = nd_args;
22157
22158 return n;
22159}
22160
22161static rb_node_scope_t *
22162rb_node_scope_new2(struct parser_params *p, rb_ast_id_table_t *nd_tbl, rb_node_args_t *nd_args, NODE *nd_body, const YYLTYPE *loc)
22163{
22164 rb_node_scope_t *n = NODE_NEWNODE(NODE_SCOPE, rb_node_scope_t, loc);
22165 n->nd_tbl = nd_tbl;
22166 n->nd_body = nd_body;
22167 n->nd_args = nd_args;
22168
22169 return n;
22170}
22171
22172static rb_node_defn_t *
22173rb_node_defn_new(struct parser_params *p, ID nd_mid, NODE *nd_defn, const YYLTYPE *loc)
22174{
22175 rb_node_defn_t *n = NODE_NEWNODE(NODE_DEFN, rb_node_defn_t, loc);
22176 n->nd_mid = nd_mid;
22177 n->nd_defn = nd_defn;
22178
22179 return n;
22180}
22181
22182static rb_node_defs_t *
22183rb_node_defs_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_defn, const YYLTYPE *loc)
22184{
22185 rb_node_defs_t *n = NODE_NEWNODE(NODE_DEFS, rb_node_defs_t, loc);
22186 n->nd_recv = nd_recv;
22187 n->nd_mid = nd_mid;
22188 n->nd_defn = nd_defn;
22189
22190 return n;
22191}
22192
22193static rb_node_block_t *
22194rb_node_block_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc)
22195{
22196 rb_node_block_t *n = NODE_NEWNODE(NODE_BLOCK, rb_node_block_t, loc);
22197 n->nd_head = nd_head;
22198 n->nd_end = (NODE *)n;
22199 n->nd_next = 0;
22200
22201 return n;
22202}
22203
22204static rb_node_for_t *
22205rb_node_for_new(struct parser_params *p, NODE *nd_iter, NODE *nd_body, const YYLTYPE *loc)
22206{
22207 rb_node_for_t *n = NODE_NEWNODE(NODE_FOR, rb_node_for_t, loc);
22208 n->nd_body = nd_body;
22209 n->nd_iter = nd_iter;
22210
22211 return n;
22212}
22213
22214static rb_node_for_masgn_t *
22215rb_node_for_masgn_new(struct parser_params *p, NODE *nd_var, const YYLTYPE *loc)
22216{
22217 rb_node_for_masgn_t *n = NODE_NEWNODE(NODE_FOR_MASGN, rb_node_for_masgn_t, loc);
22218 n->nd_var = nd_var;
22219
22220 return n;
22221}
22222
22223static rb_node_retry_t *
22224rb_node_retry_new(struct parser_params *p, const YYLTYPE *loc)
22225{
22226 rb_node_retry_t *n = NODE_NEWNODE(NODE_RETRY, rb_node_retry_t, loc);
22227
22228 return n;
22229}
22230
22231static rb_node_begin_t *
22232rb_node_begin_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc)
22233{
22234 rb_node_begin_t *n = NODE_NEWNODE(NODE_BEGIN, rb_node_begin_t, loc);
22235 n->nd_body = nd_body;
22236
22237 return n;
22238}
22239
22240static rb_node_rescue_t *
22241rb_node_rescue_new(struct parser_params *p, NODE *nd_head, NODE *nd_resq, NODE *nd_else, const YYLTYPE *loc)
22242{
22243 rb_node_rescue_t *n = NODE_NEWNODE(NODE_RESCUE, rb_node_rescue_t, loc);
22244 n->nd_head = nd_head;
22245 n->nd_resq = nd_resq;
22246 n->nd_else = nd_else;
22247
22248 return n;
22249}
22250
22251static rb_node_resbody_t *
22252rb_node_resbody_new(struct parser_params *p, NODE *nd_args, NODE *nd_exc_var, NODE *nd_body, NODE *nd_next, const YYLTYPE *loc)
22253{
22254 rb_node_resbody_t *n = NODE_NEWNODE(NODE_RESBODY, rb_node_resbody_t, loc);
22255 n->nd_args = nd_args;
22256 n->nd_exc_var = nd_exc_var;
22257 n->nd_body = nd_body;
22258 n->nd_next = nd_next;
22259
22260 return n;
22261}
22262
22263static rb_node_ensure_t *
22264rb_node_ensure_new(struct parser_params *p, NODE *nd_head, NODE *nd_ensr, const YYLTYPE *loc)
22265{
22266 rb_node_ensure_t *n = NODE_NEWNODE(NODE_ENSURE, rb_node_ensure_t, loc);
22267 n->nd_head = nd_head;
22268 n->nd_ensr = nd_ensr;
22269
22270 return n;
22271}
22272
22273static rb_node_and_t *
22274rb_node_and_new(struct parser_params *p, NODE *nd_1st, NODE *nd_2nd, const YYLTYPE *loc, const YYLTYPE *operator_loc)
22275{
22276 rb_node_and_t *n = NODE_NEWNODE(NODE_AND, rb_node_and_t, loc);
22277 n->nd_1st = nd_1st;
22278 n->nd_2nd = nd_2nd;
22279 n->operator_loc = *operator_loc;
22280
22281 return n;
22282}
22283
22284static rb_node_or_t *
22285rb_node_or_new(struct parser_params *p, NODE *nd_1st, NODE *nd_2nd, const YYLTYPE *loc, const YYLTYPE *operator_loc)
22286{
22287 rb_node_or_t *n = NODE_NEWNODE(NODE_OR, rb_node_or_t, loc);
22288 n->nd_1st = nd_1st;
22289 n->nd_2nd = nd_2nd;
22290 n->operator_loc = *operator_loc;
22291
22292 return n;
22293}
22294
22295static rb_node_return_t *
22296rb_node_return_new(struct parser_params *p, NODE *nd_stts, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
22297{
22298 rb_node_return_t *n = NODE_NEWNODE(NODE_RETURN, rb_node_return_t, loc);
22299 n->nd_stts = nd_stts;
22300 n->keyword_loc = *keyword_loc;
22301 return n;
22302}
22303
22304static rb_node_yield_t *
22305rb_node_yield_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc)
22306{
22307 rb_node_yield_t *n = NODE_NEWNODE(NODE_YIELD, rb_node_yield_t, loc);
22308 n->nd_head = nd_head;
22309
22310 return n;
22311}
22312
22313static rb_node_if_t *
22314rb_node_if_new(struct parser_params *p, NODE *nd_cond, NODE *nd_body, NODE *nd_else, const YYLTYPE *loc)
22315{
22316 rb_node_if_t *n = NODE_NEWNODE(NODE_IF, rb_node_if_t, loc);
22317 n->nd_cond = nd_cond;
22318 n->nd_body = nd_body;
22319 n->nd_else = nd_else;
22320
22321 return n;
22322}
22323
22324static rb_node_unless_t *
22325rb_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)
22326{
22327 rb_node_unless_t *n = NODE_NEWNODE(NODE_UNLESS, rb_node_unless_t, loc);
22328 n->nd_cond = nd_cond;
22329 n->nd_body = nd_body;
22330 n->nd_else = nd_else;
22331 n->keyword_loc = *keyword_loc;
22332 n->then_keyword_loc = *then_keyword_loc;
22333 n->end_keyword_loc = *end_keyword_loc;
22334
22335 return n;
22336}
22337
22338static rb_node_class_t *
22339rb_node_class_new(struct parser_params *p, NODE *nd_cpath, NODE *nd_body, NODE *nd_super, const YYLTYPE *loc)
22340{
22341 /* Keep the order of node creation */
22342 NODE *scope = NEW_SCOPE(0, nd_body, loc);
22343 rb_node_class_t *n = NODE_NEWNODE(NODE_CLASS, rb_node_class_t, loc);
22344 n->nd_cpath = nd_cpath;
22345 n->nd_body = scope;
22346 n->nd_super = nd_super;
22347
22348 return n;
22349}
22350
22351static rb_node_sclass_t *
22352rb_node_sclass_new(struct parser_params *p, NODE *nd_recv, NODE *nd_body, const YYLTYPE *loc)
22353{
22354 /* Keep the order of node creation */
22355 NODE *scope = NEW_SCOPE(0, nd_body, loc);
22356 rb_node_sclass_t *n = NODE_NEWNODE(NODE_SCLASS, rb_node_sclass_t, loc);
22357 n->nd_recv = nd_recv;
22358 n->nd_body = scope;
22359
22360 return n;
22361}
22362
22363static rb_node_module_t *
22364rb_node_module_new(struct parser_params *p, NODE *nd_cpath, NODE *nd_body, const YYLTYPE *loc)
22365{
22366 /* Keep the order of node creation */
22367 NODE *scope = NEW_SCOPE(0, nd_body, loc);
22368 rb_node_module_t *n = NODE_NEWNODE(NODE_MODULE, rb_node_module_t, loc);
22369 n->nd_cpath = nd_cpath;
22370 n->nd_body = scope;
22371
22372 return n;
22373}
22374
22375static rb_node_iter_t *
22376rb_node_iter_new(struct parser_params *p, rb_node_args_t *nd_args, NODE *nd_body, const YYLTYPE *loc)
22377{
22378 /* Keep the order of node creation */
22379 NODE *scope = NEW_SCOPE(nd_args, nd_body, loc);
22380 rb_node_iter_t *n = NODE_NEWNODE(NODE_ITER, rb_node_iter_t, loc);
22381 n->nd_body = scope;
22382 n->nd_iter = 0;
22383
22384 return n;
22385}
22386
22387static rb_node_lambda_t *
22388rb_node_lambda_new(struct parser_params *p, rb_node_args_t *nd_args, NODE *nd_body, const YYLTYPE *loc)
22389{
22390 /* Keep the order of node creation */
22391 NODE *scope = NEW_SCOPE(nd_args, nd_body, loc);
22392 rb_node_lambda_t *n = NODE_NEWNODE(NODE_LAMBDA, rb_node_lambda_t, loc);
22393 n->nd_body = scope;
22394
22395 return n;
22396}
22397
22398static rb_node_case_t *
22399rb_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)
22400{
22401 rb_node_case_t *n = NODE_NEWNODE(NODE_CASE, rb_node_case_t, loc);
22402 n->nd_head = nd_head;
22403 n->nd_body = nd_body;
22404 n->case_keyword_loc = *case_keyword_loc;
22405 n->end_keyword_loc = *end_keyword_loc;
22406
22407 return n;
22408}
22409
22410static rb_node_case2_t *
22411rb_node_case2_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc, const YYLTYPE *case_keyword_loc, const YYLTYPE *end_keyword_loc)
22412{
22413 rb_node_case2_t *n = NODE_NEWNODE(NODE_CASE2, rb_node_case2_t, loc);
22414 n->nd_head = 0;
22415 n->nd_body = nd_body;
22416 n->case_keyword_loc = *case_keyword_loc;
22417 n->end_keyword_loc = *end_keyword_loc;
22418
22419 return n;
22420}
22421
22422static rb_node_case3_t *
22423rb_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)
22424{
22425 rb_node_case3_t *n = NODE_NEWNODE(NODE_CASE3, rb_node_case3_t, loc);
22426 n->nd_head = nd_head;
22427 n->nd_body = nd_body;
22428 n->case_keyword_loc = *case_keyword_loc;
22429 n->end_keyword_loc = *end_keyword_loc;
22430
22431 return n;
22432}
22433
22434static rb_node_when_t *
22435rb_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)
22436{
22437 rb_node_when_t *n = NODE_NEWNODE(NODE_WHEN, rb_node_when_t, loc);
22438 n->nd_head = nd_head;
22439 n->nd_body = nd_body;
22440 n->nd_next = nd_next;
22441 n->keyword_loc = *keyword_loc;
22442 n->then_keyword_loc = *then_keyword_loc;
22443
22444 return n;
22445}
22446
22447static rb_node_in_t *
22448rb_node_in_new(struct parser_params *p, NODE *nd_head, NODE *nd_body, NODE *nd_next, const YYLTYPE *loc)
22449{
22450 rb_node_in_t *n = NODE_NEWNODE(NODE_IN, rb_node_in_t, loc);
22451 n->nd_head = nd_head;
22452 n->nd_body = nd_body;
22453 n->nd_next = nd_next;
22454
22455 return n;
22456}
22457
22458static rb_node_while_t *
22459rb_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)
22460{
22461 rb_node_while_t *n = NODE_NEWNODE(NODE_WHILE, rb_node_while_t, loc);
22462 n->nd_cond = nd_cond;
22463 n->nd_body = nd_body;
22464 n->nd_state = nd_state;
22465 n->keyword_loc = *keyword_loc;
22466 n->closing_loc = *closing_loc;
22467
22468 return n;
22469}
22470
22471static rb_node_until_t *
22472rb_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)
22473{
22474 rb_node_until_t *n = NODE_NEWNODE(NODE_UNTIL, rb_node_until_t, loc);
22475 n->nd_cond = nd_cond;
22476 n->nd_body = nd_body;
22477 n->nd_state = nd_state;
22478 n->keyword_loc = *keyword_loc;
22479 n->closing_loc = *closing_loc;
22480
22481 return n;
22482}
22483
22484static rb_node_colon2_t *
22485rb_node_colon2_new(struct parser_params *p, NODE *nd_head, ID nd_mid, const YYLTYPE *loc)
22486{
22487 rb_node_colon2_t *n = NODE_NEWNODE(NODE_COLON2, rb_node_colon2_t, loc);
22488 n->nd_head = nd_head;
22489 n->nd_mid = nd_mid;
22490
22491 return n;
22492}
22493
22494static rb_node_colon3_t *
22495rb_node_colon3_new(struct parser_params *p, ID nd_mid, const YYLTYPE *loc)
22496{
22497 rb_node_colon3_t *n = NODE_NEWNODE(NODE_COLON3, rb_node_colon3_t, loc);
22498 n->nd_mid = nd_mid;
22499
22500 return n;
22501}
22502
22503static rb_node_dot2_t *
22504rb_node_dot2_new(struct parser_params *p, NODE *nd_beg, NODE *nd_end, const YYLTYPE *loc)
22505{
22506 rb_node_dot2_t *n = NODE_NEWNODE(NODE_DOT2, rb_node_dot2_t, loc);
22507 n->nd_beg = nd_beg;
22508 n->nd_end = nd_end;
22509
22510 return n;
22511}
22512
22513static rb_node_dot3_t *
22514rb_node_dot3_new(struct parser_params *p, NODE *nd_beg, NODE *nd_end, const YYLTYPE *loc)
22515{
22516 rb_node_dot3_t *n = NODE_NEWNODE(NODE_DOT3, rb_node_dot3_t, loc);
22517 n->nd_beg = nd_beg;
22518 n->nd_end = nd_end;
22519
22520 return n;
22521}
22522
22523static rb_node_self_t *
22524rb_node_self_new(struct parser_params *p, const YYLTYPE *loc)
22525{
22526 rb_node_self_t *n = NODE_NEWNODE(NODE_SELF, rb_node_self_t, loc);
22527 n->nd_state = 1;
22528
22529 return n;
22530}
22531
22532static rb_node_nil_t *
22533rb_node_nil_new(struct parser_params *p, const YYLTYPE *loc)
22534{
22535 rb_node_nil_t *n = NODE_NEWNODE(NODE_NIL, rb_node_nil_t, loc);
22536
22537 return n;
22538}
22539
22540static rb_node_true_t *
22541rb_node_true_new(struct parser_params *p, const YYLTYPE *loc)
22542{
22543 rb_node_true_t *n = NODE_NEWNODE(NODE_TRUE, rb_node_true_t, loc);
22544
22545 return n;
22546}
22547
22548static rb_node_false_t *
22549rb_node_false_new(struct parser_params *p, const YYLTYPE *loc)
22550{
22551 rb_node_false_t *n = NODE_NEWNODE(NODE_FALSE, rb_node_false_t, loc);
22552
22553 return n;
22554}
22555
22556static rb_node_super_t *
22557rb_node_super_new(struct parser_params *p, NODE *nd_args, const YYLTYPE *loc)
22558{
22559 rb_node_super_t *n = NODE_NEWNODE(NODE_SUPER, rb_node_super_t, loc);
22560 n->nd_args = nd_args;
22561
22562 return n;
22563}
22564
22565static rb_node_zsuper_t *
22566rb_node_zsuper_new(struct parser_params *p, const YYLTYPE *loc)
22567{
22568 rb_node_zsuper_t *n = NODE_NEWNODE(NODE_ZSUPER, rb_node_zsuper_t, loc);
22569
22570 return n;
22571}
22572
22573static rb_node_match2_t *
22574rb_node_match2_new(struct parser_params *p, NODE *nd_recv, NODE *nd_value, const YYLTYPE *loc)
22575{
22576 rb_node_match2_t *n = NODE_NEWNODE(NODE_MATCH2, rb_node_match2_t, loc);
22577 n->nd_recv = nd_recv;
22578 n->nd_value = nd_value;
22579 n->nd_args = 0;
22580
22581 return n;
22582}
22583
22584static rb_node_match3_t *
22585rb_node_match3_new(struct parser_params *p, NODE *nd_recv, NODE *nd_value, const YYLTYPE *loc)
22586{
22587 rb_node_match3_t *n = NODE_NEWNODE(NODE_MATCH3, rb_node_match3_t, loc);
22588 n->nd_recv = nd_recv;
22589 n->nd_value = nd_value;
22590
22591 return n;
22592}
22593
22594/* TODO: Use union for NODE_LIST2 */
22595static rb_node_list_t *
22596rb_node_list_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc)
22597{
22598 rb_node_list_t *n = NODE_NEWNODE(NODE_LIST, rb_node_list_t, loc);
22599 n->nd_head = nd_head;
22600 n->as.nd_alen = 1;
22601 n->nd_next = 0;
22602
22603 return n;
22604}
22605
22606static rb_node_list_t *
22607rb_node_list_new2(struct parser_params *p, NODE *nd_head, long nd_alen, NODE *nd_next, const YYLTYPE *loc)
22608{
22609 rb_node_list_t *n = NODE_NEWNODE(NODE_LIST, rb_node_list_t, loc);
22610 n->nd_head = nd_head;
22611 n->as.nd_alen = nd_alen;
22612 n->nd_next = nd_next;
22613
22614 return n;
22615}
22616
22617static rb_node_zlist_t *
22618rb_node_zlist_new(struct parser_params *p, const YYLTYPE *loc)
22619{
22620 rb_node_zlist_t *n = NODE_NEWNODE(NODE_ZLIST, rb_node_zlist_t, loc);
22621
22622 return n;
22623}
22624
22625static rb_node_hash_t *
22626rb_node_hash_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc)
22627{
22628 rb_node_hash_t *n = NODE_NEWNODE(NODE_HASH, rb_node_hash_t, loc);
22629 n->nd_head = nd_head;
22630 n->nd_brace = 0;
22631
22632 return n;
22633}
22634
22635static rb_node_masgn_t *
22636rb_node_masgn_new(struct parser_params *p, NODE *nd_head, NODE *nd_args, const YYLTYPE *loc)
22637{
22638 rb_node_masgn_t *n = NODE_NEWNODE(NODE_MASGN, rb_node_masgn_t, loc);
22639 n->nd_head = nd_head;
22640 n->nd_value = 0;
22641 n->nd_args = nd_args;
22642
22643 return n;
22644}
22645
22646static rb_node_gasgn_t *
22647rb_node_gasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc)
22648{
22649 rb_node_gasgn_t *n = NODE_NEWNODE(NODE_GASGN, rb_node_gasgn_t, loc);
22650 n->nd_vid = nd_vid;
22651 n->nd_value = nd_value;
22652
22653 return n;
22654}
22655
22656static rb_node_lasgn_t *
22657rb_node_lasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc)
22658{
22659 rb_node_lasgn_t *n = NODE_NEWNODE(NODE_LASGN, rb_node_lasgn_t, loc);
22660 n->nd_vid = nd_vid;
22661 n->nd_value = nd_value;
22662
22663 return n;
22664}
22665
22666static rb_node_dasgn_t *
22667rb_node_dasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc)
22668{
22669 rb_node_dasgn_t *n = NODE_NEWNODE(NODE_DASGN, rb_node_dasgn_t, loc);
22670 n->nd_vid = nd_vid;
22671 n->nd_value = nd_value;
22672
22673 return n;
22674}
22675
22676static rb_node_iasgn_t *
22677rb_node_iasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc)
22678{
22679 rb_node_iasgn_t *n = NODE_NEWNODE(NODE_IASGN, rb_node_iasgn_t, loc);
22680 n->nd_vid = nd_vid;
22681 n->nd_value = nd_value;
22682
22683 return n;
22684}
22685
22686static rb_node_cvasgn_t *
22687rb_node_cvasgn_new(struct parser_params *p, ID nd_vid, NODE *nd_value, const YYLTYPE *loc)
22688{
22689 rb_node_cvasgn_t *n = NODE_NEWNODE(NODE_CVASGN, rb_node_cvasgn_t, loc);
22690 n->nd_vid = nd_vid;
22691 n->nd_value = nd_value;
22692
22693 return n;
22694}
22695
22696static rb_node_op_asgn1_t *
22697rb_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)
22698{
22699 rb_node_op_asgn1_t *n = NODE_NEWNODE(NODE_OP_ASGN1, rb_node_op_asgn1_t, loc);
22700 n->nd_recv = nd_recv;
22701 n->nd_mid = nd_mid;
22702 n->nd_index = index;
22703 n->nd_rvalue = rvalue;
22704 n->call_operator_loc = *call_operator_loc;
22705 n->opening_loc = *opening_loc;
22706 n->closing_loc = *closing_loc;
22707 n->binary_operator_loc = *binary_operator_loc;
22708
22709 return n;
22710}
22711
22712static rb_node_op_asgn2_t *
22713rb_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)
22714{
22715 rb_node_op_asgn2_t *n = NODE_NEWNODE(NODE_OP_ASGN2, rb_node_op_asgn2_t, loc);
22716 n->nd_recv = nd_recv;
22717 n->nd_value = nd_value;
22718 n->nd_vid = nd_vid;
22719 n->nd_mid = nd_mid;
22720 n->nd_aid = nd_aid;
22721 n->call_operator_loc = *call_operator_loc;
22722 n->message_loc = *message_loc;
22723 n->binary_operator_loc = *binary_operator_loc;
22724
22725 return n;
22726}
22727
22728static rb_node_op_asgn_or_t *
22729rb_node_op_asgn_or_new(struct parser_params *p, NODE *nd_head, NODE *nd_value, const YYLTYPE *loc)
22730{
22731 rb_node_op_asgn_or_t *n = NODE_NEWNODE(NODE_OP_ASGN_OR, rb_node_op_asgn_or_t, loc);
22732 n->nd_head = nd_head;
22733 n->nd_value = nd_value;
22734
22735 return n;
22736}
22737
22738static rb_node_op_asgn_and_t *
22739rb_node_op_asgn_and_new(struct parser_params *p, NODE *nd_head, NODE *nd_value, const YYLTYPE *loc)
22740{
22741 rb_node_op_asgn_and_t *n = NODE_NEWNODE(NODE_OP_ASGN_AND, rb_node_op_asgn_and_t, loc);
22742 n->nd_head = nd_head;
22743 n->nd_value = nd_value;
22744
22745 return n;
22746}
22747
22748static rb_node_gvar_t *
22749rb_node_gvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc)
22750{
22751 rb_node_gvar_t *n = NODE_NEWNODE(NODE_GVAR, rb_node_gvar_t, loc);
22752 n->nd_vid = nd_vid;
22753
22754 return n;
22755}
22756
22757static rb_node_lvar_t *
22758rb_node_lvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc)
22759{
22760 rb_node_lvar_t *n = NODE_NEWNODE(NODE_LVAR, rb_node_lvar_t, loc);
22761 n->nd_vid = nd_vid;
22762
22763 return n;
22764}
22765
22766static rb_node_dvar_t *
22767rb_node_dvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc)
22768{
22769 rb_node_dvar_t *n = NODE_NEWNODE(NODE_DVAR, rb_node_dvar_t, loc);
22770 n->nd_vid = nd_vid;
22771
22772 return n;
22773}
22774
22775static rb_node_ivar_t *
22776rb_node_ivar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc)
22777{
22778 rb_node_ivar_t *n = NODE_NEWNODE(NODE_IVAR, rb_node_ivar_t, loc);
22779 n->nd_vid = nd_vid;
22780
22781 return n;
22782}
22783
22784static rb_node_const_t *
22785rb_node_const_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc)
22786{
22787 rb_node_const_t *n = NODE_NEWNODE(NODE_CONST, rb_node_const_t, loc);
22788 n->nd_vid = nd_vid;
22789
22790 return n;
22791}
22792
22793static rb_node_cvar_t *
22794rb_node_cvar_new(struct parser_params *p, ID nd_vid, const YYLTYPE *loc)
22795{
22796 rb_node_cvar_t *n = NODE_NEWNODE(NODE_CVAR, rb_node_cvar_t, loc);
22797 n->nd_vid = nd_vid;
22798
22799 return n;
22800}
22801
22802static rb_node_nth_ref_t *
22803rb_node_nth_ref_new(struct parser_params *p, long nd_nth, const YYLTYPE *loc)
22804{
22805 rb_node_nth_ref_t *n = NODE_NEWNODE(NODE_NTH_REF, rb_node_nth_ref_t, loc);
22806 n->nd_nth = nd_nth;
22807
22808 return n;
22809}
22810
22811static rb_node_back_ref_t *
22812rb_node_back_ref_new(struct parser_params *p, long nd_nth, const YYLTYPE *loc)
22813{
22814 rb_node_back_ref_t *n = NODE_NEWNODE(NODE_BACK_REF, rb_node_back_ref_t, loc);
22815 n->nd_nth = nd_nth;
22816
22817 return n;
22818}
22819
22820static rb_node_integer_t *
22821rb_node_integer_new(struct parser_params *p, char* val, int base, const YYLTYPE *loc)
22822{
22823 rb_node_integer_t *n = NODE_NEWNODE(NODE_INTEGER, rb_node_integer_t, loc);
22824 n->val = val;
22825 n->minus = FALSE;
22826 n->base = base;
22827
22828 return n;
22829}
22830
22831static rb_node_float_t *
22832rb_node_float_new(struct parser_params *p, char* val, const YYLTYPE *loc)
22833{
22834 rb_node_float_t *n = NODE_NEWNODE(NODE_FLOAT, rb_node_float_t, loc);
22835 n->val = val;
22836 n->minus = FALSE;
22837
22838 return n;
22839}
22840
22841static rb_node_rational_t *
22842rb_node_rational_new(struct parser_params *p, char* val, int base, int seen_point, const YYLTYPE *loc)
22843{
22844 rb_node_rational_t *n = NODE_NEWNODE(NODE_RATIONAL, rb_node_rational_t, loc);
22845 n->val = val;
22846 n->minus = FALSE;
22847 n->base = base;
22848 n->seen_point = seen_point;
22849
22850 return n;
22851}
22852
22853static rb_node_imaginary_t *
22854rb_node_imaginary_new(struct parser_params *p, char* val, int base, int seen_point, enum rb_numeric_type numeric_type, const YYLTYPE *loc)
22855{
22856 rb_node_imaginary_t *n = NODE_NEWNODE(NODE_IMAGINARY, rb_node_imaginary_t, loc);
22857 n->val = val;
22858 n->minus = FALSE;
22859 n->base = base;
22860 n->seen_point = seen_point;
22861 n->type = numeric_type;
22862
22863 return n;
22864}
22865
22866static rb_node_str_t *
22867rb_node_str_new(struct parser_params *p, rb_parser_string_t *string, const YYLTYPE *loc)
22868{
22869 rb_node_str_t *n = NODE_NEWNODE(NODE_STR, rb_node_str_t, loc);
22870 n->string = string;
22871
22872 return n;
22873}
22874
22875/* TODO; Use union for NODE_DSTR2 */
22876static rb_node_dstr_t *
22877rb_node_dstr_new0(struct parser_params *p, rb_parser_string_t *string, long nd_alen, NODE *nd_next, const YYLTYPE *loc)
22878{
22879 rb_node_dstr_t *n = NODE_NEWNODE(NODE_DSTR, rb_node_dstr_t, loc);
22880 n->string = string;
22881 n->as.nd_alen = nd_alen;
22882 n->nd_next = (rb_node_list_t *)nd_next;
22883
22884 return n;
22885}
22886
22887static rb_node_dstr_t *
22888rb_node_dstr_new(struct parser_params *p, rb_parser_string_t *string, const YYLTYPE *loc)
22889{
22890 return rb_node_dstr_new0(p, string, 1, 0, loc);
22891}
22892
22893static rb_node_xstr_t *
22894rb_node_xstr_new(struct parser_params *p, rb_parser_string_t *string, const YYLTYPE *loc)
22895{
22896 rb_node_xstr_t *n = NODE_NEWNODE(NODE_XSTR, rb_node_xstr_t, loc);
22897 n->string = string;
22898
22899 return n;
22900}
22901
22902static rb_node_dxstr_t *
22903rb_node_dxstr_new(struct parser_params *p, rb_parser_string_t *string, long nd_alen, NODE *nd_next, const YYLTYPE *loc)
22904{
22905 rb_node_dxstr_t *n = NODE_NEWNODE(NODE_DXSTR, rb_node_dxstr_t, loc);
22906 n->string = string;
22907 n->as.nd_alen = nd_alen;
22908 n->nd_next = (rb_node_list_t *)nd_next;
22909
22910 return n;
22911}
22912
22913static rb_node_sym_t *
22914rb_node_sym_new(struct parser_params *p, VALUE str, const YYLTYPE *loc)
22915{
22916 rb_node_sym_t *n = NODE_NEWNODE(NODE_SYM, rb_node_sym_t, loc);
22917 n->string = rb_str_to_parser_string(p, str);
22918
22919 return n;
22920}
22921
22922static rb_node_dsym_t *
22923rb_node_dsym_new(struct parser_params *p, rb_parser_string_t *string, long nd_alen, NODE *nd_next, const YYLTYPE *loc)
22924{
22925 rb_node_dsym_t *n = NODE_NEWNODE(NODE_DSYM, rb_node_dsym_t, loc);
22926 n->string = string;
22927 n->as.nd_alen = nd_alen;
22928 n->nd_next = (rb_node_list_t *)nd_next;
22929
22930 return n;
22931}
22932
22933static rb_node_evstr_t *
22934rb_node_evstr_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc)
22935{
22936 rb_node_evstr_t *n = NODE_NEWNODE(NODE_EVSTR, rb_node_evstr_t, loc);
22937 n->nd_body = nd_body;
22938
22939 return n;
22940}
22941
22942static rb_node_regx_t *
22943rb_node_regx_new(struct parser_params *p, rb_parser_string_t *string, int options, const YYLTYPE *loc)
22944{
22945 rb_node_regx_t *n = NODE_NEWNODE(NODE_REGX, rb_node_regx_t, loc);
22946 n->string = string;
22947 n->options = options & RE_OPTION_MASK;
22948
22949 return n;
22950}
22951
22952static rb_node_call_t *
22953rb_node_call_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc)
22954{
22955 rb_node_call_t *n = NODE_NEWNODE(NODE_CALL, rb_node_call_t, loc);
22956 n->nd_recv = nd_recv;
22957 n->nd_mid = nd_mid;
22958 n->nd_args = nd_args;
22959
22960 return n;
22961}
22962
22963static rb_node_opcall_t *
22964rb_node_opcall_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc)
22965{
22966 rb_node_opcall_t *n = NODE_NEWNODE(NODE_OPCALL, rb_node_opcall_t, loc);
22967 n->nd_recv = nd_recv;
22968 n->nd_mid = nd_mid;
22969 n->nd_args = nd_args;
22970
22971 return n;
22972}
22973
22974static rb_node_fcall_t *
22975rb_node_fcall_new(struct parser_params *p, ID nd_mid, NODE *nd_args, const YYLTYPE *loc)
22976{
22977 rb_node_fcall_t *n = NODE_NEWNODE(NODE_FCALL, rb_node_fcall_t, loc);
22978 n->nd_mid = nd_mid;
22979 n->nd_args = nd_args;
22980
22981 return n;
22982}
22983
22984static rb_node_qcall_t *
22985rb_node_qcall_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc)
22986{
22987 rb_node_qcall_t *n = NODE_NEWNODE(NODE_QCALL, rb_node_qcall_t, loc);
22988 n->nd_recv = nd_recv;
22989 n->nd_mid = nd_mid;
22990 n->nd_args = nd_args;
22991
22992 return n;
22993}
22994
22995static rb_node_vcall_t *
22996rb_node_vcall_new(struct parser_params *p, ID nd_mid, const YYLTYPE *loc)
22997{
22998 rb_node_vcall_t *n = NODE_NEWNODE(NODE_VCALL, rb_node_vcall_t, loc);
22999 n->nd_mid = nd_mid;
23000
23001 return n;
23002}
23003
23004static rb_node_once_t *
23005rb_node_once_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc)
23006{
23007 rb_node_once_t *n = NODE_NEWNODE(NODE_ONCE, rb_node_once_t, loc);
23008 n->nd_body = nd_body;
23009
23010 return n;
23011}
23012
23013static rb_node_args_t *
23014rb_node_args_new(struct parser_params *p, const YYLTYPE *loc)
23015{
23016 rb_node_args_t *n = NODE_NEWNODE(NODE_ARGS, rb_node_args_t, loc);
23017 MEMZERO(&n->nd_ainfo, struct rb_args_info, 1);
23018
23019 return n;
23020}
23021
23022static rb_node_args_aux_t *
23023rb_node_args_aux_new(struct parser_params *p, ID nd_pid, int nd_plen, const YYLTYPE *loc)
23024{
23025 rb_node_args_aux_t *n = NODE_NEWNODE(NODE_ARGS_AUX, rb_node_args_aux_t, loc);
23026 n->nd_pid = nd_pid;
23027 n->nd_plen = nd_plen;
23028 n->nd_next = 0;
23029
23030 return n;
23031}
23032
23033static rb_node_opt_arg_t *
23034rb_node_opt_arg_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc)
23035{
23036 rb_node_opt_arg_t *n = NODE_NEWNODE(NODE_OPT_ARG, rb_node_opt_arg_t, loc);
23037 n->nd_body = nd_body;
23038 n->nd_next = 0;
23039
23040 return n;
23041}
23042
23043static rb_node_kw_arg_t *
23044rb_node_kw_arg_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc)
23045{
23046 rb_node_kw_arg_t *n = NODE_NEWNODE(NODE_KW_ARG, rb_node_kw_arg_t, loc);
23047 n->nd_body = nd_body;
23048 n->nd_next = 0;
23049
23050 return n;
23051}
23052
23053static rb_node_postarg_t *
23054rb_node_postarg_new(struct parser_params *p, NODE *nd_1st, NODE *nd_2nd, const YYLTYPE *loc)
23055{
23056 rb_node_postarg_t *n = NODE_NEWNODE(NODE_POSTARG, rb_node_postarg_t, loc);
23057 n->nd_1st = nd_1st;
23058 n->nd_2nd = nd_2nd;
23059
23060 return n;
23061}
23062
23063static rb_node_argscat_t *
23064rb_node_argscat_new(struct parser_params *p, NODE *nd_head, NODE *nd_body, const YYLTYPE *loc)
23065{
23066 rb_node_argscat_t *n = NODE_NEWNODE(NODE_ARGSCAT, rb_node_argscat_t, loc);
23067 n->nd_head = nd_head;
23068 n->nd_body = nd_body;
23069
23070 return n;
23071}
23072
23073static rb_node_argspush_t *
23074rb_node_argspush_new(struct parser_params *p, NODE *nd_head, NODE *nd_body, const YYLTYPE *loc)
23075{
23076 rb_node_argspush_t *n = NODE_NEWNODE(NODE_ARGSPUSH, rb_node_argspush_t, loc);
23077 n->nd_head = nd_head;
23078 n->nd_body = nd_body;
23079
23080 return n;
23081}
23082
23083static rb_node_splat_t *
23084rb_node_splat_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc, const YYLTYPE *operator_loc)
23085{
23086 rb_node_splat_t *n = NODE_NEWNODE(NODE_SPLAT, rb_node_splat_t, loc);
23087 n->nd_head = nd_head;
23088 n->operator_loc = *operator_loc;
23089
23090 return n;
23091}
23092
23093static rb_node_block_pass_t *
23094rb_node_block_pass_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc, const YYLTYPE *operator_loc)
23095{
23096 rb_node_block_pass_t *n = NODE_NEWNODE(NODE_BLOCK_PASS, rb_node_block_pass_t, loc);
23097 n->forwarding = 0;
23098 n->nd_head = 0;
23099 n->nd_body = nd_body;
23100 n->operator_loc = *operator_loc;
23101
23102 return n;
23103}
23104
23105static rb_node_alias_t *
23106rb_node_alias_new(struct parser_params *p, NODE *nd_1st, NODE *nd_2nd, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
23107{
23108 rb_node_alias_t *n = NODE_NEWNODE(NODE_ALIAS, rb_node_alias_t, loc);
23109 n->nd_1st = nd_1st;
23110 n->nd_2nd = nd_2nd;
23111 n->keyword_loc = *keyword_loc;
23112
23113 return n;
23114}
23115
23116static rb_node_valias_t *
23117rb_node_valias_new(struct parser_params *p, ID nd_alias, ID nd_orig, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
23118{
23119 rb_node_valias_t *n = NODE_NEWNODE(NODE_VALIAS, rb_node_valias_t, loc);
23120 n->nd_alias = nd_alias;
23121 n->nd_orig = nd_orig;
23122 n->keyword_loc = *keyword_loc;
23123
23124 return n;
23125}
23126
23127static rb_node_undef_t *
23128rb_node_undef_new(struct parser_params *p, NODE *nd_undef, const YYLTYPE *loc)
23129{
23130 rb_node_undef_t *n = NODE_NEWNODE(NODE_UNDEF, rb_node_undef_t, loc);
23131 n->nd_undefs = rb_parser_ary_new_capa_for_node(p, 1);
23132 n->keyword_loc = NULL_LOC;
23133 rb_parser_ary_push_node(p, n->nd_undefs, nd_undef);
23134
23135 return n;
23136}
23137
23138static rb_node_errinfo_t *
23139rb_node_errinfo_new(struct parser_params *p, const YYLTYPE *loc)
23140{
23141 rb_node_errinfo_t *n = NODE_NEWNODE(NODE_ERRINFO, rb_node_errinfo_t, loc);
23142
23143 return n;
23144}
23145
23146static rb_node_defined_t *
23147rb_node_defined_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc)
23148{
23149 rb_node_defined_t *n = NODE_NEWNODE(NODE_DEFINED, rb_node_defined_t, loc);
23150 n->nd_head = nd_head;
23151
23152 return n;
23153}
23154
23155static rb_node_postexe_t *
23156rb_node_postexe_new(struct parser_params *p, NODE *nd_body, const YYLTYPE *loc)
23157{
23158 rb_node_postexe_t *n = NODE_NEWNODE(NODE_POSTEXE, rb_node_postexe_t, loc);
23159 n->nd_body = nd_body;
23160
23161 return n;
23162}
23163
23164static rb_node_attrasgn_t *
23165rb_node_attrasgn_new(struct parser_params *p, NODE *nd_recv, ID nd_mid, NODE *nd_args, const YYLTYPE *loc)
23166{
23167 rb_node_attrasgn_t *n = NODE_NEWNODE(NODE_ATTRASGN, rb_node_attrasgn_t, loc);
23168 n->nd_recv = nd_recv;
23169 n->nd_mid = nd_mid;
23170 n->nd_args = nd_args;
23171
23172 return n;
23173}
23174
23175static rb_node_aryptn_t *
23176rb_node_aryptn_new(struct parser_params *p, NODE *pre_args, NODE *rest_arg, NODE *post_args, const YYLTYPE *loc)
23177{
23178 rb_node_aryptn_t *n = NODE_NEWNODE(NODE_ARYPTN, rb_node_aryptn_t, loc);
23179 n->nd_pconst = 0;
23180 n->pre_args = pre_args;
23181 n->rest_arg = rest_arg;
23182 n->post_args = post_args;
23183
23184 return n;
23185}
23186
23187static rb_node_hshptn_t *
23188rb_node_hshptn_new(struct parser_params *p, NODE *nd_pconst, NODE *nd_pkwargs, NODE *nd_pkwrestarg, const YYLTYPE *loc)
23189{
23190 rb_node_hshptn_t *n = NODE_NEWNODE(NODE_HSHPTN, rb_node_hshptn_t, loc);
23191 n->nd_pconst = nd_pconst;
23192 n->nd_pkwargs = nd_pkwargs;
23193 n->nd_pkwrestarg = nd_pkwrestarg;
23194
23195 return n;
23196}
23197
23198static rb_node_fndptn_t *
23199rb_node_fndptn_new(struct parser_params *p, NODE *pre_rest_arg, NODE *args, NODE *post_rest_arg, const YYLTYPE *loc)
23200{
23201 rb_node_fndptn_t *n = NODE_NEWNODE(NODE_FNDPTN, rb_node_fndptn_t, loc);
23202 n->nd_pconst = 0;
23203 n->pre_rest_arg = pre_rest_arg;
23204 n->args = args;
23205 n->post_rest_arg = post_rest_arg;
23206
23207 return n;
23208}
23209
23210static rb_node_line_t *
23211rb_node_line_new(struct parser_params *p, const YYLTYPE *loc)
23212{
23213 rb_node_line_t *n = NODE_NEWNODE(NODE_LINE, rb_node_line_t, loc);
23214
23215 return n;
23216}
23217
23218static rb_node_file_t *
23219rb_node_file_new(struct parser_params *p, VALUE str, const YYLTYPE *loc)
23220{
23221 rb_node_file_t *n = NODE_NEWNODE(NODE_FILE, rb_node_file_t, loc);
23222 n->path = rb_str_to_parser_string(p, str);
23223
23224 return n;
23225}
23226
23227static rb_node_encoding_t *
23228rb_node_encoding_new(struct parser_params *p, const YYLTYPE *loc)
23229{
23230 rb_node_encoding_t *n = NODE_NEWNODE(NODE_ENCODING, rb_node_encoding_t, loc);
23231 n->enc = p->enc;
23232
23233 return n;
23234}
23235
23236static rb_node_cdecl_t *
23237rb_node_cdecl_new(struct parser_params *p, ID nd_vid, NODE *nd_value, NODE *nd_else, enum rb_parser_shareability shareability, const YYLTYPE *loc)
23238{
23239 rb_node_cdecl_t *n = NODE_NEWNODE(NODE_CDECL, rb_node_cdecl_t, loc);
23240 n->nd_vid = nd_vid;
23241 n->nd_value = nd_value;
23242 n->nd_else = nd_else;
23243 n->shareability = shareability;
23244
23245 return n;
23246}
23247
23248static rb_node_op_cdecl_t *
23249rb_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)
23250{
23251 rb_node_op_cdecl_t *n = NODE_NEWNODE(NODE_OP_CDECL, rb_node_op_cdecl_t, loc);
23252 n->nd_head = nd_head;
23253 n->nd_value = nd_value;
23254 n->nd_aid = nd_aid;
23255 n->shareability = shareability;
23256
23257 return n;
23258}
23259
23260static rb_node_error_t *
23261rb_node_error_new(struct parser_params *p, const YYLTYPE *loc)
23262{
23263 rb_node_error_t *n = NODE_NEWNODE(NODE_ERROR, rb_node_error_t, loc);
23264
23265 return n;
23266}
23267
23268static rb_node_break_t *
23269rb_node_break_new(struct parser_params *p, NODE *nd_stts, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
23270{
23271 rb_node_break_t *n = NODE_NEWNODE(NODE_BREAK, rb_node_break_t, loc);
23272 n->nd_stts = nd_stts;
23273 n->nd_chain = 0;
23274 n->keyword_loc = *keyword_loc;
23275
23276 return n;
23277}
23278
23279static rb_node_next_t *
23280rb_node_next_new(struct parser_params *p, NODE *nd_stts, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
23281{
23282 rb_node_next_t *n = NODE_NEWNODE(NODE_NEXT, rb_node_next_t, loc);
23283 n->nd_stts = nd_stts;
23284 n->nd_chain = 0;
23285 n->keyword_loc = *keyword_loc;
23286
23287 return n;
23288}
23289
23290static rb_node_redo_t *
23291rb_node_redo_new(struct parser_params *p, const YYLTYPE *loc, const YYLTYPE *keyword_loc)
23292{
23293 rb_node_redo_t *n = NODE_NEWNODE(NODE_REDO, rb_node_redo_t, loc);
23294 n->nd_chain = 0;
23295 n->keyword_loc = *keyword_loc;
23296
23297 return n;
23298}
23299
23300static rb_node_def_temp_t *
23301rb_node_def_temp_new(struct parser_params *p, const YYLTYPE *loc)
23302{
23303 rb_node_def_temp_t *n = NODE_NEWNODE((enum node_type)NODE_DEF_TEMP, rb_node_def_temp_t, loc);
23304 n->save.numparam_save = 0;
23305 n->save.max_numparam = 0;
23306 n->save.ctxt = p->ctxt;
23307 n->nd_def = 0;
23308 n->nd_mid = 0;
23309
23310 return n;
23311}
23312
23313static rb_node_def_temp_t *
23314def_head_save(struct parser_params *p, rb_node_def_temp_t *n)
23315{
23316 n->save.numparam_save = numparam_push(p);
23317 n->save.max_numparam = p->max_numparam;
23318 return n;
23319}
23320
23321#ifndef RIPPER
23322static enum node_type
23323nodetype(NODE *node) /* for debug */
23324{
23325 return (enum node_type)nd_type(node);
23326}
23327
23328static int
23329nodeline(NODE *node)
23330{
23331 return nd_line(node);
23332}
23333#endif
23334
23335static NODE*
23336newline_node(NODE *node)
23337{
23338 if (node) {
23339 node = remove_begin(node);
23340 nd_set_fl_newline(node);
23341 }
23342 return node;
23343}
23344
23345static void
23346fixpos(NODE *node, NODE *orig)
23347{
23348 if (!node) return;
23349 if (!orig) return;
23350 nd_set_line(node, nd_line(orig));
23351}
23352
23353static NODE*
23354block_append(struct parser_params *p, NODE *head, NODE *tail)
23355{
23356 NODE *end, *h = head, *nd;
23357
23358 if (tail == 0) return head;
23359
23360 if (h == 0) return tail;
23361 switch (nd_type(h)) {
23362 default:
23363 h = end = NEW_BLOCK(head, &head->nd_loc);
23364 head = end;
23365 break;
23366 case NODE_BLOCK:
23367 end = RNODE_BLOCK(h)->nd_end;
23368 break;
23369 }
23370
23371 nd = RNODE_BLOCK(end)->nd_head;
23372 switch (nd_type(nd)) {
23373 case NODE_RETURN:
23374 case NODE_BREAK:
23375 case NODE_NEXT:
23376 case NODE_REDO:
23377 case NODE_RETRY:
23378 rb_warning0L(nd_line(tail), "statement not reached");
23379 break;
23380
23381 default:
23382 break;
23383 }
23384
23385 if (!nd_type_p(tail, NODE_BLOCK)) {
23386 tail = NEW_BLOCK(tail, &tail->nd_loc);
23387 }
23388 RNODE_BLOCK(end)->nd_next = tail;
23389 RNODE_BLOCK(h)->nd_end = RNODE_BLOCK(tail)->nd_end;
23390 nd_set_last_loc(head, nd_last_loc(tail));
23391 return head;
23392}
23393
23394/* append item to the list */
23395static NODE*
23396list_append(struct parser_params *p, NODE *list, NODE *item)
23397{
23398 NODE *last;
23399
23400 if (list == 0) return NEW_LIST(item, &item->nd_loc);
23401 if (RNODE_LIST(list)->nd_next) {
23402 last = RNODE_LIST(RNODE_LIST(list)->nd_next)->as.nd_end;
23403 }
23404 else {
23405 last = list;
23406 }
23407
23408 RNODE_LIST(list)->as.nd_alen += 1;
23409 RNODE_LIST(last)->nd_next = NEW_LIST(item, &item->nd_loc);
23410 RNODE_LIST(RNODE_LIST(list)->nd_next)->as.nd_end = RNODE_LIST(last)->nd_next;
23411
23412 nd_set_last_loc(list, nd_last_loc(item));
23413
23414 return list;
23415}
23416
23417/* concat two lists */
23418static NODE*
23419list_concat(NODE *head, NODE *tail)
23420{
23421 NODE *last;
23422
23423 if (RNODE_LIST(head)->nd_next) {
23424 last = RNODE_LIST(RNODE_LIST(head)->nd_next)->as.nd_end;
23425 }
23426 else {
23427 last = head;
23428 }
23429
23430 RNODE_LIST(head)->as.nd_alen += RNODE_LIST(tail)->as.nd_alen;
23431 RNODE_LIST(last)->nd_next = tail;
23432 if (RNODE_LIST(tail)->nd_next) {
23433 RNODE_LIST(RNODE_LIST(head)->nd_next)->as.nd_end = RNODE_LIST(RNODE_LIST(tail)->nd_next)->as.nd_end;
23434 }
23435 else {
23436 RNODE_LIST(RNODE_LIST(head)->nd_next)->as.nd_end = tail;
23437 }
23438
23439 nd_set_last_loc(head, nd_last_loc(tail));
23440
23441 return head;
23442}
23443
23444static int
23445literal_concat0(struct parser_params *p, rb_parser_string_t *head, rb_parser_string_t *tail)
23446{
23447 if (!tail) return 1;
23448 if (!rb_parser_enc_compatible(p, head, tail)) {
23449 compile_error(p, "string literal encodings differ (%s / %s)",
23450 rb_enc_name(rb_parser_str_get_encoding(head)),
23451 rb_enc_name(rb_parser_str_get_encoding(tail)));
23452 rb_parser_str_resize(p, head, 0);
23453 rb_parser_str_resize(p, tail, 0);
23454 return 0;
23455 }
23456 rb_parser_str_buf_append(p, head, tail);
23457 return 1;
23458}
23459
23460static rb_parser_string_t *
23461string_literal_head(struct parser_params *p, enum node_type htype, NODE *head)
23462{
23463 if (htype != NODE_DSTR) return NULL;
23464 if (RNODE_DSTR(head)->nd_next) {
23465 head = RNODE_LIST(RNODE_LIST(RNODE_DSTR(head)->nd_next)->as.nd_end)->nd_head;
23466 if (!head || !nd_type_p(head, NODE_STR)) return NULL;
23467 }
23468 rb_parser_string_t *lit = RNODE_DSTR(head)->string;
23469 ASSUME(lit);
23470 return lit;
23471}
23472
23473#ifndef RIPPER
23474static rb_parser_string_t *
23475rb_parser_string_deep_copy(struct parser_params *p, const rb_parser_string_t *orig)
23476{
23477 rb_parser_string_t *copy;
23478 if (!orig) return NULL;
23479 copy = rb_parser_string_new(p, PARSER_STRING_PTR(orig), PARSER_STRING_LEN(orig));
23480 copy->coderange = orig->coderange;
23481 copy->enc = orig->enc;
23482 return copy;
23483}
23484#endif
23485
23486/* concat two string literals */
23487static NODE *
23488literal_concat(struct parser_params *p, NODE *head, NODE *tail, const YYLTYPE *loc)
23489{
23490 enum node_type htype;
23491 rb_parser_string_t *lit;
23492
23493 if (!head) return tail;
23494 if (!tail) return head;
23495
23496 htype = nd_type(head);
23497 if (htype == NODE_EVSTR) {
23498 head = new_dstr(p, head, loc);
23499 htype = NODE_DSTR;
23500 }
23501 if (p->heredoc_indent > 0) {
23502 switch (htype) {
23503 case NODE_STR:
23504 head = str2dstr(p, head);
23505 case NODE_DSTR:
23506 return list_append(p, head, tail);
23507 default:
23508 break;
23509 }
23510 }
23511 switch (nd_type(tail)) {
23512 case NODE_STR:
23513 if ((lit = string_literal_head(p, htype, head)) != false) {
23514 htype = NODE_STR;
23515 }
23516 else {
23517 lit = RNODE_DSTR(head)->string;
23518 }
23519 if (htype == NODE_STR) {
23520 if (!literal_concat0(p, lit, RNODE_STR(tail)->string)) {
23521 error:
23522 rb_discard_node(p, head);
23523 rb_discard_node(p, tail);
23524 return 0;
23525 }
23526 rb_discard_node(p, tail);
23527 }
23528 else {
23529 list_append(p, head, tail);
23530 }
23531 break;
23532
23533 case NODE_DSTR:
23534 if (htype == NODE_STR) {
23535 if (!literal_concat0(p, RNODE_STR(head)->string, RNODE_DSTR(tail)->string))
23536 goto error;
23537 rb_parser_string_free(p, RNODE_DSTR(tail)->string);
23538 RNODE_DSTR(tail)->string = RNODE_STR(head)->string;
23539 RNODE_STR(head)->string = NULL;
23540 rb_discard_node(p, head);
23541 head = tail;
23542 }
23543 else if (!RNODE_DSTR(tail)->string) {
23544 append:
23545 RNODE_DSTR(head)->as.nd_alen += RNODE_DSTR(tail)->as.nd_alen - 1;
23546 if (!RNODE_DSTR(head)->nd_next) {
23547 RNODE_DSTR(head)->nd_next = RNODE_DSTR(tail)->nd_next;
23548 }
23549 else if (RNODE_DSTR(tail)->nd_next) {
23550 RNODE_DSTR(RNODE_DSTR(RNODE_DSTR(head)->nd_next)->as.nd_end)->nd_next = RNODE_DSTR(tail)->nd_next;
23551 RNODE_DSTR(RNODE_DSTR(head)->nd_next)->as.nd_end = RNODE_DSTR(RNODE_DSTR(tail)->nd_next)->as.nd_end;
23552 }
23553 rb_discard_node(p, tail);
23554 }
23555 else if ((lit = string_literal_head(p, htype, head)) != false) {
23556 if (!literal_concat0(p, lit, RNODE_DSTR(tail)->string))
23557 goto error;
23558 rb_parser_string_free(p, RNODE_DSTR(tail)->string);
23559 RNODE_DSTR(tail)->string = 0;
23560 goto append;
23561 }
23562 else {
23563 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));
23564 RNODE_DSTR(tail)->string = 0;
23565 }
23566 break;
23567
23568 case NODE_EVSTR:
23569 if (htype == NODE_STR) {
23570 head = str2dstr(p, head);
23571 RNODE_DSTR(head)->as.nd_alen = 1;
23572 }
23573 list_append(p, head, tail);
23574 break;
23575 }
23576 return head;
23577}
23578
23579static void
23580nd_copy_flag(NODE *new_node, NODE *old_node)
23581{
23582 if (nd_fl_newline(old_node)) nd_set_fl_newline(new_node);
23583 nd_set_line(new_node, nd_line(old_node));
23584 new_node->nd_loc = old_node->nd_loc;
23585 new_node->node_id = old_node->node_id;
23586}
23587
23588static NODE *
23589str2dstr(struct parser_params *p, NODE *node)
23590{
23591 NODE *new_node = (NODE *)NODE_NEW_INTERNAL(NODE_DSTR, rb_node_dstr_t);
23592 nd_copy_flag(new_node, node);
23593 RNODE_DSTR(new_node)->string = RNODE_STR(node)->string;
23594 RNODE_DSTR(new_node)->as.nd_alen = 0;
23595 RNODE_DSTR(new_node)->nd_next = 0;
23596 RNODE_STR(node)->string = 0;
23597
23598 return new_node;
23599}
23600
23601static NODE *
23602str2regx(struct parser_params *p, NODE *node, int options)
23603{
23604 NODE *new_node = (NODE *)NODE_NEW_INTERNAL(NODE_REGX, rb_node_regx_t);
23605 nd_copy_flag(new_node, node);
23606 RNODE_REGX(new_node)->string = RNODE_STR(node)->string;
23607 RNODE_REGX(new_node)->options = options;
23608 RNODE_STR(node)->string = 0;
23609
23610 return new_node;
23611}
23612
23613static NODE *
23614evstr2dstr(struct parser_params *p, NODE *node)
23615{
23616 if (nd_type_p(node, NODE_EVSTR)) {
23617 node = new_dstr(p, node, &node->nd_loc);
23618 }
23619 return node;
23620}
23621
23622static NODE *
23623new_evstr(struct parser_params *p, NODE *node, const YYLTYPE *loc)
23624{
23625 NODE *head = node;
23626
23627 if (node) {
23628 switch (nd_type(node)) {
23629 case NODE_STR:
23630 return str2dstr(p, node);
23631 case NODE_DSTR:
23632 break;
23633 case NODE_EVSTR:
23634 return node;
23635 }
23636 }
23637 return NEW_EVSTR(head, loc);
23638}
23639
23640static NODE *
23641new_dstr(struct parser_params *p, NODE *node, const YYLTYPE *loc)
23642{
23643 NODE *dstr = NEW_DSTR(STRING_NEW0(), loc);
23644 return list_append(p, dstr, node);
23645}
23646
23647static NODE *
23648call_bin_op(struct parser_params *p, NODE *recv, ID id, NODE *arg1,
23649 const YYLTYPE *op_loc, const YYLTYPE *loc)
23650{
23651 NODE *expr;
23652 value_expr(recv);
23653 value_expr(arg1);
23654 expr = NEW_OPCALL(recv, id, NEW_LIST(arg1, &arg1->nd_loc), loc);
23655 nd_set_line(expr, op_loc->beg_pos.lineno);
23656 return expr;
23657}
23658
23659static NODE *
23660call_uni_op(struct parser_params *p, NODE *recv, ID id, const YYLTYPE *op_loc, const YYLTYPE *loc)
23661{
23662 NODE *opcall;
23663 value_expr(recv);
23664 opcall = NEW_OPCALL(recv, id, 0, loc);
23665 nd_set_line(opcall, op_loc->beg_pos.lineno);
23666 return opcall;
23667}
23668
23669static NODE *
23670new_qcall(struct parser_params* p, ID atype, NODE *recv, ID mid, NODE *args, const YYLTYPE *op_loc, const YYLTYPE *loc)
23671{
23672 NODE *qcall = NEW_QCALL(atype, recv, mid, args, loc);
23673 nd_set_line(qcall, op_loc->beg_pos.lineno);
23674 return qcall;
23675}
23676
23677static NODE*
23678new_command_qcall(struct parser_params* p, ID atype, NODE *recv, ID mid, NODE *args, NODE *block, const YYLTYPE *op_loc, const YYLTYPE *loc)
23679{
23680 NODE *ret;
23681 if (block) block_dup_check(p, args, block);
23682 ret = new_qcall(p, atype, recv, mid, args, op_loc, loc);
23683 if (block) ret = method_add_block(p, ret, block, loc);
23684 fixpos(ret, recv);
23685 return ret;
23686}
23687
23688#define nd_once_body(node) (nd_type_p((node), NODE_ONCE) ? RNODE_ONCE(node)->nd_body : node)
23689
23690static NODE*
23691last_expr_once_body(NODE *node)
23692{
23693 if (!node) return 0;
23694 return nd_once_body(node);
23695}
23696
23697static NODE*
23698match_op(struct parser_params *p, NODE *node1, NODE *node2, const YYLTYPE *op_loc, const YYLTYPE *loc)
23699{
23700 NODE *n;
23701 int line = op_loc->beg_pos.lineno;
23702
23703 value_expr(node1);
23704 value_expr(node2);
23705
23706 if ((n = last_expr_once_body(node1)) != 0) {
23707 switch (nd_type(n)) {
23708 case NODE_DREGX:
23709 {
23710 NODE *match = NEW_MATCH2(node1, node2, loc);
23711 nd_set_line(match, line);
23712 return match;
23713 }
23714
23715 case NODE_REGX:
23716 {
23717 const VALUE lit = rb_node_regx_string_val(n);
23718 if (!NIL_P(lit)) {
23719 NODE *match = NEW_MATCH2(node1, node2, loc);
23720 RNODE_MATCH2(match)->nd_args = reg_named_capture_assign(p, lit, loc, assignable);
23721 nd_set_line(match, line);
23722 return match;
23723 }
23724 }
23725 }
23726 }
23727
23728 if ((n = last_expr_once_body(node2)) != 0) {
23729 NODE *match3;
23730
23731 switch (nd_type(n)) {
23732 case NODE_DREGX:
23733 match3 = NEW_MATCH3(node2, node1, loc);
23734 return match3;
23735 }
23736 }
23737
23738 n = NEW_CALL(node1, tMATCH, NEW_LIST(node2, &node2->nd_loc), loc);
23739 nd_set_line(n, line);
23740 return n;
23741}
23742
23743# if WARN_PAST_SCOPE
23744static int
23745past_dvar_p(struct parser_params *p, ID id)
23746{
23747 struct vtable *past = p->lvtbl->past;
23748 while (past) {
23749 if (vtable_included(past, id)) return 1;
23750 past = past->prev;
23751 }
23752 return 0;
23753}
23754# endif
23755
23756static int
23757numparam_nested_p(struct parser_params *p)
23758{
23759 struct local_vars *local = p->lvtbl;
23760 NODE *outer = local->numparam.outer;
23761 NODE *inner = local->numparam.inner;
23762 if (outer || inner) {
23763 NODE *used = outer ? outer : inner;
23764 compile_error(p, "numbered parameter is already used in\n"
23765 "%s:%d: %s block here",
23766 p->ruby_sourcefile, nd_line(used),
23767 outer ? "outer" : "inner");
23768 parser_show_error_line(p, &used->nd_loc);
23769 return 1;
23770 }
23771 return 0;
23772}
23773
23774static int
23775numparam_used_p(struct parser_params *p)
23776{
23777 NODE *numparam = p->lvtbl->numparam.current;
23778 if (numparam) {
23779 compile_error(p, "numbered parameter is already used in\n"
23780 "%s:%d: current block here",
23781 p->ruby_sourcefile, nd_line(numparam));
23782 parser_show_error_line(p, &numparam->nd_loc);
23783 return 1;
23784 }
23785 return 0;
23786}
23787
23788static int
23789it_used_p(struct parser_params *p)
23790{
23791 NODE *it = p->lvtbl->it;
23792 if (it) {
23793 compile_error(p, "'it' is already used in\n"
23794 "%s:%d: current block here",
23795 p->ruby_sourcefile, nd_line(it));
23796 parser_show_error_line(p, &it->nd_loc);
23797 return 1;
23798 }
23799 return 0;
23800}
23801
23802static NODE*
23803gettable(struct parser_params *p, ID id, const YYLTYPE *loc)
23804{
23805 ID *vidp = NULL;
23806 NODE *node;
23807 switch (id) {
23808 case keyword_self:
23809 return NEW_SELF(loc);
23810 case keyword_nil:
23811 return NEW_NIL(loc);
23812 case keyword_true:
23813 return NEW_TRUE(loc);
23814 case keyword_false:
23815 return NEW_FALSE(loc);
23816 case keyword__FILE__:
23817 {
23818 VALUE file = p->ruby_sourcefile_string;
23819 if (NIL_P(file))
23820 file = rb_str_new(0, 0);
23821 node = NEW_FILE(file, loc);
23822 }
23823 return node;
23824 case keyword__LINE__:
23825 return NEW_LINE(loc);
23826 case keyword__ENCODING__:
23827 return NEW_ENCODING(loc);
23828
23829 }
23830 switch (id_type(id)) {
23831 case ID_LOCAL:
23832 if (dyna_in_block(p) && dvar_defined_ref(p, id, &vidp)) {
23833 if (NUMPARAM_ID_P(id) && (numparam_nested_p(p) || it_used_p(p))) return 0;
23834 if (vidp) *vidp |= LVAR_USED;
23835 node = NEW_DVAR(id, loc);
23836 return node;
23837 }
23838 if (local_id_ref(p, id, &vidp)) {
23839 if (vidp) *vidp |= LVAR_USED;
23840 node = NEW_LVAR(id, loc);
23841 return node;
23842 }
23843 if (dyna_in_block(p) && NUMPARAM_ID_P(id) &&
23844 parser_numbered_param(p, NUMPARAM_ID_TO_IDX(id))) {
23845 if (numparam_nested_p(p) || it_used_p(p)) return 0;
23846 node = NEW_DVAR(id, loc);
23847 struct local_vars *local = p->lvtbl;
23848 if (!local->numparam.current) local->numparam.current = node;
23849 return node;
23850 }
23851# if WARN_PAST_SCOPE
23852 if (!p->ctxt.in_defined && RTEST(ruby_verbose) && past_dvar_p(p, id)) {
23853 rb_warning1("possible reference to past scope - %"PRIsWARN, rb_id2str(id));
23854 }
23855# endif
23856 /* method call without arguments */
23857 if (dyna_in_block(p) && id == rb_intern("it") && !(DVARS_TERMINAL_P(p->lvtbl->args) || DVARS_TERMINAL_P(p->lvtbl->args->prev))) {
23858 if (numparam_used_p(p)) return 0;
23859 if (p->max_numparam == ORDINAL_PARAM) {
23860 compile_error(p, "ordinary parameter is defined");
23861 return 0;
23862 }
23863 if (!p->it_id) {
23864 p->it_id = internal_id(p);
23865 vtable_add(p->lvtbl->args, p->it_id);
23866 }
23867 NODE *node = NEW_DVAR(p->it_id, loc);
23868 if (!p->lvtbl->it) p->lvtbl->it = node;
23869 return node;
23870 }
23871 return NEW_VCALL(id, loc);
23872 case ID_GLOBAL:
23873 return NEW_GVAR(id, loc);
23874 case ID_INSTANCE:
23875 return NEW_IVAR(id, loc);
23876 case ID_CONST:
23877 return NEW_CONST(id, loc);
23878 case ID_CLASS:
23879 return NEW_CVAR(id, loc);
23880 }
23881 compile_error(p, "identifier %"PRIsVALUE" is not valid to get", rb_id2str(id));
23882 return 0;
23883}
23884
23885static rb_node_opt_arg_t *
23886opt_arg_append(rb_node_opt_arg_t *opt_list, rb_node_opt_arg_t *opt)
23887{
23888 rb_node_opt_arg_t *opts = opt_list;
23889 RNODE(opts)->nd_loc.end_pos = RNODE(opt)->nd_loc.end_pos;
23890
23891 while (opts->nd_next) {
23892 opts = opts->nd_next;
23893 RNODE(opts)->nd_loc.end_pos = RNODE(opt)->nd_loc.end_pos;
23894 }
23895 opts->nd_next = opt;
23896
23897 return opt_list;
23898}
23899
23900static rb_node_kw_arg_t *
23901kwd_append(rb_node_kw_arg_t *kwlist, rb_node_kw_arg_t *kw)
23902{
23903 if (kwlist) {
23904 /* Assume rb_node_kw_arg_t and rb_node_opt_arg_t has same structure */
23905 opt_arg_append(RNODE_OPT_ARG(kwlist), RNODE_OPT_ARG(kw));
23906 }
23907 return kwlist;
23908}
23909
23910static NODE *
23911new_defined(struct parser_params *p, NODE *expr, const YYLTYPE *loc)
23912{
23913 NODE *n = expr;
23914 while (n) {
23915 if (nd_type_p(n, NODE_BEGIN)) {
23916 n = RNODE_BEGIN(n)->nd_body;
23917 }
23918 else if (nd_type_p(n, NODE_BLOCK) && RNODE_BLOCK(n)->nd_end == n) {
23919 n = RNODE_BLOCK(n)->nd_head;
23920 }
23921 else {
23922 break;
23923 }
23924 }
23925 return NEW_DEFINED(n, loc);
23926}
23927
23928static NODE*
23929str_to_sym_node(struct parser_params *p, NODE *node, const YYLTYPE *loc)
23930{
23931 VALUE lit;
23932 rb_parser_string_t *str = RNODE_STR(node)->string;
23933 if (rb_parser_enc_str_coderange(p, str) == RB_PARSER_ENC_CODERANGE_BROKEN) {
23934 yyerror1(loc, "invalid symbol");
23935 lit = STR_NEW0();
23936 }
23937 else {
23938 lit = rb_str_new_parser_string(str);
23939 }
23940 return NEW_SYM(lit, loc);
23941}
23942
23943static NODE*
23944symbol_append(struct parser_params *p, NODE *symbols, NODE *symbol)
23945{
23946 enum node_type type = nd_type(symbol);
23947 switch (type) {
23948 case NODE_DSTR:
23949 nd_set_type(symbol, NODE_DSYM);
23950 break;
23951 case NODE_STR:
23952 symbol = str_to_sym_node(p, symbol, &RNODE(symbol)->nd_loc);
23953 break;
23954 default:
23955 compile_error(p, "unexpected node as symbol: %s", parser_node_name(type));
23956 }
23957 return list_append(p, symbols, symbol);
23958}
23959
23960static NODE *
23961new_regexp(struct parser_params *p, NODE *node, int options, const YYLTYPE *loc)
23962{
23963 struct RNode_LIST *list;
23964 NODE *prev;
23965
23966 if (!node) {
23967 /* Check string is valid regex */
23968 rb_parser_string_t *str = STRING_NEW0();
23969 reg_compile(p, str, options);
23970 node = NEW_REGX(str, options, loc);
23971 return node;
23972 }
23973 switch (nd_type(node)) {
23974 case NODE_STR:
23975 {
23976 /* Check string is valid regex */
23977 reg_compile(p, RNODE_STR(node)->string, options);
23978 node = str2regx(p, node, options);
23979 }
23980 break;
23981 default:
23982 node = NEW_DSTR0(STRING_NEW0(), 1, NEW_LIST(node, loc), loc);
23983 /* fall through */
23984 case NODE_DSTR:
23985 nd_set_type(node, NODE_DREGX);
23986 nd_set_loc(node, loc);
23987 rb_node_dregx_t *const dreg = RNODE_DREGX(node);
23988 dreg->as.nd_cflag = options & RE_OPTION_MASK;
23989 if (dreg->string) reg_fragment_check(p, dreg->string, options);
23990 prev = node;
23991 for (list = dreg->nd_next; list; list = RNODE_LIST(list->nd_next)) {
23992 NODE *frag = list->nd_head;
23993 enum node_type type = nd_type(frag);
23994 if (type == NODE_STR || (type == NODE_DSTR && !RNODE_DSTR(frag)->nd_next)) {
23995 rb_parser_string_t *tail = RNODE_STR(frag)->string;
23996 if (reg_fragment_check(p, tail, options) && prev && RNODE_DREGX(prev)->string) {
23997 rb_parser_string_t *lit = prev == node ? dreg->string : RNODE_STR(RNODE_LIST(prev)->nd_head)->string;
23998 if (!literal_concat0(p, lit, tail)) {
23999 return NEW_NIL(loc); /* dummy node on error */
24000 }
24001 rb_parser_str_resize(p, tail, 0);
24002 RNODE_LIST(prev)->nd_next = list->nd_next;
24003 rb_discard_node(p, list->nd_head);
24004 rb_discard_node(p, (NODE *)list);
24005 list = RNODE_LIST(prev);
24006 }
24007 else {
24008 prev = (NODE *)list;
24009 }
24010 }
24011 else {
24012 prev = 0;
24013 }
24014 }
24015 if (!dreg->nd_next) {
24016 /* Check string is valid regex */
24017 reg_compile(p, dreg->string, options);
24018 }
24019 if (options & RE_OPTION_ONCE) {
24020 node = NEW_ONCE(node, loc);
24021 }
24022 break;
24023 }
24024 return node;
24025}
24026
24027static rb_node_kw_arg_t *
24028new_kw_arg(struct parser_params *p, NODE *k, const YYLTYPE *loc)
24029{
24030 if (!k) return 0;
24031 return NEW_KW_ARG((k), loc);
24032}
24033
24034static NODE *
24035new_xstring(struct parser_params *p, NODE *node, const YYLTYPE *loc)
24036{
24037 if (!node) {
24038 NODE *xstr = NEW_XSTR(STRING_NEW0(), loc);
24039 return xstr;
24040 }
24041 switch (nd_type(node)) {
24042 case NODE_STR:
24043 nd_set_type(node, NODE_XSTR);
24044 nd_set_loc(node, loc);
24045 break;
24046 case NODE_DSTR:
24047 nd_set_type(node, NODE_DXSTR);
24048 nd_set_loc(node, loc);
24049 break;
24050 default:
24051 node = NEW_DXSTR(0, 1, NEW_LIST(node, loc), loc);
24052 break;
24053 }
24054 return node;
24055}
24056
24057static const
24058struct st_hash_type literal_type = {
24059 literal_cmp,
24060 literal_hash,
24061};
24062
24063static int nd_type_st_key_enable_p(NODE *node);
24064
24065static void
24066check_literal_when(struct parser_params *p, NODE *arg, const YYLTYPE *loc)
24067{
24068 /* See https://bugs.ruby-lang.org/issues/20331 for discussion about what is warned. */
24069 if (!arg || !p->case_labels) return;
24070 if (!nd_type_st_key_enable_p(arg)) return;
24071
24072 if (p->case_labels == CHECK_LITERAL_WHEN) {
24073 p->case_labels = st_init_table(&literal_type);
24074 }
24075 else {
24076 st_data_t line;
24077 if (st_lookup(p->case_labels, (st_data_t)arg, &line)) {
24078 rb_warning2("'when' clause on line %d duplicates 'when' clause on line %d and is ignored",
24079 WARN_I((int)nd_line(arg)), WARN_I((int)line));
24080 return;
24081 }
24082 }
24083 st_insert(p->case_labels, (st_data_t)arg, (st_data_t)p->ruby_sourceline);
24084}
24085
24086#ifdef RIPPER
24087static int
24088id_is_var(struct parser_params *p, ID id)
24089{
24090 if (is_notop_id(id)) {
24091 switch (id & ID_SCOPE_MASK) {
24092 case ID_GLOBAL: case ID_INSTANCE: case ID_CONST: case ID_CLASS:
24093 return 1;
24094 case ID_LOCAL:
24095 if (dyna_in_block(p)) {
24096 if (NUMPARAM_ID_P(id) || dvar_defined(p, id)) return 1;
24097 }
24098 if (local_id(p, id)) return 1;
24099 /* method call without arguments */
24100 return 0;
24101 }
24102 }
24103 compile_error(p, "identifier %"PRIsVALUE" is not valid to get", rb_id2str(id));
24104 return 0;
24105}
24106#endif
24107
24108static inline enum lex_state_e
24109parser_set_lex_state(struct parser_params *p, enum lex_state_e ls, int line)
24110{
24111 if (p->debug) {
24112 ls = rb_parser_trace_lex_state(p, p->lex.state, ls, line);
24113 }
24114 return p->lex.state = ls;
24115}
24116
24117#ifndef RIPPER
24118static void
24119flush_debug_buffer(struct parser_params *p, VALUE out, VALUE str)
24120{
24121 VALUE mesg = p->debug_buffer;
24122
24123 if (!NIL_P(mesg) && RSTRING_LEN(mesg)) {
24124 p->debug_buffer = Qnil;
24125 rb_io_puts(1, &mesg, out);
24126 }
24127 if (!NIL_P(str) && RSTRING_LEN(str)) {
24128 rb_io_write(p->debug_output, str);
24129 }
24130}
24131
24132static const char rb_parser_lex_state_names[][8] = {
24133 "BEG", "END", "ENDARG", "ENDFN", "ARG",
24134 "CMDARG", "MID", "FNAME", "DOT", "CLASS",
24135 "LABEL", "LABELED","FITEM",
24136};
24137
24138static VALUE
24139append_lex_state_name(struct parser_params *p, enum lex_state_e state, VALUE buf)
24140{
24141 int i, sep = 0;
24142 unsigned int mask = 1;
24143 static const char none[] = "NONE";
24144
24145 for (i = 0; i < EXPR_MAX_STATE; ++i, mask <<= 1) {
24146 if ((unsigned)state & mask) {
24147 if (sep) {
24148 rb_str_cat(buf, "|", 1);
24149 }
24150 sep = 1;
24151 rb_str_cat_cstr(buf, rb_parser_lex_state_names[i]);
24152 }
24153 }
24154 if (!sep) {
24155 rb_str_cat(buf, none, sizeof(none)-1);
24156 }
24157 return buf;
24158}
24159
24160enum lex_state_e
24161rb_parser_trace_lex_state(struct parser_params *p, enum lex_state_e from,
24162 enum lex_state_e to, int line)
24163{
24164 VALUE mesg;
24165 mesg = rb_str_new_cstr("lex_state: ");
24166 append_lex_state_name(p, from, mesg);
24167 rb_str_cat_cstr(mesg, " -> ");
24168 append_lex_state_name(p, to, mesg);
24169 rb_str_catf(mesg, " at line %d\n", line);
24170 flush_debug_buffer(p, p->debug_output, mesg);
24171 return to;
24172}
24173
24174VALUE
24175rb_parser_lex_state_name(struct parser_params *p, enum lex_state_e state)
24176{
24177 return rb_str_to_interned_str(append_lex_state_name(p, state, rb_str_new(0, 0)));
24178}
24179
24180static void
24181append_bitstack_value(struct parser_params *p, stack_type stack, VALUE mesg)
24182{
24183 if (stack == 0) {
24184 rb_str_cat_cstr(mesg, "0");
24185 }
24186 else {
24187 stack_type mask = (stack_type)1U << (CHAR_BIT * sizeof(stack_type) - 1);
24188 for (; mask && !(stack & mask); mask >>= 1) continue;
24189 for (; mask; mask >>= 1) rb_str_cat(mesg, stack & mask ? "1" : "0", 1);
24190 }
24191}
24192
24193void
24194rb_parser_show_bitstack(struct parser_params *p, stack_type stack,
24195 const char *name, int line)
24196{
24197 VALUE mesg = rb_sprintf("%s: ", name);
24198 append_bitstack_value(p, stack, mesg);
24199 rb_str_catf(mesg, " at line %d\n", line);
24200 flush_debug_buffer(p, p->debug_output, mesg);
24201}
24202
24203void
24204rb_parser_fatal(struct parser_params *p, const char *fmt, ...)
24205{
24206 va_list ap;
24207 VALUE mesg = rb_str_new_cstr("internal parser error: ");
24208
24209 va_start(ap, fmt);
24210 rb_str_vcatf(mesg, fmt, ap);
24211 va_end(ap);
24212 yyerror0(RSTRING_PTR(mesg));
24213 RB_GC_GUARD(mesg);
24214
24215 mesg = rb_str_new(0, 0);
24216 append_lex_state_name(p, p->lex.state, mesg);
24217 compile_error(p, "lex.state: %"PRIsVALUE, mesg);
24218 rb_str_resize(mesg, 0);
24219 append_bitstack_value(p, p->cond_stack, mesg);
24220 compile_error(p, "cond_stack: %"PRIsVALUE, mesg);
24221 rb_str_resize(mesg, 0);
24222 append_bitstack_value(p, p->cmdarg_stack, mesg);
24223 compile_error(p, "cmdarg_stack: %"PRIsVALUE, mesg);
24224 if (p->debug_output == rb_ractor_stdout())
24225 p->debug_output = rb_ractor_stderr();
24226 p->debug = TRUE;
24227}
24228
24229static YYLTYPE *
24230rb_parser_set_pos(YYLTYPE *yylloc, int sourceline, int beg_pos, int end_pos)
24231{
24232 yylloc->beg_pos.lineno = sourceline;
24233 yylloc->beg_pos.column = beg_pos;
24234 yylloc->end_pos.lineno = sourceline;
24235 yylloc->end_pos.column = end_pos;
24236 return yylloc;
24237}
24238
24239YYLTYPE *
24240rb_parser_set_location_from_strterm_heredoc(struct parser_params *p, rb_strterm_heredoc_t *here, YYLTYPE *yylloc)
24241{
24242 int sourceline = here->sourceline;
24243 int beg_pos = (int)here->offset - here->quote
24244 - (rb_strlen_lit("<<-") - !(here->func & STR_FUNC_INDENT));
24245 int end_pos = (int)here->offset + here->length + here->quote;
24246
24247 return rb_parser_set_pos(yylloc, sourceline, beg_pos, end_pos);
24248}
24249
24250YYLTYPE *
24251rb_parser_set_location_of_delayed_token(struct parser_params *p, YYLTYPE *yylloc)
24252{
24253 yylloc->beg_pos.lineno = p->delayed.beg_line;
24254 yylloc->beg_pos.column = p->delayed.beg_col;
24255 yylloc->end_pos.lineno = p->delayed.end_line;
24256 yylloc->end_pos.column = p->delayed.end_col;
24257
24258 return yylloc;
24259}
24260
24261YYLTYPE *
24262rb_parser_set_location_of_heredoc_end(struct parser_params *p, YYLTYPE *yylloc)
24263{
24264 int sourceline = p->ruby_sourceline;
24265 int beg_pos = (int)(p->lex.ptok - p->lex.pbeg);
24266 int end_pos = (int)(p->lex.pend - p->lex.pbeg);
24267 return rb_parser_set_pos(yylloc, sourceline, beg_pos, end_pos);
24268}
24269
24270YYLTYPE *
24271rb_parser_set_location_of_dummy_end(struct parser_params *p, YYLTYPE *yylloc)
24272{
24273 yylloc->end_pos = yylloc->beg_pos;
24274
24275 return yylloc;
24276}
24277
24278YYLTYPE *
24279rb_parser_set_location_of_none(struct parser_params *p, YYLTYPE *yylloc)
24280{
24281 int sourceline = p->ruby_sourceline;
24282 int beg_pos = (int)(p->lex.ptok - p->lex.pbeg);
24283 int end_pos = (int)(p->lex.ptok - p->lex.pbeg);
24284 return rb_parser_set_pos(yylloc, sourceline, beg_pos, end_pos);
24285}
24286
24287YYLTYPE *
24288rb_parser_set_location(struct parser_params *p, YYLTYPE *yylloc)
24289{
24290 int sourceline = p->ruby_sourceline;
24291 int beg_pos = (int)(p->lex.ptok - p->lex.pbeg);
24292 int end_pos = (int)(p->lex.pcur - p->lex.pbeg);
24293 return rb_parser_set_pos(yylloc, sourceline, beg_pos, end_pos);
24294}
24295#endif /* !RIPPER */
24296
24297static int
24298assignable0(struct parser_params *p, ID id, const char **err)
24299{
24300 if (!id) return -1;
24301 switch (id) {
24302 case keyword_self:
24303 *err = "Can't change the value of self";
24304 return -1;
24305 case keyword_nil:
24306 *err = "Can't assign to nil";
24307 return -1;
24308 case keyword_true:
24309 *err = "Can't assign to true";
24310 return -1;
24311 case keyword_false:
24312 *err = "Can't assign to false";
24313 return -1;
24314 case keyword__FILE__:
24315 *err = "Can't assign to __FILE__";
24316 return -1;
24317 case keyword__LINE__:
24318 *err = "Can't assign to __LINE__";
24319 return -1;
24320 case keyword__ENCODING__:
24321 *err = "Can't assign to __ENCODING__";
24322 return -1;
24323 }
24324 switch (id_type(id)) {
24325 case ID_LOCAL:
24326 if (dyna_in_block(p)) {
24327 if (p->max_numparam > NO_PARAM && NUMPARAM_ID_P(id)) {
24328 compile_error(p, "Can't assign to numbered parameter _%d",
24329 NUMPARAM_ID_TO_IDX(id));
24330 return -1;
24331 }
24332 if (dvar_curr(p, id)) return NODE_DASGN;
24333 if (dvar_defined(p, id)) return NODE_DASGN;
24334 if (local_id(p, id)) return NODE_LASGN;
24335 dyna_var(p, id);
24336 return NODE_DASGN;
24337 }
24338 else {
24339 if (!local_id(p, id)) local_var(p, id);
24340 return NODE_LASGN;
24341 }
24342 break;
24343 case ID_GLOBAL: return NODE_GASGN;
24344 case ID_INSTANCE: return NODE_IASGN;
24345 case ID_CONST:
24346 if (!p->ctxt.in_def) return NODE_CDECL;
24347 *err = "dynamic constant assignment";
24348 return -1;
24349 case ID_CLASS: return NODE_CVASGN;
24350 default:
24351 compile_error(p, "identifier %"PRIsVALUE" is not valid to set", rb_id2str(id));
24352 }
24353 return -1;
24354}
24355
24356static NODE*
24357assignable(struct parser_params *p, ID id, NODE *val, const YYLTYPE *loc)
24358{
24359 const char *err = 0;
24360 int node_type = assignable0(p, id, &err);
24361 switch (node_type) {
24362 case NODE_DASGN: return NEW_DASGN(id, val, loc);
24363 case NODE_LASGN: return NEW_LASGN(id, val, loc);
24364 case NODE_GASGN: return NEW_GASGN(id, val, loc);
24365 case NODE_IASGN: return NEW_IASGN(id, val, loc);
24366 case NODE_CDECL: return NEW_CDECL(id, val, 0, p->ctxt.shareable_constant_value, loc);
24367 case NODE_CVASGN: return NEW_CVASGN(id, val, loc);
24368 }
24369/* TODO: FIXME */
24370#ifndef RIPPER
24371 if (err) yyerror1(loc, err);
24372#else
24373 if (err) set_value(assign_error(p, err, p->s_lvalue));
24374#endif
24375 return NEW_ERROR(loc);
24376}
24377
24378static int
24379is_private_local_id(struct parser_params *p, ID name)
24380{
24381 VALUE s;
24382 if (name == idUScore) return 1;
24383 if (!is_local_id(name)) return 0;
24384 s = rb_id2str(name);
24385 if (!s) return 0;
24386 return RSTRING_PTR(s)[0] == '_';
24387}
24388
24389static int
24390shadowing_lvar_0(struct parser_params *p, ID name)
24391{
24392 if (dyna_in_block(p)) {
24393 if (dvar_curr(p, name)) {
24394 if (is_private_local_id(p, name)) return 1;
24395 yyerror0("duplicated argument name");
24396 }
24397 else if (dvar_defined(p, name) || local_id(p, name)) {
24398 vtable_add(p->lvtbl->vars, name);
24399 if (p->lvtbl->used) {
24400 vtable_add(p->lvtbl->used, (ID)p->ruby_sourceline | LVAR_USED);
24401 }
24402 return 0;
24403 }
24404 }
24405 else {
24406 if (local_id(p, name)) {
24407 if (is_private_local_id(p, name)) return 1;
24408 yyerror0("duplicated argument name");
24409 }
24410 }
24411 return 1;
24412}
24413
24414static ID
24415shadowing_lvar(struct parser_params *p, ID name)
24416{
24417 shadowing_lvar_0(p, name);
24418 return name;
24419}
24420
24421static void
24422new_bv(struct parser_params *p, ID name)
24423{
24424 if (!name) return;
24425 if (!is_local_id(name)) {
24426 compile_error(p, "invalid local variable - %"PRIsVALUE,
24427 rb_id2str(name));
24428 return;
24429 }
24430 if (!shadowing_lvar_0(p, name)) return;
24431 dyna_var(p, name);
24432 ID *vidp = 0;
24433 if (dvar_defined_ref(p, name, &vidp)) {
24434 if (vidp) *vidp |= LVAR_USED;
24435 }
24436}
24437
24438static void
24439aryset_check(struct parser_params *p, NODE *args)
24440{
24441 NODE *block = 0, *kwds = 0;
24442 if (args && nd_type_p(args, NODE_BLOCK_PASS)) {
24443 block = RNODE_BLOCK_PASS(args)->nd_body;
24444 args = RNODE_BLOCK_PASS(args)->nd_head;
24445 }
24446 if (args && nd_type_p(args, NODE_ARGSCAT)) {
24447 args = RNODE_ARGSCAT(args)->nd_body;
24448 }
24449 if (args && nd_type_p(args, NODE_ARGSPUSH)) {
24450 kwds = RNODE_ARGSPUSH(args)->nd_body;
24451 }
24452 else {
24453 for (NODE *next = args; next && nd_type_p(next, NODE_LIST);
24454 next = RNODE_LIST(next)->nd_next) {
24455 kwds = RNODE_LIST(next)->nd_head;
24456 }
24457 }
24458 if (kwds && nd_type_p(kwds, NODE_HASH) && !RNODE_HASH(kwds)->nd_brace) {
24459 yyerror1(&kwds->nd_loc, "keyword arg given in index assignment");
24460 }
24461 if (block) {
24462 yyerror1(&block->nd_loc, "block arg given in index assignment");
24463 }
24464}
24465
24466static NODE *
24467aryset(struct parser_params *p, NODE *recv, NODE *idx, const YYLTYPE *loc)
24468{
24469 aryset_check(p, idx);
24470 return NEW_ATTRASGN(recv, tASET, idx, loc);
24471}
24472
24473static void
24474block_dup_check(struct parser_params *p, NODE *node1, NODE *node2)
24475{
24476 if (node2 && node1 && nd_type_p(node1, NODE_BLOCK_PASS)) {
24477 compile_error(p, "both block arg and actual block given");
24478 }
24479}
24480
24481static NODE *
24482attrset(struct parser_params *p, NODE *recv, ID atype, ID id, const YYLTYPE *loc)
24483{
24484 if (!CALL_Q_P(atype)) id = rb_id_attrset(id);
24485 return NEW_ATTRASGN(recv, id, 0, loc);
24486}
24487
24488static VALUE
24489rb_backref_error(struct parser_params *p, NODE *node)
24490{
24491#ifndef RIPPER
24492# define ERR(...) (compile_error(p, __VA_ARGS__), Qtrue)
24493#else
24494# define ERR(...) rb_sprintf(__VA_ARGS__)
24495#endif
24496 switch (nd_type(node)) {
24497 case NODE_NTH_REF:
24498 return ERR("Can't set variable $%ld", RNODE_NTH_REF(node)->nd_nth);
24499 case NODE_BACK_REF:
24500 return ERR("Can't set variable $%c", (int)RNODE_BACK_REF(node)->nd_nth);
24501 }
24502#undef ERR
24503 UNREACHABLE_RETURN(Qfalse); /* only called on syntax error */
24504}
24505
24506static NODE *
24507arg_append(struct parser_params *p, NODE *node1, NODE *node2, const YYLTYPE *loc)
24508{
24509 if (!node1) return NEW_LIST(node2, &node2->nd_loc);
24510 switch (nd_type(node1)) {
24511 case NODE_LIST:
24512 return list_append(p, node1, node2);
24513 case NODE_BLOCK_PASS:
24514 RNODE_BLOCK_PASS(node1)->nd_head = arg_append(p, RNODE_BLOCK_PASS(node1)->nd_head, node2, loc);
24515 node1->nd_loc.end_pos = RNODE_BLOCK_PASS(node1)->nd_head->nd_loc.end_pos;
24516 return node1;
24517 case NODE_ARGSPUSH:
24518 RNODE_ARGSPUSH(node1)->nd_body = list_append(p, NEW_LIST(RNODE_ARGSPUSH(node1)->nd_body, &RNODE_ARGSPUSH(node1)->nd_body->nd_loc), node2);
24519 node1->nd_loc.end_pos = RNODE_ARGSPUSH(node1)->nd_body->nd_loc.end_pos;
24520 nd_set_type(node1, NODE_ARGSCAT);
24521 return node1;
24522 case NODE_ARGSCAT:
24523 if (!nd_type_p(RNODE_ARGSCAT(node1)->nd_body, NODE_LIST)) break;
24524 RNODE_ARGSCAT(node1)->nd_body = list_append(p, RNODE_ARGSCAT(node1)->nd_body, node2);
24525 node1->nd_loc.end_pos = RNODE_ARGSCAT(node1)->nd_body->nd_loc.end_pos;
24526 return node1;
24527 }
24528 return NEW_ARGSPUSH(node1, node2, loc);
24529}
24530
24531static NODE *
24532arg_concat(struct parser_params *p, NODE *node1, NODE *node2, const YYLTYPE *loc)
24533{
24534 if (!node2) return node1;
24535 switch (nd_type(node1)) {
24536 case NODE_BLOCK_PASS:
24537 if (RNODE_BLOCK_PASS(node1)->nd_head)
24538 RNODE_BLOCK_PASS(node1)->nd_head = arg_concat(p, RNODE_BLOCK_PASS(node1)->nd_head, node2, loc);
24539 else
24540 RNODE_LIST(node1)->nd_head = NEW_LIST(node2, loc);
24541 return node1;
24542 case NODE_ARGSPUSH:
24543 if (!nd_type_p(node2, NODE_LIST)) break;
24544 RNODE_ARGSPUSH(node1)->nd_body = list_concat(NEW_LIST(RNODE_ARGSPUSH(node1)->nd_body, loc), node2);
24545 nd_set_type(node1, NODE_ARGSCAT);
24546 return node1;
24547 case NODE_ARGSCAT:
24548 if (!nd_type_p(node2, NODE_LIST) ||
24549 !nd_type_p(RNODE_ARGSCAT(node1)->nd_body, NODE_LIST)) break;
24550 RNODE_ARGSCAT(node1)->nd_body = list_concat(RNODE_ARGSCAT(node1)->nd_body, node2);
24551 return node1;
24552 }
24553 return NEW_ARGSCAT(node1, node2, loc);
24554}
24555
24556static NODE *
24557last_arg_append(struct parser_params *p, NODE *args, NODE *last_arg, const YYLTYPE *loc)
24558{
24559 NODE *n1;
24560 if ((n1 = splat_array(args)) != 0) {
24561 return list_append(p, n1, last_arg);
24562 }
24563 return arg_append(p, args, last_arg, loc);
24564}
24565
24566static NODE *
24567rest_arg_append(struct parser_params *p, NODE *args, NODE *rest_arg, const YYLTYPE *loc)
24568{
24569 NODE *n1;
24570 if ((nd_type_p(rest_arg, NODE_LIST)) && (n1 = splat_array(args)) != 0) {
24571 return list_concat(n1, rest_arg);
24572 }
24573 return arg_concat(p, args, rest_arg, loc);
24574}
24575
24576static NODE *
24577splat_array(NODE* node)
24578{
24579 if (nd_type_p(node, NODE_SPLAT)) node = RNODE_SPLAT(node)->nd_head;
24580 if (nd_type_p(node, NODE_LIST)) return node;
24581 return 0;
24582}
24583
24584static void
24585mark_lvar_used(struct parser_params *p, NODE *rhs)
24586{
24587 ID *vidp = NULL;
24588 if (!rhs) return;
24589 switch (nd_type(rhs)) {
24590 case NODE_LASGN:
24591 if (local_id_ref(p, RNODE_LASGN(rhs)->nd_vid, &vidp)) {
24592 if (vidp) *vidp |= LVAR_USED;
24593 }
24594 break;
24595 case NODE_DASGN:
24596 if (dvar_defined_ref(p, RNODE_DASGN(rhs)->nd_vid, &vidp)) {
24597 if (vidp) *vidp |= LVAR_USED;
24598 }
24599 break;
24600#if 0
24601 case NODE_MASGN:
24602 for (rhs = rhs->nd_head; rhs; rhs = rhs->nd_next) {
24603 mark_lvar_used(p, rhs->nd_head);
24604 }
24605 break;
24606#endif
24607 }
24608}
24609
24610static int is_static_content(NODE *node);
24611
24612static NODE *
24613node_assign(struct parser_params *p, NODE *lhs, NODE *rhs, struct lex_context ctxt, const YYLTYPE *loc)
24614{
24615 if (!lhs) return 0;
24616
24617 switch (nd_type(lhs)) {
24618 case NODE_CDECL:
24619 case NODE_GASGN:
24620 case NODE_IASGN:
24621 case NODE_LASGN:
24622 case NODE_DASGN:
24623 case NODE_MASGN:
24624 case NODE_CVASGN:
24625 set_nd_value(p, lhs, rhs);
24626 nd_set_loc(lhs, loc);
24627 break;
24628
24629 case NODE_ATTRASGN:
24630 RNODE_ATTRASGN(lhs)->nd_args = arg_append(p, RNODE_ATTRASGN(lhs)->nd_args, rhs, loc);
24631 nd_set_loc(lhs, loc);
24632 break;
24633
24634 default:
24635 /* should not happen */
24636 break;
24637 }
24638
24639 return lhs;
24640}
24641
24642static NODE *
24643value_expr_check(struct parser_params *p, NODE *node)
24644{
24645 NODE *void_node = 0, *vn;
24646
24647 if (!node) {
24648 rb_warning0("empty expression");
24649 }
24650 while (node) {
24651 switch (nd_type(node)) {
24652 case NODE_ENSURE:
24653 vn = RNODE_ENSURE(node)->nd_head;
24654 node = RNODE_ENSURE(node)->nd_ensr;
24655 /* nd_ensr should not be NULL, check it out next */
24656 if (vn && (vn = value_expr_check(p, vn))) {
24657 goto found;
24658 }
24659 break;
24660
24661 case NODE_RESCUE:
24662 /* void only if all children are void */
24663 vn = RNODE_RESCUE(node)->nd_head;
24664 if (!vn || !(vn = value_expr_check(p, vn))) return NULL;
24665 if (!void_node) void_node = vn;
24666 for (NODE *r = RNODE_RESCUE(node)->nd_resq; r; r = RNODE_RESBODY(r)->nd_next) {
24667 if (!nd_type_p(r, NODE_RESBODY)) {
24668 compile_error(p, "unexpected node");
24669 return NULL;
24670 }
24671 if (!(vn = value_expr_check(p, RNODE_RESBODY(r)->nd_body))) {
24672 void_node = 0;
24673 break;
24674 }
24675 if (!void_node) void_node = vn;
24676 }
24677 node = RNODE_RESCUE(node)->nd_else;
24678 if (!node) return void_node;
24679 break;
24680
24681 case NODE_RETURN:
24682 case NODE_BREAK:
24683 case NODE_NEXT:
24684 case NODE_REDO:
24685 case NODE_RETRY:
24686 goto found;
24687
24688 case NODE_CASE3:
24689 if (!RNODE_CASE3(node)->nd_body || !nd_type_p(RNODE_CASE3(node)->nd_body, NODE_IN)) {
24690 compile_error(p, "unexpected node");
24691 return NULL;
24692 }
24693 if (RNODE_IN(RNODE_CASE3(node)->nd_body)->nd_body) {
24694 return NULL;
24695 }
24696 /* single line pattern matching with "=>" operator */
24697 goto found;
24698
24699 case NODE_BLOCK:
24700 while (RNODE_BLOCK(node)->nd_next) {
24701 node = RNODE_BLOCK(node)->nd_next;
24702 }
24703 node = RNODE_BLOCK(node)->nd_head;
24704 break;
24705
24706 case NODE_BEGIN:
24707 node = RNODE_BEGIN(node)->nd_body;
24708 break;
24709
24710 case NODE_IF:
24711 case NODE_UNLESS:
24712 if (!RNODE_IF(node)->nd_body) {
24713 return NULL;
24714 }
24715 else if (!RNODE_IF(node)->nd_else) {
24716 return NULL;
24717 }
24718 vn = value_expr_check(p, RNODE_IF(node)->nd_body);
24719 if (!vn) return NULL;
24720 if (!void_node) void_node = vn;
24721 node = RNODE_IF(node)->nd_else;
24722 break;
24723
24724 case NODE_AND:
24725 case NODE_OR:
24726 node = RNODE_AND(node)->nd_1st;
24727 break;
24728
24729 case NODE_LASGN:
24730 case NODE_DASGN:
24731 case NODE_MASGN:
24732 mark_lvar_used(p, node);
24733 return NULL;
24734
24735 default:
24736 return NULL;
24737 }
24738 }
24739
24740 return NULL;
24741
24742 found:
24743 /* return the first found node */
24744 return void_node ? void_node : node;
24745}
24746
24747static int
24748value_expr_gen(struct parser_params *p, NODE *node)
24749{
24750 NODE *void_node = value_expr_check(p, node);
24751 if (void_node) {
24752 yyerror1(&void_node->nd_loc, "void value expression");
24753 /* or "control never reach"? */
24754 return FALSE;
24755 }
24756 return TRUE;
24757}
24758
24759static void
24760void_expr(struct parser_params *p, NODE *node)
24761{
24762 const char *useless = 0;
24763
24764 if (!RTEST(ruby_verbose)) return;
24765
24766 if (!node || !(node = nd_once_body(node))) return;
24767 switch (nd_type(node)) {
24768 case NODE_OPCALL:
24769 switch (RNODE_OPCALL(node)->nd_mid) {
24770 case '+':
24771 case '-':
24772 case '*':
24773 case '/':
24774 case '%':
24775 case tPOW:
24776 case tUPLUS:
24777 case tUMINUS:
24778 case '|':
24779 case '^':
24780 case '&':
24781 case tCMP:
24782 case '>':
24783 case tGEQ:
24784 case '<':
24785 case tLEQ:
24786 case tEQ:
24787 case tNEQ:
24788 useless = rb_id2name(RNODE_OPCALL(node)->nd_mid);
24789 break;
24790 }
24791 break;
24792
24793 case NODE_LVAR:
24794 case NODE_DVAR:
24795 case NODE_GVAR:
24796 case NODE_IVAR:
24797 case NODE_CVAR:
24798 case NODE_NTH_REF:
24799 case NODE_BACK_REF:
24800 useless = "a variable";
24801 break;
24802 case NODE_CONST:
24803 useless = "a constant";
24804 break;
24805 case NODE_SYM:
24806 case NODE_LINE:
24807 case NODE_FILE:
24808 case NODE_ENCODING:
24809 case NODE_INTEGER:
24810 case NODE_FLOAT:
24811 case NODE_RATIONAL:
24812 case NODE_IMAGINARY:
24813 case NODE_STR:
24814 case NODE_DSTR:
24815 case NODE_REGX:
24816 case NODE_DREGX:
24817 useless = "a literal";
24818 break;
24819 case NODE_COLON2:
24820 case NODE_COLON3:
24821 useless = "::";
24822 break;
24823 case NODE_DOT2:
24824 useless = "..";
24825 break;
24826 case NODE_DOT3:
24827 useless = "...";
24828 break;
24829 case NODE_SELF:
24830 useless = "self";
24831 break;
24832 case NODE_NIL:
24833 useless = "nil";
24834 break;
24835 case NODE_TRUE:
24836 useless = "true";
24837 break;
24838 case NODE_FALSE:
24839 useless = "false";
24840 break;
24841 case NODE_DEFINED:
24842 useless = "defined?";
24843 break;
24844 }
24845
24846 if (useless) {
24847 rb_warn1L(nd_line(node), "possibly useless use of %s in void context", WARN_S(useless));
24848 }
24849}
24850
24851/* warns useless use of block and returns the last statement node */
24852static NODE *
24853void_stmts(struct parser_params *p, NODE *node)
24854{
24855 NODE *const n = node;
24856 if (!RTEST(ruby_verbose)) return n;
24857 if (!node) return n;
24858 if (!nd_type_p(node, NODE_BLOCK)) return n;
24859
24860 while (RNODE_BLOCK(node)->nd_next) {
24861 void_expr(p, RNODE_BLOCK(node)->nd_head);
24862 node = RNODE_BLOCK(node)->nd_next;
24863 }
24864 return RNODE_BLOCK(node)->nd_head;
24865}
24866
24867static NODE *
24868remove_begin(NODE *node)
24869{
24870 NODE **n = &node, *n1 = node;
24871 while (n1 && nd_type_p(n1, NODE_BEGIN) && RNODE_BEGIN(n1)->nd_body) {
24872 *n = n1 = RNODE_BEGIN(n1)->nd_body;
24873 }
24874 return node;
24875}
24876
24877static void
24878reduce_nodes(struct parser_params *p, NODE **body)
24879{
24880 NODE *node = *body;
24881
24882 if (!node) {
24883 *body = NEW_NIL(&NULL_LOC);
24884 return;
24885 }
24886#define subnodes(type, n1, n2) \
24887 ((!type(node)->n1) ? (type(node)->n2 ? (body = &type(node)->n2, 1) : 0) : \
24888 (!type(node)->n2) ? (body = &type(node)->n1, 1) : \
24889 (reduce_nodes(p, &type(node)->n1), body = &type(node)->n2, 1))
24890
24891 while (node) {
24892 int newline = (int)nd_fl_newline(node);
24893 switch (nd_type(node)) {
24894 end:
24895 case NODE_NIL:
24896 *body = 0;
24897 return;
24898 case NODE_BEGIN:
24899 *body = node = RNODE_BEGIN(node)->nd_body;
24900 if (newline && node) nd_set_fl_newline(node);
24901 continue;
24902 case NODE_BLOCK:
24903 body = &RNODE_BLOCK(RNODE_BLOCK(node)->nd_end)->nd_head;
24904 break;
24905 case NODE_IF:
24906 case NODE_UNLESS:
24907 if (subnodes(RNODE_IF, nd_body, nd_else)) break;
24908 return;
24909 case NODE_CASE:
24910 body = &RNODE_CASE(node)->nd_body;
24911 break;
24912 case NODE_WHEN:
24913 if (!subnodes(RNODE_WHEN, nd_body, nd_next)) goto end;
24914 break;
24915 case NODE_ENSURE:
24916 body = &RNODE_ENSURE(node)->nd_head;
24917 break;
24918 case NODE_RESCUE:
24919 newline = 0; // RESBODY should not be a NEWLINE
24920 if (RNODE_RESCUE(node)->nd_else) {
24921 body = &RNODE_RESCUE(node)->nd_resq;
24922 break;
24923 }
24924 if (!subnodes(RNODE_RESCUE, nd_head, nd_resq)) goto end;
24925 break;
24926 default:
24927 return;
24928 }
24929 node = *body;
24930 if (newline && node) nd_set_fl_newline(node);
24931 }
24932
24933#undef subnodes
24934}
24935
24936static int
24937is_static_content(NODE *node)
24938{
24939 if (!node) return 1;
24940 switch (nd_type(node)) {
24941 case NODE_HASH:
24942 if (!(node = RNODE_HASH(node)->nd_head)) break;
24943 case NODE_LIST:
24944 do {
24945 if (!is_static_content(RNODE_LIST(node)->nd_head)) return 0;
24946 } while ((node = RNODE_LIST(node)->nd_next) != 0);
24947 case NODE_SYM:
24948 case NODE_REGX:
24949 case NODE_LINE:
24950 case NODE_FILE:
24951 case NODE_ENCODING:
24952 case NODE_INTEGER:
24953 case NODE_FLOAT:
24954 case NODE_RATIONAL:
24955 case NODE_IMAGINARY:
24956 case NODE_STR:
24957 case NODE_NIL:
24958 case NODE_TRUE:
24959 case NODE_FALSE:
24960 case NODE_ZLIST:
24961 break;
24962 default:
24963 return 0;
24964 }
24965 return 1;
24966}
24967
24968static int
24969assign_in_cond(struct parser_params *p, NODE *node)
24970{
24971 switch (nd_type(node)) {
24972 case NODE_MASGN:
24973 case NODE_LASGN:
24974 case NODE_DASGN:
24975 case NODE_GASGN:
24976 case NODE_IASGN:
24977 case NODE_CVASGN:
24978 case NODE_CDECL:
24979 break;
24980
24981 default:
24982 return 0;
24983 }
24984
24985 if (!get_nd_value(p, node)) return 1;
24986 if (is_static_content(get_nd_value(p, node))) {
24987 /* reports always */
24988 rb_warn0L(nd_line(get_nd_value(p, node)), "found '= literal' in conditional, should be ==");
24989 }
24990 return 1;
24991}
24992
24993enum cond_type {
24994 COND_IN_OP,
24995 COND_IN_COND,
24996 COND_IN_FF
24997};
24998
24999#define SWITCH_BY_COND_TYPE(t, w, arg) do { \
25000 switch (t) { \
25001 case COND_IN_OP: break; \
25002 case COND_IN_COND: rb_##w##0(arg "literal in condition"); break; \
25003 case COND_IN_FF: rb_##w##0(arg "literal in flip-flop"); break; \
25004 } \
25005} while (0)
25006
25007static NODE *cond0(struct parser_params*,NODE*,enum cond_type,const YYLTYPE*,bool);
25008
25009static NODE*
25010range_op(struct parser_params *p, NODE *node, const YYLTYPE *loc)
25011{
25012 enum node_type type;
25013
25014 if (node == 0) return 0;
25015
25016 type = nd_type(node);
25017 value_expr(node);
25018 if (type == NODE_INTEGER) {
25019 if (!e_option_supplied(p)) rb_warn0L(nd_line(node), "integer literal in flip-flop");
25020 ID lineno = rb_intern("$.");
25021 return NEW_CALL(node, tEQ, NEW_LIST(NEW_GVAR(lineno, loc), loc), loc);
25022 }
25023 return cond0(p, node, COND_IN_FF, loc, true);
25024}
25025
25026static NODE*
25027cond0(struct parser_params *p, NODE *node, enum cond_type type, const YYLTYPE *loc, bool top)
25028{
25029 if (node == 0) return 0;
25030 if (!(node = nd_once_body(node))) return 0;
25031 assign_in_cond(p, node);
25032
25033 switch (nd_type(node)) {
25034 case NODE_BEGIN:
25035 RNODE_BEGIN(node)->nd_body = cond0(p, RNODE_BEGIN(node)->nd_body, type, loc, top);
25036 break;
25037
25038 case NODE_DSTR:
25039 case NODE_EVSTR:
25040 case NODE_STR:
25041 case NODE_FILE:
25042 SWITCH_BY_COND_TYPE(type, warn, "string ");
25043 break;
25044
25045 case NODE_REGX:
25046 if (!e_option_supplied(p)) SWITCH_BY_COND_TYPE(type, warn, "regex ");
25047 nd_set_type(node, NODE_MATCH);
25048 break;
25049
25050 case NODE_DREGX:
25051 if (!e_option_supplied(p)) SWITCH_BY_COND_TYPE(type, warning, "regex ");
25052
25053 return NEW_MATCH2(node, NEW_GVAR(idLASTLINE, loc), loc);
25054
25055 case NODE_BLOCK:
25056 {
25057 NODE *end = RNODE_BLOCK(node)->nd_end;
25058 NODE **expr = &RNODE_BLOCK(end)->nd_head;
25059 if (top) top = node == end;
25060 *expr = cond0(p, *expr, type, loc, top);
25061 }
25062 break;
25063
25064 case NODE_AND:
25065 case NODE_OR:
25066 RNODE_AND(node)->nd_1st = cond0(p, RNODE_AND(node)->nd_1st, COND_IN_COND, loc, true);
25067 RNODE_AND(node)->nd_2nd = cond0(p, RNODE_AND(node)->nd_2nd, COND_IN_COND, loc, true);
25068 break;
25069
25070 case NODE_DOT2:
25071 case NODE_DOT3:
25072 if (!top) break;
25073 RNODE_DOT2(node)->nd_beg = range_op(p, RNODE_DOT2(node)->nd_beg, loc);
25074 RNODE_DOT2(node)->nd_end = range_op(p, RNODE_DOT2(node)->nd_end, loc);
25075 switch (nd_type(node)) {
25076 case NODE_DOT2:
25077 nd_set_type(node,NODE_FLIP2);
25078 rb_node_flip2_t *flip2 = RNODE_FLIP2(node); /* for debug info */
25079 (void)flip2;
25080 break;
25081 case NODE_DOT3:
25082 nd_set_type(node, NODE_FLIP3);
25083 rb_node_flip3_t *flip3 = RNODE_FLIP3(node); /* for debug info */
25084 (void)flip3;
25085 break;
25086 }
25087 break;
25088
25089 case NODE_SYM:
25090 case NODE_DSYM:
25091 SWITCH_BY_COND_TYPE(type, warning, "symbol ");
25092 break;
25093
25094 case NODE_LINE:
25095 SWITCH_BY_COND_TYPE(type, warning, "");
25096 break;
25097
25098 case NODE_ENCODING:
25099 SWITCH_BY_COND_TYPE(type, warning, "");
25100 break;
25101
25102 case NODE_INTEGER:
25103 case NODE_FLOAT:
25104 case NODE_RATIONAL:
25105 case NODE_IMAGINARY:
25106 SWITCH_BY_COND_TYPE(type, warning, "");
25107 break;
25108
25109 default:
25110 break;
25111 }
25112 return node;
25113}
25114
25115static NODE*
25116cond(struct parser_params *p, NODE *node, const YYLTYPE *loc)
25117{
25118 if (node == 0) return 0;
25119 return cond0(p, node, COND_IN_COND, loc, true);
25120}
25121
25122static NODE*
25123method_cond(struct parser_params *p, NODE *node, const YYLTYPE *loc)
25124{
25125 if (node == 0) return 0;
25126 return cond0(p, node, COND_IN_OP, loc, true);
25127}
25128
25129static NODE*
25130new_nil_at(struct parser_params *p, const rb_code_position_t *pos)
25131{
25132 YYLTYPE loc = {*pos, *pos};
25133 return NEW_NIL(&loc);
25134}
25135
25136static NODE*
25137new_if(struct parser_params *p, NODE *cc, NODE *left, NODE *right, const YYLTYPE *loc)
25138{
25139 if (!cc) return right;
25140 cc = cond0(p, cc, COND_IN_COND, loc, true);
25141 return newline_node(NEW_IF(cc, left, right, loc));
25142}
25143
25144static NODE*
25145new_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)
25146{
25147 if (!cc) return right;
25148 cc = cond0(p, cc, COND_IN_COND, loc, true);
25149 return newline_node(NEW_UNLESS(cc, left, right, loc, keyword_loc, then_keyword_loc, end_keyword_loc));
25150}
25151
25152#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))
25153
25154static NODE*
25155logop(struct parser_params *p, ID id, NODE *left, NODE *right,
25156 const YYLTYPE *op_loc, const YYLTYPE *loc)
25157{
25158 enum node_type type = id == idAND || id == idANDOP ? NODE_AND : NODE_OR;
25159 NODE *op;
25160 value_expr(left);
25161 if (left && nd_type_p(left, type)) {
25162 NODE *node = left, *second;
25163 while ((second = RNODE_AND(node)->nd_2nd) != 0 && nd_type_p(second, type)) {
25164 node = second;
25165 }
25166 RNODE_AND(node)->nd_2nd = NEW_AND_OR(type, second, right, loc, op_loc);
25167 nd_set_line(RNODE_AND(node)->nd_2nd, op_loc->beg_pos.lineno);
25168 left->nd_loc.end_pos = loc->end_pos;
25169 return left;
25170 }
25171 op = NEW_AND_OR(type, left, right, loc, op_loc);
25172 nd_set_line(op, op_loc->beg_pos.lineno);
25173 return op;
25174}
25175
25176#undef NEW_AND_OR
25177
25178static void
25179no_blockarg(struct parser_params *p, NODE *node)
25180{
25181 if (nd_type_p(node, NODE_BLOCK_PASS)) {
25182 compile_error(p, "block argument should not be given");
25183 }
25184}
25185
25186static NODE *
25187ret_args(struct parser_params *p, NODE *node)
25188{
25189 if (node) {
25190 no_blockarg(p, node);
25191 if (nd_type_p(node, NODE_LIST) && !RNODE_LIST(node)->nd_next) {
25192 node = RNODE_LIST(node)->nd_head;
25193 }
25194 }
25195 return node;
25196}
25197
25198static NODE *
25199new_yield(struct parser_params *p, NODE *node, const YYLTYPE *loc)
25200{
25201 if (node) no_blockarg(p, node);
25202
25203 return NEW_YIELD(node, loc);
25204}
25205
25206static NODE*
25207negate_lit(struct parser_params *p, NODE* node)
25208{
25209 switch (nd_type(node)) {
25210 case NODE_INTEGER:
25211 RNODE_INTEGER(node)->minus = TRUE;
25212 break;
25213 case NODE_FLOAT:
25214 RNODE_FLOAT(node)->minus = TRUE;
25215 break;
25216 case NODE_RATIONAL:
25217 RNODE_RATIONAL(node)->minus = TRUE;
25218 break;
25219 case NODE_IMAGINARY:
25220 RNODE_IMAGINARY(node)->minus = TRUE;
25221 break;
25222 }
25223 return node;
25224}
25225
25226static NODE *
25227arg_blk_pass(NODE *node1, rb_node_block_pass_t *node2)
25228{
25229 if (node2) {
25230 if (!node1) return (NODE *)node2;
25231 node2->nd_head = node1;
25232 nd_set_first_lineno(node2, nd_first_lineno(node1));
25233 nd_set_first_column(node2, nd_first_column(node1));
25234 return (NODE *)node2;
25235 }
25236 return node1;
25237}
25238
25239static bool
25240args_info_empty_p(struct rb_args_info *args)
25241{
25242 if (args->pre_args_num) return false;
25243 if (args->post_args_num) return false;
25244 if (args->rest_arg) return false;
25245 if (args->opt_args) return false;
25246 if (args->block_arg) return false;
25247 if (args->kw_args) return false;
25248 if (args->kw_rest_arg) return false;
25249 return true;
25250}
25251
25252static rb_node_args_t *
25253new_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)
25254{
25255 struct rb_args_info *args = &tail->nd_ainfo;
25256
25257 if (args->forwarding) {
25258 if (rest_arg) {
25259 yyerror1(&RNODE(tail)->nd_loc, "... after rest argument");
25260 return tail;
25261 }
25262 rest_arg = idFWD_REST;
25263 }
25264
25265 args->pre_args_num = pre_args ? pre_args->nd_plen : 0;
25266 args->pre_init = pre_args ? pre_args->nd_next : 0;
25267
25268 args->post_args_num = post_args ? post_args->nd_plen : 0;
25269 args->post_init = post_args ? post_args->nd_next : 0;
25270 args->first_post_arg = post_args ? post_args->nd_pid : 0;
25271
25272 args->rest_arg = rest_arg;
25273
25274 args->opt_args = opt_args;
25275
25276#ifdef FORWARD_ARGS_WITH_RUBY2_KEYWORDS
25277 args->ruby2_keywords = args->forwarding;
25278#else
25279 args->ruby2_keywords = 0;
25280#endif
25281
25282 nd_set_loc(RNODE(tail), loc);
25283
25284 return tail;
25285}
25286
25287static rb_node_args_t *
25288new_args_tail(struct parser_params *p, rb_node_kw_arg_t *kw_args, ID kw_rest_arg, ID block, const YYLTYPE *kw_rest_loc)
25289{
25290 rb_node_args_t *node = NEW_ARGS(&NULL_LOC);
25291 struct rb_args_info *args = &node->nd_ainfo;
25292 if (p->error_p) return node;
25293
25294 args->block_arg = block;
25295 args->kw_args = kw_args;
25296
25297 if (kw_args) {
25298 /*
25299 * def foo(k1: 1, kr1:, k2: 2, **krest, &b)
25300 * variable order: k1, kr1, k2, &b, internal_id, krest
25301 * #=> <reorder>
25302 * variable order: kr1, k1, k2, internal_id, krest, &b
25303 */
25304 ID kw_bits = internal_id(p), *required_kw_vars, *kw_vars;
25305 struct vtable *vtargs = p->lvtbl->args;
25306 rb_node_kw_arg_t *kwn = kw_args;
25307
25308 if (block) block = vtargs->tbl[vtargs->pos-1];
25309 vtable_pop(vtargs, !!block + !!kw_rest_arg);
25310 required_kw_vars = kw_vars = &vtargs->tbl[vtargs->pos];
25311 while (kwn) {
25312 if (!NODE_REQUIRED_KEYWORD_P(get_nd_value(p, kwn->nd_body)))
25313 --kw_vars;
25314 --required_kw_vars;
25315 kwn = kwn->nd_next;
25316 }
25317
25318 for (kwn = kw_args; kwn; kwn = kwn->nd_next) {
25319 ID vid = get_nd_vid(p, kwn->nd_body);
25320 if (NODE_REQUIRED_KEYWORD_P(get_nd_value(p, kwn->nd_body))) {
25321 *required_kw_vars++ = vid;
25322 }
25323 else {
25324 *kw_vars++ = vid;
25325 }
25326 }
25327
25328 arg_var(p, kw_bits);
25329 if (kw_rest_arg) arg_var(p, kw_rest_arg);
25330 if (block) arg_var(p, block);
25331
25332 args->kw_rest_arg = NEW_DVAR(kw_rest_arg, kw_rest_loc);
25333 }
25334 else if (kw_rest_arg == idNil) {
25335 args->no_kwarg = 1;
25336 }
25337 else if (kw_rest_arg) {
25338 args->kw_rest_arg = NEW_DVAR(kw_rest_arg, kw_rest_loc);
25339 }
25340
25341 return node;
25342}
25343
25344static rb_node_args_t *
25345args_with_numbered(struct parser_params *p, rb_node_args_t *args, int max_numparam, ID it_id)
25346{
25347 if (max_numparam > NO_PARAM || it_id) {
25348 if (!args) {
25349 YYLTYPE loc = RUBY_INIT_YYLLOC();
25350 args = new_args_tail(p, 0, 0, 0, 0);
25351 nd_set_loc(RNODE(args), &loc);
25352 }
25353 args->nd_ainfo.pre_args_num = it_id ? 1 : max_numparam;
25354 }
25355 return args;
25356}
25357
25358static NODE*
25359new_array_pattern(struct parser_params *p, NODE *constant, NODE *pre_arg, NODE *aryptn, const YYLTYPE *loc)
25360{
25361 RNODE_ARYPTN(aryptn)->nd_pconst = constant;
25362
25363 if (pre_arg) {
25364 NODE *pre_args = NEW_LIST(pre_arg, loc);
25365 if (RNODE_ARYPTN(aryptn)->pre_args) {
25366 RNODE_ARYPTN(aryptn)->pre_args = list_concat(pre_args, RNODE_ARYPTN(aryptn)->pre_args);
25367 }
25368 else {
25369 RNODE_ARYPTN(aryptn)->pre_args = pre_args;
25370 }
25371 }
25372 return aryptn;
25373}
25374
25375static NODE*
25376new_array_pattern_tail(struct parser_params *p, NODE *pre_args, int has_rest, NODE *rest_arg, NODE *post_args, const YYLTYPE *loc)
25377{
25378 if (has_rest) {
25379 rest_arg = rest_arg ? rest_arg : NODE_SPECIAL_NO_NAME_REST;
25380 }
25381 else {
25382 rest_arg = NULL;
25383 }
25384 NODE *node = NEW_ARYPTN(pre_args, rest_arg, post_args, loc);
25385
25386 return node;
25387}
25388
25389static NODE*
25390new_find_pattern(struct parser_params *p, NODE *constant, NODE *fndptn, const YYLTYPE *loc)
25391{
25392 RNODE_FNDPTN(fndptn)->nd_pconst = constant;
25393
25394 return fndptn;
25395}
25396
25397static NODE*
25398new_find_pattern_tail(struct parser_params *p, NODE *pre_rest_arg, NODE *args, NODE *post_rest_arg, const YYLTYPE *loc)
25399{
25400 pre_rest_arg = pre_rest_arg ? pre_rest_arg : NODE_SPECIAL_NO_NAME_REST;
25401 post_rest_arg = post_rest_arg ? post_rest_arg : NODE_SPECIAL_NO_NAME_REST;
25402 NODE *node = NEW_FNDPTN(pre_rest_arg, args, post_rest_arg, loc);
25403
25404 return node;
25405}
25406
25407static NODE*
25408new_hash_pattern(struct parser_params *p, NODE *constant, NODE *hshptn, const YYLTYPE *loc)
25409{
25410 RNODE_HSHPTN(hshptn)->nd_pconst = constant;
25411 return hshptn;
25412}
25413
25414static NODE*
25415new_hash_pattern_tail(struct parser_params *p, NODE *kw_args, ID kw_rest_arg, const YYLTYPE *loc)
25416{
25417 NODE *node, *kw_rest_arg_node;
25418
25419 if (kw_rest_arg == idNil) {
25420 kw_rest_arg_node = NODE_SPECIAL_NO_REST_KEYWORD;
25421 }
25422 else if (kw_rest_arg) {
25423 kw_rest_arg_node = assignable(p, kw_rest_arg, 0, loc);
25424 }
25425 else {
25426 kw_rest_arg_node = NULL;
25427 }
25428
25429 node = NEW_HSHPTN(0, kw_args, kw_rest_arg_node, loc);
25430
25431 return node;
25432}
25433
25434static NODE*
25435dsym_node(struct parser_params *p, NODE *node, const YYLTYPE *loc)
25436{
25437 if (!node) {
25438 return NEW_SYM(STR_NEW0(), loc);
25439 }
25440
25441 switch (nd_type(node)) {
25442 case NODE_DSTR:
25443 nd_set_type(node, NODE_DSYM);
25444 nd_set_loc(node, loc);
25445 break;
25446 case NODE_STR:
25447 node = str_to_sym_node(p, node, loc);
25448 break;
25449 default:
25450 node = NEW_DSYM(0, 1, NEW_LIST(node, loc), loc);
25451 break;
25452 }
25453 return node;
25454}
25455
25456static int
25457nd_type_st_key_enable_p(NODE *node)
25458{
25459 switch (nd_type(node)) {
25460 case NODE_INTEGER:
25461 case NODE_FLOAT:
25462 case NODE_RATIONAL:
25463 case NODE_IMAGINARY:
25464 case NODE_STR:
25465 case NODE_SYM:
25466 case NODE_REGX:
25467 case NODE_LINE:
25468 case NODE_FILE:
25469 case NODE_ENCODING:
25470 return true;
25471 default:
25472 return false;
25473 }
25474}
25475
25476static VALUE
25477nd_value(struct parser_params *p, NODE *node)
25478{
25479 switch (nd_type(node)) {
25480 case NODE_STR:
25481 return rb_node_str_string_val(node);
25482 case NODE_INTEGER:
25483 return rb_node_integer_literal_val(node);
25484 case NODE_FLOAT:
25485 return rb_node_float_literal_val(node);
25486 case NODE_RATIONAL:
25487 return rb_node_rational_literal_val(node);
25488 case NODE_IMAGINARY:
25489 return rb_node_imaginary_literal_val(node);
25490 case NODE_SYM:
25491 return rb_node_sym_string_val(node);
25492 case NODE_REGX:
25493 return rb_node_regx_string_val(node);
25494 case NODE_LINE:
25495 return rb_node_line_lineno_val(node);
25496 case NODE_ENCODING:
25497 return rb_node_encoding_val(node);
25498 case NODE_FILE:
25499 return rb_node_file_path_val(node);
25500 default:
25501 rb_bug("unexpected node: %s", ruby_node_name(nd_type(node)));
25503 }
25504}
25505
25506static void
25507warn_duplicate_keys(struct parser_params *p, NODE *hash)
25508{
25509 /* See https://bugs.ruby-lang.org/issues/20331 for discussion about what is warned. */
25510 p->warn_duplicate_keys_table = st_init_table_with_size(&literal_type, RNODE_LIST(hash)->as.nd_alen / 2);
25511 while (hash && RNODE_LIST(hash)->nd_next) {
25512 NODE *head = RNODE_LIST(hash)->nd_head;
25513 NODE *value = RNODE_LIST(hash)->nd_next;
25514 NODE *next = RNODE_LIST(value)->nd_next;
25515 st_data_t key;
25516 st_data_t data;
25517
25518 /* keyword splat, e.g. {k: 1, **z, k: 2} */
25519 if (!head) {
25520 head = value;
25521 }
25522
25523 if (nd_type_st_key_enable_p(head)) {
25524 key = (st_data_t)head;
25525
25526 if (st_delete(p->warn_duplicate_keys_table, &key, &data)) {
25527 rb_warn2L(nd_line((NODE *)data),
25528 "key %+"PRIsWARN" is duplicated and overwritten on line %d",
25529 nd_value(p, head), WARN_I(nd_line(head)));
25530 }
25531 st_insert(p->warn_duplicate_keys_table, (st_data_t)key, (st_data_t)hash);
25532 }
25533 hash = next;
25534 }
25535 st_free_table(p->warn_duplicate_keys_table);
25536 p->warn_duplicate_keys_table = NULL;
25537}
25538
25539static NODE *
25540new_hash(struct parser_params *p, NODE *hash, const YYLTYPE *loc)
25541{
25542 if (hash) warn_duplicate_keys(p, hash);
25543 return NEW_HASH(hash, loc);
25544}
25545
25546static void
25547error_duplicate_pattern_variable(struct parser_params *p, ID id, const YYLTYPE *loc)
25548{
25549 if (is_private_local_id(p, id)) {
25550 return;
25551 }
25552 if (st_is_member(p->pvtbl, id)) {
25553 yyerror1(loc, "duplicated variable name");
25554 }
25555 else {
25556 st_insert(p->pvtbl, (st_data_t)id, 0);
25557 }
25558}
25559
25560static void
25561error_duplicate_pattern_key(struct parser_params *p, VALUE key, const YYLTYPE *loc)
25562{
25563 if (!p->pktbl) {
25564 p->pktbl = st_init_numtable();
25565 }
25566 else if (st_is_member(p->pktbl, key)) {
25567 yyerror1(loc, "duplicated key name");
25568 return;
25569 }
25570 st_insert(p->pktbl, (st_data_t)key, 0);
25571}
25572
25573static NODE *
25574new_unique_key_hash(struct parser_params *p, NODE *hash, const YYLTYPE *loc)
25575{
25576 return NEW_HASH(hash, loc);
25577}
25578
25579static NODE *
25580new_op_assign(struct parser_params *p, NODE *lhs, ID op, NODE *rhs, struct lex_context ctxt, const YYLTYPE *loc)
25581{
25582 NODE *asgn;
25583
25584 if (lhs) {
25585 ID vid = get_nd_vid(p, lhs);
25586 YYLTYPE lhs_loc = lhs->nd_loc;
25587 if (op == tOROP) {
25588 set_nd_value(p, lhs, rhs);
25589 nd_set_loc(lhs, loc);
25590 asgn = NEW_OP_ASGN_OR(gettable(p, vid, &lhs_loc), lhs, loc);
25591 }
25592 else if (op == tANDOP) {
25593 set_nd_value(p, lhs, rhs);
25594 nd_set_loc(lhs, loc);
25595 asgn = NEW_OP_ASGN_AND(gettable(p, vid, &lhs_loc), lhs, loc);
25596 }
25597 else {
25598 asgn = lhs;
25599 rhs = NEW_CALL(gettable(p, vid, &lhs_loc), op, NEW_LIST(rhs, &rhs->nd_loc), loc);
25600 set_nd_value(p, asgn, rhs);
25601 nd_set_loc(asgn, loc);
25602 }
25603 }
25604 else {
25605 asgn = NEW_ERROR(loc);
25606 }
25607 return asgn;
25608}
25609
25610static NODE *
25611new_ary_op_assign(struct parser_params *p, NODE *ary,
25612 NODE *args, ID op, NODE *rhs, const YYLTYPE *args_loc, const YYLTYPE *loc,
25613 const YYLTYPE *call_operator_loc, const YYLTYPE *opening_loc, const YYLTYPE *closing_loc, const YYLTYPE *binary_operator_loc)
25614{
25615 NODE *asgn;
25616
25617 aryset_check(p, args);
25618 args = make_list(args, args_loc);
25619 asgn = NEW_OP_ASGN1(ary, op, args, rhs, loc, call_operator_loc, opening_loc, closing_loc, binary_operator_loc);
25620 fixpos(asgn, ary);
25621 return asgn;
25622}
25623
25624static NODE *
25625new_attr_op_assign(struct parser_params *p, NODE *lhs,
25626 ID atype, ID attr, ID op, NODE *rhs, const YYLTYPE *loc,
25627 const YYLTYPE *call_operator_loc, const YYLTYPE *message_loc, const YYLTYPE *binary_operator_loc)
25628{
25629 NODE *asgn;
25630
25631 asgn = NEW_OP_ASGN2(lhs, CALL_Q_P(atype), attr, op, rhs, loc, call_operator_loc, message_loc, binary_operator_loc);
25632 fixpos(asgn, lhs);
25633 return asgn;
25634}
25635
25636static NODE *
25637new_const_op_assign(struct parser_params *p, NODE *lhs, ID op, NODE *rhs, struct lex_context ctxt, const YYLTYPE *loc)
25638{
25639 NODE *asgn;
25640
25641 if (lhs) {
25642 asgn = NEW_OP_CDECL(lhs, op, rhs, ctxt.shareable_constant_value, loc);
25643 }
25644 else {
25645 asgn = NEW_ERROR(loc);
25646 }
25647 fixpos(asgn, lhs);
25648 return asgn;
25649}
25650
25651static NODE *
25652const_decl(struct parser_params *p, NODE *path, const YYLTYPE *loc)
25653{
25654 if (p->ctxt.in_def) {
25655#ifndef RIPPER
25656 yyerror1(loc, "dynamic constant assignment");
25657#else
25658 set_value(assign_error(p, "dynamic constant assignment", p->s_lvalue));
25659#endif
25660 }
25661 return NEW_CDECL(0, 0, (path), p->ctxt.shareable_constant_value, loc);
25662}
25663
25664#ifdef RIPPER
25665static VALUE
25666assign_error(struct parser_params *p, const char *mesg, VALUE a)
25667{
25668 a = dispatch2(assign_error, ERR_MESG(), a);
25669 ripper_error(p);
25670 return a;
25671}
25672#endif
25673
25674static NODE *
25675new_bodystmt(struct parser_params *p, NODE *head, NODE *rescue, NODE *rescue_else, NODE *ensure, const YYLTYPE *loc)
25676{
25677 NODE *result = head;
25678 if (rescue) {
25679 NODE *tmp = rescue_else ? rescue_else : rescue;
25680 YYLTYPE rescue_loc = code_loc_gen(&head->nd_loc, &tmp->nd_loc);
25681
25682 result = NEW_RESCUE(head, rescue, rescue_else, &rescue_loc);
25683 nd_set_line(result, rescue->nd_loc.beg_pos.lineno);
25684 }
25685 if (ensure) {
25686 result = NEW_ENSURE(result, ensure, loc);
25687 }
25688 fixpos(result, head);
25689 return result;
25690}
25691
25692static void
25693warn_unused_var(struct parser_params *p, struct local_vars *local)
25694{
25695 int cnt;
25696
25697 if (!local->used) return;
25698 cnt = local->used->pos;
25699 if (cnt != local->vars->pos) {
25700 rb_parser_fatal(p, "local->used->pos != local->vars->pos");
25701 }
25702#ifndef RIPPER
25703 ID *v = local->vars->tbl;
25704 ID *u = local->used->tbl;
25705 for (int i = 0; i < cnt; ++i) {
25706 if (!v[i] || (u[i] & LVAR_USED)) continue;
25707 if (is_private_local_id(p, v[i])) continue;
25708 rb_warn1L((int)u[i], "assigned but unused variable - %"PRIsWARN, rb_id2str(v[i]));
25709 }
25710#endif
25711}
25712
25713static void
25714local_push(struct parser_params *p, int toplevel_scope)
25715{
25716 struct local_vars *local;
25717 int inherits_dvars = toplevel_scope && compile_for_eval;
25718 int warn_unused_vars = RTEST(ruby_verbose);
25719
25720 local = ALLOC(struct local_vars);
25721 local->prev = p->lvtbl;
25722 local->args = vtable_alloc(0);
25723 local->vars = vtable_alloc(inherits_dvars ? DVARS_INHERIT : DVARS_TOPSCOPE);
25724#ifndef RIPPER
25725 if (toplevel_scope && compile_for_eval) warn_unused_vars = 0;
25726 if (toplevel_scope && e_option_supplied(p)) warn_unused_vars = 0;
25727#endif
25728 local->numparam.outer = 0;
25729 local->numparam.inner = 0;
25730 local->numparam.current = 0;
25731 local->it = 0;
25732 local->used = warn_unused_vars ? vtable_alloc(0) : 0;
25733
25734# if WARN_PAST_SCOPE
25735 local->past = 0;
25736# endif
25737 CMDARG_PUSH(0);
25738 COND_PUSH(0);
25739 p->lvtbl = local;
25740}
25741
25742static void
25743vtable_chain_free(struct parser_params *p, struct vtable *table)
25744{
25745 while (!DVARS_TERMINAL_P(table)) {
25746 struct vtable *cur_table = table;
25747 table = cur_table->prev;
25748 vtable_free(cur_table);
25749 }
25750}
25751
25752static void
25753local_free(struct parser_params *p, struct local_vars *local)
25754{
25755 vtable_chain_free(p, local->used);
25756
25757# if WARN_PAST_SCOPE
25758 vtable_chain_free(p, local->past);
25759# endif
25760
25761 vtable_chain_free(p, local->args);
25762 vtable_chain_free(p, local->vars);
25763
25764 ruby_sized_xfree(local, sizeof(struct local_vars));
25765}
25766
25767static void
25768local_pop(struct parser_params *p)
25769{
25770 struct local_vars *local = p->lvtbl->prev;
25771 if (p->lvtbl->used) {
25772 warn_unused_var(p, p->lvtbl);
25773 }
25774
25775 local_free(p, p->lvtbl);
25776 p->lvtbl = local;
25777
25778 CMDARG_POP();
25779 COND_POP();
25780}
25781
25782static rb_ast_id_table_t *
25783local_tbl(struct parser_params *p)
25784{
25785 int cnt_args = vtable_size(p->lvtbl->args);
25786 int cnt_vars = vtable_size(p->lvtbl->vars);
25787 int cnt = cnt_args + cnt_vars;
25788 int i, j;
25789 rb_ast_id_table_t *tbl;
25790
25791 if (cnt <= 0) return 0;
25792 tbl = rb_ast_new_local_table(p->ast, cnt);
25793 MEMCPY(tbl->ids, p->lvtbl->args->tbl, ID, cnt_args);
25794 /* remove IDs duplicated to warn shadowing */
25795 for (i = 0, j = cnt_args; i < cnt_vars; ++i) {
25796 ID id = p->lvtbl->vars->tbl[i];
25797 if (!vtable_included(p->lvtbl->args, id)) {
25798 tbl->ids[j++] = id;
25799 }
25800 }
25801 if (j < cnt) {
25802 tbl = rb_ast_resize_latest_local_table(p->ast, j);
25803 }
25804
25805 return tbl;
25806}
25807
25808static void
25809numparam_name(struct parser_params *p, ID id)
25810{
25811 if (!NUMPARAM_ID_P(id)) return;
25812 compile_error(p, "_%d is reserved for numbered parameter",
25813 NUMPARAM_ID_TO_IDX(id));
25814}
25815
25816static void
25817arg_var(struct parser_params *p, ID id)
25818{
25819 numparam_name(p, id);
25820 vtable_add(p->lvtbl->args, id);
25821}
25822
25823static void
25824local_var(struct parser_params *p, ID id)
25825{
25826 numparam_name(p, id);
25827 vtable_add(p->lvtbl->vars, id);
25828 if (p->lvtbl->used) {
25829 vtable_add(p->lvtbl->used, (ID)p->ruby_sourceline);
25830 }
25831}
25832
25833#ifndef RIPPER
25834int
25835rb_parser_local_defined(struct parser_params *p, ID id, const struct rb_iseq_struct *iseq)
25836{
25837 return rb_local_defined(id, iseq);
25838}
25839#endif
25840
25841static int
25842local_id_ref(struct parser_params *p, ID id, ID **vidrefp)
25843{
25844 struct vtable *vars, *args, *used;
25845
25846 vars = p->lvtbl->vars;
25847 args = p->lvtbl->args;
25848 used = p->lvtbl->used;
25849
25850 while (vars && !DVARS_TERMINAL_P(vars->prev)) {
25851 vars = vars->prev;
25852 args = args->prev;
25853 if (used) used = used->prev;
25854 }
25855
25856 if (vars && vars->prev == DVARS_INHERIT) {
25857 return rb_parser_local_defined(p, id, p->parent_iseq);
25858 }
25859 else if (vtable_included(args, id)) {
25860 return 1;
25861 }
25862 else {
25863 int i = vtable_included(vars, id);
25864 if (i && used && vidrefp) *vidrefp = &used->tbl[i-1];
25865 return i != 0;
25866 }
25867}
25868
25869static int
25870local_id(struct parser_params *p, ID id)
25871{
25872 return local_id_ref(p, id, NULL);
25873}
25874
25875static int
25876check_forwarding_args(struct parser_params *p)
25877{
25878 if (local_id(p, idFWD_ALL)) return TRUE;
25879 compile_error(p, "unexpected ...");
25880 return FALSE;
25881}
25882
25883static void
25884add_forwarding_args(struct parser_params *p)
25885{
25886 arg_var(p, idFWD_REST);
25887#ifndef FORWARD_ARGS_WITH_RUBY2_KEYWORDS
25888 arg_var(p, idFWD_KWREST);
25889#endif
25890 arg_var(p, idFWD_BLOCK);
25891 arg_var(p, idFWD_ALL);
25892}
25893
25894static void
25895forwarding_arg_check(struct parser_params *p, ID arg, ID all, const char *var)
25896{
25897 bool conflict = false;
25898
25899 struct vtable *vars, *args;
25900
25901 vars = p->lvtbl->vars;
25902 args = p->lvtbl->args;
25903
25904 while (vars && !DVARS_TERMINAL_P(vars->prev)) {
25905 conflict |= (vtable_included(args, arg) && !(all && vtable_included(args, all)));
25906 vars = vars->prev;
25907 args = args->prev;
25908 }
25909
25910 bool found = false;
25911 if (vars && vars->prev == DVARS_INHERIT && !found) {
25912 found = (rb_parser_local_defined(p, arg, p->parent_iseq) &&
25913 !(all && rb_parser_local_defined(p, all, p->parent_iseq)));
25914 }
25915 else {
25916 found = (vtable_included(args, arg) &&
25917 !(all && vtable_included(args, all)));
25918 }
25919
25920 if (!found) {
25921 compile_error(p, "no anonymous %s parameter", var);
25922 }
25923 else if (conflict) {
25924 compile_error(p, "anonymous %s parameter is also used within block", var);
25925 }
25926}
25927
25928static NODE *
25929new_args_forward_call(struct parser_params *p, NODE *leading, const YYLTYPE *loc, const YYLTYPE *argsloc)
25930{
25931 NODE *rest = NEW_LVAR(idFWD_REST, loc);
25932#ifndef FORWARD_ARGS_WITH_RUBY2_KEYWORDS
25933 NODE *kwrest = list_append(p, NEW_LIST(0, loc), NEW_LVAR(idFWD_KWREST, loc));
25934#endif
25935 rb_node_block_pass_t *block = NEW_BLOCK_PASS(NEW_LVAR(idFWD_BLOCK, loc), argsloc, &NULL_LOC);
25936 NODE *args = leading ? rest_arg_append(p, leading, rest, argsloc) : NEW_SPLAT(rest, loc, &NULL_LOC);
25937 block->forwarding = TRUE;
25938#ifndef FORWARD_ARGS_WITH_RUBY2_KEYWORDS
25939 args = arg_append(p, args, new_hash(p, kwrest, loc), argsloc);
25940#endif
25941 return arg_blk_pass(args, block);
25942}
25943
25944static NODE *
25945numparam_push(struct parser_params *p)
25946{
25947 struct local_vars *local = p->lvtbl;
25948 NODE *inner = local->numparam.inner;
25949 if (!local->numparam.outer) {
25950 local->numparam.outer = local->numparam.current;
25951 }
25952 local->numparam.inner = 0;
25953 local->numparam.current = 0;
25954 local->it = 0;
25955 return inner;
25956}
25957
25958static void
25959numparam_pop(struct parser_params *p, NODE *prev_inner)
25960{
25961 struct local_vars *local = p->lvtbl;
25962 if (prev_inner) {
25963 /* prefer first one */
25964 local->numparam.inner = prev_inner;
25965 }
25966 else if (local->numparam.current) {
25967 /* current and inner are exclusive */
25968 local->numparam.inner = local->numparam.current;
25969 }
25970 if (p->max_numparam > NO_PARAM) {
25971 /* current and outer are exclusive */
25972 local->numparam.current = local->numparam.outer;
25973 local->numparam.outer = 0;
25974 }
25975 else {
25976 /* no numbered parameter */
25977 local->numparam.current = 0;
25978 }
25979 local->it = 0;
25980}
25981
25982static const struct vtable *
25983dyna_push(struct parser_params *p)
25984{
25985 p->lvtbl->args = vtable_alloc(p->lvtbl->args);
25986 p->lvtbl->vars = vtable_alloc(p->lvtbl->vars);
25987 if (p->lvtbl->used) {
25988 p->lvtbl->used = vtable_alloc(p->lvtbl->used);
25989 }
25990 return p->lvtbl->args;
25991}
25992
25993static void
25994dyna_pop_vtable(struct parser_params *p, struct vtable **vtblp)
25995{
25996 struct vtable *tmp = *vtblp;
25997 *vtblp = tmp->prev;
25998# if WARN_PAST_SCOPE
25999 if (p->past_scope_enabled) {
26000 tmp->prev = p->lvtbl->past;
26001 p->lvtbl->past = tmp;
26002 return;
26003 }
26004# endif
26005 vtable_free(tmp);
26006}
26007
26008static void
26009dyna_pop_1(struct parser_params *p)
26010{
26011 struct vtable *tmp;
26012
26013 if ((tmp = p->lvtbl->used) != 0) {
26014 warn_unused_var(p, p->lvtbl);
26015 p->lvtbl->used = p->lvtbl->used->prev;
26016 vtable_free(tmp);
26017 }
26018 dyna_pop_vtable(p, &p->lvtbl->args);
26019 dyna_pop_vtable(p, &p->lvtbl->vars);
26020}
26021
26022static void
26023dyna_pop(struct parser_params *p, const struct vtable *lvargs)
26024{
26025 while (p->lvtbl->args != lvargs) {
26026 dyna_pop_1(p);
26027 if (!p->lvtbl->args) {
26028 struct local_vars *local = p->lvtbl->prev;
26029 ruby_sized_xfree(p->lvtbl, sizeof(*p->lvtbl));
26030 p->lvtbl = local;
26031 }
26032 }
26033 dyna_pop_1(p);
26034}
26035
26036static int
26037dyna_in_block(struct parser_params *p)
26038{
26039 return !DVARS_TERMINAL_P(p->lvtbl->vars) && p->lvtbl->vars->prev != DVARS_TOPSCOPE;
26040}
26041
26042#ifndef RIPPER
26043int
26044dvar_defined_ref(struct parser_params *p, ID id, ID **vidrefp)
26045{
26046 struct vtable *vars, *args, *used;
26047 int i;
26048
26049 args = p->lvtbl->args;
26050 vars = p->lvtbl->vars;
26051 used = p->lvtbl->used;
26052
26053 while (!DVARS_TERMINAL_P(vars)) {
26054 if (vtable_included(args, id)) {
26055 return 1;
26056 }
26057 if ((i = vtable_included(vars, id)) != 0) {
26058 if (used && vidrefp) *vidrefp = &used->tbl[i-1];
26059 return 1;
26060 }
26061 args = args->prev;
26062 vars = vars->prev;
26063 if (!vidrefp) used = 0;
26064 if (used) used = used->prev;
26065 }
26066
26067 if (vars == DVARS_INHERIT && !NUMPARAM_ID_P(id)) {
26068 return rb_dvar_defined(id, p->parent_iseq);
26069 }
26070
26071 return 0;
26072}
26073#endif
26074
26075static int
26076dvar_defined(struct parser_params *p, ID id)
26077{
26078 return dvar_defined_ref(p, id, NULL);
26079}
26080
26081static int
26082dvar_curr(struct parser_params *p, ID id)
26083{
26084 return (vtable_included(p->lvtbl->args, id) ||
26085 vtable_included(p->lvtbl->vars, id));
26086}
26087
26088static void
26089reg_fragment_enc_error(struct parser_params* p, rb_parser_string_t *str, int c)
26090{
26091 compile_error(p,
26092 "regexp encoding option '%c' differs from source encoding '%s'",
26093 c, rb_enc_name(rb_parser_str_get_encoding(str)));
26094}
26095
26096#ifndef RIPPER
26097static rb_encoding *
26098find_enc(struct parser_params* p, const char *name)
26099{
26100 int idx = rb_enc_find_index(name);
26101 if (idx < 0) {
26102 rb_bug("unknown encoding name: %s", name);
26103 }
26104
26105 return rb_enc_from_index(idx);
26106}
26107
26108static rb_encoding *
26109kcode_to_enc(struct parser_params* p, int kcode)
26110{
26111 rb_encoding *enc;
26112
26113 switch (kcode) {
26114 case ENC_ASCII8BIT:
26115 enc = rb_ascii8bit_encoding();
26116 break;
26117 case ENC_EUC_JP:
26118 enc = find_enc(p, "EUC-JP");
26119 break;
26120 case ENC_Windows_31J:
26121 enc = find_enc(p, "Windows-31J");
26122 break;
26123 case ENC_UTF8:
26124 enc = rb_utf8_encoding();
26125 break;
26126 default:
26127 enc = NULL;
26128 break;
26129 }
26130
26131 return enc;
26132}
26133
26134int
26135rb_reg_fragment_setenc(struct parser_params* p, rb_parser_string_t *str, int options)
26136{
26137 int c = RE_OPTION_ENCODING_IDX(options);
26138
26139 if (c) {
26140 int opt, idx;
26141 rb_encoding *enc;
26142
26143 char_to_option_kcode(c, &opt, &idx);
26144 enc = kcode_to_enc(p, idx);
26145 if (enc != rb_parser_str_get_encoding(str) &&
26146 !rb_parser_is_ascii_string(p, str)) {
26147 goto error;
26148 }
26149 rb_parser_string_set_encoding(str, enc);
26150 }
26151 else if (RE_OPTION_ENCODING_NONE(options)) {
26152 if (!PARSER_ENCODING_IS_ASCII8BIT(p, str) &&
26153 !rb_parser_is_ascii_string(p, str)) {
26154 c = 'n';
26155 goto error;
26156 }
26157 rb_parser_enc_associate(p, str, rb_ascii8bit_encoding());
26158 }
26159 else if (rb_is_usascii_enc(p->enc)) {
26160 if (!rb_parser_is_ascii_string(p, str)) {
26161 /* raise in re.c */
26162 rb_parser_enc_associate(p, str, rb_usascii_encoding());
26163 }
26164 else {
26165 rb_parser_enc_associate(p, str, rb_ascii8bit_encoding());
26166 }
26167 }
26168 return 0;
26169
26170 error:
26171 return c;
26172}
26173#endif
26174
26175static void
26176reg_fragment_setenc(struct parser_params* p, rb_parser_string_t *str, int options)
26177{
26178 int c = rb_reg_fragment_setenc(p, str, options);
26179 if (c) reg_fragment_enc_error(p, str, c);
26180}
26181
26182static void
26183reg_fragment_error(struct parser_params* p, VALUE err)
26184{
26185 compile_error(p, "%"PRIsVALUE, err);
26186}
26187
26188#ifndef RIPPER
26189int
26190rb_parser_reg_fragment_check(struct parser_params* p, rb_parser_string_t *str, int options, rb_parser_reg_fragment_error_func error)
26191{
26192 VALUE err, str2;
26193 reg_fragment_setenc(p, str, options);
26194 /* TODO */
26195 str2 = rb_str_new_parser_string(str);
26196 err = rb_reg_check_preprocess(str2);
26197 if (err != Qnil) {
26198 err = rb_obj_as_string(err);
26199 error(p, err);
26200 return 0;
26201 }
26202 return 1;
26203}
26204#endif
26205
26206#ifndef UNIVERSAL_PARSER
26207typedef struct {
26208 struct parser_params* parser;
26209 rb_encoding *enc;
26210 NODE *succ_block;
26211 const YYLTYPE *loc;
26212 rb_parser_assignable_func assignable;
26214
26215static int
26216reg_named_capture_assign_iter(const OnigUChar *name, const OnigUChar *name_end,
26217 int back_num, int *back_refs, OnigRegex regex, void *arg0)
26218{
26220 struct parser_params* p = arg->parser;
26221 rb_encoding *enc = arg->enc;
26222 long len = name_end - name;
26223 const char *s = (const char *)name;
26224
26225 return rb_reg_named_capture_assign_iter_impl(p, s, len, enc, &arg->succ_block, arg->loc, arg->assignable);
26226}
26227
26228static NODE *
26229reg_named_capture_assign(struct parser_params* p, VALUE regexp, const YYLTYPE *loc, rb_parser_assignable_func assignable)
26230{
26232
26233 arg.parser = p;
26234 arg.enc = rb_enc_get(regexp);
26235 arg.succ_block = 0;
26236 arg.loc = loc;
26237 arg.assignable = assignable;
26238 onig_foreach_name(RREGEXP_PTR(regexp), reg_named_capture_assign_iter, &arg);
26239
26240 if (!arg.succ_block) return 0;
26241 return RNODE_BLOCK(arg.succ_block)->nd_next;
26242}
26243#endif
26244
26245#ifndef RIPPER
26246NODE *
26247rb_parser_assignable(struct parser_params *p, ID id, NODE *val, const YYLTYPE *loc)
26248{
26249 return assignable(p, id, val, loc);
26250}
26251
26252int
26253rb_reg_named_capture_assign_iter_impl(struct parser_params *p, const char *s, long len,
26254 rb_encoding *enc, NODE **succ_block, const rb_code_location_t *loc, rb_parser_assignable_func assignable)
26255{
26256 ID var;
26257 NODE *node, *succ;
26258
26259 if (!len) return ST_CONTINUE;
26260 if (!VALID_SYMNAME_P(s, len, enc, ID_LOCAL))
26261 return ST_CONTINUE;
26262
26263 var = intern_cstr(s, len, enc);
26264 if (len < MAX_WORD_LENGTH && rb_reserved_word(s, (int)len)) {
26265 if (!lvar_defined(p, var)) return ST_CONTINUE;
26266 }
26267 node = node_assign(p, assignable(p, var, 0, loc), NEW_SYM(rb_id2str(var), loc), NO_LEX_CTXT, loc);
26268 succ = *succ_block;
26269 if (!succ) succ = NEW_ERROR(loc);
26270 succ = block_append(p, succ, node);
26271 *succ_block = succ;
26272 return ST_CONTINUE;
26273}
26274#endif
26275
26276static VALUE
26277parser_reg_compile(struct parser_params* p, rb_parser_string_t *str, int options)
26278{
26279 VALUE str2;
26280 reg_fragment_setenc(p, str, options);
26281 str2 = rb_str_new_parser_string(str);
26282 return rb_parser_reg_compile(p, str2, options);
26283}
26284
26285#ifndef RIPPER
26286VALUE
26287rb_parser_reg_compile(struct parser_params* p, VALUE str, int options)
26288{
26289 return rb_reg_compile(str, options & RE_OPTION_MASK, p->ruby_sourcefile, p->ruby_sourceline);
26290}
26291#endif
26292
26293static VALUE
26294reg_compile(struct parser_params* p, rb_parser_string_t *str, int options)
26295{
26296 VALUE re;
26297 VALUE err;
26298
26299 err = rb_errinfo();
26300 re = parser_reg_compile(p, str, options);
26301 if (NIL_P(re)) {
26302 VALUE m = rb_attr_get(rb_errinfo(), idMesg);
26303 rb_set_errinfo(err);
26304 reg_fragment_error(p, m);
26305 return Qnil;
26306 }
26307 return re;
26308}
26309
26310#ifndef RIPPER
26311void
26312rb_ruby_parser_set_options(struct parser_params *p, int print, int loop, int chomp, int split)
26313{
26314 p->do_print = print;
26315 p->do_loop = loop;
26316 p->do_chomp = chomp;
26317 p->do_split = split;
26318}
26319
26320static NODE *
26321parser_append_options(struct parser_params *p, NODE *node)
26322{
26323 static const YYLTYPE default_location = {{1, 0}, {1, 0}};
26324 const YYLTYPE *const LOC = &default_location;
26325
26326 if (p->do_print) {
26327 NODE *print = (NODE *)NEW_FCALL(rb_intern("print"),
26328 NEW_LIST(NEW_GVAR(idLASTLINE, LOC), LOC),
26329 LOC);
26330 node = block_append(p, node, print);
26331 }
26332
26333 if (p->do_loop) {
26334 NODE *irs = NEW_LIST(NEW_GVAR(rb_intern("$/"), LOC), LOC);
26335
26336 if (p->do_split) {
26337 ID ifs = rb_intern("$;");
26338 ID fields = rb_intern("$F");
26339 NODE *args = NEW_LIST(NEW_GVAR(ifs, LOC), LOC);
26340 NODE *split = NEW_GASGN(fields,
26341 NEW_CALL(NEW_GVAR(idLASTLINE, LOC),
26342 rb_intern("split"), args, LOC),
26343 LOC);
26344 node = block_append(p, split, node);
26345 }
26346 if (p->do_chomp) {
26347 NODE *chomp = NEW_SYM(rb_str_new_cstr("chomp"), LOC);
26348 chomp = list_append(p, NEW_LIST(chomp, LOC), NEW_TRUE(LOC));
26349 irs = list_append(p, irs, NEW_HASH(chomp, LOC));
26350 }
26351
26352 node = NEW_WHILE((NODE *)NEW_FCALL(idGets, irs, LOC), node, 1, LOC, &NULL_LOC, &NULL_LOC);
26353 }
26354
26355 return node;
26356}
26357
26358void
26359rb_init_parse(void)
26360{
26361 /* just to suppress unused-function warnings */
26362 (void)nodetype;
26363 (void)nodeline;
26364}
26365
26366ID
26367internal_id(struct parser_params *p)
26368{
26369 return rb_make_temporary_id(vtable_size(p->lvtbl->args) + vtable_size(p->lvtbl->vars));
26370}
26371#endif /* !RIPPER */
26372
26373static void
26374parser_initialize(struct parser_params *p)
26375{
26376 /* note: we rely on TypedData_Make_Struct to set most fields to 0 */
26377 p->command_start = TRUE;
26378 p->ruby_sourcefile_string = Qnil;
26379 p->lex.lpar_beg = -1; /* make lambda_beginning_p() == FALSE at first */
26380 string_buffer_init(p);
26381 p->node_id = 0;
26382 p->delayed.token = NULL;
26383 p->frozen_string_literal = -1; /* not specified */
26384#ifndef RIPPER
26385 p->error_buffer = Qfalse;
26386 p->end_expect_token_locations = NULL;
26387 p->token_id = 0;
26388 p->tokens = NULL;
26389#else
26390 p->result = Qnil;
26391 p->parsing_thread = Qnil;
26392 p->s_value = Qnil;
26393 p->s_lvalue = Qnil;
26394 p->s_value_stack = rb_ary_new();
26395#endif
26396 p->debug_buffer = Qnil;
26397 p->debug_output = rb_ractor_stdout();
26398 p->enc = rb_utf8_encoding();
26399 p->exits = 0;
26400}
26401
26402#ifdef RIPPER
26403#define rb_ruby_parser_mark ripper_parser_mark
26404#define rb_ruby_parser_free ripper_parser_free
26405#define rb_ruby_parser_memsize ripper_parser_memsize
26406#endif
26407
26408void
26409rb_ruby_parser_mark(void *ptr)
26410{
26411 struct parser_params *p = (struct parser_params*)ptr;
26412
26413 rb_gc_mark(p->ruby_sourcefile_string);
26414#ifndef RIPPER
26415 rb_gc_mark(p->error_buffer);
26416#else
26417 rb_gc_mark(p->value);
26418 rb_gc_mark(p->result);
26419 rb_gc_mark(p->parsing_thread);
26420 rb_gc_mark(p->s_value);
26421 rb_gc_mark(p->s_lvalue);
26422 rb_gc_mark(p->s_value_stack);
26423#endif
26424 rb_gc_mark(p->debug_buffer);
26425 rb_gc_mark(p->debug_output);
26426}
26427
26428void
26429rb_ruby_parser_free(void *ptr)
26430{
26431 struct parser_params *p = (struct parser_params*)ptr;
26432 struct local_vars *local, *prev;
26433
26434 if (p->ast) {
26435 rb_ast_free(p->ast);
26436 }
26437
26438 if (p->warn_duplicate_keys_table) {
26439 st_free_table(p->warn_duplicate_keys_table);
26440 }
26441
26442#ifndef RIPPER
26443 if (p->tokens) {
26444 rb_parser_ary_free(p, p->tokens);
26445 }
26446#endif
26447
26448 if (p->tokenbuf) {
26449 ruby_sized_xfree(p->tokenbuf, p->toksiz);
26450 }
26451
26452 for (local = p->lvtbl; local; local = prev) {
26453 prev = local->prev;
26454 local_free(p, local);
26455 }
26456
26457 {
26458 token_info *ptinfo;
26459 while ((ptinfo = p->token_info) != 0) {
26460 p->token_info = ptinfo->next;
26461 xfree(ptinfo);
26462 }
26463 }
26464 string_buffer_free(p);
26465
26466 if (p->pvtbl) {
26467 st_free_table(p->pvtbl);
26468 }
26469
26470 if (CASE_LABELS_ENABLED_P(p->case_labels)) {
26471 st_free_table(p->case_labels);
26472 }
26473
26474 xfree(p->lex.strterm);
26475 p->lex.strterm = 0;
26476
26477 xfree(ptr);
26478}
26479
26480size_t
26481rb_ruby_parser_memsize(const void *ptr)
26482{
26483 struct parser_params *p = (struct parser_params*)ptr;
26484 struct local_vars *local;
26485 size_t size = sizeof(*p);
26486
26487 size += p->toksiz;
26488 for (local = p->lvtbl; local; local = local->prev) {
26489 size += sizeof(*local);
26490 if (local->vars) size += local->vars->capa * sizeof(ID);
26491 }
26492 return size;
26493}
26494
26495#ifndef RIPPER
26496#undef rb_reserved_word
26497
26498const struct kwtable *
26499rb_reserved_word(const char *str, unsigned int len)
26500{
26501 return reserved_word(str, len);
26502}
26503
26504#ifdef UNIVERSAL_PARSER
26505rb_parser_t *
26506rb_ruby_parser_allocate(const rb_parser_config_t *config)
26507{
26508 /* parser_initialize expects fields to be set to 0 */
26509 rb_parser_t *p = (rb_parser_t *)config->calloc(1, sizeof(rb_parser_t));
26510 p->config = config;
26511 return p;
26512}
26513
26514rb_parser_t *
26515rb_ruby_parser_new(const rb_parser_config_t *config)
26516{
26517 /* parser_initialize expects fields to be set to 0 */
26518 rb_parser_t *p = rb_ruby_parser_allocate(config);
26519 parser_initialize(p);
26520 return p;
26521}
26522#else
26523rb_parser_t *
26524rb_ruby_parser_allocate(void)
26525{
26526 /* parser_initialize expects fields to be set to 0 */
26527 rb_parser_t *p = (rb_parser_t *)ruby_xcalloc(1, sizeof(rb_parser_t));
26528 return p;
26529}
26530
26531rb_parser_t *
26532rb_ruby_parser_new(void)
26533{
26534 /* parser_initialize expects fields to be set to 0 */
26535 rb_parser_t *p = rb_ruby_parser_allocate();
26536 parser_initialize(p);
26537 return p;
26538}
26539#endif
26540
26541rb_parser_t *
26542rb_ruby_parser_set_context(rb_parser_t *p, const struct rb_iseq_struct *base, int main)
26543{
26544 p->error_buffer = main ? Qfalse : Qnil;
26545 p->parent_iseq = base;
26546 return p;
26547}
26548
26549void
26550rb_ruby_parser_set_script_lines(rb_parser_t *p)
26551{
26552 p->debug_lines = rb_parser_ary_new_capa_for_script_line(p, 10);
26553}
26554
26555void
26556rb_ruby_parser_error_tolerant(rb_parser_t *p)
26557{
26558 p->error_tolerant = 1;
26559}
26560
26561void
26562rb_ruby_parser_keep_tokens(rb_parser_t *p)
26563{
26564 p->keep_tokens = 1;
26565 p->tokens = rb_parser_ary_new_capa_for_ast_token(p, 10);
26566}
26567
26568rb_encoding *
26569rb_ruby_parser_encoding(rb_parser_t *p)
26570{
26571 return p->enc;
26572}
26573
26574int
26575rb_ruby_parser_end_seen_p(rb_parser_t *p)
26576{
26577 return p->ruby__end__seen;
26578}
26579
26580int
26581rb_ruby_parser_set_yydebug(rb_parser_t *p, int flag)
26582{
26583 p->debug = flag;
26584 return flag;
26585}
26586#endif /* !RIPPER */
26587
26588#ifdef RIPPER
26589int
26590rb_ruby_parser_get_yydebug(rb_parser_t *p)
26591{
26592 return p->debug;
26593}
26594
26595void
26596rb_ruby_parser_set_value(rb_parser_t *p, VALUE value)
26597{
26598 p->value = value;
26599}
26600
26601int
26602rb_ruby_parser_error_p(rb_parser_t *p)
26603{
26604 return p->error_p;
26605}
26606
26607VALUE
26608rb_ruby_parser_debug_output(rb_parser_t *p)
26609{
26610 return p->debug_output;
26611}
26612
26613void
26614rb_ruby_parser_set_debug_output(rb_parser_t *p, VALUE output)
26615{
26616 p->debug_output = output;
26617}
26618
26619VALUE
26620rb_ruby_parser_parsing_thread(rb_parser_t *p)
26621{
26622 return p->parsing_thread;
26623}
26624
26625void
26626rb_ruby_parser_set_parsing_thread(rb_parser_t *p, VALUE parsing_thread)
26627{
26628 p->parsing_thread = parsing_thread;
26629}
26630
26631void
26632rb_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)
26633{
26634 p->lex.gets = gets;
26635 p->lex.input = input;
26636 p->eofp = 0;
26637 p->ruby_sourcefile_string = sourcefile_string;
26638 p->ruby_sourcefile = sourcefile;
26639 p->ruby_sourceline = sourceline;
26640}
26641
26642VALUE
26643rb_ruby_parser_result(rb_parser_t *p)
26644{
26645 return p->result;
26646}
26647
26648rb_encoding *
26649rb_ruby_parser_enc(rb_parser_t *p)
26650{
26651 return p->enc;
26652}
26653
26654VALUE
26655rb_ruby_parser_ruby_sourcefile_string(rb_parser_t *p)
26656{
26657 return p->ruby_sourcefile_string;
26658}
26659
26660int
26661rb_ruby_parser_ruby_sourceline(rb_parser_t *p)
26662{
26663 return p->ruby_sourceline;
26664}
26665
26666int
26667rb_ruby_parser_lex_state(rb_parser_t *p)
26668{
26669 return p->lex.state;
26670}
26671
26672void
26673rb_ruby_ripper_parse0(rb_parser_t *p)
26674{
26675 parser_prepare(p);
26676 p->ast = rb_ast_new();
26677 ripper_yyparse((void*)p);
26678 rb_ast_free(p->ast);
26679 p->ast = 0;
26680 p->eval_tree = 0;
26681 p->eval_tree_begin = 0;
26682}
26683
26684int
26685rb_ruby_ripper_dedent_string(rb_parser_t *p, rb_parser_string_t *string, int width)
26686{
26687 return dedent_string(p, string, width);
26688}
26689
26690int
26691rb_ruby_ripper_initialized_p(rb_parser_t *p)
26692{
26693 return p->lex.input != 0;
26694}
26695
26696void
26697rb_ruby_ripper_parser_initialize(rb_parser_t *p)
26698{
26699 parser_initialize(p);
26700}
26701
26702long
26703rb_ruby_ripper_column(rb_parser_t *p)
26704{
26705 return p->lex.ptok - p->lex.pbeg;
26706}
26707
26708long
26709rb_ruby_ripper_token_len(rb_parser_t *p)
26710{
26711 return p->lex.pcur - p->lex.ptok;
26712}
26713
26714rb_parser_string_t *
26715rb_ruby_ripper_lex_lastline(rb_parser_t *p)
26716{
26717 return p->lex.lastline;
26718}
26719
26720VALUE
26721rb_ruby_ripper_lex_state_name(struct parser_params *p, int state)
26722{
26723 return rb_parser_lex_state_name(p, (enum lex_state_e)state);
26724}
26725
26726#ifdef UNIVERSAL_PARSER
26727rb_parser_t *
26728rb_ripper_parser_params_allocate(const rb_parser_config_t *config)
26729{
26730 rb_parser_t *p = (rb_parser_t *)config->calloc(1, sizeof(rb_parser_t));
26731 p->config = config;
26732 return p;
26733}
26734#endif
26735
26736struct parser_params*
26737rb_ruby_ripper_parser_allocate(void)
26738{
26739 return (struct parser_params *)ruby_xcalloc(1, sizeof(struct parser_params));
26740}
26741#endif /* RIPPER */
26742
26743#ifndef RIPPER
26744void
26745rb_parser_printf(struct parser_params *p, const char *fmt, ...)
26746{
26747 va_list ap;
26748 VALUE mesg = p->debug_buffer;
26749
26750 if (NIL_P(mesg)) p->debug_buffer = mesg = rb_str_new(0, 0);
26751 va_start(ap, fmt);
26752 rb_str_vcatf(mesg, fmt, ap);
26753 va_end(ap);
26754 if (char_at_end(p, mesg, 0) == '\n') {
26755 rb_io_write(p->debug_output, mesg);
26756 p->debug_buffer = Qnil;
26757 }
26758}
26759
26760static void
26761parser_compile_error(struct parser_params *p, const rb_code_location_t *loc, const char *fmt, ...)
26762{
26763 va_list ap;
26764 int lineno, column;
26765
26766 if (loc) {
26767 lineno = loc->end_pos.lineno;
26768 column = loc->end_pos.column;
26769 }
26770 else {
26771 lineno = p->ruby_sourceline;
26772 column = rb_long2int(p->lex.pcur - p->lex.pbeg);
26773 }
26774
26775 rb_io_flush(p->debug_output);
26776 p->error_p = 1;
26777 va_start(ap, fmt);
26778 p->error_buffer =
26779 rb_syntax_error_append(p->error_buffer,
26780 p->ruby_sourcefile_string,
26781 lineno, column,
26782 p->enc, fmt, ap);
26783 va_end(ap);
26784}
26785
26786static size_t
26787count_char(const char *str, int c)
26788{
26789 int n = 0;
26790 while (str[n] == c) ++n;
26791 return n;
26792}
26793
26794/*
26795 * strip enclosing double-quotes, same as the default yytnamerr except
26796 * for that single-quotes matching back-quotes do not stop stripping.
26797 *
26798 * "\"`class' keyword\"" => "`class' keyword"
26799 */
26800size_t
26801rb_yytnamerr(struct parser_params *p, char *yyres, const char *yystr)
26802{
26803 if (*yystr == '"') {
26804 size_t yyn = 0, bquote = 0;
26805 const char *yyp = yystr;
26806
26807 while (*++yyp) {
26808 switch (*yyp) {
26809 case '\'':
26810 if (!bquote) {
26811 bquote = count_char(yyp+1, '\'') + 1;
26812 if (yyres) memcpy(&yyres[yyn], yyp, bquote);
26813 yyn += bquote;
26814 yyp += bquote - 1;
26815 break;
26816 }
26817 else {
26818 if (bquote && count_char(yyp+1, '\'') + 1 == bquote) {
26819 if (yyres) memcpy(yyres + yyn, yyp, bquote);
26820 yyn += bquote;
26821 yyp += bquote - 1;
26822 bquote = 0;
26823 break;
26824 }
26825 if (yyp[1] && yyp[1] != '\'' && yyp[2] == '\'') {
26826 if (yyres) memcpy(yyres + yyn, yyp, 3);
26827 yyn += 3;
26828 yyp += 2;
26829 break;
26830 }
26831 goto do_not_strip_quotes;
26832 }
26833
26834 case ',':
26835 goto do_not_strip_quotes;
26836
26837 case '\\':
26838 if (*++yyp != '\\')
26839 goto do_not_strip_quotes;
26840 /* Fall through. */
26841 default:
26842 if (yyres)
26843 yyres[yyn] = *yyp;
26844 yyn++;
26845 break;
26846
26847 case '"':
26848 case '\0':
26849 if (yyres)
26850 yyres[yyn] = '\0';
26851 return yyn;
26852 }
26853 }
26854 do_not_strip_quotes: ;
26855 }
26856
26857 if (!yyres) return strlen(yystr);
26858
26859 return (YYSIZE_T)(yystpcpy(yyres, yystr) - yyres);
26860}
26861#endif
26862
26863#ifdef RIPPER
26864#define validate(x) (void)(x)
26865
26866static VALUE
26867ripper_dispatch0(struct parser_params *p, ID mid)
26868{
26869 return rb_funcall(p->value, mid, 0);
26870}
26871
26872static VALUE
26873ripper_dispatch1(struct parser_params *p, ID mid, VALUE a)
26874{
26875 validate(a);
26876 return rb_funcall(p->value, mid, 1, a);
26877}
26878
26879static VALUE
26880ripper_dispatch2(struct parser_params *p, ID mid, VALUE a, VALUE b)
26881{
26882 validate(a);
26883 validate(b);
26884 return rb_funcall(p->value, mid, 2, a, b);
26885}
26886
26887static VALUE
26888ripper_dispatch3(struct parser_params *p, ID mid, VALUE a, VALUE b, VALUE c)
26889{
26890 validate(a);
26891 validate(b);
26892 validate(c);
26893 return rb_funcall(p->value, mid, 3, a, b, c);
26894}
26895
26896static VALUE
26897ripper_dispatch4(struct parser_params *p, ID mid, VALUE a, VALUE b, VALUE c, VALUE d)
26898{
26899 validate(a);
26900 validate(b);
26901 validate(c);
26902 validate(d);
26903 return rb_funcall(p->value, mid, 4, a, b, c, d);
26904}
26905
26906static VALUE
26907ripper_dispatch5(struct parser_params *p, ID mid, VALUE a, VALUE b, VALUE c, VALUE d, VALUE e)
26908{
26909 validate(a);
26910 validate(b);
26911 validate(c);
26912 validate(d);
26913 validate(e);
26914 return rb_funcall(p->value, mid, 5, a, b, c, d, e);
26915}
26916
26917static VALUE
26918ripper_dispatch7(struct parser_params *p, ID mid, VALUE a, VALUE b, VALUE c, VALUE d, VALUE e, VALUE f, VALUE g)
26919{
26920 validate(a);
26921 validate(b);
26922 validate(c);
26923 validate(d);
26924 validate(e);
26925 validate(f);
26926 validate(g);
26927 return rb_funcall(p->value, mid, 7, a, b, c, d, e, f, g);
26928}
26929
26930void
26931ripper_error(struct parser_params *p)
26932{
26933 p->error_p = TRUE;
26934}
26935
26936VALUE
26937ripper_value(struct parser_params *p)
26938{
26939 (void)yystpcpy; /* may not used in newer bison */
26940
26941 return p->value;
26942}
26943
26944#endif /* RIPPER */
26945/*
26946 * Local variables:
26947 * mode: c
26948 * c-file-style: "ruby"
26949 * End:
26950 */
#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 xrealloc
Old name of ruby_xrealloc.
Definition xmalloc.h:56
#define UNREACHABLE_RETURN
Old name of RBIMPL_UNREACHABLE_RETURN.
Definition assume.h:29
#define ZALLOC
Old name of RB_ZALLOC.
Definition memory.h:402
#define ENC_CODERANGE_UNKNOWN
Old name of RUBY_ENC_CODERANGE_UNKNOWN.
Definition coderange.h:179
#define xmalloc
Old name of ruby_xmalloc.
Definition xmalloc.h:53
#define 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 FIXNUM_MAX
Old name of RUBY_FIXNUM_MAX.
Definition fixnum.h:26
#define Qnil
Old name of RUBY_Qnil.
#define Qfalse
Old name of RUBY_Qfalse.
#define NIL_P
Old name of RB_NIL_P.
#define MBCLEN_CHARFOUND_P(ret)
Old name of ONIGENC_MBCLEN_CHARFOUND_P.
Definition encoding.h:516
#define 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
#define ruby_verbose
This variable controls whether the interpreter is in debug mode.
Definition error.h:475
VALUE rb_eRuntimeError
RuntimeError exception.
Definition error.c:1428
VALUE rb_eSyntaxError
SyntaxError exception.
Definition error.c:1447
VALUE rb_class_new_instance(int argc, const VALUE *argv, VALUE klass)
Allocates, then initialises an instance of the given class.
Definition object.c:2138
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:788
VALUE rb_funcall(VALUE recv, ID mid, int n,...)
Calls a method.
Definition vm_eval.c:1099
#define rb_str_new(str, len)
Allocates an instance of rb_cString.
Definition string.h:1498
#define rb_usascii_str_new(str, len)
Identical to rb_str_new, except it generates a string of "US ASCII" encoding.
Definition string.h:1532
VALUE rb_str_cat(VALUE dst, const char *src, long srclen)
Destructively appends the passed contents to the string.
Definition string.c:3448
#define rb_strlen_lit(str)
Length of a string literal.
Definition string.h:1692
#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:1656
#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:1514
ID rb_sym2id(VALUE obj)
Converts an instance of rb_cSymbol into an ID.
Definition symbol.c:917
int capa
Designed capacity of the buffer.
Definition io.h:11
int off
Offset inside of ptr.
Definition io.h:5
int len
Length of the buffer.
Definition io.h:8
#define strtod(s, e)
Just another name of ruby_strtod.
Definition util.h:223
#define strdup(s)
Just another name of ruby_strdup.
Definition util.h:187
#define rb_long2int
Just another name of rb_long2int_inline.
Definition long.h:62
#define MEMCPY(p1, p2, type, n)
Handy macro to call memcpy.
Definition memory.h:372
#define ALLOCA_N(type, n)
Definition memory.h:292
#define MEMZERO(p, type, n)
Handy macro to erase a region of memory.
Definition memory.h:360
#define RB_GC_GUARD(v)
Prevents premature destruction of local objects.
Definition memory.h:167
#define MEMMOVE(p1, p2, type, n)
Handy macro to call memmove.
Definition memory.h:384
VALUE type(ANYARGS)
ANYARGS-ed function type.
#define RBIMPL_ATTR_NONNULL(list)
Wraps (or simulates) __attribute__((nonnull))
Definition nonnull.h:30
#define RREGEXP_PTR(obj)
Convenient accessor macro.
Definition rregexp.h:45
#define StringValueCStr(v)
Identical to StringValuePtr, except it additionally checks for the contents for viability as a C stri...
Definition rstring.h:89
#define errno
Ractor-aware version of errno.
Definition ruby.h:388
#define RTEST
This is an old name of RB_TEST.
Definition lex.c:33
Definition st.h:79
uintptr_t ID
Type that represents a Ruby identifier such as a variable name.
Definition value.h:52
uintptr_t VALUE
Type that represents a Ruby object.
Definition value.h:40
#define RBIMPL_WARNING_IGNORED(flag)
Suppresses a warning.
#define RBIMPL_WARNING_PUSH()
Pushes compiler warning state.
#define RBIMPL_WARNING_POP()
Pops compiler warning state.