Ruby 3.0.5p211 (2022-11-24 revision ba5cf0f7c52d4d35cc6a173c89eda98ceffa2dcf)
ripper.c
Go to the documentation of this file.
1/* A Bison parser, made by GNU Bison 3.8.2. */
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
68
69/* First part of user prologue. */
70#line 12 "ripper.y"
71
72
73#if !YYPURE
74# error needs pure parser
75#endif
76#define YYDEBUG 1
77#define YYERROR_VERBOSE 1
78#define YYSTACK_USE_ALLOCA 0
79#define YYLTYPE rb_code_location_t
80#define YYLTYPE_IS_DECLARED 1
81
83
84#include <ctype.h>
85#include <errno.h>
86#include <stdio.h>
87
88struct lex_context;
89
90#include "internal.h"
91#include "internal/compile.h"
92#include "internal/compilers.h"
93#include "internal/complex.h"
94#include "internal/error.h"
95#include "internal/hash.h"
96#include "internal/imemo.h"
97#include "internal/io.h"
98#include "internal/numeric.h"
99#include "internal/parse.h"
100#include "internal/rational.h"
101#include "internal/re.h"
102#include "internal/symbol.h"
103#include "internal/thread.h"
104#include "internal/util.h"
105#include "internal/variable.h"
106#include "node.h"
107#include "probes.h"
108#include "regenc.h"
109#include "ruby/encoding.h"
110#include "ruby/regex.h"
111#include "ruby/ruby.h"
112#include "ruby/st.h"
113#include "ruby/util.h"
114#include "ruby/ractor.h"
115#include "symbol.h"
116
122};
123
125 unsigned int in_defined: 1;
126 unsigned int in_kwarg: 1;
127 unsigned int in_def: 1;
128 unsigned int in_class: 1;
129 BITFIELD(enum shareability, shareable_constant_value, 2);
130};
131
132#include "parse.h"
133
134#define NO_LEX_CTXT (struct lex_context){0}
135
136#define AREF(ary, i) RARRAY_AREF(ary, i)
137
138#ifndef WARN_PAST_SCOPE
139# define WARN_PAST_SCOPE 0
140#endif
141
142#define TAB_WIDTH 8
143
144#define yydebug (p->debug) /* disable the global variable definition */
145
146#define YYMALLOC(size) rb_parser_malloc(p, (size))
147#define YYREALLOC(ptr, size) rb_parser_realloc(p, (ptr), (size))
148#define YYCALLOC(nelem, size) rb_parser_calloc(p, (nelem), (size))
149#define YYFREE(ptr) rb_parser_free(p, (ptr))
150#define YYFPRINTF rb_parser_printf
151#define YY_LOCATION_PRINT(File, loc) \
152 rb_parser_printf(p, "%d.%d-%d.%d", \
153 (loc).beg_pos.lineno, (loc).beg_pos.column,\
154 (loc).end_pos.lineno, (loc).end_pos.column)
155#define YYLLOC_DEFAULT(Current, Rhs, N) \
156 do \
157 if (N) \
158 { \
159 (Current).beg_pos = YYRHSLOC(Rhs, 1).beg_pos; \
160 (Current).end_pos = YYRHSLOC(Rhs, N).end_pos; \
161 } \
162 else \
163 { \
164 (Current).beg_pos = YYRHSLOC(Rhs, 0).end_pos; \
165 (Current).end_pos = YYRHSLOC(Rhs, 0).end_pos; \
166 } \
167 while (0)
168
169#define RUBY_SET_YYLLOC_FROM_STRTERM_HEREDOC(Current) \
170 rb_parser_set_location_from_strterm_heredoc(p, &p->lex.strterm->u.heredoc, &(Current))
171#define RUBY_SET_YYLLOC_OF_NONE(Current) \
172 rb_parser_set_location_of_none(p, &(Current))
173#define RUBY_SET_YYLLOC(Current) \
174 rb_parser_set_location(p, &(Current))
175#define RUBY_INIT_YYLLOC() \
176 { \
177 {p->ruby_sourceline, (int)(p->lex.ptok - p->lex.pbeg)}, \
178 {p->ruby_sourceline, (int)(p->lex.pcur - p->lex.pbeg)}, \
179 }
180
182 EXPR_BEG_bit, /* ignore newline, +/- is a sign. */
183 EXPR_END_bit, /* newline significant, +/- is an operator. */
184 EXPR_ENDARG_bit, /* ditto, and unbound braces. */
185 EXPR_ENDFN_bit, /* ditto, and unbound braces. */
186 EXPR_ARG_bit, /* newline significant, +/- is an operator. */
187 EXPR_CMDARG_bit, /* newline significant, +/- is an operator. */
188 EXPR_MID_bit, /* newline significant, +/- is an operator. */
189 EXPR_FNAME_bit, /* ignore newline, no reserved words. */
190 EXPR_DOT_bit, /* right after `.' or `::', no reserved words. */
191 EXPR_CLASS_bit, /* immediate after `class', no here document. */
192 EXPR_LABEL_bit, /* flag bit, label is allowed. */
193 EXPR_LABELED_bit, /* flag bit, just after a label. */
194 EXPR_FITEM_bit, /* symbol literal as FNAME. */
197/* examine combinations */
199#define DEF_EXPR(n) EXPR_##n = (1 << EXPR_##n##_bit)
201 DEF_EXPR(END),
202 DEF_EXPR(ENDARG),
203 DEF_EXPR(ENDFN),
204 DEF_EXPR(ARG),
205 DEF_EXPR(CMDARG),
206 DEF_EXPR(MID),
207 DEF_EXPR(FNAME),
208 DEF_EXPR(DOT),
209 DEF_EXPR(CLASS),
211 DEF_EXPR(LABELED),
212 DEF_EXPR(FITEM),
213 EXPR_VALUE = EXPR_BEG,
214 EXPR_BEG_ANY = (EXPR_BEG | EXPR_MID | EXPR_CLASS),
215 EXPR_ARG_ANY = (EXPR_ARG | EXPR_CMDARG),
216 EXPR_END_ANY = (EXPR_END | EXPR_ENDARG | EXPR_ENDFN),
217 EXPR_NONE = 0
219#define IS_lex_state_for(x, ls) ((x) & (ls))
220#define IS_lex_state_all_for(x, ls) (((x) & (ls)) == (ls))
221#define IS_lex_state(ls) IS_lex_state_for(p->lex.state, (ls))
222#define IS_lex_state_all(ls) IS_lex_state_all_for(p->lex.state, (ls))
223
224# define SET_LEX_STATE(ls) \
225 (p->lex.state = \
226 (p->debug ? \
227 rb_parser_trace_lex_state(p, p->lex.state, (ls), __LINE__) : \
228 (enum lex_state_e)(ls)))
229
231
232static const rb_code_location_t NULL_LOC = { {0, -1}, {0, -1} };
233
234# define SHOW_BITSTACK(stack, name) (p->debug ? rb_parser_show_bitstack(p, stack, name, __LINE__) : (void)0)
235# define BITSTACK_PUSH(stack, n) (((p->stack) = ((p->stack)<<1)|((n)&1)), SHOW_BITSTACK(p->stack, #stack"(push)"))
236# define BITSTACK_POP(stack) (((p->stack) = (p->stack) >> 1), SHOW_BITSTACK(p->stack, #stack"(pop)"))
237# define BITSTACK_SET_P(stack) (SHOW_BITSTACK(p->stack, #stack), (p->stack)&1)
238# define BITSTACK_SET(stack, n) ((p->stack)=(n), SHOW_BITSTACK(p->stack, #stack"(set)"))
239
240/* A flag to identify keyword_do_cond, "do" keyword after condition expression.
241 Examples: `while ... do`, `until ... do`, and `for ... in ... do` */
242#define COND_PUSH(n) BITSTACK_PUSH(cond_stack, (n))
243#define COND_POP() BITSTACK_POP(cond_stack)
244#define COND_P() BITSTACK_SET_P(cond_stack)
245#define COND_SET(n) BITSTACK_SET(cond_stack, (n))
246
247/* A flag to identify keyword_do_block; "do" keyword after command_call.
248 Example: `foo 1, 2 do`. */
249#define CMDARG_PUSH(n) BITSTACK_PUSH(cmdarg_stack, (n))
250#define CMDARG_POP() BITSTACK_POP(cmdarg_stack)
251#define CMDARG_P() BITSTACK_SET_P(cmdarg_stack)
252#define CMDARG_SET(n) BITSTACK_SET(cmdarg_stack, (n))
253
254struct vtable {
256 int pos;
257 int capa;
258 struct vtable *prev;
259};
260
262 struct vtable *args;
263 struct vtable *vars;
264 struct vtable *used;
265# if WARN_PAST_SCOPE
266 struct vtable *past;
267# endif
269# ifndef RIPPER
270 struct {
273# endif
274};
275
276enum {
280};
281
282#define NUMPARAM_ID_P(id) numparam_id_p(id)
283#define NUMPARAM_ID_TO_IDX(id) (unsigned int)(((id) >> ID_SCOPE_SHIFT) - tNUMPARAM_1 + 1)
284#define NUMPARAM_IDX_TO_ID(idx) TOKEN2LOCALID((tNUMPARAM_1 + (idx) - 1))
285static int
286numparam_id_p(ID id)
287{
288 if (!is_local_id(id)) return 0;
289 unsigned int idx = NUMPARAM_ID_TO_IDX(id);
290 return idx > 0 && idx <= NUMPARAM_MAX;
291}
292static void numparam_name(struct parser_params *p, ID id);
293
294#define DVARS_INHERIT ((void*)1)
295#define DVARS_TOPSCOPE NULL
296#define DVARS_TERMINAL_P(tbl) ((tbl) == DVARS_INHERIT || (tbl) == DVARS_TOPSCOPE)
297
298typedef struct token_info {
299 const char *token;
305
307
308/*
309 Structure of Lexer Buffer:
310
311 lex.pbeg lex.ptok lex.pcur lex.pend
312 | | | |
313 |------------+------------+------------|
314 |<---------->|
315 token
316*/
319
321
322 struct {
329 const char *pbeg;
330 const char *pcur;
331 const char *pend;
332 const char *ptok;
333 union {
334 long ptr;
338 /* track the nest level of any parens "()[]{}" */
340 /* keep p->lex.paren_nest at the beginning of lambda "->" to detect tLAMBEG and keyword_do_LAMBDA */
342 /* track the nest level of only braces "{}" */
353 char *tokenbuf;
358 int ruby_sourceline; /* current line no. */
359 const char *ruby_sourcefile; /* current source file */
365
368
370
373
375
377
378 unsigned int command_start:1;
379 unsigned int eofp: 1;
380 unsigned int ruby__end__seen: 1;
381 unsigned int debug: 1;
382 unsigned int has_shebang: 1;
383 unsigned int token_seen: 1;
384 unsigned int token_info_enabled: 1;
385# if WARN_PAST_SCOPE
386 unsigned int past_scope_enabled: 1;
387# endif
388 unsigned int error_p: 1;
389 unsigned int cr_seen: 1;
390
391#ifndef RIPPER
392 /* Ruby core only */
393
394 unsigned int do_print: 1;
395 unsigned int do_loop: 1;
396 unsigned int do_chomp: 1;
397 unsigned int do_split: 1;
398
404#else
405 /* Ripper only */
406
407 struct {
408 VALUE token;
409 int line;
410 int col;
411 } delayed;
412
413 VALUE value;
414 VALUE result;
415 VALUE parsing_thread;
416#endif
417};
418
419#define intern_cstr(n,l,en) rb_intern3(n,l,en)
420
421#define STR_NEW(ptr,len) rb_enc_str_new((ptr),(len),p->enc)
422#define STR_NEW0() rb_enc_str_new(0,0,p->enc)
423#define STR_NEW2(ptr) rb_enc_str_new((ptr),strlen(ptr),p->enc)
424#define STR_NEW3(ptr,len,e,func) parser_str_new((ptr),(len),(e),(func),p->enc)
425#define TOK_INTERN() intern_cstr(tok(p), toklen(p), p->enc)
426
427static st_table *
428push_pvtbl(struct parser_params *p)
429{
430 st_table *tbl = p->pvtbl;
431 p->pvtbl = st_init_numtable();
432 return tbl;
433}
434
435static void
436pop_pvtbl(struct parser_params *p, st_table *tbl)
437{
439 p->pvtbl = tbl;
440}
441
442static st_table *
443push_pktbl(struct parser_params *p)
444{
445 st_table *tbl = p->pktbl;
446 p->pktbl = 0;
447 return tbl;
448}
449
450static void
451pop_pktbl(struct parser_params *p, st_table *tbl)
452{
453 if (p->pktbl) st_free_table(p->pktbl);
454 p->pktbl = tbl;
455}
456
457static int parser_yyerror(struct parser_params*, const YYLTYPE *yylloc, const char*);
458#define yyerror0(msg) parser_yyerror(p, NULL, (msg))
459#define yyerror1(loc, msg) parser_yyerror(p, (loc), (msg))
460#define yyerror(yylloc, p, msg) parser_yyerror(p, yylloc, msg)
461#define token_flush(ptr) ((ptr)->lex.ptok = (ptr)->lex.pcur)
462
463static void token_info_setup(token_info *ptinfo, const char *ptr, const rb_code_location_t *loc);
464static void token_info_push(struct parser_params*, const char *token, const rb_code_location_t *loc);
465static void token_info_pop(struct parser_params*, const char *token, const rb_code_location_t *loc);
466static void token_info_warn(struct parser_params *p, const char *token, token_info *ptinfo_beg, int same, const rb_code_location_t *loc);
467static void token_info_drop(struct parser_params *p, const char *token, rb_code_position_t beg_pos);
468
469#ifdef RIPPER
470#define compile_for_eval (0)
471#else
472#define compile_for_eval (p->parent_iseq != 0)
473#endif
474
475#define token_column ((int)(p->lex.ptok - p->lex.pbeg))
476
477#define CALL_Q_P(q) ((q) == TOKEN2VAL(tANDDOT))
478#define NODE_CALL_Q(q) (CALL_Q_P(q) ? NODE_QCALL : NODE_CALL)
479#define NEW_QCALL(q,r,m,a,loc) NEW_NODE(NODE_CALL_Q(q),r,m,a,loc)
480
481#define lambda_beginning_p() (p->lex.lpar_beg == p->lex.paren_nest)
482
483static enum yytokentype yylex(YYSTYPE*, YYLTYPE*, struct parser_params*);
484
485#ifndef RIPPER
486static inline void
487rb_discard_node(struct parser_params *p, NODE *n)
488{
489 rb_ast_delete_node(p->ast, n);
490}
491#endif
492
493#ifdef RIPPER
494static inline VALUE
495add_mark_object(struct parser_params *p, VALUE obj)
496{
497 if (!SPECIAL_CONST_P(obj)
498 && !RB_TYPE_P(obj, T_NODE) /* Ripper jumbles NODE objects and other objects... */
499 ) {
501 }
502 return obj;
503}
504#else
505static NODE* node_newnode_with_locals(struct parser_params *, enum node_type, VALUE, VALUE, const rb_code_location_t*);
506#endif
507
508static NODE* node_newnode(struct parser_params *, enum node_type, VALUE, VALUE, VALUE, const rb_code_location_t*);
509#define rb_node_newnode(type, a1, a2, a3, loc) node_newnode(p, (type), (a1), (a2), (a3), (loc))
510
511static NODE *nd_set_loc(NODE *nd, const YYLTYPE *loc);
512
513static int
514parser_get_node_id(struct parser_params *p)
515{
516 int node_id = p->node_id;
517 p->node_id++;
518 return node_id;
519}
520
521#ifndef RIPPER
522static inline void
523set_line_body(NODE *body, int line)
524{
525 if (!body) return;
526 switch (nd_type(body)) {
527 case NODE_RESCUE:
528 case NODE_ENSURE:
529 nd_set_line(body, line);
530 }
531}
532
533#define yyparse ruby_yyparse
534
535static NODE* cond(struct parser_params *p, NODE *node, const YYLTYPE *loc);
536static NODE* method_cond(struct parser_params *p, NODE *node, const YYLTYPE *loc);
537#define new_nil(loc) NEW_NIL(loc)
538static NODE *new_nil_at(struct parser_params *p, const rb_code_position_t *pos);
539static NODE *new_if(struct parser_params*,NODE*,NODE*,NODE*,const YYLTYPE*);
540static NODE *new_unless(struct parser_params*,NODE*,NODE*,NODE*,const YYLTYPE*);
541static NODE *logop(struct parser_params*,ID,NODE*,NODE*,const YYLTYPE*,const YYLTYPE*);
542
543static NODE *newline_node(NODE*);
544static void fixpos(NODE*,NODE*);
545
546static int value_expr_gen(struct parser_params*,NODE*);
547static void void_expr(struct parser_params*,NODE*);
548static NODE *remove_begin(NODE*);
549static NODE *remove_begin_all(NODE*);
550#define value_expr(node) value_expr_gen(p, (node))
551static NODE *void_stmts(struct parser_params*,NODE*);
552static void reduce_nodes(struct parser_params*,NODE**);
553static void block_dup_check(struct parser_params*,NODE*,NODE*);
554
555static NODE *block_append(struct parser_params*,NODE*,NODE*);
556static NODE *list_append(struct parser_params*,NODE*,NODE*);
557static NODE *list_concat(NODE*,NODE*);
558static NODE *arg_append(struct parser_params*,NODE*,NODE*,const YYLTYPE*);
559static NODE *last_arg_append(struct parser_params *p, NODE *args, NODE *last_arg, const YYLTYPE *loc);
560static NODE *rest_arg_append(struct parser_params *p, NODE *args, NODE *rest_arg, const YYLTYPE *loc);
561static NODE *literal_concat(struct parser_params*,NODE*,NODE*,const YYLTYPE*);
562static NODE *new_evstr(struct parser_params*,NODE*,const YYLTYPE*);
563static NODE *new_dstr(struct parser_params*,NODE*,const YYLTYPE*);
564static NODE *evstr2dstr(struct parser_params*,NODE*);
565static NODE *splat_array(NODE*);
566static void mark_lvar_used(struct parser_params *p, NODE *rhs);
567
568static NODE *call_bin_op(struct parser_params*,NODE*,ID,NODE*,const YYLTYPE*,const YYLTYPE*);
569static NODE *call_uni_op(struct parser_params*,NODE*,ID,const YYLTYPE*,const YYLTYPE*);
570static NODE *new_qcall(struct parser_params* p, ID atype, NODE *recv, ID mid, NODE *args, const YYLTYPE *op_loc, const YYLTYPE *loc);
571static 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);
572static NODE *method_add_block(struct parser_params*p, NODE *m, NODE *b, const YYLTYPE *loc) {b->nd_iter = m; b->nd_loc = *loc; return b;}
573
574static bool args_info_empty_p(struct rb_args_info *args);
575static NODE *new_args(struct parser_params*,NODE*,NODE*,ID,NODE*,NODE*,const YYLTYPE*);
576static NODE *new_args_tail(struct parser_params*,NODE*,ID,ID,const YYLTYPE*);
577static NODE *new_array_pattern(struct parser_params *p, NODE *constant, NODE *pre_arg, NODE *aryptn, const YYLTYPE *loc);
578static NODE *new_array_pattern_tail(struct parser_params *p, NODE *pre_args, int has_rest, ID rest_arg, NODE *post_args, const YYLTYPE *loc);
579static NODE *new_find_pattern(struct parser_params *p, NODE *constant, NODE *fndptn, const YYLTYPE *loc);
580static NODE *new_find_pattern_tail(struct parser_params *p, ID pre_rest_arg, NODE *args, ID post_rest_arg, const YYLTYPE *loc);
581static NODE *new_hash_pattern(struct parser_params *p, NODE *constant, NODE *hshptn, const YYLTYPE *loc);
582static NODE *new_hash_pattern_tail(struct parser_params *p, NODE *kw_args, ID kw_rest_arg, const YYLTYPE *loc);
583static void warn_one_line_pattern_matching(struct parser_params *p, NODE *node, NODE *pattern, bool right_assign);
584
585static NODE *new_kw_arg(struct parser_params *p, NODE *k, const YYLTYPE *loc);
586static NODE *args_with_numbered(struct parser_params*,NODE*,int);
587
588static VALUE negate_lit(struct parser_params*, VALUE);
589static NODE *ret_args(struct parser_params*,NODE*);
590static NODE *arg_blk_pass(NODE*,NODE*);
591static NODE *new_yield(struct parser_params*,NODE*,const YYLTYPE*);
592static NODE *dsym_node(struct parser_params*,NODE*,const YYLTYPE*);
593
594static NODE *gettable(struct parser_params*,ID,const YYLTYPE*);
595static NODE *assignable(struct parser_params*,ID,NODE*,const YYLTYPE*);
596
597static NODE *aryset(struct parser_params*,NODE*,NODE*,const YYLTYPE*);
598static NODE *attrset(struct parser_params*,NODE*,ID,ID,const YYLTYPE*);
599
600static void rb_backref_error(struct parser_params*,NODE*);
601static NODE *node_assign(struct parser_params*,NODE*,NODE*,struct lex_context,const YYLTYPE*);
602
603static NODE *new_op_assign(struct parser_params *p, NODE *lhs, ID op, NODE *rhs, struct lex_context, const YYLTYPE *loc);
604static NODE *new_ary_op_assign(struct parser_params *p, NODE *ary, NODE *args, ID op, NODE *rhs, const YYLTYPE *args_loc, const YYLTYPE *loc);
605static NODE *new_attr_op_assign(struct parser_params *p, NODE *lhs, ID atype, ID attr, ID op, NODE *rhs, const YYLTYPE *loc);
606static NODE *new_const_op_assign(struct parser_params *p, NODE *lhs, ID op, NODE *rhs, struct lex_context, const YYLTYPE *loc);
607static NODE *new_bodystmt(struct parser_params *p, NODE *head, NODE *rescue, NODE *rescue_else, NODE *ensure, const YYLTYPE *loc);
608
609static NODE *const_decl(struct parser_params *p, NODE* path, const YYLTYPE *loc);
610
611static NODE *opt_arg_append(NODE*, NODE*);
612static NODE *kwd_append(NODE*, NODE*);
613
614static NODE *new_hash(struct parser_params *p, NODE *hash, const YYLTYPE *loc);
615static NODE *new_unique_key_hash(struct parser_params *p, NODE *hash, const YYLTYPE *loc);
616
617static NODE *new_defined(struct parser_params *p, NODE *expr, const YYLTYPE *loc);
618
619static NODE *new_regexp(struct parser_params *, NODE *, int, const YYLTYPE *);
620
621#define make_list(list, loc) ((list) ? (nd_set_loc(list, loc), list) : NEW_ZLIST(loc))
622
623static NODE *new_xstring(struct parser_params *, NODE *, const YYLTYPE *loc);
624
625static NODE *symbol_append(struct parser_params *p, NODE *symbols, NODE *symbol);
626
627static NODE *match_op(struct parser_params*,NODE*,NODE*,const YYLTYPE*,const YYLTYPE*);
628
629static ID *local_tbl(struct parser_params*);
630
631static VALUE reg_compile(struct parser_params*, VALUE, int);
632static void reg_fragment_setenc(struct parser_params*, VALUE, int);
633static int reg_fragment_check(struct parser_params*, VALUE, int);
634static NODE *reg_named_capture_assign(struct parser_params* p, VALUE regexp, const YYLTYPE *loc);
635
636static int literal_concat0(struct parser_params *p, VALUE head, VALUE tail);
637static NODE *heredoc_dedent(struct parser_params*,NODE*);
638
639static void check_literal_when(struct parser_params *p, NODE *args, const YYLTYPE *loc);
640
641#define get_id(id) (id)
642#define get_value(val) (val)
643#define get_num(num) (num)
644#else /* RIPPER */
645#define NODE_RIPPER NODE_CDECL
646#define NEW_RIPPER(a,b,c,loc) (VALUE)NEW_CDECL(a,b,c,loc)
647
648static inline int ripper_is_node_yylval(VALUE n);
649
650static inline VALUE
651ripper_new_yylval(struct parser_params *p, ID a, VALUE b, VALUE c)
652{
653 if (ripper_is_node_yylval(c)) c = RNODE(c)->nd_cval;
654 add_mark_object(p, b);
655 add_mark_object(p, c);
656 return NEW_RIPPER(a, b, c, &NULL_LOC);
657}
658
659static inline int
660ripper_is_node_yylval(VALUE n)
661{
662 return RB_TYPE_P(n, T_NODE) && nd_type(RNODE(n)) == NODE_RIPPER;
663}
664
665#define value_expr(node) ((void)(node))
666#define remove_begin(node) (node)
667#define void_stmts(p,x) (x)
668#define rb_dvar_defined(id, base) 0
669#define rb_local_defined(id, base) 0
670static ID ripper_get_id(VALUE);
671#define get_id(id) ripper_get_id(id)
672static VALUE ripper_get_value(VALUE);
673#define get_value(val) ripper_get_value(val)
674#define get_num(num) (int)get_id(num)
675static VALUE assignable(struct parser_params*,VALUE);
676static int id_is_var(struct parser_params *p, ID id);
677
678#define method_cond(p,node,loc) (node)
679#define call_bin_op(p, recv,id,arg1,op_loc,loc) dispatch3(binary, (recv), STATIC_ID2SYM(id), (arg1))
680#define match_op(p,node1,node2,op_loc,loc) call_bin_op(0, (node1), idEqTilde, (node2), op_loc, loc)
681#define call_uni_op(p, recv,id,op_loc,loc) dispatch2(unary, STATIC_ID2SYM(id), (recv))
682#define logop(p,id,node1,node2,op_loc,loc) call_bin_op(0, (node1), (id), (node2), op_loc, loc)
683
684#define new_nil(loc) Qnil
685
686static VALUE new_regexp(struct parser_params *, VALUE, VALUE, const YYLTYPE *);
687
688static VALUE const_decl(struct parser_params *p, VALUE path);
689
690static VALUE var_field(struct parser_params *p, VALUE a);
691static VALUE assign_error(struct parser_params *p, const char *mesg, VALUE a);
692
693static VALUE parser_reg_compile(struct parser_params*, VALUE, int, VALUE *);
694
695static VALUE backref_error(struct parser_params*, NODE *, VALUE);
696#endif /* !RIPPER */
697
698/* forward declaration */
700
701RUBY_SYMBOL_EXPORT_BEGIN
702VALUE rb_parser_reg_compile(struct parser_params* p, VALUE str, int options);
706void rb_parser_show_bitstack(struct parser_params *, stack_type, const char *, int);
707PRINTF_ARGS(void rb_parser_fatal(struct parser_params *p, const char *fmt, ...), 2, 3);
711RUBY_SYMBOL_EXPORT_END
712
713static void error_duplicate_pattern_variable(struct parser_params *p, ID id, const YYLTYPE *loc);
714static void error_duplicate_pattern_key(struct parser_params *p, ID id, const YYLTYPE *loc);
715#ifndef RIPPER
716static ID formal_argument(struct parser_params*, ID);
717#else
718static ID formal_argument(struct parser_params*, VALUE);
719#endif
720static ID shadowing_lvar(struct parser_params*,ID);
721static void new_bv(struct parser_params*,ID);
722
723static void local_push(struct parser_params*,int);
724static void local_pop(struct parser_params*);
725static void local_var(struct parser_params*, ID);
726static void arg_var(struct parser_params*, ID);
727static int local_id(struct parser_params *p, ID id);
728static int local_id_ref(struct parser_params*, ID, ID **);
729#ifndef RIPPER
730static ID internal_id(struct parser_params*);
731static NODE *new_args_forward_call(struct parser_params*, NODE*, const YYLTYPE*, const YYLTYPE*);
732static NODE *new_args_forward_def(struct parser_params*, NODE*, const YYLTYPE*);
733#endif
734static int check_forwarding_args(struct parser_params*);
735static void add_forwarding_args(struct parser_params *p);
736
737static const struct vtable *dyna_push(struct parser_params *);
738static void dyna_pop(struct parser_params*, const struct vtable *);
739static int dyna_in_block(struct parser_params*);
740#define dyna_var(p, id) local_var(p, id)
741static int dvar_defined(struct parser_params*, ID);
742static int dvar_defined_ref(struct parser_params*, ID, ID**);
743static int dvar_curr(struct parser_params*,ID);
744
745static int lvar_defined(struct parser_params*, ID);
746
747static NODE *numparam_push(struct parser_params *p);
748static void numparam_pop(struct parser_params *p, NODE *prev_inner);
749
750#ifdef RIPPER
751# define METHOD_NOT idNOT
752#else
753# define METHOD_NOT '!'
754#endif
755
756#define idFWD_REST '*'
757#ifdef RUBY3_KEYWORDS
758#define idFWD_KWREST idPow /* Use simple "**", as tDSTAR is "**arg" */
759#else
760#define idFWD_KWREST 0
761#endif
762#define idFWD_BLOCK '&'
763
764#define RE_OPTION_ONCE (1<<16)
765#define RE_OPTION_ENCODING_SHIFT 8
766#define RE_OPTION_ENCODING(e) (((e)&0xff)<<RE_OPTION_ENCODING_SHIFT)
767#define RE_OPTION_ENCODING_IDX(o) (((o)>>RE_OPTION_ENCODING_SHIFT)&0xff)
768#define RE_OPTION_ENCODING_NONE(o) ((o)&RE_OPTION_ARG_ENCODING_NONE)
769#define RE_OPTION_MASK 0xff
770#define RE_OPTION_ARG_ENCODING_NONE 32
771
772/* structs for managing terminator of string literal and heredocment */
774 union {
776 long nest;
777 } u0;
778 union {
779 VALUE dummy;
780 long func; /* STR_FUNC_* (e.g., STR_FUNC_ESCAPE and STR_FUNC_EXPAND) */
781 } u1;
782 union {
783 VALUE dummy;
784 long paren; /* '(' of `%q(...)` */
785 } u2;
786 union {
787 VALUE dummy;
788 long term; /* ')' of `%q(...)` */
789 } u3;
791
792#define HERETERM_LENGTH_BITS ((SIZEOF_VALUE - 1) * CHAR_BIT - 1)
793
795 VALUE lastline; /* the string of line that contains `<<"END"` */
796 long offset; /* the column of END in `<<"END"` */
797 int sourceline; /* lineno of the line that contains `<<"END"` */
798 unsigned length /* the length of END in `<<"END"` */
799#if HERETERM_LENGTH_BITS < SIZEOF_INT * CHAR_BIT
801# define HERETERM_LENGTH_MAX ((1U << HERETERM_LENGTH_BITS) - 1)
802#else
803# define HERETERM_LENGTH_MAX UINT_MAX
804#endif
805 ;
806#if HERETERM_LENGTH_BITS < SIZEOF_INT * CHAR_BIT
807 unsigned quote: 1;
808 unsigned func: 8;
809#else
812#endif
813};
815
816#define STRTERM_HEREDOC IMEMO_FL_USER0
817
820 union {
823 } u;
824};
825
826#ifndef RIPPER
827void
829{
830 rb_strterm_t *strterm = (rb_strterm_t*)obj;
831 if (RBASIC(obj)->flags & STRTERM_HEREDOC) {
832 rb_strterm_heredoc_t *heredoc = &strterm->u.heredoc;
833 rb_gc_mark(heredoc->lastline);
834 }
835}
836#endif
837
838#define yytnamerr(yyres, yystr) (YYSIZE_T)rb_yytnamerr(p, yyres, yystr)
839size_t rb_yytnamerr(struct parser_params *p, char *yyres, const char *yystr);
840
841#define TOKEN2ID(tok) ( \
842 tTOKEN_LOCAL_BEGIN<(tok)&&(tok)<tTOKEN_LOCAL_END ? TOKEN2LOCALID(tok) : \
843 tTOKEN_INSTANCE_BEGIN<(tok)&&(tok)<tTOKEN_INSTANCE_END ? TOKEN2INSTANCEID(tok) : \
844 tTOKEN_GLOBAL_BEGIN<(tok)&&(tok)<tTOKEN_GLOBAL_END ? TOKEN2GLOBALID(tok) : \
845 tTOKEN_CONST_BEGIN<(tok)&&(tok)<tTOKEN_CONST_END ? TOKEN2CONSTID(tok) : \
846 tTOKEN_CLASS_BEGIN<(tok)&&(tok)<tTOKEN_CLASS_END ? TOKEN2CLASSID(tok) : \
847 tTOKEN_ATTRSET_BEGIN<(tok)&&(tok)<tTOKEN_ATTRSET_END ? TOKEN2ATTRSETID(tok) : \
848 ((tok) / ((tok)<tPRESERVED_ID_END && ((tok)>=128 || rb_ispunct(tok)))))
849
850/****** Ripper *******/
851
852#ifdef RIPPER
853#define RIPPER_VERSION "0.1.0"
854
855static inline VALUE intern_sym(const char *name);
856
857#include "eventids1.c"
858#include "eventids2.c"
859
860static VALUE ripper_dispatch0(struct parser_params*,ID);
861static VALUE ripper_dispatch1(struct parser_params*,ID,VALUE);
862static VALUE ripper_dispatch2(struct parser_params*,ID,VALUE,VALUE);
863static VALUE ripper_dispatch3(struct parser_params*,ID,VALUE,VALUE,VALUE);
864static VALUE ripper_dispatch4(struct parser_params*,ID,VALUE,VALUE,VALUE,VALUE);
865static VALUE ripper_dispatch5(struct parser_params*,ID,VALUE,VALUE,VALUE,VALUE,VALUE);
866static VALUE ripper_dispatch7(struct parser_params*,ID,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE);
867static void ripper_error(struct parser_params *p);
868
869#define dispatch0(n) ripper_dispatch0(p, TOKEN_PASTE(ripper_id_, n))
870#define dispatch1(n,a) ripper_dispatch1(p, TOKEN_PASTE(ripper_id_, n), (a))
871#define dispatch2(n,a,b) ripper_dispatch2(p, TOKEN_PASTE(ripper_id_, n), (a), (b))
872#define dispatch3(n,a,b,c) ripper_dispatch3(p, TOKEN_PASTE(ripper_id_, n), (a), (b), (c))
873#define dispatch4(n,a,b,c,d) ripper_dispatch4(p, TOKEN_PASTE(ripper_id_, n), (a), (b), (c), (d))
874#define dispatch5(n,a,b,c,d,e) ripper_dispatch5(p, TOKEN_PASTE(ripper_id_, n), (a), (b), (c), (d), (e))
875#define dispatch7(n,a,b,c,d,e,f,g) ripper_dispatch7(p, TOKEN_PASTE(ripper_id_, n), (a), (b), (c), (d), (e), (f), (g))
876
877#define yyparse ripper_yyparse
878
879#define ID2VAL(id) STATIC_ID2SYM(id)
880#define TOKEN2VAL(t) ID2VAL(TOKEN2ID(t))
881#define KWD2EID(t, v) ripper_new_yylval(p, keyword_##t, get_value(v), 0)
882
883#define params_new(pars, opts, rest, pars2, kws, kwrest, blk) \
884 dispatch7(params, (pars), (opts), (rest), (pars2), (kws), (kwrest), (blk))
885
886#define escape_Qundef(x) ((x)==Qundef ? Qnil : (x))
887
888static inline VALUE
889new_args(struct parser_params *p, VALUE pre_args, VALUE opt_args, VALUE rest_arg, VALUE post_args, VALUE tail, YYLTYPE *loc)
890{
891 NODE *t = (NODE *)tail;
892 VALUE kw_args = t->u1.value, kw_rest_arg = t->u2.value, block = t->u3.value;
893 return params_new(pre_args, opt_args, rest_arg, post_args, kw_args, kw_rest_arg, escape_Qundef(block));
894}
895
896static inline VALUE
897new_args_tail(struct parser_params *p, VALUE kw_args, VALUE kw_rest_arg, VALUE block, YYLTYPE *loc)
898{
899 NODE *t = rb_node_newnode(NODE_ARGS_AUX, kw_args, kw_rest_arg, block, &NULL_LOC);
900 add_mark_object(p, kw_args);
901 add_mark_object(p, kw_rest_arg);
902 add_mark_object(p, block);
903 return (VALUE)t;
904}
905
906static inline VALUE
907args_with_numbered(struct parser_params *p, VALUE args, int max_numparam)
908{
909 return args;
910}
911
912static VALUE
913new_array_pattern(struct parser_params *p, VALUE constant, VALUE pre_arg, VALUE aryptn, const YYLTYPE *loc)
914{
915 NODE *t = (NODE *)aryptn;
916 VALUE pre_args = t->u1.value, rest_arg = t->u2.value, post_args = t->u3.value;
917
918 if (!NIL_P(pre_arg)) {
919 if (!NIL_P(pre_args)) {
920 rb_ary_unshift(pre_args, pre_arg);
921 }
922 else {
923 pre_args = rb_ary_new_from_args(1, pre_arg);
924 }
925 }
926 return dispatch4(aryptn, constant, pre_args, rest_arg, post_args);
927}
928
929static VALUE
930new_array_pattern_tail(struct parser_params *p, VALUE pre_args, VALUE has_rest, VALUE rest_arg, VALUE post_args, const YYLTYPE *loc)
931{
932 NODE *t;
933
934 if (has_rest) {
935 rest_arg = dispatch1(var_field, rest_arg ? rest_arg : Qnil);
936 }
937 else {
938 rest_arg = Qnil;
939 }
940
941 t = rb_node_newnode(NODE_ARYPTN, pre_args, rest_arg, post_args, &NULL_LOC);
942 add_mark_object(p, pre_args);
943 add_mark_object(p, rest_arg);
944 add_mark_object(p, post_args);
945 return (VALUE)t;
946}
947
948static VALUE
949new_find_pattern(struct parser_params *p, VALUE constant, VALUE fndptn, const YYLTYPE *loc)
950{
951 NODE *t = (NODE *)fndptn;
952 VALUE pre_rest_arg = t->u1.value, args = t->u2.value, post_rest_arg = t->u3.value;
953
954 return dispatch4(fndptn, constant, pre_rest_arg, args, post_rest_arg);
955}
956
957static VALUE
958new_find_pattern_tail(struct parser_params *p, VALUE pre_rest_arg, VALUE args, VALUE post_rest_arg, const YYLTYPE *loc)
959{
960 NODE *t;
961
962 pre_rest_arg = dispatch1(var_field, pre_rest_arg ? pre_rest_arg : Qnil);
963 post_rest_arg = dispatch1(var_field, post_rest_arg ? post_rest_arg : Qnil);
964
965 t = rb_node_newnode(NODE_FNDPTN, pre_rest_arg, args, post_rest_arg, &NULL_LOC);
966 add_mark_object(p, pre_rest_arg);
967 add_mark_object(p, args);
968 add_mark_object(p, post_rest_arg);
969 return (VALUE)t;
970}
971
972#define new_hash(p,h,l) rb_ary_new_from_args(0)
973
974static VALUE
975new_unique_key_hash(struct parser_params *p, VALUE ary, const YYLTYPE *loc)
976{
977 return ary;
978}
979
980static VALUE
981new_hash_pattern(struct parser_params *p, VALUE constant, VALUE hshptn, const YYLTYPE *loc)
982{
983 NODE *t = (NODE *)hshptn;
984 VALUE kw_args = t->u1.value, kw_rest_arg = t->u2.value;
985 return dispatch3(hshptn, constant, kw_args, kw_rest_arg);
986}
987
988static VALUE
989new_hash_pattern_tail(struct parser_params *p, VALUE kw_args, VALUE kw_rest_arg, const YYLTYPE *loc)
990{
991 NODE *t;
992 if (kw_rest_arg) {
993 kw_rest_arg = dispatch1(var_field, kw_rest_arg);
994 }
995 else {
996 kw_rest_arg = Qnil;
997 }
998 t = rb_node_newnode(NODE_HSHPTN, kw_args, kw_rest_arg, 0, &NULL_LOC);
999
1000 add_mark_object(p, kw_args);
1001 add_mark_object(p, kw_rest_arg);
1002 return (VALUE)t;
1003}
1004
1005#define new_defined(p,expr,loc) dispatch1(defined, (expr))
1006
1007static VALUE heredoc_dedent(struct parser_params*,VALUE);
1008
1009#else
1010#define ID2VAL(id) (id)
1011#define TOKEN2VAL(t) ID2VAL(t)
1012#define KWD2EID(t, v) keyword_##t
1013
1014static NODE *
1015set_defun_body(struct parser_params *p, NODE *n, NODE *args, NODE *body, const YYLTYPE *loc)
1016{
1017 body = remove_begin(body);
1018 reduce_nodes(p, &body);
1019 n->nd_defn = NEW_SCOPE(args, body, loc);
1020 n->nd_loc = *loc;
1021 nd_set_line(n->nd_defn, loc->end_pos.lineno);
1022 set_line_body(body, loc->beg_pos.lineno);
1023 return n;
1024}
1025
1026static NODE *
1027rescued_expr(struct parser_params *p, NODE *arg, NODE *rescue,
1028 const YYLTYPE *arg_loc, const YYLTYPE *mod_loc, const YYLTYPE *res_loc)
1029{
1030 YYLTYPE loc = code_loc_gen(mod_loc, res_loc);
1031 rescue = NEW_RESBODY(0, remove_begin(rescue), 0, &loc);
1032 loc.beg_pos = arg_loc->beg_pos;
1033 return NEW_RESCUE(arg, rescue, 0, &loc);
1034}
1035
1036#endif /* RIPPER */
1037
1038static void
1039restore_defun(struct parser_params *p, NODE *name)
1040{
1041 YYSTYPE c = {.val = name->nd_cval};
1042 p->cur_arg = name->nd_vid;
1043 p->ctxt.in_def = c.ctxt.in_def;
1044 p->ctxt.shareable_constant_value = c.ctxt.shareable_constant_value;
1045}
1046
1047static void
1048endless_method_name(struct parser_params *p, NODE *defn, const YYLTYPE *loc)
1049{
1050#ifdef RIPPER
1051 defn = defn->nd_defn;
1052#endif
1053 ID mid = defn->nd_mid;
1054 if (is_attrset_id(mid)) {
1055 yyerror1(loc, "setter method cannot be defined in an endless method definition");
1056 }
1057 token_info_drop(p, "def", loc->beg_pos);
1058}
1059
1060#ifndef RIPPER
1061# define Qnone 0
1062# define Qnull 0
1063# define ifndef_ripper(x) (x)
1064#else
1065# define Qnone Qnil
1066# define Qnull Qundef
1067# define ifndef_ripper(x)
1068#endif
1069
1070# define rb_warn0(fmt) WARN_CALL(WARN_ARGS(fmt, 1))
1071# define rb_warn1(fmt,a) WARN_CALL(WARN_ARGS(fmt, 2), (a))
1072# define rb_warn2(fmt,a,b) WARN_CALL(WARN_ARGS(fmt, 3), (a), (b))
1073# define rb_warn3(fmt,a,b,c) WARN_CALL(WARN_ARGS(fmt, 4), (a), (b), (c))
1074# define rb_warn4(fmt,a,b,c,d) WARN_CALL(WARN_ARGS(fmt, 5), (a), (b), (c), (d))
1075# define rb_warning0(fmt) WARNING_CALL(WARNING_ARGS(fmt, 1))
1076# define rb_warning1(fmt,a) WARNING_CALL(WARNING_ARGS(fmt, 2), (a))
1077# define rb_warning2(fmt,a,b) WARNING_CALL(WARNING_ARGS(fmt, 3), (a), (b))
1078# define rb_warning3(fmt,a,b,c) WARNING_CALL(WARNING_ARGS(fmt, 4), (a), (b), (c))
1079# define rb_warning4(fmt,a,b,c,d) WARNING_CALL(WARNING_ARGS(fmt, 5), (a), (b), (c), (d))
1080# define rb_warn0L(l,fmt) WARN_CALL(WARN_ARGS_L(l, fmt, 1))
1081# define rb_warn1L(l,fmt,a) WARN_CALL(WARN_ARGS_L(l, fmt, 2), (a))
1082# define rb_warn2L(l,fmt,a,b) WARN_CALL(WARN_ARGS_L(l, fmt, 3), (a), (b))
1083# define rb_warn3L(l,fmt,a,b,c) WARN_CALL(WARN_ARGS_L(l, fmt, 4), (a), (b), (c))
1084# define rb_warn4L(l,fmt,a,b,c,d) WARN_CALL(WARN_ARGS_L(l, fmt, 5), (a), (b), (c), (d))
1085# define rb_warning0L(l,fmt) WARNING_CALL(WARNING_ARGS_L(l, fmt, 1))
1086# define rb_warning1L(l,fmt,a) WARNING_CALL(WARNING_ARGS_L(l, fmt, 2), (a))
1087# define rb_warning2L(l,fmt,a,b) WARNING_CALL(WARNING_ARGS_L(l, fmt, 3), (a), (b))
1088# define rb_warning3L(l,fmt,a,b,c) WARNING_CALL(WARNING_ARGS_L(l, fmt, 4), (a), (b), (c))
1089# define rb_warning4L(l,fmt,a,b,c,d) WARNING_CALL(WARNING_ARGS_L(l, fmt, 5), (a), (b), (c), (d))
1090#ifdef RIPPER
1091static ID id_warn, id_warning, id_gets, id_assoc;
1092# define ERR_MESG() STR_NEW2(mesg) /* to bypass Ripper DSL */
1093# define WARN_S_L(s,l) STR_NEW(s,l)
1094# define WARN_S(s) STR_NEW2(s)
1095# define WARN_I(i) INT2NUM(i)
1096# define WARN_ID(i) rb_id2str(i)
1097# define WARN_IVAL(i) i
1098# define PRIsWARN "s"
1099# define rb_warn0L_experimental(l,fmt) WARN_CALL(WARN_ARGS_L(l, fmt, 1))
1100# define WARN_ARGS(fmt,n) p->value, id_warn, n, rb_usascii_str_new_lit(fmt)
1101# define WARN_ARGS_L(l,fmt,n) WARN_ARGS(fmt,n)
1102# ifdef HAVE_VA_ARGS_MACRO
1103# define WARN_CALL(...) rb_funcall(__VA_ARGS__)
1104# else
1105# define WARN_CALL rb_funcall
1106# endif
1107# define WARNING_ARGS(fmt,n) p->value, id_warning, n, rb_usascii_str_new_lit(fmt)
1108# define WARNING_ARGS_L(l, fmt,n) WARNING_ARGS(fmt,n)
1109# ifdef HAVE_VA_ARGS_MACRO
1110# define WARNING_CALL(...) rb_funcall(__VA_ARGS__)
1111# else
1112# define WARNING_CALL rb_funcall
1113# endif
1114PRINTF_ARGS(static void ripper_compile_error(struct parser_params*, const char *fmt, ...), 2, 3);
1115# define compile_error ripper_compile_error
1116#else
1117# define WARN_S_L(s,l) s
1118# define WARN_S(s) s
1119# define WARN_I(i) i
1120# define WARN_ID(i) rb_id2name(i)
1121# define WARN_IVAL(i) NUM2INT(i)
1122# define PRIsWARN PRIsVALUE
1123# define WARN_ARGS(fmt,n) WARN_ARGS_L(p->ruby_sourceline,fmt,n)
1124# define WARN_ARGS_L(l,fmt,n) p->ruby_sourcefile, (l), (fmt)
1125# define WARN_CALL rb_compile_warn
1126# define rb_warn0L_experimental(l,fmt) rb_category_compile_warn(RB_WARN_CATEGORY_EXPERIMENTAL, WARN_ARGS_L(l, fmt, 1))
1127# define WARNING_ARGS(fmt,n) WARN_ARGS(fmt,n)
1128# define WARNING_ARGS_L(l,fmt,n) WARN_ARGS_L(l,fmt,n)
1129# define WARNING_CALL rb_compile_warning
1130PRINTF_ARGS(static void parser_compile_error(struct parser_params*, const char *fmt, ...), 2, 3);
1131# define compile_error parser_compile_error
1132#endif
1133
1134#define WARN_EOL(tok) \
1135 (looking_at_eol_p(p) ? \
1136 (void)rb_warning0("`" tok "' at the end of line without an expression") : \
1137 (void)0)
1138static int looking_at_eol_p(struct parser_params *p);
1139
1140#line 1141 "ripper.c"
1141
1142# ifndef YY_CAST
1143# ifdef __cplusplus
1144# define YY_CAST(Type, Val) static_cast<Type> (Val)
1145# define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast<Type> (Val)
1146# else
1147# define YY_CAST(Type, Val) ((Type) (Val))
1148# define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val))
1149# endif
1150# endif
1151# ifndef YY_NULLPTR
1152# if defined __cplusplus
1153# if 201103L <= __cplusplus
1154# define YY_NULLPTR nullptr
1155# else
1156# define YY_NULLPTR 0
1157# endif
1158# else
1159# define YY_NULLPTR ((void*)0)
1160# endif
1161# endif
1162
1163
1164/* Debug traces. */
1165#ifndef YYDEBUG
1166# define YYDEBUG 1
1167#endif
1168#if YYDEBUG
1169#ifndef yydebug
1170extern int yydebug;
1171#endif
1172#endif
1173
1174/* Token kinds. */
1175#ifndef YYTOKENTYPE
1176# define YYTOKENTYPE
1177 enum yytokentype
1178 {
1179 YYEMPTY = -2,
1180 END_OF_INPUT = 0, /* "end-of-input" */
1181 YYerror = 256, /* error */
1182 YYUNDEF = 257, /* "invalid token" */
1183 keyword_class = 258, /* "`class'" */
1184 keyword_module = 259, /* "`module'" */
1185 keyword_def = 260, /* "`def'" */
1186 keyword_undef = 261, /* "`undef'" */
1187 keyword_begin = 262, /* "`begin'" */
1188 keyword_rescue = 263, /* "`rescue'" */
1189 keyword_ensure = 264, /* "`ensure'" */
1190 keyword_end = 265, /* "`end'" */
1191 keyword_if = 266, /* "`if'" */
1192 keyword_unless = 267, /* "`unless'" */
1193 keyword_then = 268, /* "`then'" */
1194 keyword_elsif = 269, /* "`elsif'" */
1195 keyword_else = 270, /* "`else'" */
1196 keyword_case = 271, /* "`case'" */
1197 keyword_when = 272, /* "`when'" */
1198 keyword_while = 273, /* "`while'" */
1199 keyword_until = 274, /* "`until'" */
1200 keyword_for = 275, /* "`for'" */
1201 keyword_break = 276, /* "`break'" */
1202 keyword_next = 277, /* "`next'" */
1203 keyword_redo = 278, /* "`redo'" */
1204 keyword_retry = 279, /* "`retry'" */
1205 keyword_in = 280, /* "`in'" */
1206 keyword_do = 281, /* "`do'" */
1207 keyword_do_cond = 282, /* "`do' for condition" */
1208 keyword_do_block = 283, /* "`do' for block" */
1209 keyword_do_LAMBDA = 284, /* "`do' for lambda" */
1210 keyword_return = 285, /* "`return'" */
1211 keyword_yield = 286, /* "`yield'" */
1212 keyword_super = 287, /* "`super'" */
1213 keyword_self = 288, /* "`self'" */
1214 keyword_nil = 289, /* "`nil'" */
1215 keyword_true = 290, /* "`true'" */
1216 keyword_false = 291, /* "`false'" */
1217 keyword_and = 292, /* "`and'" */
1218 keyword_or = 293, /* "`or'" */
1219 keyword_not = 294, /* "`not'" */
1220 modifier_if = 295, /* "`if' modifier" */
1221 modifier_unless = 296, /* "`unless' modifier" */
1222 modifier_while = 297, /* "`while' modifier" */
1223 modifier_until = 298, /* "`until' modifier" */
1224 modifier_rescue = 299, /* "`rescue' modifier" */
1225 keyword_alias = 300, /* "`alias'" */
1226 keyword_defined = 301, /* "`defined?'" */
1227 keyword_BEGIN = 302, /* "`BEGIN'" */
1228 keyword_END = 303, /* "`END'" */
1229 keyword__LINE__ = 304, /* "`__LINE__'" */
1230 keyword__FILE__ = 305, /* "`__FILE__'" */
1231 keyword__ENCODING__ = 306, /* "`__ENCODING__'" */
1232 tIDENTIFIER = 307, /* "local variable or method" */
1233 tFID = 308, /* "method" */
1234 tGVAR = 309, /* "global variable" */
1235 tIVAR = 310, /* "instance variable" */
1236 tCONSTANT = 311, /* "constant" */
1237 tCVAR = 312, /* "class variable" */
1238 tLABEL = 313, /* "label" */
1239 tINTEGER = 314, /* "integer literal" */
1240 tFLOAT = 315, /* "float literal" */
1241 tRATIONAL = 316, /* "rational literal" */
1242 tIMAGINARY = 317, /* "imaginary literal" */
1243 tCHAR = 318, /* "char literal" */
1244 tNTH_REF = 319, /* "numbered reference" */
1245 tBACK_REF = 320, /* "back reference" */
1246 tSTRING_CONTENT = 321, /* "literal content" */
1247 tREGEXP_END = 322, /* tREGEXP_END */
1248 tSP = 323, /* "escaped space" */
1249 tUPLUS = 132, /* "unary+" */
1250 tUMINUS = 133, /* "unary-" */
1251 tPOW = 134, /* "**" */
1252 tCMP = 135, /* "<=>" */
1253 tEQ = 140, /* "==" */
1254 tEQQ = 141, /* "===" */
1255 tNEQ = 142, /* "!=" */
1256 tGEQ = 139, /* ">=" */
1257 tLEQ = 138, /* "<=" */
1258 tANDOP = 148, /* "&&" */
1259 tOROP = 149, /* "||" */
1260 tMATCH = 143, /* "=~" */
1261 tNMATCH = 144, /* "!~" */
1262 tDOT2 = 128, /* ".." */
1263 tDOT3 = 129, /* "..." */
1264 tBDOT2 = 130, /* "(.." */
1265 tBDOT3 = 131, /* "(..." */
1266 tAREF = 145, /* "[]" */
1267 tASET = 146, /* "[]=" */
1268 tLSHFT = 136, /* "<<" */
1269 tRSHFT = 137, /* ">>" */
1270 tANDDOT = 150, /* "&." */
1271 tCOLON2 = 147, /* "::" */
1272 tCOLON3 = 324, /* ":: at EXPR_BEG" */
1273 tOP_ASGN = 325, /* "operator-assignment" */
1274 tASSOC = 326, /* "=>" */
1275 tLPAREN = 327, /* "(" */
1276 tLPAREN_ARG = 328, /* "( arg" */
1277 tRPAREN = 329, /* ")" */
1278 tLBRACK = 330, /* "[" */
1279 tLBRACE = 331, /* "{" */
1280 tLBRACE_ARG = 332, /* "{ arg" */
1281 tSTAR = 333, /* "*" */
1282 tDSTAR = 334, /* "**arg" */
1283 tAMPER = 335, /* "&" */
1284 tLAMBDA = 336, /* "->" */
1285 tSYMBEG = 337, /* "symbol literal" */
1286 tSTRING_BEG = 338, /* "string literal" */
1287 tXSTRING_BEG = 339, /* "backtick literal" */
1288 tREGEXP_BEG = 340, /* "regexp literal" */
1289 tWORDS_BEG = 341, /* "word list" */
1290 tQWORDS_BEG = 342, /* "verbatim word list" */
1291 tSYMBOLS_BEG = 343, /* "symbol list" */
1292 tQSYMBOLS_BEG = 344, /* "verbatim symbol list" */
1293 tSTRING_END = 345, /* "terminator" */
1294 tSTRING_DEND = 346, /* "'}'" */
1295 tSTRING_DBEG = 347, /* tSTRING_DBEG */
1296 tSTRING_DVAR = 348, /* tSTRING_DVAR */
1297 tLAMBEG = 349, /* tLAMBEG */
1298 tLABEL_END = 350, /* tLABEL_END */
1299 tLOWEST = 351, /* tLOWEST */
1300 tUMINUS_NUM = 352, /* tUMINUS_NUM */
1301 tLAST_TOKEN = 353 /* tLAST_TOKEN */
1302 };
1303 typedef enum yytokentype yytoken_kind_t;
1304#endif
1305
1306/* Value type. */
1307#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
1308union YYSTYPE
1309{
1310#line 1121 "ripper.y"
1311
1312 VALUE val;
1313 NODE *node;
1314 ID id;
1315 int num;
1316 st_table *tbl;
1317 const struct vtable *vars;
1318 struct rb_strterm_struct *strterm;
1319 struct lex_context ctxt;
1320
1321#line 1320 "ripper.c"
1322
1323};
1324typedef union YYSTYPE YYSTYPE;
1325# define YYSTYPE_IS_TRIVIAL 1
1326# define YYSTYPE_IS_DECLARED 1
1327#endif
1328
1329/* Location type. */
1330#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
1331typedef struct YYLTYPE YYLTYPE;
1332struct YYLTYPE
1333{
1334 int first_line;
1335 int first_column;
1336 int last_line;
1337 int last_column;
1338};
1339# define YYLTYPE_IS_DECLARED 1
1340# define YYLTYPE_IS_TRIVIAL 1
1341#endif
1342
1343
1344
1345
1346int yyparse (struct parser_params *p);
1347
1348
1349
1350/* Symbol kind. */
1352{
1354 YYSYMBOL_YYEOF = 0, /* "end-of-input" */
1355 YYSYMBOL_YYerror = 1, /* error */
1356 YYSYMBOL_YYUNDEF = 2, /* "invalid token" */
1357 YYSYMBOL_keyword_class = 3, /* "`class'" */
1358 YYSYMBOL_keyword_module = 4, /* "`module'" */
1359 YYSYMBOL_keyword_def = 5, /* "`def'" */
1360 YYSYMBOL_keyword_undef = 6, /* "`undef'" */
1361 YYSYMBOL_keyword_begin = 7, /* "`begin'" */
1362 YYSYMBOL_keyword_rescue = 8, /* "`rescue'" */
1363 YYSYMBOL_keyword_ensure = 9, /* "`ensure'" */
1364 YYSYMBOL_keyword_end = 10, /* "`end'" */
1365 YYSYMBOL_keyword_if = 11, /* "`if'" */
1366 YYSYMBOL_keyword_unless = 12, /* "`unless'" */
1367 YYSYMBOL_keyword_then = 13, /* "`then'" */
1368 YYSYMBOL_keyword_elsif = 14, /* "`elsif'" */
1369 YYSYMBOL_keyword_else = 15, /* "`else'" */
1370 YYSYMBOL_keyword_case = 16, /* "`case'" */
1371 YYSYMBOL_keyword_when = 17, /* "`when'" */
1372 YYSYMBOL_keyword_while = 18, /* "`while'" */
1373 YYSYMBOL_keyword_until = 19, /* "`until'" */
1374 YYSYMBOL_keyword_for = 20, /* "`for'" */
1375 YYSYMBOL_keyword_break = 21, /* "`break'" */
1376 YYSYMBOL_keyword_next = 22, /* "`next'" */
1377 YYSYMBOL_keyword_redo = 23, /* "`redo'" */
1378 YYSYMBOL_keyword_retry = 24, /* "`retry'" */
1379 YYSYMBOL_keyword_in = 25, /* "`in'" */
1380 YYSYMBOL_keyword_do = 26, /* "`do'" */
1381 YYSYMBOL_keyword_do_cond = 27, /* "`do' for condition" */
1382 YYSYMBOL_keyword_do_block = 28, /* "`do' for block" */
1383 YYSYMBOL_keyword_do_LAMBDA = 29, /* "`do' for lambda" */
1384 YYSYMBOL_keyword_return = 30, /* "`return'" */
1385 YYSYMBOL_keyword_yield = 31, /* "`yield'" */
1386 YYSYMBOL_keyword_super = 32, /* "`super'" */
1387 YYSYMBOL_keyword_self = 33, /* "`self'" */
1388 YYSYMBOL_keyword_nil = 34, /* "`nil'" */
1389 YYSYMBOL_keyword_true = 35, /* "`true'" */
1390 YYSYMBOL_keyword_false = 36, /* "`false'" */
1391 YYSYMBOL_keyword_and = 37, /* "`and'" */
1392 YYSYMBOL_keyword_or = 38, /* "`or'" */
1393 YYSYMBOL_keyword_not = 39, /* "`not'" */
1394 YYSYMBOL_modifier_if = 40, /* "`if' modifier" */
1395 YYSYMBOL_modifier_unless = 41, /* "`unless' modifier" */
1396 YYSYMBOL_modifier_while = 42, /* "`while' modifier" */
1397 YYSYMBOL_modifier_until = 43, /* "`until' modifier" */
1398 YYSYMBOL_modifier_rescue = 44, /* "`rescue' modifier" */
1399 YYSYMBOL_keyword_alias = 45, /* "`alias'" */
1400 YYSYMBOL_keyword_defined = 46, /* "`defined?'" */
1401 YYSYMBOL_keyword_BEGIN = 47, /* "`BEGIN'" */
1402 YYSYMBOL_keyword_END = 48, /* "`END'" */
1403 YYSYMBOL_keyword__LINE__ = 49, /* "`__LINE__'" */
1404 YYSYMBOL_keyword__FILE__ = 50, /* "`__FILE__'" */
1405 YYSYMBOL_keyword__ENCODING__ = 51, /* "`__ENCODING__'" */
1406 YYSYMBOL_tIDENTIFIER = 52, /* "local variable or method" */
1407 YYSYMBOL_tFID = 53, /* "method" */
1408 YYSYMBOL_tGVAR = 54, /* "global variable" */
1409 YYSYMBOL_tIVAR = 55, /* "instance variable" */
1410 YYSYMBOL_tCONSTANT = 56, /* "constant" */
1411 YYSYMBOL_tCVAR = 57, /* "class variable" */
1412 YYSYMBOL_tLABEL = 58, /* "label" */
1413 YYSYMBOL_tINTEGER = 59, /* "integer literal" */
1414 YYSYMBOL_tFLOAT = 60, /* "float literal" */
1415 YYSYMBOL_tRATIONAL = 61, /* "rational literal" */
1416 YYSYMBOL_tIMAGINARY = 62, /* "imaginary literal" */
1417 YYSYMBOL_tCHAR = 63, /* "char literal" */
1418 YYSYMBOL_tNTH_REF = 64, /* "numbered reference" */
1419 YYSYMBOL_tBACK_REF = 65, /* "back reference" */
1420 YYSYMBOL_tSTRING_CONTENT = 66, /* "literal content" */
1421 YYSYMBOL_tREGEXP_END = 67, /* tREGEXP_END */
1422 YYSYMBOL_68_ = 68, /* '.' */
1423 YYSYMBOL_69_backslash_ = 69, /* "backslash" */
1424 YYSYMBOL_tSP = 70, /* "escaped space" */
1425 YYSYMBOL_71_escaped_horizontal_tab_ = 71, /* "escaped horizontal tab" */
1426 YYSYMBOL_72_escaped_form_feed_ = 72, /* "escaped form feed" */
1427 YYSYMBOL_73_escaped_carriage_return_ = 73, /* "escaped carriage return" */
1428 YYSYMBOL_74_escaped_vertical_tab_ = 74, /* "escaped vertical tab" */
1429 YYSYMBOL_tUPLUS = 75, /* "unary+" */
1430 YYSYMBOL_tUMINUS = 76, /* "unary-" */
1431 YYSYMBOL_tPOW = 77, /* "**" */
1432 YYSYMBOL_tCMP = 78, /* "<=>" */
1433 YYSYMBOL_tEQ = 79, /* "==" */
1434 YYSYMBOL_tEQQ = 80, /* "===" */
1435 YYSYMBOL_tNEQ = 81, /* "!=" */
1436 YYSYMBOL_tGEQ = 82, /* ">=" */
1437 YYSYMBOL_tLEQ = 83, /* "<=" */
1438 YYSYMBOL_tANDOP = 84, /* "&&" */
1439 YYSYMBOL_tOROP = 85, /* "||" */
1440 YYSYMBOL_tMATCH = 86, /* "=~" */
1441 YYSYMBOL_tNMATCH = 87, /* "!~" */
1442 YYSYMBOL_tDOT2 = 88, /* ".." */
1443 YYSYMBOL_tDOT3 = 89, /* "..." */
1444 YYSYMBOL_tBDOT2 = 90, /* "(.." */
1445 YYSYMBOL_tBDOT3 = 91, /* "(..." */
1446 YYSYMBOL_tAREF = 92, /* "[]" */
1447 YYSYMBOL_tASET = 93, /* "[]=" */
1448 YYSYMBOL_tLSHFT = 94, /* "<<" */
1449 YYSYMBOL_tRSHFT = 95, /* ">>" */
1450 YYSYMBOL_tANDDOT = 96, /* "&." */
1451 YYSYMBOL_tCOLON2 = 97, /* "::" */
1452 YYSYMBOL_tCOLON3 = 98, /* ":: at EXPR_BEG" */
1453 YYSYMBOL_tOP_ASGN = 99, /* "operator-assignment" */
1454 YYSYMBOL_tASSOC = 100, /* "=>" */
1455 YYSYMBOL_tLPAREN = 101, /* "(" */
1456 YYSYMBOL_tLPAREN_ARG = 102, /* "( arg" */
1457 YYSYMBOL_tRPAREN = 103, /* ")" */
1458 YYSYMBOL_tLBRACK = 104, /* "[" */
1459 YYSYMBOL_tLBRACE = 105, /* "{" */
1460 YYSYMBOL_tLBRACE_ARG = 106, /* "{ arg" */
1461 YYSYMBOL_tSTAR = 107, /* "*" */
1462 YYSYMBOL_tDSTAR = 108, /* "**arg" */
1463 YYSYMBOL_tAMPER = 109, /* "&" */
1464 YYSYMBOL_tLAMBDA = 110, /* "->" */
1465 YYSYMBOL_tSYMBEG = 111, /* "symbol literal" */
1466 YYSYMBOL_tSTRING_BEG = 112, /* "string literal" */
1467 YYSYMBOL_tXSTRING_BEG = 113, /* "backtick literal" */
1468 YYSYMBOL_tREGEXP_BEG = 114, /* "regexp literal" */
1469 YYSYMBOL_tWORDS_BEG = 115, /* "word list" */
1470 YYSYMBOL_tQWORDS_BEG = 116, /* "verbatim word list" */
1471 YYSYMBOL_tSYMBOLS_BEG = 117, /* "symbol list" */
1472 YYSYMBOL_tQSYMBOLS_BEG = 118, /* "verbatim symbol list" */
1473 YYSYMBOL_tSTRING_END = 119, /* "terminator" */
1474 YYSYMBOL_tSTRING_DEND = 120, /* "'}'" */
1475 YYSYMBOL_tSTRING_DBEG = 121, /* tSTRING_DBEG */
1476 YYSYMBOL_tSTRING_DVAR = 122, /* tSTRING_DVAR */
1477 YYSYMBOL_tLAMBEG = 123, /* tLAMBEG */
1478 YYSYMBOL_tLABEL_END = 124, /* tLABEL_END */
1479 YYSYMBOL_tLOWEST = 125, /* tLOWEST */
1480 YYSYMBOL_126_ = 126, /* '=' */
1481 YYSYMBOL_127_ = 127, /* '?' */
1482 YYSYMBOL_128_ = 128, /* ':' */
1483 YYSYMBOL_129_ = 129, /* '>' */
1484 YYSYMBOL_130_ = 130, /* '<' */
1485 YYSYMBOL_131_ = 131, /* '|' */
1486 YYSYMBOL_132_ = 132, /* '^' */
1487 YYSYMBOL_133_ = 133, /* '&' */
1488 YYSYMBOL_134_ = 134, /* '+' */
1489 YYSYMBOL_135_ = 135, /* '-' */
1490 YYSYMBOL_136_ = 136, /* '*' */
1491 YYSYMBOL_137_ = 137, /* '/' */
1492 YYSYMBOL_138_ = 138, /* '%' */
1493 YYSYMBOL_tUMINUS_NUM = 139, /* tUMINUS_NUM */
1494 YYSYMBOL_140_ = 140, /* '!' */
1495 YYSYMBOL_141_ = 141, /* '~' */
1496 YYSYMBOL_tLAST_TOKEN = 142, /* tLAST_TOKEN */
1497 YYSYMBOL_143_ = 143, /* '{' */
1498 YYSYMBOL_144_ = 144, /* '}' */
1499 YYSYMBOL_145_ = 145, /* '[' */
1500 YYSYMBOL_146_ = 146, /* ',' */
1501 YYSYMBOL_147_ = 147, /* '`' */
1502 YYSYMBOL_148_ = 148, /* '(' */
1503 YYSYMBOL_149_ = 149, /* ')' */
1504 YYSYMBOL_150_ = 150, /* ']' */
1505 YYSYMBOL_151_ = 151, /* ';' */
1506 YYSYMBOL_152_ = 152, /* ' ' */
1507 YYSYMBOL_153_n_ = 153, /* '\n' */
1508 YYSYMBOL_YYACCEPT = 154, /* $accept */
1509 YYSYMBOL_program = 155, /* program */
1510 YYSYMBOL_156_1 = 156, /* $@1 */
1511 YYSYMBOL_top_compstmt = 157, /* top_compstmt */
1512 YYSYMBOL_top_stmts = 158, /* top_stmts */
1513 YYSYMBOL_top_stmt = 159, /* top_stmt */
1514 YYSYMBOL_begin_block = 160, /* begin_block */
1515 YYSYMBOL_bodystmt = 161, /* bodystmt */
1516 YYSYMBOL_162_2 = 162, /* $@2 */
1517 YYSYMBOL_compstmt = 163, /* compstmt */
1518 YYSYMBOL_stmts = 164, /* stmts */
1519 YYSYMBOL_stmt_or_begin = 165, /* stmt_or_begin */
1520 YYSYMBOL_166_3 = 166, /* $@3 */
1521 YYSYMBOL_stmt = 167, /* stmt */
1522 YYSYMBOL_168_4 = 168, /* $@4 */
1523 YYSYMBOL_command_asgn = 169, /* command_asgn */
1524 YYSYMBOL_command_rhs = 170, /* command_rhs */
1525 YYSYMBOL_expr = 171, /* expr */
1526 YYSYMBOL_172_5 = 172, /* @5 */
1527 YYSYMBOL_173_6 = 173, /* @6 */
1528 YYSYMBOL_174_7 = 174, /* $@7 */
1529 YYSYMBOL_175_8 = 175, /* @8 */
1530 YYSYMBOL_176_9 = 176, /* @9 */
1531 YYSYMBOL_177_10 = 177, /* $@10 */
1532 YYSYMBOL_def_name = 178, /* def_name */
1533 YYSYMBOL_defn_head = 179, /* defn_head */
1534 YYSYMBOL_defs_head = 180, /* defs_head */
1535 YYSYMBOL_181_11 = 181, /* $@11 */
1536 YYSYMBOL_expr_value = 182, /* expr_value */
1537 YYSYMBOL_expr_value_do = 183, /* expr_value_do */
1538 YYSYMBOL_184_12 = 184, /* $@12 */
1539 YYSYMBOL_185_13 = 185, /* $@13 */
1540 YYSYMBOL_command_call = 186, /* command_call */
1541 YYSYMBOL_block_command = 187, /* block_command */
1542 YYSYMBOL_cmd_brace_block = 188, /* cmd_brace_block */
1543 YYSYMBOL_fcall = 189, /* fcall */
1544 YYSYMBOL_command = 190, /* command */
1545 YYSYMBOL_mlhs = 191, /* mlhs */
1546 YYSYMBOL_mlhs_inner = 192, /* mlhs_inner */
1547 YYSYMBOL_mlhs_basic = 193, /* mlhs_basic */
1548 YYSYMBOL_mlhs_item = 194, /* mlhs_item */
1549 YYSYMBOL_mlhs_head = 195, /* mlhs_head */
1550 YYSYMBOL_mlhs_post = 196, /* mlhs_post */
1551 YYSYMBOL_mlhs_node = 197, /* mlhs_node */
1552 YYSYMBOL_lhs = 198, /* lhs */
1553 YYSYMBOL_cname = 199, /* cname */
1554 YYSYMBOL_cpath = 200, /* cpath */
1555 YYSYMBOL_fname = 201, /* fname */
1556 YYSYMBOL_fitem = 202, /* fitem */
1557 YYSYMBOL_undef_list = 203, /* undef_list */
1558 YYSYMBOL_204_14 = 204, /* $@14 */
1559 YYSYMBOL_op = 205, /* op */
1560 YYSYMBOL_reswords = 206, /* reswords */
1561 YYSYMBOL_arg = 207, /* arg */
1562 YYSYMBOL_208_15 = 208, /* $@15 */
1563 YYSYMBOL_relop = 209, /* relop */
1564 YYSYMBOL_rel_expr = 210, /* rel_expr */
1565 YYSYMBOL_lex_ctxt = 211, /* lex_ctxt */
1566 YYSYMBOL_arg_value = 212, /* arg_value */
1567 YYSYMBOL_aref_args = 213, /* aref_args */
1568 YYSYMBOL_arg_rhs = 214, /* arg_rhs */
1569 YYSYMBOL_paren_args = 215, /* paren_args */
1570 YYSYMBOL_opt_paren_args = 216, /* opt_paren_args */
1571 YYSYMBOL_opt_call_args = 217, /* opt_call_args */
1572 YYSYMBOL_call_args = 218, /* call_args */
1573 YYSYMBOL_command_args = 219, /* command_args */
1574 YYSYMBOL_220_16 = 220, /* $@16 */
1575 YYSYMBOL_block_arg = 221, /* block_arg */
1576 YYSYMBOL_opt_block_arg = 222, /* opt_block_arg */
1577 YYSYMBOL_args = 223, /* args */
1578 YYSYMBOL_mrhs_arg = 224, /* mrhs_arg */
1579 YYSYMBOL_mrhs = 225, /* mrhs */
1580 YYSYMBOL_primary = 226, /* primary */
1581 YYSYMBOL_227_17 = 227, /* $@17 */
1582 YYSYMBOL_228_18 = 228, /* $@18 */
1583 YYSYMBOL_229_19 = 229, /* $@19 */
1584 YYSYMBOL_230_20 = 230, /* $@20 */
1585 YYSYMBOL_231_21 = 231, /* @21 */
1586 YYSYMBOL_232_22 = 232, /* @22 */
1587 YYSYMBOL_233_23 = 233, /* $@23 */
1588 YYSYMBOL_234_24 = 234, /* $@24 */
1589 YYSYMBOL_235_25 = 235, /* $@25 */
1590 YYSYMBOL_primary_value = 236, /* primary_value */
1591 YYSYMBOL_k_begin = 237, /* k_begin */
1592 YYSYMBOL_k_if = 238, /* k_if */
1593 YYSYMBOL_k_unless = 239, /* k_unless */
1594 YYSYMBOL_k_while = 240, /* k_while */
1595 YYSYMBOL_k_until = 241, /* k_until */
1596 YYSYMBOL_k_case = 242, /* k_case */
1597 YYSYMBOL_k_for = 243, /* k_for */
1598 YYSYMBOL_k_class = 244, /* k_class */
1599 YYSYMBOL_k_module = 245, /* k_module */
1600 YYSYMBOL_k_def = 246, /* k_def */
1601 YYSYMBOL_k_do = 247, /* k_do */
1602 YYSYMBOL_k_do_block = 248, /* k_do_block */
1603 YYSYMBOL_k_rescue = 249, /* k_rescue */
1604 YYSYMBOL_k_ensure = 250, /* k_ensure */
1605 YYSYMBOL_k_when = 251, /* k_when */
1606 YYSYMBOL_k_else = 252, /* k_else */
1607 YYSYMBOL_k_elsif = 253, /* k_elsif */
1608 YYSYMBOL_k_end = 254, /* k_end */
1609 YYSYMBOL_k_return = 255, /* k_return */
1610 YYSYMBOL_then = 256, /* then */
1611 YYSYMBOL_do = 257, /* do */
1612 YYSYMBOL_if_tail = 258, /* if_tail */
1613 YYSYMBOL_opt_else = 259, /* opt_else */
1614 YYSYMBOL_for_var = 260, /* for_var */
1615 YYSYMBOL_f_marg = 261, /* f_marg */
1616 YYSYMBOL_f_marg_list = 262, /* f_marg_list */
1617 YYSYMBOL_f_margs = 263, /* f_margs */
1618 YYSYMBOL_f_rest_marg = 264, /* f_rest_marg */
1619 YYSYMBOL_f_any_kwrest = 265, /* f_any_kwrest */
1620 YYSYMBOL_block_args_tail = 266, /* block_args_tail */
1621 YYSYMBOL_opt_block_args_tail = 267, /* opt_block_args_tail */
1622 YYSYMBOL_excessed_comma = 268, /* excessed_comma */
1623 YYSYMBOL_block_param = 269, /* block_param */
1624 YYSYMBOL_opt_block_param = 270, /* opt_block_param */
1625 YYSYMBOL_block_param_def = 271, /* block_param_def */
1626 YYSYMBOL_opt_bv_decl = 272, /* opt_bv_decl */
1627 YYSYMBOL_bv_decls = 273, /* bv_decls */
1628 YYSYMBOL_bvar = 274, /* bvar */
1629 YYSYMBOL_lambda = 275, /* lambda */
1630 YYSYMBOL_276_26 = 276, /* @26 */
1631 YYSYMBOL_277_27 = 277, /* @27 */
1632 YYSYMBOL_278_28 = 278, /* @28 */
1633 YYSYMBOL_279_29 = 279, /* $@29 */
1634 YYSYMBOL_f_larglist = 280, /* f_larglist */
1635 YYSYMBOL_lambda_body = 281, /* lambda_body */
1636 YYSYMBOL_do_block = 282, /* do_block */
1637 YYSYMBOL_block_call = 283, /* block_call */
1638 YYSYMBOL_method_call = 284, /* method_call */
1639 YYSYMBOL_brace_block = 285, /* brace_block */
1640 YYSYMBOL_brace_body = 286, /* brace_body */
1641 YYSYMBOL_287_30 = 287, /* @30 */
1642 YYSYMBOL_288_31 = 288, /* @31 */
1643 YYSYMBOL_289_32 = 289, /* @32 */
1644 YYSYMBOL_do_body = 290, /* do_body */
1645 YYSYMBOL_291_33 = 291, /* @33 */
1646 YYSYMBOL_292_34 = 292, /* @34 */
1647 YYSYMBOL_293_35 = 293, /* @35 */
1648 YYSYMBOL_case_args = 294, /* case_args */
1649 YYSYMBOL_case_body = 295, /* case_body */
1650 YYSYMBOL_cases = 296, /* cases */
1651 YYSYMBOL_p_case_body = 297, /* p_case_body */
1652 YYSYMBOL_298_36 = 298, /* @36 */
1653 YYSYMBOL_299_37 = 299, /* @37 */
1654 YYSYMBOL_300_38 = 300, /* $@38 */
1655 YYSYMBOL_p_cases = 301, /* p_cases */
1656 YYSYMBOL_p_top_expr = 302, /* p_top_expr */
1657 YYSYMBOL_p_top_expr_body = 303, /* p_top_expr_body */
1658 YYSYMBOL_p_expr = 304, /* p_expr */
1659 YYSYMBOL_p_as = 305, /* p_as */
1660 YYSYMBOL_p_alt = 306, /* p_alt */
1661 YYSYMBOL_p_lparen = 307, /* p_lparen */
1662 YYSYMBOL_p_lbracket = 308, /* p_lbracket */
1663 YYSYMBOL_p_expr_basic = 309, /* p_expr_basic */
1664 YYSYMBOL_310_39 = 310, /* @39 */
1665 YYSYMBOL_311_40 = 311, /* @40 */
1666 YYSYMBOL_p_args = 312, /* p_args */
1667 YYSYMBOL_p_args_head = 313, /* p_args_head */
1668 YYSYMBOL_p_args_tail = 314, /* p_args_tail */
1669 YYSYMBOL_p_find = 315, /* p_find */
1670 YYSYMBOL_p_rest = 316, /* p_rest */
1671 YYSYMBOL_p_args_post = 317, /* p_args_post */
1672 YYSYMBOL_p_arg = 318, /* p_arg */
1673 YYSYMBOL_p_kwargs = 319, /* p_kwargs */
1674 YYSYMBOL_p_kwarg = 320, /* p_kwarg */
1675 YYSYMBOL_p_kw = 321, /* p_kw */
1676 YYSYMBOL_p_kw_label = 322, /* p_kw_label */
1677 YYSYMBOL_p_kwrest = 323, /* p_kwrest */
1678 YYSYMBOL_p_kwnorest = 324, /* p_kwnorest */
1679 YYSYMBOL_p_any_kwrest = 325, /* p_any_kwrest */
1680 YYSYMBOL_p_value = 326, /* p_value */
1681 YYSYMBOL_p_primitive = 327, /* p_primitive */
1682 YYSYMBOL_p_variable = 328, /* p_variable */
1683 YYSYMBOL_p_var_ref = 329, /* p_var_ref */
1684 YYSYMBOL_p_const = 330, /* p_const */
1685 YYSYMBOL_opt_rescue = 331, /* opt_rescue */
1686 YYSYMBOL_exc_list = 332, /* exc_list */
1687 YYSYMBOL_exc_var = 333, /* exc_var */
1688 YYSYMBOL_opt_ensure = 334, /* opt_ensure */
1689 YYSYMBOL_literal = 335, /* literal */
1690 YYSYMBOL_strings = 336, /* strings */
1691 YYSYMBOL_string = 337, /* string */
1692 YYSYMBOL_string1 = 338, /* string1 */
1693 YYSYMBOL_xstring = 339, /* xstring */
1694 YYSYMBOL_regexp = 340, /* regexp */
1695 YYSYMBOL_words = 341, /* words */
1696 YYSYMBOL_word_list = 342, /* word_list */
1697 YYSYMBOL_word = 343, /* word */
1698 YYSYMBOL_symbols = 344, /* symbols */
1699 YYSYMBOL_symbol_list = 345, /* symbol_list */
1700 YYSYMBOL_qwords = 346, /* qwords */
1701 YYSYMBOL_qsymbols = 347, /* qsymbols */
1702 YYSYMBOL_qword_list = 348, /* qword_list */
1703 YYSYMBOL_qsym_list = 349, /* qsym_list */
1704 YYSYMBOL_string_contents = 350, /* string_contents */
1705 YYSYMBOL_xstring_contents = 351, /* xstring_contents */
1706 YYSYMBOL_regexp_contents = 352, /* regexp_contents */
1707 YYSYMBOL_string_content = 353, /* string_content */
1708 YYSYMBOL_354_41 = 354, /* @41 */
1709 YYSYMBOL_355_42 = 355, /* $@42 */
1710 YYSYMBOL_356_43 = 356, /* @43 */
1711 YYSYMBOL_357_44 = 357, /* @44 */
1712 YYSYMBOL_358_45 = 358, /* @45 */
1713 YYSYMBOL_359_46 = 359, /* @46 */
1714 YYSYMBOL_string_dvar = 360, /* string_dvar */
1715 YYSYMBOL_symbol = 361, /* symbol */
1716 YYSYMBOL_ssym = 362, /* ssym */
1717 YYSYMBOL_sym = 363, /* sym */
1718 YYSYMBOL_dsym = 364, /* dsym */
1719 YYSYMBOL_numeric = 365, /* numeric */
1720 YYSYMBOL_simple_numeric = 366, /* simple_numeric */
1721 YYSYMBOL_user_variable = 367, /* user_variable */
1722 YYSYMBOL_keyword_variable = 368, /* keyword_variable */
1723 YYSYMBOL_var_ref = 369, /* var_ref */
1724 YYSYMBOL_var_lhs = 370, /* var_lhs */
1725 YYSYMBOL_backref = 371, /* backref */
1726 YYSYMBOL_superclass = 372, /* superclass */
1727 YYSYMBOL_373_47 = 373, /* $@47 */
1728 YYSYMBOL_f_opt_paren_args = 374, /* f_opt_paren_args */
1729 YYSYMBOL_f_paren_args = 375, /* f_paren_args */
1730 YYSYMBOL_f_arglist = 376, /* f_arglist */
1731 YYSYMBOL_377_48 = 377, /* @48 */
1732 YYSYMBOL_args_tail = 378, /* args_tail */
1733 YYSYMBOL_opt_args_tail = 379, /* opt_args_tail */
1734 YYSYMBOL_f_args = 380, /* f_args */
1735 YYSYMBOL_args_forward = 381, /* args_forward */
1736 YYSYMBOL_f_bad_arg = 382, /* f_bad_arg */
1737 YYSYMBOL_f_norm_arg = 383, /* f_norm_arg */
1738 YYSYMBOL_f_arg_asgn = 384, /* f_arg_asgn */
1739 YYSYMBOL_f_arg_item = 385, /* f_arg_item */
1740 YYSYMBOL_f_arg = 386, /* f_arg */
1741 YYSYMBOL_f_label = 387, /* f_label */
1742 YYSYMBOL_f_kw = 388, /* f_kw */
1743 YYSYMBOL_f_block_kw = 389, /* f_block_kw */
1744 YYSYMBOL_f_block_kwarg = 390, /* f_block_kwarg */
1745 YYSYMBOL_f_kwarg = 391, /* f_kwarg */
1746 YYSYMBOL_kwrest_mark = 392, /* kwrest_mark */
1747 YYSYMBOL_f_no_kwarg = 393, /* f_no_kwarg */
1748 YYSYMBOL_f_kwrest = 394, /* f_kwrest */
1749 YYSYMBOL_f_opt = 395, /* f_opt */
1750 YYSYMBOL_f_block_opt = 396, /* f_block_opt */
1751 YYSYMBOL_f_block_optarg = 397, /* f_block_optarg */
1752 YYSYMBOL_f_optarg = 398, /* f_optarg */
1753 YYSYMBOL_restarg_mark = 399, /* restarg_mark */
1754 YYSYMBOL_f_rest_arg = 400, /* f_rest_arg */
1755 YYSYMBOL_blkarg_mark = 401, /* blkarg_mark */
1756 YYSYMBOL_f_block_arg = 402, /* f_block_arg */
1757 YYSYMBOL_opt_f_block_arg = 403, /* opt_f_block_arg */
1758 YYSYMBOL_singleton = 404, /* singleton */
1759 YYSYMBOL_405_49 = 405, /* $@49 */
1760 YYSYMBOL_assoc_list = 406, /* assoc_list */
1761 YYSYMBOL_assocs = 407, /* assocs */
1762 YYSYMBOL_assoc = 408, /* assoc */
1763 YYSYMBOL_operation = 409, /* operation */
1764 YYSYMBOL_operation2 = 410, /* operation2 */
1765 YYSYMBOL_operation3 = 411, /* operation3 */
1766 YYSYMBOL_dot_or_colon = 412, /* dot_or_colon */
1767 YYSYMBOL_call_op = 413, /* call_op */
1768 YYSYMBOL_call_op2 = 414, /* call_op2 */
1769 YYSYMBOL_opt_terms = 415, /* opt_terms */
1770 YYSYMBOL_opt_nl = 416, /* opt_nl */
1771 YYSYMBOL_rparen = 417, /* rparen */
1772 YYSYMBOL_rbracket = 418, /* rbracket */
1773 YYSYMBOL_rbrace = 419, /* rbrace */
1774 YYSYMBOL_trailer = 420, /* trailer */
1775 YYSYMBOL_term = 421, /* term */
1776 YYSYMBOL_terms = 422, /* terms */
1777 YYSYMBOL_none = 423 /* none */
1780
1781
1782
1783
1784#ifdef short
1785# undef short
1786#endif
1787
1788/* On compilers that do not define __PTRDIFF_MAX__ etc., make sure
1789 <limits.h> and (if available) <stdint.h> are included
1790 so that the code can choose integer types of a good width. */
1791
1792#ifndef __PTRDIFF_MAX__
1793# include <limits.h> /* INFRINGES ON USER NAME SPACE */
1794# if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
1795# include <stdint.h> /* INFRINGES ON USER NAME SPACE */
1796# define YY_STDINT_H
1797# endif
1798#endif
1799
1800/* Narrow types that promote to a signed type and that can represent a
1801 signed or unsigned integer of at least N bits. In tables they can
1802 save space and decrease cache pressure. Promoting to a signed type
1803 helps avoid bugs in integer arithmetic. */
1804
1805#ifdef __INT_LEAST8_MAX__
1806typedef __INT_LEAST8_TYPE__ yytype_int8;
1807#elif defined YY_STDINT_H
1808typedef int_least8_t yytype_int8;
1809#else
1810typedef signed char yytype_int8;
1811#endif
1812
1813#ifdef __INT_LEAST16_MAX__
1814typedef __INT_LEAST16_TYPE__ yytype_int16;
1815#elif defined YY_STDINT_H
1816typedef int_least16_t yytype_int16;
1817#else
1818typedef short yytype_int16;
1819#endif
1820
1821/* Work around bug in HP-UX 11.23, which defines these macros
1822 incorrectly for preprocessor constants. This workaround can likely
1823 be removed in 2023, as HPE has promised support for HP-UX 11.23
1824 (aka HP-UX 11i v2) only through the end of 2022; see Table 2 of
1825 <https://h20195.www2.hpe.com/V2/getpdf.aspx/4AA4-7673ENW.pdf>. */
1826#ifdef __hpux
1827# undef UINT_LEAST8_MAX
1828# undef UINT_LEAST16_MAX
1829# define UINT_LEAST8_MAX 255
1830# define UINT_LEAST16_MAX 65535
1831#endif
1832
1833#if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__
1834typedef __UINT_LEAST8_TYPE__ yytype_uint8;
1835#elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \
1836 && UINT_LEAST8_MAX <= INT_MAX)
1837typedef uint_least8_t yytype_uint8;
1838#elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX
1839typedef unsigned char yytype_uint8;
1840#else
1841typedef short yytype_uint8;
1842#endif
1843
1844#if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__
1845typedef __UINT_LEAST16_TYPE__ yytype_uint16;
1846#elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \
1847 && UINT_LEAST16_MAX <= INT_MAX)
1848typedef uint_least16_t yytype_uint16;
1849#elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX
1850typedef unsigned short yytype_uint16;
1851#else
1852typedef int yytype_uint16;
1853#endif
1854
1855#ifndef YYPTRDIFF_T
1856# if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__
1857# define YYPTRDIFF_T __PTRDIFF_TYPE__
1858# define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__
1859# elif defined PTRDIFF_MAX
1860# ifndef ptrdiff_t
1861# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
1862# endif
1863# define YYPTRDIFF_T ptrdiff_t
1864# define YYPTRDIFF_MAXIMUM PTRDIFF_MAX
1865# else
1866# define YYPTRDIFF_T long
1867# define YYPTRDIFF_MAXIMUM LONG_MAX
1868# endif
1869#endif
1870
1871#ifndef YYSIZE_T
1872# ifdef __SIZE_TYPE__
1873# define YYSIZE_T __SIZE_TYPE__
1874# elif defined size_t
1875# define YYSIZE_T size_t
1876# elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
1877# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
1878# define YYSIZE_T size_t
1879# else
1880# define YYSIZE_T unsigned
1881# endif
1882#endif
1883
1884#define YYSIZE_MAXIMUM \
1885 YY_CAST (YYPTRDIFF_T, \
1886 (YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1) \
1887 ? YYPTRDIFF_MAXIMUM \
1888 : YY_CAST (YYSIZE_T, -1)))
1889
1890#define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X))
1891
1892
1893/* Stored state numbers (used for stacks). */
1895
1896/* State numbers in computations. */
1898
1899#ifndef YY_
1900# if defined YYENABLE_NLS && YYENABLE_NLS
1901# if ENABLE_NLS
1902# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
1903# define YY_(Msgid) dgettext ("bison-runtime", Msgid)
1904# endif
1905# endif
1906# ifndef YY_
1907# define YY_(Msgid) Msgid
1908# endif
1909#endif
1910
1911
1912#ifndef YY_ATTRIBUTE_PURE
1913# if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__)
1914# define YY_ATTRIBUTE_PURE __attribute__ ((__pure__))
1915# else
1916# define YY_ATTRIBUTE_PURE
1917# endif
1918#endif
1919
1920#ifndef YY_ATTRIBUTE_UNUSED
1921# if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__)
1922# define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
1923# else
1924# define YY_ATTRIBUTE_UNUSED
1925# endif
1926#endif
1927
1928/* Suppress unused-variable warnings by "using" E. */
1929#if ! defined lint || defined __GNUC__
1930# define YY_USE(E) ((void) (E))
1931#else
1932# define YY_USE(E) /* empty */
1933#endif
1934
1935/* Suppress an incorrect diagnostic about yylval being uninitialized. */
1936#if defined __GNUC__ && ! defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__
1937# if __GNUC__ * 100 + __GNUC_MINOR__ < 407
1938# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
1939 _Pragma ("GCC diagnostic push") \
1940 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")
1941# else
1942# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
1943 _Pragma ("GCC diagnostic push") \
1944 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \
1945 _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
1946# endif
1947# define YY_IGNORE_MAYBE_UNINITIALIZED_END \
1948 _Pragma ("GCC diagnostic pop")
1949#else
1950# define YY_INITIAL_VALUE(Value) Value
1951#endif
1952#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1953# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1954# define YY_IGNORE_MAYBE_UNINITIALIZED_END
1955#endif
1956#ifndef YY_INITIAL_VALUE
1957# define YY_INITIAL_VALUE(Value) /* Nothing. */
1958#endif
1959
1960#if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__
1961# define YY_IGNORE_USELESS_CAST_BEGIN \
1962 _Pragma ("GCC diagnostic push") \
1963 _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"")
1964# define YY_IGNORE_USELESS_CAST_END \
1965 _Pragma ("GCC diagnostic pop")
1966#endif
1967#ifndef YY_IGNORE_USELESS_CAST_BEGIN
1968# define YY_IGNORE_USELESS_CAST_BEGIN
1969# define YY_IGNORE_USELESS_CAST_END
1970#endif
1971
1972
1973#define YY_ASSERT(E) ((void) (0 && (E)))
1974
1975#if 1
1976
1977/* The parser invokes alloca or malloc; define the necessary symbols. */
1978
1979# ifdef YYSTACK_USE_ALLOCA
1980# if YYSTACK_USE_ALLOCA
1981# ifdef __GNUC__
1982# define YYSTACK_ALLOC __builtin_alloca
1983# elif defined __BUILTIN_VA_ARG_INCR
1984# include <alloca.h> /* INFRINGES ON USER NAME SPACE */
1985# elif defined _AIX
1986# define YYSTACK_ALLOC __alloca
1987# elif defined _MSC_VER
1988# include <malloc.h> /* INFRINGES ON USER NAME SPACE */
1989# define alloca _alloca
1990# else
1991# define YYSTACK_ALLOC alloca
1992# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
1993# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
1994 /* Use EXIT_SUCCESS as a witness for stdlib.h. */
1995# ifndef EXIT_SUCCESS
1996# define EXIT_SUCCESS 0
1997# endif
1998# endif
1999# endif
2000# endif
2001# endif
2002
2003# ifdef YYSTACK_ALLOC
2004 /* Pacify GCC's 'empty if-body' warning. */
2005# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
2006# ifndef YYSTACK_ALLOC_MAXIMUM
2007 /* The OS might guarantee only one guard page at the bottom of the stack,
2008 and a page size can be as small as 4096 bytes. So we cannot safely
2009 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
2010 to allow for a few compiler-allocated temporary stack slots. */
2011# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
2012# endif
2013# else
2014# define YYSTACK_ALLOC YYMALLOC
2015# define YYSTACK_FREE YYFREE
2016# ifndef YYSTACK_ALLOC_MAXIMUM
2017# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
2018# endif
2019# if (defined __cplusplus && ! defined EXIT_SUCCESS \
2020 && ! ((defined YYMALLOC || defined malloc) \
2021 && (defined YYFREE || defined free)))
2022# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
2023# ifndef EXIT_SUCCESS
2024# define EXIT_SUCCESS 0
2025# endif
2026# endif
2027# ifndef YYMALLOC
2028# define YYMALLOC malloc
2029# if ! defined malloc && ! defined EXIT_SUCCESS
2030void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
2031# endif
2032# endif
2033# ifndef YYFREE
2034# define YYFREE free
2035# if ! defined free && ! defined EXIT_SUCCESS
2036void free (void *); /* INFRINGES ON USER NAME SPACE */
2037# endif
2038# endif
2039# endif
2040#endif /* 1 */
2041
2042#if (! defined yyoverflow \
2043 && (! defined __cplusplus \
2044 || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \
2045 && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
2046
2047/* A type that is properly aligned for any stack member. */
2048union yyalloc
2049{
2050 yy_state_t yyss_alloc;
2051 YYSTYPE yyvs_alloc;
2052 YYLTYPE yyls_alloc;
2053};
2054
2055/* The size of the maximum gap between one aligned stack and the next. */
2056# define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1)
2057
2058/* The size of an array large to enough to hold all stacks, each with
2059 N elements. */
2060# define YYSTACK_BYTES(N) \
2061 ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE) \
2062 + YYSIZEOF (YYLTYPE)) \
2063 + 2 * YYSTACK_GAP_MAXIMUM)
2064
2065# define YYCOPY_NEEDED 1
2066
2067/* Relocate STACK from its old location to the new one. The
2068 local variables YYSIZE and YYSTACKSIZE give the old and new number of
2069 elements in the stack, and YYPTR gives the new location of the
2070 stack. Advance YYPTR to a properly aligned location for the next
2071 stack. */
2072# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
2073 do \
2074 { \
2075 YYPTRDIFF_T yynewbytes; \
2076 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
2077 Stack = &yyptr->Stack_alloc; \
2078 yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \
2079 yyptr += yynewbytes / YYSIZEOF (*yyptr); \
2080 } \
2081 while (0)
2082
2083#endif
2084
2085#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
2086/* Copy COUNT objects from SRC to DST. The source and destination do
2087 not overlap. */
2088# ifndef YYCOPY
2089# if defined __GNUC__ && 1 < __GNUC__
2090# define YYCOPY(Dst, Src, Count) \
2091 __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src)))
2092# else
2093# define YYCOPY(Dst, Src, Count) \
2094 do \
2095 { \
2096 YYPTRDIFF_T yyi; \
2097 for (yyi = 0; yyi < (Count); yyi++) \
2098 (Dst)[yyi] = (Src)[yyi]; \
2099 } \
2100 while (0)
2101# endif
2102# endif
2103#endif /* !YYCOPY_NEEDED */
2104
2105/* YYFINAL -- State number of the termination state. */
2106#define YYFINAL 3
2107/* YYLAST -- Last index in YYTABLE. */
2108#define YYLAST 14332
2109
2110/* YYNTOKENS -- Number of terminals. */
2111#define YYNTOKENS 154
2112/* YYNNTS -- Number of nonterminals. */
2113#define YYNNTS 270
2114/* YYNRULES -- Number of rules. */
2115#define YYNRULES 773
2116/* YYNSTATES -- Number of states. */
2117#define YYNSTATES 1294
2118
2119/* YYMAXUTOK -- Last valid token kind. */
2120#define YYMAXUTOK 353
2121
2122
2123/* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM
2124 as returned by yylex, with out-of-bounds checking. */
2125#define YYTRANSLATE(YYX) \
2126 (0 <= (YYX) && (YYX) <= YYMAXUTOK \
2127 ? YY_CAST (yysymbol_kind_t, yytranslate[YYX]) \
2128 : YYSYMBOL_YYUNDEF)
2129
2130/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
2131 as returned by yylex. */
2132static const yytype_uint8 yytranslate[] =
2133{
2134 0, 2, 2, 2, 2, 2, 2, 2, 2, 71,
2135 153, 74, 72, 73, 2, 2, 2, 2, 2, 2,
2136 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2137 2, 2, 152, 140, 2, 2, 2, 138, 133, 2,
2138 148, 149, 136, 134, 146, 135, 68, 137, 2, 2,
2139 2, 2, 2, 2, 2, 2, 2, 2, 128, 151,
2140 130, 126, 129, 127, 2, 2, 2, 2, 2, 2,
2141 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2142 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2143 2, 145, 69, 150, 132, 2, 147, 2, 2, 2,
2144 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2145 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2146 2, 2, 2, 143, 131, 144, 141, 2, 88, 89,
2147 90, 91, 75, 76, 77, 78, 94, 95, 83, 82,
2148 79, 80, 81, 86, 87, 92, 93, 97, 84, 85,
2149 96, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2150 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2151 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2152 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2153 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2154 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2155 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2156 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2157 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2158 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2159 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
2160 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
2161 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
2162 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
2163 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
2164 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
2165 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
2166 65, 66, 67, 70, 98, 99, 100, 101, 102, 103,
2167 104, 105, 106, 107, 108, 109, 110, 111, 112, 113,
2168 114, 115, 116, 117, 118, 119, 120, 121, 122, 123,
2169 124, 125, 139, 142
2170};
2171
2172#if YYDEBUG
2173/* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
2174static const yytype_int16 yyrline[] =
2175{
2176 0, 1322, 1322, 1322, 1348, 1354, 1361, 1368, 1375, 1381,
2177 1382, 1388, 1401, 1399, 1410, 1421, 1427, 1434, 1441, 1448,
2178 1454, 1459, 1458, 1468, 1468, 1475, 1482, 1492, 1501, 1508,
2179 1516, 1524, 1536, 1548, 1558, 1572, 1573, 1581, 1589, 1598,
2180 1605, 1608, 1615, 1622, 1630, 1637, 1644, 1652, 1659, 1669,
2181 1674, 1683, 1686, 1687, 1691, 1695, 1699, 1704, 1711, 1713,
2182 1703, 1723, 1730, 1732, 1722, 1741, 1744, 1761, 1770, 1770,
2183 1784, 1791, 1791, 1791, 1797, 1798, 1801, 1802, 1811, 1821,
2184 1831, 1840, 1851, 1858, 1865, 1872, 1879, 1887, 1895, 1902,
2185 1909, 1918, 1919, 1928, 1929, 1938, 1945, 1952, 1959, 1966,
2186 1973, 1980, 1987, 1994, 2001, 2010, 2011, 2020, 2027, 2036,
2187 2043, 2052, 2059, 2066, 2073, 2083, 2090, 2100, 2107, 2114,
2188 2124, 2131, 2138, 2145, 2152, 2159, 2166, 2173, 2180, 2190,
2189 2198, 2201, 2208, 2215, 2224, 2225, 2226, 2227, 2232, 2235,
2190 2242, 2245, 2252, 2252, 2262, 2263, 2264, 2265, 2266, 2267,
2191 2268, 2269, 2270, 2271, 2272, 2273, 2274, 2275, 2276, 2277,
2192 2278, 2279, 2280, 2281, 2282, 2283, 2284, 2285, 2286, 2287,
2193 2288, 2289, 2290, 2291, 2294, 2294, 2294, 2295, 2295, 2296,
2194 2296, 2296, 2297, 2297, 2297, 2297, 2298, 2298, 2298, 2298,
2195 2299, 2299, 2299, 2300, 2300, 2300, 2300, 2301, 2301, 2301,
2196 2301, 2302, 2302, 2302, 2302, 2303, 2303, 2303, 2303, 2304,
2197 2304, 2304, 2304, 2305, 2305, 2308, 2315, 2322, 2329, 2336,
2198 2343, 2350, 2358, 2365, 2373, 2382, 2391, 2399, 2407, 2415,
2199 2423, 2427, 2431, 2435, 2439, 2443, 2447, 2451, 2455, 2459,
2200 2463, 2467, 2471, 2475, 2476, 2480, 2484, 2488, 2492, 2496,
2201 2500, 2504, 2508, 2512, 2516, 2520, 2520, 2525, 2534, 2544,
2202 2555, 2567, 2580, 2586, 2587, 2588, 2589, 2592, 2596, 2603,
2203 2607, 2613, 2620, 2621, 2625, 2632, 2641, 2646, 2656, 2663,
2204 2675, 2689, 2690, 2693, 2694, 2695, 2699, 2706, 2715, 2723,
2205 2730, 2738, 2746, 2750, 2750, 2787, 2796, 2800, 2806, 2813,
2206 2820, 2827, 2836, 2837, 2840, 2847, 2854, 2863, 2864, 2865,
2207 2866, 2867, 2868, 2869, 2870, 2871, 2872, 2873, 2881, 2880,
2208 2895, 2895, 2902, 2902, 2910, 2918, 2925, 2932, 2939, 2947,
2209 2954, 2961, 2968, 2975, 2975, 2980, 2984, 2988, 2995, 2996,
2210 3004, 3005, 3016, 3027, 3037, 3048, 3047, 3064, 3063, 3078,
2211 3087, 3132, 3131, 3155, 3154, 3177, 3176, 3199, 3211, 3225,
2212 3232, 3239, 3246, 3255, 3262, 3268, 3285, 3291, 3297, 3303,
2213 3309, 3315, 3322, 3329, 3335, 3341, 3347, 3353, 3359, 3365,
2214 3380, 3387, 3393, 3400, 3401, 3402, 3405, 3406, 3409, 3410,
2215 3422, 3423, 3432, 3433, 3436, 3444, 3453, 3460, 3469, 3476,
2216 3483, 3490, 3497, 3506, 3514, 3523, 3524, 3527, 3531, 3535,
2217 3539, 3545, 3550, 3555, 3565, 3569, 3573, 3577, 3581, 3585,
2218 3590, 3594, 3598, 3602, 3606, 3610, 3614, 3618, 3622, 3628,
2219 3629, 3635, 3644, 3656, 3660, 3669, 3671, 3675, 3680, 3687,
2220 3693, 3697, 3701, 3686, 3726, 3734, 3744, 3749, 3755, 3765,
2221 3779, 3786, 3793, 3802, 3811, 3819, 3827, 3834, 3842, 3850,
2222 3857, 3864, 3877, 3885, 3895, 3896, 3900, 3895, 3917, 3918,
2223 3922, 3917, 3941, 3949, 3956, 3964, 3973, 3985, 3986, 3990,
2224 3997, 4001, 3989, 4016, 4017, 4020, 4021, 4029, 4039, 4040,
2225 4045, 4053, 4057, 4061, 4067, 4070, 4079, 4082, 4089, 4092,
2226 4093, 4095, 4096, 4105, 4114, 4123, 4128, 4137, 4146, 4155,
2227 4160, 4164, 4168, 4174, 4173, 4185, 4190, 4190, 4197, 4206,
2228 4210, 4219, 4223, 4227, 4231, 4235, 4238, 4242, 4251, 4255,
2229 4261, 4271, 4275, 4281, 4282, 4291, 4300, 4304, 4308, 4312,
2230 4318, 4320, 4329, 4337, 4351, 4352, 4375, 4379, 4385, 4391,
2231 4392, 4395, 4396, 4405, 4414, 4422, 4430, 4431, 4432, 4433,
2232 4441, 4451, 4452, 4453, 4454, 4455, 4456, 4457, 4458, 4459,
2233 4466, 4469, 4479, 4492, 4499, 4506, 4515, 4527, 4530, 4537,
2234 4544, 4547, 4551, 4554, 4561, 4564, 4565, 4568, 4585, 4586,
2235 4587, 4596, 4606, 4615, 4621, 4631, 4637, 4646, 4648, 4657,
2236 4667, 4673, 4682, 4691, 4701, 4707, 4717, 4723, 4733, 4743,
2237 4762, 4768, 4778, 4788, 4829, 4832, 4831, 4848, 4852, 4857,
2238 4861, 4865, 4847, 4886, 4893, 4900, 4907, 4910, 4911, 4914,
2239 4924, 4925, 4926, 4927, 4930, 4940, 4941, 4951, 4952, 4953,
2240 4954, 4957, 4958, 4959, 4960, 4961, 4964, 4965, 4966, 4967,
2241 4968, 4969, 4970, 4973, 4986, 4995, 5002, 5011, 5012, 5016,
2242 5015, 5025, 5033, 5033, 5035, 5044, 5054, 5066, 5067, 5067,
2243 5081, 5085, 5089, 5093, 5099, 5104, 5109, 5113, 5117, 5121,
2244 5125, 5129, 5133, 5137, 5141, 5145, 5149, 5153, 5157, 5161,
2245 5166, 5172, 5181, 5190, 5199, 5208, 5219, 5220, 5228, 5237,
2246 5245, 5266, 5268, 5281, 5290, 5298, 5308, 5315, 5324, 5331,
2247 5341, 5348, 5357, 5358, 5361, 5369, 5377, 5387, 5397, 5407,
2248 5414, 5423, 5430, 5439, 5440, 5443, 5451, 5461, 5462, 5465,
2249 5475, 5479, 5485, 5490, 5490, 5514, 5515, 5524, 5526, 5549,
2250 5560, 5567, 5575, 5594, 5595, 5596, 5599, 5600, 5601, 5602,
2251 5605, 5606, 5607, 5610, 5611, 5614, 5615, 5618, 5619, 5622,
2252 5623, 5626, 5627, 5630, 5633, 5636, 5639, 5640, 5641, 5644,
2253 5645, 5648, 5649, 5653
2254};
2255#endif
2256
2258#define YY_ACCESSING_SYMBOL(State) YY_CAST (yysymbol_kind_t, yystos[State])
2259
2260#if 1
2261/* The user-facing name of the symbol whose (internal) number is
2262 YYSYMBOL. No bounds checking. */
2263static const char *yysymbol_name (yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED;
2264
2265/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
2266 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
2267static const char *const yytname[] =
2268{
2269 "\"end-of-input\"", "error", "\"invalid token\"", "\"`class'\"",
2270 "\"`module'\"", "\"`def'\"", "\"`undef'\"", "\"`begin'\"",
2271 "\"`rescue'\"", "\"`ensure'\"", "\"`end'\"", "\"`if'\"", "\"`unless'\"",
2272 "\"`then'\"", "\"`elsif'\"", "\"`else'\"", "\"`case'\"", "\"`when'\"",
2273 "\"`while'\"", "\"`until'\"", "\"`for'\"", "\"`break'\"", "\"`next'\"",
2274 "\"`redo'\"", "\"`retry'\"", "\"`in'\"", "\"`do'\"",
2275 "\"`do' for condition\"", "\"`do' for block\"", "\"`do' for lambda\"",
2276 "\"`return'\"", "\"`yield'\"", "\"`super'\"", "\"`self'\"", "\"`nil'\"",
2277 "\"`true'\"", "\"`false'\"", "\"`and'\"", "\"`or'\"", "\"`not'\"",
2278 "\"`if' modifier\"", "\"`unless' modifier\"", "\"`while' modifier\"",
2279 "\"`until' modifier\"", "\"`rescue' modifier\"", "\"`alias'\"",
2280 "\"`defined?'\"", "\"`BEGIN'\"", "\"`END'\"", "\"`__LINE__'\"",
2281 "\"`__FILE__'\"", "\"`__ENCODING__'\"", "\"local variable or method\"",
2282 "\"method\"", "\"global variable\"", "\"instance variable\"",
2283 "\"constant\"", "\"class variable\"", "\"label\"", "\"integer literal\"",
2284 "\"float literal\"", "\"rational literal\"", "\"imaginary literal\"",
2285 "\"char literal\"", "\"numbered reference\"", "\"back reference\"",
2286 "\"literal content\"", "tREGEXP_END", "'.'", "\"backslash\"",
2287 "\"escaped space\"", "\"escaped horizontal tab\"",
2288 "\"escaped form feed\"", "\"escaped carriage return\"",
2289 "\"escaped vertical tab\"", "\"unary+\"", "\"unary-\"", "\"**\"",
2290 "\"<=>\"", "\"==\"", "\"===\"", "\"!=\"", "\">=\"", "\"<=\"", "\"&&\"",
2291 "\"||\"", "\"=~\"", "\"!~\"", "\"..\"", "\"...\"", "\"(..\"", "\"(...\"",
2292 "\"[]\"", "\"[]=\"", "\"<<\"", "\">>\"", "\"&.\"", "\"::\"",
2293 "\":: at EXPR_BEG\"", "\"operator-assignment\"", "\"=>\"", "\"(\"",
2294 "\"( arg\"", "\")\"", "\"[\"", "\"{\"", "\"{ arg\"", "\"*\"",
2295 "\"**arg\"", "\"&\"", "\"->\"", "\"symbol literal\"",
2296 "\"string literal\"", "\"backtick literal\"", "\"regexp literal\"",
2297 "\"word list\"", "\"verbatim word list\"", "\"symbol list\"",
2298 "\"verbatim symbol list\"", "\"terminator\"", "\"'}'\"", "tSTRING_DBEG",
2299 "tSTRING_DVAR", "tLAMBEG", "tLABEL_END", "tLOWEST", "'='", "'?'", "':'",
2300 "'>'", "'<'", "'|'", "'^'", "'&'", "'+'", "'-'", "'*'", "'/'", "'%'",
2301 "tUMINUS_NUM", "'!'", "'~'", "tLAST_TOKEN", "'{'", "'}'", "'['", "','",
2302 "'`'", "'('", "')'", "']'", "';'", "' '", "'\\n'", "$accept", "program",
2303 "$@1", "top_compstmt", "top_stmts", "top_stmt", "begin_block",
2304 "bodystmt", "$@2", "compstmt", "stmts", "stmt_or_begin", "$@3", "stmt",
2305 "$@4", "command_asgn", "command_rhs", "expr", "@5", "@6", "$@7", "@8",
2306 "@9", "$@10", "def_name", "defn_head", "defs_head", "$@11", "expr_value",
2307 "expr_value_do", "$@12", "$@13", "command_call", "block_command",
2308 "cmd_brace_block", "fcall", "command", "mlhs", "mlhs_inner",
2309 "mlhs_basic", "mlhs_item", "mlhs_head", "mlhs_post", "mlhs_node", "lhs",
2310 "cname", "cpath", "fname", "fitem", "undef_list", "$@14", "op",
2311 "reswords", "arg", "$@15", "relop", "rel_expr", "lex_ctxt", "arg_value",
2312 "aref_args", "arg_rhs", "paren_args", "opt_paren_args", "opt_call_args",
2313 "call_args", "command_args", "$@16", "block_arg", "opt_block_arg",
2314 "args", "mrhs_arg", "mrhs", "primary", "$@17", "$@18", "$@19", "$@20",
2315 "@21", "@22", "$@23", "$@24", "$@25", "primary_value", "k_begin", "k_if",
2316 "k_unless", "k_while", "k_until", "k_case", "k_for", "k_class",
2317 "k_module", "k_def", "k_do", "k_do_block", "k_rescue", "k_ensure",
2318 "k_when", "k_else", "k_elsif", "k_end", "k_return", "then", "do",
2319 "if_tail", "opt_else", "for_var", "f_marg", "f_marg_list", "f_margs",
2320 "f_rest_marg", "f_any_kwrest", "block_args_tail", "opt_block_args_tail",
2321 "excessed_comma", "block_param", "opt_block_param", "block_param_def",
2322 "opt_bv_decl", "bv_decls", "bvar", "lambda", "@26", "@27", "@28", "$@29",
2323 "f_larglist", "lambda_body", "do_block", "block_call", "method_call",
2324 "brace_block", "brace_body", "@30", "@31", "@32", "do_body", "@33",
2325 "@34", "@35", "case_args", "case_body", "cases", "p_case_body", "@36",
2326 "@37", "$@38", "p_cases", "p_top_expr", "p_top_expr_body", "p_expr",
2327 "p_as", "p_alt", "p_lparen", "p_lbracket", "p_expr_basic", "@39", "@40",
2328 "p_args", "p_args_head", "p_args_tail", "p_find", "p_rest",
2329 "p_args_post", "p_arg", "p_kwargs", "p_kwarg", "p_kw", "p_kw_label",
2330 "p_kwrest", "p_kwnorest", "p_any_kwrest", "p_value", "p_primitive",
2331 "p_variable", "p_var_ref", "p_const", "opt_rescue", "exc_list",
2332 "exc_var", "opt_ensure", "literal", "strings", "string", "string1",
2333 "xstring", "regexp", "words", "word_list", "word", "symbols",
2334 "symbol_list", "qwords", "qsymbols", "qword_list", "qsym_list",
2335 "string_contents", "xstring_contents", "regexp_contents",
2336 "string_content", "@41", "$@42", "@43", "@44", "@45", "@46",
2337 "string_dvar", "symbol", "ssym", "sym", "dsym", "numeric",
2338 "simple_numeric", "user_variable", "keyword_variable", "var_ref",
2339 "var_lhs", "backref", "superclass", "$@47", "f_opt_paren_args",
2340 "f_paren_args", "f_arglist", "@48", "args_tail", "opt_args_tail",
2341 "f_args", "args_forward", "f_bad_arg", "f_norm_arg", "f_arg_asgn",
2342 "f_arg_item", "f_arg", "f_label", "f_kw", "f_block_kw", "f_block_kwarg",
2343 "f_kwarg", "kwrest_mark", "f_no_kwarg", "f_kwrest", "f_opt",
2344 "f_block_opt", "f_block_optarg", "f_optarg", "restarg_mark",
2345 "f_rest_arg", "blkarg_mark", "f_block_arg", "opt_f_block_arg",
2346 "singleton", "$@49", "assoc_list", "assocs", "assoc", "operation",
2347 "operation2", "operation3", "dot_or_colon", "call_op", "call_op2",
2348 "opt_terms", "opt_nl", "rparen", "rbracket", "rbrace", "trailer", "term",
2349 "terms", "none", YY_NULLPTR
2350};
2351
2352static const char *
2353yysymbol_name (yysymbol_kind_t yysymbol)
2354{
2355 return yytname[yysymbol];
2356}
2357#endif
2358
2359#define YYPACT_NINF (-1080)
2360
2361#define yypact_value_is_default(Yyn) \
2362 ((Yyn) == YYPACT_NINF)
2363
2364#define YYTABLE_NINF (-774)
2365
2366#define yytable_value_is_error(Yyn) \
2367 ((Yyn) == YYTABLE_NINF)
2368
2369/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
2370 STATE-NUM. */
2371static const yytype_int16 yypact[] =
2372{
2373 -1080, 155, 4053, -1080, 9649, -1080, -1080, -1080, 9107, -1080,
2374 -1080, -1080, -1080, -1080, -1080, -1080, 9775, 9775, -1080, -1080,
2375 -1080, 5567, 5126, -1080, -1080, -1080, -1080, 353, 8962, 127,
2376 41, 83, -1080, -1080, -1080, 4391, 5273, -1080, -1080, 4538,
2377 -1080, -1080, -1080, -1080, -1080, -1080, -1080, -1080, 11539, 11539,
2378 11539, 11539, 112, 7162, 9901, 10405, 10783, 9391, -1080, 8817,
2379 -1080, -1080, -1080, 164, 217, 257, 289, 1108, 11665, 11539,
2380 -1080, 512, -1080, 1512, -1080, 728, 227, 227, -1080, -1080,
2381 66, 425, 347, -1080, 341, 11917, -1080, 377, 2218, 632,
2382 499, 745, -1080, 11791, 11791, -1080, -1080, 8144, 12039, 12161,
2383 12283, 8671, 9775, -1080, 444, 81, -1080, -1080, 491, -1080,
2384 -1080, -1080, -1080, -1080, -1080, -1080, -1080, -1080, -1080, -1080,
2385 -1080, 316, 445, -1080, 558, 451, -1080, -1080, -1080, -1080,
2386 -1080, -1080, -1080, -1080, -1080, -1080, -1080, -1080, -1080, -1080,
2387 -1080, -1080, -1080, -1080, -1080, -1080, -1080, -1080, -1080, -1080,
2388 -1080, -1080, -1080, -1080, -1080, -1080, -1080, -1080, -1080, -1080,
2389 -1080, -1080, -1080, -1080, -1080, -1080, -1080, -1080, -1080, -1080,
2390 -1080, -1080, -1080, -1080, -1080, -1080, -1080, -1080, -1080, -1080,
2391 -1080, -1080, -1080, -1080, -1080, -1080, -1080, -1080, -1080, -1080,
2392 -1080, -1080, -1080, -1080, -1080, -1080, -1080, -1080, -1080, -1080,
2393 -1080, -1080, -1080, -1080, -1080, 520, -1080, -1080, -1080, 539,
2394 11539, 642, 7313, 11539, 11539, 11539, -1080, 11539, -1080, 586,
2395 4957, 617, -1080, -1080, 597, 770, 30, 31, 647, 350,
2396 611, -1080, -1080, 8018, -1080, 9775, 10027, -1080, -1080, 8270,
2397 -1080, 11791, 613, -1080, 619, 7464, -1080, 7615, -1080, -1080,
2398 631, 633, 66, -1080, 788, -1080, 755, 5104, 5104, 453,
2399 9901, -1080, 7162, 654, 512, -1080, 1512, 127, 694, -1080,
2400 1512, 127, 690, 244, 708, -1080, 617, 706, 708, -1080,
2401 127, 778, 1108, 12405, 704, 704, 709, -1080, 827, 900,
2402 926, 932, -1080, -1080, -1080, -1080, -1080, 61, -1080, 400,
2403 629, 509, -1080, -1080, -1080, -1080, 781, -1080, -1080, -1080,
2404 -1080, -1080, -1080, -1080, 8396, 11791, 11791, 11791, 11791, 9901,
2405 11791, 11791, 1279, 737, 754, 6306, 1694, -1080, 765, 6306,
2406 -1080, -1080, -1080, 791, -1080, -1080, -1080, -1080, -1080, 834,
2407 -1080, 7162, 9520, 768, 834, -1080, 11539, 11539, 11539, 11539,
2408 11539, -1080, -1080, 11539, 11539, 11539, 11539, 11539, 11539, 11539,
2409 11539, -1080, 11539, -1080, -1080, 11539, 11539, 11539, 11539, 11539,
2410 11539, 11539, 11539, 11539, 11539, -1080, -1080, 12835, 9775, 12925,
2411 6306, 728, 96, 96, 7766, 11791, 7766, 512, -1080, 775,
2412 880, -1080, -1080, 956, 929, 90, 93, 106, 726, 861,
2413 11791, 473, -1080, 826, 990, -1080, -1080, -1080, -1080, 45,
2414 64, 382, 465, 493, 514, 537, 545, 573, -1080, -1080,
2415 -1080, -1080, 637, -1080, -1080, -1080, 14185, -1080, -1080, 834,
2416 834, -1080, -1080, 362, -1080, -1080, -1080, 751, 834, 11539,
2417 10153, -1080, -1080, 13015, 9775, 13105, 834, 834, 10531, -1080,
2418 127, 814, -1080, -1080, 11539, 127, -1080, 820, 127, 832,
2419 -1080, 137, -1080, -1080, -1080, -1080, -1080, 9107, -1080, 11539,
2420 845, 847, 13015, 13105, 834, 1512, 41, 127, -1080, -1080,
2421 8522, 852, 127, -1080, -1080, 10657, -1080, -1080, 10783, -1080,
2422 -1080, -1080, 619, 995, -1080, -1080, 865, -1080, 12405, 13195,
2423 9775, 13285, -1080, -1080, -1080, -1080, -1080, -1080, -1080, -1080,
2424 -1080, -1080, -1080, 743, 110, 946, 191, 11539, -1080, -1080,
2425 -1080, -1080, -1080, -1080, -1080, -1080, -1080, -1080, -1080, -1080,
2426 -1080, -1080, -1080, -1080, -1080, 1307, -1080, -1080, -1080, -1080,
2427 -1080, 868, -1080, 127, 127, -1080, -1080, 867, -1080, 881,
2428 11539, -1080, 888, 391, -1080, -1080, -1080, 890, 989, 896,
2429 999, -1080, 11539, 1037, 1046, 512, 909, 11539, 1037, 917,
2430 -1080, -1080, -1080, 1037, -1080, 1037, -1080, 10909, -1080, 127,
2431 12405, 923, -1080, 10909, -1080, 755, 3708, 3708, 3708, 3708,
2432 5251, 2121, 3708, 3708, 5104, 5104, 592, 592, -1080, 5689,
2433 1165, 1165, 1456, 447, 447, 755, 755, 755, 1451, 1451,
2434 5714, 4685, 6008, 4832, -1080, 633, -1080, 127, 924, 489,
2435 -1080, 623, -1080, -1080, 5420, 1037, -1080, 6457, 1062, 6910,
2436 1037, 38, 1037, 1053, 1066, 118, 13375, 9775, 13465, -1080,
2437 728, -1080, 995, -1080, -1080, -1080, 13555, 9775, 13645, 6306,
2438 11791, -1080, -1080, -1080, -1080, -1080, 3013, 11665, 11665, 9107,
2439 11539, 11539, -1080, 11539, 617, -1080, 611, 4239, 4979, 127,
2440 481, 648, 11539, 11539, -1080, -1080, -1080, -1080, 10279, -1080,
2441 10531, -1080, -1080, 11791, 4957, -1080, -1080, 633, 633, 11539,
2442 -1080, 285, -1080, -1080, 708, 12405, 865, 280, 763, 127,
2443 587, 672, 1622, -1080, 953, -1080, 296, -1080, 938, -1080,
2444 -1080, 299, 941, -1080, 755, 1307, 930, -1080, 951, 127,
2445 952, -1080, 37, -1080, -1080, -1080, -1080, 11539, 1279, -1080,
2446 -1080, 630, -1080, -1080, -1080, 1694, -1080, -1080, 1440, -1080,
2447 -1080, 4516, -1080, -1080, -1080, 11035, 583, -1080, -1080, 1694,
2448 4663, -1080, -1080, -1080, 940, -1080, -1080, -1080, 11539, -1080,
2449 957, 958, 1058, -1080, -1080, 865, 12405, -1080, -1080, 1065,
2450 980, 4369, -1080, -1080, -1080, 1089, 656, 2593, 2593, 987,
2451 834, 834, -1080, 791, 967, 646, 10153, 834, 834, -1080,
2452 -1080, 791, -1080, -1080, 862, -1080, 1104, -1080, -1080, -1080,
2453 -1080, -1080, -1080, 1066, 1037, -1080, 11161, 1037, 87, 284,
2454 127, 133, 156, 7766, 512, 11791, 6306, 1085, 763, -1080,
2455 127, 1037, 137, 9252, 81, 425, -1080, 4810, -1080, -1080,
2456 -1080, -1080, -1080, -1080, -1080, 834, 834, 661, 834, 834,
2457 127, 977, 137, -1080, -1080, -1080, 684, 1694, -1080, -1080,
2458 -1080, -1080, -1080, -1080, -1080, -1080, -1080, -1080, -1080, -1080,
2459 -1080, 127, -1080, 1307, -1080, 1392, -1080, -1080, -1080, 127,
2460 -1080, 979, 984, -1080, 1074, 868, 992, -1080, 996, -1080,
2461 992, 11539, 957, -1080, 1033, -1080, -1080, -1080, 7766, -1080,
2462 -1080, -1080, 11539, 1005, -1080, 1005, 998, 11287, 9901, 865,
2463 9901, 834, 11539, 13735, 9775, 13825, -1080, -1080, 2007, 2007,
2464 568, -1080, 3718, 470, 1096, -1080, 1041, -1080, 1014, -1080,
2465 -1080, 800, -1080, -1080, 231, -1080, -1080, -1080, -1080, -1080,
2466 -1080, -1080, -1080, -1080, 1041, 11539, 11665, 11665, -1080, -1080,
2467 834, 11665, 11665, -1080, -1080, 7766, 11791, 1037, -1080, -1080,
2468 1037, -1080, -1080, 1037, -1080, 11539, -1080, 67, -1080, 179,
2469 1037, 6306, 512, 1037, -1080, -1080, -1080, -1080, -1080, -1080,
2470 11539, 11539, 834, 11539, 11539, -1080, 10531, -1080, 127, 170,
2471 -1080, -1080, -1080, 1003, 1009, -1080, 1694, -1080, 1440, -1080,
2472 -1080, 1440, -1080, 1440, -1080, -1080, 4957, 12527, 96, -1080,
2473 -1080, 7036, 4957, 1808, 7615, -1080, -1080, 6306, 11539, 1010,
2474 -1080, -1080, 11665, 4957, 5861, 6155, 127, 679, 725, -1080,
2475 -1080, -1080, -1080, 2593, 1107, 165, 127, 12682, -1080, 127,
2476 1017, 1018, -1080, 387, 1029, -1080, -1080, 1124, -1080, 2593,
2477 2007, 2007, 568, 180, 526, 3895, 3895, -1080, 4957, -1080,
2478 -1080, -1080, -1080, 11665, -1080, -1080, -1080, -1080, -1080, 96,
2479 -1080, -1080, 3895, -1080, -1080, 11413, 6608, -1080, 1037, -1080,
2480 -1080, 11539, 1038, 1027, 6306, 7615, -1080, -1080, 1392, 1392,
2481 992, 1054, 992, 992, 1143, -1080, 1093, 103, 132, 173,
2482 6306, 1192, 868, -1080, 127, 1072, 1079, 1071, 12649, -1080,
2483 1076, -1080, 1077, 1080, -1080, -1080, -1080, 1081, 727, 62,
2484 -1080, -1080, 73, 1041, 1083, -1080, 2593, -1080, -1080, -1080,
2485 127, 1094, -1080, 2593, -1080, -1080, -1080, 639, -1080, -1080,
2486 -1080, -1080, -1080, -1080, -1080, -1080, -1080, 127, 127, 127,
2487 127, 127, 127, -1080, -1080, 6457, 96, 901, 243, -1080,
2488 -1080, -1080, 11539, -1080, 720, -1080, -1080, 1317, 1037, 1064,
2489 7892, 1009, -1080, 1440, -1080, -1080, -1080, 183, 13915, 9775,
2490 14005, 1046, -1080, -1080, 1116, -1080, 12649, 1694, -1080, -1080,
2491 1155, 1148, 630, -1080, 1694, -1080, 1440, -1080, -1080, 1103,
2492 2593, -1080, 1110, -1080, 415, -1080, 387, 1041, -1080, -1080,
2493 816, -1080, -1080, -1080, -1080, -1080, -1080, 862, -1080, 11791,
2494 11791, 12768, -1080, -1080, -1080, -1080, -1080, 767, -1080, -1080,
2495 -1080, -1080, 1092, 992, 77, 89, 127, 198, 210, -1080,
2496 -1080, 1148, -1080, 1112, 1118, -1080, 14095, -1080, 868, 1120,
2497 -1080, 1121, 1120, 2593, 1122, 12768, -1080, -1080, -1080, -1080,
2498 6759, -1080, -1080, -1080, 1126, 1317, -1080, -1080, -1080, 221,
2499 1694, -1080, 1440, -1080, 1102, 1105, -1080, 1440, -1080, 1440,
2500 -1080, -1080, 1122, 2593, -1080, -1080, 370, 2593, -1080, 1120,
2501 1127, 1120, 1120, -1080, -1080, -1080, 1122, -1080, 1440, -1080,
2502 -1080, -1080, 1120, -1080
2503};
2504
2505/* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
2506 Performed when YYTABLE does not specify something else to do. Zero
2507 means the default is an error. */
2508static const yytype_int16 yydefact[] =
2509{
2510 2, 0, 0, 1, 0, 371, 372, 373, 0, 364,
2511 365, 366, 369, 367, 368, 370, 359, 360, 361, 362,
2512 382, 293, 293, 647, 646, 648, 649, 761, 0, 761,
2513 0, 0, 651, 650, 652, 743, 745, 643, 642, 744,
2514 645, 637, 638, 639, 640, 588, 657, 658, 0, 0,
2515 0, 0, 0, 0, 320, 773, 773, 103, 439, 608,
2516 608, 610, 612, 0, 0, 0, 0, 0, 0, 0,
2517 3, 759, 6, 9, 35, 40, 668, 668, 52, 75,
2518 293, 74, 0, 91, 0, 95, 105, 0, 65, 243,
2519 262, 0, 318, 0, 0, 71, 71, 759, 0, 0,
2520 0, 0, 329, 340, 76, 338, 307, 308, 587, 589,
2521 309, 310, 311, 313, 312, 314, 586, 627, 628, 585,
2522 635, 653, 654, 315, 0, 316, 79, 5, 8, 184,
2523 195, 185, 208, 181, 201, 191, 190, 211, 212, 206,
2524 189, 188, 183, 209, 213, 214, 193, 182, 196, 200,
2525 202, 194, 187, 203, 210, 205, 204, 197, 207, 192,
2526 180, 199, 198, 179, 186, 177, 178, 174, 175, 176,
2527 134, 136, 135, 169, 170, 165, 147, 148, 149, 156,
2528 153, 155, 150, 151, 171, 172, 157, 158, 162, 166,
2529 152, 154, 144, 145, 146, 159, 160, 161, 163, 164,
2530 167, 168, 173, 139, 141, 28, 137, 138, 140, 0,
2531 0, 0, 0, 0, 0, 0, 608, 0, 288, 0,
2532 271, 298, 89, 292, 773, 0, 653, 654, 0, 316,
2533 773, 737, 90, 761, 87, 0, 773, 459, 86, 761,
2534 762, 0, 0, 23, 255, 0, 10, 0, 359, 360,
2535 332, 460, 0, 237, 0, 329, 238, 228, 229, 326,
2536 0, 21, 0, 0, 759, 17, 20, 761, 93, 16,
2537 322, 761, 0, 766, 766, 272, 0, 0, 766, 735,
2538 761, 0, 0, 0, 668, 668, 101, 363, 0, 111,
2539 112, 119, 440, 632, 631, 633, 630, 0, 629, 0,
2540 0, 0, 595, 604, 600, 606, 636, 56, 249, 250,
2541 769, 770, 4, 771, 760, 0, 0, 0, 0, 0,
2542 0, 0, 690, 0, 667, 0, 690, 663, 0, 0,
2543 374, 464, 453, 80, 468, 337, 375, 468, 449, 773,
2544 107, 0, 99, 96, 773, 61, 0, 0, 0, 0,
2545 0, 265, 266, 0, 0, 0, 0, 226, 227, 0,
2546 0, 57, 0, 263, 264, 0, 0, 0, 0, 0,
2547 0, 0, 0, 0, 0, 755, 756, 0, 773, 0,
2548 0, 70, 0, 0, 0, 0, 0, 759, 347, 760,
2549 0, 393, 392, 0, 0, 653, 654, 316, 129, 130,
2550 0, 0, 132, 661, 0, 653, 654, 316, 355, 204,
2551 197, 207, 192, 174, 175, 176, 134, 135, 733, 67,
2552 66, 732, 0, 88, 758, 757, 0, 339, 590, 773,
2553 773, 142, 740, 326, 299, 742, 295, 0, 773, 0,
2554 0, 289, 297, 0, 773, 0, 773, 773, 0, 290,
2555 761, 0, 331, 294, 691, 761, 284, 773, 761, 773,
2556 283, 761, 336, 55, 25, 27, 26, 0, 333, 0,
2557 0, 0, 0, 0, 773, 19, 0, 761, 324, 15,
2558 760, 92, 761, 321, 327, 768, 767, 273, 768, 275,
2559 328, 736, 0, 118, 636, 109, 104, 667, 0, 0,
2560 773, 0, 441, 614, 634, 617, 615, 609, 591, 592,
2561 611, 593, 613, 0, 0, 0, 0, 0, 772, 7,
2562 29, 30, 31, 32, 33, 53, 54, 697, 694, 693,
2563 692, 695, 703, 712, 691, 0, 724, 713, 728, 727,
2564 723, 773, 689, 761, 761, 696, 698, 699, 701, 675,
2565 705, 710, 773, 716, 406, 405, 721, 675, 726, 675,
2566 0, 673, 0, 0, 773, 0, 675, 0, 0, 0,
2567 465, 464, 81, 0, 469, 0, 269, 0, 270, 761,
2568 0, 97, 108, 0, 62, 235, 242, 244, 245, 246,
2569 253, 254, 247, 248, 224, 225, 251, 252, 58, 761,
2570 239, 240, 241, 230, 231, 232, 233, 234, 267, 268,
2571 746, 748, 747, 749, 458, 293, 456, 761, 773, 746,
2572 748, 747, 749, 457, 293, 0, 384, 0, 383, 0,
2573 0, 0, 0, 345, 0, 326, 0, 773, 0, 71,
2574 353, 129, 130, 131, 659, 351, 0, 773, 0, 0,
2575 0, 753, 754, 68, 746, 747, 293, 0, 0, 0,
2576 0, 0, 739, 0, 300, 296, 773, 746, 747, 761,
2577 746, 747, 0, 0, 738, 330, 763, 278, 285, 280,
2578 287, 335, 24, 0, 256, 11, 34, 0, 773, 0,
2579 22, 94, 18, 323, 766, 0, 102, 750, 117, 761,
2580 746, 747, 690, 618, 0, 594, 0, 597, 0, 602,
2581 599, 0, 0, 603, 236, 0, 404, 396, 398, 761,
2582 401, 394, 0, 672, 731, 664, 666, 0, 0, 682,
2583 704, 0, 671, 714, 715, 0, 685, 725, 0, 687,
2584 729, 258, 381, 357, 376, 773, 773, 577, 669, 0,
2585 260, 358, 462, 466, 0, 463, 470, 448, 0, 36,
2586 303, 0, 39, 302, 106, 100, 0, 51, 41, 49,
2587 0, 276, 298, 215, 37, 0, 316, 0, 0, 0,
2588 773, 773, 455, 84, 0, 461, 285, 773, 773, 282,
2589 454, 82, 281, 319, 773, 385, 773, 343, 387, 72,
2590 386, 344, 479, 0, 0, 378, 0, 0, 750, 325,
2591 761, 746, 747, 0, 0, 0, 0, 129, 130, 133,
2592 761, 0, 761, 0, 450, 77, 42, 276, 216, 48,
2593 223, 143, 741, 301, 291, 773, 773, 461, 773, 773,
2594 761, 773, 761, 222, 274, 110, 461, 690, 442, 445,
2595 619, 623, 624, 625, 616, 626, 596, 598, 605, 601,
2596 607, 761, 403, 0, 700, 0, 730, 717, 674, 761,
2597 702, 675, 675, 711, 716, 773, 675, 722, 675, 699,
2598 675, 0, 578, 579, 773, 580, 377, 379, 0, 12,
2599 14, 584, 0, 773, 78, 773, 306, 0, 0, 98,
2600 0, 773, 0, 0, 773, 0, 571, 575, 0, 0,
2601 0, 516, 761, 513, 0, 570, 63, 494, 496, 498,
2602 501, 551, 556, 557, 558, 561, 562, 563, 564, 565,
2603 567, 566, 568, 569, 59, 0, 0, 0, 85, 764,
2604 773, 0, 0, 83, 380, 0, 0, 0, 388, 390,
2605 0, 73, 480, 0, 349, 0, 472, 0, 348, 461,
2606 0, 0, 0, 0, 461, 356, 734, 69, 451, 452,
2607 0, 0, 773, 0, 0, 279, 286, 334, 761, 0,
2608 620, 395, 397, 399, 402, 665, 0, 678, 0, 680,
2609 670, 0, 686, 0, 683, 688, 259, 0, 0, 582,
2610 583, 0, 261, 761, 0, 430, 429, 0, 0, 304,
2611 38, 50, 0, 277, 746, 747, 761, 746, 747, 559,
2612 560, 130, 573, 0, 532, 518, 761, 519, 525, 761,
2613 528, 0, 512, 0, 0, 515, 572, 0, 64, 0,
2614 554, 555, 0, 500, 499, 0, 0, 60, 257, 47,
2615 220, 46, 221, 0, 44, 218, 45, 219, 391, 0,
2616 341, 342, 0, 346, 473, 0, 0, 350, 0, 660,
2617 352, 0, 0, 433, 0, 0, 443, 621, 0, 0,
2618 675, 675, 675, 675, 0, 581, 0, 653, 654, 316,
2619 0, 773, 773, 428, 761, 0, 699, 412, 707, 708,
2620 773, 719, 412, 412, 410, 467, 471, 305, 461, 761,
2621 531, 510, 523, 535, 520, 511, 0, 526, 544, 608,
2622 761, 537, 540, 543, 549, 550, 539, 547, 765, 495,
2623 497, 552, 553, 574, 509, 505, 608, 761, 761, 761,
2624 761, 761, 761, 43, 217, 0, 0, 485, 488, 492,
2625 491, 493, 0, 474, 773, 354, 444, 0, 0, 0,
2626 0, 400, 679, 0, 676, 681, 684, 326, 0, 773,
2627 0, 773, 13, 409, 0, 431, 0, 413, 421, 419,
2628 0, 706, 0, 408, 0, 424, 0, 426, 517, 521,
2629 0, 527, 529, 533, 0, 514, 538, 542, 548, 546,
2630 0, 502, 503, 504, 506, 507, 508, 773, 481, 0,
2631 0, 489, 475, 477, 478, 476, 437, 761, 435, 438,
2632 447, 446, 0, 675, 750, 325, 761, 746, 747, 576,
2633 432, 718, 411, 412, 412, 326, 0, 709, 773, 412,
2634 720, 412, 412, 0, 524, 0, 545, 541, 536, 389,
2635 0, 486, 487, 490, 528, 0, 434, 622, 677, 461,
2636 0, 416, 0, 418, 750, 325, 407, 0, 425, 0,
2637 422, 427, 522, 0, 530, 534, 773, 0, 436, 412,
2638 412, 412, 412, 483, 484, 482, 529, 417, 0, 414,
2639 420, 423, 412, 415
2640};
2641
2642/* YYPGOTO[NTERM-NUM]. */
2643static const yytype_int16 yypgoto[] =
2644{
2645 -1080, -1080, -1080, 1025, -1080, 23, 748, -318, -1080, -40,
2646 -1080, 774, -1080, 69, -1080, 295, -537, -44, -1080, -1080,
2647 -1080, -1080, -1080, -1080, 455, -42, -24, -1080, 42, -88,
2648 -1080, -1080, -20, -1080, -298, 1078, 15, 1176, -140, 36,
2649 -62, -1080, -428, -27, 2306, -384, 1179, -55, -23, -1080,
2650 -1080, 13, -1080, 3243, -1080, 1187, -1080, 602, 2959, -1080,
2651 671, 44, 624, -350, 189, 25, -1080, -277, -191, 71,
2652 -1080, -514, 49, -1080, -1080, -1080, -1080, -1080, -1080, -1080,
2653 -1080, -1080, 877, -1080, -1080, -1080, -1080, -1080, -1080, -1080,
2654 -1080, -1080, -1080, -1080, -1080, -1080, -1080, -1080, 540, -1080,
2655 -440, 1527, -376, -1080, 78, -784, -1080, -804, -786, 574,
2656 428, -714, 291, 194, -1080, -1080, 397, -1080, -795, -1080,
2657 40, 242, -1080, -1080, -1080, -1080, -1080, -1080, 480, -1080,
2658 -1080, -104, 735, -1080, -1080, -1080, 971, -1080, -1080, -1080,
2659 -1080, -767, -1080, 33, -1080, -1080, -1080, -1080, -1080, -1080,
2660 -343, -1080, -1080, -1080, -1080, 271, -1080, -1080, -945, -1080,
2661 250, -217, -1051, -1079, -743, -118, -1080, 119, -1080, -1080,
2662 -1080, 120, -1080, -721, 281, -1080, -1080, 149, -1080, -1080,
2663 233, 443, 759, -1080, 1214, 1373, 1700, 1769, -1080, 811,
2664 2085, -1080, 2192, 2445, -1080, -1080, -57, -1080, -1080, -147,
2665 -1080, -1080, -1080, -1080, -1080, -1080, -1080, 1, -1080, -1080,
2666 -1080, -1080, 0, 2191, -2, 1226, 2488, 1900, -1080, -1080,
2667 1253, 666, 9, -1080, -304, -464, -289, -268, -1053, -394,
2668 -245, -646, -203, -461, 601, 157, -1080, -1080, -691, -1080,
2669 -705, -700, -991, 168, -549, -1080, -584, -1080, -476, -527,
2670 -1080, -1080, -1080, 161, -410, -1080, -335, -1080, -1080, -85,
2671 -1080, -52, -13, 968, -532, 222, -254, -37, -3, 8
2672};
2673
2674/* YYDEFGOTO[NTERM-NUM]. */
2675static const yytype_int16 yydefgoto[] =
2676{
2677 0, 1, 2, 70, 71, 72, 246, 563, 1001, 564,
2678 264, 265, 476, 266, 467, 74, 768, 75, 598, 778,
2679 1047, 584, 777, 1038, 419, 76, 77, 823, 382, 384,
2680 385, 951, 78, 79, 572, 252, 81, 82, 267, 83,
2681 84, 85, 496, 86, 219, 402, 403, 203, 204, 205,
2682 659, 613, 207, 88, 469, 373, 89, 577, 221, 272,
2683 773, 614, 790, 455, 456, 234, 235, 223, 441, 618,
2684 762, 763, 90, 380, 271, 482, 683, 803, 634, 816,
2685 814, 649, 254, 92, 93, 94, 95, 96, 97, 98,
2686 99, 100, 101, 334, 337, 745, 888, 806, 945, 946,
2687 743, 255, 627, 799, 947, 948, 394, 717, 718, 719,
2688 720, 541, 1232, 1178, 1179, 1094, 1004, 1005, 1072, 1217,
2689 1218, 103, 292, 502, 702, 979, 848, 1076, 338, 104,
2690 105, 335, 569, 570, 753, 893, 573, 574, 756, 895,
2691 957, 807, 1215, 804, 952, 1062, 1250, 1285, 1146, 1147,
2692 1113, 917, 918, 1045, 1046, 919, 1033, 1023, 1026, 1027,
2693 1028, 1029, 1030, 1192, 1031, 1120, 1121, 1122, 1123, 1124,
2694 1125, 1126, 920, 921, 922, 923, 924, 746, 884, 998,
2695 890, 106, 107, 108, 109, 110, 111, 112, 513, 706,
2696 113, 515, 114, 115, 514, 516, 297, 300, 301, 507,
2697 704, 703, 850, 980, 1077, 1160, 854, 116, 117, 298,
2698 118, 119, 120, 226, 227, 123, 228, 229, 645, 815,
2699 323, 324, 325, 326, 868, 729, 543, 458, 545, 546,
2700 879, 548, 566, 550, 551, 1099, 1100, 552, 553, 554,
2701 555, 556, 1101, 1102, 557, 558, 559, 560, 561, 723,
2702 422, 650, 277, 459, 231, 126, 687, 616, 653, 648,
2703 426, 312, 451, 452, 785, 1035, 487, 628, 389, 269
2704};
2705
2706/* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
2707 positive, shift that token. If negative, reduce the rule whose
2708 number is the opposite. If YYTABLE_NINF, syntax error. */
2709static const yytype_int16 yytable[] =
2710{
2711 122, 427, 122, 299, 296, 243, 379, 629, 386, 208,
2712 127, 568, 950, 263, 241, 284, 244, 643, 542, 425,
2713 489, 206, 542, 343, 491, 732, 875, 128, 617, 208,
2714 286, 218, 218, 285, 313, 877, 953, 565, 674, 449,
2715 874, 206, 615, 284, 624, 388, 420, 238, 307, 381,
2716 381, 122, 122, 381, 544, 290, 284, 284, 284, 982,
2717 313, 285, 625, 275, 279, 798, 237, 306, 314, 774,
2718 696, 73, 206, 73, 285, 285, 285, 547, 674, 984,
2719 626, 547, 870, 290, 327, 327, 329, 224, 224, 268,
2720 -124, 656, 330, 736, 669, 739, 396, 406, 406, 406,
2721 1137, 1140, -126, 870, 1219, 333, 287, 330, 615, 626,
2722 624, 1244, -124, -647, 206, -120, -120, 218, -121, 549,
2723 826, 829, 477, 270, 332, 1189, 273, 503, 751, -655,
2724 -656, -128, -646, 755, 287, 757, 383, 837, 688, 387,
2725 445, 721, -647, -127, 872, -121, 538, 287, 287, 287,
2726 699, 878, 765, 510, 512, 3, -120, -121, -123, 437,
2727 1254, -646, 1037, 665, 1272, 872, 688, 846, 259, 473,
2728 539, 665, 263, 224, 320, 321, 708, 230, 230, 871,
2729 504, -125, 505, 506, 245, 793, -128, 1019, 1020, 310,
2730 797, 311, 801, 1240, 1274, 461, -127, 463, 1286, 1074,
2731 871, 579, 1219, 501, -122, 222, 232, 471, 1095, 331,
2732 122, -123, 479, 1065, 236, 240, 274, 278, 310, 1190,
2733 311, 495, 263, -125, 331, -746, 247, 313, -124, 709,
2734 -124, 883, 442, -115, -122, -746, -111, -747, 442, -112,
2735 -126, 284, -126, 122, 460, 122, 866, 310, 218, 311,
2736 218, 218, -119, 127, -120, 866, -120, 712, 122, 285,
2737 122, 480, 819, 230, -118, 1037, 1253, 492, 449, 1240,
2738 674, 381, 381, 381, 381, 982, 525, 526, 959, -114,
2739 240, 290, 494, -121, 1114, -121, 877, 810, 964, 1092,
2740 240, 423, 1161, 1075, 329, 237, 332, 820, 268, 1174,
2741 284, 263, -116, 688, 224, -115, 224, 457, 638, -126,
2742 713, -535, 122, 688, 73, 581, 302, 122, 285, 1131,
2743 1132, 721, 862, 122, -128, -113, -128, 122, 1042, 475,
2744 -761, 821, 287, 240, -127, 633, -127, 519, 899, 122,
2745 290, 381, 1127, 1037, 630, 870, 632, 578, 990, -123,
2746 313, -123, 578, -773, 1127, 1127, 640, 520, 521, 522,
2747 523, -125, 503, -125, 954, 503, 707, 958, 707, 303,
2748 1213, 1127, -122, 1193, -122, 322, 1043, 268, 122, 1044,
2749 1032, 965, 122, 73, 122, 887, 460, 1214, 524, 1211,
2750 485, 287, 622, 218, 230, 802, 230, 486, 542, 1049,
2751 1051, 665, 1081, 665, 1054, 1056, -115, 987, 989, 304,
2752 840, -92, 992, 849, 994, -655, 995, 505, 506, 1103,
2753 505, 506, 450, 623, 453, 733, -115, 631, -746, -115,
2754 -117, -106, -747, -115, 916, 934, 495, 578, 578, 622,
2755 844, 305, -120, 734, 682, 1118, 578, 1193, 856, 447,
2756 -648, 859, 460, 336, 578, 578, 284, 547, 622, 218,
2757 869, 474, -111, 1092, 533, 442, 503, 442, 208, 721,
2758 1092, 721, 1092, 339, 285, 834, -128, 1238, 122, -648,
2759 206, 503, 578, 547, 1108, 938, 622, 340, -127, 623,
2760 547, 874, 1283, 943, 1111, 537, 290, 1115, 963, 1119,
2761 1193, 239, 1275, 344, 547, 1127, 240, 1060, 460, 665,
2762 1061, 1134, 375, 1063, 622, 218, 1143, 623, 495, 508,
2763 1067, 505, 506, 1070, 346, 641, 1022, 1104, 748, 642,
2764 1275, 870, 876, -649, 1193, 880, 505, 506, 284, 1246,
2765 376, 424, 1098, 542, -656, 623, 1092, 287, 1092, 724,
2766 430, 813, 474, 1092, 1016, 1092, 285, 759, 978, 857,
2767 724, -651, -649, 769, 857, 1173, 674, -363, 615, 1025,
2768 624, -121, 747, 1183, 1092, 503, 511, -128, 290, -127,
2769 838, 1066, -650, 370, 371, 372, 779, 794, 787, 796,
2770 -651, -112, 886, 1234, 800, -363, -363, -119, 887, -118,
2771 1241, 666, 547, 60, 784, -652, 822, -123, 1204, 1205,
2772 1206, -650, -114, -641, -761, -123, 1162, 1164, 1165, 1166,
2773 641, 870, 1090, 240, 1021, 122, 442, 122, 1155, 287,
2774 505, 506, 792, 845, -652, -114, 831, 769, 769, 842,
2775 783, -644, -641, 1068, -363, 460, 694, 122, 761, 791,
2776 834, 622, 218, 284, 761, 460, 784, 429, 1133, 782,
2777 208, 622, 218, 310, 792, 311, 431, 464, 789, 346,
2778 -644, 285, 206, 1198, 442, -761, 1280, 465, 466, 240,
2779 1109, 825, 623, 1145, 721, 721, 784, 239, 532, 1106,
2780 905, 1199, 623, 290, 1259, 503, 792, -116, 433, 665,
2781 789, 1104, 1025, 1025, 495, 651, 866, 533, 1104, -113,
2782 1104, 1266, 438, -114, 351, 352, 1098, 439, 1220, 1148,
2783 968, 1098, 788, 1098, 284, 1098, 368, 369, 370, 371,
2784 372, 782, 789, -114, 652, 887, -114, 805, 537, 538,
2785 -114, 547, 285, 440, 287, 940, 446, 839, 509, -125,
2786 505, 506, -743, 885, 891, 430, 1158, 448, 1096, 1258,
2787 972, 363, 364, 539, 290, 320, 321, 468, 420, -116,
2788 1208, 381, -122, 960, -125, 933, 933, 961, 787, 233,
2789 1197, 236, -128, 1080, 1104, 1082, 1104, -122, 578, 578,
2790 1083, 1104, -113, 1104, -641, 578, 578, 784, -116, 1098,
2791 1097, 1098, 949, 478, 949, -123, 1098, 784, 1098, 503,
2792 -113, 122, 1104, 375, 122, 287, 761, 503, -116, 1226,
2793 -91, -116, -641, -641, 788, -116, 940, 1098, 1138, 1141,
2794 -113, -325, 346, -113, 493, 688, 206, -113, 375, 841,
2795 484, 376, 377, 578, 578, 1150, 578, 578, 1000, 442,
2796 490, -125, 322, -122, 488, 498, 375, 962, 517, -325,
2797 -325, 486, 705, 562, 505, 506, 376, 443, 1025, -743,
2798 508, -641, 505, 506, -743, 660, 944, 887, 767, 91,
2799 -662, 91, 503, 724, 376, 472, 122, -744, 1040, 1041,
2800 378, 567, 999, 225, 225, 375, 122, 571, 122, 784,
2801 1034, 1006, 381, 1006, 576, 1058, 933, 933, -325, 578,
2802 933, -747, 460, 1255, 582, 444, 769, 769, 622, 218,
2803 240, 769, 769, 376, 499, 1069, 518, 1139, 1142, -644,
2804 91, 91, 1096, 444, 288, 508, 635, 505, 506, 1096,
2805 1246, 1209, 1210, 122, 1151, 225, 583, 841, 578, 623,
2806 497, 497, 767, 767, 639, 284, 644, -644, -644, 122,
2807 1223, 1091, 288, 676, 1105, 1073, 678, 1010, -653, 1011,
2808 225, 225, 500, 285, 225, 393, 404, 404, 680, 225,
2809 578, 1239, 527, 1242, 528, 529, 530, 531, 1059, 685,
2810 1073, 686, 769, 727, -654, 1088, -653, -653, -106, 122,
2811 -316, 1170, 122, 784, -744, 122, -644, 851, 852, -744,
2812 853, 695, 503, 784, 722, 1096, 784, 46, 47, 915,
2813 915, 933, -654, -654, 375, 933, 1154, 728, -316, -316,
2814 784, 657, 658, 769, 731, 1159, 735, 933, 933, 933,
2815 661, 737, 738, 933, 933, -653, 287, 742, 672, 673,
2816 1171, 740, 376, 636, 744, 749, 284, 1279, 375, 1281,
2817 933, 752, 1194, -326, 122, 710, 1282, 505, 506, 766,
2818 786, -654, 122, 122, 285, 795, 689, -316, 802, 1200,
2819 80, 1073, 80, 805, 894, 1292, 376, 646, 122, 91,
2820 858, -326, -326, 860, 80, 80, 406, 863, 865, 891,
2821 724, 637, 898, -298, 897, 1207, 901, 1034, 724, 900,
2822 225, -750, 225, 225, 933, 935, 225, 939, 225, 887,
2823 1222, 933, 91, 976, 91, 986, 734, 784, 784, 784,
2824 988, 80, 80, 997, 284, 647, 1003, 91, 991, 91,
2825 -326, 1037, 993, 122, -299, 1039, 80, 287, 1036, 1078,
2826 915, 915, 285, -750, 915, 1079, -300, 375, 122, 1110,
2827 288, 375, 949, 1116, 1117, 381, 381, 41, 42, 43,
2828 44, 80, 80, 1128, 406, 80, 906, 460, 1157, 747,
2829 80, -750, -750, 622, 218, 376, 903, 1156, 933, 376,
2830 1168, 91, 225, 225, 225, 225, 91, 225, 225, 1167,
2831 1163, 886, 91, 1175, 1256, 1176, 91, 462, 1221, 933,
2832 1276, 1235, 1257, 784, 623, 949, 375, 1177, 91, 288,
2833 925, 925, 1182, 1184, 690, 287, 1186, -301, -750, 1191,
2834 -750, 767, 767, -746, 904, 481, 767, 767, 1169, 483,
2835 1196, 933, 346, 933, 376, 1236, 724, 1230, 122, 1243,
2836 -746, 1251, 1252, -747, 692, 225, 1245, 91, 1260, 359,
2837 360, 91, 225, 91, 1262, 915, 1267, 1269, 1273, 915,
2838 470, 933, 1277, 1288, 391, 933, 374, 225, 967, 408,
2839 824, 915, 915, 915, 949, 1249, 889, 915, 915, 861,
2840 80, 983, 1007, 647, 1093, 1278, 1185, 1187, 367, 368,
2841 369, 370, 371, 372, 915, 969, 754, 767, 575, 1284,
2842 1130, 80, 1149, 80, 80, 1247, 1248, 80, 1129, 80,
2843 1229, 225, 428, 80, 1172, 80, 711, 421, 828, 830,
2844 328, 527, 873, 528, 529, 530, 531, 532, 80, 1237,
2845 80, 0, 1195, 828, 830, 1233, 0, 0, 767, 0,
2846 0, 925, 925, 0, 0, 925, 533, 91, 915, 527,
2847 843, 528, 529, 530, 531, 915, 0, 0, 0, 1216,
2848 534, 528, 529, 530, 531, 288, 0, 225, 0, 0,
2849 535, 0, 936, 937, 0, 0, 536, 537, 538, 941,
2850 942, 0, 80, 80, 80, 80, 80, 80, 80, 80,
2851 0, 0, 0, 80, 0, 0, 0, 80, 715, 0,
2852 0, 0, 539, 0, 716, 540, 0, 0, 675, 80,
2853 0, 0, 0, 677, 0, 0, 679, 1261, 1263, 681,
2854 0, 0, 915, 1268, 0, 1270, 1271, 970, 971, 0,
2855 973, 974, 0, 0, 527, 691, 528, 529, 530, 531,
2856 693, 0, 0, 915, 225, 0, 80, 288, 80, 0,
2857 775, 0, 80, 80, 80, 0, 925, 0, 0, 0,
2858 925, 0, 0, 1287, 1289, 1290, 1291, 0, 80, 0,
2859 0, 0, 925, 925, 925, 915, 1293, 915, 925, 925,
2860 0, 0, 527, 715, 528, 529, 530, 531, 532, 0,
2861 0, 0, 0, 1012, 91, 925, 91, 0, 0, 0,
2862 0, 725, 726, 0, 225, 915, 0, 533, 0, 915,
2863 0, 0, 80, 0, 225, 0, 91, 225, 346, 102,
2864 0, 102, 0, 346, 775, 775, 926, 926, 0, 0,
2865 0, 535, 1053, 102, 102, 359, 360, 764, 537, 538,
2866 359, 360, 315, 316, 317, 318, 319, 0, 80, 925,
2867 225, 0, 0, 0, 0, 0, 925, 0, 0, 0,
2868 0, 0, 288, 539, 1071, 0, 0, 0, 80, 0,
2869 102, 102, 365, 366, 367, 368, 369, 370, 371, 372,
2870 368, 369, 370, 371, 372, 102, 0, 0, 0, 0,
2871 0, 0, 0, 0, 0, 0, 0, 1050, 1052, 0,
2872 0, 0, 1055, 1057, 0, 0, 0, 0, 0, 0,
2873 102, 102, 0, 0, 102, 0, 0, 0, 0, 102,
2874 0, 0, 0, 925, 0, 0, 0, 0, 0, 0,
2875 0, 1050, 1052, 288, 1055, 1057, 0, 0, 0, 0,
2876 0, 0, 0, 0, 925, 80, 0, 0, 0, 0,
2877 0, 80, 0, 0, 0, 0, 0, 926, 926, 0,
2878 0, 926, 0, 0, 527, 0, 528, 529, 530, 531,
2879 532, 0, 0, 0, 0, 0, 925, 864, 925, 0,
2880 91, 0, 225, 91, 0, 0, 0, 0, 0, 533,
2881 0, 0, 0, 0, 0, 80, 0, 80, 0, 0,
2882 0, 0, 0, 0, 0, 80, 925, 0, 0, 0,
2883 925, 0, 0, 535, 1144, 80, 0, 80, 80, 536,
2884 537, 538, 0, 0, 0, 80, 80, 0, 0, 102,
2885 0, 0, 1144, 0, 0, 0, 527, 0, 528, 529,
2886 530, 531, 532, 0, 0, 539, 0, 0, 540, 0,
2887 102, 80, 102, 102, 0, 91, 102, 0, 102, 0,
2888 847, 533, 102, 0, 102, 91, 0, 91, 0, 0,
2889 0, 225, 926, 0, 0, 0, 926, 102, 0, 102,
2890 966, 0, 0, 0, 0, 535, 0, 0, 926, 926,
2891 926, 536, 537, 538, 926, 926, 0, 0, 975, 0,
2892 977, 0, 0, 775, 775, 0, 0, 0, 775, 775,
2893 0, 926, 91, 225, 0, 0, 0, 539, 0, 981,
2894 540, 0, 0, 0, 0, 0, 0, 985, 91, 0,
2895 0, 102, 102, 102, 102, 102, 102, 102, 102, 0,
2896 0, 0, 102, 0, 0, 0, 102, 0, 0, 0,
2897 527, 0, 528, 529, 530, 531, 532, 0, 102, 0,
2898 0, 0, 0, 0, 1086, 926, 0, 0, 91, 0,
2899 0, 91, 926, 0, 91, 533, 0, 0, 0, 775,
2900 0, 80, 0, 80, 80, 0, 0, 0, 0, 0,
2901 0, 0, 125, 0, 125, 102, 0, 102, 0, 535,
2902 0, 102, 102, 102, 0, 536, 537, 538, 0, 0,
2903 0, 0, 0, 0, 0, 0, 0, 102, 0, 0,
2904 775, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2905 0, 539, 0, 91, 540, 0, 0, 0, 0, 926,
2906 0, 91, 91, 125, 125, 0, 0, 291, 0, 0,
2907 0, 240, 0, 0, 0, 0, 80, 91, 0, 0,
2908 926, 102, 0, 0, 0, 1181, 80, 0, 80, 0,
2909 0, 0, 80, 0, 0, 291, 0, 0, 0, 0,
2910 0, 0, 0, 0, 0, 0, 0, 0, 397, 407,
2911 407, 0, 926, 0, 926, 0, 0, 102, 0, 0,
2912 0, 0, 1135, 0, 80, 80, 0, 0, 0, 80,
2913 80, 0, 91, 80, 80, 0, 0, 102, 0, 0,
2914 0, 0, 926, 0, 0, 0, 926, 91, 0, 80,
2915 23, 24, 25, 26, 0, 0, 225, 0, 0, 0,
2916 0, 0, 0, 1231, 0, 0, 32, 33, 34, 0,
2917 0, 0, 0, 0, 0, 0, 41, 42, 43, 44,
2918 45, 0, 0, 0, 0, 0, 0, 1188, 0, 80,
2919 0, 0, 80, 0, 0, 80, 225, 225, 0, 0,
2920 80, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2921 0, 0, 0, 0, 102, 1201, 1202, 1203, 0, 0,
2922 102, 0, 125, 0, 0, 0, 0, 58, 59, 60,
2923 61, 62, 63, 64, 65, 66, 0, 91, 0, 0,
2924 0, 80, 0, 0, 0, 0, 0, 0, 0, 0,
2925 0, 0, 0, 0, 80, 125, 282, 125, 0, 0,
2926 927, 927, 80, 80, 102, 0, 102, 0, 0, 0,
2927 125, 0, 125, 0, 102, 0, 0, 0, 80, 0,
2928 0, 0, 0, 0, 102, 0, 102, 102, 0, 0,
2929 0, 0, 0, 291, 102, 102, 0, 0, 0, 0,
2930 0, 0, 0, 121, 0, 121, 0, 0, 346, 347,
2931 348, 349, 350, 351, 352, 353, 0, 355, 356, 0,
2932 102, 0, 0, 0, 125, 359, 360, 0, 0, 125,
2933 0, 0, 0, 80, 0, 125, 0, 0, 0, 125,
2934 0, 0, 0, 0, 0, 0, 0, 0, 80, 0,
2935 0, 125, 291, 345, 121, 121, 0, 80, 289, 0,
2936 363, 364, 365, 366, 367, 368, 369, 370, 371, 372,
2937 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2938 0, 0, 0, 0, 0, 0, 289, 0, 0, 0,
2939 125, 927, 927, 0, 125, 927, 125, 80, 80, 395,
2940 405, 405, 405, 0, 0, 346, 347, 348, 349, 350,
2941 351, 352, 353, 354, 355, 356, 357, 358, 87, 0,
2942 87, 0, 359, 360, 0, 0, 0, 0, 361, 0,
2943 0, 0, 0, 0, 0, 0, 0, 0, 80, 0,
2944 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2945 102, 0, 102, 102, 0, 362, 0, 363, 364, 365,
2946 366, 367, 368, 369, 370, 371, 372, 0, 0, 87,
2947 87, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2948 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2949 125, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2950 0, 0, 0, 0, 0, 0, 927, 0, 291, 0,
2951 927, 0, 0, 121, 392, 0, 0, 0, 0, 0,
2952 0, 0, 927, 927, 927, 102, 0, 0, 927, 927,
2953 0, 0, 0, 0, 0, 102, 0, 102, 0, 0,
2954 0, 102, 0, 0, 0, 927, 121, 0, 121, 0,
2955 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2956 0, 121, 0, 121, 0, 0, 0, 0, 0, 0,
2957 0, 0, 0, 102, 102, 0, 0, 0, 102, 102,
2958 0, 0, 102, 102, 289, 0, 0, 928, 928, 0,
2959 291, 0, 0, 776, 0, 0, 0, 0, 102, 927,
2960 124, 0, 124, 0, 0, 0, 927, 0, 0, 0,
2961 0, 0, 0, 0, 0, 121, 0, 0, 0, 0,
2962 121, 0, 0, 0, 0, 0, 121, 0, 87, 0,
2963 121, 0, 0, 0, 0, 0, 0, 125, 102, 125,
2964 0, 102, 121, 289, 102, 0, 0, 0, 0, 102,
2965 0, 124, 124, 0, 0, 0, 929, 929, 0, 125,
2966 0, 87, 0, 87, 0, 0, 0, 776, 776, 0,
2967 0, 0, 0, 927, 0, 0, 87, 0, 87, 0,
2968 0, 121, 0, 0, 0, 121, 0, 121, 0, 0,
2969 102, 0, 0, 0, 927, 0, 0, 0, 0, 0,
2970 0, 0, 0, 102, 0, 291, 0, 0, 0, 0,
2971 0, 102, 102, 0, 855, 0, 0, 0, 928, 928,
2972 0, 0, 928, 0, 0, 0, 927, 102, 927, 0,
2973 87, 0, 0, 0, 0, 87, 23, 24, 25, 26,
2974 0, 87, 0, 0, 0, 87, 0, 0, 0, 0,
2975 0, 0, 32, 33, 34, 906, 927, 87, 0, 907,
2976 927, 0, 41, 42, 43, 44, 45, 0, 0, 0,
2977 0, 0, 0, 0, 0, 0, 291, 0, 0, 0,
2978 0, 121, 102, 0, 0, 0, 0, 929, 929, 0,
2979 0, 929, 0, 908, 909, 0, 87, 102, 0, 289,
2980 87, 910, 87, 0, 911, 0, 102, 912, 913, 0,
2981 124, 0, 0, 58, 59, 60, 61, 62, 63, 64,
2982 65, 66, 0, 125, 0, 0, 125, 0, 0, 0,
2983 0, 0, 0, 928, 0, 914, 0, 928, 0, 0,
2984 0, 0, 282, 124, 0, 124, 102, 102, 0, 928,
2985 928, 928, 0, 0, 0, 928, 928, 0, 124, 0,
2986 124, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2987 0, 0, 928, 0, 0, 0, 0, 0, 0, 0,
2988 0, 289, 0, 0, 0, 0, 0, 102, 0, 0,
2989 0, 0, 0, 0, 0, 0, 87, 0, 125, 0,
2990 0, 0, 929, 0, 0, 0, 929, 0, 125, 0,
2991 125, 0, 124, 0, 0, 0, 0, 124, 929, 929,
2992 929, 0, 0, 124, 929, 929, 928, 124, 121, 0,
2993 121, 0, 0, 928, 0, 0, 0, 0, 0, 124,
2994 0, 929, 0, 0, 0, 0, 776, 776, 0, 0,
2995 121, 776, 776, 0, 0, 125, 0, 0, 0, 0,
2996 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2997 0, 125, 930, 930, 0, 0, 0, 0, 124, 0,
2998 0, 0, 124, 0, 124, 0, 0, 0, 0, 0,
2999 0, 0, 0, 0, 0, 929, 289, 0, 0, 770,
3000 928, 0, 929, 0, 0, 0, 0, 1089, 0, 0,
3001 0, 125, 0, 0, 125, 0, 0, 125, 0, 0,
3002 0, 928, 776, 0, 0, 0, 0, 0, 0, 0,
3003 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3004 0, 0, 0, 87, 0, 87, 0, 0, 0, 0,
3005 0, 0, 0, 928, 0, 928, 0, 0, 0, 0,
3006 0, 0, 0, 776, 0, 87, 0, 289, 0, 929,
3007 0, 0, 0, 770, 770, 0, 125, 0, 124, 931,
3008 931, 0, 0, 928, 125, 125, 0, 928, 0, 0,
3009 929, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3010 125, 0, 0, 930, 930, 0, 0, 930, 407, 0,
3011 0, 0, 0, 0, 121, 0, 0, 121, 0, 0,
3012 0, 0, 929, -773, 929, 276, 0, 0, 0, 0,
3013 0, -773, -773, -773, 0, 0, -773, -773, -773, 0,
3014 -773, 0, 0, 0, 0, 0, 0, 0, -773, -773,
3015 -773, 0, 929, 0, 0, 125, 929, 0, 0, 0,
3016 -773, -773, 0, -773, -773, -773, -773, -773, 0, 0,
3017 125, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3018 0, 124, 0, 0, 0, 0, 407, 0, 0, 121,
3019 0, -773, 0, 0, 0, 0, 0, 0, 0, 121,
3020 0, 121, 0, 0, 0, 0, 0, 0, 0, 0,
3021 931, 931, 0, 0, 931, 0, 0, 0, 930, -773,
3022 -773, 0, 930, 0, 0, 124, 0, 124, 0, 87,
3023 0, 0, 87, 0, 930, 930, 930, 0, 0, 0,
3024 930, 930, 0, -773, 0, 0, 121, 124, 0, 0,
3025 0, 0, 0, 0, 0, 124, 124, 930, 0, 0,
3026 125, 0, 121, 0, 0, 0, -773, -773, 0, 0,
3027 0, 236, -773, 0, -773, 0, -773, 0, 0, 432,
3028 0, 0, 434, 435, 436, 0, 0, 0, 0, 0,
3029 0, 0, 0, 0, 0, 0, 0, 0, 1087, 0,
3030 0, 0, 121, 0, 87, 121, 0, 0, 121, 0,
3031 0, 930, 0, 0, 87, 0, 87, 0, 930, 0,
3032 0, 0, 0, 0, 0, 931, 0, 0, 0, 931,
3033 0, 0, 932, 932, 0, 0, 0, 0, 0, 0,
3034 0, 931, 931, 931, 0, 0, 0, 931, 931, 0,
3035 0, 0, 770, 770, 0, 0, 0, 770, 770, 0,
3036 0, 87, 0, 0, 931, 0, 0, 121, 0, 220,
3037 220, 0, 0, 0, 0, 121, 121, 87, 0, 0,
3038 0, 0, 0, 0, 0, 930, 0, 0, 0, 0,
3039 0, 121, 0, 0, 0, 0, 0, 0, 0, 405,
3040 0, 253, 256, 257, 258, 0, 930, 0, 220, 220,
3041 0, 124, 0, 1085, 124, 0, 0, 87, 931, 0,
3042 87, 308, 309, 87, 0, 931, 0, 0, 770, 0,
3043 0, 0, 0, 0, 0, 0, 0, 0, 930, 0,
3044 930, 0, 0, 0, 0, 0, 121, 0, 0, 0,
3045 0, 0, 0, 0, 0, 220, 0, 0, 0, 0,
3046 0, 121, 0, 932, 932, 0, 0, 932, 930, 770,
3047 0, 0, 930, 0, 0, 0, 0, 405, 0, 0,
3048 0, 0, 87, 0, 0, 0, 124, 0, 0, 0,
3049 87, 87, 931, 0, 0, 0, 124, 0, 124, 0,
3050 0, 0, 0, 0, 0, 0, 87, 0, 662, 664,
3051 0, 0, 0, 931, 0, 0, 0, 276, 0, 0,
3052 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3053 0, 0, 0, 0, 124, 124, 0, 0, 0, 124,
3054 124, 0, 0, 124, 0, 931, 0, 931, 0, 0,
3055 0, 121, 0, 0, 664, 0, 0, 276, 0, 124,
3056 0, 87, 0, 220, 0, 0, 220, 220, 220, 0,
3057 308, 0, 0, 0, 0, 931, 87, 0, 932, 931,
3058 0, 0, 932, 0, 0, 0, 220, 0, 220, 220,
3059 0, 0, 0, 0, 932, 932, 932, 0, 0, 124,
3060 932, 932, 124, 0, 0, 124, 0, 0, 0, 0,
3061 124, 0, 0, 0, 0, 0, 0, 932, 0, 730,
3062 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3063 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3064 0, 0, 0, 0, 0, 0, 760, 0, 0, 0,
3065 0, 124, 772, 0, 0, 0, 0, 0, 0, 0,
3066 0, 0, 0, 0, 124, 0, 87, 0, 0, 0,
3067 0, 932, 124, 124, 0, 0, 0, 0, 932, 0,
3068 0, 0, 0, 0, 0, 0, 0, 0, 124, 0,
3069 0, 0, 0, 0, 0, 0, 0, 0, 0, 585,
3070 586, 587, 588, 589, 0, 0, 590, 591, 592, 593,
3071 594, 595, 596, 597, 0, 599, 0, 0, 600, 601,
3072 602, 603, 604, 605, 606, 607, 608, 609, 0, 832,
3073 0, 220, 833, 0, 0, 0, 0, 0, 0, 0,
3074 0, 0, 0, 124, 0, 932, 0, 664, 0, 276,
3075 0, 0, 0, 0, 0, 0, 0, 0, 124, 0,
3076 0, 0, 0, 0, 0, 0, 932, 0, 0, 0,
3077 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3078 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3079 0, 0, 220, 220, 0, 0, 867, 220, 932, 0,
3080 932, 220, 0, 0, 0, 0, 0, 258, 0, 0,
3081 0, 0, 0, 0, 882, 0, 0, 0, 0, 0,
3082 0, 0, 684, 0, 0, 0, 0, 896, 932, 0,
3083 0, 0, 932, 0, 0, 0, 0, 0, 220, 0,
3084 0, 220, 0, 0, 0, 0, 0, 0, 124, 0,
3085 0, 0, 0, 220, 0, 664, 0, 0, 0, 0,
3086 0, 23, 24, 25, 26, 0, 0, 0, 0, 0,
3087 714, 0, 0, 0, 0, 956, 0, 32, 33, 34,
3088 906, 0, 0, 0, 907, 0, 0, 41, 42, 43,
3089 44, 45, 0, 0, 0, 346, -774, -774, -774, -774,
3090 351, 352, 0, 220, -774, -774, 0, 0, 0, 0,
3091 0, 0, 359, 360, 0, 741, 0, 0, 908, 909,
3092 750, 0, 0, 0, 0, 0, 910, 0, 0, 911,
3093 220, 0, 912, 913, 0, 1024, 771, 0, 58, 59,
3094 60, 61, 62, 63, 64, 65, 66, 363, 364, 365,
3095 366, 367, 368, 369, 370, 371, 372, 0, 0, 0,
3096 914, 0, 0, 0, 0, 0, 1009, 282, 0, 0,
3097 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3098 0, 240, 0, 0, 0, 0, 0, 0, 0, 0,
3099 220, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3100 220, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3101 827, 827, 0, 220, 827, 0, 220, 0, 0, 0,
3102 0, 0, 0, 0, 1064, 827, 827, 0, 0, 0,
3103 0, 220, 0, 220, 0, 0, 0, 0, 23, 24,
3104 25, 26, 827, 0, 0, 276, 0, 0, 0, 0,
3105 0, 0, 0, 0, 32, 33, 34, 906, 0, 0,
3106 0, 907, 0, 1118, 41, 42, 43, 44, 45, 0,
3107 0, 0, 0, 0, 0, 0, 0, 1107, 0, 0,
3108 220, 0, 533, 0, 0, 0, 0, 0, 0, 0,
3109 0, 0, 0, 0, 0, 908, 909, 0, 220, 0,
3110 0, 0, 0, 910, 0, 0, 911, 0, 0, 912,
3111 913, 220, 1024, 537, 0, 58, 59, 1136, 61, 62,
3112 63, 64, 65, 66, 0, 0, 0, 0, 0, 0,
3113 0, 0, 0, 0, 1153, 0, 0, 914, 0, 220,
3114 0, 0, 0, 0, 282, 0, 0, 0, 0, 0,
3115 0, 0, 0, 0, 0, 0, 0, 0, 0, 220,
3116 0, 0, 0, -773, 4, 0, 5, 6, 7, 8,
3117 9, 0, 0, 0, 10, 11, 0, 0, 0, 12,
3118 0, 13, 14, 15, 16, 17, 18, 19, 0, 0,
3119 0, 0, 0, 20, 21, 22, 23, 24, 25, 26,
3120 0, 0, 27, 0, 0, 0, 0, 0, 28, 29,
3121 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
3122 40, 1212, 41, 42, 43, 44, 45, 46, 47, 0,
3123 0, 0, 0, 0, 996, 0, 0, 0, 48, 49,
3124 0, 0, 0, 0, 0, 1002, 0, 0, 0, 0,
3125 220, 0, 0, 50, 51, 1013, 0, 220, 0, 0,
3126 0, 52, 0, 0, 53, 54, 0, 55, 56, 0,
3127 57, 0, 0, 58, 59, 60, 61, 62, 63, 64,
3128 65, 66, 0, 0, 0, 0, 0, 0, 1048, 827,
3129 827, 0, 0, 0, 827, 827, 0, 0, 0, 0,
3130 0, 0, 67, 68, 69, 0, 0, 0, 220, 0,
3131 0, 0, 0, 0, -773, 0, -773, 0, 0, 0,
3132 0, 0, 0, 827, 827, 0, 827, 827, 0, 220,
3133 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3134 0, 0, 0, 0, 0, 0, 0, 0, 0, -750,
3135 0, 0, 0, 0, 0, 0, 0, -750, -750, -750,
3136 0, 220, -750, -750, -750, 827, -750, 0, 0, 0,
3137 0, 0, 0, 0, -750, -750, -750, -750, -750, 0,
3138 0, 0, 0, 0, 0, 0, -750, -750, 0, -750,
3139 -750, -750, -750, -750, 0, 0, 0, 0, 0, 0,
3140 0, 0, 0, 0, 0, 0, 827, 0, 0, 0,
3141 0, 0, 0, 0, 0, 0, 0, -750, 220, 0,
3142 0, 0, 0, 0, 827, 0, -750, -750, -750, -750,
3143 -750, -750, -750, -750, -750, -750, -750, -750, -750, 0,
3144 0, 0, 0, -750, -750, -750, -750, 0, 835, -750,
3145 0, 0, 0, 0, 0, -750, 0, 0, 0, 0,
3146 0, 0, 0, 0, 0, 0, 0, 0, 0, -750,
3147 0, 0, -750, 0, 0, -124, -750, -750, -750, -750,
3148 -750, -750, -750, -750, -750, -750, -750, -750, 0, 0,
3149 0, 0, -750, -750, -750, -750, 0, 0, -750, -750,
3150 -750, -641, -750, 0, 0, 220, 0, 0, 0, -641,
3151 -641, -641, 0, 0, -641, -641, -641, 0, -641, 0,
3152 0, 0, 220, 902, 0, 0, -641, 0, -641, -641,
3153 -641, 0, 0, 0, 0, 0, 0, 0, -641, -641,
3154 0, -641, -641, -641, -641, -641, 0, 0, 0, 0,
3155 0, 0, 0, 0, 0, 0, 346, 347, 348, 349,
3156 350, 351, 352, 353, 354, 355, 356, 357, 358, -641,
3157 0, 0, 0, 359, 360, 0, 0, 0, -641, -641,
3158 -641, -641, -641, -641, -641, -641, -641, -641, -641, -641,
3159 -641, 0, 0, 0, 0, -641, -641, -641, -641, 0,
3160 -641, -641, 0, 0, 0, 0, 362, -641, 363, 364,
3161 365, 366, 367, 368, 369, 370, 371, 372, 0, 0,
3162 0, -641, 0, 0, -641, -271, 0, -641, -641, -641,
3163 -641, -641, -641, -641, -641, -641, -641, -641, -641, -641,
3164 0, 0, 0, 0, 0, -641, -641, -641, -644, 0,
3165 -641, -641, -641, 0, -641, 0, -644, -644, -644, 0,
3166 0, -644, -644, -644, 0, -644, 0, 0, 0, 0,
3167 881, 0, 0, -644, 0, -644, -644, -644, 0, 0,
3168 0, 0, 0, 0, 0, -644, -644, 0, -644, -644,
3169 -644, -644, -644, 0, 0, 0, 0, 0, 0, 0,
3170 0, 0, 0, 346, 347, 348, 349, 350, 351, 352,
3171 353, 354, 355, 356, 357, 358, -644, 0, 0, 0,
3172 359, 360, 0, 0, 0, -644, -644, -644, -644, -644,
3173 -644, -644, -644, -644, -644, -644, -644, -644, 0, 0,
3174 0, 0, -644, -644, -644, -644, 0, -644, -644, 0,
3175 0, 0, 0, 362, -644, 363, 364, 365, 366, 367,
3176 368, 369, 370, 371, 372, 0, 0, 0, -644, 0,
3177 0, -644, 0, 0, -644, -644, -644, -644, -644, -644,
3178 -644, -644, -644, -644, -644, -644, -644, 0, 0, 0,
3179 0, 0, -644, -644, -644, -751, 0, -644, -644, -644,
3180 0, -644, 0, -751, -751, -751, 0, 0, -751, -751,
3181 -751, 0, -751, 0, 0, 0, 0, 892, 0, 0,
3182 -751, -751, -751, -751, -751, 0, 0, 0, 0, 0,
3183 0, 0, -751, -751, 0, -751, -751, -751, -751, -751,
3184 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3185 346, 347, 348, 349, 350, 351, 352, 353, 354, 355,
3186 356, 357, 358, -751, 0, 0, 0, 359, 360, 0,
3187 0, 0, -751, -751, -751, -751, -751, -751, -751, -751,
3188 -751, -751, -751, -751, -751, 0, 0, 0, 0, -751,
3189 -751, -751, -751, 0, 0, -751, 0, 0, 0, 0,
3190 362, -751, 363, 364, 365, 366, 367, 368, 369, 370,
3191 371, 372, 0, 0, 0, -751, 0, 0, -751, 0,
3192 0, 0, -751, -751, -751, -751, -751, -751, -751, -751,
3193 -751, -751, -751, -751, 0, 0, 0, 0, -751, -751,
3194 -751, -751, -752, 0, -751, -751, -751, 0, -751, 0,
3195 -752, -752, -752, 0, 0, -752, -752, -752, 0, -752,
3196 0, 0, 0, 0, 902, 0, 0, -752, -752, -752,
3197 -752, -752, 0, 0, 0, 0, 0, 0, 0, -752,
3198 -752, 0, -752, -752, -752, -752, -752, 0, 0, 0,
3199 0, 0, 0, 0, 0, 0, 0, 346, 347, 348,
3200 349, 350, 351, 352, 353, 354, 355, 356, 357, 358,
3201 -752, 0, 0, 0, 359, 360, 0, 0, 0, -752,
3202 -752, -752, -752, -752, -752, -752, -752, -752, -752, -752,
3203 -752, -752, 0, 0, 0, 0, -752, -752, -752, -752,
3204 0, 0, -752, 0, 0, 0, 0, 362, -752, 363,
3205 364, 365, 366, 367, 368, 369, 370, 371, 372, 0,
3206 0, 0, -752, 0, 0, -752, 0, 0, 0, -752,
3207 -752, -752, -752, -752, -752, -752, -752, -752, -752, -752,
3208 -752, 0, 0, 0, 0, -752, -752, -752, -752, -325,
3209 0, -752, -752, -752, 0, -752, 0, -325, -325, -325,
3210 0, 0, -325, -325, -325, 0, -325, 0, 0, 0,
3211 0, 0, 0, 0, -325, 0, -325, -325, -325, 0,
3212 0, 0, 0, 0, 0, 0, -325, -325, 0, -325,
3213 -325, -325, -325, -325, 0, 0, 0, 0, 0, 0,
3214 0, 0, 0, 0, 346, 347, 348, 349, 350, 351,
3215 352, 353, 354, 355, 356, 357, 358, -325, 0, 0,
3216 0, 359, 360, 0, 0, 0, -325, -325, -325, -325,
3217 -325, -325, -325, -325, -325, -325, -325, -325, -325, 0,
3218 0, 0, 0, -325, -325, -325, -325, 0, 836, -325,
3219 0, 0, 0, 0, 362, -325, 363, 364, 365, 366,
3220 367, 368, 369, 370, 371, 372, 0, 0, 0, -325,
3221 0, 0, -325, 0, 0, -126, -325, -325, -325, -325,
3222 -325, -325, -325, -325, -325, -325, -325, -325, 0, 0,
3223 0, 0, 0, -325, -325, -325, -460, 0, -325, -325,
3224 -325, 0, -325, 0, -460, -460, -460, 0, 0, -460,
3225 -460, -460, 0, -460, 0, 0, 0, 0, 0, 0,
3226 0, -460, -460, -460, -460, 0, 0, 0, 0, 0,
3227 0, 0, 0, -460, -460, 0, -460, -460, -460, -460,
3228 -460, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3229 0, 346, 347, 348, 349, 350, 351, 352, 353, 354,
3230 355, 356, -774, -774, -460, 0, 0, 0, 359, 360,
3231 0, 0, 0, -460, -460, -460, -460, -460, -460, -460,
3232 -460, -460, -460, -460, -460, -460, 0, 0, 0, 0,
3233 -460, -460, -460, -460, 0, 0, -460, 0, 0, 0,
3234 0, 0, -460, 363, 364, 365, 366, 367, 368, 369,
3235 370, 371, 372, 0, 0, 0, -460, 0, 0, 0,
3236 0, 0, 0, -460, 0, -460, -460, -460, -460, -460,
3237 -460, -460, -460, -460, -460, 0, 0, 0, 0, -460,
3238 -460, -460, -460, -317, 236, -460, -460, -460, 0, -460,
3239 0, -317, -317, -317, 0, 0, -317, -317, -317, 0,
3240 -317, 0, 0, 0, 0, 0, 0, 0, -317, 0,
3241 -317, -317, -317, 0, 0, 0, 0, 0, 0, 0,
3242 -317, -317, 0, -317, -317, -317, -317, -317, 0, 0,
3243 0, 0, 0, 0, 0, 0, 0, 0, 346, 347,
3244 348, 349, 350, 351, 352, 0, 0, 355, 356, 0,
3245 0, -317, 0, 0, 0, 359, 360, 0, 0, 0,
3246 -317, -317, -317, -317, -317, -317, -317, -317, -317, -317,
3247 -317, -317, -317, 0, 0, 0, 0, -317, -317, -317,
3248 -317, 0, 0, -317, 0, 0, 0, 0, 0, -317,
3249 363, 364, 365, 366, 367, 368, 369, 370, 371, 372,
3250 0, 0, 0, -317, 0, 0, -317, 0, 0, 0,
3251 -317, -317, -317, -317, -317, -317, -317, -317, -317, -317,
3252 -317, -317, 0, 0, 0, 0, 0, -317, -317, -317,
3253 -773, 0, -317, -317, -317, 0, -317, 0, -773, -773,
3254 -773, 0, 0, -773, -773, -773, 0, -773, 0, 0,
3255 0, 0, 0, 0, 0, -773, -773, -773, -773, 0,
3256 0, 0, 0, 0, 0, 0, 0, -773, -773, 0,
3257 -773, -773, -773, -773, -773, 0, 0, 0, 0, 0,
3258 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3259 0, 0, 0, 0, 0, 0, 0, 0, -773, 0,
3260 0, 0, 0, 0, 0, 0, 0, -773, -773, -773,
3261 -773, -773, -773, -773, -773, -773, -773, -773, -773, -773,
3262 0, 0, 0, 0, -773, -773, -773, -773, 0, 0,
3263 -773, 0, 0, 0, 0, 0, -773, 0, 0, 0,
3264 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3265 -773, 0, 0, 0, 0, 0, 0, -773, 0, -773,
3266 -773, -773, -773, -773, -773, -773, -773, -773, -773, 0,
3267 0, 0, 0, -773, -773, -773, -773, -332, 236, -773,
3268 -773, -773, 0, -773, 0, -332, -332, -332, 0, 0,
3269 -332, -332, -332, 0, -332, 0, 0, 0, 0, 0,
3270 0, 0, -332, 0, -332, -332, 0, 0, 0, 0,
3271 0, 0, 0, 0, -332, -332, 0, -332, -332, -332,
3272 -332, -332, 0, 0, 0, 0, 0, 0, 0, 0,
3273 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3274 0, 0, 0, 0, 0, -332, 0, 0, 0, 0,
3275 0, 0, 0, 0, -332, -332, -332, -332, -332, -332,
3276 -332, -332, -332, -332, -332, -332, -332, 0, 0, 0,
3277 0, -332, -332, -332, -332, 0, 0, -332, 0, 0,
3278 0, 0, 0, -332, 0, 0, 0, 0, 0, 0,
3279 0, 0, 0, 0, 0, 0, 0, -332, 0, 0,
3280 0, 0, 0, 0, -332, 0, -332, -332, -332, -332,
3281 -332, -332, -332, -332, -332, -332, 0, 0, 0, 0,
3282 0, -332, -332, -332, -750, 233, -332, -332, -332, 0,
3283 -332, 0, -750, -750, -750, 0, 0, 0, -750, -750,
3284 0, -750, 0, 0, 0, 0, 0, 0, 0, -750,
3285 -750, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3286 0, -750, -750, 0, -750, -750, -750, -750, -750, 0,
3287 0, 0, 0, 0, 0, 0, 346, 347, 348, 349,
3288 350, 351, 352, 353, 354, 355, 356, 357, 358, 0,
3289 0, 0, -750, 359, 360, 0, 0, 0, 0, 0,
3290 0, -750, -750, -750, -750, -750, -750, -750, -750, -750,
3291 -750, -750, -750, -750, 0, 0, 0, 0, -750, -750,
3292 -750, -750, 0, 780, -750, 0, 362, 0, 363, 364,
3293 365, 366, 367, 368, 369, 370, 371, 372, 0, 0,
3294 0, 0, 0, 0, -750, 0, 0, 0, 0, 0,
3295 -124, -750, 240, -750, -750, -750, -750, -750, -750, -750,
3296 -750, -750, -750, 0, 0, 0, 0, -750, -750, -750,
3297 -115, -750, 0, -750, 0, -750, 0, -750, 0, -750,
3298 -750, -750, 0, 0, 0, -750, -750, 0, -750, 0,
3299 0, 0, 0, 0, 0, 0, -750, -750, 0, 0,
3300 0, 0, 0, 0, 0, 0, 0, 0, -750, -750,
3301 0, -750, -750, -750, -750, -750, 0, 0, 0, 0,
3302 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3303 0, 0, 0, 0, 0, 0, 0, 0, 0, -750,
3304 0, 0, 0, 0, 0, 0, 0, 0, -750, -750,
3305 -750, -750, -750, -750, -750, -750, -750, -750, -750, -750,
3306 -750, 0, 0, 0, 0, -750, -750, -750, -750, 0,
3307 780, -750, 0, 0, 0, 0, 0, 0, 0, 0,
3308 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3309 0, -750, 0, 0, 0, 0, 0, -124, -750, 0,
3310 -750, -750, -750, -750, -750, -750, -750, -750, -750, -750,
3311 0, 0, 0, 0, -750, -750, -750, -750, -325, 0,
3312 -750, 0, -750, 0, -750, 0, -325, -325, -325, 0,
3313 0, 0, -325, -325, 0, -325, 0, 0, 0, 0,
3314 0, 0, 0, -325, 0, 0, 0, 0, 0, 0,
3315 0, 0, 0, 0, 0, -325, -325, 0, -325, -325,
3316 -325, -325, -325, 0, 0, 0, 0, 0, 0, 0,
3317 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3318 0, 0, 0, 0, 0, 0, -325, 0, 0, 0,
3319 0, 0, 0, 0, 0, -325, -325, -325, -325, -325,
3320 -325, -325, -325, -325, -325, -325, -325, -325, 0, 0,
3321 0, 0, -325, -325, -325, -325, 0, 781, -325, 0,
3322 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3323 0, 0, 0, 0, 0, 0, 0, 0, -325, 0,
3324 0, 0, 0, 0, -126, -325, 0, -325, -325, -325,
3325 -325, -325, -325, -325, -325, -325, -325, 0, 0, 0,
3326 0, 0, -325, -325, -117, -325, 0, -325, 0, -325,
3327 0, -325, 0, -325, -325, -325, 0, 0, 0, -325,
3328 -325, 0, -325, 0, 0, 0, 0, 0, 0, 0,
3329 -325, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3330 0, 0, -325, -325, 0, -325, -325, -325, -325, -325,
3331 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3332 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3333 0, 0, 0, -325, 0, 0, 0, 0, 0, 0,
3334 0, 0, -325, -325, -325, -325, -325, -325, -325, -325,
3335 -325, -325, -325, -325, -325, 0, 0, 0, 0, -325,
3336 -325, -325, -325, 0, 781, -325, 0, 0, 0, 0,
3337 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3338 0, 0, 0, 0, 0, -325, 0, 0, 0, 0,
3339 0, -126, -325, 0, -325, -325, -325, -325, -325, -325,
3340 -325, -325, -325, -325, 0, 0, 0, 0, 0, -325,
3341 -325, -325, 0, 0, -325, 0, -325, 260, -325, 5,
3342 6, 7, 8, 9, -773, -773, -773, 10, 11, 0,
3343 0, -773, 12, 0, 13, 14, 15, 16, 17, 18,
3344 19, 0, 0, 0, 0, 0, 20, 21, 22, 23,
3345 24, 25, 26, 0, 0, 27, 0, 0, 0, 0,
3346 0, 28, 29, 261, 31, 32, 33, 34, 35, 36,
3347 37, 38, 39, 40, 0, 41, 42, 43, 44, 45,
3348 46, 47, 0, 0, 0, 0, 0, 0, 0, 0,
3349 0, 48, 49, 0, 0, 0, 0, 0, 0, 0,
3350 0, 0, 0, 0, 0, 0, 50, 51, 0, 0,
3351 0, 0, 0, 0, 52, 0, 0, 53, 54, 0,
3352 55, 56, 0, 57, 0, 0, 58, 59, 60, 61,
3353 62, 63, 64, 65, 66, 0, 0, 0, 0, 0,
3354 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3355 0, 0, 0, 0, 0, 67, 68, 69, 0, 0,
3356 0, 0, 0, 0, 0, 0, 0, -773, 260, -773,
3357 5, 6, 7, 8, 9, 0, 0, -773, 10, 11,
3358 0, -773, -773, 12, 0, 13, 14, 15, 16, 17,
3359 18, 19, 0, 0, 0, 0, 0, 20, 21, 22,
3360 23, 24, 25, 26, 0, 0, 27, 0, 0, 0,
3361 0, 0, 28, 29, 261, 31, 32, 33, 34, 35,
3362 36, 37, 38, 39, 40, 0, 41, 42, 43, 44,
3363 45, 46, 47, 0, 0, 0, 0, 0, 0, 0,
3364 0, 0, 48, 49, 0, 0, 0, 0, 0, 0,
3365 0, 0, 0, 0, 0, 0, 0, 50, 51, 0,
3366 0, 0, 0, 0, 0, 52, 0, 0, 53, 54,
3367 0, 55, 56, 0, 57, 0, 0, 58, 59, 60,
3368 61, 62, 63, 64, 65, 66, 0, 0, 0, 0,
3369 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3370 0, 0, 0, 0, 0, 0, 67, 68, 69, 0,
3371 0, 0, 0, 0, 0, 0, 0, 0, -773, 260,
3372 -773, 5, 6, 7, 8, 9, 0, 0, -773, 10,
3373 11, 0, 0, -773, 12, -773, 13, 14, 15, 16,
3374 17, 18, 19, 0, 0, 0, 0, 0, 20, 21,
3375 22, 23, 24, 25, 26, 0, 0, 27, 0, 0,
3376 0, 0, 0, 28, 29, 261, 31, 32, 33, 34,
3377 35, 36, 37, 38, 39, 40, 0, 41, 42, 43,
3378 44, 45, 46, 47, 0, 0, 0, 0, 0, 0,
3379 0, 0, 0, 48, 49, 0, 0, 0, 0, 0,
3380 0, 0, 0, 0, 0, 0, 0, 0, 50, 51,
3381 0, 0, 0, 0, 0, 0, 52, 0, 0, 53,
3382 54, 0, 55, 56, 0, 57, 0, 0, 58, 59,
3383 60, 61, 62, 63, 64, 65, 66, 0, 0, 0,
3384 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3385 0, 0, 0, 0, 0, 0, 0, 67, 68, 69,
3386 0, 0, 0, 0, 0, 0, 0, 0, 0, -773,
3387 260, -773, 5, 6, 7, 8, 9, 0, 0, -773,
3388 10, 11, 0, 0, -773, 12, 0, 13, 14, 15,
3389 16, 17, 18, 19, -773, 0, 0, 0, 0, 20,
3390 21, 22, 23, 24, 25, 26, 0, 0, 27, 0,
3391 0, 0, 0, 0, 28, 29, 261, 31, 32, 33,
3392 34, 35, 36, 37, 38, 39, 40, 0, 41, 42,
3393 43, 44, 45, 46, 47, 0, 0, 0, 0, 0,
3394 0, 0, 0, 0, 48, 49, 0, 0, 0, 0,
3395 0, 0, 0, 0, 0, 0, 0, 0, 0, 50,
3396 51, 0, 0, 0, 0, 0, 0, 52, 0, 0,
3397 53, 54, 0, 55, 56, 0, 57, 0, 0, 58,
3398 59, 60, 61, 62, 63, 64, 65, 66, 0, 0,
3399 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3400 0, 0, 0, 0, 0, 0, 0, 0, 67, 68,
3401 69, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3402 -773, 260, -773, 5, 6, 7, 8, 9, 0, 0,
3403 -773, 10, 11, 0, 0, -773, 12, 0, 13, 14,
3404 15, 16, 17, 18, 19, 0, 0, 0, 0, 0,
3405 20, 21, 22, 23, 24, 25, 26, 0, 0, 27,
3406 0, 0, 0, 0, 0, 28, 29, 261, 31, 32,
3407 33, 34, 35, 36, 37, 38, 39, 40, 0, 41,
3408 42, 43, 44, 45, 46, 47, 0, 0, 0, 0,
3409 0, 0, 0, 0, 0, 48, 49, 0, 0, 0,
3410 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3411 50, 51, 0, 0, 0, 0, 0, 0, 52, 0,
3412 0, 53, 54, 0, 55, 56, 0, 57, 0, 0,
3413 58, 59, 60, 61, 62, 63, 64, 65, 66, 0,
3414 0, 0, 0, 0, 0, 0, 0, 260, 0, 5,
3415 6, 7, 8, 9, 0, -773, -773, 10, 11, 67,
3416 68, 69, 12, 0, 13, 14, 15, 16, 17, 18,
3417 19, -773, 0, -773, 0, 0, 20, 21, 22, 23,
3418 24, 25, 26, 0, 0, 27, 0, 0, 0, 0,
3419 0, 28, 29, 261, 31, 32, 33, 34, 35, 36,
3420 37, 38, 39, 40, 0, 41, 42, 43, 44, 45,
3421 46, 47, 0, 0, 0, 0, 0, 0, 0, 0,
3422 0, 48, 49, 0, 0, 0, 0, 0, 0, 0,
3423 0, 0, 0, 0, 0, 0, 50, 51, 0, 0,
3424 0, 0, 0, 0, 52, 0, 0, 53, 54, 0,
3425 55, 56, 0, 57, 0, 0, 58, 59, 60, 61,
3426 62, 63, 64, 65, 66, 0, 0, 0, 0, 0,
3427 0, 0, 0, 260, 0, 5, 6, 7, 8, 9,
3428 0, 0, 0, 10, 11, 67, 68, 69, 12, 0,
3429 13, 14, 15, 16, 17, 18, 19, -773, 0, -773,
3430 0, 0, 20, 21, 22, 23, 24, 25, 26, 0,
3431 0, 27, 0, 0, 0, 0, 0, 28, 29, 261,
3432 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
3433 0, 41, 42, 43, 44, 45, 46, 47, 0, 0,
3434 0, 0, 0, 0, 0, 0, 0, 48, 49, 0,
3435 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3436 0, 0, 50, 51, 0, 0, 0, 0, 0, 0,
3437 52, 0, 0, 262, 54, 0, 55, 56, 0, 57,
3438 0, 0, 58, 59, 60, 61, 62, 63, 64, 65,
3439 66, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3440 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3441 0, 67, 68, 69, 0, 0, 0, 0, 0, 0,
3442 0, -773, 0, -773, 260, -773, 5, 6, 7, 8,
3443 9, 0, 0, 0, 10, 11, 0, 0, 0, 12,
3444 0, 13, 14, 15, 16, 17, 18, 19, 0, 0,
3445 0, 0, 0, 20, 21, 22, 23, 24, 25, 26,
3446 0, 0, 27, 0, 0, 0, 0, 0, 28, 29,
3447 261, 31, 32, 33, 34, 35, 36, 37, 38, 39,
3448 40, 0, 41, 42, 43, 44, 45, 46, 47, 0,
3449 0, 0, 0, 0, 0, 0, 0, 0, 48, 49,
3450 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3451 0, 0, 0, 50, 51, 0, 0, 0, 0, 0,
3452 0, 52, 0, 0, 53, 54, 0, 55, 56, 0,
3453 57, 0, 0, 58, 59, 60, 61, 62, 63, 64,
3454 65, 66, 0, 0, 0, 0, 0, 0, 0, 0,
3455 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3456 0, 0, 67, 68, 69, 0, 0, 0, 0, 0,
3457 0, 0, -773, 0, -773, 4, -773, 5, 6, 7,
3458 8, 9, 0, 0, 0, 10, 11, 0, 0, 0,
3459 12, 0, 13, 14, 15, 16, 17, 18, 19, 0,
3460 0, 0, 0, 0, 20, 21, 22, 23, 24, 25,
3461 26, 0, 0, 27, 0, 0, 0, 0, 0, 28,
3462 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
3463 39, 40, 0, 41, 42, 43, 44, 45, 46, 47,
3464 0, 0, 0, 0, 0, 0, 0, 0, 0, 48,
3465 49, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3466 0, 0, 0, 0, 50, 51, 0, 0, 0, 0,
3467 0, 0, 52, 0, 0, 53, 54, 0, 55, 56,
3468 0, 57, 0, 0, 58, 59, 60, 61, 62, 63,
3469 64, 65, 66, 0, 0, 0, 0, 0, 0, 0,
3470 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3471 0, 0, 0, 67, 68, 69, 0, 0, -773, 0,
3472 0, 0, 0, 0, 0, -773, 260, -773, 5, 6,
3473 7, 8, 9, 0, 0, 0, 10, 11, 0, 0,
3474 0, 12, 0, 13, 14, 15, 16, 17, 18, 19,
3475 0, 0, 0, 0, 0, 20, 21, 22, 23, 24,
3476 25, 26, 0, 0, 27, 0, 0, 0, 0, 0,
3477 28, 29, 261, 31, 32, 33, 34, 35, 36, 37,
3478 38, 39, 40, 0, 41, 42, 43, 44, 45, 46,
3479 47, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3480 48, 49, 0, 0, 0, 0, 0, 0, 0, 0,
3481 0, 0, 0, 0, 0, 50, 51, 0, 0, 0,
3482 0, 0, 0, 52, 0, 0, 53, 54, 0, 55,
3483 56, 0, 57, 0, 0, 58, 59, 60, 61, 62,
3484 63, 64, 65, 66, 0, 0, 0, 0, 0, 0,
3485 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3486 0, 0, 0, 0, 67, 68, 69, 0, 0, -773,
3487 0, 0, 0, 0, 0, 0, -773, 260, -773, 5,
3488 6, 7, 8, 9, 0, 0, -773, 10, 11, 0,
3489 0, 0, 12, 0, 13, 14, 15, 16, 17, 18,
3490 19, 0, 0, 0, 0, 0, 20, 21, 22, 23,
3491 24, 25, 26, 0, 0, 27, 0, 0, 0, 0,
3492 0, 28, 29, 261, 31, 32, 33, 34, 35, 36,
3493 37, 38, 39, 40, 0, 41, 42, 43, 44, 45,
3494 46, 47, 0, 0, 0, 0, 0, 0, 0, 0,
3495 0, 48, 49, 0, 0, 0, 0, 0, 0, 0,
3496 0, 0, 0, 0, 0, 0, 50, 51, 0, 0,
3497 0, 0, 0, 0, 52, 0, 0, 53, 54, 0,
3498 55, 56, 0, 57, 0, 0, 58, 59, 60, 61,
3499 62, 63, 64, 65, 66, 0, 0, 0, 0, 0,
3500 0, 0, 0, 260, 0, 5, 6, 7, 8, 9,
3501 0, 0, 0, 10, 11, 67, 68, 69, 12, 0,
3502 13, 14, 15, 16, 17, 18, 19, -773, 0, -773,
3503 0, 0, 20, 21, 22, 23, 24, 25, 26, 0,
3504 0, 27, 0, 0, 0, 0, 0, 28, 29, 261,
3505 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
3506 0, 41, 42, 43, 44, 45, 46, 47, 0, 0,
3507 0, 0, 0, 0, 0, 0, 0, 48, 49, 0,
3508 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3509 0, 0, 50, 51, 0, 0, 0, 0, 0, 0,
3510 52, 0, 0, 53, 54, 0, 55, 56, 0, 57,
3511 0, 0, 58, 59, 60, 61, 62, 63, 64, 65,
3512 66, 0, -773, 0, 0, 0, 0, 0, 0, 0,
3513 0, 5, 6, 7, 0, 9, 0, 0, 0, 10,
3514 11, 67, 68, 69, 12, 0, 13, 14, 15, 16,
3515 17, 18, 19, -773, 0, -773, 0, 0, 20, 21,
3516 22, 23, 24, 25, 26, 0, 0, 209, 0, 0,
3517 0, 0, 0, 0, 29, 0, 0, 32, 33, 34,
3518 35, 36, 37, 38, 39, 40, 210, 41, 42, 43,
3519 44, 45, 46, 47, 0, 0, 0, 0, 0, 0,
3520 0, 0, 0, 48, 49, 0, 0, 0, 0, 0,
3521 0, 0, 0, 0, 0, 0, 0, 0, 50, 51,
3522 0, 0, 0, 0, 0, 0, 211, 0, 0, 212,
3523 54, 0, 55, 56, 0, 213, 214, 215, 58, 59,
3524 216, 61, 62, 63, 64, 65, 66, 0, 0, 0,
3525 0, 0, 0, 0, 0, 0, 0, 5, 6, 7,
3526 0, 9, 0, 0, 0, 10, 11, 67, 217, 69,
3527 12, 0, 13, 14, 15, 16, 17, 18, 19, 0,
3528 0, 240, 0, 0, 20, 21, 22, 23, 24, 25,
3529 26, 0, 0, 27, 0, 0, 0, 0, 0, 0,
3530 29, 0, 0, 32, 33, 34, 35, 36, 37, 38,
3531 39, 40, 0, 41, 42, 43, 44, 45, 46, 47,
3532 0, 0, 0, 0, 0, 0, 0, 0, 0, 48,
3533 49, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3534 0, 0, 0, 0, 50, 51, 0, 0, 0, 0,
3535 0, 0, 211, 0, 0, 212, 54, 0, 55, 56,
3536 0, 0, 0, 0, 58, 59, 60, 61, 62, 63,
3537 64, 65, 66, 0, 0, 0, 0, 0, 0, 0,
3538 0, 0, 0, 5, 6, 7, 0, 9, 0, 0,
3539 0, 10, 11, 67, 68, 69, 12, 0, 13, 14,
3540 15, 16, 17, 18, 19, 310, 0, 311, 0, 0,
3541 20, 21, 22, 23, 24, 25, 26, 0, 0, 27,
3542 0, 0, 0, 0, 0, 0, 29, 0, 0, 32,
3543 33, 34, 35, 36, 37, 38, 39, 40, 0, 41,
3544 42, 43, 44, 45, 46, 47, 0, 0, 0, 0,
3545 0, 0, 0, 0, 0, 48, 49, 0, 0, 0,
3546 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3547 50, 51, 0, 0, 0, 0, 0, 0, 211, 0,
3548 0, 212, 54, 0, 55, 56, 0, 0, 0, 0,
3549 58, 59, 60, 61, 62, 63, 64, 65, 66, 0,
3550 0, 0, 0, 0, 0, 0, 0, 0, 0, 5,
3551 6, 7, 8, 9, 0, 0, 0, 10, 11, 67,
3552 68, 69, 12, 0, 13, 14, 15, 16, 17, 18,
3553 19, 0, 0, 240, 0, 0, 20, 21, 22, 23,
3554 24, 25, 26, 0, 0, 27, 0, 0, 0, 0,
3555 0, 28, 29, 30, 31, 32, 33, 34, 35, 36,
3556 37, 38, 39, 40, 0, 41, 42, 43, 44, 45,
3557 46, 47, 0, 0, 0, 0, 0, 0, 0, 0,
3558 0, 48, 49, 0, 0, 0, 0, 0, 0, 0,
3559 0, 0, 0, 0, 0, 0, 50, 51, 0, 0,
3560 0, 0, 0, 0, 52, 0, 0, 53, 54, 0,
3561 55, 56, 0, 57, 0, 0, 58, 59, 60, 61,
3562 62, 63, 64, 65, 66, 0, 0, 0, 0, 0,
3563 0, 0, 0, 0, 0, 5, 6, 7, 8, 9,
3564 0, 0, 0, 10, 11, 67, 68, 69, 12, 0,
3565 13, 14, 15, 16, 17, 18, 19, 518, 0, 0,
3566 0, 0, 20, 21, 22, 23, 24, 25, 26, 0,
3567 0, 27, 0, 0, 0, 0, 0, 28, 29, 261,
3568 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
3569 0, 41, 42, 43, 44, 45, 46, 47, 0, 0,
3570 0, 0, 0, 0, 0, 0, 0, 48, 49, 0,
3571 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3572 0, 0, 50, 51, 0, 0, 0, 0, 0, 0,
3573 52, 0, 0, 53, 54, 0, 55, 56, 0, 57,
3574 0, 0, 58, 59, 60, 61, 62, 63, 64, 65,
3575 66, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3576 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3577 0, 67, 68, 69, 0, 0, 0, 0, 0, 0,
3578 0, 0, 0, 518, 129, 130, 131, 132, 133, 134,
3579 135, 136, 137, 138, 139, 140, 141, 142, 143, 144,
3580 145, 146, 147, 148, 149, 150, 151, 152, 0, 0,
3581 0, 153, 154, 155, 409, 410, 411, 412, 160, 161,
3582 162, 0, 0, 0, 0, 0, 163, 164, 165, 166,
3583 413, 414, 415, 416, 171, 37, 38, 417, 40, 0,
3584 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3585 0, 0, 0, 0, 0, 0, 173, 174, 175, 176,
3586 177, 178, 179, 180, 181, 0, 0, 182, 183, 0,
3587 0, 0, 0, 184, 185, 186, 187, 0, 0, 0,
3588 0, 0, 0, 0, 0, 0, 0, 0, 188, 189,
3589 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3590 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3591 190, 191, 192, 193, 194, 195, 196, 197, 198, 199,
3592 0, 200, 201, 0, 0, 0, 0, 0, 202, 418,
3593 129, 130, 131, 132, 133, 134, 135, 136, 137, 138,
3594 139, 140, 141, 142, 143, 144, 145, 146, 147, 148,
3595 149, 150, 151, 152, 0, 0, 0, 153, 154, 155,
3596 156, 157, 158, 159, 160, 161, 162, 0, 0, 0,
3597 0, 0, 163, 164, 165, 166, 167, 168, 169, 170,
3598 171, 293, 294, 172, 295, 0, 0, 0, 0, 0,
3599 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3600 0, 0, 173, 174, 175, 176, 177, 178, 179, 180,
3601 181, 0, 0, 182, 183, 0, 0, 0, 0, 184,
3602 185, 186, 187, 0, 0, 0, 0, 0, 0, 0,
3603 0, 0, 0, 0, 188, 189, 0, 0, 0, 0,
3604 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3605 0, 0, 0, 0, 0, 0, 190, 191, 192, 193,
3606 194, 195, 196, 197, 198, 199, 0, 200, 201, 0,
3607 0, 0, 0, 0, 202, 129, 130, 131, 132, 133,
3608 134, 135, 136, 137, 138, 139, 140, 141, 142, 143,
3609 144, 145, 146, 147, 148, 149, 150, 151, 152, 0,
3610 0, 0, 153, 154, 155, 156, 157, 158, 159, 160,
3611 161, 162, 0, 0, 0, 0, 0, 163, 164, 165,
3612 166, 167, 168, 169, 170, 171, 242, 0, 172, 0,
3613 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3614 0, 0, 0, 0, 0, 0, 0, 173, 174, 175,
3615 176, 177, 178, 179, 180, 181, 0, 0, 182, 183,
3616 0, 0, 0, 0, 184, 185, 186, 187, 0, 0,
3617 0, 0, 0, 0, 0, 0, 0, 0, 0, 188,
3618 189, 0, 0, 59, 0, 0, 0, 0, 0, 0,
3619 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3620 0, 190, 191, 192, 193, 194, 195, 196, 197, 198,
3621 199, 0, 200, 201, 0, 0, 0, 0, 0, 202,
3622 129, 130, 131, 132, 133, 134, 135, 136, 137, 138,
3623 139, 140, 141, 142, 143, 144, 145, 146, 147, 148,
3624 149, 150, 151, 152, 0, 0, 0, 153, 154, 155,
3625 156, 157, 158, 159, 160, 161, 162, 0, 0, 0,
3626 0, 0, 163, 164, 165, 166, 167, 168, 169, 170,
3627 171, 0, 0, 172, 0, 0, 0, 0, 0, 0,
3628 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3629 0, 0, 173, 174, 175, 176, 177, 178, 179, 180,
3630 181, 0, 0, 182, 183, 0, 0, 0, 0, 184,
3631 185, 186, 187, 0, 0, 0, 0, 0, 0, 0,
3632 0, 0, 0, 0, 188, 189, 0, 0, 59, 0,
3633 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3634 0, 0, 0, 0, 0, 0, 190, 191, 192, 193,
3635 194, 195, 196, 197, 198, 199, 0, 200, 201, 0,
3636 0, 0, 0, 0, 202, 129, 130, 131, 132, 133,
3637 134, 135, 136, 137, 138, 139, 140, 141, 142, 143,
3638 144, 145, 146, 147, 148, 149, 150, 151, 152, 0,
3639 0, 0, 153, 154, 155, 156, 157, 158, 159, 160,
3640 161, 162, 0, 0, 0, 0, 0, 163, 164, 165,
3641 166, 167, 168, 169, 170, 171, 0, 0, 172, 0,
3642 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3643 0, 0, 0, 0, 0, 0, 0, 173, 174, 175,
3644 176, 177, 178, 179, 180, 181, 0, 0, 182, 183,
3645 0, 0, 0, 0, 184, 185, 186, 187, 0, 0,
3646 0, 0, 0, 0, 0, 0, 0, 0, 0, 188,
3647 189, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3648 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3649 0, 190, 191, 192, 193, 194, 195, 196, 197, 198,
3650 199, 0, 200, 201, 5, 6, 7, 0, 9, 202,
3651 0, 0, 10, 11, 0, 0, 0, 12, 0, 13,
3652 14, 15, 248, 249, 18, 19, 0, 0, 0, 0,
3653 0, 20, 250, 251, 23, 24, 25, 26, 0, 0,
3654 209, 0, 0, 0, 0, 0, 0, 280, 0, 0,
3655 32, 33, 34, 35, 36, 37, 38, 39, 40, 0,
3656 41, 42, 43, 44, 45, 46, 47, 0, 0, 0,
3657 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3658 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3659 0, 0, 0, 0, 0, 0, 0, 0, 0, 281,
3660 0, 0, 212, 54, 0, 55, 56, 0, 0, 0,
3661 0, 58, 59, 60, 61, 62, 63, 64, 65, 66,
3662 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3663 0, 0, 0, 5, 6, 7, 0, 9, 0, 0,
3664 282, 10, 11, 0, 0, 0, 12, 283, 13, 14,
3665 15, 248, 249, 18, 19, 0, 0, 0, 0, 0,
3666 20, 250, 251, 23, 24, 25, 26, 0, 0, 209,
3667 0, 0, 0, 0, 0, 0, 280, 0, 0, 32,
3668 33, 34, 35, 36, 37, 38, 39, 40, 0, 41,
3669 42, 43, 44, 45, 46, 47, 0, 0, 0, 0,
3670 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3671 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3672 0, 0, 0, 0, 0, 0, 0, 0, 281, 0,
3673 0, 212, 54, 0, 55, 56, 0, 0, 0, 0,
3674 58, 59, 60, 61, 62, 63, 64, 65, 66, 0,
3675 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3676 0, 0, 5, 6, 7, 8, 9, 0, 0, 282,
3677 10, 11, 0, 0, 0, 12, 580, 13, 14, 15,
3678 16, 17, 18, 19, 0, 0, 0, 0, 0, 20,
3679 21, 22, 23, 24, 25, 26, 0, 0, 27, 0,
3680 0, 0, 0, 0, 28, 29, 30, 31, 32, 33,
3681 34, 35, 36, 37, 38, 39, 40, 0, 41, 42,
3682 43, 44, 45, 46, 47, 0, 0, 0, 0, 0,
3683 0, 0, 0, 0, 48, 49, 0, 0, 0, 0,
3684 0, 0, 0, 0, 0, 0, 0, 0, 0, 50,
3685 51, 0, 0, 0, 0, 0, 0, 52, 0, 0,
3686 53, 54, 0, 55, 56, 0, 57, 0, 0, 58,
3687 59, 60, 61, 62, 63, 64, 65, 66, 0, 0,
3688 0, 0, 0, 0, 0, 0, 0, 0, 5, 6,
3689 7, 0, 9, 0, 0, 0, 10, 11, 67, 68,
3690 69, 12, 0, 13, 14, 15, 16, 17, 18, 19,
3691 0, 0, 0, 0, 0, 20, 21, 22, 23, 24,
3692 25, 26, 0, 0, 209, 0, 0, 0, 0, 0,
3693 0, 29, 0, 0, 32, 33, 34, 35, 36, 37,
3694 38, 39, 40, 210, 41, 42, 43, 44, 45, 46,
3695 47, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3696 48, 49, 0, 0, 0, 0, 0, 0, 0, 0,
3697 0, 0, 0, 0, 0, 50, 51, 0, 0, 0,
3698 0, 0, 0, 211, 0, 0, 212, 54, 0, 55,
3699 56, 0, 213, 214, 215, 58, 59, 216, 61, 62,
3700 63, 64, 65, 66, 0, 0, 0, 0, 0, 0,
3701 0, 0, 0, 0, 5, 6, 7, 8, 9, 0,
3702 0, 0, 10, 11, 67, 217, 69, 12, 0, 13,
3703 14, 15, 16, 17, 18, 19, 0, 0, 0, 0,
3704 0, 20, 21, 22, 23, 24, 25, 26, 0, 0,
3705 27, 0, 0, 0, 0, 0, 28, 29, 0, 31,
3706 32, 33, 34, 35, 36, 37, 38, 39, 40, 0,
3707 41, 42, 43, 44, 45, 46, 47, 0, 0, 0,
3708 0, 0, 0, 0, 0, 0, 48, 49, 0, 0,
3709 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3710 0, 50, 51, 0, 0, 0, 0, 0, 0, 52,
3711 0, 0, 53, 54, 0, 55, 56, 0, 57, 0,
3712 0, 58, 59, 60, 61, 62, 63, 64, 65, 66,
3713 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3714 5, 6, 7, 0, 9, 0, 0, 0, 10, 11,
3715 67, 68, 69, 12, 0, 13, 14, 15, 16, 17,
3716 18, 19, 0, 0, 0, 0, 0, 20, 21, 22,
3717 23, 24, 25, 26, 0, 0, 209, 0, 0, 0,
3718 0, 0, 0, 29, 0, 0, 32, 33, 34, 35,
3719 36, 37, 38, 39, 40, 210, 41, 42, 43, 44,
3720 45, 46, 47, 0, 0, 0, 0, 0, 0, 0,
3721 0, 0, 48, 49, 0, 0, 0, 0, 0, 0,
3722 0, 0, 0, 0, 0, 0, 0, 50, 454, 0,
3723 0, 0, 0, 0, 0, 211, 0, 0, 212, 54,
3724 0, 55, 56, 0, 213, 214, 215, 58, 59, 216,
3725 61, 62, 63, 64, 65, 66, 0, 0, 0, 0,
3726 0, 0, 0, 0, 0, 0, 5, 6, 7, 0,
3727 9, 0, 0, 0, 10, 11, 67, 217, 69, 12,
3728 0, 13, 14, 15, 248, 249, 18, 19, 0, 0,
3729 0, 0, 0, 20, 250, 251, 23, 24, 25, 26,
3730 0, 0, 209, 0, 0, 0, 0, 0, 0, 29,
3731 0, 0, 32, 33, 34, 35, 36, 37, 38, 39,
3732 40, 210, 41, 42, 43, 44, 45, 46, 47, 0,
3733 0, 0, 0, 0, 0, 0, 0, 0, 48, 49,
3734 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3735 0, 0, 0, 50, 51, 0, 0, 0, 0, 0,
3736 0, 211, 0, 0, 212, 54, 0, 55, 56, 0,
3737 663, 214, 215, 58, 59, 216, 61, 62, 63, 64,
3738 65, 66, 0, 0, 0, 0, 0, 0, 0, 0,
3739 0, 0, 5, 6, 7, 0, 9, 0, 0, 0,
3740 10, 11, 67, 217, 69, 12, 0, 13, 14, 15,
3741 248, 249, 18, 19, 0, 0, 0, 0, 0, 20,
3742 250, 251, 23, 24, 25, 26, 0, 0, 209, 0,
3743 0, 0, 0, 0, 0, 29, 0, 0, 32, 33,
3744 34, 35, 36, 37, 38, 39, 40, 210, 41, 42,
3745 43, 44, 45, 46, 47, 0, 0, 0, 0, 0,
3746 0, 0, 0, 0, 48, 49, 0, 0, 0, 0,
3747 0, 0, 0, 0, 0, 0, 0, 0, 0, 50,
3748 454, 0, 0, 0, 0, 0, 0, 211, 0, 0,
3749 212, 54, 0, 55, 56, 0, 663, 214, 215, 58,
3750 59, 216, 61, 62, 63, 64, 65, 66, 0, 0,
3751 0, 0, 0, 0, 0, 0, 0, 0, 5, 6,
3752 7, 0, 9, 0, 0, 0, 10, 11, 67, 217,
3753 69, 12, 0, 13, 14, 15, 248, 249, 18, 19,
3754 0, 0, 0, 0, 0, 20, 250, 251, 23, 24,
3755 25, 26, 0, 0, 209, 0, 0, 0, 0, 0,
3756 0, 29, 0, 0, 32, 33, 34, 35, 36, 37,
3757 38, 39, 40, 210, 41, 42, 43, 44, 45, 46,
3758 47, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3759 48, 49, 0, 0, 0, 0, 0, 0, 0, 0,
3760 0, 0, 0, 0, 0, 50, 51, 0, 0, 0,
3761 0, 0, 0, 211, 0, 0, 212, 54, 0, 55,
3762 56, 0, 213, 214, 0, 58, 59, 216, 61, 62,
3763 63, 64, 65, 66, 0, 0, 0, 0, 0, 0,
3764 0, 0, 0, 0, 5, 6, 7, 0, 9, 0,
3765 0, 0, 10, 11, 67, 217, 69, 12, 0, 13,
3766 14, 15, 248, 249, 18, 19, 0, 0, 0, 0,
3767 0, 20, 250, 251, 23, 24, 25, 26, 0, 0,
3768 209, 0, 0, 0, 0, 0, 0, 29, 0, 0,
3769 32, 33, 34, 35, 36, 37, 38, 39, 40, 210,
3770 41, 42, 43, 44, 45, 46, 47, 0, 0, 0,
3771 0, 0, 0, 0, 0, 0, 48, 49, 0, 0,
3772 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3773 0, 50, 51, 0, 0, 0, 0, 0, 0, 211,
3774 0, 0, 212, 54, 0, 55, 56, 0, 0, 214,
3775 215, 58, 59, 216, 61, 62, 63, 64, 65, 66,
3776 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3777 5, 6, 7, 0, 9, 0, 0, 0, 10, 11,
3778 67, 217, 69, 12, 0, 13, 14, 15, 248, 249,
3779 18, 19, 0, 0, 0, 0, 0, 20, 250, 251,
3780 23, 24, 25, 26, 0, 0, 209, 0, 0, 0,
3781 0, 0, 0, 29, 0, 0, 32, 33, 34, 35,
3782 36, 37, 38, 39, 40, 210, 41, 42, 43, 44,
3783 45, 46, 47, 0, 0, 0, 0, 0, 0, 0,
3784 0, 0, 48, 49, 0, 0, 0, 0, 0, 0,
3785 0, 0, 0, 0, 0, 0, 0, 50, 51, 0,
3786 0, 0, 0, 0, 0, 211, 0, 0, 212, 54,
3787 0, 55, 56, 0, 663, 214, 0, 58, 59, 216,
3788 61, 62, 63, 64, 65, 66, 0, 0, 0, 0,
3789 0, 0, 0, 0, 0, 0, 5, 6, 7, 0,
3790 9, 0, 0, 0, 10, 11, 67, 217, 69, 12,
3791 0, 13, 14, 15, 248, 249, 18, 19, 0, 0,
3792 0, 0, 0, 20, 250, 251, 23, 24, 25, 26,
3793 0, 0, 209, 0, 0, 0, 0, 0, 0, 29,
3794 0, 0, 32, 33, 34, 35, 36, 37, 38, 39,
3795 40, 210, 41, 42, 43, 44, 45, 46, 47, 0,
3796 0, 0, 0, 0, 0, 0, 0, 0, 48, 49,
3797 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3798 0, 0, 0, 50, 51, 0, 0, 0, 0, 0,
3799 0, 211, 0, 0, 212, 54, 0, 55, 56, 0,
3800 0, 214, 0, 58, 59, 216, 61, 62, 63, 64,
3801 65, 66, 0, 0, 0, 0, 0, 0, 0, 0,
3802 0, 0, 5, 6, 7, 0, 9, 0, 0, 0,
3803 10, 11, 67, 217, 69, 12, 0, 13, 14, 15,
3804 16, 17, 18, 19, 0, 0, 0, 0, 0, 20,
3805 21, 22, 23, 24, 25, 26, 0, 0, 209, 0,
3806 0, 0, 0, 0, 0, 29, 0, 0, 32, 33,
3807 34, 35, 36, 37, 38, 39, 40, 0, 41, 42,
3808 43, 44, 45, 46, 47, 0, 0, 0, 0, 0,
3809 0, 0, 0, 0, 48, 49, 0, 0, 0, 0,
3810 0, 0, 0, 0, 0, 0, 0, 0, 0, 50,
3811 51, 0, 0, 0, 0, 0, 0, 211, 0, 0,
3812 212, 54, 0, 55, 56, 0, 758, 0, 0, 58,
3813 59, 60, 61, 62, 63, 64, 65, 66, 0, 0,
3814 0, 0, 0, 0, 0, 0, 0, 0, 5, 6,
3815 7, 0, 9, 0, 0, 0, 10, 11, 67, 217,
3816 69, 12, 0, 13, 14, 15, 248, 249, 18, 19,
3817 0, 0, 0, 0, 0, 20, 250, 251, 23, 24,
3818 25, 26, 0, 0, 209, 0, 0, 0, 0, 0,
3819 0, 29, 0, 0, 32, 33, 34, 35, 36, 37,
3820 38, 39, 40, 0, 41, 42, 43, 44, 45, 46,
3821 47, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3822 48, 49, 0, 0, 0, 0, 0, 0, 0, 0,
3823 0, 0, 0, 0, 0, 50, 51, 0, 0, 0,
3824 0, 0, 0, 211, 0, 0, 212, 54, 0, 55,
3825 56, 0, 758, 0, 0, 58, 59, 60, 61, 62,
3826 63, 64, 65, 66, 0, 0, 0, 0, 0, 0,
3827 0, 0, 0, 0, 5, 6, 7, 0, 9, 0,
3828 0, 0, 10, 11, 67, 217, 69, 12, 0, 13,
3829 14, 15, 248, 249, 18, 19, 0, 0, 0, 0,
3830 0, 20, 250, 251, 23, 24, 25, 26, 0, 0,
3831 209, 0, 0, 0, 0, 0, 0, 29, 0, 0,
3832 32, 33, 34, 35, 36, 37, 38, 39, 40, 0,
3833 41, 42, 43, 44, 45, 46, 47, 0, 0, 0,
3834 0, 0, 0, 0, 0, 0, 48, 49, 0, 0,
3835 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3836 0, 50, 51, 0, 0, 0, 0, 0, 0, 211,
3837 0, 0, 212, 54, 0, 55, 56, 0, 955, 0,
3838 0, 58, 59, 60, 61, 62, 63, 64, 65, 66,
3839 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3840 5, 6, 7, 0, 9, 0, 0, 0, 10, 11,
3841 67, 217, 69, 12, 0, 13, 14, 15, 248, 249,
3842 18, 19, 0, 0, 0, 0, 0, 20, 250, 251,
3843 23, 24, 25, 26, 0, 0, 209, 0, 0, 0,
3844 0, 0, 0, 29, 0, 0, 32, 33, 34, 35,
3845 36, 37, 38, 39, 40, 0, 41, 42, 43, 44,
3846 45, 46, 47, 0, 0, 0, 0, 0, 0, 0,
3847 0, 0, 48, 49, 0, 0, 0, 0, 0, 0,
3848 0, 0, 0, 0, 0, 0, 0, 50, 51, 0,
3849 0, 0, 0, 0, 0, 211, 0, 0, 212, 54,
3850 0, 55, 56, 0, 1008, 0, 0, 58, 59, 60,
3851 61, 62, 63, 64, 65, 66, 0, 0, 0, 0,
3852 0, 0, 0, 0, 0, 0, 5, 6, 7, 0,
3853 9, 0, 0, 0, 10, 11, 67, 217, 69, 12,
3854 0, 13, 14, 15, 248, 249, 18, 19, 0, 0,
3855 0, 0, 0, 20, 250, 251, 23, 24, 25, 26,
3856 0, 0, 209, 0, 0, 0, 0, 0, 0, 29,
3857 0, 0, 32, 33, 34, 35, 36, 37, 38, 39,
3858 40, 0, 41, 42, 43, 44, 45, 46, 47, 0,
3859 0, 0, 0, 0, 0, 0, 0, 0, 48, 49,
3860 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3861 0, 0, 0, 50, 51, 0, 0, 0, 0, 0,
3862 0, 211, 0, 0, 212, 54, 0, 55, 56, 0,
3863 1152, 0, 0, 58, 59, 60, 61, 62, 63, 64,
3864 65, 66, 0, 0, 0, 0, 0, 0, 0, 0,
3865 0, 0, 5, 6, 7, 0, 9, 0, 0, 0,
3866 10, 11, 67, 217, 69, 12, 0, 13, 14, 15,
3867 248, 249, 18, 19, 0, 0, 0, 0, 0, 20,
3868 250, 251, 23, 24, 25, 26, 0, 0, 209, 0,
3869 0, 0, 0, 0, 0, 29, 0, 0, 32, 33,
3870 34, 35, 36, 37, 38, 39, 40, 0, 41, 42,
3871 43, 44, 45, 46, 47, 0, 0, 0, 0, 0,
3872 0, 0, 0, 0, 48, 49, 0, 0, 0, 0,
3873 0, 0, 0, 0, 0, 0, 0, 0, 0, 50,
3874 51, 0, 0, 0, 0, 0, 0, 211, 0, 0,
3875 212, 54, 0, 55, 56, 0, 0, 0, 0, 58,
3876 59, 60, 61, 62, 63, 64, 65, 66, 0, 0,
3877 0, 0, 0, 0, 0, 0, 0, 0, 5, 6,
3878 7, 0, 9, 0, 0, 0, 10, 11, 67, 217,
3879 69, 12, 0, 13, 14, 15, 16, 17, 18, 19,
3880 0, 0, 0, 0, 0, 20, 21, 22, 23, 24,
3881 25, 26, 0, 0, 209, 0, 0, 0, 0, 0,
3882 0, 29, 0, 0, 32, 33, 34, 35, 36, 37,
3883 38, 39, 40, 0, 41, 42, 43, 44, 45, 46,
3884 47, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3885 48, 49, 0, 0, 0, 0, 0, 0, 0, 0,
3886 0, 0, 0, 0, 0, 50, 51, 0, 0, 0,
3887 0, 0, 0, 211, 0, 0, 212, 54, 0, 55,
3888 56, 0, 0, 0, 0, 58, 59, 60, 61, 62,
3889 63, 64, 65, 66, 0, 0, 0, 0, 0, 0,
3890 0, 0, 0, 0, 5, 6, 7, 0, 9, 0,
3891 0, 0, 10, 11, 67, 217, 69, 12, 0, 13,
3892 14, 15, 16, 17, 18, 19, 0, 0, 0, 0,
3893 0, 20, 21, 22, 23, 24, 25, 26, 0, 0,
3894 27, 0, 0, 0, 0, 0, 0, 29, 0, 0,
3895 32, 33, 34, 35, 36, 37, 38, 39, 40, 0,
3896 41, 42, 43, 44, 45, 46, 47, 0, 0, 0,
3897 0, 0, 0, 0, 0, 0, 48, 49, 0, 0,
3898 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3899 0, 50, 51, 0, 0, 0, 0, 0, 0, 211,
3900 0, 0, 212, 54, 0, 55, 56, 0, 0, 0,
3901 0, 58, 59, 60, 61, 62, 63, 64, 65, 66,
3902 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3903 5, 6, 7, 0, 9, 0, 0, 0, 10, 11,
3904 67, 68, 69, 12, 0, 13, 14, 15, 248, 249,
3905 18, 19, 0, 0, 0, 0, 0, 20, 250, 251,
3906 23, 24, 25, 26, 0, 0, 209, 0, 0, 0,
3907 0, 0, 0, 280, 0, 0, 32, 33, 34, 35,
3908 36, 37, 38, 39, 40, 0, 41, 42, 43, 44,
3909 45, 46, 47, 0, 0, 0, 0, 0, 0, 0,
3910 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3911 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3912 0, 0, 0, 0, 0, 281, 0, 0, 341, 54,
3913 0, 55, 56, 0, 342, 0, 0, 58, 59, 60,
3914 61, 62, 63, 64, 65, 66, 0, 0, 0, 0,
3915 0, 0, 5, 6, 7, 0, 9, 0, 0, 0,
3916 10, 11, 0, 0, 0, 12, 282, 13, 14, 15,
3917 248, 249, 18, 19, 0, 0, 0, 0, 0, 20,
3918 250, 251, 23, 24, 25, 26, 0, 0, 209, 0,
3919 0, 0, 0, 0, 0, 280, 0, 0, 32, 33,
3920 34, 35, 36, 37, 38, 39, 40, 0, 41, 42,
3921 43, 44, 45, 46, 47, 0, 0, 0, 0, 0,
3922 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3923 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3924 0, 0, 0, 0, 0, 0, 0, 390, 0, 0,
3925 53, 54, 0, 55, 56, 0, 57, 0, 0, 58,
3926 59, 60, 61, 62, 63, 64, 65, 66, 0, 0,
3927 0, 0, 0, 0, 5, 6, 7, 0, 9, 0,
3928 0, 0, 10, 11, 0, 0, 0, 12, 282, 13,
3929 14, 15, 248, 249, 18, 19, 0, 0, 0, 0,
3930 0, 20, 250, 251, 23, 24, 25, 26, 0, 0,
3931 209, 0, 0, 0, 0, 0, 0, 280, 0, 0,
3932 32, 33, 34, 398, 36, 37, 38, 399, 40, 0,
3933 41, 42, 43, 44, 45, 46, 47, 0, 0, 0,
3934 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3935 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3936 0, 0, 0, 0, 0, 400, 0, 0, 0, 401,
3937 0, 0, 212, 54, 0, 55, 56, 0, 0, 0,
3938 0, 58, 59, 60, 61, 62, 63, 64, 65, 66,
3939 0, 0, 0, 0, 0, 0, 5, 6, 7, 0,
3940 9, 0, 0, 0, 10, 11, 0, 0, 0, 12,
3941 282, 13, 14, 15, 248, 249, 18, 19, 0, 0,
3942 0, 0, 0, 20, 250, 251, 23, 24, 25, 26,
3943 0, 0, 209, 0, 0, 0, 0, 0, 0, 280,
3944 0, 0, 32, 33, 34, 398, 36, 37, 38, 399,
3945 40, 0, 41, 42, 43, 44, 45, 46, 47, 0,
3946 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3947 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3948 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3949 0, 401, 0, 0, 212, 54, 0, 55, 56, 0,
3950 0, 0, 0, 58, 59, 60, 61, 62, 63, 64,
3951 65, 66, 0, 0, 0, 0, 0, 0, 5, 6,
3952 7, 0, 9, 0, 0, 0, 10, 11, 0, 0,
3953 0, 12, 282, 13, 14, 15, 248, 249, 18, 19,
3954 0, 0, 0, 0, 0, 20, 250, 251, 23, 24,
3955 25, 26, 0, 0, 209, 0, 0, 0, 0, 0,
3956 0, 280, 0, 0, 32, 33, 34, 35, 36, 37,
3957 38, 39, 40, 0, 41, 42, 43, 44, 45, 46,
3958 47, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3959 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3960 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3961 0, 0, 0, 281, 0, 0, 341, 54, 0, 55,
3962 56, 0, 0, 0, 0, 58, 59, 60, 61, 62,
3963 63, 64, 65, 66, 0, 0, 0, 0, 0, 0,
3964 5, 6, 7, 0, 9, 0, 0, 0, 10, 11,
3965 0, 0, 0, 12, 282, 13, 14, 15, 248, 249,
3966 18, 19, 0, 0, 0, 0, 0, 20, 250, 251,
3967 23, 24, 25, 26, 0, 0, 209, 0, 0, 0,
3968 0, 0, 0, 280, 0, 0, 32, 33, 34, 35,
3969 36, 37, 38, 39, 40, 0, 41, 42, 43, 44,
3970 45, 46, 47, 0, 0, 0, 0, 0, 0, 0,
3971 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3972 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3973 0, 0, 0, 0, 0, 1084, 0, 0, 212, 54,
3974 0, 55, 56, 0, 0, 0, 0, 58, 59, 60,
3975 61, 62, 63, 64, 65, 66, 0, 0, 0, 0,
3976 0, 0, 5, 6, 7, 0, 9, 0, 0, 0,
3977 10, 11, 0, 0, 0, 12, 282, 13, 14, 15,
3978 248, 249, 18, 19, 0, 0, 0, 0, 0, 20,
3979 250, 251, 23, 24, 25, 26, 0, 0, 209, 0,
3980 0, 0, 0, 0, 0, 280, 0, 0, 32, 33,
3981 34, 35, 36, 37, 38, 39, 40, 0, 41, 42,
3982 43, 44, 45, 46, 47, 23, 24, 25, 26, 0,
3983 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3984 0, 32, 33, 34, 906, 0, 0, 0, 907, 0,
3985 0, 41, 42, 43, 44, 45, 0, 1180, 0, 0,
3986 212, 54, 0, 55, 56, 0, 0, 0, 0, 58,
3987 59, 60, 61, 62, 63, 64, 65, 66, 0, 0,
3988 0, 0, 908, 909, 0, 0, 0, 0, 0, 0,
3989 910, 0, 0, 911, 0, 0, 912, 913, 282, 1112,
3990 0, 0, 58, 59, 60, 61, 62, 63, 64, 65,
3991 66, 23, 24, 25, 26, 0, 0, 0, 0, 0,
3992 0, 0, 0, 0, 914, 0, 0, 32, 33, 34,
3993 906, 282, 0, 0, 907, 0, 0, 41, 42, 43,
3994 44, 45, 0, 0, 0, 0, 0, 0, 0, 0,
3995 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3996 0, 0, 0, 0, 0, 0, 0, 0, 908, 909,
3997 0, 0, 0, 0, 0, 0, 910, 0, 0, 911,
3998 0, 0, 912, 913, 0, 1024, 0, 0, 58, 59,
3999 60, 61, 62, 63, 64, 65, 66, 610, 611, 0,
4000 0, 612, 0, 0, 0, 0, 0, 0, 0, 0,
4001 914, 0, 0, 0, 0, 0, 0, 282, 0, 0,
4002 173, 174, 175, 176, 177, 178, 179, 180, 181, 0,
4003 0, 182, 183, 0, 0, 0, 0, 184, 185, 186,
4004 187, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4005 0, 0, 188, 189, 0, 0, 0, 0, 0, 0,
4006 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4007 0, 0, 0, 0, 190, 191, 192, 193, 194, 195,
4008 196, 197, 198, 199, 0, 200, 201, 619, 620, 0,
4009 0, 621, 202, 236, 0, 0, 0, 0, 0, 0,
4010 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4011 173, 174, 175, 176, 177, 178, 179, 180, 181, 0,
4012 0, 182, 183, 0, 0, 0, 0, 184, 185, 186,
4013 187, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4014 0, 0, 188, 189, 0, 0, 0, 0, 0, 0,
4015 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4016 0, 0, 0, 0, 190, 191, 192, 193, 194, 195,
4017 196, 197, 198, 199, 0, 200, 201, 667, 611, 0,
4018 0, 668, 202, 236, 0, 0, 0, 0, 0, 0,
4019 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4020 173, 174, 175, 176, 177, 178, 179, 180, 181, 0,
4021 0, 182, 183, 0, 0, 0, 0, 184, 185, 186,
4022 187, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4023 0, 0, 188, 189, 0, 0, 0, 0, 0, 0,
4024 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4025 0, 0, 0, 0, 190, 191, 192, 193, 194, 195,
4026 196, 197, 198, 199, 0, 200, 201, 670, 620, 0,
4027 0, 671, 202, 236, 0, 0, 0, 0, 0, 0,
4028 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4029 173, 174, 175, 176, 177, 178, 179, 180, 181, 0,
4030 0, 182, 183, 0, 0, 0, 0, 184, 185, 186,
4031 187, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4032 0, 0, 188, 189, 0, 0, 0, 0, 0, 0,
4033 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4034 0, 0, 0, 0, 190, 191, 192, 193, 194, 195,
4035 196, 197, 198, 199, 0, 200, 201, 697, 611, 0,
4036 0, 698, 202, 236, 0, 0, 0, 0, 0, 0,
4037 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4038 173, 174, 175, 176, 177, 178, 179, 180, 181, 0,
4039 0, 182, 183, 0, 0, 0, 0, 184, 185, 186,
4040 187, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4041 0, 0, 188, 189, 0, 0, 0, 0, 0, 0,
4042 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4043 0, 0, 0, 0, 190, 191, 192, 193, 194, 195,
4044 196, 197, 198, 199, 0, 200, 201, 700, 620, 0,
4045 0, 701, 202, 236, 0, 0, 0, 0, 0, 0,
4046 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4047 173, 174, 175, 176, 177, 178, 179, 180, 181, 0,
4048 0, 182, 183, 0, 0, 0, 0, 184, 185, 186,
4049 187, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4050 0, 0, 188, 189, 0, 0, 0, 0, 0, 0,
4051 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4052 0, 0, 0, 0, 190, 191, 192, 193, 194, 195,
4053 196, 197, 198, 199, 0, 200, 201, 808, 611, 0,
4054 0, 809, 202, 236, 0, 0, 0, 0, 0, 0,
4055 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4056 173, 174, 175, 176, 177, 178, 179, 180, 181, 0,
4057 0, 182, 183, 0, 0, 0, 0, 184, 185, 186,
4058 187, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4059 0, 0, 188, 189, 0, 0, 0, 0, 0, 0,
4060 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4061 0, 0, 0, 0, 190, 191, 192, 193, 194, 195,
4062 196, 197, 198, 199, 0, 200, 201, 811, 620, 0,
4063 0, 812, 202, 236, 0, 0, 0, 0, 0, 0,
4064 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4065 173, 174, 175, 176, 177, 178, 179, 180, 181, 0,
4066 0, 182, 183, 0, 0, 0, 0, 184, 185, 186,
4067 187, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4068 0, 0, 188, 189, 0, 0, 0, 0, 0, 0,
4069 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4070 0, 0, 0, 0, 190, 191, 192, 193, 194, 195,
4071 196, 197, 198, 199, 0, 200, 201, 817, 611, 0,
4072 0, 818, 202, 236, 0, 0, 0, 0, 0, 0,
4073 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4074 173, 174, 175, 176, 177, 178, 179, 180, 181, 0,
4075 0, 182, 183, 0, 0, 0, 0, 184, 185, 186,
4076 187, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4077 0, 0, 188, 189, 0, 0, 0, 0, 0, 0,
4078 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4079 0, 0, 0, 0, 190, 191, 192, 193, 194, 195,
4080 196, 197, 198, 199, 0, 200, 201, 654, 620, 0,
4081 0, 655, 202, 236, 0, 0, 0, 0, 0, 0,
4082 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4083 173, 174, 175, 176, 177, 178, 179, 180, 181, 0,
4084 0, 182, 183, 0, 0, 0, 0, 184, 185, 186,
4085 187, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4086 0, 0, 188, 189, 0, 0, 0, 0, 0, 0,
4087 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4088 0, 0, 0, 0, 190, 191, 192, 193, 194, 195,
4089 196, 197, 198, 199, 0, 200, 201, 1014, 611, 0,
4090 0, 1015, 202, 236, 0, 0, 0, 0, 0, 0,
4091 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4092 173, 174, 175, 176, 177, 178, 179, 180, 181, 0,
4093 0, 182, 183, 0, 0, 0, 0, 184, 185, 186,
4094 187, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4095 0, 0, 188, 189, 0, 0, 0, 0, 0, 0,
4096 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4097 0, 0, 0, 0, 190, 191, 192, 193, 194, 195,
4098 196, 197, 198, 199, 0, 200, 201, 1017, 620, 0,
4099 0, 1018, 202, 236, 0, 0, 0, 0, 0, 0,
4100 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4101 173, 174, 175, 176, 177, 178, 179, 180, 181, 0,
4102 0, 182, 183, 0, 0, 0, 0, 184, 185, 186,
4103 187, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4104 0, 0, 188, 189, 0, 0, 0, 0, 0, 0,
4105 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4106 0, 0, 0, 0, 190, 191, 192, 193, 194, 195,
4107 196, 197, 198, 199, 0, 200, 201, 1224, 611, 0,
4108 0, 1225, 202, 236, 0, 0, 0, 0, 0, 0,
4109 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4110 173, 174, 175, 176, 177, 178, 179, 180, 181, 0,
4111 0, 182, 183, 0, 0, 0, 0, 184, 185, 186,
4112 187, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4113 0, 0, 188, 189, 0, 0, 0, 0, 0, 0,
4114 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4115 0, 0, 0, 0, 190, 191, 192, 193, 194, 195,
4116 196, 197, 198, 199, 0, 200, 201, 1227, 620, 0,
4117 0, 1228, 202, 236, 0, 0, 0, 0, 0, 0,
4118 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4119 173, 174, 175, 176, 177, 178, 179, 180, 181, 0,
4120 0, 182, 183, 0, 0, 0, 0, 184, 185, 186,
4121 187, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4122 0, 0, 188, 189, 0, 0, 0, 0, 0, 0,
4123 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4124 0, 0, 0, 0, 190, 191, 192, 193, 194, 195,
4125 196, 197, 198, 199, 0, 200, 201, 1264, 611, 0,
4126 0, 1265, 202, 236, 0, 0, 0, 0, 0, 0,
4127 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4128 173, 174, 175, 176, 177, 178, 179, 180, 181, 0,
4129 0, 182, 183, 0, 0, 0, 0, 184, 185, 186,
4130 187, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4131 0, 0, 188, 189, 0, 0, 0, 0, 0, 0,
4132 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4133 0, 0, 0, 0, 190, 191, 192, 193, 194, 195,
4134 196, 197, 198, 199, 0, 200, 201, 654, 620, 0,
4135 0, 655, 202, 236, 0, 0, 0, 0, 0, 0,
4136 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4137 173, 174, 175, 176, 177, 178, 179, 180, 181, 0,
4138 0, 182, 183, 0, 0, 0, 0, 184, 185, 186,
4139 187, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4140 0, 0, 188, 189, 0, 0, 0, 0, 0, 0,
4141 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4142 0, 0, 0, 0, 190, 191, 192, 193, 194, 195,
4143 196, 197, 198, 199, 0, 200, 201, 0, 0, 0,
4144 0, 0, 202
4145};
4146
4147static const yytype_int16 yycheck[] =
4148{
4149 2, 105, 4, 60, 59, 28, 91, 383, 96, 8,
4150 2, 329, 796, 53, 27, 57, 29, 401, 322, 104,
4151 274, 8, 326, 85, 278, 552, 731, 4, 378, 28,
4152 57, 16, 17, 57, 71, 735, 803, 326, 448, 230,
4153 731, 28, 377, 85, 379, 97, 101, 22, 68, 93,
4154 94, 53, 54, 97, 322, 57, 98, 99, 100, 863,
4155 97, 85, 380, 55, 56, 27, 22, 67, 71, 583,
4156 498, 2, 59, 4, 98, 99, 100, 322, 488, 865,
4157 13, 326, 728, 85, 76, 77, 77, 16, 17, 53,
4158 13, 426, 26, 557, 444, 559, 98, 99, 100, 101,
4159 1045, 1046, 13, 749, 1157, 80, 57, 26, 443, 13,
4160 445, 1190, 25, 68, 101, 25, 13, 102, 25, 322,
4161 657, 658, 262, 54, 80, 52, 55, 66, 568, 99,
4162 99, 25, 68, 573, 85, 575, 94, 669, 473, 97,
4163 225, 535, 97, 25, 728, 13, 109, 98, 99, 100,
4164 500, 735, 580, 300, 301, 0, 126, 126, 25, 216,
4165 1211, 97, 100, 440, 1243, 749, 501, 699, 56, 254,
4166 133, 448, 212, 102, 37, 38, 66, 16, 17, 728,
4167 119, 25, 121, 122, 143, 625, 13, 908, 909, 151,
4168 630, 153, 632, 1184, 1245, 239, 13, 241, 1277, 29,
4169 749, 341, 1255, 288, 25, 16, 17, 247, 1003, 143,
4170 212, 13, 264, 146, 148, 153, 55, 56, 151, 146,
4171 153, 283, 262, 13, 143, 148, 143, 264, 151, 119,
4172 153, 745, 224, 146, 13, 148, 146, 148, 230, 146,
4173 151, 283, 153, 245, 236, 247, 722, 151, 233, 153,
4174 235, 236, 146, 245, 151, 731, 153, 66, 260, 283,
4175 262, 264, 646, 102, 146, 100, 1211, 280, 459, 1260,
4176 680, 315, 316, 317, 318, 1079, 320, 321, 810, 146,
4177 153, 283, 282, 151, 1027, 153, 986, 637, 820, 1003,
4178 153, 102, 1078, 123, 285, 251, 252, 647, 262, 1094,
4179 342, 341, 146, 638, 233, 25, 235, 236, 393, 25,
4180 119, 146, 314, 648, 245, 342, 152, 319, 342, 1040,
4181 1041, 715, 716, 325, 151, 146, 153, 329, 97, 260,
4182 150, 649, 283, 153, 151, 387, 153, 314, 766, 341,
4183 342, 385, 1033, 100, 384, 991, 386, 339, 875, 151,
4184 387, 153, 344, 126, 1045, 1046, 400, 315, 316, 317,
4185 318, 151, 66, 153, 804, 66, 513, 807, 515, 152,
4186 1154, 1062, 151, 1116, 153, 148, 145, 341, 380, 148,
4187 912, 821, 384, 314, 386, 15, 378, 1154, 319, 146,
4188 146, 342, 379, 378, 233, 25, 235, 153, 702, 936,
4189 937, 678, 986, 680, 941, 942, 126, 871, 872, 152,
4190 678, 126, 876, 702, 878, 99, 880, 121, 122, 1003,
4191 121, 122, 233, 379, 235, 34, 146, 385, 148, 149,
4192 146, 146, 148, 153, 777, 778, 498, 429, 430, 426,
4193 694, 152, 126, 52, 467, 58, 438, 1190, 152, 99,
4194 68, 152, 444, 28, 446, 447, 498, 702, 445, 444,
4195 728, 99, 146, 1177, 77, 457, 66, 459, 467, 863,
4196 1184, 865, 1186, 126, 498, 666, 126, 1182, 480, 97,
4197 467, 66, 474, 728, 1016, 783, 473, 146, 126, 445,
4198 735, 1182, 1276, 791, 1026, 108, 498, 1029, 816, 112,
4199 1243, 148, 1245, 126, 749, 1196, 153, 947, 500, 786,
4200 950, 1043, 68, 953, 501, 500, 1053, 473, 580, 119,
4201 960, 121, 122, 963, 77, 52, 910, 1003, 565, 56,
4202 1273, 1177, 735, 68, 1277, 738, 121, 122, 580, 124,
4203 96, 97, 1003, 847, 99, 501, 1260, 498, 1262, 541,
4204 99, 639, 99, 1267, 904, 1269, 580, 577, 847, 706,
4205 552, 68, 97, 583, 711, 1092, 976, 68, 903, 912,
4206 905, 126, 564, 1100, 1288, 66, 67, 126, 580, 126,
4207 99, 957, 68, 136, 137, 138, 599, 627, 99, 629,
4208 97, 146, 9, 1177, 631, 96, 97, 146, 15, 146,
4209 1184, 440, 847, 112, 617, 68, 650, 126, 1140, 1141,
4210 1142, 97, 25, 68, 144, 126, 1080, 1081, 1082, 1083,
4211 52, 1267, 998, 153, 56, 627, 618, 629, 1068, 580,
4212 121, 122, 624, 695, 97, 146, 659, 657, 658, 683,
4213 615, 68, 97, 961, 145, 637, 485, 649, 577, 624,
4214 841, 638, 637, 695, 583, 647, 669, 99, 1042, 615,
4215 659, 648, 647, 151, 656, 153, 146, 54, 624, 77,
4216 97, 695, 659, 34, 666, 149, 1260, 64, 65, 153,
4217 1023, 656, 638, 1059, 1078, 1079, 699, 148, 58, 1007,
4218 775, 52, 648, 695, 1226, 66, 688, 25, 56, 976,
4219 656, 1177, 1045, 1046, 766, 68, 1182, 77, 1184, 25,
4220 1186, 1238, 126, 126, 82, 83, 1177, 100, 1158, 1062,
4221 824, 1182, 99, 1184, 766, 1186, 134, 135, 136, 137,
4222 138, 687, 688, 146, 97, 15, 149, 17, 108, 109,
4223 153, 986, 766, 146, 695, 99, 99, 99, 119, 126,
4224 121, 122, 26, 745, 746, 99, 1074, 146, 1003, 1223,
4225 99, 129, 130, 133, 766, 37, 38, 148, 823, 146,
4226 1146, 815, 126, 813, 126, 777, 778, 814, 99, 148,
4227 1123, 148, 126, 986, 1260, 988, 1262, 126, 780, 781,
4228 993, 1267, 146, 1269, 68, 787, 788, 810, 126, 1260,
4229 1003, 1262, 794, 149, 796, 126, 1267, 820, 1269, 66,
4230 126, 813, 1288, 68, 816, 766, 745, 66, 146, 1169,
4231 126, 149, 96, 97, 99, 153, 99, 1288, 1045, 1046,
4232 146, 68, 77, 149, 56, 1170, 823, 153, 68, 678,
4233 150, 96, 97, 835, 836, 1062, 838, 839, 888, 841,
4234 144, 126, 148, 126, 146, 146, 68, 815, 77, 96,
4235 97, 153, 119, 126, 121, 122, 96, 97, 1211, 143,
4236 119, 145, 121, 122, 148, 124, 14, 15, 583, 2,
4237 126, 4, 66, 875, 96, 97, 888, 26, 88, 89,
4238 145, 126, 884, 16, 17, 68, 898, 106, 900, 912,
4239 913, 893, 946, 895, 70, 945, 908, 909, 145, 901,
4240 912, 148, 904, 146, 146, 145, 936, 937, 905, 904,
4241 153, 941, 942, 96, 97, 962, 151, 1045, 1046, 68,
4242 53, 54, 1177, 145, 57, 119, 56, 121, 122, 1184,
4243 124, 40, 41, 945, 1062, 68, 344, 786, 940, 905,
4244 284, 285, 657, 658, 25, 997, 130, 96, 97, 961,
4245 1163, 1001, 85, 149, 1004, 978, 146, 898, 68, 900,
4246 93, 94, 145, 997, 97, 98, 99, 100, 146, 102,
4247 972, 1184, 52, 1186, 54, 55, 56, 57, 946, 144,
4248 1003, 144, 1012, 126, 68, 997, 96, 97, 146, 1001,
4249 68, 1086, 1004, 1016, 143, 1007, 145, 54, 55, 148,
4250 57, 146, 66, 1026, 146, 1260, 1029, 64, 65, 777,
4251 778, 1023, 96, 97, 68, 1027, 1066, 146, 96, 97,
4252 1043, 429, 430, 1053, 146, 1075, 146, 1039, 1040, 1041,
4253 438, 52, 146, 1045, 1046, 145, 997, 10, 446, 447,
4254 1090, 52, 96, 97, 8, 146, 1098, 1260, 68, 1262,
4255 1062, 144, 1119, 68, 1066, 119, 1269, 121, 122, 146,
4256 146, 145, 1074, 1075, 1098, 13, 474, 145, 25, 1136,
4257 2, 1094, 4, 17, 144, 1288, 96, 97, 1090, 212,
4258 152, 96, 97, 152, 16, 17, 1098, 146, 146, 1091,
4259 1092, 145, 44, 146, 146, 1145, 126, 1120, 1100, 44,
4260 233, 26, 235, 236, 1116, 128, 239, 150, 241, 15,
4261 1160, 1123, 245, 146, 247, 146, 52, 1140, 1141, 1142,
4262 146, 53, 54, 100, 1176, 145, 131, 260, 146, 262,
4263 145, 100, 146, 1145, 146, 131, 68, 1098, 52, 146,
4264 908, 909, 1176, 68, 912, 146, 146, 68, 1160, 52,
4265 283, 68, 1154, 146, 146, 1209, 1210, 59, 60, 61,
4266 62, 93, 94, 144, 1176, 97, 52, 1169, 151, 1171,
4267 102, 96, 97, 1170, 1169, 96, 97, 149, 1190, 96,
4268 97, 314, 315, 316, 317, 318, 319, 320, 321, 56,
4269 146, 9, 325, 131, 1217, 126, 329, 239, 144, 1211,
4270 1250, 56, 120, 1226, 1170, 1207, 68, 146, 341, 342,
4271 777, 778, 146, 146, 476, 1176, 146, 146, 143, 146,
4272 145, 936, 937, 148, 145, 267, 941, 942, 145, 271,
4273 146, 1243, 77, 1245, 96, 97, 1238, 131, 1250, 146,
4274 148, 1209, 1210, 148, 480, 378, 146, 380, 146, 94,
4275 95, 384, 385, 386, 146, 1023, 146, 146, 146, 1027,
4276 245, 1273, 146, 146, 98, 1277, 89, 400, 823, 100,
4277 656, 1039, 1040, 1041, 1276, 1207, 746, 1045, 1046, 715,
4278 212, 863, 895, 145, 1003, 1255, 1102, 1103, 133, 134,
4279 135, 136, 137, 138, 1062, 825, 571, 1012, 337, 1276,
4280 1039, 233, 1062, 235, 236, 1196, 1196, 239, 1037, 241,
4281 1171, 444, 108, 245, 1091, 247, 515, 101, 657, 658,
4282 77, 52, 731, 54, 55, 56, 57, 58, 260, 1182,
4283 262, -1, 1120, 672, 673, 1177, -1, -1, 1053, -1,
4284 -1, 908, 909, -1, -1, 912, 77, 480, 1116, 52,
4285 689, 54, 55, 56, 57, 1123, -1, -1, -1, 52,
4286 91, 54, 55, 56, 57, 498, -1, 500, -1, -1,
4287 101, -1, 780, 781, -1, -1, 107, 108, 109, 787,
4288 788, -1, 314, 315, 316, 317, 318, 319, 320, 321,
4289 -1, -1, -1, 325, -1, -1, -1, 329, 101, -1,
4290 -1, -1, 133, -1, 107, 136, -1, -1, 450, 341,
4291 -1, -1, -1, 455, -1, -1, 458, 1233, 1234, 461,
4292 -1, -1, 1190, 1239, -1, 1241, 1242, 835, 836, -1,
4293 838, 839, -1, -1, 52, 477, 54, 55, 56, 57,
4294 482, -1, -1, 1211, 577, -1, 378, 580, 380, -1,
4295 583, -1, 384, 385, 386, -1, 1023, -1, -1, -1,
4296 1027, -1, -1, 1279, 1280, 1281, 1282, -1, 400, -1,
4297 -1, -1, 1039, 1040, 1041, 1243, 1292, 1245, 1045, 1046,
4298 -1, -1, 52, 101, 54, 55, 56, 57, 58, -1,
4299 -1, -1, -1, 901, 627, 1062, 629, -1, -1, -1,
4300 -1, 543, 544, -1, 637, 1273, -1, 77, -1, 1277,
4301 -1, -1, 444, -1, 647, -1, 649, 650, 77, 2,
4302 -1, 4, -1, 77, 657, 658, 777, 778, -1, -1,
4303 -1, 101, 940, 16, 17, 94, 95, 579, 108, 109,
4304 94, 95, 40, 41, 42, 43, 44, -1, 480, 1116,
4305 683, -1, -1, -1, -1, -1, 1123, -1, -1, -1,
4306 -1, -1, 695, 133, 972, -1, -1, -1, 500, -1,
4307 53, 54, 131, 132, 133, 134, 135, 136, 137, 138,
4308 134, 135, 136, 137, 138, 68, -1, -1, -1, -1,
4309 -1, -1, -1, -1, -1, -1, -1, 936, 937, -1,
4310 -1, -1, 941, 942, -1, -1, -1, -1, -1, -1,
4311 93, 94, -1, -1, 97, -1, -1, -1, -1, 102,
4312 -1, -1, -1, 1190, -1, -1, -1, -1, -1, -1,
4313 -1, 970, 971, 766, 973, 974, -1, -1, -1, -1,
4314 -1, -1, -1, -1, 1211, 577, -1, -1, -1, -1,
4315 -1, 583, -1, -1, -1, -1, -1, 908, 909, -1,
4316 -1, 912, -1, -1, 52, -1, 54, 55, 56, 57,
4317 58, -1, -1, -1, -1, -1, 1243, 719, 1245, -1,
4318 813, -1, 815, 816, -1, -1, -1, -1, -1, 77,
4319 -1, -1, -1, -1, -1, 627, -1, 629, -1, -1,
4320 -1, -1, -1, -1, -1, 637, 1273, -1, -1, -1,
4321 1277, -1, -1, 101, 1053, 647, -1, 649, 650, 107,
4322 108, 109, -1, -1, -1, 657, 658, -1, -1, 212,
4323 -1, -1, 1071, -1, -1, -1, 52, -1, 54, 55,
4324 56, 57, 58, -1, -1, 133, -1, -1, 136, -1,
4325 233, 683, 235, 236, -1, 888, 239, -1, 241, -1,
4326 148, 77, 245, -1, 247, 898, -1, 900, -1, -1,
4327 -1, 904, 1023, -1, -1, -1, 1027, 260, -1, 262,
4328 822, -1, -1, -1, -1, 101, -1, -1, 1039, 1040,
4329 1041, 107, 108, 109, 1045, 1046, -1, -1, 840, -1,
4330 842, -1, -1, 936, 937, -1, -1, -1, 941, 942,
4331 -1, 1062, 945, 946, -1, -1, -1, 133, -1, 861,
4332 136, -1, -1, -1, -1, -1, -1, 869, 961, -1,
4333 -1, 314, 315, 316, 317, 318, 319, 320, 321, -1,
4334 -1, -1, 325, -1, -1, -1, 329, -1, -1, -1,
4335 52, -1, 54, 55, 56, 57, 58, -1, 341, -1,
4336 -1, -1, -1, -1, 997, 1116, -1, -1, 1001, -1,
4337 -1, 1004, 1123, -1, 1007, 77, -1, -1, -1, 1012,
4338 -1, 813, -1, 815, 816, -1, -1, -1, -1, -1,
4339 -1, -1, 2, -1, 4, 378, -1, 380, -1, 101,
4340 -1, 384, 385, 386, -1, 107, 108, 109, -1, -1,
4341 -1, -1, -1, -1, -1, -1, -1, 400, -1, -1,
4342 1053, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4343 -1, 133, -1, 1066, 136, -1, -1, -1, -1, 1190,
4344 -1, 1074, 1075, 53, 54, -1, -1, 57, -1, -1,
4345 -1, 153, -1, -1, -1, -1, 888, 1090, -1, -1,
4346 1211, 444, -1, -1, -1, 1098, 898, -1, 900, -1,
4347 -1, -1, 904, -1, -1, 85, -1, -1, -1, -1,
4348 -1, -1, -1, -1, -1, -1, -1, -1, 98, 99,
4349 100, -1, 1243, -1, 1245, -1, -1, 480, -1, -1,
4350 -1, -1, 1044, -1, 936, 937, -1, -1, -1, 941,
4351 942, -1, 1145, 945, 946, -1, -1, 500, -1, -1,
4352 -1, -1, 1273, -1, -1, -1, 1277, 1160, -1, 961,
4353 33, 34, 35, 36, -1, -1, 1169, -1, -1, -1,
4354 -1, -1, -1, 1176, -1, -1, 49, 50, 51, -1,
4355 -1, -1, -1, -1, -1, -1, 59, 60, 61, 62,
4356 63, -1, -1, -1, -1, -1, -1, 1109, -1, 1001,
4357 -1, -1, 1004, -1, -1, 1007, 1209, 1210, -1, -1,
4358 1012, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4359 -1, -1, -1, -1, 577, 1137, 1138, 1139, -1, -1,
4360 583, -1, 212, -1, -1, -1, -1, 110, 111, 112,
4361 113, 114, 115, 116, 117, 118, -1, 1250, -1, -1,
4362 -1, 1053, -1, -1, -1, -1, -1, -1, -1, -1,
4363 -1, -1, -1, -1, 1066, 245, 139, 247, -1, -1,
4364 777, 778, 1074, 1075, 627, -1, 629, -1, -1, -1,
4365 260, -1, 262, -1, 637, -1, -1, -1, 1090, -1,
4366 -1, -1, -1, -1, 647, -1, 649, 650, -1, -1,
4367 -1, -1, -1, 283, 657, 658, -1, -1, -1, -1,
4368 -1, -1, -1, 2, -1, 4, -1, -1, 77, 78,
4369 79, 80, 81, 82, 83, 84, -1, 86, 87, -1,
4370 683, -1, -1, -1, 314, 94, 95, -1, -1, 319,
4371 -1, -1, -1, 1145, -1, 325, -1, -1, -1, 329,
4372 -1, -1, -1, -1, -1, -1, -1, -1, 1160, -1,
4373 -1, 341, 342, 25, 53, 54, -1, 1169, 57, -1,
4374 129, 130, 131, 132, 133, 134, 135, 136, 137, 138,
4375 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4376 -1, -1, -1, -1, -1, -1, 85, -1, -1, -1,
4377 380, 908, 909, -1, 384, 912, 386, 1209, 1210, 98,
4378 99, 100, 101, -1, -1, 77, 78, 79, 80, 81,
4379 82, 83, 84, 85, 86, 87, 88, 89, 2, -1,
4380 4, -1, 94, 95, -1, -1, -1, -1, 100, -1,
4381 -1, -1, -1, -1, -1, -1, -1, -1, 1250, -1,
4382 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4383 813, -1, 815, 816, -1, 127, -1, 129, 130, 131,
4384 132, 133, 134, 135, 136, 137, 138, -1, -1, 53,
4385 54, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4386 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4387 480, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4388 -1, -1, -1, -1, -1, -1, 1023, -1, 498, -1,
4389 1027, -1, -1, 212, 98, -1, -1, -1, -1, -1,
4390 -1, -1, 1039, 1040, 1041, 888, -1, -1, 1045, 1046,
4391 -1, -1, -1, -1, -1, 898, -1, 900, -1, -1,
4392 -1, 904, -1, -1, -1, 1062, 245, -1, 247, -1,
4393 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4394 -1, 260, -1, 262, -1, -1, -1, -1, -1, -1,
4395 -1, -1, -1, 936, 937, -1, -1, -1, 941, 942,
4396 -1, -1, 945, 946, 283, -1, -1, 777, 778, -1,
4397 580, -1, -1, 583, -1, -1, -1, -1, 961, 1116,
4398 2, -1, 4, -1, -1, -1, 1123, -1, -1, -1,
4399 -1, -1, -1, -1, -1, 314, -1, -1, -1, -1,
4400 319, -1, -1, -1, -1, -1, 325, -1, 212, -1,
4401 329, -1, -1, -1, -1, -1, -1, 627, 1001, 629,
4402 -1, 1004, 341, 342, 1007, -1, -1, -1, -1, 1012,
4403 -1, 53, 54, -1, -1, -1, 777, 778, -1, 649,
4404 -1, 245, -1, 247, -1, -1, -1, 657, 658, -1,
4405 -1, -1, -1, 1190, -1, -1, 260, -1, 262, -1,
4406 -1, 380, -1, -1, -1, 384, -1, 386, -1, -1,
4407 1053, -1, -1, -1, 1211, -1, -1, -1, -1, -1,
4408 -1, -1, -1, 1066, -1, 695, -1, -1, -1, -1,
4409 -1, 1074, 1075, -1, 704, -1, -1, -1, 908, 909,
4410 -1, -1, 912, -1, -1, -1, 1243, 1090, 1245, -1,
4411 314, -1, -1, -1, -1, 319, 33, 34, 35, 36,
4412 -1, 325, -1, -1, -1, 329, -1, -1, -1, -1,
4413 -1, -1, 49, 50, 51, 52, 1273, 341, -1, 56,
4414 1277, -1, 59, 60, 61, 62, 63, -1, -1, -1,
4415 -1, -1, -1, -1, -1, -1, 766, -1, -1, -1,
4416 -1, 480, 1145, -1, -1, -1, -1, 908, 909, -1,
4417 -1, 912, -1, 90, 91, -1, 380, 1160, -1, 498,
4418 384, 98, 386, -1, 101, -1, 1169, 104, 105, -1,
4419 212, -1, -1, 110, 111, 112, 113, 114, 115, 116,
4420 117, 118, -1, 813, -1, -1, 816, -1, -1, -1,
4421 -1, -1, -1, 1023, -1, 132, -1, 1027, -1, -1,
4422 -1, -1, 139, 245, -1, 247, 1209, 1210, -1, 1039,
4423 1040, 1041, -1, -1, -1, 1045, 1046, -1, 260, -1,
4424 262, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4425 -1, -1, 1062, -1, -1, -1, -1, -1, -1, -1,
4426 -1, 580, -1, -1, -1, -1, -1, 1250, -1, -1,
4427 -1, -1, -1, -1, -1, -1, 480, -1, 888, -1,
4428 -1, -1, 1023, -1, -1, -1, 1027, -1, 898, -1,
4429 900, -1, 314, -1, -1, -1, -1, 319, 1039, 1040,
4430 1041, -1, -1, 325, 1045, 1046, 1116, 329, 627, -1,
4431 629, -1, -1, 1123, -1, -1, -1, -1, -1, 341,
4432 -1, 1062, -1, -1, -1, -1, 936, 937, -1, -1,
4433 649, 941, 942, -1, -1, 945, -1, -1, -1, -1,
4434 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4435 -1, 961, 777, 778, -1, -1, -1, -1, 380, -1,
4436 -1, -1, 384, -1, 386, -1, -1, -1, -1, -1,
4437 -1, -1, -1, -1, -1, 1116, 695, -1, -1, 583,
4438 1190, -1, 1123, -1, -1, -1, -1, 997, -1, -1,
4439 -1, 1001, -1, -1, 1004, -1, -1, 1007, -1, -1,
4440 -1, 1211, 1012, -1, -1, -1, -1, -1, -1, -1,
4441 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4442 -1, -1, -1, 627, -1, 629, -1, -1, -1, -1,
4443 -1, -1, -1, 1243, -1, 1245, -1, -1, -1, -1,
4444 -1, -1, -1, 1053, -1, 649, -1, 766, -1, 1190,
4445 -1, -1, -1, 657, 658, -1, 1066, -1, 480, 777,
4446 778, -1, -1, 1273, 1074, 1075, -1, 1277, -1, -1,
4447 1211, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4448 1090, -1, -1, 908, 909, -1, -1, 912, 1098, -1,
4449 -1, -1, -1, -1, 813, -1, -1, 816, -1, -1,
4450 -1, -1, 1243, 0, 1245, 56, -1, -1, -1, -1,
4451 -1, 8, 9, 10, -1, -1, 13, 14, 15, -1,
4452 17, -1, -1, -1, -1, -1, -1, -1, 25, 26,
4453 27, -1, 1273, -1, -1, 1145, 1277, -1, -1, -1,
4454 37, 38, -1, 40, 41, 42, 43, 44, -1, -1,
4455 1160, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4456 -1, 583, -1, -1, -1, -1, 1176, -1, -1, 888,
4457 -1, 68, -1, -1, -1, -1, -1, -1, -1, 898,
4458 -1, 900, -1, -1, -1, -1, -1, -1, -1, -1,
4459 908, 909, -1, -1, 912, -1, -1, -1, 1023, 96,
4460 97, -1, 1027, -1, -1, 627, -1, 629, -1, 813,
4461 -1, -1, 816, -1, 1039, 1040, 1041, -1, -1, -1,
4462 1045, 1046, -1, 120, -1, -1, 945, 649, -1, -1,
4463 -1, -1, -1, -1, -1, 657, 658, 1062, -1, -1,
4464 1250, -1, 961, -1, -1, -1, 143, 144, -1, -1,
4465 -1, 148, 149, -1, 151, -1, 153, -1, -1, 210,
4466 -1, -1, 213, 214, 215, -1, -1, -1, -1, -1,
4467 -1, -1, -1, -1, -1, -1, -1, -1, 997, -1,
4468 -1, -1, 1001, -1, 888, 1004, -1, -1, 1007, -1,
4469 -1, 1116, -1, -1, 898, -1, 900, -1, 1123, -1,
4470 -1, -1, -1, -1, -1, 1023, -1, -1, -1, 1027,
4471 -1, -1, 777, 778, -1, -1, -1, -1, -1, -1,
4472 -1, 1039, 1040, 1041, -1, -1, -1, 1045, 1046, -1,
4473 -1, -1, 936, 937, -1, -1, -1, 941, 942, -1,
4474 -1, 945, -1, -1, 1062, -1, -1, 1066, -1, 16,
4475 17, -1, -1, -1, -1, 1074, 1075, 961, -1, -1,
4476 -1, -1, -1, -1, -1, 1190, -1, -1, -1, -1,
4477 -1, 1090, -1, -1, -1, -1, -1, -1, -1, 1098,
4478 -1, 48, 49, 50, 51, -1, 1211, -1, 55, 56,
4479 -1, 813, -1, 997, 816, -1, -1, 1001, 1116, -1,
4480 1004, 68, 69, 1007, -1, 1123, -1, -1, 1012, -1,
4481 -1, -1, -1, -1, -1, -1, -1, -1, 1243, -1,
4482 1245, -1, -1, -1, -1, -1, 1145, -1, -1, -1,
4483 -1, -1, -1, -1, -1, 102, -1, -1, -1, -1,
4484 -1, 1160, -1, 908, 909, -1, -1, 912, 1273, 1053,
4485 -1, -1, 1277, -1, -1, -1, -1, 1176, -1, -1,
4486 -1, -1, 1066, -1, -1, -1, 888, -1, -1, -1,
4487 1074, 1075, 1190, -1, -1, -1, 898, -1, 900, -1,
4488 -1, -1, -1, -1, -1, -1, 1090, -1, 439, 440,
4489 -1, -1, -1, 1211, -1, -1, -1, 448, -1, -1,
4490 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4491 -1, -1, -1, -1, 936, 937, -1, -1, -1, 941,
4492 942, -1, -1, 945, -1, 1243, -1, 1245, -1, -1,
4493 -1, 1250, -1, -1, 485, -1, -1, 488, -1, 961,
4494 -1, 1145, -1, 210, -1, -1, 213, 214, 215, -1,
4495 217, -1, -1, -1, -1, 1273, 1160, -1, 1023, 1277,
4496 -1, -1, 1027, -1, -1, -1, 233, -1, 235, 236,
4497 -1, -1, -1, -1, 1039, 1040, 1041, -1, -1, 1001,
4498 1045, 1046, 1004, -1, -1, 1007, -1, -1, -1, -1,
4499 1012, -1, -1, -1, -1, -1, -1, 1062, -1, 550,
4500 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4501 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4502 -1, -1, -1, -1, -1, -1, 577, -1, -1, -1,
4503 -1, 1053, 583, -1, -1, -1, -1, -1, -1, -1,
4504 -1, -1, -1, -1, 1066, -1, 1250, -1, -1, -1,
4505 -1, 1116, 1074, 1075, -1, -1, -1, -1, 1123, -1,
4506 -1, -1, -1, -1, -1, -1, -1, -1, 1090, -1,
4507 -1, -1, -1, -1, -1, -1, -1, -1, -1, 346,
4508 347, 348, 349, 350, -1, -1, 353, 354, 355, 356,
4509 357, 358, 359, 360, -1, 362, -1, -1, 365, 366,
4510 367, 368, 369, 370, 371, 372, 373, 374, -1, 660,
4511 -1, 378, 663, -1, -1, -1, -1, -1, -1, -1,
4512 -1, -1, -1, 1145, -1, 1190, -1, 678, -1, 680,
4513 -1, -1, -1, -1, -1, -1, -1, -1, 1160, -1,
4514 -1, -1, -1, -1, -1, -1, 1211, -1, -1, -1,
4515 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4516 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4517 -1, -1, 439, 440, -1, -1, 727, 444, 1243, -1,
4518 1245, 448, -1, -1, -1, -1, -1, 454, -1, -1,
4519 -1, -1, -1, -1, 745, -1, -1, -1, -1, -1,
4520 -1, -1, 469, -1, -1, -1, -1, 758, 1273, -1,
4521 -1, -1, 1277, -1, -1, -1, -1, -1, 485, -1,
4522 -1, 488, -1, -1, -1, -1, -1, -1, 1250, -1,
4523 -1, -1, -1, 500, -1, 786, -1, -1, -1, -1,
4524 -1, 33, 34, 35, 36, -1, -1, -1, -1, -1,
4525 517, -1, -1, -1, -1, 806, -1, 49, 50, 51,
4526 52, -1, -1, -1, 56, -1, -1, 59, 60, 61,
4527 62, 63, -1, -1, -1, 77, 78, 79, 80, 81,
4528 82, 83, -1, 550, 86, 87, -1, -1, -1, -1,
4529 -1, -1, 94, 95, -1, 562, -1, -1, 90, 91,
4530 567, -1, -1, -1, -1, -1, 98, -1, -1, 101,
4531 577, -1, 104, 105, -1, 107, 583, -1, 110, 111,
4532 112, 113, 114, 115, 116, 117, 118, 129, 130, 131,
4533 132, 133, 134, 135, 136, 137, 138, -1, -1, -1,
4534 132, -1, -1, -1, -1, -1, 897, 139, -1, -1,
4535 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4536 -1, 153, -1, -1, -1, -1, -1, -1, -1, -1,
4537 637, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4538 647, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4539 657, 658, -1, 660, 661, -1, 663, -1, -1, -1,
4540 -1, -1, -1, -1, 955, 672, 673, -1, -1, -1,
4541 -1, 678, -1, 680, -1, -1, -1, -1, 33, 34,
4542 35, 36, 689, -1, -1, 976, -1, -1, -1, -1,
4543 -1, -1, -1, -1, 49, 50, 51, 52, -1, -1,
4544 -1, 56, -1, 58, 59, 60, 61, 62, 63, -1,
4545 -1, -1, -1, -1, -1, -1, -1, 1008, -1, -1,
4546 727, -1, 77, -1, -1, -1, -1, -1, -1, -1,
4547 -1, -1, -1, -1, -1, 90, 91, -1, 745, -1,
4548 -1, -1, -1, 98, -1, -1, 101, -1, -1, 104,
4549 105, 758, 107, 108, -1, 110, 111, 112, 113, 114,
4550 115, 116, 117, 118, -1, -1, -1, -1, -1, -1,
4551 -1, -1, -1, -1, 1065, -1, -1, 132, -1, 786,
4552 -1, -1, -1, -1, 139, -1, -1, -1, -1, -1,
4553 -1, -1, -1, -1, -1, -1, -1, -1, -1, 806,
4554 -1, -1, -1, 0, 1, -1, 3, 4, 5, 6,
4555 7, -1, -1, -1, 11, 12, -1, -1, -1, 16,
4556 -1, 18, 19, 20, 21, 22, 23, 24, -1, -1,
4557 -1, -1, -1, 30, 31, 32, 33, 34, 35, 36,
4558 -1, -1, 39, -1, -1, -1, -1, -1, 45, 46,
4559 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
4560 57, 1152, 59, 60, 61, 62, 63, 64, 65, -1,
4561 -1, -1, -1, -1, 881, -1, -1, -1, 75, 76,
4562 -1, -1, -1, -1, -1, 892, -1, -1, -1, -1,
4563 897, -1, -1, 90, 91, 902, -1, 904, -1, -1,
4564 -1, 98, -1, -1, 101, 102, -1, 104, 105, -1,
4565 107, -1, -1, 110, 111, 112, 113, 114, 115, 116,
4566 117, 118, -1, -1, -1, -1, -1, -1, 935, 936,
4567 937, -1, -1, -1, 941, 942, -1, -1, -1, -1,
4568 -1, -1, 139, 140, 141, -1, -1, -1, 955, -1,
4569 -1, -1, -1, -1, 151, -1, 153, -1, -1, -1,
4570 -1, -1, -1, 970, 971, -1, 973, 974, -1, 976,
4571 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4572 -1, -1, -1, -1, -1, -1, -1, -1, -1, 0,
4573 -1, -1, -1, -1, -1, -1, -1, 8, 9, 10,
4574 -1, 1008, 13, 14, 15, 1012, 17, -1, -1, -1,
4575 -1, -1, -1, -1, 25, 26, 27, 28, 29, -1,
4576 -1, -1, -1, -1, -1, -1, 37, 38, -1, 40,
4577 41, 42, 43, 44, -1, -1, -1, -1, -1, -1,
4578 -1, -1, -1, -1, -1, -1, 1053, -1, -1, -1,
4579 -1, -1, -1, -1, -1, -1, -1, 68, 1065, -1,
4580 -1, -1, -1, -1, 1071, -1, 77, 78, 79, 80,
4581 81, 82, 83, 84, 85, 86, 87, 88, 89, -1,
4582 -1, -1, -1, 94, 95, 96, 97, -1, 99, 100,
4583 -1, -1, -1, -1, -1, 106, -1, -1, -1, -1,
4584 -1, -1, -1, -1, -1, -1, -1, -1, -1, 120,
4585 -1, -1, 123, -1, -1, 126, 127, 128, 129, 130,
4586 131, 132, 133, 134, 135, 136, 137, 138, -1, -1,
4587 -1, -1, 143, 144, 145, 146, -1, -1, 149, 150,
4588 151, 0, 153, -1, -1, 1152, -1, -1, -1, 8,
4589 9, 10, -1, -1, 13, 14, 15, -1, 17, -1,
4590 -1, -1, 1169, 44, -1, -1, 25, -1, 27, 28,
4591 29, -1, -1, -1, -1, -1, -1, -1, 37, 38,
4592 -1, 40, 41, 42, 43, 44, -1, -1, -1, -1,
4593 -1, -1, -1, -1, -1, -1, 77, 78, 79, 80,
4594 81, 82, 83, 84, 85, 86, 87, 88, 89, 68,
4595 -1, -1, -1, 94, 95, -1, -1, -1, 77, 78,
4596 79, 80, 81, 82, 83, 84, 85, 86, 87, 88,
4597 89, -1, -1, -1, -1, 94, 95, 96, 97, -1,
4598 99, 100, -1, -1, -1, -1, 127, 106, 129, 130,
4599 131, 132, 133, 134, 135, 136, 137, 138, -1, -1,
4600 -1, 120, -1, -1, 123, 146, -1, 126, 127, 128,
4601 129, 130, 131, 132, 133, 134, 135, 136, 137, 138,
4602 -1, -1, -1, -1, -1, 144, 145, 146, 0, -1,
4603 149, 150, 151, -1, 153, -1, 8, 9, 10, -1,
4604 -1, 13, 14, 15, -1, 17, -1, -1, -1, -1,
4605 44, -1, -1, 25, -1, 27, 28, 29, -1, -1,
4606 -1, -1, -1, -1, -1, 37, 38, -1, 40, 41,
4607 42, 43, 44, -1, -1, -1, -1, -1, -1, -1,
4608 -1, -1, -1, 77, 78, 79, 80, 81, 82, 83,
4609 84, 85, 86, 87, 88, 89, 68, -1, -1, -1,
4610 94, 95, -1, -1, -1, 77, 78, 79, 80, 81,
4611 82, 83, 84, 85, 86, 87, 88, 89, -1, -1,
4612 -1, -1, 94, 95, 96, 97, -1, 99, 100, -1,
4613 -1, -1, -1, 127, 106, 129, 130, 131, 132, 133,
4614 134, 135, 136, 137, 138, -1, -1, -1, 120, -1,
4615 -1, 123, -1, -1, 126, 127, 128, 129, 130, 131,
4616 132, 133, 134, 135, 136, 137, 138, -1, -1, -1,
4617 -1, -1, 144, 145, 146, 0, -1, 149, 150, 151,
4618 -1, 153, -1, 8, 9, 10, -1, -1, 13, 14,
4619 15, -1, 17, -1, -1, -1, -1, 44, -1, -1,
4620 25, 26, 27, 28, 29, -1, -1, -1, -1, -1,
4621 -1, -1, 37, 38, -1, 40, 41, 42, 43, 44,
4622 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4623 77, 78, 79, 80, 81, 82, 83, 84, 85, 86,
4624 87, 88, 89, 68, -1, -1, -1, 94, 95, -1,
4625 -1, -1, 77, 78, 79, 80, 81, 82, 83, 84,
4626 85, 86, 87, 88, 89, -1, -1, -1, -1, 94,
4627 95, 96, 97, -1, -1, 100, -1, -1, -1, -1,
4628 127, 106, 129, 130, 131, 132, 133, 134, 135, 136,
4629 137, 138, -1, -1, -1, 120, -1, -1, 123, -1,
4630 -1, -1, 127, 128, 129, 130, 131, 132, 133, 134,
4631 135, 136, 137, 138, -1, -1, -1, -1, 143, 144,
4632 145, 146, 0, -1, 149, 150, 151, -1, 153, -1,
4633 8, 9, 10, -1, -1, 13, 14, 15, -1, 17,
4634 -1, -1, -1, -1, 44, -1, -1, 25, 26, 27,
4635 28, 29, -1, -1, -1, -1, -1, -1, -1, 37,
4636 38, -1, 40, 41, 42, 43, 44, -1, -1, -1,
4637 -1, -1, -1, -1, -1, -1, -1, 77, 78, 79,
4638 80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
4639 68, -1, -1, -1, 94, 95, -1, -1, -1, 77,
4640 78, 79, 80, 81, 82, 83, 84, 85, 86, 87,
4641 88, 89, -1, -1, -1, -1, 94, 95, 96, 97,
4642 -1, -1, 100, -1, -1, -1, -1, 127, 106, 129,
4643 130, 131, 132, 133, 134, 135, 136, 137, 138, -1,
4644 -1, -1, 120, -1, -1, 123, -1, -1, -1, 127,
4645 128, 129, 130, 131, 132, 133, 134, 135, 136, 137,
4646 138, -1, -1, -1, -1, 143, 144, 145, 146, 0,
4647 -1, 149, 150, 151, -1, 153, -1, 8, 9, 10,
4648 -1, -1, 13, 14, 15, -1, 17, -1, -1, -1,
4649 -1, -1, -1, -1, 25, -1, 27, 28, 29, -1,
4650 -1, -1, -1, -1, -1, -1, 37, 38, -1, 40,
4651 41, 42, 43, 44, -1, -1, -1, -1, -1, -1,
4652 -1, -1, -1, -1, 77, 78, 79, 80, 81, 82,
4653 83, 84, 85, 86, 87, 88, 89, 68, -1, -1,
4654 -1, 94, 95, -1, -1, -1, 77, 78, 79, 80,
4655 81, 82, 83, 84, 85, 86, 87, 88, 89, -1,
4656 -1, -1, -1, 94, 95, 96, 97, -1, 99, 100,
4657 -1, -1, -1, -1, 127, 106, 129, 130, 131, 132,
4658 133, 134, 135, 136, 137, 138, -1, -1, -1, 120,
4659 -1, -1, 123, -1, -1, 126, 127, 128, 129, 130,
4660 131, 132, 133, 134, 135, 136, 137, 138, -1, -1,
4661 -1, -1, -1, 144, 145, 146, 0, -1, 149, 150,
4662 151, -1, 153, -1, 8, 9, 10, -1, -1, 13,
4663 14, 15, -1, 17, -1, -1, -1, -1, -1, -1,
4664 -1, 25, 26, 27, 28, -1, -1, -1, -1, -1,
4665 -1, -1, -1, 37, 38, -1, 40, 41, 42, 43,
4666 44, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4667 -1, 77, 78, 79, 80, 81, 82, 83, 84, 85,
4668 86, 87, 88, 89, 68, -1, -1, -1, 94, 95,
4669 -1, -1, -1, 77, 78, 79, 80, 81, 82, 83,
4670 84, 85, 86, 87, 88, 89, -1, -1, -1, -1,
4671 94, 95, 96, 97, -1, -1, 100, -1, -1, -1,
4672 -1, -1, 106, 129, 130, 131, 132, 133, 134, 135,
4673 136, 137, 138, -1, -1, -1, 120, -1, -1, -1,
4674 -1, -1, -1, 127, -1, 129, 130, 131, 132, 133,
4675 134, 135, 136, 137, 138, -1, -1, -1, -1, 143,
4676 144, 145, 146, 0, 148, 149, 150, 151, -1, 153,
4677 -1, 8, 9, 10, -1, -1, 13, 14, 15, -1,
4678 17, -1, -1, -1, -1, -1, -1, -1, 25, -1,
4679 27, 28, 29, -1, -1, -1, -1, -1, -1, -1,
4680 37, 38, -1, 40, 41, 42, 43, 44, -1, -1,
4681 -1, -1, -1, -1, -1, -1, -1, -1, 77, 78,
4682 79, 80, 81, 82, 83, -1, -1, 86, 87, -1,
4683 -1, 68, -1, -1, -1, 94, 95, -1, -1, -1,
4684 77, 78, 79, 80, 81, 82, 83, 84, 85, 86,
4685 87, 88, 89, -1, -1, -1, -1, 94, 95, 96,
4686 97, -1, -1, 100, -1, -1, -1, -1, -1, 106,
4687 129, 130, 131, 132, 133, 134, 135, 136, 137, 138,
4688 -1, -1, -1, 120, -1, -1, 123, -1, -1, -1,
4689 127, 128, 129, 130, 131, 132, 133, 134, 135, 136,
4690 137, 138, -1, -1, -1, -1, -1, 144, 145, 146,
4691 0, -1, 149, 150, 151, -1, 153, -1, 8, 9,
4692 10, -1, -1, 13, 14, 15, -1, 17, -1, -1,
4693 -1, -1, -1, -1, -1, 25, 26, 27, 28, -1,
4694 -1, -1, -1, -1, -1, -1, -1, 37, 38, -1,
4695 40, 41, 42, 43, 44, -1, -1, -1, -1, -1,
4696 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4697 -1, -1, -1, -1, -1, -1, -1, -1, 68, -1,
4698 -1, -1, -1, -1, -1, -1, -1, 77, 78, 79,
4699 80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
4700 -1, -1, -1, -1, 94, 95, 96, 97, -1, -1,
4701 100, -1, -1, -1, -1, -1, 106, -1, -1, -1,
4702 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4703 120, -1, -1, -1, -1, -1, -1, 127, -1, 129,
4704 130, 131, 132, 133, 134, 135, 136, 137, 138, -1,
4705 -1, -1, -1, 143, 144, 145, 146, 0, 148, 149,
4706 150, 151, -1, 153, -1, 8, 9, 10, -1, -1,
4707 13, 14, 15, -1, 17, -1, -1, -1, -1, -1,
4708 -1, -1, 25, -1, 27, 28, -1, -1, -1, -1,
4709 -1, -1, -1, -1, 37, 38, -1, 40, 41, 42,
4710 43, 44, -1, -1, -1, -1, -1, -1, -1, -1,
4711 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4712 -1, -1, -1, -1, -1, 68, -1, -1, -1, -1,
4713 -1, -1, -1, -1, 77, 78, 79, 80, 81, 82,
4714 83, 84, 85, 86, 87, 88, 89, -1, -1, -1,
4715 -1, 94, 95, 96, 97, -1, -1, 100, -1, -1,
4716 -1, -1, -1, 106, -1, -1, -1, -1, -1, -1,
4717 -1, -1, -1, -1, -1, -1, -1, 120, -1, -1,
4718 -1, -1, -1, -1, 127, -1, 129, 130, 131, 132,
4719 133, 134, 135, 136, 137, 138, -1, -1, -1, -1,
4720 -1, 144, 145, 146, 0, 148, 149, 150, 151, -1,
4721 153, -1, 8, 9, 10, -1, -1, -1, 14, 15,
4722 -1, 17, -1, -1, -1, -1, -1, -1, -1, 25,
4723 26, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4724 -1, 37, 38, -1, 40, 41, 42, 43, 44, -1,
4725 -1, -1, -1, -1, -1, -1, 77, 78, 79, 80,
4726 81, 82, 83, 84, 85, 86, 87, 88, 89, -1,
4727 -1, -1, 68, 94, 95, -1, -1, -1, -1, -1,
4728 -1, 77, 78, 79, 80, 81, 82, 83, 84, 85,
4729 86, 87, 88, 89, -1, -1, -1, -1, 94, 95,
4730 96, 97, -1, 99, 100, -1, 127, -1, 129, 130,
4731 131, 132, 133, 134, 135, 136, 137, 138, -1, -1,
4732 -1, -1, -1, -1, 120, -1, -1, -1, -1, -1,
4733 126, 127, 153, 129, 130, 131, 132, 133, 134, 135,
4734 136, 137, 138, -1, -1, -1, -1, 143, 144, 145,
4735 146, 0, -1, 149, -1, 151, -1, 153, -1, 8,
4736 9, 10, -1, -1, -1, 14, 15, -1, 17, -1,
4737 -1, -1, -1, -1, -1, -1, 25, 26, -1, -1,
4738 -1, -1, -1, -1, -1, -1, -1, -1, 37, 38,
4739 -1, 40, 41, 42, 43, 44, -1, -1, -1, -1,
4740 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4741 -1, -1, -1, -1, -1, -1, -1, -1, -1, 68,
4742 -1, -1, -1, -1, -1, -1, -1, -1, 77, 78,
4743 79, 80, 81, 82, 83, 84, 85, 86, 87, 88,
4744 89, -1, -1, -1, -1, 94, 95, 96, 97, -1,
4745 99, 100, -1, -1, -1, -1, -1, -1, -1, -1,
4746 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4747 -1, 120, -1, -1, -1, -1, -1, 126, 127, -1,
4748 129, 130, 131, 132, 133, 134, 135, 136, 137, 138,
4749 -1, -1, -1, -1, 143, 144, 145, 146, 0, -1,
4750 149, -1, 151, -1, 153, -1, 8, 9, 10, -1,
4751 -1, -1, 14, 15, -1, 17, -1, -1, -1, -1,
4752 -1, -1, -1, 25, -1, -1, -1, -1, -1, -1,
4753 -1, -1, -1, -1, -1, 37, 38, -1, 40, 41,
4754 42, 43, 44, -1, -1, -1, -1, -1, -1, -1,
4755 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4756 -1, -1, -1, -1, -1, -1, 68, -1, -1, -1,
4757 -1, -1, -1, -1, -1, 77, 78, 79, 80, 81,
4758 82, 83, 84, 85, 86, 87, 88, 89, -1, -1,
4759 -1, -1, 94, 95, 96, 97, -1, 99, 100, -1,
4760 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4761 -1, -1, -1, -1, -1, -1, -1, -1, 120, -1,
4762 -1, -1, -1, -1, 126, 127, -1, 129, 130, 131,
4763 132, 133, 134, 135, 136, 137, 138, -1, -1, -1,
4764 -1, -1, 144, 145, 146, 0, -1, 149, -1, 151,
4765 -1, 153, -1, 8, 9, 10, -1, -1, -1, 14,
4766 15, -1, 17, -1, -1, -1, -1, -1, -1, -1,
4767 25, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4768 -1, -1, 37, 38, -1, 40, 41, 42, 43, 44,
4769 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4770 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4771 -1, -1, -1, 68, -1, -1, -1, -1, -1, -1,
4772 -1, -1, 77, 78, 79, 80, 81, 82, 83, 84,
4773 85, 86, 87, 88, 89, -1, -1, -1, -1, 94,
4774 95, 96, 97, -1, 99, 100, -1, -1, -1, -1,
4775 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4776 -1, -1, -1, -1, -1, 120, -1, -1, -1, -1,
4777 -1, 126, 127, -1, 129, 130, 131, 132, 133, 134,
4778 135, 136, 137, 138, -1, -1, -1, -1, -1, 144,
4779 145, 146, -1, -1, 149, -1, 151, 1, 153, 3,
4780 4, 5, 6, 7, 8, 9, 10, 11, 12, -1,
4781 -1, 15, 16, -1, 18, 19, 20, 21, 22, 23,
4782 24, -1, -1, -1, -1, -1, 30, 31, 32, 33,
4783 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
4784 -1, 45, 46, 47, 48, 49, 50, 51, 52, 53,
4785 54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
4786 64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
4787 -1, 75, 76, -1, -1, -1, -1, -1, -1, -1,
4788 -1, -1, -1, -1, -1, -1, 90, 91, -1, -1,
4789 -1, -1, -1, -1, 98, -1, -1, 101, 102, -1,
4790 104, 105, -1, 107, -1, -1, 110, 111, 112, 113,
4791 114, 115, 116, 117, 118, -1, -1, -1, -1, -1,
4792 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4793 -1, -1, -1, -1, -1, 139, 140, 141, -1, -1,
4794 -1, -1, -1, -1, -1, -1, -1, 151, 1, 153,
4795 3, 4, 5, 6, 7, -1, -1, 10, 11, 12,
4796 -1, 14, 15, 16, -1, 18, 19, 20, 21, 22,
4797 23, 24, -1, -1, -1, -1, -1, 30, 31, 32,
4798 33, 34, 35, 36, -1, -1, 39, -1, -1, -1,
4799 -1, -1, 45, 46, 47, 48, 49, 50, 51, 52,
4800 53, 54, 55, 56, 57, -1, 59, 60, 61, 62,
4801 63, 64, 65, -1, -1, -1, -1, -1, -1, -1,
4802 -1, -1, 75, 76, -1, -1, -1, -1, -1, -1,
4803 -1, -1, -1, -1, -1, -1, -1, 90, 91, -1,
4804 -1, -1, -1, -1, -1, 98, -1, -1, 101, 102,
4805 -1, 104, 105, -1, 107, -1, -1, 110, 111, 112,
4806 113, 114, 115, 116, 117, 118, -1, -1, -1, -1,
4807 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4808 -1, -1, -1, -1, -1, -1, 139, 140, 141, -1,
4809 -1, -1, -1, -1, -1, -1, -1, -1, 151, 1,
4810 153, 3, 4, 5, 6, 7, -1, -1, 10, 11,
4811 12, -1, -1, 15, 16, 17, 18, 19, 20, 21,
4812 22, 23, 24, -1, -1, -1, -1, -1, 30, 31,
4813 32, 33, 34, 35, 36, -1, -1, 39, -1, -1,
4814 -1, -1, -1, 45, 46, 47, 48, 49, 50, 51,
4815 52, 53, 54, 55, 56, 57, -1, 59, 60, 61,
4816 62, 63, 64, 65, -1, -1, -1, -1, -1, -1,
4817 -1, -1, -1, 75, 76, -1, -1, -1, -1, -1,
4818 -1, -1, -1, -1, -1, -1, -1, -1, 90, 91,
4819 -1, -1, -1, -1, -1, -1, 98, -1, -1, 101,
4820 102, -1, 104, 105, -1, 107, -1, -1, 110, 111,
4821 112, 113, 114, 115, 116, 117, 118, -1, -1, -1,
4822 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4823 -1, -1, -1, -1, -1, -1, -1, 139, 140, 141,
4824 -1, -1, -1, -1, -1, -1, -1, -1, -1, 151,
4825 1, 153, 3, 4, 5, 6, 7, -1, -1, 10,
4826 11, 12, -1, -1, 15, 16, -1, 18, 19, 20,
4827 21, 22, 23, 24, 25, -1, -1, -1, -1, 30,
4828 31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
4829 -1, -1, -1, -1, 45, 46, 47, 48, 49, 50,
4830 51, 52, 53, 54, 55, 56, 57, -1, 59, 60,
4831 61, 62, 63, 64, 65, -1, -1, -1, -1, -1,
4832 -1, -1, -1, -1, 75, 76, -1, -1, -1, -1,
4833 -1, -1, -1, -1, -1, -1, -1, -1, -1, 90,
4834 91, -1, -1, -1, -1, -1, -1, 98, -1, -1,
4835 101, 102, -1, 104, 105, -1, 107, -1, -1, 110,
4836 111, 112, 113, 114, 115, 116, 117, 118, -1, -1,
4837 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4838 -1, -1, -1, -1, -1, -1, -1, -1, 139, 140,
4839 141, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4840 151, 1, 153, 3, 4, 5, 6, 7, -1, -1,
4841 10, 11, 12, -1, -1, 15, 16, -1, 18, 19,
4842 20, 21, 22, 23, 24, -1, -1, -1, -1, -1,
4843 30, 31, 32, 33, 34, 35, 36, -1, -1, 39,
4844 -1, -1, -1, -1, -1, 45, 46, 47, 48, 49,
4845 50, 51, 52, 53, 54, 55, 56, 57, -1, 59,
4846 60, 61, 62, 63, 64, 65, -1, -1, -1, -1,
4847 -1, -1, -1, -1, -1, 75, 76, -1, -1, -1,
4848 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4849 90, 91, -1, -1, -1, -1, -1, -1, 98, -1,
4850 -1, 101, 102, -1, 104, 105, -1, 107, -1, -1,
4851 110, 111, 112, 113, 114, 115, 116, 117, 118, -1,
4852 -1, -1, -1, -1, -1, -1, -1, 1, -1, 3,
4853 4, 5, 6, 7, -1, 9, 10, 11, 12, 139,
4854 140, 141, 16, -1, 18, 19, 20, 21, 22, 23,
4855 24, 151, -1, 153, -1, -1, 30, 31, 32, 33,
4856 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
4857 -1, 45, 46, 47, 48, 49, 50, 51, 52, 53,
4858 54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
4859 64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
4860 -1, 75, 76, -1, -1, -1, -1, -1, -1, -1,
4861 -1, -1, -1, -1, -1, -1, 90, 91, -1, -1,
4862 -1, -1, -1, -1, 98, -1, -1, 101, 102, -1,
4863 104, 105, -1, 107, -1, -1, 110, 111, 112, 113,
4864 114, 115, 116, 117, 118, -1, -1, -1, -1, -1,
4865 -1, -1, -1, 1, -1, 3, 4, 5, 6, 7,
4866 -1, -1, -1, 11, 12, 139, 140, 141, 16, -1,
4867 18, 19, 20, 21, 22, 23, 24, 151, -1, 153,
4868 -1, -1, 30, 31, 32, 33, 34, 35, 36, -1,
4869 -1, 39, -1, -1, -1, -1, -1, 45, 46, 47,
4870 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
4871 -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
4872 -1, -1, -1, -1, -1, -1, -1, 75, 76, -1,
4873 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4874 -1, -1, 90, 91, -1, -1, -1, -1, -1, -1,
4875 98, -1, -1, 101, 102, -1, 104, 105, -1, 107,
4876 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
4877 118, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4878 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4879 -1, 139, 140, 141, -1, -1, -1, -1, -1, -1,
4880 -1, 149, -1, 151, 1, 153, 3, 4, 5, 6,
4881 7, -1, -1, -1, 11, 12, -1, -1, -1, 16,
4882 -1, 18, 19, 20, 21, 22, 23, 24, -1, -1,
4883 -1, -1, -1, 30, 31, 32, 33, 34, 35, 36,
4884 -1, -1, 39, -1, -1, -1, -1, -1, 45, 46,
4885 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
4886 57, -1, 59, 60, 61, 62, 63, 64, 65, -1,
4887 -1, -1, -1, -1, -1, -1, -1, -1, 75, 76,
4888 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4889 -1, -1, -1, 90, 91, -1, -1, -1, -1, -1,
4890 -1, 98, -1, -1, 101, 102, -1, 104, 105, -1,
4891 107, -1, -1, 110, 111, 112, 113, 114, 115, 116,
4892 117, 118, -1, -1, -1, -1, -1, -1, -1, -1,
4893 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4894 -1, -1, 139, 140, 141, -1, -1, -1, -1, -1,
4895 -1, -1, 149, -1, 151, 1, 153, 3, 4, 5,
4896 6, 7, -1, -1, -1, 11, 12, -1, -1, -1,
4897 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
4898 -1, -1, -1, -1, 30, 31, 32, 33, 34, 35,
4899 36, -1, -1, 39, -1, -1, -1, -1, -1, 45,
4900 46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
4901 56, 57, -1, 59, 60, 61, 62, 63, 64, 65,
4902 -1, -1, -1, -1, -1, -1, -1, -1, -1, 75,
4903 76, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4904 -1, -1, -1, -1, 90, 91, -1, -1, -1, -1,
4905 -1, -1, 98, -1, -1, 101, 102, -1, 104, 105,
4906 -1, 107, -1, -1, 110, 111, 112, 113, 114, 115,
4907 116, 117, 118, -1, -1, -1, -1, -1, -1, -1,
4908 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4909 -1, -1, -1, 139, 140, 141, -1, -1, 144, -1,
4910 -1, -1, -1, -1, -1, 151, 1, 153, 3, 4,
4911 5, 6, 7, -1, -1, -1, 11, 12, -1, -1,
4912 -1, 16, -1, 18, 19, 20, 21, 22, 23, 24,
4913 -1, -1, -1, -1, -1, 30, 31, 32, 33, 34,
4914 35, 36, -1, -1, 39, -1, -1, -1, -1, -1,
4915 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
4916 55, 56, 57, -1, 59, 60, 61, 62, 63, 64,
4917 65, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4918 75, 76, -1, -1, -1, -1, -1, -1, -1, -1,
4919 -1, -1, -1, -1, -1, 90, 91, -1, -1, -1,
4920 -1, -1, -1, 98, -1, -1, 101, 102, -1, 104,
4921 105, -1, 107, -1, -1, 110, 111, 112, 113, 114,
4922 115, 116, 117, 118, -1, -1, -1, -1, -1, -1,
4923 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4924 -1, -1, -1, -1, 139, 140, 141, -1, -1, 144,
4925 -1, -1, -1, -1, -1, -1, 151, 1, 153, 3,
4926 4, 5, 6, 7, -1, -1, 10, 11, 12, -1,
4927 -1, -1, 16, -1, 18, 19, 20, 21, 22, 23,
4928 24, -1, -1, -1, -1, -1, 30, 31, 32, 33,
4929 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
4930 -1, 45, 46, 47, 48, 49, 50, 51, 52, 53,
4931 54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
4932 64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
4933 -1, 75, 76, -1, -1, -1, -1, -1, -1, -1,
4934 -1, -1, -1, -1, -1, -1, 90, 91, -1, -1,
4935 -1, -1, -1, -1, 98, -1, -1, 101, 102, -1,
4936 104, 105, -1, 107, -1, -1, 110, 111, 112, 113,
4937 114, 115, 116, 117, 118, -1, -1, -1, -1, -1,
4938 -1, -1, -1, 1, -1, 3, 4, 5, 6, 7,
4939 -1, -1, -1, 11, 12, 139, 140, 141, 16, -1,
4940 18, 19, 20, 21, 22, 23, 24, 151, -1, 153,
4941 -1, -1, 30, 31, 32, 33, 34, 35, 36, -1,
4942 -1, 39, -1, -1, -1, -1, -1, 45, 46, 47,
4943 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
4944 -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
4945 -1, -1, -1, -1, -1, -1, -1, 75, 76, -1,
4946 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4947 -1, -1, 90, 91, -1, -1, -1, -1, -1, -1,
4948 98, -1, -1, 101, 102, -1, 104, 105, -1, 107,
4949 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
4950 118, -1, 120, -1, -1, -1, -1, -1, -1, -1,
4951 -1, 3, 4, 5, -1, 7, -1, -1, -1, 11,
4952 12, 139, 140, 141, 16, -1, 18, 19, 20, 21,
4953 22, 23, 24, 151, -1, 153, -1, -1, 30, 31,
4954 32, 33, 34, 35, 36, -1, -1, 39, -1, -1,
4955 -1, -1, -1, -1, 46, -1, -1, 49, 50, 51,
4956 52, 53, 54, 55, 56, 57, 58, 59, 60, 61,
4957 62, 63, 64, 65, -1, -1, -1, -1, -1, -1,
4958 -1, -1, -1, 75, 76, -1, -1, -1, -1, -1,
4959 -1, -1, -1, -1, -1, -1, -1, -1, 90, 91,
4960 -1, -1, -1, -1, -1, -1, 98, -1, -1, 101,
4961 102, -1, 104, 105, -1, 107, 108, 109, 110, 111,
4962 112, 113, 114, 115, 116, 117, 118, -1, -1, -1,
4963 -1, -1, -1, -1, -1, -1, -1, 3, 4, 5,
4964 -1, 7, -1, -1, -1, 11, 12, 139, 140, 141,
4965 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
4966 -1, 153, -1, -1, 30, 31, 32, 33, 34, 35,
4967 36, -1, -1, 39, -1, -1, -1, -1, -1, -1,
4968 46, -1, -1, 49, 50, 51, 52, 53, 54, 55,
4969 56, 57, -1, 59, 60, 61, 62, 63, 64, 65,
4970 -1, -1, -1, -1, -1, -1, -1, -1, -1, 75,
4971 76, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4972 -1, -1, -1, -1, 90, 91, -1, -1, -1, -1,
4973 -1, -1, 98, -1, -1, 101, 102, -1, 104, 105,
4974 -1, -1, -1, -1, 110, 111, 112, 113, 114, 115,
4975 116, 117, 118, -1, -1, -1, -1, -1, -1, -1,
4976 -1, -1, -1, 3, 4, 5, -1, 7, -1, -1,
4977 -1, 11, 12, 139, 140, 141, 16, -1, 18, 19,
4978 20, 21, 22, 23, 24, 151, -1, 153, -1, -1,
4979 30, 31, 32, 33, 34, 35, 36, -1, -1, 39,
4980 -1, -1, -1, -1, -1, -1, 46, -1, -1, 49,
4981 50, 51, 52, 53, 54, 55, 56, 57, -1, 59,
4982 60, 61, 62, 63, 64, 65, -1, -1, -1, -1,
4983 -1, -1, -1, -1, -1, 75, 76, -1, -1, -1,
4984 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4985 90, 91, -1, -1, -1, -1, -1, -1, 98, -1,
4986 -1, 101, 102, -1, 104, 105, -1, -1, -1, -1,
4987 110, 111, 112, 113, 114, 115, 116, 117, 118, -1,
4988 -1, -1, -1, -1, -1, -1, -1, -1, -1, 3,
4989 4, 5, 6, 7, -1, -1, -1, 11, 12, 139,
4990 140, 141, 16, -1, 18, 19, 20, 21, 22, 23,
4991 24, -1, -1, 153, -1, -1, 30, 31, 32, 33,
4992 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
4993 -1, 45, 46, 47, 48, 49, 50, 51, 52, 53,
4994 54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
4995 64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
4996 -1, 75, 76, -1, -1, -1, -1, -1, -1, -1,
4997 -1, -1, -1, -1, -1, -1, 90, 91, -1, -1,
4998 -1, -1, -1, -1, 98, -1, -1, 101, 102, -1,
4999 104, 105, -1, 107, -1, -1, 110, 111, 112, 113,
5000 114, 115, 116, 117, 118, -1, -1, -1, -1, -1,
5001 -1, -1, -1, -1, -1, 3, 4, 5, 6, 7,
5002 -1, -1, -1, 11, 12, 139, 140, 141, 16, -1,
5003 18, 19, 20, 21, 22, 23, 24, 151, -1, -1,
5004 -1, -1, 30, 31, 32, 33, 34, 35, 36, -1,
5005 -1, 39, -1, -1, -1, -1, -1, 45, 46, 47,
5006 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
5007 -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
5008 -1, -1, -1, -1, -1, -1, -1, 75, 76, -1,
5009 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5010 -1, -1, 90, 91, -1, -1, -1, -1, -1, -1,
5011 98, -1, -1, 101, 102, -1, 104, 105, -1, 107,
5012 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
5013 118, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5014 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5015 -1, 139, 140, 141, -1, -1, -1, -1, -1, -1,
5016 -1, -1, -1, 151, 3, 4, 5, 6, 7, 8,
5017 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
5018 19, 20, 21, 22, 23, 24, 25, 26, -1, -1,
5019 -1, 30, 31, 32, 33, 34, 35, 36, 37, 38,
5020 39, -1, -1, -1, -1, -1, 45, 46, 47, 48,
5021 49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
5022 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5023 -1, -1, -1, -1, -1, -1, 75, 76, 77, 78,
5024 79, 80, 81, 82, 83, -1, -1, 86, 87, -1,
5025 -1, -1, -1, 92, 93, 94, 95, -1, -1, -1,
5026 -1, -1, -1, -1, -1, -1, -1, -1, 107, 108,
5027 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5028 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5029 129, 130, 131, 132, 133, 134, 135, 136, 137, 138,
5030 -1, 140, 141, -1, -1, -1, -1, -1, 147, 148,
5031 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
5032 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
5033 23, 24, 25, 26, -1, -1, -1, 30, 31, 32,
5034 33, 34, 35, 36, 37, 38, 39, -1, -1, -1,
5035 -1, -1, 45, 46, 47, 48, 49, 50, 51, 52,
5036 53, 54, 55, 56, 57, -1, -1, -1, -1, -1,
5037 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5038 -1, -1, 75, 76, 77, 78, 79, 80, 81, 82,
5039 83, -1, -1, 86, 87, -1, -1, -1, -1, 92,
5040 93, 94, 95, -1, -1, -1, -1, -1, -1, -1,
5041 -1, -1, -1, -1, 107, 108, -1, -1, -1, -1,
5042 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5043 -1, -1, -1, -1, -1, -1, 129, 130, 131, 132,
5044 133, 134, 135, 136, 137, 138, -1, 140, 141, -1,
5045 -1, -1, -1, -1, 147, 3, 4, 5, 6, 7,
5046 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
5047 18, 19, 20, 21, 22, 23, 24, 25, 26, -1,
5048 -1, -1, 30, 31, 32, 33, 34, 35, 36, 37,
5049 38, 39, -1, -1, -1, -1, -1, 45, 46, 47,
5050 48, 49, 50, 51, 52, 53, 54, -1, 56, -1,
5051 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5052 -1, -1, -1, -1, -1, -1, -1, 75, 76, 77,
5053 78, 79, 80, 81, 82, 83, -1, -1, 86, 87,
5054 -1, -1, -1, -1, 92, 93, 94, 95, -1, -1,
5055 -1, -1, -1, -1, -1, -1, -1, -1, -1, 107,
5056 108, -1, -1, 111, -1, -1, -1, -1, -1, -1,
5057 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5058 -1, 129, 130, 131, 132, 133, 134, 135, 136, 137,
5059 138, -1, 140, 141, -1, -1, -1, -1, -1, 147,
5060 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
5061 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
5062 23, 24, 25, 26, -1, -1, -1, 30, 31, 32,
5063 33, 34, 35, 36, 37, 38, 39, -1, -1, -1,
5064 -1, -1, 45, 46, 47, 48, 49, 50, 51, 52,
5065 53, -1, -1, 56, -1, -1, -1, -1, -1, -1,
5066 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5067 -1, -1, 75, 76, 77, 78, 79, 80, 81, 82,
5068 83, -1, -1, 86, 87, -1, -1, -1, -1, 92,
5069 93, 94, 95, -1, -1, -1, -1, -1, -1, -1,
5070 -1, -1, -1, -1, 107, 108, -1, -1, 111, -1,
5071 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5072 -1, -1, -1, -1, -1, -1, 129, 130, 131, 132,
5073 133, 134, 135, 136, 137, 138, -1, 140, 141, -1,
5074 -1, -1, -1, -1, 147, 3, 4, 5, 6, 7,
5075 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
5076 18, 19, 20, 21, 22, 23, 24, 25, 26, -1,
5077 -1, -1, 30, 31, 32, 33, 34, 35, 36, 37,
5078 38, 39, -1, -1, -1, -1, -1, 45, 46, 47,
5079 48, 49, 50, 51, 52, 53, -1, -1, 56, -1,
5080 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5081 -1, -1, -1, -1, -1, -1, -1, 75, 76, 77,
5082 78, 79, 80, 81, 82, 83, -1, -1, 86, 87,
5083 -1, -1, -1, -1, 92, 93, 94, 95, -1, -1,
5084 -1, -1, -1, -1, -1, -1, -1, -1, -1, 107,
5085 108, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5086 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5087 -1, 129, 130, 131, 132, 133, 134, 135, 136, 137,
5088 138, -1, 140, 141, 3, 4, 5, -1, 7, 147,
5089 -1, -1, 11, 12, -1, -1, -1, 16, -1, 18,
5090 19, 20, 21, 22, 23, 24, -1, -1, -1, -1,
5091 -1, 30, 31, 32, 33, 34, 35, 36, -1, -1,
5092 39, -1, -1, -1, -1, -1, -1, 46, -1, -1,
5093 49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
5094 59, 60, 61, 62, 63, 64, 65, -1, -1, -1,
5095 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5096 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5097 -1, -1, -1, -1, -1, -1, -1, -1, -1, 98,
5098 -1, -1, 101, 102, -1, 104, 105, -1, -1, -1,
5099 -1, 110, 111, 112, 113, 114, 115, 116, 117, 118,
5100 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5101 -1, -1, -1, 3, 4, 5, -1, 7, -1, -1,
5102 139, 11, 12, -1, -1, -1, 16, 146, 18, 19,
5103 20, 21, 22, 23, 24, -1, -1, -1, -1, -1,
5104 30, 31, 32, 33, 34, 35, 36, -1, -1, 39,
5105 -1, -1, -1, -1, -1, -1, 46, -1, -1, 49,
5106 50, 51, 52, 53, 54, 55, 56, 57, -1, 59,
5107 60, 61, 62, 63, 64, 65, -1, -1, -1, -1,
5108 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5109 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5110 -1, -1, -1, -1, -1, -1, -1, -1, 98, -1,
5111 -1, 101, 102, -1, 104, 105, -1, -1, -1, -1,
5112 110, 111, 112, 113, 114, 115, 116, 117, 118, -1,
5113 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5114 -1, -1, 3, 4, 5, 6, 7, -1, -1, 139,
5115 11, 12, -1, -1, -1, 16, 146, 18, 19, 20,
5116 21, 22, 23, 24, -1, -1, -1, -1, -1, 30,
5117 31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
5118 -1, -1, -1, -1, 45, 46, 47, 48, 49, 50,
5119 51, 52, 53, 54, 55, 56, 57, -1, 59, 60,
5120 61, 62, 63, 64, 65, -1, -1, -1, -1, -1,
5121 -1, -1, -1, -1, 75, 76, -1, -1, -1, -1,
5122 -1, -1, -1, -1, -1, -1, -1, -1, -1, 90,
5123 91, -1, -1, -1, -1, -1, -1, 98, -1, -1,
5124 101, 102, -1, 104, 105, -1, 107, -1, -1, 110,
5125 111, 112, 113, 114, 115, 116, 117, 118, -1, -1,
5126 -1, -1, -1, -1, -1, -1, -1, -1, 3, 4,
5127 5, -1, 7, -1, -1, -1, 11, 12, 139, 140,
5128 141, 16, -1, 18, 19, 20, 21, 22, 23, 24,
5129 -1, -1, -1, -1, -1, 30, 31, 32, 33, 34,
5130 35, 36, -1, -1, 39, -1, -1, -1, -1, -1,
5131 -1, 46, -1, -1, 49, 50, 51, 52, 53, 54,
5132 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
5133 65, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5134 75, 76, -1, -1, -1, -1, -1, -1, -1, -1,
5135 -1, -1, -1, -1, -1, 90, 91, -1, -1, -1,
5136 -1, -1, -1, 98, -1, -1, 101, 102, -1, 104,
5137 105, -1, 107, 108, 109, 110, 111, 112, 113, 114,
5138 115, 116, 117, 118, -1, -1, -1, -1, -1, -1,
5139 -1, -1, -1, -1, 3, 4, 5, 6, 7, -1,
5140 -1, -1, 11, 12, 139, 140, 141, 16, -1, 18,
5141 19, 20, 21, 22, 23, 24, -1, -1, -1, -1,
5142 -1, 30, 31, 32, 33, 34, 35, 36, -1, -1,
5143 39, -1, -1, -1, -1, -1, 45, 46, -1, 48,
5144 49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
5145 59, 60, 61, 62, 63, 64, 65, -1, -1, -1,
5146 -1, -1, -1, -1, -1, -1, 75, 76, -1, -1,
5147 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5148 -1, 90, 91, -1, -1, -1, -1, -1, -1, 98,
5149 -1, -1, 101, 102, -1, 104, 105, -1, 107, -1,
5150 -1, 110, 111, 112, 113, 114, 115, 116, 117, 118,
5151 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5152 3, 4, 5, -1, 7, -1, -1, -1, 11, 12,
5153 139, 140, 141, 16, -1, 18, 19, 20, 21, 22,
5154 23, 24, -1, -1, -1, -1, -1, 30, 31, 32,
5155 33, 34, 35, 36, -1, -1, 39, -1, -1, -1,
5156 -1, -1, -1, 46, -1, -1, 49, 50, 51, 52,
5157 53, 54, 55, 56, 57, 58, 59, 60, 61, 62,
5158 63, 64, 65, -1, -1, -1, -1, -1, -1, -1,
5159 -1, -1, 75, 76, -1, -1, -1, -1, -1, -1,
5160 -1, -1, -1, -1, -1, -1, -1, 90, 91, -1,
5161 -1, -1, -1, -1, -1, 98, -1, -1, 101, 102,
5162 -1, 104, 105, -1, 107, 108, 109, 110, 111, 112,
5163 113, 114, 115, 116, 117, 118, -1, -1, -1, -1,
5164 -1, -1, -1, -1, -1, -1, 3, 4, 5, -1,
5165 7, -1, -1, -1, 11, 12, 139, 140, 141, 16,
5166 -1, 18, 19, 20, 21, 22, 23, 24, -1, -1,
5167 -1, -1, -1, 30, 31, 32, 33, 34, 35, 36,
5168 -1, -1, 39, -1, -1, -1, -1, -1, -1, 46,
5169 -1, -1, 49, 50, 51, 52, 53, 54, 55, 56,
5170 57, 58, 59, 60, 61, 62, 63, 64, 65, -1,
5171 -1, -1, -1, -1, -1, -1, -1, -1, 75, 76,
5172 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5173 -1, -1, -1, 90, 91, -1, -1, -1, -1, -1,
5174 -1, 98, -1, -1, 101, 102, -1, 104, 105, -1,
5175 107, 108, 109, 110, 111, 112, 113, 114, 115, 116,
5176 117, 118, -1, -1, -1, -1, -1, -1, -1, -1,
5177 -1, -1, 3, 4, 5, -1, 7, -1, -1, -1,
5178 11, 12, 139, 140, 141, 16, -1, 18, 19, 20,
5179 21, 22, 23, 24, -1, -1, -1, -1, -1, 30,
5180 31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
5181 -1, -1, -1, -1, -1, 46, -1, -1, 49, 50,
5182 51, 52, 53, 54, 55, 56, 57, 58, 59, 60,
5183 61, 62, 63, 64, 65, -1, -1, -1, -1, -1,
5184 -1, -1, -1, -1, 75, 76, -1, -1, -1, -1,
5185 -1, -1, -1, -1, -1, -1, -1, -1, -1, 90,
5186 91, -1, -1, -1, -1, -1, -1, 98, -1, -1,
5187 101, 102, -1, 104, 105, -1, 107, 108, 109, 110,
5188 111, 112, 113, 114, 115, 116, 117, 118, -1, -1,
5189 -1, -1, -1, -1, -1, -1, -1, -1, 3, 4,
5190 5, -1, 7, -1, -1, -1, 11, 12, 139, 140,
5191 141, 16, -1, 18, 19, 20, 21, 22, 23, 24,
5192 -1, -1, -1, -1, -1, 30, 31, 32, 33, 34,
5193 35, 36, -1, -1, 39, -1, -1, -1, -1, -1,
5194 -1, 46, -1, -1, 49, 50, 51, 52, 53, 54,
5195 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
5196 65, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5197 75, 76, -1, -1, -1, -1, -1, -1, -1, -1,
5198 -1, -1, -1, -1, -1, 90, 91, -1, -1, -1,
5199 -1, -1, -1, 98, -1, -1, 101, 102, -1, 104,
5200 105, -1, 107, 108, -1, 110, 111, 112, 113, 114,
5201 115, 116, 117, 118, -1, -1, -1, -1, -1, -1,
5202 -1, -1, -1, -1, 3, 4, 5, -1, 7, -1,
5203 -1, -1, 11, 12, 139, 140, 141, 16, -1, 18,
5204 19, 20, 21, 22, 23, 24, -1, -1, -1, -1,
5205 -1, 30, 31, 32, 33, 34, 35, 36, -1, -1,
5206 39, -1, -1, -1, -1, -1, -1, 46, -1, -1,
5207 49, 50, 51, 52, 53, 54, 55, 56, 57, 58,
5208 59, 60, 61, 62, 63, 64, 65, -1, -1, -1,
5209 -1, -1, -1, -1, -1, -1, 75, 76, -1, -1,
5210 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5211 -1, 90, 91, -1, -1, -1, -1, -1, -1, 98,
5212 -1, -1, 101, 102, -1, 104, 105, -1, -1, 108,
5213 109, 110, 111, 112, 113, 114, 115, 116, 117, 118,
5214 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5215 3, 4, 5, -1, 7, -1, -1, -1, 11, 12,
5216 139, 140, 141, 16, -1, 18, 19, 20, 21, 22,
5217 23, 24, -1, -1, -1, -1, -1, 30, 31, 32,
5218 33, 34, 35, 36, -1, -1, 39, -1, -1, -1,
5219 -1, -1, -1, 46, -1, -1, 49, 50, 51, 52,
5220 53, 54, 55, 56, 57, 58, 59, 60, 61, 62,
5221 63, 64, 65, -1, -1, -1, -1, -1, -1, -1,
5222 -1, -1, 75, 76, -1, -1, -1, -1, -1, -1,
5223 -1, -1, -1, -1, -1, -1, -1, 90, 91, -1,
5224 -1, -1, -1, -1, -1, 98, -1, -1, 101, 102,
5225 -1, 104, 105, -1, 107, 108, -1, 110, 111, 112,
5226 113, 114, 115, 116, 117, 118, -1, -1, -1, -1,
5227 -1, -1, -1, -1, -1, -1, 3, 4, 5, -1,
5228 7, -1, -1, -1, 11, 12, 139, 140, 141, 16,
5229 -1, 18, 19, 20, 21, 22, 23, 24, -1, -1,
5230 -1, -1, -1, 30, 31, 32, 33, 34, 35, 36,
5231 -1, -1, 39, -1, -1, -1, -1, -1, -1, 46,
5232 -1, -1, 49, 50, 51, 52, 53, 54, 55, 56,
5233 57, 58, 59, 60, 61, 62, 63, 64, 65, -1,
5234 -1, -1, -1, -1, -1, -1, -1, -1, 75, 76,
5235 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5236 -1, -1, -1, 90, 91, -1, -1, -1, -1, -1,
5237 -1, 98, -1, -1, 101, 102, -1, 104, 105, -1,
5238 -1, 108, -1, 110, 111, 112, 113, 114, 115, 116,
5239 117, 118, -1, -1, -1, -1, -1, -1, -1, -1,
5240 -1, -1, 3, 4, 5, -1, 7, -1, -1, -1,
5241 11, 12, 139, 140, 141, 16, -1, 18, 19, 20,
5242 21, 22, 23, 24, -1, -1, -1, -1, -1, 30,
5243 31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
5244 -1, -1, -1, -1, -1, 46, -1, -1, 49, 50,
5245 51, 52, 53, 54, 55, 56, 57, -1, 59, 60,
5246 61, 62, 63, 64, 65, -1, -1, -1, -1, -1,
5247 -1, -1, -1, -1, 75, 76, -1, -1, -1, -1,
5248 -1, -1, -1, -1, -1, -1, -1, -1, -1, 90,
5249 91, -1, -1, -1, -1, -1, -1, 98, -1, -1,
5250 101, 102, -1, 104, 105, -1, 107, -1, -1, 110,
5251 111, 112, 113, 114, 115, 116, 117, 118, -1, -1,
5252 -1, -1, -1, -1, -1, -1, -1, -1, 3, 4,
5253 5, -1, 7, -1, -1, -1, 11, 12, 139, 140,
5254 141, 16, -1, 18, 19, 20, 21, 22, 23, 24,
5255 -1, -1, -1, -1, -1, 30, 31, 32, 33, 34,
5256 35, 36, -1, -1, 39, -1, -1, -1, -1, -1,
5257 -1, 46, -1, -1, 49, 50, 51, 52, 53, 54,
5258 55, 56, 57, -1, 59, 60, 61, 62, 63, 64,
5259 65, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5260 75, 76, -1, -1, -1, -1, -1, -1, -1, -1,
5261 -1, -1, -1, -1, -1, 90, 91, -1, -1, -1,
5262 -1, -1, -1, 98, -1, -1, 101, 102, -1, 104,
5263 105, -1, 107, -1, -1, 110, 111, 112, 113, 114,
5264 115, 116, 117, 118, -1, -1, -1, -1, -1, -1,
5265 -1, -1, -1, -1, 3, 4, 5, -1, 7, -1,
5266 -1, -1, 11, 12, 139, 140, 141, 16, -1, 18,
5267 19, 20, 21, 22, 23, 24, -1, -1, -1, -1,
5268 -1, 30, 31, 32, 33, 34, 35, 36, -1, -1,
5269 39, -1, -1, -1, -1, -1, -1, 46, -1, -1,
5270 49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
5271 59, 60, 61, 62, 63, 64, 65, -1, -1, -1,
5272 -1, -1, -1, -1, -1, -1, 75, 76, -1, -1,
5273 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5274 -1, 90, 91, -1, -1, -1, -1, -1, -1, 98,
5275 -1, -1, 101, 102, -1, 104, 105, -1, 107, -1,
5276 -1, 110, 111, 112, 113, 114, 115, 116, 117, 118,
5277 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5278 3, 4, 5, -1, 7, -1, -1, -1, 11, 12,
5279 139, 140, 141, 16, -1, 18, 19, 20, 21, 22,
5280 23, 24, -1, -1, -1, -1, -1, 30, 31, 32,
5281 33, 34, 35, 36, -1, -1, 39, -1, -1, -1,
5282 -1, -1, -1, 46, -1, -1, 49, 50, 51, 52,
5283 53, 54, 55, 56, 57, -1, 59, 60, 61, 62,
5284 63, 64, 65, -1, -1, -1, -1, -1, -1, -1,
5285 -1, -1, 75, 76, -1, -1, -1, -1, -1, -1,
5286 -1, -1, -1, -1, -1, -1, -1, 90, 91, -1,
5287 -1, -1, -1, -1, -1, 98, -1, -1, 101, 102,
5288 -1, 104, 105, -1, 107, -1, -1, 110, 111, 112,
5289 113, 114, 115, 116, 117, 118, -1, -1, -1, -1,
5290 -1, -1, -1, -1, -1, -1, 3, 4, 5, -1,
5291 7, -1, -1, -1, 11, 12, 139, 140, 141, 16,
5292 -1, 18, 19, 20, 21, 22, 23, 24, -1, -1,
5293 -1, -1, -1, 30, 31, 32, 33, 34, 35, 36,
5294 -1, -1, 39, -1, -1, -1, -1, -1, -1, 46,
5295 -1, -1, 49, 50, 51, 52, 53, 54, 55, 56,
5296 57, -1, 59, 60, 61, 62, 63, 64, 65, -1,
5297 -1, -1, -1, -1, -1, -1, -1, -1, 75, 76,
5298 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5299 -1, -1, -1, 90, 91, -1, -1, -1, -1, -1,
5300 -1, 98, -1, -1, 101, 102, -1, 104, 105, -1,
5301 107, -1, -1, 110, 111, 112, 113, 114, 115, 116,
5302 117, 118, -1, -1, -1, -1, -1, -1, -1, -1,
5303 -1, -1, 3, 4, 5, -1, 7, -1, -1, -1,
5304 11, 12, 139, 140, 141, 16, -1, 18, 19, 20,
5305 21, 22, 23, 24, -1, -1, -1, -1, -1, 30,
5306 31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
5307 -1, -1, -1, -1, -1, 46, -1, -1, 49, 50,
5308 51, 52, 53, 54, 55, 56, 57, -1, 59, 60,
5309 61, 62, 63, 64, 65, -1, -1, -1, -1, -1,
5310 -1, -1, -1, -1, 75, 76, -1, -1, -1, -1,
5311 -1, -1, -1, -1, -1, -1, -1, -1, -1, 90,
5312 91, -1, -1, -1, -1, -1, -1, 98, -1, -1,
5313 101, 102, -1, 104, 105, -1, -1, -1, -1, 110,
5314 111, 112, 113, 114, 115, 116, 117, 118, -1, -1,
5315 -1, -1, -1, -1, -1, -1, -1, -1, 3, 4,
5316 5, -1, 7, -1, -1, -1, 11, 12, 139, 140,
5317 141, 16, -1, 18, 19, 20, 21, 22, 23, 24,
5318 -1, -1, -1, -1, -1, 30, 31, 32, 33, 34,
5319 35, 36, -1, -1, 39, -1, -1, -1, -1, -1,
5320 -1, 46, -1, -1, 49, 50, 51, 52, 53, 54,
5321 55, 56, 57, -1, 59, 60, 61, 62, 63, 64,
5322 65, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5323 75, 76, -1, -1, -1, -1, -1, -1, -1, -1,
5324 -1, -1, -1, -1, -1, 90, 91, -1, -1, -1,
5325 -1, -1, -1, 98, -1, -1, 101, 102, -1, 104,
5326 105, -1, -1, -1, -1, 110, 111, 112, 113, 114,
5327 115, 116, 117, 118, -1, -1, -1, -1, -1, -1,
5328 -1, -1, -1, -1, 3, 4, 5, -1, 7, -1,
5329 -1, -1, 11, 12, 139, 140, 141, 16, -1, 18,
5330 19, 20, 21, 22, 23, 24, -1, -1, -1, -1,
5331 -1, 30, 31, 32, 33, 34, 35, 36, -1, -1,
5332 39, -1, -1, -1, -1, -1, -1, 46, -1, -1,
5333 49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
5334 59, 60, 61, 62, 63, 64, 65, -1, -1, -1,
5335 -1, -1, -1, -1, -1, -1, 75, 76, -1, -1,
5336 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5337 -1, 90, 91, -1, -1, -1, -1, -1, -1, 98,
5338 -1, -1, 101, 102, -1, 104, 105, -1, -1, -1,
5339 -1, 110, 111, 112, 113, 114, 115, 116, 117, 118,
5340 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5341 3, 4, 5, -1, 7, -1, -1, -1, 11, 12,
5342 139, 140, 141, 16, -1, 18, 19, 20, 21, 22,
5343 23, 24, -1, -1, -1, -1, -1, 30, 31, 32,
5344 33, 34, 35, 36, -1, -1, 39, -1, -1, -1,
5345 -1, -1, -1, 46, -1, -1, 49, 50, 51, 52,
5346 53, 54, 55, 56, 57, -1, 59, 60, 61, 62,
5347 63, 64, 65, -1, -1, -1, -1, -1, -1, -1,
5348 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5349 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5350 -1, -1, -1, -1, -1, 98, -1, -1, 101, 102,
5351 -1, 104, 105, -1, 107, -1, -1, 110, 111, 112,
5352 113, 114, 115, 116, 117, 118, -1, -1, -1, -1,
5353 -1, -1, 3, 4, 5, -1, 7, -1, -1, -1,
5354 11, 12, -1, -1, -1, 16, 139, 18, 19, 20,
5355 21, 22, 23, 24, -1, -1, -1, -1, -1, 30,
5356 31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
5357 -1, -1, -1, -1, -1, 46, -1, -1, 49, 50,
5358 51, 52, 53, 54, 55, 56, 57, -1, 59, 60,
5359 61, 62, 63, 64, 65, -1, -1, -1, -1, -1,
5360 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5361 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5362 -1, -1, -1, -1, -1, -1, -1, 98, -1, -1,
5363 101, 102, -1, 104, 105, -1, 107, -1, -1, 110,
5364 111, 112, 113, 114, 115, 116, 117, 118, -1, -1,
5365 -1, -1, -1, -1, 3, 4, 5, -1, 7, -1,
5366 -1, -1, 11, 12, -1, -1, -1, 16, 139, 18,
5367 19, 20, 21, 22, 23, 24, -1, -1, -1, -1,
5368 -1, 30, 31, 32, 33, 34, 35, 36, -1, -1,
5369 39, -1, -1, -1, -1, -1, -1, 46, -1, -1,
5370 49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
5371 59, 60, 61, 62, 63, 64, 65, -1, -1, -1,
5372 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5373 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5374 -1, -1, -1, -1, -1, 94, -1, -1, -1, 98,
5375 -1, -1, 101, 102, -1, 104, 105, -1, -1, -1,
5376 -1, 110, 111, 112, 113, 114, 115, 116, 117, 118,
5377 -1, -1, -1, -1, -1, -1, 3, 4, 5, -1,
5378 7, -1, -1, -1, 11, 12, -1, -1, -1, 16,
5379 139, 18, 19, 20, 21, 22, 23, 24, -1, -1,
5380 -1, -1, -1, 30, 31, 32, 33, 34, 35, 36,
5381 -1, -1, 39, -1, -1, -1, -1, -1, -1, 46,
5382 -1, -1, 49, 50, 51, 52, 53, 54, 55, 56,
5383 57, -1, 59, 60, 61, 62, 63, 64, 65, -1,
5384 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5385 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5386 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5387 -1, 98, -1, -1, 101, 102, -1, 104, 105, -1,
5388 -1, -1, -1, 110, 111, 112, 113, 114, 115, 116,
5389 117, 118, -1, -1, -1, -1, -1, -1, 3, 4,
5390 5, -1, 7, -1, -1, -1, 11, 12, -1, -1,
5391 -1, 16, 139, 18, 19, 20, 21, 22, 23, 24,
5392 -1, -1, -1, -1, -1, 30, 31, 32, 33, 34,
5393 35, 36, -1, -1, 39, -1, -1, -1, -1, -1,
5394 -1, 46, -1, -1, 49, 50, 51, 52, 53, 54,
5395 55, 56, 57, -1, 59, 60, 61, 62, 63, 64,
5396 65, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5397 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5398 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5399 -1, -1, -1, 98, -1, -1, 101, 102, -1, 104,
5400 105, -1, -1, -1, -1, 110, 111, 112, 113, 114,
5401 115, 116, 117, 118, -1, -1, -1, -1, -1, -1,
5402 3, 4, 5, -1, 7, -1, -1, -1, 11, 12,
5403 -1, -1, -1, 16, 139, 18, 19, 20, 21, 22,
5404 23, 24, -1, -1, -1, -1, -1, 30, 31, 32,
5405 33, 34, 35, 36, -1, -1, 39, -1, -1, -1,
5406 -1, -1, -1, 46, -1, -1, 49, 50, 51, 52,
5407 53, 54, 55, 56, 57, -1, 59, 60, 61, 62,
5408 63, 64, 65, -1, -1, -1, -1, -1, -1, -1,
5409 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5410 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5411 -1, -1, -1, -1, -1, 98, -1, -1, 101, 102,
5412 -1, 104, 105, -1, -1, -1, -1, 110, 111, 112,
5413 113, 114, 115, 116, 117, 118, -1, -1, -1, -1,
5414 -1, -1, 3, 4, 5, -1, 7, -1, -1, -1,
5415 11, 12, -1, -1, -1, 16, 139, 18, 19, 20,
5416 21, 22, 23, 24, -1, -1, -1, -1, -1, 30,
5417 31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
5418 -1, -1, -1, -1, -1, 46, -1, -1, 49, 50,
5419 51, 52, 53, 54, 55, 56, 57, -1, 59, 60,
5420 61, 62, 63, 64, 65, 33, 34, 35, 36, -1,
5421 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5422 -1, 49, 50, 51, 52, -1, -1, -1, 56, -1,
5423 -1, 59, 60, 61, 62, 63, -1, 98, -1, -1,
5424 101, 102, -1, 104, 105, -1, -1, -1, -1, 110,
5425 111, 112, 113, 114, 115, 116, 117, 118, -1, -1,
5426 -1, -1, 90, 91, -1, -1, -1, -1, -1, -1,
5427 98, -1, -1, 101, -1, -1, 104, 105, 139, 107,
5428 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
5429 118, 33, 34, 35, 36, -1, -1, -1, -1, -1,
5430 -1, -1, -1, -1, 132, -1, -1, 49, 50, 51,
5431 52, 139, -1, -1, 56, -1, -1, 59, 60, 61,
5432 62, 63, -1, -1, -1, -1, -1, -1, -1, -1,
5433 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5434 -1, -1, -1, -1, -1, -1, -1, -1, 90, 91,
5435 -1, -1, -1, -1, -1, -1, 98, -1, -1, 101,
5436 -1, -1, 104, 105, -1, 107, -1, -1, 110, 111,
5437 112, 113, 114, 115, 116, 117, 118, 52, 53, -1,
5438 -1, 56, -1, -1, -1, -1, -1, -1, -1, -1,
5439 132, -1, -1, -1, -1, -1, -1, 139, -1, -1,
5440 75, 76, 77, 78, 79, 80, 81, 82, 83, -1,
5441 -1, 86, 87, -1, -1, -1, -1, 92, 93, 94,
5442 95, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5443 -1, -1, 107, 108, -1, -1, -1, -1, -1, -1,
5444 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5445 -1, -1, -1, -1, 129, 130, 131, 132, 133, 134,
5446 135, 136, 137, 138, -1, 140, 141, 52, 53, -1,
5447 -1, 56, 147, 148, -1, -1, -1, -1, -1, -1,
5448 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5449 75, 76, 77, 78, 79, 80, 81, 82, 83, -1,
5450 -1, 86, 87, -1, -1, -1, -1, 92, 93, 94,
5451 95, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5452 -1, -1, 107, 108, -1, -1, -1, -1, -1, -1,
5453 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5454 -1, -1, -1, -1, 129, 130, 131, 132, 133, 134,
5455 135, 136, 137, 138, -1, 140, 141, 52, 53, -1,
5456 -1, 56, 147, 148, -1, -1, -1, -1, -1, -1,
5457 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5458 75, 76, 77, 78, 79, 80, 81, 82, 83, -1,
5459 -1, 86, 87, -1, -1, -1, -1, 92, 93, 94,
5460 95, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5461 -1, -1, 107, 108, -1, -1, -1, -1, -1, -1,
5462 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5463 -1, -1, -1, -1, 129, 130, 131, 132, 133, 134,
5464 135, 136, 137, 138, -1, 140, 141, 52, 53, -1,
5465 -1, 56, 147, 148, -1, -1, -1, -1, -1, -1,
5466 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5467 75, 76, 77, 78, 79, 80, 81, 82, 83, -1,
5468 -1, 86, 87, -1, -1, -1, -1, 92, 93, 94,
5469 95, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5470 -1, -1, 107, 108, -1, -1, -1, -1, -1, -1,
5471 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5472 -1, -1, -1, -1, 129, 130, 131, 132, 133, 134,
5473 135, 136, 137, 138, -1, 140, 141, 52, 53, -1,
5474 -1, 56, 147, 148, -1, -1, -1, -1, -1, -1,
5475 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5476 75, 76, 77, 78, 79, 80, 81, 82, 83, -1,
5477 -1, 86, 87, -1, -1, -1, -1, 92, 93, 94,
5478 95, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5479 -1, -1, 107, 108, -1, -1, -1, -1, -1, -1,
5480 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5481 -1, -1, -1, -1, 129, 130, 131, 132, 133, 134,
5482 135, 136, 137, 138, -1, 140, 141, 52, 53, -1,
5483 -1, 56, 147, 148, -1, -1, -1, -1, -1, -1,
5484 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5485 75, 76, 77, 78, 79, 80, 81, 82, 83, -1,
5486 -1, 86, 87, -1, -1, -1, -1, 92, 93, 94,
5487 95, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5488 -1, -1, 107, 108, -1, -1, -1, -1, -1, -1,
5489 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5490 -1, -1, -1, -1, 129, 130, 131, 132, 133, 134,
5491 135, 136, 137, 138, -1, 140, 141, 52, 53, -1,
5492 -1, 56, 147, 148, -1, -1, -1, -1, -1, -1,
5493 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5494 75, 76, 77, 78, 79, 80, 81, 82, 83, -1,
5495 -1, 86, 87, -1, -1, -1, -1, 92, 93, 94,
5496 95, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5497 -1, -1, 107, 108, -1, -1, -1, -1, -1, -1,
5498 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5499 -1, -1, -1, -1, 129, 130, 131, 132, 133, 134,
5500 135, 136, 137, 138, -1, 140, 141, 52, 53, -1,
5501 -1, 56, 147, 148, -1, -1, -1, -1, -1, -1,
5502 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5503 75, 76, 77, 78, 79, 80, 81, 82, 83, -1,
5504 -1, 86, 87, -1, -1, -1, -1, 92, 93, 94,
5505 95, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5506 -1, -1, 107, 108, -1, -1, -1, -1, -1, -1,
5507 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5508 -1, -1, -1, -1, 129, 130, 131, 132, 133, 134,
5509 135, 136, 137, 138, -1, 140, 141, 52, 53, -1,
5510 -1, 56, 147, 148, -1, -1, -1, -1, -1, -1,
5511 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5512 75, 76, 77, 78, 79, 80, 81, 82, 83, -1,
5513 -1, 86, 87, -1, -1, -1, -1, 92, 93, 94,
5514 95, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5515 -1, -1, 107, 108, -1, -1, -1, -1, -1, -1,
5516 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5517 -1, -1, -1, -1, 129, 130, 131, 132, 133, 134,
5518 135, 136, 137, 138, -1, 140, 141, 52, 53, -1,
5519 -1, 56, 147, 148, -1, -1, -1, -1, -1, -1,
5520 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5521 75, 76, 77, 78, 79, 80, 81, 82, 83, -1,
5522 -1, 86, 87, -1, -1, -1, -1, 92, 93, 94,
5523 95, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5524 -1, -1, 107, 108, -1, -1, -1, -1, -1, -1,
5525 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5526 -1, -1, -1, -1, 129, 130, 131, 132, 133, 134,
5527 135, 136, 137, 138, -1, 140, 141, 52, 53, -1,
5528 -1, 56, 147, 148, -1, -1, -1, -1, -1, -1,
5529 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5530 75, 76, 77, 78, 79, 80, 81, 82, 83, -1,
5531 -1, 86, 87, -1, -1, -1, -1, 92, 93, 94,
5532 95, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5533 -1, -1, 107, 108, -1, -1, -1, -1, -1, -1,
5534 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5535 -1, -1, -1, -1, 129, 130, 131, 132, 133, 134,
5536 135, 136, 137, 138, -1, 140, 141, 52, 53, -1,
5537 -1, 56, 147, 148, -1, -1, -1, -1, -1, -1,
5538 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5539 75, 76, 77, 78, 79, 80, 81, 82, 83, -1,
5540 -1, 86, 87, -1, -1, -1, -1, 92, 93, 94,
5541 95, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5542 -1, -1, 107, 108, -1, -1, -1, -1, -1, -1,
5543 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5544 -1, -1, -1, -1, 129, 130, 131, 132, 133, 134,
5545 135, 136, 137, 138, -1, 140, 141, 52, 53, -1,
5546 -1, 56, 147, 148, -1, -1, -1, -1, -1, -1,
5547 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5548 75, 76, 77, 78, 79, 80, 81, 82, 83, -1,
5549 -1, 86, 87, -1, -1, -1, -1, 92, 93, 94,
5550 95, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5551 -1, -1, 107, 108, -1, -1, -1, -1, -1, -1,
5552 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5553 -1, -1, -1, -1, 129, 130, 131, 132, 133, 134,
5554 135, 136, 137, 138, -1, 140, 141, 52, 53, -1,
5555 -1, 56, 147, 148, -1, -1, -1, -1, -1, -1,
5556 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5557 75, 76, 77, 78, 79, 80, 81, 82, 83, -1,
5558 -1, 86, 87, -1, -1, -1, -1, 92, 93, 94,
5559 95, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5560 -1, -1, 107, 108, -1, -1, -1, -1, -1, -1,
5561 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5562 -1, -1, -1, -1, 129, 130, 131, 132, 133, 134,
5563 135, 136, 137, 138, -1, 140, 141, 52, 53, -1,
5564 -1, 56, 147, 148, -1, -1, -1, -1, -1, -1,
5565 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5566 75, 76, 77, 78, 79, 80, 81, 82, 83, -1,
5567 -1, 86, 87, -1, -1, -1, -1, 92, 93, 94,
5568 95, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5569 -1, -1, 107, 108, -1, -1, -1, -1, -1, -1,
5570 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5571 -1, -1, -1, -1, 129, 130, 131, 132, 133, 134,
5572 135, 136, 137, 138, -1, 140, 141, 52, 53, -1,
5573 -1, 56, 147, 148, -1, -1, -1, -1, -1, -1,
5574 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5575 75, 76, 77, 78, 79, 80, 81, 82, 83, -1,
5576 -1, 86, 87, -1, -1, -1, -1, 92, 93, 94,
5577 95, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5578 -1, -1, 107, 108, -1, -1, -1, -1, -1, -1,
5579 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5580 -1, -1, -1, -1, 129, 130, 131, 132, 133, 134,
5581 135, 136, 137, 138, -1, 140, 141, -1, -1, -1,
5582 -1, -1, 147
5583};
5584
5585/* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of
5586 state STATE-NUM. */
5587static const yytype_int16 yystos[] =
5588{
5589 0, 155, 156, 0, 1, 3, 4, 5, 6, 7,
5590 11, 12, 16, 18, 19, 20, 21, 22, 23, 24,
5591 30, 31, 32, 33, 34, 35, 36, 39, 45, 46,
5592 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
5593 57, 59, 60, 61, 62, 63, 64, 65, 75, 76,
5594 90, 91, 98, 101, 102, 104, 105, 107, 110, 111,
5595 112, 113, 114, 115, 116, 117, 118, 139, 140, 141,
5596 157, 158, 159, 167, 169, 171, 179, 180, 186, 187,
5597 189, 190, 191, 193, 194, 195, 197, 198, 207, 210,
5598 226, 236, 237, 238, 239, 240, 241, 242, 243, 244,
5599 245, 246, 255, 275, 283, 284, 335, 336, 337, 338,
5600 339, 340, 341, 344, 346, 347, 361, 362, 364, 365,
5601 366, 367, 368, 369, 370, 371, 409, 423, 159, 3,
5602 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
5603 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
5604 24, 25, 26, 30, 31, 32, 33, 34, 35, 36,
5605 37, 38, 39, 45, 46, 47, 48, 49, 50, 51,
5606 52, 53, 56, 75, 76, 77, 78, 79, 80, 81,
5607 82, 83, 86, 87, 92, 93, 94, 95, 107, 108,
5608 129, 130, 131, 132, 133, 134, 135, 136, 137, 138,
5609 140, 141, 147, 201, 202, 203, 205, 206, 361, 39,
5610 58, 98, 101, 107, 108, 109, 112, 140, 190, 198,
5611 207, 212, 218, 221, 223, 236, 367, 368, 370, 371,
5612 407, 408, 218, 148, 219, 220, 148, 215, 219, 148,
5613 153, 416, 54, 202, 416, 143, 160, 143, 21, 22,
5614 31, 32, 189, 207, 236, 255, 207, 207, 207, 56,
5615 1, 47, 101, 163, 164, 165, 167, 192, 193, 423,
5616 167, 228, 213, 223, 407, 423, 212, 406, 407, 423,
5617 46, 98, 139, 146, 179, 180, 197, 226, 236, 367,
5618 368, 371, 276, 54, 55, 57, 201, 350, 363, 350,
5619 351, 352, 152, 152, 152, 152, 366, 186, 207, 207,
5620 151, 153, 415, 421, 422, 40, 41, 42, 43, 44,
5621 37, 38, 148, 374, 375, 376, 377, 423, 374, 376,
5622 26, 143, 215, 219, 247, 285, 28, 248, 282, 126,
5623 146, 101, 107, 194, 126, 25, 77, 78, 79, 80,
5624 81, 82, 83, 84, 85, 86, 87, 88, 89, 94,
5625 95, 100, 127, 129, 130, 131, 132, 133, 134, 135,
5626 136, 137, 138, 209, 209, 68, 96, 97, 145, 413,
5627 227, 171, 182, 182, 183, 184, 183, 182, 415, 422,
5628 98, 191, 198, 236, 260, 367, 368, 371, 52, 56,
5629 94, 98, 199, 200, 236, 367, 368, 371, 200, 33,
5630 34, 35, 36, 49, 50, 51, 52, 56, 148, 178,
5631 201, 369, 404, 218, 97, 413, 414, 285, 338, 99,
5632 99, 146, 212, 56, 212, 212, 212, 350, 126, 100,
5633 146, 222, 423, 97, 145, 413, 99, 99, 146, 222,
5634 218, 416, 417, 218, 91, 217, 218, 223, 381, 407,
5635 423, 171, 417, 171, 54, 64, 65, 168, 148, 208,
5636 157, 163, 97, 413, 99, 167, 166, 192, 149, 415,
5637 422, 417, 229, 417, 150, 146, 153, 420, 146, 420,
5638 144, 420, 416, 56, 366, 194, 196, 375, 146, 97,
5639 145, 413, 277, 66, 119, 121, 122, 353, 119, 119,
5640 353, 67, 353, 342, 348, 345, 349, 77, 151, 159,
5641 182, 182, 182, 182, 167, 171, 171, 52, 54, 55,
5642 56, 57, 58, 77, 91, 101, 107, 108, 109, 133,
5643 136, 265, 378, 380, 381, 382, 383, 384, 385, 386,
5644 387, 388, 391, 392, 393, 394, 395, 398, 399, 400,
5645 401, 402, 126, 161, 163, 380, 386, 126, 161, 286,
5646 287, 106, 188, 290, 291, 290, 70, 211, 423, 192,
5647 146, 197, 146, 211, 175, 207, 207, 207, 207, 207,
5648 207, 207, 207, 207, 207, 207, 207, 207, 172, 207,
5649 207, 207, 207, 207, 207, 207, 207, 207, 207, 207,
5650 52, 53, 56, 205, 215, 410, 411, 217, 223, 52,
5651 53, 56, 205, 215, 410, 161, 13, 256, 421, 256,
5652 163, 182, 163, 415, 232, 56, 97, 145, 413, 25,
5653 171, 52, 56, 199, 130, 372, 97, 145, 413, 235,
5654 405, 68, 97, 412, 52, 56, 410, 211, 211, 204,
5655 124, 211, 212, 107, 212, 221, 407, 52, 56, 217,
5656 52, 56, 211, 211, 408, 417, 149, 417, 146, 417,
5657 146, 417, 202, 230, 207, 144, 144, 410, 410, 211,
5658 160, 417, 165, 417, 407, 146, 196, 52, 56, 217,
5659 52, 56, 278, 355, 354, 119, 343, 353, 66, 119,
5660 119, 343, 66, 119, 207, 101, 107, 261, 262, 263,
5661 264, 383, 146, 403, 423, 417, 417, 126, 146, 379,
5662 212, 146, 403, 34, 52, 146, 379, 52, 146, 379,
5663 52, 207, 10, 254, 8, 249, 331, 423, 421, 146,
5664 207, 254, 144, 288, 286, 254, 292, 254, 107, 186,
5665 212, 223, 224, 225, 417, 196, 146, 169, 170, 186,
5666 198, 207, 212, 214, 225, 236, 371, 176, 173, 416,
5667 99, 99, 215, 219, 416, 418, 146, 99, 99, 215,
5668 216, 219, 423, 254, 163, 13, 163, 254, 27, 257,
5669 421, 254, 25, 231, 297, 17, 251, 295, 52, 56,
5670 217, 52, 56, 183, 234, 373, 233, 52, 56, 199,
5671 217, 161, 171, 181, 216, 219, 170, 207, 214, 170,
5672 214, 202, 212, 212, 222, 99, 99, 418, 99, 99,
5673 381, 407, 171, 214, 420, 194, 418, 148, 280, 380,
5674 356, 54, 55, 57, 360, 371, 152, 353, 152, 152,
5675 152, 263, 383, 146, 417, 146, 402, 212, 378, 381,
5676 385, 398, 400, 388, 392, 394, 386, 395, 400, 384,
5677 386, 44, 212, 225, 332, 423, 9, 15, 250, 252,
5678 334, 423, 44, 289, 144, 293, 212, 146, 44, 196,
5679 44, 126, 44, 97, 145, 413, 52, 56, 90, 91,
5680 98, 101, 104, 105, 132, 275, 304, 305, 306, 309,
5681 326, 327, 328, 329, 330, 335, 336, 339, 340, 341,
5682 344, 346, 347, 368, 304, 128, 211, 211, 188, 150,
5683 99, 211, 211, 188, 14, 252, 253, 258, 259, 423,
5684 259, 185, 298, 295, 254, 107, 212, 294, 254, 418,
5685 163, 421, 182, 161, 418, 254, 417, 178, 285, 282,
5686 211, 211, 99, 211, 211, 417, 146, 417, 380, 279,
5687 357, 417, 261, 264, 262, 417, 146, 379, 146, 379,
5688 403, 146, 379, 146, 379, 379, 207, 100, 333, 423,
5689 163, 162, 207, 131, 270, 271, 423, 270, 107, 212,
5690 167, 167, 211, 207, 52, 56, 217, 52, 56, 327,
5691 327, 56, 199, 311, 107, 304, 312, 313, 314, 315,
5692 316, 318, 418, 310, 416, 419, 52, 100, 177, 131,
5693 88, 89, 97, 145, 148, 307, 308, 174, 207, 170,
5694 214, 170, 214, 211, 170, 214, 170, 214, 163, 182,
5695 254, 254, 299, 254, 212, 146, 256, 254, 161, 421,
5696 254, 211, 272, 416, 29, 123, 281, 358, 146, 146,
5697 386, 400, 386, 386, 98, 198, 236, 367, 368, 371,
5698 256, 163, 265, 266, 269, 272, 384, 386, 387, 389,
5699 390, 396, 397, 400, 402, 163, 161, 212, 418, 304,
5700 52, 418, 107, 304, 318, 418, 146, 146, 58, 112,
5701 319, 320, 321, 322, 323, 324, 325, 392, 144, 328,
5702 309, 327, 327, 199, 418, 417, 112, 312, 315, 319,
5703 312, 315, 319, 170, 214, 256, 302, 303, 304, 314,
5704 315, 319, 107, 212, 163, 254, 149, 151, 161, 163,
5705 359, 262, 379, 146, 379, 379, 379, 56, 97, 145,
5706 413, 163, 334, 403, 272, 131, 126, 146, 267, 268,
5707 98, 236, 146, 403, 146, 267, 146, 267, 417, 52,
5708 146, 146, 317, 318, 350, 419, 146, 304, 34, 52,
5709 350, 417, 417, 417, 418, 418, 418, 163, 256, 40,
5710 41, 146, 212, 259, 295, 296, 52, 273, 274, 382,
5711 254, 144, 163, 386, 52, 56, 217, 52, 56, 331,
5712 131, 236, 266, 397, 400, 56, 97, 389, 394, 386,
5713 396, 400, 386, 146, 317, 146, 124, 321, 325, 258,
5714 300, 182, 182, 312, 316, 146, 416, 120, 379, 418,
5715 146, 267, 146, 267, 52, 56, 403, 146, 267, 146,
5716 267, 267, 317, 146, 316, 318, 163, 146, 274, 386,
5717 400, 386, 386, 259, 297, 301, 317, 267, 146, 267,
5718 267, 267, 386, 267
5719};
5720
5721/* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */
5722static const yytype_int16 yyr1[] =
5723{
5724 0, 154, 156, 155, 157, 158, 158, 158, 158, 159,
5725 159, 160, 162, 161, 161, 163, 164, 164, 164, 164,
5726 165, 166, 165, 168, 167, 167, 167, 167, 167, 167,
5727 167, 167, 167, 167, 167, 167, 167, 167, 167, 167,
5728 167, 169, 169, 169, 169, 169, 169, 169, 169, 170,
5729 170, 170, 171, 171, 171, 171, 171, 172, 173, 174,
5730 171, 175, 176, 177, 171, 171, 178, 179, 181, 180,
5731 182, 184, 185, 183, 186, 186, 187, 187, 188, 189,
5732 190, 190, 190, 190, 190, 190, 190, 190, 190, 190,
5733 190, 191, 191, 192, 192, 193, 193, 193, 193, 193,
5734 193, 193, 193, 193, 193, 194, 194, 195, 195, 196,
5735 196, 197, 197, 197, 197, 197, 197, 197, 197, 197,
5736 198, 198, 198, 198, 198, 198, 198, 198, 198, 199,
5737 199, 200, 200, 200, 201, 201, 201, 201, 201, 202,
5738 202, 203, 204, 203, 205, 205, 205, 205, 205, 205,
5739 205, 205, 205, 205, 205, 205, 205, 205, 205, 205,
5740 205, 205, 205, 205, 205, 205, 205, 205, 205, 205,
5741 205, 205, 205, 205, 206, 206, 206, 206, 206, 206,
5742 206, 206, 206, 206, 206, 206, 206, 206, 206, 206,
5743 206, 206, 206, 206, 206, 206, 206, 206, 206, 206,
5744 206, 206, 206, 206, 206, 206, 206, 206, 206, 206,
5745 206, 206, 206, 206, 206, 207, 207, 207, 207, 207,
5746 207, 207, 207, 207, 207, 207, 207, 207, 207, 207,
5747 207, 207, 207, 207, 207, 207, 207, 207, 207, 207,
5748 207, 207, 207, 207, 207, 207, 207, 207, 207, 207,
5749 207, 207, 207, 207, 207, 208, 207, 207, 207, 207,
5750 207, 207, 207, 209, 209, 209, 209, 210, 210, 211,
5751 211, 212, 213, 213, 213, 213, 214, 214, 215, 215,
5752 215, 216, 216, 217, 217, 217, 217, 217, 218, 218,
5753 218, 218, 218, 220, 219, 221, 222, 222, 223, 223,
5754 223, 223, 224, 224, 225, 225, 225, 226, 226, 226,
5755 226, 226, 226, 226, 226, 226, 226, 226, 227, 226,
5756 228, 226, 229, 226, 226, 226, 226, 226, 226, 226,
5757 226, 226, 226, 230, 226, 226, 226, 226, 226, 226,
5758 226, 226, 226, 226, 226, 231, 226, 232, 226, 226,
5759 226, 233, 226, 234, 226, 235, 226, 226, 226, 226,
5760 226, 226, 226, 236, 237, 238, 239, 240, 241, 242,
5761 243, 244, 245, 246, 247, 248, 249, 250, 251, 252,
5762 253, 254, 255, 256, 256, 256, 257, 257, 258, 258,
5763 259, 259, 260, 260, 261, 261, 262, 262, 263, 263,
5764 263, 263, 263, 264, 264, 265, 265, 266, 266, 266,
5765 266, 267, 267, 268, 269, 269, 269, 269, 269, 269,
5766 269, 269, 269, 269, 269, 269, 269, 269, 269, 270,
5767 270, 271, 271, 272, 272, 273, 273, 274, 274, 276,
5768 277, 278, 279, 275, 280, 280, 281, 281, 282, 283,
5769 283, 283, 283, 284, 284, 284, 284, 284, 284, 284,
5770 284, 284, 285, 285, 287, 288, 289, 286, 291, 292,
5771 293, 290, 294, 294, 294, 294, 295, 296, 296, 298,
5772 299, 300, 297, 301, 301, 302, 302, 302, 303, 303,
5773 303, 303, 303, 303, 304, 305, 305, 306, 306, 307,
5774 308, 309, 309, 309, 309, 309, 309, 309, 309, 309,
5775 309, 309, 309, 310, 309, 309, 311, 309, 312, 312,
5776 312, 312, 312, 312, 312, 312, 313, 313, 314, 314,
5777 315, 316, 316, 317, 317, 318, 319, 319, 319, 319,
5778 320, 320, 321, 321, 322, 322, 323, 323, 324, 325,
5779 325, 326, 326, 326, 326, 326, 326, 326, 326, 326,
5780 326, 327, 327, 327, 327, 327, 327, 327, 327, 327,
5781 327, 328, 329, 330, 330, 330, 331, 331, 332, 332,
5782 332, 333, 333, 334, 334, 335, 335, 336, 337, 337,
5783 337, 338, 339, 340, 341, 342, 342, 343, 343, 344,
5784 345, 345, 346, 347, 348, 348, 349, 349, 350, 350,
5785 351, 351, 352, 352, 353, 354, 353, 355, 356, 357,
5786 358, 359, 353, 360, 360, 360, 360, 361, 361, 362,
5787 363, 363, 363, 363, 364, 365, 365, 366, 366, 366,
5788 366, 367, 367, 367, 367, 367, 368, 368, 368, 368,
5789 368, 368, 368, 369, 369, 370, 370, 371, 371, 373,
5790 372, 372, 374, 374, 375, 375, 375, 376, 377, 376,
5791 378, 378, 378, 378, 379, 379, 380, 380, 380, 380,
5792 380, 380, 380, 380, 380, 380, 380, 380, 380, 380,
5793 380, 381, 382, 382, 382, 382, 383, 383, 384, 385,
5794 385, 386, 386, 387, 388, 388, 389, 389, 390, 390,
5795 391, 391, 392, 392, 393, 394, 394, 395, 396, 397,
5796 397, 398, 398, 399, 399, 400, 400, 401, 401, 402,
5797 403, 403, 404, 405, 404, 406, 406, 407, 407, 408,
5798 408, 408, 408, 409, 409, 409, 410, 410, 410, 410,
5799 411, 411, 411, 412, 412, 413, 413, 414, 414, 415,
5800 415, 416, 416, 417, 418, 419, 420, 420, 420, 421,
5801 421, 422, 422, 423
5802};
5803
5804/* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. */
5805static const yytype_int8 yyr2[] =
5806{
5807 0, 2, 0, 2, 2, 1, 1, 3, 2, 1,
5808 2, 3, 0, 6, 3, 2, 1, 1, 3, 2,
5809 1, 0, 3, 0, 4, 3, 3, 3, 2, 3,
5810 3, 3, 3, 3, 4, 1, 4, 4, 6, 4,
5811 1, 4, 4, 7, 6, 6, 6, 6, 4, 1,
5812 3, 1, 1, 3, 3, 3, 2, 0, 0, 0,
5813 6, 0, 0, 0, 6, 1, 1, 2, 0, 5,
5814 1, 0, 0, 4, 1, 1, 1, 4, 3, 1,
5815 2, 3, 4, 5, 4, 5, 2, 2, 2, 2,
5816 2, 1, 3, 1, 3, 1, 2, 3, 5, 2,
5817 4, 2, 4, 1, 3, 1, 3, 2, 3, 1,
5818 3, 1, 1, 4, 3, 3, 3, 3, 2, 1,
5819 1, 1, 4, 3, 3, 3, 3, 2, 1, 1,
5820 1, 2, 1, 3, 1, 1, 1, 1, 1, 1,
5821 1, 1, 0, 4, 1, 1, 1, 1, 1, 1,
5822 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
5823 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
5824 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
5825 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
5826 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
5827 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
5828 1, 1, 1, 1, 1, 4, 4, 7, 6, 6,
5829 6, 6, 5, 4, 3, 3, 2, 2, 2, 2,
5830 3, 3, 3, 3, 3, 3, 4, 2, 2, 3,
5831 3, 3, 3, 1, 3, 3, 3, 3, 3, 2,
5832 2, 3, 3, 3, 3, 0, 4, 6, 4, 6,
5833 4, 6, 1, 1, 1, 1, 1, 3, 3, 1,
5834 1, 1, 1, 2, 4, 2, 1, 3, 3, 5,
5835 3, 1, 1, 1, 1, 2, 4, 2, 1, 2,
5836 2, 4, 1, 0, 2, 2, 2, 1, 1, 2,
5837 3, 4, 1, 1, 3, 4, 2, 1, 1, 1,
5838 1, 1, 1, 1, 1, 1, 1, 1, 0, 4,
5839 0, 3, 0, 4, 3, 3, 2, 3, 3, 1,
5840 4, 3, 1, 0, 6, 4, 3, 2, 1, 2,
5841 1, 6, 6, 4, 4, 0, 6, 0, 5, 5,
5842 6, 0, 6, 0, 7, 0, 5, 4, 4, 1,
5843 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
5844 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
5845 1, 1, 1, 1, 1, 2, 1, 1, 1, 5,
5846 1, 2, 1, 1, 1, 3, 1, 3, 1, 3,
5847 5, 1, 3, 2, 1, 1, 1, 4, 2, 2,
5848 1, 2, 0, 1, 6, 8, 4, 6, 4, 2,
5849 6, 2, 4, 6, 2, 4, 2, 4, 1, 1,
5850 1, 3, 4, 1, 4, 1, 3, 1, 1, 0,
5851 0, 0, 0, 7, 4, 1, 3, 3, 3, 2,
5852 4, 5, 5, 2, 4, 4, 3, 3, 3, 2,
5853 1, 4, 3, 3, 0, 0, 0, 5, 0, 0,
5854 0, 5, 1, 2, 3, 4, 5, 1, 1, 0,
5855 0, 0, 8, 1, 1, 1, 3, 3, 1, 2,
5856 3, 1, 1, 1, 1, 3, 1, 3, 1, 1,
5857 1, 1, 4, 4, 4, 3, 4, 4, 4, 3,
5858 3, 3, 2, 0, 4, 2, 0, 4, 1, 1,
5859 2, 3, 5, 2, 4, 1, 2, 3, 1, 3,
5860 5, 2, 1, 1, 3, 1, 3, 1, 2, 1,
5861 1, 3, 2, 1, 1, 3, 2, 1, 2, 1,
5862 1, 1, 3, 3, 2, 2, 1, 1, 1, 2,
5863 2, 1, 1, 1, 1, 1, 1, 1, 1, 1,
5864 1, 1, 2, 2, 3, 1, 6, 1, 1, 1,
5865 1, 2, 1, 2, 1, 1, 1, 1, 1, 1,
5866 2, 3, 3, 3, 4, 0, 3, 1, 2, 4,
5867 0, 3, 4, 4, 0, 3, 0, 3, 0, 2,
5868 0, 2, 0, 2, 1, 0, 3, 0, 0, 0,
5869 0, 0, 8, 1, 1, 1, 1, 1, 1, 2,
5870 1, 1, 1, 1, 3, 1, 2, 1, 1, 1,
5871 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
5872 1, 1, 1, 1, 1, 1, 1, 1, 1, 0,
5873 4, 0, 1, 1, 3, 5, 3, 1, 0, 3,
5874 4, 2, 2, 1, 2, 0, 6, 8, 4, 6,
5875 4, 6, 2, 4, 6, 2, 4, 2, 4, 1,
5876 0, 1, 1, 1, 1, 1, 1, 1, 1, 1,
5877 3, 1, 3, 1, 2, 1, 2, 1, 1, 3,
5878 1, 3, 1, 1, 2, 2, 1, 3, 3, 1,
5879 3, 1, 3, 1, 1, 2, 1, 1, 1, 2,
5880 2, 1, 1, 0, 4, 1, 2, 1, 3, 3,
5881 2, 4, 2, 1, 1, 1, 1, 1, 1, 1,
5882 1, 1, 1, 1, 1, 1, 1, 1, 1, 0,
5883 1, 0, 1, 2, 2, 2, 0, 1, 1, 1,
5884 1, 1, 2, 0
5885};
5886
5887
5888enum { YYENOMEM = -2 };
5889
5890#define yyerrok (yyerrstatus = 0)
5891#define yyclearin (yychar = YYEMPTY)
5892
5893#define YYACCEPT goto yyacceptlab
5894#define YYABORT goto yyabortlab
5895#define YYERROR goto yyerrorlab
5896#define YYNOMEM goto yyexhaustedlab
5897
5898
5899#define YYRECOVERING() (!!yyerrstatus)
5900
5901#define YYBACKUP(Token, Value) \
5902 do \
5903 if (yychar == YYEMPTY) \
5904 { \
5905 yychar = (Token); \
5906 yylval = (Value); \
5907 YYPOPSTACK (yylen); \
5908 yystate = *yyssp; \
5909 goto yybackup; \
5910 } \
5911 else \
5912 { \
5913 yyerror (&yylloc, p, YY_("syntax error: cannot back up")); \
5914 YYERROR; \
5915 } \
5916 while (0)
5917
5918/* Backward compatibility with an undocumented macro.
5919 Use YYerror or YYUNDEF. */
5920#define YYERRCODE YYUNDEF
5921
5922/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
5923 If N is 0, then set CURRENT to the empty location which ends
5924 the previous symbol: RHS[0] (always defined). */
5925
5926#ifndef YYLLOC_DEFAULT
5927# define YYLLOC_DEFAULT(Current, Rhs, N) \
5928 do \
5929 if (N) \
5930 { \
5931 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
5932 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
5933 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
5934 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
5935 } \
5936 else \
5937 { \
5938 (Current).first_line = (Current).last_line = \
5939 YYRHSLOC (Rhs, 0).last_line; \
5940 (Current).first_column = (Current).last_column = \
5941 YYRHSLOC (Rhs, 0).last_column; \
5942 } \
5943 while (0)
5944#endif
5945
5946#define YYRHSLOC(Rhs, K) ((Rhs)[K])
5947
5948
5949/* Enable debugging if requested. */
5950#if YYDEBUG
5951
5952# ifndef YYFPRINTF
5953# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
5954# define YYFPRINTF fprintf
5955# endif
5956
5957# define YYDPRINTF(Args) \
5958do { \
5959 if (yydebug) \
5960 YYFPRINTF Args; \
5961} while (0)
5962
5963
5964/* YYLOCATION_PRINT -- Print the location on the stream.
5965 This macro was not mandated originally: define only if we know
5966 we won't break user code: when these are the locations we know. */
5967
5968# ifndef YYLOCATION_PRINT
5969
5970# if defined YY_LOCATION_PRINT
5971
5972 /* Temporary convenience wrapper in case some people defined the
5973 undocumented and private YY_LOCATION_PRINT macros. */
5974# define YYLOCATION_PRINT(File, Loc) YY_LOCATION_PRINT(File, *(Loc))
5975
5976# elif defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
5977
5978/* Print *YYLOCP on YYO. Private, do not rely on its existence. */
5979
5981static int
5982yy_location_print_ (FILE *yyo, YYLTYPE const * const yylocp)
5983{
5984 int res = 0;
5985 int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0;
5986 if (0 <= yylocp->first_line)
5987 {
5988 res += YYFPRINTF (p, "%d", yylocp->first_line);
5989 if (0 <= yylocp->first_column)
5990 res += YYFPRINTF (p, ".%d", yylocp->first_column);
5991 }
5992 if (0 <= yylocp->last_line)
5993 {
5994 if (yylocp->first_line < yylocp->last_line)
5995 {
5996 res += YYFPRINTF (p, "-%d", yylocp->last_line);
5997 if (0 <= end_col)
5998 res += YYFPRINTF (p, ".%d", end_col);
5999 }
6000 else if (0 <= end_col && yylocp->first_column < end_col)
6001 res += YYFPRINTF (p, "-%d", end_col);
6002 }
6003 return res;
6004}
6005
6006# define YYLOCATION_PRINT yy_location_print_
6007
6008 /* Temporary convenience wrapper in case some people defined the
6009 undocumented and private YY_LOCATION_PRINT macros. */
6010# define YY_LOCATION_PRINT(File, Loc) YYLOCATION_PRINT(File, &(Loc))
6011
6012# else
6013
6014# define YYLOCATION_PRINT(File, Loc) ((void) 0)
6015 /* Temporary convenience wrapper in case some people defined the
6016 undocumented and private YY_LOCATION_PRINT macros. */
6017# define YY_LOCATION_PRINT YYLOCATION_PRINT
6018
6019# endif
6020# endif /* !defined YYLOCATION_PRINT */
6021
6022
6023# define YY_SYMBOL_PRINT(Title, Kind, Value, Location) \
6024do { \
6025 if (yydebug) \
6026 { \
6027 YYFPRINTF (p, "%s ", Title); \
6028 yy_symbol_print (stderr, \
6029 Kind, Value, Location, p); \
6030 YYFPRINTF (p, "\n"); \
6031 } \
6032} while (0)
6033
6034
6035/*-----------------------------------.
6036| Print this symbol's value on YYO. |
6037`-----------------------------------*/
6038
6039static void
6040yy_symbol_value_print (FILE *yyo,
6041 yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, struct parser_params *p)
6042{
6043 FILE *yyoutput = yyo;
6044 YY_USE (yyoutput);
6045 YY_USE (yylocationp);
6046 YY_USE (p);
6047 if (!yyvaluep)
6048 return;
6050 switch (yykind)
6051 {
6052 case YYSYMBOL_tIDENTIFIER: /* "local variable or method" */
6053#line 1085 "ripper.y"
6054 {
6055#ifndef RIPPER
6056 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).val)));
6057#else
6058 rb_parser_printf(p, "%"PRIsVALUE, RNODE(((*yyvaluep).val))->nd_rval);
6059#endif
6060}
6061#line 6060 "ripper.c"
6062 break;
6063
6064 case YYSYMBOL_tFID: /* "method" */
6065#line 1085 "ripper.y"
6066 {
6067#ifndef RIPPER
6068 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).val)));
6069#else
6070 rb_parser_printf(p, "%"PRIsVALUE, RNODE(((*yyvaluep).val))->nd_rval);
6071#endif
6072}
6073#line 6072 "ripper.c"
6074 break;
6075
6076 case YYSYMBOL_tGVAR: /* "global variable" */
6077#line 1085 "ripper.y"
6078 {
6079#ifndef RIPPER
6080 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).val)));
6081#else
6082 rb_parser_printf(p, "%"PRIsVALUE, RNODE(((*yyvaluep).val))->nd_rval);
6083#endif
6084}
6085#line 6084 "ripper.c"
6086 break;
6087
6088 case YYSYMBOL_tIVAR: /* "instance variable" */
6089#line 1085 "ripper.y"
6090 {
6091#ifndef RIPPER
6092 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).val)));
6093#else
6094 rb_parser_printf(p, "%"PRIsVALUE, RNODE(((*yyvaluep).val))->nd_rval);
6095#endif
6096}
6097#line 6096 "ripper.c"
6098 break;
6099
6100 case YYSYMBOL_tCONSTANT: /* "constant" */
6101#line 1085 "ripper.y"
6102 {
6103#ifndef RIPPER
6104 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).val)));
6105#else
6106 rb_parser_printf(p, "%"PRIsVALUE, RNODE(((*yyvaluep).val))->nd_rval);
6107#endif
6108}
6109#line 6108 "ripper.c"
6110 break;
6111
6112 case YYSYMBOL_tCVAR: /* "class variable" */
6113#line 1085 "ripper.y"
6114 {
6115#ifndef RIPPER
6116 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).val)));
6117#else
6118 rb_parser_printf(p, "%"PRIsVALUE, RNODE(((*yyvaluep).val))->nd_rval);
6119#endif
6120}
6121#line 6120 "ripper.c"
6122 break;
6123
6124 case YYSYMBOL_tLABEL: /* "label" */
6125#line 1085 "ripper.y"
6126 {
6127#ifndef RIPPER
6128 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).val)));
6129#else
6130 rb_parser_printf(p, "%"PRIsVALUE, RNODE(((*yyvaluep).val))->nd_rval);
6131#endif
6132}
6133#line 6132 "ripper.c"
6134 break;
6135
6136 case YYSYMBOL_tINTEGER: /* "integer literal" */
6137#line 1092 "ripper.y"
6138 {
6139#ifndef RIPPER
6140 rb_parser_printf(p, "%+"PRIsVALUE, ((*yyvaluep).val)->nd_lit);
6141#else
6142 rb_parser_printf(p, "%+"PRIsVALUE, get_value(((*yyvaluep).val)));
6143#endif
6144}
6145#line 6144 "ripper.c"
6146 break;
6147
6148 case YYSYMBOL_tFLOAT: /* "float literal" */
6149#line 1092 "ripper.y"
6150 {
6151#ifndef RIPPER
6152 rb_parser_printf(p, "%+"PRIsVALUE, ((*yyvaluep).val)->nd_lit);
6153#else
6154 rb_parser_printf(p, "%+"PRIsVALUE, get_value(((*yyvaluep).val)));
6155#endif
6156}
6157#line 6156 "ripper.c"
6158 break;
6159
6160 case YYSYMBOL_tRATIONAL: /* "rational literal" */
6161#line 1092 "ripper.y"
6162 {
6163#ifndef RIPPER
6164 rb_parser_printf(p, "%+"PRIsVALUE, ((*yyvaluep).val)->nd_lit);
6165#else
6166 rb_parser_printf(p, "%+"PRIsVALUE, get_value(((*yyvaluep).val)));
6167#endif
6168}
6169#line 6168 "ripper.c"
6170 break;
6171
6172 case YYSYMBOL_tIMAGINARY: /* "imaginary literal" */
6173#line 1092 "ripper.y"
6174 {
6175#ifndef RIPPER
6176 rb_parser_printf(p, "%+"PRIsVALUE, ((*yyvaluep).val)->nd_lit);
6177#else
6178 rb_parser_printf(p, "%+"PRIsVALUE, get_value(((*yyvaluep).val)));
6179#endif
6180}
6181#line 6180 "ripper.c"
6182 break;
6183
6184 case YYSYMBOL_tCHAR: /* "char literal" */
6185#line 1092 "ripper.y"
6186 {
6187#ifndef RIPPER
6188 rb_parser_printf(p, "%+"PRIsVALUE, ((*yyvaluep).val)->nd_lit);
6189#else
6190 rb_parser_printf(p, "%+"PRIsVALUE, get_value(((*yyvaluep).val)));
6191#endif
6192}
6193#line 6192 "ripper.c"
6194 break;
6195
6196 case YYSYMBOL_tNTH_REF: /* "numbered reference" */
6197#line 1099 "ripper.y"
6198 {
6199#ifndef RIPPER
6200 rb_parser_printf(p, "$%ld", ((*yyvaluep).val)->nd_nth);
6201#else
6202 rb_parser_printf(p, "%"PRIsVALUE, ((*yyvaluep).val));
6203#endif
6204}
6205#line 6204 "ripper.c"
6206 break;
6207
6208 case YYSYMBOL_tBACK_REF: /* "back reference" */
6209#line 1106 "ripper.y"
6210 {
6211#ifndef RIPPER
6212 rb_parser_printf(p, "$%c", (int)((*yyvaluep).val)->nd_nth);
6213#else
6214 rb_parser_printf(p, "%"PRIsVALUE, ((*yyvaluep).val));
6215#endif
6216}
6217#line 6216 "ripper.c"
6218 break;
6219
6220 case YYSYMBOL_tSTRING_CONTENT: /* "literal content" */
6221#line 1092 "ripper.y"
6222 {
6223#ifndef RIPPER
6224 rb_parser_printf(p, "%+"PRIsVALUE, ((*yyvaluep).val)->nd_lit);
6225#else
6226 rb_parser_printf(p, "%+"PRIsVALUE, get_value(((*yyvaluep).val)));
6227#endif
6228}
6229#line 6228 "ripper.c"
6230 break;
6231
6232 case YYSYMBOL_tOP_ASGN: /* "operator-assignment" */
6233#line 1085 "ripper.y"
6234 {
6235#ifndef RIPPER
6236 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).val)));
6237#else
6238 rb_parser_printf(p, "%"PRIsVALUE, RNODE(((*yyvaluep).val))->nd_rval);
6239#endif
6240}
6241#line 6240 "ripper.c"
6242 break;
6243
6244 default:
6245 break;
6246 }
6248}
6249
6250
6251/*---------------------------.
6252| Print this symbol on YYO. |
6253`---------------------------*/
6254
6255static void
6256yy_symbol_print (FILE *yyo,
6257 yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, struct parser_params *p)
6258{
6259 YYFPRINTF (p, "%s %s (",
6260 yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name (yykind));
6261
6262 YYLOCATION_PRINT (yyo, yylocationp);
6263 YYFPRINTF (p, ": ");
6264 yy_symbol_value_print (yyo, yykind, yyvaluep, yylocationp, p);
6265 YYFPRINTF (p, ")");
6266}
6267
6268/*------------------------------------------------------------------.
6269| yy_stack_print -- Print the state stack from its BOTTOM up to its |
6270| TOP (included). |
6271`------------------------------------------------------------------*/
6272
6273static void
6274ruby_parser_yy_stack_print (yy_state_t *yybottom, yy_state_t *yytop, struct parser_params *p)
6275#define yy_stack_print(b, t) ruby_parser_yy_stack_print(b, t, p)
6276{
6277 YYFPRINTF (p, "Stack now");
6278 for (; yybottom <= yytop; yybottom++)
6279 {
6280 int yybot = *yybottom;
6281 YYFPRINTF (p, " %d", yybot);
6282 }
6283 YYFPRINTF (p, "\n");
6284}
6285
6286# define YY_STACK_PRINT(Bottom, Top) \
6287do { \
6288 if (yydebug) \
6289 yy_stack_print ((Bottom), (Top)); \
6290} while (0)
6291
6292
6293/*------------------------------------------------.
6294| Report that the YYRULE is going to be reduced. |
6295`------------------------------------------------*/
6296
6297static void
6298yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp,
6299 int yyrule, struct parser_params *p)
6300{
6301 int yylno = yyrline[yyrule];
6302 int yynrhs = yyr2[yyrule];
6303 int yyi;
6304 YYFPRINTF (p, "Reducing stack by rule %d (line %d):\n",
6305 yyrule - 1, yylno);
6306 /* The symbols being reduced. */
6307 for (yyi = 0; yyi < yynrhs; yyi++)
6308 {
6309 YYFPRINTF (p, " $%d = ", yyi + 1);
6310 yy_symbol_print (stderr,
6311 YY_ACCESSING_SYMBOL (+yyssp[yyi + 1 - yynrhs]),
6312 &yyvsp[(yyi + 1) - (yynrhs)],
6313 &(yylsp[(yyi + 1) - (yynrhs)]), p);
6314 YYFPRINTF (p, "\n");
6315 }
6316}
6317
6318# define YY_REDUCE_PRINT(Rule) \
6319do { \
6320 if (yydebug) \
6321 yy_reduce_print (yyssp, yyvsp, yylsp, Rule, p); \
6322} while (0)
6323
6324/* Nonzero means print parse trace. It is left uninitialized so that
6325 multiple parsers can coexist. */
6326#ifndef yydebug
6327int yydebug;
6328#endif
6329#else /* !YYDEBUG */
6330# define YYDPRINTF(Args) ((void) 0)
6331# define YY_SYMBOL_PRINT(Title, Kind, Value, Location)
6332# define YY_STACK_PRINT(Bottom, Top)
6333# define YY_REDUCE_PRINT(Rule)
6334#endif /* !YYDEBUG */
6335
6336
6337/* YYINITDEPTH -- initial size of the parser's stacks. */
6338#ifndef YYINITDEPTH
6339# define YYINITDEPTH 200
6340#endif
6341
6342/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
6343 if the built-in stack extension method is used).
6344
6345 Do not make this value too large; the results are undefined if
6346 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
6347 evaluated with infinite-precision integer arithmetic. */
6348
6349#ifndef YYMAXDEPTH
6350# define YYMAXDEPTH 10000
6351#endif
6352
6353
6354/* Context of a parse error. */
6355typedef struct
6356{
6360} yypcontext_t;
6361
6362/* Put in YYARG at most YYARGN of the expected tokens given the
6363 current YYCTX, and return the number of tokens stored in YYARG. If
6364 YYARG is null, return the number of expected tokens (guaranteed to
6365 be less than YYNTOKENS). Return YYENOMEM on memory exhaustion.
6366 Return 0 if there are more than YYARGN expected tokens, yet fill
6367 YYARG up to YYARGN. */
6368static int
6369yypcontext_expected_tokens (const yypcontext_t *yyctx,
6370 yysymbol_kind_t yyarg[], int yyargn)
6371{
6372 /* Actual size of YYARG. */
6373 int yycount = 0;
6374 int yyn = yypact[+*yyctx->yyssp];
6375 if (!yypact_value_is_default (yyn))
6376 {
6377 /* Start YYX at -YYN if negative to avoid negative indexes in
6378 YYCHECK. In other words, skip the first -YYN actions for
6379 this state because they are default actions. */
6380 int yyxbegin = yyn < 0 ? -yyn : 0;
6381 /* Stay within bounds of both yycheck and yytname. */
6382 int yychecklim = YYLAST - yyn + 1;
6383 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
6384 int yyx;
6385 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
6386 if (yycheck[yyx + yyn] == yyx && yyx != YYSYMBOL_YYerror
6387 && !yytable_value_is_error (yytable[yyx + yyn]))
6388 {
6389 if (!yyarg)
6390 ++yycount;
6391 else if (yycount == yyargn)
6392 return 0;
6393 else
6394 yyarg[yycount++] = YY_CAST (yysymbol_kind_t, yyx);
6395 }
6396 }
6397 if (yyarg && yycount == 0 && 0 < yyargn)
6398 yyarg[0] = YYSYMBOL_YYEMPTY;
6399 return yycount;
6400}
6401
6402
6403
6404
6405#ifndef yystrlen
6406# if defined __GLIBC__ && defined _STRING_H
6407# define yystrlen(S) (YY_CAST (YYPTRDIFF_T, strlen (S)))
6408# else
6409/* Return the length of YYSTR. */
6410static YYPTRDIFF_T
6411yystrlen (const char *yystr)
6412{
6413 YYPTRDIFF_T yylen;
6414 for (yylen = 0; yystr[yylen]; yylen++)
6415 continue;
6416 return yylen;
6417}
6418# endif
6419#endif
6420
6421#ifndef yystpcpy
6422# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
6423# define yystpcpy stpcpy
6424# else
6425/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
6426 YYDEST. */
6427static char *
6428yystpcpy (char *yydest, const char *yysrc)
6429{
6430 char *yyd = yydest;
6431 const char *yys = yysrc;
6432
6433 while ((*yyd++ = *yys++) != '\0')
6434 continue;
6435
6436 return yyd - 1;
6437}
6438# endif
6439#endif
6440
6441#ifndef yytnamerr
6442/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
6443 quotes and backslashes, so that it's suitable for yyerror. The
6444 heuristic is that double-quoting is unnecessary unless the string
6445 contains an apostrophe, a comma, or backslash (other than
6446 backslash-backslash). YYSTR is taken from yytname. If YYRES is
6447 null, do not copy; instead, return the length of what the result
6448 would have been. */
6449static YYPTRDIFF_T
6450yytnamerr (char *yyres, const char *yystr)
6451{
6452 if (*yystr == '"')
6453 {
6454 YYPTRDIFF_T yyn = 0;
6455 char const *yyp = yystr;
6456 for (;;)
6457 switch (*++yyp)
6458 {
6459 case '\'':
6460 case ',':
6461 goto do_not_strip_quotes;
6462
6463 case '\\':
6464 if (*++yyp != '\\')
6465 goto do_not_strip_quotes;
6466 else
6467 goto append;
6468
6469 append:
6470 default:
6471 if (yyres)
6472 yyres[yyn] = *yyp;
6473 yyn++;
6474 break;
6475
6476 case '"':
6477 if (yyres)
6478 yyres[yyn] = '\0';
6479 return yyn;
6480 }
6481 do_not_strip_quotes: ;
6482 }
6483
6484 if (yyres)
6485 return yystpcpy (yyres, yystr) - yyres;
6486 else
6487 return yystrlen (yystr);
6488}
6489#endif
6490
6491
6492static int
6493yy_syntax_error_arguments (const yypcontext_t *yyctx,
6494 yysymbol_kind_t yyarg[], int yyargn)
6495{
6496 /* Actual size of YYARG. */
6497 int yycount = 0;
6498 /* There are many possibilities here to consider:
6499 - If this state is a consistent state with a default action, then
6500 the only way this function was invoked is if the default action
6501 is an error action. In that case, don't check for expected
6502 tokens because there are none.
6503 - The only way there can be no lookahead present (in yychar) is if
6504 this state is a consistent state with a default action. Thus,
6505 detecting the absence of a lookahead is sufficient to determine
6506 that there is no unexpected or expected token to report. In that
6507 case, just report a simple "syntax error".
6508 - Don't assume there isn't a lookahead just because this state is a
6509 consistent state with a default action. There might have been a
6510 previous inconsistent state, consistent state with a non-default
6511 action, or user semantic action that manipulated yychar.
6512 - Of course, the expected token list depends on states to have
6513 correct lookahead information, and it depends on the parser not
6514 to perform extra reductions after fetching a lookahead from the
6515 scanner and before detecting a syntax error. Thus, state merging
6516 (from LALR or IELR) and default reductions corrupt the expected
6517 token list. However, the list is correct for canonical LR with
6518 one exception: it will still contain any token that will not be
6519 accepted due to an error action in a later state.
6520 */
6521 if (yyctx->yytoken != YYSYMBOL_YYEMPTY)
6522 {
6523 int yyn;
6524 if (yyarg)
6525 yyarg[yycount] = yyctx->yytoken;
6526 ++yycount;
6527 yyn = yypcontext_expected_tokens (yyctx,
6528 yyarg ? yyarg + 1 : yyarg, yyargn - 1);
6529 if (yyn == YYENOMEM)
6530 return YYENOMEM;
6531 else
6532 yycount += yyn;
6533 }
6534 return yycount;
6535}
6536
6537/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
6538 about the unexpected token YYTOKEN for the state stack whose top is
6539 YYSSP.
6540
6541 Return 0 if *YYMSG was successfully written. Return -1 if *YYMSG is
6542 not large enough to hold the message. In that case, also set
6543 *YYMSG_ALLOC to the required number of bytes. Return YYENOMEM if the
6544 required number of bytes is too large to store. */
6545static int
6546yysyntax_error (struct parser_params *p, YYPTRDIFF_T *yymsg_alloc, char **yymsg,
6547 const yypcontext_t *yyctx)
6548{
6549 enum { YYARGS_MAX = 5 };
6550 /* Internationalized format string. */
6551 const char *yyformat = YY_NULLPTR;
6552 /* Arguments of yyformat: reported tokens (one for the "unexpected",
6553 one per "expected"). */
6554 yysymbol_kind_t yyarg[YYARGS_MAX];
6555 /* Cumulated lengths of YYARG. */
6556 YYPTRDIFF_T yysize = 0;
6557
6558 /* Actual size of YYARG. */
6559 int yycount = yy_syntax_error_arguments (yyctx, yyarg, YYARGS_MAX);
6560 if (yycount == YYENOMEM)
6561 return YYENOMEM;
6562
6563 switch (yycount)
6564 {
6565#define YYCASE_(N, S) \
6566 case N: \
6567 yyformat = S; \
6568 break
6569 default: /* Avoid compiler warnings. */
6570 YYCASE_(0, YY_("syntax error"));
6571 YYCASE_(1, YY_("syntax error, unexpected %s"));
6572 YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
6573 YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
6574 YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
6575 YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
6576#undef YYCASE_
6577 }
6578
6579 /* Compute error message size. Don't count the "%s"s, but reserve
6580 room for the terminator. */
6581 yysize = yystrlen (yyformat) - 2 * yycount + 1;
6582 {
6583 int yyi;
6584 for (yyi = 0; yyi < yycount; ++yyi)
6585 {
6586 YYPTRDIFF_T yysize1
6587 = yysize + yytnamerr (YY_NULLPTR, yytname[yyarg[yyi]]);
6588 if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)
6589 yysize = yysize1;
6590 else
6591 return YYENOMEM;
6592 }
6593 }
6594
6595 if (*yymsg_alloc < yysize)
6596 {
6597 *yymsg_alloc = 2 * yysize;
6598 if (! (yysize <= *yymsg_alloc
6599 && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
6600 *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
6601 return -1;
6602 }
6603
6604 /* Avoid sprintf, as that infringes on the user's name space.
6605 Don't have undefined behavior even if the translation
6606 produced a string with the wrong number of "%s"s. */
6607 {
6608 char *yyp = *yymsg;
6609 int yyi = 0;
6610 while ((*yyp = *yyformat) != '\0')
6611 if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
6612 {
6613 yyp += yytnamerr (yyp, yytname[yyarg[yyi++]]);
6614 yyformat += 2;
6615 }
6616 else
6617 {
6618 ++yyp;
6619 ++yyformat;
6620 }
6621 }
6622 return 0;
6623}
6624
6625
6626/*-----------------------------------------------.
6627| Release the memory associated to this symbol. |
6628`-----------------------------------------------*/
6629
6630static void
6631yydestruct (const char *yymsg,
6632 yysymbol_kind_t yykind, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, struct parser_params *p)
6633{
6634 YY_USE (yyvaluep);
6635 YY_USE (yylocationp);
6636 YY_USE (p);
6637 if (!yymsg)
6638 yymsg = "Deleting";
6639 YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp);
6640
6642 YY_USE (yykind);
6644}
6645
6646
6647
6648
6649
6650
6651/*----------.
6652| yyparse. |
6653`----------*/
6654
6655int
6657{
6658/* Lookahead token kind. */
6659int yychar;
6660
6661
6662/* The semantic value of the lookahead symbol. */
6663/* Default value used for initialization, for pacifying older GCCs
6664 or non-GCC compilers. */
6665YY_INITIAL_VALUE (static YYSTYPE yyval_default;)
6666YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
6667
6668/* Location data for the lookahead symbol. */
6669static YYLTYPE yyloc_default
6670# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
6671 = { 1, 1, 1, 1 }
6672# endif
6673;
6674YYLTYPE yylloc = yyloc_default;
6675
6676 /* Number of syntax errors so far. */
6677 int yynerrs = 0;
6678
6679 yy_state_fast_t yystate = 0;
6680 /* Number of tokens to shift before error messages enabled. */
6681 int yyerrstatus = 0;
6682
6683 /* Refer to the stacks through separate pointers, to allow yyoverflow
6684 to reallocate them elsewhere. */
6685
6686 /* Their size. */
6687 YYPTRDIFF_T yystacksize = YYINITDEPTH;
6688
6689 /* The state stack: array, bottom, top. */
6690 yy_state_t yyssa[YYINITDEPTH];
6691 yy_state_t *yyss = yyssa;
6692 yy_state_t *yyssp = yyss;
6693
6694 /* The semantic value stack: array, bottom, top. */
6695 YYSTYPE yyvsa[YYINITDEPTH];
6696 YYSTYPE *yyvs = yyvsa;
6697 YYSTYPE *yyvsp = yyvs;
6698
6699 /* The location stack: array, bottom, top. */
6700 YYLTYPE yylsa[YYINITDEPTH];
6701 YYLTYPE *yyls = yylsa;
6702 YYLTYPE *yylsp = yyls;
6703
6704 int yyn;
6705 /* The return value of yyparse. */
6706 int yyresult;
6707 /* Lookahead symbol kind. */
6709 /* The variables used to return semantic value and location from the
6710 action routines. */
6711 YYSTYPE yyval;
6712 YYLTYPE yyloc;
6713
6714 /* The locations where the error started and ended. */
6715 YYLTYPE yyerror_range[3];
6716
6717 /* Buffer for error messages, and its allocated size. */
6718 char yymsgbuf[128];
6719 char *yymsg = yymsgbuf;
6720 YYPTRDIFF_T yymsg_alloc = sizeof yymsgbuf;
6721
6722#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N))
6723
6724 /* The number of symbols on the RHS of the reduced rule.
6725 Keep to zero when no symbol should be popped. */
6726 int yylen = 0;
6727
6728 YYDPRINTF ((p, "Starting parse\n"));
6729
6730 yychar = YYEMPTY; /* Cause a token to be read. */
6731
6732
6733/* User initialization code. */
6734#line 1117 "ripper.y"
6735{
6737}
6738
6739#line 6735 "ripper.c"
6740
6741 yylsp[0] = yylloc;
6742 goto yysetstate;
6743
6744
6745/*------------------------------------------------------------.
6746| yynewstate -- push a new state, which is found in yystate. |
6747`------------------------------------------------------------*/
6748yynewstate:
6749 /* In all cases, when you get here, the value and location stacks
6750 have just been pushed. So pushing a state here evens the stacks. */
6751 yyssp++;
6752
6753
6754/*--------------------------------------------------------------------.
6755| yysetstate -- set current state (the top of the stack) to yystate. |
6756`--------------------------------------------------------------------*/
6757yysetstate:
6758 YYDPRINTF ((p, "Entering state %d\n", yystate));
6759 YY_ASSERT (0 <= yystate && yystate < YYNSTATES);
6761 *yyssp = YY_CAST (yy_state_t, yystate);
6763 YY_STACK_PRINT (yyss, yyssp);
6764
6765 if (yyss + yystacksize - 1 <= yyssp)
6766#if !defined yyoverflow && !defined YYSTACK_RELOCATE
6767 YYNOMEM;
6768#else
6769 {
6770 /* Get the current used size of the three stacks, in elements. */
6771 YYPTRDIFF_T yysize = yyssp - yyss + 1;
6772
6773# if defined yyoverflow
6774 {
6775 /* Give user a chance to reallocate the stack. Use copies of
6776 these so that the &'s don't force the real ones into
6777 memory. */
6778 yy_state_t *yyss1 = yyss;
6779 YYSTYPE *yyvs1 = yyvs;
6780 YYLTYPE *yyls1 = yyls;
6781
6782 /* Each stack pointer address is followed by the size of the
6783 data in use in that stack, in bytes. This used to be a
6784 conditional around just the two extra args, but that might
6785 be undefined if yyoverflow is a macro. */
6786 yyoverflow (YY_("memory exhausted"),
6787 &yyss1, yysize * YYSIZEOF (*yyssp),
6788 &yyvs1, yysize * YYSIZEOF (*yyvsp),
6789 &yyls1, yysize * YYSIZEOF (*yylsp),
6790 &yystacksize);
6791 yyss = yyss1;
6792 yyvs = yyvs1;
6793 yyls = yyls1;
6794 }
6795# else /* defined YYSTACK_RELOCATE */
6796 /* Extend the stack our own way. */
6797 if (YYMAXDEPTH <= yystacksize)
6798 YYNOMEM;
6799 yystacksize *= 2;
6800 if (YYMAXDEPTH < yystacksize)
6801 yystacksize = YYMAXDEPTH;
6802
6803 {
6804 yy_state_t *yyss1 = yyss;
6805 union yyalloc *yyptr =
6806 YY_CAST (union yyalloc *,
6807 YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize))));
6808 if (! yyptr)
6809 YYNOMEM;
6810 YYSTACK_RELOCATE (yyss_alloc, yyss);
6811 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
6812 YYSTACK_RELOCATE (yyls_alloc, yyls);
6813# undef YYSTACK_RELOCATE
6814 if (yyss1 != yyssa)
6815 YYSTACK_FREE (yyss1);
6816 }
6817# endif
6818
6819 yyssp = yyss + yysize - 1;
6820 yyvsp = yyvs + yysize - 1;
6821 yylsp = yyls + yysize - 1;
6822
6824 YYDPRINTF ((p, "Stack size increased to %ld\n",
6825 YY_CAST (long, yystacksize)));
6827
6828 if (yyss + yystacksize - 1 <= yyssp)
6829 YYABORT;
6830 }
6831#endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */
6832
6833
6834 if (yystate == YYFINAL)
6835 YYACCEPT;
6836
6837 goto yybackup;
6838
6839
6840/*-----------.
6841| yybackup. |
6842`-----------*/
6843yybackup:
6844 /* Do appropriate processing given the current state. Read a
6845 lookahead token if we need one and don't already have one. */
6846
6847 /* First try to decide what to do without reference to lookahead token. */
6848 yyn = yypact[yystate];
6849 if (yypact_value_is_default (yyn))
6850 goto yydefault;
6851
6852 /* Not known => get a lookahead token if don't already have one. */
6853
6854 /* YYCHAR is either empty, or end-of-input, or a valid lookahead. */
6855 if (yychar == YYEMPTY)
6856 {
6857 YYDPRINTF ((p, "Reading a token\n"));
6858 yychar = yylex (&yylval, &yylloc, p);
6859 }
6860
6861 if (yychar <= END_OF_INPUT)
6862 {
6863 yychar = END_OF_INPUT;
6864 yytoken = YYSYMBOL_YYEOF;
6865 YYDPRINTF ((p, "Now at end of input.\n"));
6866 }
6867 else if (yychar == YYerror)
6868 {
6869 /* The scanner already issued an error message, process directly
6870 to error recovery. But do not keep the error token as
6871 lookahead, it is too special and may lead us to an endless
6872 loop in error recovery. */
6873 yychar = YYUNDEF;
6874 yytoken = YYSYMBOL_YYerror;
6875 yyerror_range[1] = yylloc;
6876 goto yyerrlab1;
6877 }
6878 else
6879 {
6880 yytoken = YYTRANSLATE (yychar);
6881 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
6882 }
6883
6884 /* If the proper action on seeing token YYTOKEN is to reduce or to
6885 detect an error, take that action. */
6886 yyn += yytoken;
6887 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
6888 goto yydefault;
6889 yyn = yytable[yyn];
6890 if (yyn <= 0)
6891 {
6892 if (yytable_value_is_error (yyn))
6893 goto yyerrlab;
6894 yyn = -yyn;
6895 goto yyreduce;
6896 }
6897
6898 /* Count tokens shifted since error; after three, turn off error
6899 status. */
6900 if (yyerrstatus)
6901 yyerrstatus--;
6902
6903 /* Shift the lookahead token. */
6904 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
6905 yystate = yyn;
6907 *++yyvsp = yylval;
6909 *++yylsp = yylloc;
6910
6911 /* Discard the shifted token. */
6912 yychar = YYEMPTY;
6913 goto yynewstate;
6914
6915
6916/*-----------------------------------------------------------.
6917| yydefault -- do the default action for the current state. |
6918`-----------------------------------------------------------*/
6919yydefault:
6920 yyn = yydefact[yystate];
6921 if (yyn == 0)
6922 goto yyerrlab;
6923 goto yyreduce;
6924
6925
6926/*-----------------------------.
6927| yyreduce -- do a reduction. |
6928`-----------------------------*/
6929yyreduce:
6930 /* yyn is the number of a rule to reduce with. */
6931 yylen = yyr2[yyn];
6932
6933 /* If YYLEN is nonzero, implement the default value of the action:
6934 '$$ = $1'.
6935
6936 Otherwise, the following line sets YYVAL to garbage.
6937 This behavior is undocumented and Bison
6938 users should not rely upon it. Assigning to YYVAL
6939 unconditionally makes the parser a bit smaller, and it avoids a
6940 GCC warning that YYVAL may be used uninitialized. */
6941 yyval = yyvsp[1-yylen];
6942
6943 /* Default location. */
6944 YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
6945 yyerror_range[1] = yyloc;
6946 YY_REDUCE_PRINT (yyn);
6947 switch (yyn)
6948 {
6949 case 2: /* $@1: %empty */
6950#line 1322 "ripper.y"
6951 {
6952 SET_LEX_STATE(EXPR_BEG);
6953 local_push(p, ifndef_ripper(1)+0);
6954 }
6955#line 6951 "ripper.c"
6956 break;
6957
6958 case 3: /* program: $@1 top_compstmt */
6959#line 1327 "ripper.y"
6960 {
6961#if 0
6962 if ((yyvsp[0].val) && !compile_for_eval) {
6963 NODE *node = (yyvsp[0].val);
6964 /* last expression should not be void */
6965 if (nd_type(node) == NODE_BLOCK) {
6966 while (node->nd_next) {
6967 node = node->nd_next;
6968 }
6969 node = node->nd_head;
6970 }
6971 node = remove_begin(node);
6972 void_expr(p, node);
6973 }
6974 p->eval_tree = NEW_SCOPE(0, block_append(p, p->eval_tree, (yyvsp[0].val)), &(yyloc));
6975#endif
6976 {VALUE v1,v2;v1=(yyvsp[0].val);v2=dispatch1(program,v1);p->result=v2;}
6977 local_pop(p);
6978 }
6979#line 6975 "ripper.c"
6980 break;
6981
6982 case 4: /* top_compstmt: top_stmts opt_terms */
6983#line 1349 "ripper.y"
6984 {
6985 (yyval.val) = void_stmts(p, (yyvsp[-1].val));
6986 }
6987#line 6983 "ripper.c"
6988 break;
6989
6990 case 5: /* top_stmts: none */
6991#line 1355 "ripper.y"
6992 {
6993#if 0
6994 (yyval.val) = NEW_BEGIN(0, &(yyloc));
6995#endif
6996 {VALUE v1,v2,v3,v4,v5;v1=dispatch0(stmts_new);v2=dispatch0(void_stmt);v3=v1;v4=v2;v5=dispatch2(stmts_add,v3,v4);(yyval.val)=v5;}
6997 }
6998#line 6994 "ripper.c"
6999 break;
7000
7001 case 6: /* top_stmts: top_stmt */
7002#line 1362 "ripper.y"
7003 {
7004#if 0
7005 (yyval.val) = newline_node((yyvsp[0].val));
7006#endif
7007 {VALUE v1,v2,v3,v4;v1=dispatch0(stmts_new);v2=v1;v3=(yyvsp[0].val);v4=dispatch2(stmts_add,v2,v3);(yyval.val)=v4;}
7008 }
7009#line 7005 "ripper.c"
7010 break;
7011
7012 case 7: /* top_stmts: top_stmts terms top_stmt */
7013#line 1369 "ripper.y"
7014 {
7015#if 0
7016 (yyval.val) = block_append(p, (yyvsp[-2].val), newline_node((yyvsp[0].val)));
7017#endif
7018 {VALUE v1,v2,v3;v1=(yyvsp[-2].val);v2=(yyvsp[0].val);v3=dispatch2(stmts_add,v1,v2);(yyval.val)=v3;}
7019 }
7020#line 7016 "ripper.c"
7021 break;
7022
7023 case 8: /* top_stmts: error top_stmt */
7024#line 1376 "ripper.y"
7025 {
7026 (yyval.val) = remove_begin((yyvsp[0].val));
7027 }
7028#line 7024 "ripper.c"
7029 break;
7030
7031 case 10: /* top_stmt: "`BEGIN'" begin_block */
7032#line 1383 "ripper.y"
7033 {
7034 (yyval.val) = (yyvsp[0].val);
7035 }
7036#line 7032 "ripper.c"
7037 break;
7038
7039 case 11: /* begin_block: '{' top_compstmt '}' */
7040#line 1389 "ripper.y"
7041 {
7042#if 0
7043 p->eval_tree_begin = block_append(p, p->eval_tree_begin,
7044 NEW_BEGIN((yyvsp[-1].val), &(yyloc)));
7045 (yyval.val) = NEW_BEGIN(0, &(yyloc));
7046#endif
7047 {VALUE v1,v2;v1=(yyvsp[-1].val);v2=dispatch1(BEGIN,v1);(yyval.val)=v2;}
7048 }
7049#line 7045 "ripper.c"
7050 break;
7051
7052 case 12: /* $@2: %empty */
7053#line 1401 "ripper.y"
7054 {if (!(yyvsp[-1].val)) {yyerror1(&(yylsp[0]), "else without rescue is useless");}}
7055#line 7051 "ripper.c"
7056 break;
7057
7058 case 13: /* bodystmt: compstmt opt_rescue k_else $@2 compstmt opt_ensure */
7059#line 1404 "ripper.y"
7060 {
7061#if 0
7062 (yyval.val) = new_bodystmt(p, (yyvsp[-5].val), (yyvsp[-4].val), (yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
7063#endif
7064 {VALUE v1,v2,v3,v4,v5;v1=escape_Qundef((yyvsp[-5].val));v2=escape_Qundef((yyvsp[-4].val));v3=escape_Qundef((yyvsp[-1].val));v4=escape_Qundef((yyvsp[0].val));v5=dispatch4(bodystmt,v1,v2,v3,v4);(yyval.val)=v5;}
7065 }
7066#line 7062 "ripper.c"
7067 break;
7068
7069 case 14: /* bodystmt: compstmt opt_rescue opt_ensure */
7070#line 1413 "ripper.y"
7071 {
7072#if 0
7073 (yyval.val) = new_bodystmt(p, (yyvsp[-2].val), (yyvsp[-1].val), 0, (yyvsp[0].val), &(yyloc));
7074#endif
7075 {VALUE v1,v2,v3,v4,v5;v1=escape_Qundef((yyvsp[-2].val));v2=escape_Qundef((yyvsp[-1].val));v3=Qnil;v4=escape_Qundef((yyvsp[0].val));v5=dispatch4(bodystmt,v1,v2,v3,v4);(yyval.val)=v5;}
7076 }
7077#line 7073 "ripper.c"
7078 break;
7079
7080 case 15: /* compstmt: stmts opt_terms */
7081#line 1422 "ripper.y"
7082 {
7083 (yyval.val) = void_stmts(p, (yyvsp[-1].val));
7084 }
7085#line 7081 "ripper.c"
7086 break;
7087
7088 case 16: /* stmts: none */
7089#line 1428 "ripper.y"
7090 {
7091#if 0
7092 (yyval.val) = NEW_BEGIN(0, &(yyloc));
7093#endif
7094 {VALUE v1,v2,v3,v4,v5;v1=dispatch0(stmts_new);v2=dispatch0(void_stmt);v3=v1;v4=v2;v5=dispatch2(stmts_add,v3,v4);(yyval.val)=v5;}
7095 }
7096#line 7092 "ripper.c"
7097 break;
7098
7099 case 17: /* stmts: stmt_or_begin */
7100#line 1435 "ripper.y"
7101 {
7102#if 0
7103 (yyval.val) = newline_node((yyvsp[0].val));
7104#endif
7105 {VALUE v1,v2,v3,v4;v1=dispatch0(stmts_new);v2=v1;v3=(yyvsp[0].val);v4=dispatch2(stmts_add,v2,v3);(yyval.val)=v4;}
7106 }
7107#line 7103 "ripper.c"
7108 break;
7109
7110 case 18: /* stmts: stmts terms stmt_or_begin */
7111#line 1442 "ripper.y"
7112 {
7113#if 0
7114 (yyval.val) = block_append(p, (yyvsp[-2].val), newline_node((yyvsp[0].val)));
7115#endif
7116 {VALUE v1,v2,v3;v1=(yyvsp[-2].val);v2=(yyvsp[0].val);v3=dispatch2(stmts_add,v1,v2);(yyval.val)=v3;}
7117 }
7118#line 7114 "ripper.c"
7119 break;
7120
7121 case 19: /* stmts: error stmt */
7122#line 1449 "ripper.y"
7123 {
7124 (yyval.val) = remove_begin((yyvsp[0].val));
7125 }
7126#line 7122 "ripper.c"
7127 break;
7128
7129 case 20: /* stmt_or_begin: stmt */
7130#line 1455 "ripper.y"
7131 {
7132 (yyval.val) = (yyvsp[0].val);
7133 }
7134#line 7130 "ripper.c"
7135 break;
7136
7137 case 21: /* $@3: %empty */
7138#line 1459 "ripper.y"
7139 {
7140 yyerror1(&(yylsp[0]), "BEGIN is permitted only at toplevel");
7141 }
7142#line 7138 "ripper.c"
7143 break;
7144
7145 case 22: /* stmt_or_begin: "`BEGIN'" $@3 begin_block */
7146#line 1463 "ripper.y"
7147 {
7148 (yyval.val) = (yyvsp[0].val);
7149 }
7150#line 7146 "ripper.c"
7151 break;
7152
7153 case 23: /* $@4: %empty */
7154#line 1468 "ripper.y"
7155 {SET_LEX_STATE(EXPR_FNAME|EXPR_FITEM);}
7156#line 7152 "ripper.c"
7157 break;
7158
7159 case 24: /* stmt: "`alias'" fitem $@4 fitem */
7160#line 1469 "ripper.y"
7161 {
7162#if 0
7163 (yyval.val) = NEW_ALIAS((yyvsp[-2].val), (yyvsp[0].val), &(yyloc));
7164#endif
7165 {VALUE v1,v2,v3;v1=(yyvsp[-2].val);v2=(yyvsp[0].val);v3=dispatch2(alias,v1,v2);(yyval.val)=v3;}
7166 }
7167#line 7163 "ripper.c"
7168 break;
7169
7170 case 25: /* stmt: "`alias'" "global variable" "global variable" */
7171#line 1476 "ripper.y"
7172 {
7173#if 0
7174 (yyval.val) = NEW_VALIAS((yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
7175#endif
7176 {VALUE v1,v2,v3;v1=(yyvsp[-1].val);v2=(yyvsp[0].val);v3=dispatch2(var_alias,v1,v2);(yyval.val)=v3;}
7177 }
7178#line 7174 "ripper.c"
7179 break;
7180
7181 case 26: /* stmt: "`alias'" "global variable" "back reference" */
7182#line 1483 "ripper.y"
7183 {
7184#if 0
7185 char buf[2];
7186 buf[0] = '$';
7187 buf[1] = (char)(yyvsp[0].val)->nd_nth;
7188 (yyval.val) = NEW_VALIAS((yyvsp[-1].val), rb_intern2(buf, 2), &(yyloc));
7189#endif
7190 {VALUE v1,v2,v3;v1=(yyvsp[-1].val);v2=(yyvsp[0].val);v3=dispatch2(var_alias,v1,v2);(yyval.val)=v3;}
7191 }
7192#line 7188 "ripper.c"
7193 break;
7194
7195 case 27: /* stmt: "`alias'" "global variable" "numbered reference" */
7196#line 1493 "ripper.y"
7197 {
7198 static const char mesg[] = "can't make alias for the number variables";
7199#if 0
7200 yyerror1(&(yylsp[0]), mesg);
7201 (yyval.val) = NEW_BEGIN(0, &(yyloc));
7202#endif
7203 {VALUE v1,v2,v3;v1=ERR_MESG();v2=(yyvsp[0].val);v3=dispatch2(alias_error,v1,v2);(yyval.val)=v3;}ripper_error(p);
7204 }
7205#line 7201 "ripper.c"
7206 break;
7207
7208 case 28: /* stmt: "`undef'" undef_list */
7209#line 1502 "ripper.y"
7210 {
7211#if 0
7212 (yyval.val) = (yyvsp[0].val);
7213#endif
7214 {VALUE v1,v2;v1=(yyvsp[0].val);v2=dispatch1(undef,v1);(yyval.val)=v2;}
7215 }
7216#line 7212 "ripper.c"
7217 break;
7218
7219 case 29: /* stmt: stmt "`if' modifier" expr_value */
7220#line 1509 "ripper.y"
7221 {
7222#if 0
7223 (yyval.val) = new_if(p, (yyvsp[0].val), remove_begin((yyvsp[-2].val)), 0, &(yyloc));
7224 fixpos((yyval.val), (yyvsp[0].val));
7225#endif
7226 {VALUE v1,v2,v3;v1=(yyvsp[0].val);v2=(yyvsp[-2].val);v3=dispatch2(if_mod,v1,v2);(yyval.val)=v3;}
7227 }
7228#line 7224 "ripper.c"
7229 break;
7230
7231 case 30: /* stmt: stmt "`unless' modifier" expr_value */
7232#line 1517 "ripper.y"
7233 {
7234#if 0
7235 (yyval.val) = new_unless(p, (yyvsp[0].val), remove_begin((yyvsp[-2].val)), 0, &(yyloc));
7236 fixpos((yyval.val), (yyvsp[0].val));
7237#endif
7238 {VALUE v1,v2,v3;v1=(yyvsp[0].val);v2=(yyvsp[-2].val);v3=dispatch2(unless_mod,v1,v2);(yyval.val)=v3;}
7239 }
7240#line 7236 "ripper.c"
7241 break;
7242
7243 case 31: /* stmt: stmt "`while' modifier" expr_value */
7244#line 1525 "ripper.y"
7245 {
7246#if 0
7247 if ((yyvsp[-2].val) && nd_type((yyvsp[-2].val)) == NODE_BEGIN) {
7248 (yyval.val) = NEW_WHILE(cond(p, (yyvsp[0].val), &(yylsp[0])), (yyvsp[-2].val)->nd_body, 0, &(yyloc));
7249 }
7250 else {
7251 (yyval.val) = NEW_WHILE(cond(p, (yyvsp[0].val), &(yylsp[0])), (yyvsp[-2].val), 1, &(yyloc));
7252 }
7253#endif
7254 {VALUE v1,v2,v3;v1=(yyvsp[0].val);v2=(yyvsp[-2].val);v3=dispatch2(while_mod,v1,v2);(yyval.val)=v3;}
7255 }
7256#line 7252 "ripper.c"
7257 break;
7258
7259 case 32: /* stmt: stmt "`until' modifier" expr_value */
7260#line 1537 "ripper.y"
7261 {
7262#if 0
7263 if ((yyvsp[-2].val) && nd_type((yyvsp[-2].val)) == NODE_BEGIN) {
7264 (yyval.val) = NEW_UNTIL(cond(p, (yyvsp[0].val), &(yylsp[0])), (yyvsp[-2].val)->nd_body, 0, &(yyloc));
7265 }
7266 else {
7267 (yyval.val) = NEW_UNTIL(cond(p, (yyvsp[0].val), &(yylsp[0])), (yyvsp[-2].val), 1, &(yyloc));
7268 }
7269#endif
7270 {VALUE v1,v2,v3;v1=(yyvsp[0].val);v2=(yyvsp[-2].val);v3=dispatch2(until_mod,v1,v2);(yyval.val)=v3;}
7271 }
7272#line 7268 "ripper.c"
7273 break;
7274
7275 case 33: /* stmt: stmt "`rescue' modifier" stmt */
7276#line 1549 "ripper.y"
7277 {
7278#if 0
7279 NODE *resq;
7280 YYLTYPE loc = code_loc_gen(&(yylsp[-1]), &(yylsp[0]));
7281 resq = NEW_RESBODY(0, remove_begin((yyvsp[0].val)), 0, &loc);
7282 (yyval.val) = NEW_RESCUE(remove_begin((yyvsp[-2].val)), resq, 0, &(yyloc));
7283#endif
7284 {VALUE v1,v2,v3;v1=(yyvsp[-2].val);v2=(yyvsp[0].val);v3=dispatch2(rescue_mod,v1,v2);(yyval.val)=v3;}
7285 }
7286#line 7282 "ripper.c"
7287 break;
7288
7289 case 34: /* stmt: "`END'" '{' compstmt '}' */
7290#line 1559 "ripper.y"
7291 {
7292 if (p->ctxt.in_def) {
7293 rb_warn0("END in method; use at_exit");
7294 }
7295#if 0
7296 {
7297 NODE *scope = NEW_NODE(
7298 NODE_SCOPE, 0 /* tbl */, (yyvsp[-1].val) /* body */, 0 /* args */, &(yyloc));
7299 (yyval.val) = NEW_POSTEXE(scope, &(yyloc));
7300 }
7301#endif
7302 {VALUE v1,v2;v1=(yyvsp[-1].val);v2=dispatch1(END,v1);(yyval.val)=v2;}
7303 }
7304#line 7300 "ripper.c"
7305 break;
7306
7307 case 36: /* stmt: mlhs '=' lex_ctxt command_call */
7308#line 1574 "ripper.y"
7309 {
7310#if 0
7311 value_expr((yyvsp[0].val));
7312 (yyval.val) = node_assign(p, (yyvsp[-3].val), (yyvsp[0].val), (yyvsp[-1].ctxt), &(yyloc));
7313#endif
7314 {VALUE v1,v2,v3;v1=(yyvsp[-3].val);v2=(yyvsp[0].val);v3=dispatch2(massign,v1,v2);(yyval.val)=v3;}
7315 }
7316#line 7312 "ripper.c"
7317 break;
7318
7319 case 37: /* stmt: lhs '=' lex_ctxt mrhs */
7320#line 1582 "ripper.y"
7321 {
7322#if 0
7323 value_expr((yyvsp[0].val));
7324 (yyval.val) = node_assign(p, (yyvsp[-3].val), (yyvsp[0].val), (yyvsp[-1].ctxt), &(yyloc));
7325#endif
7326 {VALUE v1,v2,v3;v1=(yyvsp[-3].val);v2=(yyvsp[0].val);v3=dispatch2(assign,v1,v2);(yyval.val)=v3;}
7327 }
7328#line 7324 "ripper.c"
7329 break;
7330
7331 case 38: /* stmt: mlhs '=' lex_ctxt mrhs_arg "`rescue' modifier" stmt */
7332#line 1590 "ripper.y"
7333 {
7334#if 0
7335 YYLTYPE loc = code_loc_gen(&(yylsp[-1]), &(yylsp[0]));
7336 value_expr((yyvsp[-2].val));
7337 (yyval.val) = node_assign(p, (yyvsp[-5].val), NEW_RESCUE((yyvsp[-2].val), NEW_RESBODY(0, remove_begin((yyvsp[0].val)), 0, &loc), 0, &(yyloc)), (yyvsp[-3].ctxt), &(yyloc));
7338#endif
7339 {VALUE v1,v2,v3,v4,v5,v6;v1=(yyvsp[-2].val);v2=(yyvsp[0].val);v3=dispatch2(rescue_mod,v1,v2);v4=(yyvsp[-5].val);v5=v3;v6=dispatch2(massign,v4,v5);(yyval.val)=v6;}
7340 }
7341#line 7337 "ripper.c"
7342 break;
7343
7344 case 39: /* stmt: mlhs '=' lex_ctxt mrhs_arg */
7345#line 1599 "ripper.y"
7346 {
7347#if 0
7348 (yyval.val) = node_assign(p, (yyvsp[-3].val), (yyvsp[0].val), (yyvsp[-1].ctxt), &(yyloc));
7349#endif
7350 {VALUE v1,v2,v3;v1=(yyvsp[-3].val);v2=(yyvsp[0].val);v3=dispatch2(massign,v1,v2);(yyval.val)=v3;}
7351 }
7352#line 7348 "ripper.c"
7353 break;
7354
7355 case 41: /* command_asgn: lhs '=' lex_ctxt command_rhs */
7356#line 1609 "ripper.y"
7357 {
7358#if 0
7359 (yyval.val) = node_assign(p, (yyvsp[-3].val), (yyvsp[0].val), (yyvsp[-1].ctxt), &(yyloc));
7360#endif
7361 {VALUE v1,v2,v3;v1=(yyvsp[-3].val);v2=(yyvsp[0].val);v3=dispatch2(assign,v1,v2);(yyval.val)=v3;}
7362 }
7363#line 7359 "ripper.c"
7364 break;
7365
7366 case 42: /* command_asgn: var_lhs "operator-assignment" lex_ctxt command_rhs */
7367#line 1616 "ripper.y"
7368 {
7369#if 0
7370 (yyval.val) = new_op_assign(p, (yyvsp[-3].val), (yyvsp[-2].val), (yyvsp[0].val), (yyvsp[-1].ctxt), &(yyloc));
7371#endif
7372 {VALUE v1,v2,v3,v4;v1=(yyvsp[-3].val);v2=(yyvsp[-2].val);v3=(yyvsp[0].val);v4=dispatch3(opassign,v1,v2,v3);(yyval.val)=v4;}
7373 }
7374#line 7370 "ripper.c"
7375 break;
7376
7377 case 43: /* command_asgn: primary_value '[' opt_call_args rbracket "operator-assignment" lex_ctxt command_rhs */
7378#line 1623 "ripper.y"
7379 {
7380#if 0
7381 (yyval.val) = new_ary_op_assign(p, (yyvsp[-6].val), (yyvsp[-4].val), (yyvsp[-2].val), (yyvsp[0].val), &(yylsp[-4]), &(yyloc));
7382#endif
7383 {VALUE v1,v2,v3,v4,v5,v6,v7;v1=(yyvsp[-6].val);v2=escape_Qundef((yyvsp[-4].val));v3=dispatch2(aref_field,v1,v2);v4=v3;v5=(yyvsp[-2].val);v6=(yyvsp[0].val);v7=dispatch3(opassign,v4,v5,v6);(yyval.val)=v7;}
7384
7385 }
7386#line 7382 "ripper.c"
7387 break;
7388
7389 case 44: /* command_asgn: primary_value call_op "local variable or method" "operator-assignment" lex_ctxt command_rhs */
7390#line 1631 "ripper.y"
7391 {
7392#if 0
7393 (yyval.val) = new_attr_op_assign(p, (yyvsp[-5].val), (yyvsp[-4].val), (yyvsp[-3].val), (yyvsp[-2].val), (yyvsp[0].val), &(yyloc));
7394#endif
7395 {VALUE v1,v2,v3,v4,v5,v6,v7,v8;v1=(yyvsp[-5].val);v2=(yyvsp[-4].val);v3=(yyvsp[-3].val);v4=dispatch3(field,v1,v2,v3);v5=v4;v6=(yyvsp[-2].val);v7=(yyvsp[0].val);v8=dispatch3(opassign,v5,v6,v7);(yyval.val)=v8;}
7396 }
7397#line 7393 "ripper.c"
7398 break;
7399
7400 case 45: /* command_asgn: primary_value call_op "constant" "operator-assignment" lex_ctxt command_rhs */
7401#line 1638 "ripper.y"
7402 {
7403#if 0
7404 (yyval.val) = new_attr_op_assign(p, (yyvsp[-5].val), (yyvsp[-4].val), (yyvsp[-3].val), (yyvsp[-2].val), (yyvsp[0].val), &(yyloc));
7405#endif
7406 {VALUE v1,v2,v3,v4,v5,v6,v7,v8;v1=(yyvsp[-5].val);v2=(yyvsp[-4].val);v3=(yyvsp[-3].val);v4=dispatch3(field,v1,v2,v3);v5=v4;v6=(yyvsp[-2].val);v7=(yyvsp[0].val);v8=dispatch3(opassign,v5,v6,v7);(yyval.val)=v8;}
7407 }
7408#line 7404 "ripper.c"
7409 break;
7410
7411 case 46: /* command_asgn: primary_value "::" "constant" "operator-assignment" lex_ctxt command_rhs */
7412#line 1645 "ripper.y"
7413 {
7414#if 0
7415 YYLTYPE loc = code_loc_gen(&(yylsp[-5]), &(yylsp[-3]));
7416 (yyval.val) = new_const_op_assign(p, NEW_COLON2((yyvsp[-5].val), (yyvsp[-3].val), &loc), (yyvsp[-2].val), (yyvsp[0].val), (yyvsp[-1].ctxt), &(yyloc));
7417#endif
7418 {VALUE v1,v2,v3,v4,v5,v6,v7;v1=(yyvsp[-5].val);v2=(yyvsp[-3].val);v3=dispatch2(const_path_field,v1,v2);v4=v3;v5=(yyvsp[-2].val);v6=(yyvsp[0].val);v7=dispatch3(opassign,v4,v5,v6);(yyval.val)=v7;}
7419 }
7420#line 7416 "ripper.c"
7421 break;
7422
7423 case 47: /* command_asgn: primary_value "::" "local variable or method" "operator-assignment" lex_ctxt command_rhs */
7424#line 1653 "ripper.y"
7425 {
7426#if 0
7427 (yyval.val) = new_attr_op_assign(p, (yyvsp[-5].val), ID2VAL(idCOLON2), (yyvsp[-3].val), (yyvsp[-2].val), (yyvsp[0].val), &(yyloc));
7428#endif
7429 {VALUE v1,v2,v3,v4,v5,v6,v7,v8;v1=(yyvsp[-5].val);v2=ID2VAL(idCOLON2);v3=(yyvsp[-3].val);v4=dispatch3(field,v1,v2,v3);v5=v4;v6=(yyvsp[-2].val);v7=(yyvsp[0].val);v8=dispatch3(opassign,v5,v6,v7);(yyval.val)=v8;}
7430 }
7431#line 7427 "ripper.c"
7432 break;
7433
7434 case 48: /* command_asgn: backref "operator-assignment" lex_ctxt command_rhs */
7435#line 1660 "ripper.y"
7436 {
7437#if 0
7438 rb_backref_error(p, (yyvsp[-3].val));
7439 (yyval.val) = NEW_BEGIN(0, &(yyloc));
7440#endif
7441 {VALUE v1,v2,v3;v1=var_field(p, (yyvsp[-3].val));v2=(yyvsp[0].val);v3=dispatch2(assign,v1,v2);(yyval.val)=backref_error(p, RNODE((yyvsp[-3].val)), v3);}ripper_error(p);
7442 }
7443#line 7439 "ripper.c"
7444 break;
7445
7446 case 49: /* command_rhs: command_call */
7447#line 1670 "ripper.y"
7448 {
7449 value_expr((yyvsp[0].val));
7450 (yyval.val) = (yyvsp[0].val);
7451 }
7452#line 7448 "ripper.c"
7453 break;
7454
7455 case 50: /* command_rhs: command_call "`rescue' modifier" stmt */
7456#line 1675 "ripper.y"
7457 {
7458#if 0
7459 YYLTYPE loc = code_loc_gen(&(yylsp[-1]), &(yylsp[0]));
7460 value_expr((yyvsp[-2].val));
7461 (yyval.val) = NEW_RESCUE((yyvsp[-2].val), NEW_RESBODY(0, remove_begin((yyvsp[0].val)), 0, &loc), 0, &(yyloc));
7462#endif
7463 {VALUE v1,v2,v3;v1=(yyvsp[-2].val);v2=(yyvsp[0].val);v3=dispatch2(rescue_mod,v1,v2);(yyval.val)=v3;}
7464 }
7465#line 7461 "ripper.c"
7466 break;
7467
7468 case 53: /* expr: expr "`and'" expr */
7469#line 1688 "ripper.y"
7470 {
7471 (yyval.val) = logop(p, idAND, (yyvsp[-2].val), (yyvsp[0].val), &(yylsp[-1]), &(yyloc));
7472 }
7473#line 7469 "ripper.c"
7474 break;
7475
7476 case 54: /* expr: expr "`or'" expr */
7477#line 1692 "ripper.y"
7478 {
7479 (yyval.val) = logop(p, idOR, (yyvsp[-2].val), (yyvsp[0].val), &(yylsp[-1]), &(yyloc));
7480 }
7481#line 7477 "ripper.c"
7482 break;
7483
7484 case 55: /* expr: "`not'" opt_nl expr */
7485#line 1696 "ripper.y"
7486 {
7487 (yyval.val) = call_uni_op(p, method_cond(p, (yyvsp[0].val), &(yylsp[0])), METHOD_NOT, &(yylsp[-2]), &(yyloc));
7488 }
7489#line 7485 "ripper.c"
7490 break;
7491
7492 case 56: /* expr: '!' command_call */
7493#line 1700 "ripper.y"
7494 {
7495 (yyval.val) = call_uni_op(p, method_cond(p, (yyvsp[0].val), &(yylsp[0])), '!', &(yylsp[-1]), &(yyloc));
7496 }
7497#line 7493 "ripper.c"
7498 break;
7499
7500 case 57: /* @5: %empty */
7501#line 1704 "ripper.y"
7502 {
7503 value_expr((yyvsp[-1].val));
7504 SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
7505 p->command_start = FALSE;
7506 (yyval.ctxt) = p->ctxt;
7507 p->ctxt.in_kwarg = 1;
7508 }
7509#line 7505 "ripper.c"
7510 break;
7511
7512 case 58: /* @6: %empty */
7513#line 1711 "ripper.y"
7514 {(yyval.tbl) = push_pvtbl(p);}
7515#line 7511 "ripper.c"
7516 break;
7517
7518 case 59: /* $@7: %empty */
7519#line 1713 "ripper.y"
7520 {pop_pvtbl(p, (yyvsp[-1].tbl));}
7521#line 7517 "ripper.c"
7522 break;
7523
7524 case 60: /* expr: arg "=>" @5 @6 p_expr $@7 */
7525#line 1714 "ripper.y"
7526 {
7527 p->ctxt.in_kwarg = (yyvsp[-3].ctxt).in_kwarg;
7528#if 0
7529 (yyval.val) = NEW_CASE3((yyvsp[-5].val), NEW_IN((yyvsp[-1].val), 0, 0, &(yylsp[-1])), &(yyloc));
7530 warn_one_line_pattern_matching(p, (yyval.val), (yyvsp[-1].val), true);
7531#endif
7532 {VALUE v1,v2,v3,v4,v5,v6,v7;v1=(yyvsp[-1].val);v2=Qnil;v3=Qnil;v4=dispatch3(in,v1,v2,v3);v5=(yyvsp[-5].val);v6=v4;v7=dispatch2(case,v5,v6);(yyval.val)=v7;}
7533 }
7534#line 7530 "ripper.c"
7535 break;
7536
7537 case 61: /* @8: %empty */
7538#line 1723 "ripper.y"
7539 {
7540 value_expr((yyvsp[-1].val));
7541 SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
7542 p->command_start = FALSE;
7543 (yyval.ctxt) = p->ctxt;
7544 p->ctxt.in_kwarg = 1;
7545 }
7546#line 7542 "ripper.c"
7547 break;
7548
7549 case 62: /* @9: %empty */
7550#line 1730 "ripper.y"
7551 {(yyval.tbl) = push_pvtbl(p);}
7552#line 7548 "ripper.c"
7553 break;
7554
7555 case 63: /* $@10: %empty */
7556#line 1732 "ripper.y"
7557 {pop_pvtbl(p, (yyvsp[-1].tbl));}
7558#line 7554 "ripper.c"
7559 break;
7560
7561 case 64: /* expr: arg "`in'" @8 @9 p_expr $@10 */
7562#line 1733 "ripper.y"
7563 {
7564 p->ctxt.in_kwarg = (yyvsp[-3].ctxt).in_kwarg;
7565#if 0
7566 (yyval.val) = NEW_CASE3((yyvsp[-5].val), NEW_IN((yyvsp[-1].val), NEW_TRUE(&(yylsp[-1])), NEW_FALSE(&(yylsp[-1])), &(yylsp[-1])), &(yyloc));
7567 warn_one_line_pattern_matching(p, (yyval.val), (yyvsp[-1].val), false);
7568#endif
7569 {VALUE v1,v2,v3,v4,v5,v6,v7;v1=(yyvsp[-1].val);v2=Qnil;v3=Qnil;v4=dispatch3(in,v1,v2,v3);v5=(yyvsp[-5].val);v6=v4;v7=dispatch2(case,v5,v6);(yyval.val)=v7;}
7570 }
7571#line 7567 "ripper.c"
7572 break;
7573
7574 case 66: /* def_name: fname */
7575#line 1745 "ripper.y"
7576 {
7577 ID fname = get_id((yyvsp[0].val));
7578 ID cur_arg = p->cur_arg;
7579 YYSTYPE c = {.ctxt = p->ctxt};
7580 numparam_name(p, fname);
7581 local_push(p, 0);
7582 p->cur_arg = 0;
7583 p->ctxt.in_def = 1;
7584 (yyval.node) = NEW_NODE(NODE_SELF, /*vid*/cur_arg, /*mid*/fname, /*cval*/c.val, &(yyloc));
7585#if 0
7586#endif
7587 (yyval.val) = NEW_RIPPER(fname, get_value((yyvsp[0].val)), (yyval.val), &NULL_LOC);
7588
7589 }
7590#line 7586 "ripper.c"
7591 break;
7592
7593 case 67: /* defn_head: k_def def_name */
7594#line 1762 "ripper.y"
7595 {
7596 (yyval.val) = (yyvsp[0].val);
7597#if 0
7598 (yyval.val) = NEW_NODE(NODE_DEFN, 0, (yyval.val)->nd_mid, (yyval.val), &(yyloc));
7599#endif
7600 }
7601#line 7597 "ripper.c"
7602 break;
7603
7604 case 68: /* $@11: %empty */
7605#line 1770 "ripper.y"
7606 {SET_LEX_STATE(EXPR_FNAME);}
7607#line 7603 "ripper.c"
7608 break;
7609
7610 case 69: /* defs_head: k_def singleton dot_or_colon $@11 def_name */
7611#line 1771 "ripper.y"
7612 {
7613 SET_LEX_STATE(EXPR_ENDFN|EXPR_LABEL); /* force for args */
7614 (yyval.val) = (yyvsp[0].val);
7615#if 0
7616 (yyval.val) = NEW_NODE(NODE_DEFS, (yyvsp[-3].val), (yyval.val)->nd_mid, (yyval.val), &(yyloc));
7617#endif
7618 VALUE ary = rb_ary_new_from_args(3, (yyvsp[-3].val), (yyvsp[-2].val), get_value((yyval.val)));
7619 add_mark_object(p, ary);
7620 (yyval.node)->nd_rval = ary;
7621
7622 }
7623#line 7619 "ripper.c"
7624 break;
7625
7626 case 70: /* expr_value: expr */
7627#line 1785 "ripper.y"
7628 {
7629 value_expr((yyvsp[0].val));
7630 (yyval.val) = (yyvsp[0].val);
7631 }
7632#line 7628 "ripper.c"
7633 break;
7634
7635 case 71: /* $@12: %empty */
7636#line 1791 "ripper.y"
7637 {COND_PUSH(1);}
7638#line 7634 "ripper.c"
7639 break;
7640
7641 case 72: /* $@13: %empty */
7642#line 1791 "ripper.y"
7643 {COND_POP();}
7644#line 7640 "ripper.c"
7645 break;
7646
7647 case 73: /* expr_value_do: $@12 expr_value do $@13 */
7648#line 1792 "ripper.y"
7649 {
7650 (yyval.val) = (yyvsp[-2].val);
7651 }
7652#line 7648 "ripper.c"
7653 break;
7654
7655 case 77: /* block_command: block_call call_op2 operation2 command_args */
7656#line 1803 "ripper.y"
7657 {
7658#if 0
7659 (yyval.val) = new_qcall(p, (yyvsp[-2].val), (yyvsp[-3].val), (yyvsp[-1].val), (yyvsp[0].val), &(yylsp[-1]), &(yyloc));
7660#endif
7661 {VALUE v1,v2,v3,v4,v5,v6,v7;v1=(yyvsp[-3].val);v2=(yyvsp[-2].val);v3=(yyvsp[-1].val);v4=dispatch3(call,v1,v2,v3);v5=v4;v6=(yyvsp[0].val);v7=dispatch2(method_add_arg,v5,v6);(yyval.val)=v7;}
7662 }
7663#line 7659 "ripper.c"
7664 break;
7665
7666 case 78: /* cmd_brace_block: "{ arg" brace_body '}' */
7667#line 1812 "ripper.y"
7668 {
7669 (yyval.val) = (yyvsp[-1].val);
7670#if 0
7671 (yyval.val)->nd_body->nd_loc = code_loc_gen(&(yylsp[-2]), &(yylsp[0]));
7672 nd_set_line((yyval.val), (yylsp[-2]).end_pos.lineno);
7673#endif
7674 }
7675#line 7671 "ripper.c"
7676 break;
7677
7678 case 79: /* fcall: operation */
7679#line 1822 "ripper.y"
7680 {
7681#if 0
7682 (yyval.val) = NEW_FCALL((yyvsp[0].val), 0, &(yyloc));
7683 nd_set_line((yyval.val), p->tokline);
7684#endif
7685 (yyval.val)=(yyvsp[0].val);
7686 }
7687#line 7683 "ripper.c"
7688 break;
7689
7690 case 80: /* command: fcall command_args */
7691#line 1832 "ripper.y"
7692 {
7693#if 0
7694 (yyvsp[-1].val)->nd_args = (yyvsp[0].val);
7695 nd_set_last_loc((yyvsp[-1].val), (yylsp[0]).end_pos);
7696 (yyval.val) = (yyvsp[-1].val);
7697#endif
7698 {VALUE v1,v2,v3;v1=(yyvsp[-1].val);v2=(yyvsp[0].val);v3=dispatch2(command,v1,v2);(yyval.val)=v3;}
7699 }
7700#line 7696 "ripper.c"
7701 break;
7702
7703 case 81: /* command: fcall command_args cmd_brace_block */
7704#line 1841 "ripper.y"
7705 {
7706#if 0
7707 block_dup_check(p, (yyvsp[-1].val), (yyvsp[0].val));
7708 (yyvsp[-2].val)->nd_args = (yyvsp[-1].val);
7709 (yyval.val) = method_add_block(p, (yyvsp[-2].val), (yyvsp[0].val), &(yyloc));
7710 fixpos((yyval.val), (yyvsp[-2].val));
7711 nd_set_last_loc((yyvsp[-2].val), (yylsp[-1]).end_pos);
7712#endif
7713 {VALUE v1,v2,v3,v4,v5,v6;v1=(yyvsp[-2].val);v2=(yyvsp[-1].val);v3=dispatch2(command,v1,v2);v4=v3;v5=(yyvsp[0].val);v6=dispatch2(method_add_block,v4,v5);(yyval.val)=v6;}
7714 }
7715#line 7711 "ripper.c"
7716 break;
7717
7718 case 82: /* command: primary_value call_op operation2 command_args */
7719#line 1852 "ripper.y"
7720 {
7721#if 0
7722 (yyval.val) = new_command_qcall(p, (yyvsp[-2].val), (yyvsp[-3].val), (yyvsp[-1].val), (yyvsp[0].val), Qnull, &(yylsp[-1]), &(yyloc));
7723#endif
7724 {VALUE v1,v2,v3,v4,v5;v1=(yyvsp[-3].val);v2=(yyvsp[-2].val);v3=(yyvsp[-1].val);v4=(yyvsp[0].val);v5=dispatch4(command_call,v1,v2,v3,v4);(yyval.val)=v5;}
7725 }
7726#line 7722 "ripper.c"
7727 break;
7728
7729 case 83: /* command: primary_value call_op operation2 command_args cmd_brace_block */
7730#line 1859 "ripper.y"
7731 {
7732#if 0
7733 (yyval.val) = new_command_qcall(p, (yyvsp[-3].val), (yyvsp[-4].val), (yyvsp[-2].val), (yyvsp[-1].val), (yyvsp[0].val), &(yylsp[-2]), &(yyloc));
7734#endif
7735 {VALUE v1,v2,v3,v4,v5,v6,v7,v8;v1=(yyvsp[-4].val);v2=(yyvsp[-3].val);v3=(yyvsp[-2].val);v4=(yyvsp[-1].val);v5=dispatch4(command_call,v1,v2,v3,v4);v6=v5;v7=(yyvsp[0].val);v8=dispatch2(method_add_block,v6,v7);(yyval.val)=v8;}
7736 }
7737#line 7733 "ripper.c"
7738 break;
7739
7740 case 84: /* command: primary_value "::" operation2 command_args */
7741#line 1866 "ripper.y"
7742 {
7743#if 0
7744 (yyval.val) = new_command_qcall(p, ID2VAL(idCOLON2), (yyvsp[-3].val), (yyvsp[-1].val), (yyvsp[0].val), Qnull, &(yylsp[-1]), &(yyloc));
7745#endif
7746 {VALUE v1,v2,v3,v4,v5;v1=(yyvsp[-3].val);v2=ID2VAL(idCOLON2);v3=(yyvsp[-1].val);v4=(yyvsp[0].val);v5=dispatch4(command_call,v1,v2,v3,v4);(yyval.val)=v5;}
7747 }
7748#line 7744 "ripper.c"
7749 break;
7750
7751 case 85: /* command: primary_value "::" operation2 command_args cmd_brace_block */
7752#line 1873 "ripper.y"
7753 {
7754#if 0
7755 (yyval.val) = new_command_qcall(p, ID2VAL(idCOLON2), (yyvsp[-4].val), (yyvsp[-2].val), (yyvsp[-1].val), (yyvsp[0].val), &(yylsp[-2]), &(yyloc));
7756#endif
7757 {VALUE v1,v2,v3,v4,v5,v6,v7,v8;v1=(yyvsp[-4].val);v2=ID2VAL(idCOLON2);v3=(yyvsp[-2].val);v4=(yyvsp[-1].val);v5=dispatch4(command_call,v1,v2,v3,v4);v6=v5;v7=(yyvsp[0].val);v8=dispatch2(method_add_block,v6,v7);(yyval.val)=v8;}
7758 }
7759#line 7755 "ripper.c"
7760 break;
7761
7762 case 86: /* command: "`super'" command_args */
7763#line 1880 "ripper.y"
7764 {
7765#if 0
7766 (yyval.val) = NEW_SUPER((yyvsp[0].val), &(yyloc));
7767 fixpos((yyval.val), (yyvsp[0].val));
7768#endif
7769 {VALUE v1,v2;v1=(yyvsp[0].val);v2=dispatch1(super,v1);(yyval.val)=v2;}
7770 }
7771#line 7767 "ripper.c"
7772 break;
7773
7774 case 87: /* command: "`yield'" command_args */
7775#line 1888 "ripper.y"
7776 {
7777#if 0
7778 (yyval.val) = new_yield(p, (yyvsp[0].val), &(yyloc));
7779 fixpos((yyval.val), (yyvsp[0].val));
7780#endif
7781 {VALUE v1,v2;v1=(yyvsp[0].val);v2=dispatch1(yield,v1);(yyval.val)=v2;}
7782 }
7783#line 7779 "ripper.c"
7784 break;
7785
7786 case 88: /* command: k_return call_args */
7787#line 1896 "ripper.y"
7788 {
7789#if 0
7790 (yyval.val) = NEW_RETURN(ret_args(p, (yyvsp[0].val)), &(yyloc));
7791#endif
7792 {VALUE v1,v2;v1=(yyvsp[0].val);v2=dispatch1(return,v1);(yyval.val)=v2;}
7793 }
7794#line 7790 "ripper.c"
7795 break;
7796
7797 case 89: /* command: "`break'" call_args */
7798#line 1903 "ripper.y"
7799 {
7800#if 0
7801 (yyval.val) = NEW_BREAK(ret_args(p, (yyvsp[0].val)), &(yyloc));
7802#endif
7803 {VALUE v1,v2;v1=(yyvsp[0].val);v2=dispatch1(break,v1);(yyval.val)=v2;}
7804 }
7805#line 7801 "ripper.c"
7806 break;
7807
7808 case 90: /* command: "`next'" call_args */
7809#line 1910 "ripper.y"
7810 {
7811#if 0
7812 (yyval.val) = NEW_NEXT(ret_args(p, (yyvsp[0].val)), &(yyloc));
7813#endif
7814 {VALUE v1,v2;v1=(yyvsp[0].val);v2=dispatch1(next,v1);(yyval.val)=v2;}
7815 }
7816#line 7812 "ripper.c"
7817 break;
7818
7819 case 92: /* mlhs: "(" mlhs_inner rparen */
7820#line 1920 "ripper.y"
7821 {
7822#if 0
7823 (yyval.val) = (yyvsp[-1].val);
7824#endif
7825 {VALUE v1,v2;v1=(yyvsp[-1].val);v2=dispatch1(mlhs_paren,v1);(yyval.val)=v2;}
7826 }
7827#line 7823 "ripper.c"
7828 break;
7829
7830 case 94: /* mlhs_inner: "(" mlhs_inner rparen */
7831#line 1930 "ripper.y"
7832 {
7833#if 0
7834 (yyval.val) = NEW_MASGN(NEW_LIST((yyvsp[-1].val), &(yyloc)), 0, &(yyloc));
7835#endif
7836 {VALUE v1,v2;v1=(yyvsp[-1].val);v2=dispatch1(mlhs_paren,v1);(yyval.val)=v2;}
7837 }
7838#line 7834 "ripper.c"
7839 break;
7840
7841 case 95: /* mlhs_basic: mlhs_head */
7842#line 1939 "ripper.y"
7843 {
7844#if 0
7845 (yyval.val) = NEW_MASGN((yyvsp[0].val), 0, &(yyloc));
7846#endif
7847 (yyval.val)=(yyvsp[0].val);
7848 }
7849#line 7845 "ripper.c"
7850 break;
7851
7852 case 96: /* mlhs_basic: mlhs_head mlhs_item */
7853#line 1946 "ripper.y"
7854 {
7855#if 0
7856 (yyval.val) = NEW_MASGN(list_append(p, (yyvsp[-1].val),(yyvsp[0].val)), 0, &(yyloc));
7857#endif
7858 {VALUE v1,v2,v3;v1=(yyvsp[-1].val);v2=(yyvsp[0].val);v3=dispatch2(mlhs_add,v1,v2);(yyval.val)=v3;}
7859 }
7860#line 7856 "ripper.c"
7861 break;
7862
7863 case 97: /* mlhs_basic: mlhs_head "*" mlhs_node */
7864#line 1953 "ripper.y"
7865 {
7866#if 0
7867 (yyval.val) = NEW_MASGN((yyvsp[-2].val), (yyvsp[0].val), &(yyloc));
7868#endif
7869 {VALUE v1,v2,v3;v1=(yyvsp[-2].val);v2=(yyvsp[0].val);v3=dispatch2(mlhs_add_star,v1,v2);(yyval.val)=v3;}
7870 }
7871#line 7867 "ripper.c"
7872 break;
7873
7874 case 98: /* mlhs_basic: mlhs_head "*" mlhs_node ',' mlhs_post */
7875#line 1960 "ripper.y"
7876 {
7877#if 0
7878 (yyval.val) = NEW_MASGN((yyvsp[-4].val), NEW_POSTARG((yyvsp[-2].val),(yyvsp[0].val),&(yyloc)), &(yyloc));
7879#endif
7880 {VALUE v1,v2,v3,v4,v5,v6;v1=(yyvsp[-4].val);v2=(yyvsp[-2].val);v3=dispatch2(mlhs_add_star,v1,v2);v4=v3;v5=(yyvsp[0].val);v6=dispatch2(mlhs_add_post,v4,v5);(yyval.val)=v6;}
7881 }
7882#line 7878 "ripper.c"
7883 break;
7884
7885 case 99: /* mlhs_basic: mlhs_head "*" */
7886#line 1967 "ripper.y"
7887 {
7888#if 0
7889 (yyval.val) = NEW_MASGN((yyvsp[-1].val), NODE_SPECIAL_NO_NAME_REST, &(yyloc));
7890#endif
7891 {VALUE v1,v2,v3;v1=(yyvsp[-1].val);v2=Qnil;v3=dispatch2(mlhs_add_star,v1,v2);(yyval.val)=v3;}
7892 }
7893#line 7889 "ripper.c"
7894 break;
7895
7896 case 100: /* mlhs_basic: mlhs_head "*" ',' mlhs_post */
7897#line 1974 "ripper.y"
7898 {
7899#if 0
7900 (yyval.val) = NEW_MASGN((yyvsp[-3].val), NEW_POSTARG(NODE_SPECIAL_NO_NAME_REST, (yyvsp[0].val), &(yyloc)), &(yyloc));
7901#endif
7902 {VALUE v1,v2,v3,v4,v5,v6;v1=(yyvsp[-3].val);v2=Qnil;v3=dispatch2(mlhs_add_star,v1,v2);v4=v3;v5=(yyvsp[0].val);v6=dispatch2(mlhs_add_post,v4,v5);(yyval.val)=v6;}
7903 }
7904#line 7900 "ripper.c"
7905 break;
7906
7907 case 101: /* mlhs_basic: "*" mlhs_node */
7908#line 1981 "ripper.y"
7909 {
7910#if 0
7911 (yyval.val) = NEW_MASGN(0, (yyvsp[0].val), &(yyloc));
7912#endif
7913 {VALUE v1,v2,v3,v4;v1=dispatch0(mlhs_new);v2=v1;v3=(yyvsp[0].val);v4=dispatch2(mlhs_add_star,v2,v3);(yyval.val)=v4;}
7914 }
7915#line 7911 "ripper.c"
7916 break;
7917
7918 case 102: /* mlhs_basic: "*" mlhs_node ',' mlhs_post */
7919#line 1988 "ripper.y"
7920 {
7921#if 0
7922 (yyval.val) = NEW_MASGN(0, NEW_POSTARG((yyvsp[-2].val),(yyvsp[0].val),&(yyloc)), &(yyloc));
7923#endif
7924 {VALUE v1,v2,v3,v4,v5,v6,v7;v1=dispatch0(mlhs_new);v2=v1;v3=(yyvsp[-2].val);v4=dispatch2(mlhs_add_star,v2,v3);v5=v4;v6=(yyvsp[0].val);v7=dispatch2(mlhs_add_post,v5,v6);(yyval.val)=v7;}
7925 }
7926#line 7922 "ripper.c"
7927 break;
7928
7929 case 103: /* mlhs_basic: "*" */
7930#line 1995 "ripper.y"
7931 {
7932#if 0
7933 (yyval.val) = NEW_MASGN(0, NODE_SPECIAL_NO_NAME_REST, &(yyloc));
7934#endif
7935 {VALUE v1,v2,v3,v4;v1=dispatch0(mlhs_new);v2=v1;v3=Qnil;v4=dispatch2(mlhs_add_star,v2,v3);(yyval.val)=v4;}
7936 }
7937#line 7933 "ripper.c"
7938 break;
7939
7940 case 104: /* mlhs_basic: "*" ',' mlhs_post */
7941#line 2002 "ripper.y"
7942 {
7943#if 0
7944 (yyval.val) = NEW_MASGN(0, NEW_POSTARG(NODE_SPECIAL_NO_NAME_REST, (yyvsp[0].val), &(yyloc)), &(yyloc));
7945#endif
7946 {VALUE v1,v2,v3,v4,v5,v6,v7;v1=dispatch0(mlhs_new);v2=v1;v3=Qnil;v4=dispatch2(mlhs_add_star,v2,v3);v5=v4;v6=(yyvsp[0].val);v7=dispatch2(mlhs_add_post,v5,v6);(yyval.val)=v7;}
7947 }
7948#line 7944 "ripper.c"
7949 break;
7950
7951 case 106: /* mlhs_item: "(" mlhs_inner rparen */
7952#line 2012 "ripper.y"
7953 {
7954#if 0
7955 (yyval.val) = (yyvsp[-1].val);
7956#endif
7957 {VALUE v1,v2;v1=(yyvsp[-1].val);v2=dispatch1(mlhs_paren,v1);(yyval.val)=v2;}
7958 }
7959#line 7955 "ripper.c"
7960 break;
7961
7962 case 107: /* mlhs_head: mlhs_item ',' */
7963#line 2021 "ripper.y"
7964 {
7965#if 0
7966 (yyval.val) = NEW_LIST((yyvsp[-1].val), &(yylsp[-1]));
7967#endif
7968 {VALUE v1,v2,v3,v4;v1=dispatch0(mlhs_new);v2=v1;v3=(yyvsp[-1].val);v4=dispatch2(mlhs_add,v2,v3);(yyval.val)=v4;}
7969 }
7970#line 7966 "ripper.c"
7971 break;
7972
7973 case 108: /* mlhs_head: mlhs_head mlhs_item ',' */
7974#line 2028 "ripper.y"
7975 {
7976#if 0
7977 (yyval.val) = list_append(p, (yyvsp[-2].val), (yyvsp[-1].val));
7978#endif
7979 {VALUE v1,v2,v3;v1=(yyvsp[-2].val);v2=(yyvsp[-1].val);v3=dispatch2(mlhs_add,v1,v2);(yyval.val)=v3;}
7980 }
7981#line 7977 "ripper.c"
7982 break;
7983
7984 case 109: /* mlhs_post: mlhs_item */
7985#line 2037 "ripper.y"
7986 {
7987#if 0
7988 (yyval.val) = NEW_LIST((yyvsp[0].val), &(yyloc));
7989#endif
7990 {VALUE v1,v2,v3,v4;v1=dispatch0(mlhs_new);v2=v1;v3=(yyvsp[0].val);v4=dispatch2(mlhs_add,v2,v3);(yyval.val)=v4;}
7991 }
7992#line 7988 "ripper.c"
7993 break;
7994
7995 case 110: /* mlhs_post: mlhs_post ',' mlhs_item */
7996#line 2044 "ripper.y"
7997 {
7998#if 0
7999 (yyval.val) = list_append(p, (yyvsp[-2].val), (yyvsp[0].val));
8000#endif
8001 {VALUE v1,v2,v3;v1=(yyvsp[-2].val);v2=(yyvsp[0].val);v3=dispatch2(mlhs_add,v1,v2);(yyval.val)=v3;}
8002 }
8003#line 7999 "ripper.c"
8004 break;
8005
8006 case 111: /* mlhs_node: user_variable */
8007#line 2053 "ripper.y"
8008 {
8009#if 0
8010 (yyval.val) = assignable(p, (yyvsp[0].val), 0, &(yyloc));
8011#endif
8012 (yyval.val)=assignable(p, var_field(p, (yyvsp[0].val)));
8013 }
8014#line 8010 "ripper.c"
8015 break;
8016
8017 case 112: /* mlhs_node: keyword_variable */
8018#line 2060 "ripper.y"
8019 {
8020#if 0
8021 (yyval.val) = assignable(p, (yyvsp[0].val), 0, &(yyloc));
8022#endif
8023 (yyval.val)=assignable(p, var_field(p, (yyvsp[0].val)));
8024 }
8025#line 8021 "ripper.c"
8026 break;
8027
8028 case 113: /* mlhs_node: primary_value '[' opt_call_args rbracket */
8029#line 2067 "ripper.y"
8030 {
8031#if 0
8032 (yyval.val) = aryset(p, (yyvsp[-3].val), (yyvsp[-1].val), &(yyloc));
8033#endif
8034 {VALUE v1,v2,v3;v1=(yyvsp[-3].val);v2=escape_Qundef((yyvsp[-1].val));v3=dispatch2(aref_field,v1,v2);(yyval.val)=v3;}
8035 }
8036#line 8032 "ripper.c"
8037 break;
8038
8039 case 114: /* mlhs_node: primary_value call_op "local variable or method" */
8040#line 2074 "ripper.y"
8041 {
8042 if ((yyvsp[-1].val) == tANDDOT) {
8043 yyerror1(&(yylsp[-1]), "&. inside multiple assignment destination");
8044 }
8045#if 0
8046 (yyval.val) = attrset(p, (yyvsp[-2].val), (yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
8047#endif
8048 {VALUE v1,v2,v3,v4;v1=(yyvsp[-2].val);v2=(yyvsp[-1].val);v3=(yyvsp[0].val);v4=dispatch3(field,v1,v2,v3);(yyval.val)=v4;}
8049 }
8050#line 8046 "ripper.c"
8051 break;
8052
8053 case 115: /* mlhs_node: primary_value "::" "local variable or method" */
8054#line 2084 "ripper.y"
8055 {
8056#if 0
8057 (yyval.val) = attrset(p, (yyvsp[-2].val), idCOLON2, (yyvsp[0].val), &(yyloc));
8058#endif
8059 {VALUE v1,v2,v3;v1=(yyvsp[-2].val);v2=(yyvsp[0].val);v3=dispatch2(const_path_field,v1,v2);(yyval.val)=v3;}
8060 }
8061#line 8057 "ripper.c"
8062 break;
8063
8064 case 116: /* mlhs_node: primary_value call_op "constant" */
8065#line 2091 "ripper.y"
8066 {
8067 if ((yyvsp[-1].val) == tANDDOT) {
8068 yyerror1(&(yylsp[-1]), "&. inside multiple assignment destination");
8069 }
8070#if 0
8071 (yyval.val) = attrset(p, (yyvsp[-2].val), (yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
8072#endif
8073 {VALUE v1,v2,v3,v4;v1=(yyvsp[-2].val);v2=(yyvsp[-1].val);v3=(yyvsp[0].val);v4=dispatch3(field,v1,v2,v3);(yyval.val)=v4;}
8074 }
8075#line 8071 "ripper.c"
8076 break;
8077
8078 case 117: /* mlhs_node: primary_value "::" "constant" */
8079#line 2101 "ripper.y"
8080 {
8081#if 0
8082 (yyval.val) = const_decl(p, NEW_COLON2((yyvsp[-2].val), (yyvsp[0].val), &(yyloc)), &(yyloc));
8083#endif
8084 {VALUE v1,v2,v3;v1=(yyvsp[-2].val);v2=(yyvsp[0].val);v3=dispatch2(const_path_field,v1,v2);(yyval.val)=const_decl(p, v3);}
8085 }
8086#line 8082 "ripper.c"
8087 break;
8088
8089 case 118: /* mlhs_node: ":: at EXPR_BEG" "constant" */
8090#line 2108 "ripper.y"
8091 {
8092#if 0
8093 (yyval.val) = const_decl(p, NEW_COLON3((yyvsp[0].val), &(yyloc)), &(yyloc));
8094#endif
8095 {VALUE v1,v2;v1=(yyvsp[0].val);v2=dispatch1(top_const_field,v1);(yyval.val)=const_decl(p, v2);}
8096 }
8097#line 8093 "ripper.c"
8098 break;
8099
8100 case 119: /* mlhs_node: backref */
8101#line 2115 "ripper.y"
8102 {
8103#if 0
8104 rb_backref_error(p, (yyvsp[0].val));
8105 (yyval.val) = NEW_BEGIN(0, &(yyloc));
8106#endif
8107 (yyval.val)=backref_error(p, RNODE((yyvsp[0].val)), var_field(p, (yyvsp[0].val)));ripper_error(p);
8108 }
8109#line 8105 "ripper.c"
8110 break;
8111
8112 case 120: /* lhs: user_variable */
8113#line 2125 "ripper.y"
8114 {
8115#if 0
8116 (yyval.val) = assignable(p, (yyvsp[0].val), 0, &(yyloc));
8117#endif
8118 (yyval.val)=assignable(p, var_field(p, (yyvsp[0].val)));
8119 }
8120#line 8116 "ripper.c"
8121 break;
8122
8123 case 121: /* lhs: keyword_variable */
8124#line 2132 "ripper.y"
8125 {
8126#if 0
8127 (yyval.val) = assignable(p, (yyvsp[0].val), 0, &(yyloc));
8128#endif
8129 (yyval.val)=assignable(p, var_field(p, (yyvsp[0].val)));
8130 }
8131#line 8127 "ripper.c"
8132 break;
8133
8134 case 122: /* lhs: primary_value '[' opt_call_args rbracket */
8135#line 2139 "ripper.y"
8136 {
8137#if 0
8138 (yyval.val) = aryset(p, (yyvsp[-3].val), (yyvsp[-1].val), &(yyloc));
8139#endif
8140 {VALUE v1,v2,v3;v1=(yyvsp[-3].val);v2=escape_Qundef((yyvsp[-1].val));v3=dispatch2(aref_field,v1,v2);(yyval.val)=v3;}
8141 }
8142#line 8138 "ripper.c"
8143 break;
8144
8145 case 123: /* lhs: primary_value call_op "local variable or method" */
8146#line 2146 "ripper.y"
8147 {
8148#if 0
8149 (yyval.val) = attrset(p, (yyvsp[-2].val), (yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
8150#endif
8151 {VALUE v1,v2,v3,v4;v1=(yyvsp[-2].val);v2=(yyvsp[-1].val);v3=(yyvsp[0].val);v4=dispatch3(field,v1,v2,v3);(yyval.val)=v4;}
8152 }
8153#line 8149 "ripper.c"
8154 break;
8155
8156 case 124: /* lhs: primary_value "::" "local variable or method" */
8157#line 2153 "ripper.y"
8158 {
8159#if 0
8160 (yyval.val) = attrset(p, (yyvsp[-2].val), idCOLON2, (yyvsp[0].val), &(yyloc));
8161#endif
8162 {VALUE v1,v2,v3,v4;v1=(yyvsp[-2].val);v2=ID2VAL(idCOLON2);v3=(yyvsp[0].val);v4=dispatch3(field,v1,v2,v3);(yyval.val)=v4;}
8163 }
8164#line 8160 "ripper.c"
8165 break;
8166
8167 case 125: /* lhs: primary_value call_op "constant" */
8168#line 2160 "ripper.y"
8169 {
8170#if 0
8171 (yyval.val) = attrset(p, (yyvsp[-2].val), (yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
8172#endif
8173 {VALUE v1,v2,v3,v4;v1=(yyvsp[-2].val);v2=(yyvsp[-1].val);v3=(yyvsp[0].val);v4=dispatch3(field,v1,v2,v3);(yyval.val)=v4;}
8174 }
8175#line 8171 "ripper.c"
8176 break;
8177
8178 case 126: /* lhs: primary_value "::" "constant" */
8179#line 2167 "ripper.y"
8180 {
8181#if 0
8182 (yyval.val) = const_decl(p, NEW_COLON2((yyvsp[-2].val), (yyvsp[0].val), &(yyloc)), &(yyloc));
8183#endif
8184 {VALUE v1,v2,v3;v1=(yyvsp[-2].val);v2=(yyvsp[0].val);v3=dispatch2(const_path_field,v1,v2);(yyval.val)=const_decl(p, v3);}
8185 }
8186#line 8182 "ripper.c"
8187 break;
8188
8189 case 127: /* lhs: ":: at EXPR_BEG" "constant" */
8190#line 2174 "ripper.y"
8191 {
8192#if 0
8193 (yyval.val) = const_decl(p, NEW_COLON3((yyvsp[0].val), &(yyloc)), &(yyloc));
8194#endif
8195 {VALUE v1,v2;v1=(yyvsp[0].val);v2=dispatch1(top_const_field,v1);(yyval.val)=const_decl(p, v2);}
8196 }
8197#line 8193 "ripper.c"
8198 break;
8199
8200 case 128: /* lhs: backref */
8201#line 2181 "ripper.y"
8202 {
8203#if 0
8204 rb_backref_error(p, (yyvsp[0].val));
8205 (yyval.val) = NEW_BEGIN(0, &(yyloc));
8206#endif
8207 (yyval.val)=backref_error(p, RNODE((yyvsp[0].val)), var_field(p, (yyvsp[0].val)));ripper_error(p);
8208 }
8209#line 8205 "ripper.c"
8210 break;
8211
8212 case 129: /* cname: "local variable or method" */
8213#line 2191 "ripper.y"
8214 {
8215 static const char mesg[] = "class/module name must be CONSTANT";
8216#if 0
8217 yyerror1(&(yylsp[0]), mesg);
8218#endif
8219 {VALUE v1,v2,v3;v1=ERR_MESG();v2=(yyvsp[0].val);v3=dispatch2(class_name_error,v1,v2);(yyval.val)=v3;}ripper_error(p);
8220 }
8221#line 8217 "ripper.c"
8222 break;
8223
8224 case 131: /* cpath: ":: at EXPR_BEG" cname */
8225#line 2202 "ripper.y"
8226 {
8227#if 0
8228 (yyval.val) = NEW_COLON3((yyvsp[0].val), &(yyloc));
8229#endif
8230 {VALUE v1,v2;v1=(yyvsp[0].val);v2=dispatch1(top_const_ref,v1);(yyval.val)=v2;}
8231 }
8232#line 8228 "ripper.c"
8233 break;
8234
8235 case 132: /* cpath: cname */
8236#line 2209 "ripper.y"
8237 {
8238#if 0
8239 (yyval.val) = NEW_COLON2(0, (yyval.val), &(yyloc));
8240#endif
8241 {VALUE v1,v2;v1=(yyvsp[0].val);v2=dispatch1(const_ref,v1);(yyval.val)=v2;}
8242 }
8243#line 8239 "ripper.c"
8244 break;
8245
8246 case 133: /* cpath: primary_value "::" cname */
8247#line 2216 "ripper.y"
8248 {
8249#if 0
8250 (yyval.val) = NEW_COLON2((yyvsp[-2].val), (yyvsp[0].val), &(yyloc));
8251#endif
8252 {VALUE v1,v2,v3;v1=(yyvsp[-2].val);v2=(yyvsp[0].val);v3=dispatch2(const_path_ref,v1,v2);(yyval.val)=v3;}
8253 }
8254#line 8250 "ripper.c"
8255 break;
8256
8257 case 137: /* fname: op */
8258#line 2228 "ripper.y"
8259 {
8260 SET_LEX_STATE(EXPR_ENDFN);
8261 (yyval.val) = (yyvsp[0].val);
8262 }
8263#line 8259 "ripper.c"
8264 break;
8265
8266 case 139: /* fitem: fname */
8267#line 2236 "ripper.y"
8268 {
8269#if 0
8270 (yyval.val) = NEW_LIT(ID2SYM((yyvsp[0].val)), &(yyloc));
8271#endif
8272 {VALUE v1,v2;v1=(yyvsp[0].val);v2=dispatch1(symbol_literal,v1);(yyval.val)=v2;}
8273 }
8274#line 8270 "ripper.c"
8275 break;
8276
8277 case 141: /* undef_list: fitem */
8278#line 2246 "ripper.y"
8279 {
8280#if 0
8281 (yyval.val) = NEW_UNDEF((yyvsp[0].val), &(yyloc));
8282#endif
8283 (yyval.val)=rb_ary_new3(1, get_value((yyvsp[0].val)));
8284 }
8285#line 8281 "ripper.c"
8286 break;
8287
8288 case 142: /* $@14: %empty */
8289#line 2252 "ripper.y"
8290 {SET_LEX_STATE(EXPR_FNAME|EXPR_FITEM);}
8291#line 8287 "ripper.c"
8292 break;
8293
8294 case 143: /* undef_list: undef_list ',' $@14 fitem */
8295#line 2253 "ripper.y"
8296 {
8297#if 0
8298 NODE *undef = NEW_UNDEF((yyvsp[0].val), &(yylsp[0]));
8299 (yyval.val) = block_append(p, (yyvsp[-3].val), undef);
8300#endif
8301 (yyval.val)=rb_ary_push((yyvsp[-3].val), get_value((yyvsp[0].val)));
8302 }
8303#line 8299 "ripper.c"
8304 break;
8305
8306 case 144: /* op: '|' */
8307#line 2262 "ripper.y"
8308 { ifndef_ripper((yyval.val) = '|'); }
8309#line 8305 "ripper.c"
8310 break;
8311
8312 case 145: /* op: '^' */
8313#line 2263 "ripper.y"
8314 { ifndef_ripper((yyval.val) = '^'); }
8315#line 8311 "ripper.c"
8316 break;
8317
8318 case 146: /* op: '&' */
8319#line 2264 "ripper.y"
8320 { ifndef_ripper((yyval.val) = '&'); }
8321#line 8317 "ripper.c"
8322 break;
8323
8324 case 147: /* op: "<=>" */
8325#line 2265 "ripper.y"
8326 { ifndef_ripper((yyval.val) = tCMP); }
8327#line 8323 "ripper.c"
8328 break;
8329
8330 case 148: /* op: "==" */
8331#line 2266 "ripper.y"
8332 { ifndef_ripper((yyval.val) = tEQ); }
8333#line 8329 "ripper.c"
8334 break;
8335
8336 case 149: /* op: "===" */
8337#line 2267 "ripper.y"
8338 { ifndef_ripper((yyval.val) = tEQQ); }
8339#line 8335 "ripper.c"
8340 break;
8341
8342 case 150: /* op: "=~" */
8343#line 2268 "ripper.y"
8344 { ifndef_ripper((yyval.val) = tMATCH); }
8345#line 8341 "ripper.c"
8346 break;
8347
8348 case 151: /* op: "!~" */
8349#line 2269 "ripper.y"
8350 { ifndef_ripper((yyval.val) = tNMATCH); }
8351#line 8347 "ripper.c"
8352 break;
8353
8354 case 152: /* op: '>' */
8355#line 2270 "ripper.y"
8356 { ifndef_ripper((yyval.val) = '>'); }
8357#line 8353 "ripper.c"
8358 break;
8359
8360 case 153: /* op: ">=" */
8361#line 2271 "ripper.y"
8362 { ifndef_ripper((yyval.val) = tGEQ); }
8363#line 8359 "ripper.c"
8364 break;
8365
8366 case 154: /* op: '<' */
8367#line 2272 "ripper.y"
8368 { ifndef_ripper((yyval.val) = '<'); }
8369#line 8365 "ripper.c"
8370 break;
8371
8372 case 155: /* op: "<=" */
8373#line 2273 "ripper.y"
8374 { ifndef_ripper((yyval.val) = tLEQ); }
8375#line 8371 "ripper.c"
8376 break;
8377
8378 case 156: /* op: "!=" */
8379#line 2274 "ripper.y"
8380 { ifndef_ripper((yyval.val) = tNEQ); }
8381#line 8377 "ripper.c"
8382 break;
8383
8384 case 157: /* op: "<<" */
8385#line 2275 "ripper.y"
8386 { ifndef_ripper((yyval.val) = tLSHFT); }
8387#line 8383 "ripper.c"
8388 break;
8389
8390 case 158: /* op: ">>" */
8391#line 2276 "ripper.y"
8392 { ifndef_ripper((yyval.val) = tRSHFT); }
8393#line 8389 "ripper.c"
8394 break;
8395
8396 case 159: /* op: '+' */
8397#line 2277 "ripper.y"
8398 { ifndef_ripper((yyval.val) = '+'); }
8399#line 8395 "ripper.c"
8400 break;
8401
8402 case 160: /* op: '-' */
8403#line 2278 "ripper.y"
8404 { ifndef_ripper((yyval.val) = '-'); }
8405#line 8401 "ripper.c"
8406 break;
8407
8408 case 161: /* op: '*' */
8409#line 2279 "ripper.y"
8410 { ifndef_ripper((yyval.val) = '*'); }
8411#line 8407 "ripper.c"
8412 break;
8413
8414 case 162: /* op: "*" */
8415#line 2280 "ripper.y"
8416 { ifndef_ripper((yyval.val) = '*'); }
8417#line 8413 "ripper.c"
8418 break;
8419
8420 case 163: /* op: '/' */
8421#line 2281 "ripper.y"
8422 { ifndef_ripper((yyval.val) = '/'); }
8423#line 8419 "ripper.c"
8424 break;
8425
8426 case 164: /* op: '%' */
8427#line 2282 "ripper.y"
8428 { ifndef_ripper((yyval.val) = '%'); }
8429#line 8425 "ripper.c"
8430 break;
8431
8432 case 165: /* op: "**" */
8433#line 2283 "ripper.y"
8434 { ifndef_ripper((yyval.val) = tPOW); }
8435#line 8431 "ripper.c"
8436 break;
8437
8438 case 166: /* op: "**arg" */
8439#line 2284 "ripper.y"
8440 { ifndef_ripper((yyval.val) = tDSTAR); }
8441#line 8437 "ripper.c"
8442 break;
8443
8444 case 167: /* op: '!' */
8445#line 2285 "ripper.y"
8446 { ifndef_ripper((yyval.val) = '!'); }
8447#line 8443 "ripper.c"
8448 break;
8449
8450 case 168: /* op: '~' */
8451#line 2286 "ripper.y"
8452 { ifndef_ripper((yyval.val) = '~'); }
8453#line 8449 "ripper.c"
8454 break;
8455
8456 case 169: /* op: "unary+" */
8457#line 2287 "ripper.y"
8458 { ifndef_ripper((yyval.val) = tUPLUS); }
8459#line 8455 "ripper.c"
8460 break;
8461
8462 case 170: /* op: "unary-" */
8463#line 2288 "ripper.y"
8464 { ifndef_ripper((yyval.val) = tUMINUS); }
8465#line 8461 "ripper.c"
8466 break;
8467
8468 case 171: /* op: "[]" */
8469#line 2289 "ripper.y"
8470 { ifndef_ripper((yyval.val) = tAREF); }
8471#line 8467 "ripper.c"
8472 break;
8473
8474 case 172: /* op: "[]=" */
8475#line 2290 "ripper.y"
8476 { ifndef_ripper((yyval.val) = tASET); }
8477#line 8473 "ripper.c"
8478 break;
8479
8480 case 173: /* op: '`' */
8481#line 2291 "ripper.y"
8482 { ifndef_ripper((yyval.val) = '`'); }
8483#line 8479 "ripper.c"
8484 break;
8485
8486 case 215: /* arg: lhs '=' lex_ctxt arg_rhs */
8487#line 2309 "ripper.y"
8488 {
8489#if 0
8490 (yyval.val) = node_assign(p, (yyvsp[-3].val), (yyvsp[0].val), (yyvsp[-1].ctxt), &(yyloc));
8491#endif
8492 {VALUE v1,v2,v3;v1=(yyvsp[-3].val);v2=(yyvsp[0].val);v3=dispatch2(assign,v1,v2);(yyval.val)=v3;}
8493 }
8494#line 8490 "ripper.c"
8495 break;
8496
8497 case 216: /* arg: var_lhs "operator-assignment" lex_ctxt arg_rhs */
8498#line 2316 "ripper.y"
8499 {
8500#if 0
8501 (yyval.val) = new_op_assign(p, (yyvsp[-3].val), (yyvsp[-2].val), (yyvsp[0].val), (yyvsp[-1].ctxt), &(yyloc));
8502#endif
8503 {VALUE v1,v2,v3,v4;v1=(yyvsp[-3].val);v2=(yyvsp[-2].val);v3=(yyvsp[0].val);v4=dispatch3(opassign,v1,v2,v3);(yyval.val)=v4;}
8504 }
8505#line 8501 "ripper.c"
8506 break;
8507
8508 case 217: /* arg: primary_value '[' opt_call_args rbracket "operator-assignment" lex_ctxt arg_rhs */
8509#line 2323 "ripper.y"
8510 {
8511#if 0
8512 (yyval.val) = new_ary_op_assign(p, (yyvsp[-6].val), (yyvsp[-4].val), (yyvsp[-2].val), (yyvsp[0].val), &(yylsp[-4]), &(yyloc));
8513#endif
8514 {VALUE v1,v2,v3,v4,v5,v6,v7;v1=(yyvsp[-6].val);v2=escape_Qundef((yyvsp[-4].val));v3=dispatch2(aref_field,v1,v2);v4=v3;v5=(yyvsp[-2].val);v6=(yyvsp[0].val);v7=dispatch3(opassign,v4,v5,v6);(yyval.val)=v7;}
8515 }
8516#line 8512 "ripper.c"
8517 break;
8518
8519 case 218: /* arg: primary_value call_op "local variable or method" "operator-assignment" lex_ctxt arg_rhs */
8520#line 2330 "ripper.y"
8521 {
8522#if 0
8523 (yyval.val) = new_attr_op_assign(p, (yyvsp[-5].val), (yyvsp[-4].val), (yyvsp[-3].val), (yyvsp[-2].val), (yyvsp[0].val), &(yyloc));
8524#endif
8525 {VALUE v1,v2,v3,v4,v5,v6,v7,v8;v1=(yyvsp[-5].val);v2=(yyvsp[-4].val);v3=(yyvsp[-3].val);v4=dispatch3(field,v1,v2,v3);v5=v4;v6=(yyvsp[-2].val);v7=(yyvsp[0].val);v8=dispatch3(opassign,v5,v6,v7);(yyval.val)=v8;}
8526 }
8527#line 8523 "ripper.c"
8528 break;
8529
8530 case 219: /* arg: primary_value call_op "constant" "operator-assignment" lex_ctxt arg_rhs */
8531#line 2337 "ripper.y"
8532 {
8533#if 0
8534 (yyval.val) = new_attr_op_assign(p, (yyvsp[-5].val), (yyvsp[-4].val), (yyvsp[-3].val), (yyvsp[-2].val), (yyvsp[0].val), &(yyloc));
8535#endif
8536 {VALUE v1,v2,v3,v4,v5,v6,v7,v8;v1=(yyvsp[-5].val);v2=(yyvsp[-4].val);v3=(yyvsp[-3].val);v4=dispatch3(field,v1,v2,v3);v5=v4;v6=(yyvsp[-2].val);v7=(yyvsp[0].val);v8=dispatch3(opassign,v5,v6,v7);(yyval.val)=v8;}
8537 }
8538#line 8534 "ripper.c"
8539 break;
8540
8541 case 220: /* arg: primary_value "::" "local variable or method" "operator-assignment" lex_ctxt arg_rhs */
8542#line 2344 "ripper.y"
8543 {
8544#if 0
8545 (yyval.val) = new_attr_op_assign(p, (yyvsp[-5].val), ID2VAL(idCOLON2), (yyvsp[-3].val), (yyvsp[-2].val), (yyvsp[0].val), &(yyloc));
8546#endif
8547 {VALUE v1,v2,v3,v4,v5,v6,v7,v8;v1=(yyvsp[-5].val);v2=ID2VAL(idCOLON2);v3=(yyvsp[-3].val);v4=dispatch3(field,v1,v2,v3);v5=v4;v6=(yyvsp[-2].val);v7=(yyvsp[0].val);v8=dispatch3(opassign,v5,v6,v7);(yyval.val)=v8;}
8548 }
8549#line 8545 "ripper.c"
8550 break;
8551
8552 case 221: /* arg: primary_value "::" "constant" "operator-assignment" lex_ctxt arg_rhs */
8553#line 2351 "ripper.y"
8554 {
8555#if 0
8556 YYLTYPE loc = code_loc_gen(&(yylsp[-5]), &(yylsp[-3]));
8557 (yyval.val) = new_const_op_assign(p, NEW_COLON2((yyvsp[-5].val), (yyvsp[-3].val), &loc), (yyvsp[-2].val), (yyvsp[0].val), (yyvsp[-1].ctxt), &(yyloc));
8558#endif
8559 {VALUE v1,v2,v3,v4,v5,v6,v7;v1=(yyvsp[-5].val);v2=(yyvsp[-3].val);v3=dispatch2(const_path_field,v1,v2);v4=v3;v5=(yyvsp[-2].val);v6=(yyvsp[0].val);v7=dispatch3(opassign,v4,v5,v6);(yyval.val)=v7;}
8560 }
8561#line 8557 "ripper.c"
8562 break;
8563
8564 case 222: /* arg: ":: at EXPR_BEG" "constant" "operator-assignment" lex_ctxt arg_rhs */
8565#line 2359 "ripper.y"
8566 {
8567#if 0
8568 (yyval.val) = new_const_op_assign(p, NEW_COLON3((yyvsp[-3].val), &(yyloc)), (yyvsp[-2].val), (yyvsp[0].val), (yyvsp[-1].ctxt), &(yyloc));
8569#endif
8570 {VALUE v1,v2,v3,v4,v5,v6;v1=(yyvsp[-3].val);v2=dispatch1(top_const_field,v1);v3=v2;v4=(yyvsp[-2].val);v5=(yyvsp[0].val);v6=dispatch3(opassign,v3,v4,v5);(yyval.val)=v6;}
8571 }
8572#line 8568 "ripper.c"
8573 break;
8574
8575 case 223: /* arg: backref "operator-assignment" lex_ctxt arg_rhs */
8576#line 2366 "ripper.y"
8577 {
8578#if 0
8579 rb_backref_error(p, (yyvsp[-3].val));
8580 (yyval.val) = NEW_BEGIN(0, &(yyloc));
8581#endif
8582 {VALUE v1,v2,v3,v4;v1=var_field(p, (yyvsp[-3].val));v2=(yyvsp[-2].val);v3=(yyvsp[0].val);v4=dispatch3(opassign,v1,v2,v3);(yyval.val)=backref_error(p, RNODE((yyvsp[-3].val)), v4);}ripper_error(p);
8583 }
8584#line 8580 "ripper.c"
8585 break;
8586
8587 case 224: /* arg: arg ".." arg */
8588#line 2374 "ripper.y"
8589 {
8590#if 0
8591 value_expr((yyvsp[-2].val));
8592 value_expr((yyvsp[0].val));
8593 (yyval.val) = NEW_DOT2((yyvsp[-2].val), (yyvsp[0].val), &(yyloc));
8594#endif
8595 {VALUE v1,v2,v3;v1=(yyvsp[-2].val);v2=(yyvsp[0].val);v3=dispatch2(dot2,v1,v2);(yyval.val)=v3;}
8596 }
8597#line 8593 "ripper.c"
8598 break;
8599
8600 case 225: /* arg: arg "..." arg */
8601#line 2383 "ripper.y"
8602 {
8603#if 0
8604 value_expr((yyvsp[-2].val));
8605 value_expr((yyvsp[0].val));
8606 (yyval.val) = NEW_DOT3((yyvsp[-2].val), (yyvsp[0].val), &(yyloc));
8607#endif
8608 {VALUE v1,v2,v3;v1=(yyvsp[-2].val);v2=(yyvsp[0].val);v3=dispatch2(dot3,v1,v2);(yyval.val)=v3;}
8609 }
8610#line 8606 "ripper.c"
8611 break;
8612
8613 case 226: /* arg: arg ".." */
8614#line 2392 "ripper.y"
8615 {
8616#if 0
8617 value_expr((yyvsp[-1].val));
8618 (yyval.val) = NEW_DOT2((yyvsp[-1].val), new_nil_at(p, &(yylsp[0]).end_pos), &(yyloc));
8619#endif
8620 {VALUE v1,v2,v3;v1=(yyvsp[-1].val);v2=Qnil;v3=dispatch2(dot2,v1,v2);(yyval.val)=v3;}
8621 }
8622#line 8618 "ripper.c"
8623 break;
8624
8625 case 227: /* arg: arg "..." */
8626#line 2400 "ripper.y"
8627 {
8628#if 0
8629 value_expr((yyvsp[-1].val));
8630 (yyval.val) = NEW_DOT3((yyvsp[-1].val), new_nil_at(p, &(yylsp[0]).end_pos), &(yyloc));
8631#endif
8632 {VALUE v1,v2,v3;v1=(yyvsp[-1].val);v2=Qnil;v3=dispatch2(dot3,v1,v2);(yyval.val)=v3;}
8633 }
8634#line 8630 "ripper.c"
8635 break;
8636
8637 case 228: /* arg: "(.." arg */
8638#line 2408 "ripper.y"
8639 {
8640#if 0
8641 value_expr((yyvsp[0].val));
8642 (yyval.val) = NEW_DOT2(new_nil_at(p, &(yylsp[-1]).beg_pos), (yyvsp[0].val), &(yyloc));
8643#endif
8644 {VALUE v1,v2,v3;v1=Qnil;v2=(yyvsp[0].val);v3=dispatch2(dot2,v1,v2);(yyval.val)=v3;}
8645 }
8646#line 8642 "ripper.c"
8647 break;
8648
8649 case 229: /* arg: "(..." arg */
8650#line 2416 "ripper.y"
8651 {
8652#if 0
8653 value_expr((yyvsp[0].val));
8654 (yyval.val) = NEW_DOT3(new_nil_at(p, &(yylsp[-1]).beg_pos), (yyvsp[0].val), &(yyloc));
8655#endif
8656 {VALUE v1,v2,v3;v1=Qnil;v2=(yyvsp[0].val);v3=dispatch2(dot3,v1,v2);(yyval.val)=v3;}
8657 }
8658#line 8654 "ripper.c"
8659 break;
8660
8661 case 230: /* arg: arg '+' arg */
8662#line 2424 "ripper.y"
8663 {
8664 (yyval.val) = call_bin_op(p, (yyvsp[-2].val), '+', (yyvsp[0].val), &(yylsp[-1]), &(yyloc));
8665 }
8666#line 8662 "ripper.c"
8667 break;
8668
8669 case 231: /* arg: arg '-' arg */
8670#line 2428 "ripper.y"
8671 {
8672 (yyval.val) = call_bin_op(p, (yyvsp[-2].val), '-', (yyvsp[0].val), &(yylsp[-1]), &(yyloc));
8673 }
8674#line 8670 "ripper.c"
8675 break;
8676
8677 case 232: /* arg: arg '*' arg */
8678#line 2432 "ripper.y"
8679 {
8680 (yyval.val) = call_bin_op(p, (yyvsp[-2].val), '*', (yyvsp[0].val), &(yylsp[-1]), &(yyloc));
8681 }
8682#line 8678 "ripper.c"
8683 break;
8684
8685 case 233: /* arg: arg '/' arg */
8686#line 2436 "ripper.y"
8687 {
8688 (yyval.val) = call_bin_op(p, (yyvsp[-2].val), '/', (yyvsp[0].val), &(yylsp[-1]), &(yyloc));
8689 }
8690#line 8686 "ripper.c"
8691 break;
8692
8693 case 234: /* arg: arg '%' arg */
8694#line 2440 "ripper.y"
8695 {
8696 (yyval.val) = call_bin_op(p, (yyvsp[-2].val), '%', (yyvsp[0].val), &(yylsp[-1]), &(yyloc));
8697 }
8698#line 8694 "ripper.c"
8699 break;
8700
8701 case 235: /* arg: arg "**" arg */
8702#line 2444 "ripper.y"
8703 {
8704 (yyval.val) = call_bin_op(p, (yyvsp[-2].val), idPow, (yyvsp[0].val), &(yylsp[-1]), &(yyloc));
8705 }
8706#line 8702 "ripper.c"
8707 break;
8708
8709 case 236: /* arg: tUMINUS_NUM simple_numeric "**" arg */
8710#line 2448 "ripper.y"
8711 {
8712 (yyval.val) = call_uni_op(p, call_bin_op(p, (yyvsp[-2].val), idPow, (yyvsp[0].val), &(yylsp[-2]), &(yyloc)), idUMinus, &(yylsp[-3]), &(yyloc));
8713 }
8714#line 8710 "ripper.c"
8715 break;
8716
8717 case 237: /* arg: "unary+" arg */
8718#line 2452 "ripper.y"
8719 {
8720 (yyval.val) = call_uni_op(p, (yyvsp[0].val), idUPlus, &(yylsp[-1]), &(yyloc));
8721 }
8722#line 8718 "ripper.c"
8723 break;
8724
8725 case 238: /* arg: "unary-" arg */
8726#line 2456 "ripper.y"
8727 {
8728 (yyval.val) = call_uni_op(p, (yyvsp[0].val), idUMinus, &(yylsp[-1]), &(yyloc));
8729 }
8730#line 8726 "ripper.c"
8731 break;
8732
8733 case 239: /* arg: arg '|' arg */
8734#line 2460 "ripper.y"
8735 {
8736 (yyval.val) = call_bin_op(p, (yyvsp[-2].val), '|', (yyvsp[0].val), &(yylsp[-1]), &(yyloc));
8737 }
8738#line 8734 "ripper.c"
8739 break;
8740
8741 case 240: /* arg: arg '^' arg */
8742#line 2464 "ripper.y"
8743 {
8744 (yyval.val) = call_bin_op(p, (yyvsp[-2].val), '^', (yyvsp[0].val), &(yylsp[-1]), &(yyloc));
8745 }
8746#line 8742 "ripper.c"
8747 break;
8748
8749 case 241: /* arg: arg '&' arg */
8750#line 2468 "ripper.y"
8751 {
8752 (yyval.val) = call_bin_op(p, (yyvsp[-2].val), '&', (yyvsp[0].val), &(yylsp[-1]), &(yyloc));
8753 }
8754#line 8750 "ripper.c"
8755 break;
8756
8757 case 242: /* arg: arg "<=>" arg */
8758#line 2472 "ripper.y"
8759 {
8760 (yyval.val) = call_bin_op(p, (yyvsp[-2].val), idCmp, (yyvsp[0].val), &(yylsp[-1]), &(yyloc));
8761 }
8762#line 8758 "ripper.c"
8763 break;
8764
8765 case 244: /* arg: arg "==" arg */
8766#line 2477 "ripper.y"
8767 {
8768 (yyval.val) = call_bin_op(p, (yyvsp[-2].val), idEq, (yyvsp[0].val), &(yylsp[-1]), &(yyloc));
8769 }
8770#line 8766 "ripper.c"
8771 break;
8772
8773 case 245: /* arg: arg "===" arg */
8774#line 2481 "ripper.y"
8775 {
8776 (yyval.val) = call_bin_op(p, (yyvsp[-2].val), idEqq, (yyvsp[0].val), &(yylsp[-1]), &(yyloc));
8777 }
8778#line 8774 "ripper.c"
8779 break;
8780
8781 case 246: /* arg: arg "!=" arg */
8782#line 2485 "ripper.y"
8783 {
8784 (yyval.val) = call_bin_op(p, (yyvsp[-2].val), idNeq, (yyvsp[0].val), &(yylsp[-1]), &(yyloc));
8785 }
8786#line 8782 "ripper.c"
8787 break;
8788
8789 case 247: /* arg: arg "=~" arg */
8790#line 2489 "ripper.y"
8791 {
8792 (yyval.val) = match_op(p, (yyvsp[-2].val), (yyvsp[0].val), &(yylsp[-1]), &(yyloc));
8793 }
8794#line 8790 "ripper.c"
8795 break;
8796
8797 case 248: /* arg: arg "!~" arg */
8798#line 2493 "ripper.y"
8799 {
8800 (yyval.val) = call_bin_op(p, (yyvsp[-2].val), idNeqTilde, (yyvsp[0].val), &(yylsp[-1]), &(yyloc));
8801 }
8802#line 8798 "ripper.c"
8803 break;
8804
8805 case 249: /* arg: '!' arg */
8806#line 2497 "ripper.y"
8807 {
8808 (yyval.val) = call_uni_op(p, method_cond(p, (yyvsp[0].val), &(yylsp[0])), '!', &(yylsp[-1]), &(yyloc));
8809 }
8810#line 8806 "ripper.c"
8811 break;
8812
8813 case 250: /* arg: '~' arg */
8814#line 2501 "ripper.y"
8815 {
8816 (yyval.val) = call_uni_op(p, (yyvsp[0].val), '~', &(yylsp[-1]), &(yyloc));
8817 }
8818#line 8814 "ripper.c"
8819 break;
8820
8821 case 251: /* arg: arg "<<" arg */
8822#line 2505 "ripper.y"
8823 {
8824 (yyval.val) = call_bin_op(p, (yyvsp[-2].val), idLTLT, (yyvsp[0].val), &(yylsp[-1]), &(yyloc));
8825 }
8826#line 8822 "ripper.c"
8827 break;
8828
8829 case 252: /* arg: arg ">>" arg */
8830#line 2509 "ripper.y"
8831 {
8832 (yyval.val) = call_bin_op(p, (yyvsp[-2].val), idGTGT, (yyvsp[0].val), &(yylsp[-1]), &(yyloc));
8833 }
8834#line 8830 "ripper.c"
8835 break;
8836
8837 case 253: /* arg: arg "&&" arg */
8838#line 2513 "ripper.y"
8839 {
8840 (yyval.val) = logop(p, idANDOP, (yyvsp[-2].val), (yyvsp[0].val), &(yylsp[-1]), &(yyloc));
8841 }
8842#line 8838 "ripper.c"
8843 break;
8844
8845 case 254: /* arg: arg "||" arg */
8846#line 2517 "ripper.y"
8847 {
8848 (yyval.val) = logop(p, idOROP, (yyvsp[-2].val), (yyvsp[0].val), &(yylsp[-1]), &(yyloc));
8849 }
8850#line 8846 "ripper.c"
8851 break;
8852
8853 case 255: /* $@15: %empty */
8854#line 2520 "ripper.y"
8855 {p->ctxt.in_defined = 1;}
8856#line 8852 "ripper.c"
8857 break;
8858
8859 case 256: /* arg: "`defined?'" opt_nl $@15 arg */
8860#line 2521 "ripper.y"
8861 {
8862 p->ctxt.in_defined = 0;
8863 (yyval.val) = new_defined(p, (yyvsp[0].val), &(yyloc));
8864 }
8865#line 8861 "ripper.c"
8866 break;
8867
8868 case 257: /* arg: arg '?' arg opt_nl ':' arg */
8869#line 2526 "ripper.y"
8870 {
8871#if 0
8872 value_expr((yyvsp[-5].val));
8873 (yyval.val) = new_if(p, (yyvsp[-5].val), (yyvsp[-3].val), (yyvsp[0].val), &(yyloc));
8874 fixpos((yyval.val), (yyvsp[-5].val));
8875#endif
8876 {VALUE v1,v2,v3,v4;v1=(yyvsp[-5].val);v2=(yyvsp[-3].val);v3=(yyvsp[0].val);v4=dispatch3(ifop,v1,v2,v3);(yyval.val)=v4;}
8877 }
8878#line 8874 "ripper.c"
8879 break;
8880
8881 case 258: /* arg: defn_head f_opt_paren_args '=' arg */
8882#line 2535 "ripper.y"
8883 {
8884 endless_method_name(p, (yyvsp[-3].node), &(yylsp[-3]));
8885 restore_defun(p, (yyvsp[-3].node)->nd_defn);
8886#if 0
8887 (yyval.val) = set_defun_body(p, (yyvsp[-3].val), (yyvsp[-2].val), (yyvsp[0].val), &(yyloc));
8888#endif
8889 {VALUE v1,v2,v3,v4;v1=get_value((yyvsp[-3].val));v2=(yyvsp[-2].val);v3=(yyvsp[0].val);v4=dispatch3(def,v1,v2,v3);(yyval.val)=v4;}
8890 local_pop(p);
8891 }
8892#line 8888 "ripper.c"
8893 break;
8894
8895 case 259: /* arg: defn_head f_opt_paren_args '=' arg "`rescue' modifier" arg */
8896#line 2545 "ripper.y"
8897 {
8898 endless_method_name(p, (yyvsp[-5].node), &(yylsp[-5]));
8899 restore_defun(p, (yyvsp[-5].node)->nd_defn);
8900#if 0
8901 (yyvsp[-2].val) = rescued_expr(p, (yyvsp[-2].val), (yyvsp[0].val), &(yylsp[-2]), &(yylsp[-1]), &(yylsp[0]));
8902 (yyval.val) = set_defun_body(p, (yyvsp[-5].val), (yyvsp[-4].val), (yyvsp[-2].val), &(yyloc));
8903#endif
8904 {VALUE v1,v2,v3,v4,v5,v6,v7;v1=(yyvsp[-2].val);v2=(yyvsp[0].val);v3=dispatch2(rescue_mod,v1,v2);v4=get_value((yyvsp[-5].val));v5=(yyvsp[-4].val);v6=v3;v7=dispatch3(def,v4,v5,v6);(yyval.val)=v7;}
8905 local_pop(p);
8906 }
8907#line 8903 "ripper.c"
8908 break;
8909
8910 case 260: /* arg: defs_head f_opt_paren_args '=' arg */
8911#line 2556 "ripper.y"
8912 {
8913 endless_method_name(p, (yyvsp[-3].node), &(yylsp[-3]));
8914 restore_defun(p, (yyvsp[-3].node)->nd_defn);
8915#if 0
8916 (yyval.val) = set_defun_body(p, (yyvsp[-3].val), (yyvsp[-2].val), (yyvsp[0].val), &(yyloc));
8917#endif
8918 (yyvsp[-3].val) = get_value((yyvsp[-3].val));
8919
8920 {VALUE v1,v2,v3,v4,v5,v6;v1=AREF((yyvsp[-3].val), 0);v2=AREF((yyvsp[-3].val), 1);v3=AREF((yyvsp[-3].val), 2);v4=(yyvsp[-2].val);v5=(yyvsp[0].val);v6=dispatch5(defs,v1,v2,v3,v4,v5);(yyval.val)=v6;}
8921 local_pop(p);
8922 }
8923#line 8919 "ripper.c"
8924 break;
8925
8926 case 261: /* arg: defs_head f_opt_paren_args '=' arg "`rescue' modifier" arg */
8927#line 2568 "ripper.y"
8928 {
8929 endless_method_name(p, (yyvsp[-5].node), &(yylsp[-5]));
8930 restore_defun(p, (yyvsp[-5].node)->nd_defn);
8931#if 0
8932 (yyvsp[-2].val) = rescued_expr(p, (yyvsp[-2].val), (yyvsp[0].val), &(yylsp[-2]), &(yylsp[-1]), &(yylsp[0]));
8933 (yyval.val) = set_defun_body(p, (yyvsp[-5].val), (yyvsp[-4].val), (yyvsp[-2].val), &(yyloc));
8934#endif
8935 (yyvsp[-5].val) = get_value((yyvsp[-5].val));
8936
8937 {VALUE v1,v2,v3,v4,v5,v6,v7,v8,v9;v1=(yyvsp[-2].val);v2=(yyvsp[0].val);v3=dispatch2(rescue_mod,v1,v2);v4=AREF((yyvsp[-5].val), 0);v5=AREF((yyvsp[-5].val), 1);v6=AREF((yyvsp[-5].val), 2);v7=(yyvsp[-4].val);v8=v3;v9=dispatch5(defs,v4,v5,v6,v7,v8);(yyval.val)=v9;}
8938 local_pop(p);
8939 }
8940#line 8936 "ripper.c"
8941 break;
8942
8943 case 262: /* arg: primary */
8944#line 2581 "ripper.y"
8945 {
8946 (yyval.val) = (yyvsp[0].val);
8947 }
8948#line 8944 "ripper.c"
8949 break;
8950
8951 case 263: /* relop: '>' */
8952#line 2586 "ripper.y"
8953 {(yyval.val) = '>';}
8954#line 8950 "ripper.c"
8955 break;
8956
8957 case 264: /* relop: '<' */
8958#line 2587 "ripper.y"
8959 {(yyval.val) = '<';}
8960#line 8956 "ripper.c"
8961 break;
8962
8963 case 265: /* relop: ">=" */
8964#line 2588 "ripper.y"
8965 {(yyval.val) = idGE;}
8966#line 8962 "ripper.c"
8967 break;
8968
8969 case 266: /* relop: "<=" */
8970#line 2589 "ripper.y"
8971 {(yyval.val) = idLE;}
8972#line 8968 "ripper.c"
8973 break;
8974
8975 case 267: /* rel_expr: arg relop arg */
8976#line 2593 "ripper.y"
8977 {
8978 (yyval.val) = call_bin_op(p, (yyvsp[-2].val), (yyvsp[-1].val), (yyvsp[0].val), &(yylsp[-1]), &(yyloc));
8979 }
8980#line 8976 "ripper.c"
8981 break;
8982
8983 case 268: /* rel_expr: rel_expr relop arg */
8984#line 2597 "ripper.y"
8985 {
8986 rb_warning1("comparison '%s' after comparison", WARN_ID((yyvsp[-1].val)));
8987 (yyval.val) = call_bin_op(p, (yyvsp[-2].val), (yyvsp[-1].val), (yyvsp[0].val), &(yylsp[-1]), &(yyloc));
8988 }
8989#line 8985 "ripper.c"
8990 break;
8991
8992 case 269: /* lex_ctxt: "escaped space" */
8993#line 2604 "ripper.y"
8994 {
8995 (yyval.ctxt) = p->ctxt;
8996 }
8997#line 8993 "ripper.c"
8998 break;
8999
9000 case 270: /* lex_ctxt: none */
9001#line 2608 "ripper.y"
9002 {
9003 (yyval.ctxt) = p->ctxt;
9004 }
9005#line 9001 "ripper.c"
9006 break;
9007
9008 case 271: /* arg_value: arg */
9009#line 2614 "ripper.y"
9010 {
9011 value_expr((yyvsp[0].val));
9012 (yyval.val) = (yyvsp[0].val);
9013 }
9014#line 9010 "ripper.c"
9015 break;
9016
9017 case 273: /* aref_args: args trailer */
9018#line 2622 "ripper.y"
9019 {
9020 (yyval.val) = (yyvsp[-1].val);
9021 }
9022#line 9018 "ripper.c"
9023 break;
9024
9025 case 274: /* aref_args: args ',' assocs trailer */
9026#line 2626 "ripper.y"
9027 {
9028#if 0
9029 (yyval.val) = (yyvsp[-1].val) ? arg_append(p, (yyvsp[-3].val), new_hash(p, (yyvsp[-1].val), &(yylsp[-1])), &(yyloc)) : (yyvsp[-3].val);
9030#endif
9031 {VALUE v1,v2,v3,v4,v5;v1=(yyvsp[-1].val);v2=dispatch1(bare_assoc_hash,v1);v3=(yyvsp[-3].val);v4=v2;v5=dispatch2(args_add,v3,v4);(yyval.val)=v5;}
9032 }
9033#line 9029 "ripper.c"
9034 break;
9035
9036 case 275: /* aref_args: assocs trailer */
9037#line 2633 "ripper.y"
9038 {
9039#if 0
9040 (yyval.val) = (yyvsp[-1].val) ? NEW_LIST(new_hash(p, (yyvsp[-1].val), &(yylsp[-1])), &(yyloc)) : 0;
9041#endif
9042 {VALUE v1,v2,v3,v4,v5,v6;v1=dispatch0(args_new);v2=(yyvsp[-1].val);v3=dispatch1(bare_assoc_hash,v2);v4=v1;v5=v3;v6=dispatch2(args_add,v4,v5);(yyval.val)=v6;}
9043 }
9044#line 9040 "ripper.c"
9045 break;
9046
9047 case 276: /* arg_rhs: arg */
9048#line 2642 "ripper.y"
9049 {
9050 value_expr((yyvsp[0].val));
9051 (yyval.val) = (yyvsp[0].val);
9052 }
9053#line 9049 "ripper.c"
9054 break;
9055
9056 case 277: /* arg_rhs: arg "`rescue' modifier" arg */
9057#line 2647 "ripper.y"
9058 {
9059#if 0
9060 value_expr((yyvsp[-2].val));
9061 (yyval.val) = rescued_expr(p, (yyvsp[-2].val), (yyvsp[0].val), &(yylsp[-2]), &(yylsp[-1]), &(yylsp[0]));
9062#endif
9063 {VALUE v1,v2,v3;v1=(yyvsp[-2].val);v2=(yyvsp[0].val);v3=dispatch2(rescue_mod,v1,v2);(yyval.val)=v3;}
9064 }
9065#line 9061 "ripper.c"
9066 break;
9067
9068 case 278: /* paren_args: '(' opt_call_args rparen */
9069#line 2657 "ripper.y"
9070 {
9071#if 0
9072 (yyval.val) = (yyvsp[-1].val);
9073#endif
9074 {VALUE v1,v2;v1=escape_Qundef((yyvsp[-1].val));v2=dispatch1(arg_paren,v1);(yyval.val)=v2;}
9075 }
9076#line 9072 "ripper.c"
9077 break;
9078
9079 case 279: /* paren_args: '(' args ',' args_forward rparen */
9080#line 2664 "ripper.y"
9081 {
9082 if (!check_forwarding_args(p)) {
9083 (yyval.val) = Qnone;
9084 }
9085 else {
9086#if 0
9087 (yyval.val) = new_args_forward_call(p, (yyvsp[-3].val), &(yylsp[-1]), &(yyloc));
9088#endif
9089 {VALUE v1,v2,v3,v4,v5;v1=(yyvsp[-3].val);v2=(yyvsp[-1].val);v3=dispatch2(args_add,v1,v2);v4=v3;v5=dispatch1(arg_paren,v4);(yyval.val)=v5;}
9090 }
9091 }
9092#line 9088 "ripper.c"
9093 break;
9094
9095 case 280: /* paren_args: '(' args_forward rparen */
9096#line 2676 "ripper.y"
9097 {
9098 if (!check_forwarding_args(p)) {
9099 (yyval.val) = Qnone;
9100 }
9101 else {
9102#if 0
9103 (yyval.val) = new_args_forward_call(p, 0, &(yylsp[-1]), &(yyloc));
9104#endif
9105 {VALUE v1,v2;v1=(yyvsp[-1].val);v2=dispatch1(arg_paren,v1);(yyval.val)=v2;}
9106 }
9107 }
9108#line 9104 "ripper.c"
9109 break;
9110
9111 case 285: /* opt_call_args: args ',' */
9112#line 2696 "ripper.y"
9113 {
9114 (yyval.val) = (yyvsp[-1].val);
9115 }
9116#line 9112 "ripper.c"
9117 break;
9118
9119 case 286: /* opt_call_args: args ',' assocs ',' */
9120#line 2700 "ripper.y"
9121 {
9122#if 0
9123 (yyval.val) = (yyvsp[-1].val) ? arg_append(p, (yyvsp[-3].val), new_hash(p, (yyvsp[-1].val), &(yylsp[-1])), &(yyloc)) : (yyvsp[-3].val);
9124#endif
9125 {VALUE v1,v2,v3,v4,v5;v1=(yyvsp[-1].val);v2=dispatch1(bare_assoc_hash,v1);v3=(yyvsp[-3].val);v4=v2;v5=dispatch2(args_add,v3,v4);(yyval.val)=v5;}
9126 }
9127#line 9123 "ripper.c"
9128 break;
9129
9130 case 287: /* opt_call_args: assocs ',' */
9131#line 2707 "ripper.y"
9132 {
9133#if 0
9134 (yyval.val) = (yyvsp[-1].val) ? NEW_LIST(new_hash(p, (yyvsp[-1].val), &(yylsp[-1])), &(yylsp[-1])) : 0;
9135#endif
9136 {VALUE v1,v2,v3,v4,v5,v6;v1=dispatch0(args_new);v2=(yyvsp[-1].val);v3=dispatch1(bare_assoc_hash,v2);v4=v1;v5=v3;v6=dispatch2(args_add,v4,v5);(yyval.val)=v6;}
9137 }
9138#line 9134 "ripper.c"
9139 break;
9140
9141 case 288: /* call_args: command */
9142#line 2716 "ripper.y"
9143 {
9144#if 0
9145 value_expr((yyvsp[0].val));
9146 (yyval.val) = NEW_LIST((yyvsp[0].val), &(yyloc));
9147#endif
9148 {VALUE v1,v2,v3,v4;v1=dispatch0(args_new);v2=v1;v3=(yyvsp[0].val);v4=dispatch2(args_add,v2,v3);(yyval.val)=v4;}
9149 }
9150#line 9146 "ripper.c"
9151 break;
9152
9153 case 289: /* call_args: args opt_block_arg */
9154#line 2724 "ripper.y"
9155 {
9156#if 0
9157 (yyval.val) = arg_blk_pass((yyvsp[-1].val), (yyvsp[0].val));
9158#endif
9159 {VALUE v1,v2,v3;v1=(yyvsp[-1].val);v2=(yyvsp[0].val);v3=dispatch2(args_add_block,v1,v2);(yyval.val)=v3;}
9160 }
9161#line 9157 "ripper.c"
9162 break;
9163
9164 case 290: /* call_args: assocs opt_block_arg */
9165#line 2731 "ripper.y"
9166 {
9167#if 0
9168 (yyval.val) = (yyvsp[-1].val) ? NEW_LIST(new_hash(p, (yyvsp[-1].val), &(yylsp[-1])), &(yylsp[-1])) : 0;
9169 (yyval.val) = arg_blk_pass((yyval.val), (yyvsp[0].val));
9170#endif
9171 {VALUE v1,v2,v3,v4,v5,v6,v7,v8,v9;v1=dispatch0(args_new);v2=(yyvsp[-1].val);v3=dispatch1(bare_assoc_hash,v2);v4=v1;v5=v3;v6=dispatch2(args_add,v4,v5);v7=v6;v8=(yyvsp[0].val);v9=dispatch2(args_add_block,v7,v8);(yyval.val)=v9;}
9172 }
9173#line 9169 "ripper.c"
9174 break;
9175
9176 case 291: /* call_args: args ',' assocs opt_block_arg */
9177#line 2739 "ripper.y"
9178 {
9179#if 0
9180 (yyval.val) = (yyvsp[-1].val) ? arg_append(p, (yyvsp[-3].val), new_hash(p, (yyvsp[-1].val), &(yylsp[-1])), &(yyloc)) : (yyvsp[-3].val);
9181 (yyval.val) = arg_blk_pass((yyval.val), (yyvsp[0].val));
9182#endif
9183 {VALUE v1,v2,v3,v4,v5,v6,v7,v8;v1=(yyvsp[-1].val);v2=dispatch1(bare_assoc_hash,v1);v3=(yyvsp[-3].val);v4=v2;v5=dispatch2(args_add,v3,v4);v6=v5;v7=(yyvsp[0].val);v8=dispatch2(args_add_block,v6,v7);(yyval.val)=v8;}
9184 }
9185#line 9181 "ripper.c"
9186 break;
9187
9188 case 292: /* call_args: block_arg */
9189#line 2747 "ripper.y"
9190 {{VALUE v1,v2,v3,v4;v1=dispatch0(args_new);v2=v1;v3=(yyvsp[0].val);v4=dispatch2(args_add_block,v2,v3);(yyval.val)=v4;}}
9191#line 9187 "ripper.c"
9192 break;
9193
9194 case 293: /* $@16: %empty */
9195#line 2750 "ripper.y"
9196 {
9197 /* If call_args starts with a open paren '(' or '[',
9198 * look-ahead reading of the letters calls CMDARG_PUSH(0),
9199 * but the push must be done after CMDARG_PUSH(1).
9200 * So this code makes them consistent by first cancelling
9201 * the premature CMDARG_PUSH(0), doing CMDARG_PUSH(1),
9202 * and finally redoing CMDARG_PUSH(0).
9203 */
9204 int lookahead = 0;
9205 switch (yychar) {
9206 case '(': case tLPAREN: case tLPAREN_ARG: case '[': case tLBRACK:
9207 lookahead = 1;
9208 }
9209 if (lookahead) CMDARG_POP();
9210 CMDARG_PUSH(1);
9211 if (lookahead) CMDARG_PUSH(0);
9212 }
9213#line 9209 "ripper.c"
9214 break;
9215
9216 case 294: /* command_args: $@16 call_args */
9217#line 2768 "ripper.y"
9218 {
9219 /* call_args can be followed by tLBRACE_ARG (that does CMDARG_PUSH(0) in the lexer)
9220 * but the push must be done after CMDARG_POP() in the parser.
9221 * So this code does CMDARG_POP() to pop 0 pushed by tLBRACE_ARG,
9222 * CMDARG_POP() to pop 1 pushed by command_args,
9223 * and CMDARG_PUSH(0) to restore back the flag set by tLBRACE_ARG.
9224 */
9225 int lookahead = 0;
9226 switch (yychar) {
9227 case tLBRACE_ARG:
9228 lookahead = 1;
9229 }
9230 if (lookahead) CMDARG_POP();
9231 CMDARG_POP();
9232 if (lookahead) CMDARG_PUSH(0);
9233 (yyval.val) = (yyvsp[0].val);
9234 }
9235#line 9231 "ripper.c"
9236 break;
9237
9238 case 295: /* block_arg: "&" arg_value */
9239#line 2788 "ripper.y"
9240 {
9241#if 0
9242 (yyval.val) = NEW_BLOCK_PASS((yyvsp[0].val), &(yyloc));
9243#endif
9244 (yyval.val)=(yyvsp[0].val);
9245 }
9246#line 9242 "ripper.c"
9247 break;
9248
9249 case 296: /* opt_block_arg: ',' block_arg */
9250#line 2797 "ripper.y"
9251 {
9252 (yyval.val) = (yyvsp[0].val);
9253 }
9254#line 9250 "ripper.c"
9255 break;
9256
9257 case 297: /* opt_block_arg: none */
9258#line 2801 "ripper.y"
9259 {
9260 (yyval.val) = 0;
9261 }
9262#line 9258 "ripper.c"
9263 break;
9264
9265 case 298: /* args: arg_value */
9266#line 2807 "ripper.y"
9267 {
9268#if 0
9269 (yyval.val) = NEW_LIST((yyvsp[0].val), &(yyloc));
9270#endif
9271 {VALUE v1,v2,v3,v4;v1=dispatch0(args_new);v2=v1;v3=(yyvsp[0].val);v4=dispatch2(args_add,v2,v3);(yyval.val)=v4;}
9272 }
9273#line 9269 "ripper.c"
9274 break;
9275
9276 case 299: /* args: "*" arg_value */
9277#line 2814 "ripper.y"
9278 {
9279#if 0
9280 (yyval.val) = NEW_SPLAT((yyvsp[0].val), &(yyloc));
9281#endif
9282 {VALUE v1,v2,v3,v4;v1=dispatch0(args_new);v2=v1;v3=(yyvsp[0].val);v4=dispatch2(args_add_star,v2,v3);(yyval.val)=v4;}
9283 }
9284#line 9280 "ripper.c"
9285 break;
9286
9287 case 300: /* args: args ',' arg_value */
9288#line 2821 "ripper.y"
9289 {
9290#if 0
9291 (yyval.val) = last_arg_append(p, (yyvsp[-2].val), (yyvsp[0].val), &(yyloc));
9292#endif
9293 {VALUE v1,v2,v3;v1=(yyvsp[-2].val);v2=(yyvsp[0].val);v3=dispatch2(args_add,v1,v2);(yyval.val)=v3;}
9294 }
9295#line 9291 "ripper.c"
9296 break;
9297
9298 case 301: /* args: args ',' "*" arg_value */
9299#line 2828 "ripper.y"
9300 {
9301#if 0
9302 (yyval.val) = rest_arg_append(p, (yyvsp[-3].val), (yyvsp[0].val), &(yyloc));
9303#endif
9304 {VALUE v1,v2,v3;v1=(yyvsp[-3].val);v2=(yyvsp[0].val);v3=dispatch2(args_add_star,v1,v2);(yyval.val)=v3;}
9305 }
9306#line 9302 "ripper.c"
9307 break;
9308
9309 case 304: /* mrhs: args ',' arg_value */
9310#line 2841 "ripper.y"
9311 {
9312#if 0
9313 (yyval.val) = last_arg_append(p, (yyvsp[-2].val), (yyvsp[0].val), &(yyloc));
9314#endif
9315 {VALUE v1,v2,v3,v4,v5;v1=(yyvsp[-2].val);v2=dispatch1(mrhs_new_from_args,v1);v3=v2;v4=(yyvsp[0].val);v5=dispatch2(mrhs_add,v3,v4);(yyval.val)=v5;}
9316 }
9317#line 9313 "ripper.c"
9318 break;
9319
9320 case 305: /* mrhs: args ',' "*" arg_value */
9321#line 2848 "ripper.y"
9322 {
9323#if 0
9324 (yyval.val) = rest_arg_append(p, (yyvsp[-3].val), (yyvsp[0].val), &(yyloc));
9325#endif
9326 {VALUE v1,v2,v3,v4,v5;v1=(yyvsp[-3].val);v2=dispatch1(mrhs_new_from_args,v1);v3=v2;v4=(yyvsp[0].val);v5=dispatch2(mrhs_add_star,v3,v4);(yyval.val)=v5;}
9327 }
9328#line 9324 "ripper.c"
9329 break;
9330
9331 case 306: /* mrhs: "*" arg_value */
9332#line 2855 "ripper.y"
9333 {
9334#if 0
9335 (yyval.val) = NEW_SPLAT((yyvsp[0].val), &(yyloc));
9336#endif
9337 {VALUE v1,v2,v3,v4;v1=dispatch0(mrhs_new);v2=v1;v3=(yyvsp[0].val);v4=dispatch2(mrhs_add_star,v2,v3);(yyval.val)=v4;}
9338 }
9339#line 9335 "ripper.c"
9340 break;
9341
9342 case 317: /* primary: "method" */
9343#line 2874 "ripper.y"
9344 {
9345#if 0
9346 (yyval.val) = NEW_FCALL((yyvsp[0].val), 0, &(yyloc));
9347#endif
9348 {VALUE v1,v2,v3,v4,v5,v6;v1=(yyvsp[0].val);v2=dispatch1(fcall,v1);v3=dispatch0(args_new);v4=v2;v5=v3;v6=dispatch2(method_add_arg,v4,v5);(yyval.val)=v6;}
9349 }
9350#line 9346 "ripper.c"
9351 break;
9352
9353 case 318: /* $@17: %empty */
9354#line 2881 "ripper.y"
9355 {
9356 CMDARG_PUSH(0);
9357 }
9358#line 9354 "ripper.c"
9359 break;
9360
9361 case 319: /* primary: k_begin $@17 bodystmt k_end */
9362#line 2886 "ripper.y"
9363 {
9364 CMDARG_POP();
9365#if 0
9366 set_line_body((yyvsp[-1].val), (yylsp[-3]).end_pos.lineno);
9367 (yyval.val) = NEW_BEGIN((yyvsp[-1].val), &(yyloc));
9368 nd_set_line((yyval.val), (yylsp[-3]).end_pos.lineno);
9369#endif
9370 {VALUE v1,v2;v1=(yyvsp[-1].val);v2=dispatch1(begin,v1);(yyval.val)=v2;}
9371 }
9372#line 9368 "ripper.c"
9373 break;
9374
9375 case 320: /* $@18: %empty */
9376#line 2895 "ripper.y"
9377 {SET_LEX_STATE(EXPR_ENDARG);}
9378#line 9374 "ripper.c"
9379 break;
9380
9381 case 321: /* primary: "( arg" $@18 rparen */
9382#line 2896 "ripper.y"
9383 {
9384#if 0
9385 (yyval.val) = NEW_BEGIN(0, &(yyloc));
9386#endif
9387 {VALUE v1,v2;v1=0;v2=dispatch1(paren,v1);(yyval.val)=v2;}
9388 }
9389#line 9385 "ripper.c"
9390 break;
9391
9392 case 322: /* $@19: %empty */
9393#line 2902 "ripper.y"
9394 {SET_LEX_STATE(EXPR_ENDARG);}
9395#line 9391 "ripper.c"
9396 break;
9397
9398 case 323: /* primary: "( arg" stmt $@19 rparen */
9399#line 2903 "ripper.y"
9400 {
9401#if 0
9402 if (nd_type((yyvsp[-2].val)) == NODE_SELF) (yyvsp[-2].val)->nd_state = 0;
9403 (yyval.val) = (yyvsp[-2].val);
9404#endif
9405 {VALUE v1,v2;v1=(yyvsp[-2].val);v2=dispatch1(paren,v1);(yyval.val)=v2;}
9406 }
9407#line 9403 "ripper.c"
9408 break;
9409
9410 case 324: /* primary: "(" compstmt ')' */
9411#line 2911 "ripper.y"
9412 {
9413#if 0
9414 if (nd_type((yyvsp[-1].val)) == NODE_SELF) (yyvsp[-1].val)->nd_state = 0;
9415 (yyval.val) = (yyvsp[-1].val);
9416#endif
9417 {VALUE v1,v2;v1=(yyvsp[-1].val);v2=dispatch1(paren,v1);(yyval.val)=v2;}
9418 }
9419#line 9415 "ripper.c"
9420 break;
9421
9422 case 325: /* primary: primary_value "::" "constant" */
9423#line 2919 "ripper.y"
9424 {
9425#if 0
9426 (yyval.val) = NEW_COLON2((yyvsp[-2].val), (yyvsp[0].val), &(yyloc));
9427#endif
9428 {VALUE v1,v2,v3;v1=(yyvsp[-2].val);v2=(yyvsp[0].val);v3=dispatch2(const_path_ref,v1,v2);(yyval.val)=v3;}
9429 }
9430#line 9426 "ripper.c"
9431 break;
9432
9433 case 326: /* primary: ":: at EXPR_BEG" "constant" */
9434#line 2926 "ripper.y"
9435 {
9436#if 0
9437 (yyval.val) = NEW_COLON3((yyvsp[0].val), &(yyloc));
9438#endif
9439 {VALUE v1,v2;v1=(yyvsp[0].val);v2=dispatch1(top_const_ref,v1);(yyval.val)=v2;}
9440 }
9441#line 9437 "ripper.c"
9442 break;
9443
9444 case 327: /* primary: "[" aref_args ']' */
9445#line 2933 "ripper.y"
9446 {
9447#if 0
9448 (yyval.val) = make_list((yyvsp[-1].val), &(yyloc));
9449#endif
9450 {VALUE v1,v2;v1=escape_Qundef((yyvsp[-1].val));v2=dispatch1(array,v1);(yyval.val)=v2;}
9451 }
9452#line 9448 "ripper.c"
9453 break;
9454
9455 case 328: /* primary: "{" assoc_list '}' */
9456#line 2940 "ripper.y"
9457 {
9458#if 0
9459 (yyval.val) = new_hash(p, (yyvsp[-1].val), &(yyloc));
9460 (yyval.val)->nd_brace = TRUE;
9461#endif
9462 {VALUE v1,v2;v1=escape_Qundef((yyvsp[-1].val));v2=dispatch1(hash,v1);(yyval.val)=v2;}
9463 }
9464#line 9460 "ripper.c"
9465 break;
9466
9467 case 329: /* primary: k_return */
9468#line 2948 "ripper.y"
9469 {
9470#if 0
9471 (yyval.val) = NEW_RETURN(0, &(yyloc));
9472#endif
9473 {VALUE v1;v1=dispatch0(return0);(yyval.val)=v1;}
9474 }
9475#line 9471 "ripper.c"
9476 break;
9477
9478 case 330: /* primary: "`yield'" '(' call_args rparen */
9479#line 2955 "ripper.y"
9480 {
9481#if 0
9482 (yyval.val) = new_yield(p, (yyvsp[-1].val), &(yyloc));
9483#endif
9484 {VALUE v1,v2,v3,v4;v1=(yyvsp[-1].val);v2=dispatch1(paren,v1);v3=v2;v4=dispatch1(yield,v3);(yyval.val)=v4;}
9485 }
9486#line 9482 "ripper.c"
9487 break;
9488
9489 case 331: /* primary: "`yield'" '(' rparen */
9490#line 2962 "ripper.y"
9491 {
9492#if 0
9493 (yyval.val) = NEW_YIELD(0, &(yyloc));
9494#endif
9495 {VALUE v1,v2,v3,v4,v5;v1=dispatch0(args_new);v2=v1;v3=dispatch1(paren,v2);v4=v3;v5=dispatch1(yield,v4);(yyval.val)=v5;}
9496 }
9497#line 9493 "ripper.c"
9498 break;
9499
9500 case 332: /* primary: "`yield'" */
9501#line 2969 "ripper.y"
9502 {
9503#if 0
9504 (yyval.val) = NEW_YIELD(0, &(yyloc));
9505#endif
9506 {VALUE v1;v1=dispatch0(yield0);(yyval.val)=v1;}
9507 }
9508#line 9504 "ripper.c"
9509 break;
9510
9511 case 333: /* $@20: %empty */
9512#line 2975 "ripper.y"
9513 {p->ctxt.in_defined = 1;}
9514#line 9510 "ripper.c"
9515 break;
9516
9517 case 334: /* primary: "`defined?'" opt_nl '(' $@20 expr rparen */
9518#line 2976 "ripper.y"
9519 {
9520 p->ctxt.in_defined = 0;
9521 (yyval.val) = new_defined(p, (yyvsp[-1].val), &(yyloc));
9522 }
9523#line 9519 "ripper.c"
9524 break;
9525
9526 case 335: /* primary: "`not'" '(' expr rparen */
9527#line 2981 "ripper.y"
9528 {
9529 (yyval.val) = call_uni_op(p, method_cond(p, (yyvsp[-1].val), &(yylsp[-1])), METHOD_NOT, &(yylsp[-3]), &(yyloc));
9530 }
9531#line 9527 "ripper.c"
9532 break;
9533
9534 case 336: /* primary: "`not'" '(' rparen */
9535#line 2985 "ripper.y"
9536 {
9537 (yyval.val) = call_uni_op(p, method_cond(p, new_nil(&(yylsp[-1])), &(yylsp[-1])), METHOD_NOT, &(yylsp[-2]), &(yyloc));
9538 }
9539#line 9535 "ripper.c"
9540 break;
9541
9542 case 337: /* primary: fcall brace_block */
9543#line 2989 "ripper.y"
9544 {
9545#if 0
9546 (yyval.val) = method_add_block(p, (yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
9547#endif
9548 {VALUE v1,v2,v3,v4,v5,v6,v7,v8,v9;v1=(yyvsp[-1].val);v2=dispatch1(fcall,v1);v3=dispatch0(args_new);v4=v2;v5=v3;v6=dispatch2(method_add_arg,v4,v5);v7=v6;v8=(yyvsp[0].val);v9=dispatch2(method_add_block,v7,v8);(yyval.val)=v9;}
9549 }
9550#line 9546 "ripper.c"
9551 break;
9552
9553 case 339: /* primary: method_call brace_block */
9554#line 2997 "ripper.y"
9555 {
9556#if 0
9557 block_dup_check(p, (yyvsp[-1].val)->nd_args, (yyvsp[0].val));
9558 (yyval.val) = method_add_block(p, (yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
9559#endif
9560 {VALUE v1,v2,v3;v1=(yyvsp[-1].val);v2=(yyvsp[0].val);v3=dispatch2(method_add_block,v1,v2);(yyval.val)=v3;}
9561 }
9562#line 9558 "ripper.c"
9563 break;
9564
9565 case 341: /* primary: k_if expr_value then compstmt if_tail k_end */
9566#line 3009 "ripper.y"
9567 {
9568#if 0
9569 (yyval.val) = new_if(p, (yyvsp[-4].val), (yyvsp[-2].val), (yyvsp[-1].val), &(yyloc));
9570 fixpos((yyval.val), (yyvsp[-4].val));
9571#endif
9572 {VALUE v1,v2,v3,v4;v1=(yyvsp[-4].val);v2=(yyvsp[-2].val);v3=escape_Qundef((yyvsp[-1].val));v4=dispatch3(if,v1,v2,v3);(yyval.val)=v4;}
9573 }
9574#line 9570 "ripper.c"
9575 break;
9576
9577 case 342: /* primary: k_unless expr_value then compstmt opt_else k_end */
9578#line 3020 "ripper.y"
9579 {
9580#if 0
9581 (yyval.val) = new_unless(p, (yyvsp[-4].val), (yyvsp[-2].val), (yyvsp[-1].val), &(yyloc));
9582 fixpos((yyval.val), (yyvsp[-4].val));
9583#endif
9584 {VALUE v1,v2,v3,v4;v1=(yyvsp[-4].val);v2=(yyvsp[-2].val);v3=escape_Qundef((yyvsp[-1].val));v4=dispatch3(unless,v1,v2,v3);(yyval.val)=v4;}
9585 }
9586#line 9582 "ripper.c"
9587 break;
9588
9589 case 343: /* primary: k_while expr_value_do compstmt k_end */
9590#line 3030 "ripper.y"
9591 {
9592#if 0
9593 (yyval.val) = NEW_WHILE(cond(p, (yyvsp[-2].val), &(yylsp[-2])), (yyvsp[-1].val), 1, &(yyloc));
9594 fixpos((yyval.val), (yyvsp[-2].val));
9595#endif
9596 {VALUE v1,v2,v3;v1=(yyvsp[-2].val);v2=(yyvsp[-1].val);v3=dispatch2(while,v1,v2);(yyval.val)=v3;}
9597 }
9598#line 9594 "ripper.c"
9599 break;
9600
9601 case 344: /* primary: k_until expr_value_do compstmt k_end */
9602#line 3040 "ripper.y"
9603 {
9604#if 0
9605 (yyval.val) = NEW_UNTIL(cond(p, (yyvsp[-2].val), &(yylsp[-2])), (yyvsp[-1].val), 1, &(yyloc));
9606 fixpos((yyval.val), (yyvsp[-2].val));
9607#endif
9608 {VALUE v1,v2,v3;v1=(yyvsp[-2].val);v2=(yyvsp[-1].val);v3=dispatch2(until,v1,v2);(yyval.val)=v3;}
9609 }
9610#line 9606 "ripper.c"
9611 break;
9612
9613 case 345: /* @21: %empty */
9614#line 3048 "ripper.y"
9615 {
9616 (yyval.val) = p->case_labels;
9617 p->case_labels = Qnil;
9618 }
9619#line 9615 "ripper.c"
9620 break;
9621
9622 case 346: /* primary: k_case expr_value opt_terms @21 case_body k_end */
9623#line 3054 "ripper.y"
9624 {
9626 p->case_labels = (yyvsp[-2].val);
9627#if 0
9628 (yyval.val) = NEW_CASE((yyvsp[-4].val), (yyvsp[-1].val), &(yyloc));
9629 fixpos((yyval.val), (yyvsp[-4].val));
9630#endif
9631 {VALUE v1,v2,v3;v1=(yyvsp[-4].val);v2=(yyvsp[-1].val);v3=dispatch2(case,v1,v2);(yyval.val)=v3;}
9632 }
9633#line 9629 "ripper.c"
9634 break;
9635
9636 case 347: /* @22: %empty */
9637#line 3064 "ripper.y"
9638 {
9639 (yyval.val) = p->case_labels;
9640 p->case_labels = 0;
9641 }
9642#line 9638 "ripper.c"
9643 break;
9644
9645 case 348: /* primary: k_case opt_terms @22 case_body k_end */
9646#line 3070 "ripper.y"
9647 {
9649 p->case_labels = (yyvsp[-2].val);
9650#if 0
9651 (yyval.val) = NEW_CASE2((yyvsp[-1].val), &(yyloc));
9652#endif
9653 {VALUE v1,v2,v3;v1=Qnil;v2=(yyvsp[-1].val);v3=dispatch2(case,v1,v2);(yyval.val)=v3;}
9654 }
9655#line 9651 "ripper.c"
9656 break;
9657
9658 case 349: /* primary: k_case expr_value opt_terms p_case_body k_end */
9659#line 3081 "ripper.y"
9660 {
9661#if 0
9662 (yyval.val) = NEW_CASE3((yyvsp[-3].val), (yyvsp[-1].val), &(yyloc));
9663#endif
9664 {VALUE v1,v2,v3;v1=(yyvsp[-3].val);v2=(yyvsp[-1].val);v3=dispatch2(case,v1,v2);(yyval.val)=v3;}
9665 }
9666#line 9662 "ripper.c"
9667 break;
9668
9669 case 350: /* primary: k_for for_var "`in'" expr_value_do compstmt k_end */
9670#line 3090 "ripper.y"
9671 {
9672#if 0
9673 /*
9674 * for a, b, c in e
9675 * #=>
9676 * e.each{|*x| a, b, c = x}
9677 *
9678 * for a in e
9679 * #=>
9680 * e.each{|x| a, = x}
9681 */
9682 ID id = internal_id(p);
9683 NODE *m = NEW_ARGS_AUX(0, 0, &NULL_LOC);
9684 NODE *args, *scope, *internal_var = NEW_DVAR(id, &(yylsp[-4]));
9685 ID *tbl = ALLOC_N(ID, 3);
9686 tbl[0] = 1 /* length of local var table */; tbl[1] = id /* internal id */;
9687 rb_ast_add_local_table(p->ast, tbl);
9688
9689 switch (nd_type((yyvsp[-4].val))) {
9690 case NODE_LASGN:
9691 case NODE_DASGN:
9692 case NODE_DASGN_CURR: /* e.each {|internal_var| a = internal_var; ... } */
9693 (yyvsp[-4].val)->nd_value = internal_var;
9694 id = 0;
9695 m->nd_plen = 1;
9696 m->nd_next = (yyvsp[-4].val);
9697 break;
9698 case NODE_MASGN: /* e.each {|*internal_var| a, b, c = (internal_var.length == 1 && Array === (tmp = internal_var[0]) ? tmp : internal_var); ... } */
9699 m->nd_next = node_assign(p, (yyvsp[-4].val), NEW_FOR_MASGN(internal_var, &(yylsp[-4])), NO_LEX_CTXT, &(yylsp[-4]));
9700 break;
9701 default: /* e.each {|*internal_var| @a, B, c[1], d.attr = internal_val; ... } */
9702 m->nd_next = node_assign(p, NEW_MASGN(NEW_LIST((yyvsp[-4].val), &(yylsp[-4])), 0, &(yylsp[-4])), internal_var, NO_LEX_CTXT, &(yylsp[-4]));
9703 }
9704 /* {|*internal_id| <m> = internal_id; ... } */
9705 args = new_args(p, m, 0, id, 0, new_args_tail(p, 0, 0, 0, &(yylsp[-4])), &(yylsp[-4]));
9706 scope = NEW_NODE(NODE_SCOPE, tbl, (yyvsp[-1].val), args, &(yyloc));
9707 (yyval.val) = NEW_FOR((yyvsp[-2].val), scope, &(yyloc));
9708 fixpos((yyval.val), (yyvsp[-4].val));
9709#endif
9710 {VALUE v1,v2,v3,v4;v1=(yyvsp[-4].val);v2=(yyvsp[-2].val);v3=(yyvsp[-1].val);v4=dispatch3(for,v1,v2,v3);(yyval.val)=v4;}
9711 }
9712#line 9708 "ripper.c"
9713 break;
9714
9715 case 351: /* $@23: %empty */
9716#line 3132 "ripper.y"
9717 {
9718 if (p->ctxt.in_def) {
9719 YYLTYPE loc = code_loc_gen(&(yylsp[-2]), &(yylsp[-1]));
9720 yyerror1(&loc, "class definition in method body");
9721 }
9722 p->ctxt.in_class = 1;
9723 local_push(p, 0);
9724 }
9725#line 9721 "ripper.c"
9726 break;
9727
9728 case 352: /* primary: k_class cpath superclass $@23 bodystmt k_end */
9729#line 3142 "ripper.y"
9730 {
9731#if 0
9732 (yyval.val) = NEW_CLASS((yyvsp[-4].val), (yyvsp[-1].val), (yyvsp[-3].val), &(yyloc));
9733 nd_set_line((yyval.val)->nd_body, (yylsp[0]).end_pos.lineno);
9734 set_line_body((yyvsp[-1].val), (yylsp[-3]).end_pos.lineno);
9735 nd_set_line((yyval.val), (yylsp[-3]).end_pos.lineno);
9736#endif
9737 {VALUE v1,v2,v3,v4;v1=(yyvsp[-4].val);v2=(yyvsp[-3].val);v3=(yyvsp[-1].val);v4=dispatch3(class,v1,v2,v3);(yyval.val)=v4;}
9738 local_pop(p);
9739 p->ctxt.in_class = (yyvsp[-5].ctxt).in_class;
9740 p->ctxt.shareable_constant_value = (yyvsp[-5].ctxt).shareable_constant_value;
9741 }
9742#line 9738 "ripper.c"
9743 break;
9744
9745 case 353: /* $@24: %empty */
9746#line 3155 "ripper.y"
9747 {
9748 p->ctxt.in_def = 0;
9749 p->ctxt.in_class = 0;
9750 local_push(p, 0);
9751 }
9752#line 9748 "ripper.c"
9753 break;
9754
9755 case 354: /* primary: k_class "<<" expr $@24 term bodystmt k_end */
9756#line 3163 "ripper.y"
9757 {
9758#if 0
9759 (yyval.val) = NEW_SCLASS((yyvsp[-4].val), (yyvsp[-1].val), &(yyloc));
9760 nd_set_line((yyval.val)->nd_body, (yylsp[0]).end_pos.lineno);
9761 set_line_body((yyvsp[-1].val), nd_line((yyvsp[-4].val)));
9762 fixpos((yyval.val), (yyvsp[-4].val));
9763#endif
9764 {VALUE v1,v2,v3;v1=(yyvsp[-4].val);v2=(yyvsp[-1].val);v3=dispatch2(sclass,v1,v2);(yyval.val)=v3;}
9765 local_pop(p);
9766 p->ctxt.in_def = (yyvsp[-6].ctxt).in_def;
9767 p->ctxt.in_class = (yyvsp[-6].ctxt).in_class;
9768 p->ctxt.shareable_constant_value = (yyvsp[-6].ctxt).shareable_constant_value;
9769 }
9770#line 9766 "ripper.c"
9771 break;
9772
9773 case 355: /* $@25: %empty */
9774#line 3177 "ripper.y"
9775 {
9776 if (p->ctxt.in_def) {
9777 YYLTYPE loc = code_loc_gen(&(yylsp[-1]), &(yylsp[0]));
9778 yyerror1(&loc, "module definition in method body");
9779 }
9780 p->ctxt.in_class = 1;
9781 local_push(p, 0);
9782 }
9783#line 9779 "ripper.c"
9784 break;
9785
9786 case 356: /* primary: k_module cpath $@25 bodystmt k_end */
9787#line 3187 "ripper.y"
9788 {
9789#if 0
9790 (yyval.val) = NEW_MODULE((yyvsp[-3].val), (yyvsp[-1].val), &(yyloc));
9791 nd_set_line((yyval.val)->nd_body, (yylsp[0]).end_pos.lineno);
9792 set_line_body((yyvsp[-1].val), (yylsp[-3]).end_pos.lineno);
9793 nd_set_line((yyval.val), (yylsp[-3]).end_pos.lineno);
9794#endif
9795 {VALUE v1,v2,v3;v1=(yyvsp[-3].val);v2=(yyvsp[-1].val);v3=dispatch2(module,v1,v2);(yyval.val)=v3;}
9796 local_pop(p);
9797 p->ctxt.in_class = (yyvsp[-4].ctxt).in_class;
9798 p->ctxt.shareable_constant_value = (yyvsp[-4].ctxt).shareable_constant_value;
9799 }
9800#line 9796 "ripper.c"
9801 break;
9802
9803 case 357: /* primary: defn_head f_arglist bodystmt k_end */
9804#line 3203 "ripper.y"
9805 {
9806 restore_defun(p, (yyvsp[-3].node)->nd_defn);
9807#if 0
9808 (yyval.val) = set_defun_body(p, (yyvsp[-3].val), (yyvsp[-2].val), (yyvsp[-1].val), &(yyloc));
9809#endif
9810 {VALUE v1,v2,v3,v4;v1=get_value((yyvsp[-3].val));v2=(yyvsp[-2].val);v3=(yyvsp[-1].val);v4=dispatch3(def,v1,v2,v3);(yyval.val)=v4;}
9811 local_pop(p);
9812 }
9813#line 9809 "ripper.c"
9814 break;
9815
9816 case 358: /* primary: defs_head f_arglist bodystmt k_end */
9817#line 3215 "ripper.y"
9818 {
9819 restore_defun(p, (yyvsp[-3].node)->nd_defn);
9820#if 0
9821 (yyval.val) = set_defun_body(p, (yyvsp[-3].val), (yyvsp[-2].val), (yyvsp[-1].val), &(yyloc));
9822#endif
9823 (yyvsp[-3].val) = get_value((yyvsp[-3].val));
9824
9825 {VALUE v1,v2,v3,v4,v5,v6;v1=AREF((yyvsp[-3].val), 0);v2=AREF((yyvsp[-3].val), 1);v3=AREF((yyvsp[-3].val), 2);v4=(yyvsp[-2].val);v5=(yyvsp[-1].val);v6=dispatch5(defs,v1,v2,v3,v4,v5);(yyval.val)=v6;}
9826 local_pop(p);
9827 }
9828#line 9824 "ripper.c"
9829 break;
9830
9831 case 359: /* primary: "`break'" */
9832#line 3226 "ripper.y"
9833 {
9834#if 0
9835 (yyval.val) = NEW_BREAK(0, &(yyloc));
9836#endif
9837 {VALUE v1,v2,v3;v1=dispatch0(args_new);v2=v1;v3=dispatch1(break,v2);(yyval.val)=v3;}
9838 }
9839#line 9835 "ripper.c"
9840 break;
9841
9842 case 360: /* primary: "`next'" */
9843#line 3233 "ripper.y"
9844 {
9845#if 0
9846 (yyval.val) = NEW_NEXT(0, &(yyloc));
9847#endif
9848 {VALUE v1,v2,v3;v1=dispatch0(args_new);v2=v1;v3=dispatch1(next,v2);(yyval.val)=v3;}
9849 }
9850#line 9846 "ripper.c"
9851 break;
9852
9853 case 361: /* primary: "`redo'" */
9854#line 3240 "ripper.y"
9855 {
9856#if 0
9857 (yyval.val) = NEW_REDO(&(yyloc));
9858#endif
9859 {VALUE v1;v1=dispatch0(redo);(yyval.val)=v1;}
9860 }
9861#line 9857 "ripper.c"
9862 break;
9863
9864 case 362: /* primary: "`retry'" */
9865#line 3247 "ripper.y"
9866 {
9867#if 0
9868 (yyval.val) = NEW_RETRY(&(yyloc));
9869#endif
9870 {VALUE v1;v1=dispatch0(retry);(yyval.val)=v1;}
9871 }
9872#line 9868 "ripper.c"
9873 break;
9874
9875 case 363: /* primary_value: primary */
9876#line 3256 "ripper.y"
9877 {
9878 value_expr((yyvsp[0].val));
9879 (yyval.val) = (yyvsp[0].val);
9880 }
9881#line 9877 "ripper.c"
9882 break;
9883
9884 case 364: /* k_begin: "`begin'" */
9885#line 3263 "ripper.y"
9886 {
9887 token_info_push(p, "begin", &(yyloc));
9888 }
9889#line 9885 "ripper.c"
9890 break;
9891
9892 case 365: /* k_if: "`if'" */
9893#line 3269 "ripper.y"
9894 {
9895 WARN_EOL("if");
9896 token_info_push(p, "if", &(yyloc));
9897 if (p->token_info && p->token_info->nonspc &&
9898 p->token_info->next && !strcmp(p->token_info->next->token, "else")) {
9899 const char *tok = p->lex.ptok;
9900 const char *beg = p->lex.pbeg + p->token_info->next->beg.column;
9901 beg += rb_strlen_lit("else");
9902 while (beg < tok && ISSPACE(*beg)) beg++;
9903 if (beg == tok) {
9904 p->token_info->nonspc = 0;
9905 }
9906 }
9907 }
9908#line 9904 "ripper.c"
9909 break;
9910
9911 case 366: /* k_unless: "`unless'" */
9912#line 3286 "ripper.y"
9913 {
9914 token_info_push(p, "unless", &(yyloc));
9915 }
9916#line 9912 "ripper.c"
9917 break;
9918
9919 case 367: /* k_while: "`while'" */
9920#line 3292 "ripper.y"
9921 {
9922 token_info_push(p, "while", &(yyloc));
9923 }
9924#line 9920 "ripper.c"
9925 break;
9926
9927 case 368: /* k_until: "`until'" */
9928#line 3298 "ripper.y"
9929 {
9930 token_info_push(p, "until", &(yyloc));
9931 }
9932#line 9928 "ripper.c"
9933 break;
9934
9935 case 369: /* k_case: "`case'" */
9936#line 3304 "ripper.y"
9937 {
9938 token_info_push(p, "case", &(yyloc));
9939 }
9940#line 9936 "ripper.c"
9941 break;
9942
9943 case 370: /* k_for: "`for'" */
9944#line 3310 "ripper.y"
9945 {
9946 token_info_push(p, "for", &(yyloc));
9947 }
9948#line 9944 "ripper.c"
9949 break;
9950
9951 case 371: /* k_class: "`class'" */
9952#line 3316 "ripper.y"
9953 {
9954 token_info_push(p, "class", &(yyloc));
9955 (yyval.ctxt) = p->ctxt;
9956 }
9957#line 9953 "ripper.c"
9958 break;
9959
9960 case 372: /* k_module: "`module'" */
9961#line 3323 "ripper.y"
9962 {
9963 token_info_push(p, "module", &(yyloc));
9964 (yyval.ctxt) = p->ctxt;
9965 }
9966#line 9962 "ripper.c"
9967 break;
9968
9969 case 373: /* k_def: "`def'" */
9970#line 3330 "ripper.y"
9971 {
9972 token_info_push(p, "def", &(yyloc));
9973 }
9974#line 9970 "ripper.c"
9975 break;
9976
9977 case 374: /* k_do: "`do'" */
9978#line 3336 "ripper.y"
9979 {
9980 token_info_push(p, "do", &(yyloc));
9981 }
9982#line 9978 "ripper.c"
9983 break;
9984
9985 case 375: /* k_do_block: "`do' for block" */
9986#line 3342 "ripper.y"
9987 {
9988 token_info_push(p, "do", &(yyloc));
9989 }
9990#line 9986 "ripper.c"
9991 break;
9992
9993 case 376: /* k_rescue: "`rescue'" */
9994#line 3348 "ripper.y"
9995 {
9996 token_info_warn(p, "rescue", p->token_info, 1, &(yyloc));
9997 }
9998#line 9994 "ripper.c"
9999 break;
10000
10001 case 377: /* k_ensure: "`ensure'" */
10002#line 3354 "ripper.y"
10003 {
10004 token_info_warn(p, "ensure", p->token_info, 1, &(yyloc));
10005 }
10006#line 10002 "ripper.c"
10007 break;
10008
10009 case 378: /* k_when: "`when'" */
10010#line 3360 "ripper.y"
10011 {
10012 token_info_warn(p, "when", p->token_info, 0, &(yyloc));
10013 }
10014#line 10010 "ripper.c"
10015 break;
10016
10017 case 379: /* k_else: "`else'" */
10018#line 3366 "ripper.y"
10019 {
10020 token_info *ptinfo_beg = p->token_info;
10021 int same = ptinfo_beg && strcmp(ptinfo_beg->token, "case") != 0;
10022 token_info_warn(p, "else", p->token_info, same, &(yyloc));
10023 if (same) {
10024 token_info e;
10025 e.next = ptinfo_beg->next;
10026 e.token = "else";
10027 token_info_setup(&e, p->lex.pbeg, &(yyloc));
10028 if (!e.nonspc) *ptinfo_beg = e;
10029 }
10030 }
10031#line 10027 "ripper.c"
10032 break;
10033
10034 case 380: /* k_elsif: "`elsif'" */
10035#line 3381 "ripper.y"
10036 {
10037 WARN_EOL("elsif");
10038 token_info_warn(p, "elsif", p->token_info, 1, &(yyloc));
10039 }
10040#line 10036 "ripper.c"
10041 break;
10042
10043 case 381: /* k_end: "`end'" */
10044#line 3388 "ripper.y"
10045 {
10046 token_info_pop(p, "end", &(yyloc));
10047 }
10048#line 10044 "ripper.c"
10049 break;
10050
10051 case 382: /* k_return: "`return'" */
10052#line 3394 "ripper.y"
10053 {
10054 if (p->ctxt.in_class && !p->ctxt.in_def && !dyna_in_block(p))
10055 yyerror1(&(yylsp[0]), "Invalid return in class/module body");
10056 }
10057#line 10053 "ripper.c"
10058 break;
10059
10060 case 389: /* if_tail: k_elsif expr_value then compstmt if_tail */
10061#line 3413 "ripper.y"
10062 {
10063#if 0
10064 (yyval.val) = new_if(p, (yyvsp[-3].val), (yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
10065 fixpos((yyval.val), (yyvsp[-3].val));
10066#endif
10067 {VALUE v1,v2,v3,v4;v1=(yyvsp[-3].val);v2=(yyvsp[-1].val);v3=escape_Qundef((yyvsp[0].val));v4=dispatch3(elsif,v1,v2,v3);(yyval.val)=v4;}
10068 }
10069#line 10065 "ripper.c"
10070 break;
10071
10072 case 391: /* opt_else: k_else compstmt */
10073#line 3424 "ripper.y"
10074 {
10075#if 0
10076 (yyval.val) = (yyvsp[0].val);
10077#endif
10078 {VALUE v1,v2;v1=(yyvsp[0].val);v2=dispatch1(else,v1);(yyval.val)=v2;}
10079 }
10080#line 10076 "ripper.c"
10081 break;
10082
10083 case 394: /* f_marg: f_norm_arg */
10084#line 3437 "ripper.y"
10085 {
10086#if 0
10087 (yyval.val) = assignable(p, (yyvsp[0].val), 0, &(yyloc));
10088 mark_lvar_used(p, (yyval.val));
10089#endif
10090 (yyval.val)=assignable(p, (yyvsp[0].val));
10091 }
10092#line 10088 "ripper.c"
10093 break;
10094
10095 case 395: /* f_marg: "(" f_margs rparen */
10096#line 3445 "ripper.y"
10097 {
10098#if 0
10099 (yyval.val) = (yyvsp[-1].val);
10100#endif
10101 {VALUE v1,v2;v1=(yyvsp[-1].val);v2=dispatch1(mlhs_paren,v1);(yyval.val)=v2;}
10102 }
10103#line 10099 "ripper.c"
10104 break;
10105
10106 case 396: /* f_marg_list: f_marg */
10107#line 3454 "ripper.y"
10108 {
10109#if 0
10110 (yyval.val) = NEW_LIST((yyvsp[0].val), &(yyloc));
10111#endif
10112 {VALUE v1,v2,v3,v4;v1=dispatch0(mlhs_new);v2=v1;v3=(yyvsp[0].val);v4=dispatch2(mlhs_add,v2,v3);(yyval.val)=v4;}
10113 }
10114#line 10110 "ripper.c"
10115 break;
10116
10117 case 397: /* f_marg_list: f_marg_list ',' f_marg */
10118#line 3461 "ripper.y"
10119 {
10120#if 0
10121 (yyval.val) = list_append(p, (yyvsp[-2].val), (yyvsp[0].val));
10122#endif
10123 {VALUE v1,v2,v3;v1=(yyvsp[-2].val);v2=(yyvsp[0].val);v3=dispatch2(mlhs_add,v1,v2);(yyval.val)=v3;}
10124 }
10125#line 10121 "ripper.c"
10126 break;
10127
10128 case 398: /* f_margs: f_marg_list */
10129#line 3470 "ripper.y"
10130 {
10131#if 0
10132 (yyval.val) = NEW_MASGN((yyvsp[0].val), 0, &(yyloc));
10133#endif
10134 (yyval.val)=(yyvsp[0].val);
10135 }
10136#line 10132 "ripper.c"
10137 break;
10138
10139 case 399: /* f_margs: f_marg_list ',' f_rest_marg */
10140#line 3477 "ripper.y"
10141 {
10142#if 0
10143 (yyval.val) = NEW_MASGN((yyvsp[-2].val), (yyvsp[0].val), &(yyloc));
10144#endif
10145 {VALUE v1,v2,v3;v1=(yyvsp[-2].val);v2=(yyvsp[0].val);v3=dispatch2(mlhs_add_star,v1,v2);(yyval.val)=v3;}
10146 }
10147#line 10143 "ripper.c"
10148 break;
10149
10150 case 400: /* f_margs: f_marg_list ',' f_rest_marg ',' f_marg_list */
10151#line 3484 "ripper.y"
10152 {
10153#if 0
10154 (yyval.val) = NEW_MASGN((yyvsp[-4].val), NEW_POSTARG((yyvsp[-2].val), (yyvsp[0].val), &(yyloc)), &(yyloc));
10155#endif
10156 {VALUE v1,v2,v3,v4,v5,v6;v1=(yyvsp[-4].val);v2=(yyvsp[-2].val);v3=dispatch2(mlhs_add_star,v1,v2);v4=v3;v5=(yyvsp[0].val);v6=dispatch2(mlhs_add_post,v4,v5);(yyval.val)=v6;}
10157 }
10158#line 10154 "ripper.c"
10159 break;
10160
10161 case 401: /* f_margs: f_rest_marg */
10162#line 3491 "ripper.y"
10163 {
10164#if 0
10165 (yyval.val) = NEW_MASGN(0, (yyvsp[0].val), &(yyloc));
10166#endif
10167 {VALUE v1,v2,v3,v4;v1=dispatch0(mlhs_new);v2=v1;v3=(yyvsp[0].val);v4=dispatch2(mlhs_add_star,v2,v3);(yyval.val)=v4;}
10168 }
10169#line 10165 "ripper.c"
10170 break;
10171
10172 case 402: /* f_margs: f_rest_marg ',' f_marg_list */
10173#line 3498 "ripper.y"
10174 {
10175#if 0
10176 (yyval.val) = NEW_MASGN(0, NEW_POSTARG((yyvsp[-2].val), (yyvsp[0].val), &(yyloc)), &(yyloc));
10177#endif
10178 {VALUE v1,v2,v3,v4,v5,v6,v7;v1=dispatch0(mlhs_new);v2=v1;v3=(yyvsp[-2].val);v4=dispatch2(mlhs_add_star,v2,v3);v5=v4;v6=(yyvsp[0].val);v7=dispatch2(mlhs_add_post,v5,v6);(yyval.val)=v7;}
10179 }
10180#line 10176 "ripper.c"
10181 break;
10182
10183 case 403: /* f_rest_marg: "*" f_norm_arg */
10184#line 3507 "ripper.y"
10185 {
10186#if 0
10187 (yyval.val) = assignable(p, (yyvsp[0].val), 0, &(yyloc));
10188 mark_lvar_used(p, (yyval.val));
10189#endif
10190 (yyval.val)=assignable(p, (yyvsp[0].val));
10191 }
10192#line 10188 "ripper.c"
10193 break;
10194
10195 case 404: /* f_rest_marg: "*" */
10196#line 3515 "ripper.y"
10197 {
10198#if 0
10200#endif
10201 (yyval.val)=Qnil;
10202 }
10203#line 10199 "ripper.c"
10204 break;
10205
10206 case 406: /* f_any_kwrest: f_no_kwarg */
10207#line 3524 "ripper.y"
10208 {(yyval.val) = ID2VAL(idNil);}
10209#line 10205 "ripper.c"
10210 break;
10211
10212 case 407: /* block_args_tail: f_block_kwarg ',' f_kwrest opt_f_block_arg */
10213#line 3528 "ripper.y"
10214 {
10215 (yyval.val) = new_args_tail(p, (yyvsp[-3].val), (yyvsp[-1].val), (yyvsp[0].val), &(yylsp[-1]));
10216 }
10217#line 10213 "ripper.c"
10218 break;
10219
10220 case 408: /* block_args_tail: f_block_kwarg opt_f_block_arg */
10221#line 3532 "ripper.y"
10222 {
10223 (yyval.val) = new_args_tail(p, (yyvsp[-1].val), Qnone, (yyvsp[0].val), &(yylsp[-1]));
10224 }
10225#line 10221 "ripper.c"
10226 break;
10227
10228 case 409: /* block_args_tail: f_any_kwrest opt_f_block_arg */
10229#line 3536 "ripper.y"
10230 {
10231 (yyval.val) = new_args_tail(p, Qnone, (yyvsp[-1].val), (yyvsp[0].val), &(yylsp[-1]));
10232 }
10233#line 10229 "ripper.c"
10234 break;
10235
10236 case 410: /* block_args_tail: f_block_arg */
10237#line 3540 "ripper.y"
10238 {
10239 (yyval.val) = new_args_tail(p, Qnone, Qnone, (yyvsp[0].val), &(yylsp[0]));
10240 }
10241#line 10237 "ripper.c"
10242 break;
10243
10244 case 411: /* opt_block_args_tail: ',' block_args_tail */
10245#line 3546 "ripper.y"
10246 {
10247 (yyval.val) = (yyvsp[0].val);
10248 }
10249#line 10245 "ripper.c"
10250 break;
10251
10252 case 412: /* opt_block_args_tail: %empty */
10253#line 3550 "ripper.y"
10254 {
10255 (yyval.val) = new_args_tail(p, Qnone, Qnone, Qnone, &(yylsp[0]));
10256 }
10257#line 10253 "ripper.c"
10258 break;
10259
10260 case 413: /* excessed_comma: ',' */
10261#line 3556 "ripper.y"
10262 {
10263 /* magic number for rest_id in iseq_set_arguments() */
10264#if 0
10266#endif
10267 {VALUE v1;v1=dispatch0(excessed_comma);(yyval.val)=v1;}
10268 }
10269#line 10265 "ripper.c"
10270 break;
10271
10272 case 414: /* block_param: f_arg ',' f_block_optarg ',' f_rest_arg opt_block_args_tail */
10273#line 3566 "ripper.y"
10274 {
10275 (yyval.val) = new_args(p, (yyvsp[-5].val), (yyvsp[-3].val), (yyvsp[-1].val), Qnone, (yyvsp[0].val), &(yyloc));
10276 }
10277#line 10273 "ripper.c"
10278 break;
10279
10280 case 415: /* block_param: f_arg ',' f_block_optarg ',' f_rest_arg ',' f_arg opt_block_args_tail */
10281#line 3570 "ripper.y"
10282 {
10283 (yyval.val) = new_args(p, (yyvsp[-7].val), (yyvsp[-5].val), (yyvsp[-3].val), (yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
10284 }
10285#line 10281 "ripper.c"
10286 break;
10287
10288 case 416: /* block_param: f_arg ',' f_block_optarg opt_block_args_tail */
10289#line 3574 "ripper.y"
10290 {
10291 (yyval.val) = new_args(p, (yyvsp[-3].val), (yyvsp[-1].val), Qnone, Qnone, (yyvsp[0].val), &(yyloc));
10292 }
10293#line 10289 "ripper.c"
10294 break;
10295
10296 case 417: /* block_param: f_arg ',' f_block_optarg ',' f_arg opt_block_args_tail */
10297#line 3578 "ripper.y"
10298 {
10299 (yyval.val) = new_args(p, (yyvsp[-5].val), (yyvsp[-3].val), Qnone, (yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
10300 }
10301#line 10297 "ripper.c"
10302 break;
10303
10304 case 418: /* block_param: f_arg ',' f_rest_arg opt_block_args_tail */
10305#line 3582 "ripper.y"
10306 {
10307 (yyval.val) = new_args(p, (yyvsp[-3].val), Qnone, (yyvsp[-1].val), Qnone, (yyvsp[0].val), &(yyloc));
10308 }
10309#line 10305 "ripper.c"
10310 break;
10311
10312 case 419: /* block_param: f_arg excessed_comma */
10313#line 3586 "ripper.y"
10314 {
10315 (yyval.val) = new_args_tail(p, Qnone, Qnone, Qnone, &(yylsp[0]));
10316 (yyval.val) = new_args(p, (yyvsp[-1].val), Qnone, (yyvsp[0].val), Qnone, (yyval.val), &(yyloc));
10317 }
10318#line 10314 "ripper.c"
10319 break;
10320
10321 case 420: /* block_param: f_arg ',' f_rest_arg ',' f_arg opt_block_args_tail */
10322#line 3591 "ripper.y"
10323 {
10324 (yyval.val) = new_args(p, (yyvsp[-5].val), Qnone, (yyvsp[-3].val), (yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
10325 }
10326#line 10322 "ripper.c"
10327 break;
10328
10329 case 421: /* block_param: f_arg opt_block_args_tail */
10330#line 3595 "ripper.y"
10331 {
10332 (yyval.val) = new_args(p, (yyvsp[-1].val), Qnone, Qnone, Qnone, (yyvsp[0].val), &(yyloc));
10333 }
10334#line 10330 "ripper.c"
10335 break;
10336
10337 case 422: /* block_param: f_block_optarg ',' f_rest_arg opt_block_args_tail */
10338#line 3599 "ripper.y"
10339 {
10340 (yyval.val) = new_args(p, Qnone, (yyvsp[-3].val), (yyvsp[-1].val), Qnone, (yyvsp[0].val), &(yyloc));
10341 }
10342#line 10338 "ripper.c"
10343 break;
10344
10345 case 423: /* block_param: f_block_optarg ',' f_rest_arg ',' f_arg opt_block_args_tail */
10346#line 3603 "ripper.y"
10347 {
10348 (yyval.val) = new_args(p, Qnone, (yyvsp[-5].val), (yyvsp[-3].val), (yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
10349 }
10350#line 10346 "ripper.c"
10351 break;
10352
10353 case 424: /* block_param: f_block_optarg opt_block_args_tail */
10354#line 3607 "ripper.y"
10355 {
10356 (yyval.val) = new_args(p, Qnone, (yyvsp[-1].val), Qnone, Qnone, (yyvsp[0].val), &(yyloc));
10357 }
10358#line 10354 "ripper.c"
10359 break;
10360
10361 case 425: /* block_param: f_block_optarg ',' f_arg opt_block_args_tail */
10362#line 3611 "ripper.y"
10363 {
10364 (yyval.val) = new_args(p, Qnone, (yyvsp[-3].val), Qnone, (yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
10365 }
10366#line 10362 "ripper.c"
10367 break;
10368
10369 case 426: /* block_param: f_rest_arg opt_block_args_tail */
10370#line 3615 "ripper.y"
10371 {
10372 (yyval.val) = new_args(p, Qnone, Qnone, (yyvsp[-1].val), Qnone, (yyvsp[0].val), &(yyloc));
10373 }
10374#line 10370 "ripper.c"
10375 break;
10376
10377 case 427: /* block_param: f_rest_arg ',' f_arg opt_block_args_tail */
10378#line 3619 "ripper.y"
10379 {
10380 (yyval.val) = new_args(p, Qnone, Qnone, (yyvsp[-3].val), (yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
10381 }
10382#line 10378 "ripper.c"
10383 break;
10384
10385 case 428: /* block_param: block_args_tail */
10386#line 3623 "ripper.y"
10387 {
10388 (yyval.val) = new_args(p, Qnone, Qnone, Qnone, Qnone, (yyvsp[0].val), &(yyloc));
10389 }
10390#line 10386 "ripper.c"
10391 break;
10392
10393 case 430: /* opt_block_param: block_param_def */
10394#line 3630 "ripper.y"
10395 {
10396 p->command_start = TRUE;
10397 }
10398#line 10394 "ripper.c"
10399 break;
10400
10401 case 431: /* block_param_def: '|' opt_bv_decl '|' */
10402#line 3636 "ripper.y"
10403 {
10404 p->cur_arg = 0;
10406#if 0
10407 (yyval.val) = 0;
10408#endif
10409 {VALUE v1,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11;v1=Qnil;v2=Qnil;v3=Qnil;v4=Qnil;v5=Qnil;v6=Qnil;v7=Qnil;v8=dispatch7(params,v1,v2,v3,v4,v5,v6,v7);v9=v8;v10=escape_Qundef((yyvsp[-1].val));v11=dispatch2(block_var,v9,v10);(yyval.val)=v11;}
10410 }
10411#line 10407 "ripper.c"
10412 break;
10413
10414 case 432: /* block_param_def: '|' block_param opt_bv_decl '|' */
10415#line 3645 "ripper.y"
10416 {
10417 p->cur_arg = 0;
10419#if 0
10420 (yyval.val) = (yyvsp[-2].val);
10421#endif
10422 {VALUE v1,v2,v3;v1=escape_Qundef((yyvsp[-2].val));v2=escape_Qundef((yyvsp[-1].val));v3=dispatch2(block_var,v1,v2);(yyval.val)=v3;}
10423 }
10424#line 10420 "ripper.c"
10425 break;
10426
10427 case 433: /* opt_bv_decl: opt_nl */
10428#line 3657 "ripper.y"
10429 {
10430 (yyval.val) = 0;
10431 }
10432#line 10428 "ripper.c"
10433 break;
10434
10435 case 434: /* opt_bv_decl: opt_nl ';' bv_decls opt_nl */
10436#line 3661 "ripper.y"
10437 {
10438#if 0
10439 (yyval.val) = 0;
10440#endif
10441 (yyval.val)=(yyvsp[-1].val);
10442 }
10443#line 10439 "ripper.c"
10444 break;
10445
10446 case 435: /* bv_decls: bvar */
10447#line 3670 "ripper.y"
10448 {(yyval.val)=rb_ary_new3(1, get_value((yyvsp[0].val)));}
10449#line 10445 "ripper.c"
10450 break;
10451
10452 case 436: /* bv_decls: bv_decls ',' bvar */
10453#line 3672 "ripper.y"
10454 {(yyval.val)=rb_ary_push((yyvsp[-2].val), get_value((yyvsp[0].val)));}
10455#line 10451 "ripper.c"
10456 break;
10457
10458 case 437: /* bvar: "local variable or method" */
10459#line 3676 "ripper.y"
10460 {
10461 new_bv(p, get_id((yyvsp[0].val)));
10462 (yyval.val)=get_value((yyvsp[0].val));
10463 }
10464#line 10460 "ripper.c"
10465 break;
10466
10467 case 438: /* bvar: f_bad_arg */
10468#line 3681 "ripper.y"
10469 {
10470 (yyval.val) = 0;
10471 }
10472#line 10468 "ripper.c"
10473 break;
10474
10475 case 439: /* @26: %empty */
10476#line 3687 "ripper.y"
10477 {
10478 token_info_push(p, "->", &(yylsp[0]));
10479 (yyvsp[0].vars) = dyna_push(p);
10480 (yyval.num) = p->lex.lpar_beg;
10481 p->lex.lpar_beg = p->lex.paren_nest;
10482 }
10483#line 10479 "ripper.c"
10484 break;
10485
10486 case 440: /* @27: %empty */
10487#line 3693 "ripper.y"
10488 {
10489 (yyval.num) = p->max_numparam;
10490 p->max_numparam = 0;
10491 }
10492#line 10488 "ripper.c"
10493 break;
10494
10495 case 441: /* @28: %empty */
10496#line 3697 "ripper.y"
10497 {
10498 (yyval.node) = numparam_push(p);
10499 }
10500#line 10496 "ripper.c"
10501 break;
10502
10503 case 442: /* $@29: %empty */
10504#line 3701 "ripper.y"
10505 {
10506 CMDARG_PUSH(0);
10507 }
10508#line 10504 "ripper.c"
10509 break;
10510
10511 case 443: /* lambda: "->" @26 @27 @28 f_larglist $@29 lambda_body */
10512#line 3705 "ripper.y"
10513 {
10514 int max_numparam = p->max_numparam;
10515 p->lex.lpar_beg = (yyvsp[-5].num);
10516 p->max_numparam = (yyvsp[-4].num);
10517 CMDARG_POP();
10518 (yyvsp[-2].val) = args_with_numbered(p, (yyvsp[-2].val), max_numparam);
10519#if 0
10520 {
10521 YYLTYPE loc = code_loc_gen(&(yylsp[-2]), &(yylsp[0]));
10522 (yyval.val) = NEW_LAMBDA((yyvsp[-2].val), (yyvsp[0].val), &loc);
10523 nd_set_line((yyval.val)->nd_body, (yylsp[0]).end_pos.lineno);
10524 nd_set_line((yyval.val), (yylsp[-2]).end_pos.lineno);
10525 nd_set_first_loc((yyval.val), (yylsp[-6]).beg_pos);
10526 }
10527#endif
10528 {VALUE v1,v2,v3;v1=(yyvsp[-2].val);v2=(yyvsp[0].val);v3=dispatch2(lambda,v1,v2);(yyval.val)=v3;}
10529 numparam_pop(p, (yyvsp[-3].node));
10530 dyna_pop(p, (yyvsp[-6].vars));
10531 }
10532#line 10528 "ripper.c"
10533 break;
10534
10535 case 444: /* f_larglist: '(' f_args opt_bv_decl ')' */
10536#line 3727 "ripper.y"
10537 {
10538#if 0
10539 (yyval.val) = (yyvsp[-2].val);
10541#endif
10542 {VALUE v1,v2;v1=(yyvsp[-2].val);v2=dispatch1(paren,v1);(yyval.val)=v2;}
10543 }
10544#line 10540 "ripper.c"
10545 break;
10546
10547 case 445: /* f_larglist: f_args */
10548#line 3735 "ripper.y"
10549 {
10550#if 0
10551 if (!args_info_empty_p((yyvsp[0].val)->nd_ainfo))
10553#endif
10554 (yyval.val) = (yyvsp[0].val);
10555 }
10556#line 10552 "ripper.c"
10557 break;
10558
10559 case 446: /* lambda_body: tLAMBEG compstmt '}' */
10560#line 3745 "ripper.y"
10561 {
10562 token_info_pop(p, "}", &(yylsp[0]));
10563 (yyval.val) = (yyvsp[-1].val);
10564 }
10565#line 10561 "ripper.c"
10566 break;
10567
10568 case 447: /* lambda_body: "`do' for lambda" bodystmt k_end */
10569#line 3750 "ripper.y"
10570 {
10571 (yyval.val) = (yyvsp[-1].val);
10572 }
10573#line 10569 "ripper.c"
10574 break;
10575
10576 case 448: /* do_block: k_do_block do_body k_end */
10577#line 3756 "ripper.y"
10578 {
10579 (yyval.val) = (yyvsp[-1].val);
10580#if 0
10581 (yyval.val)->nd_body->nd_loc = code_loc_gen(&(yylsp[-2]), &(yylsp[0]));
10582 nd_set_line((yyval.val), (yylsp[-2]).end_pos.lineno);
10583#endif
10584 }
10585#line 10581 "ripper.c"
10586 break;
10587
10588 case 449: /* block_call: command do_block */
10589#line 3766 "ripper.y"
10590 {
10591#if 0
10592 if (nd_type((yyvsp[-1].val)) == NODE_YIELD) {
10593 compile_error(p, "block given to yield");
10594 }
10595 else {
10596 block_dup_check(p, (yyvsp[-1].val)->nd_args, (yyvsp[0].val));
10597 }
10598 (yyval.val) = method_add_block(p, (yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
10599 fixpos((yyval.val), (yyvsp[-1].val));
10600#endif
10601 {VALUE v1,v2,v3;v1=(yyvsp[-1].val);v2=(yyvsp[0].val);v3=dispatch2(method_add_block,v1,v2);(yyval.val)=v3;}
10602 }
10603#line 10599 "ripper.c"
10604 break;
10605
10606 case 450: /* block_call: block_call call_op2 operation2 opt_paren_args */
10607#line 3780 "ripper.y"
10608 {
10609#if 0
10610 (yyval.val) = new_qcall(p, (yyvsp[-2].val), (yyvsp[-3].val), (yyvsp[-1].val), (yyvsp[0].val), &(yylsp[-1]), &(yyloc));
10611#endif
10612 {VALUE v1,v2,v3,v4,v5,v6,v7;v1=(yyvsp[-3].val);v2=(yyvsp[-2].val);v3=(yyvsp[-1].val);v4=dispatch3(call,v1,v2,v3);v5=v4;v6=(yyvsp[0].val);v7=v6==Qundef ? v5 : dispatch2(method_add_arg,v5,v6);(yyval.val)=v7;}
10613 }
10614#line 10610 "ripper.c"
10615 break;
10616
10617 case 451: /* block_call: block_call call_op2 operation2 opt_paren_args brace_block */
10618#line 3787 "ripper.y"
10619 {
10620#if 0
10621 (yyval.val) = new_command_qcall(p, (yyvsp[-3].val), (yyvsp[-4].val), (yyvsp[-2].val), (yyvsp[-1].val), (yyvsp[0].val), &(yylsp[-2]), &(yyloc));
10622#endif
10623 {VALUE v1,v2,v3,v4,v5,v6,v7,v8;v1=(yyvsp[-4].val);v2=(yyvsp[-3].val);v3=(yyvsp[-2].val);v4=(yyvsp[-1].val);v5=dispatch4(command_call,v1,v2,v3,v4);v6=v5;v7=(yyvsp[0].val);v8=v7==Qundef ? v6 : dispatch2(method_add_block,v6,v7);(yyval.val)=v8;}
10624 }
10625#line 10621 "ripper.c"
10626 break;
10627
10628 case 452: /* block_call: block_call call_op2 operation2 command_args do_block */
10629#line 3794 "ripper.y"
10630 {
10631#if 0
10632 (yyval.val) = new_command_qcall(p, (yyvsp[-3].val), (yyvsp[-4].val), (yyvsp[-2].val), (yyvsp[-1].val), (yyvsp[0].val), &(yylsp[-2]), &(yyloc));
10633#endif
10634 {VALUE v1,v2,v3,v4,v5,v6,v7,v8;v1=(yyvsp[-4].val);v2=(yyvsp[-3].val);v3=(yyvsp[-2].val);v4=(yyvsp[-1].val);v5=dispatch4(command_call,v1,v2,v3,v4);v6=v5;v7=(yyvsp[0].val);v8=dispatch2(method_add_block,v6,v7);(yyval.val)=v8;}
10635 }
10636#line 10632 "ripper.c"
10637 break;
10638
10639 case 453: /* method_call: fcall paren_args */
10640#line 3803 "ripper.y"
10641 {
10642#if 0
10643 (yyval.val) = (yyvsp[-1].val);
10644 (yyval.val)->nd_args = (yyvsp[0].val);
10645 nd_set_last_loc((yyvsp[-1].val), (yylsp[0]).end_pos);
10646#endif
10647 {VALUE v1,v2,v3,v4,v5;v1=(yyvsp[-1].val);v2=dispatch1(fcall,v1);v3=v2;v4=(yyvsp[0].val);v5=dispatch2(method_add_arg,v3,v4);(yyval.val)=v5;}
10648 }
10649#line 10645 "ripper.c"
10650 break;
10651
10652 case 454: /* method_call: primary_value call_op operation2 opt_paren_args */
10653#line 3812 "ripper.y"
10654 {
10655#if 0
10656 (yyval.val) = new_qcall(p, (yyvsp[-2].val), (yyvsp[-3].val), (yyvsp[-1].val), (yyvsp[0].val), &(yylsp[-1]), &(yyloc));
10657 nd_set_line((yyval.val), (yylsp[-1]).end_pos.lineno);
10658#endif
10659 {VALUE v1,v2,v3,v4,v5,v6,v7;v1=(yyvsp[-3].val);v2=(yyvsp[-2].val);v3=(yyvsp[-1].val);v4=dispatch3(call,v1,v2,v3);v5=v4;v6=(yyvsp[0].val);v7=v6==Qundef ? v5 : dispatch2(method_add_arg,v5,v6);(yyval.val)=v7;}
10660 }
10661#line 10657 "ripper.c"
10662 break;
10663
10664 case 455: /* method_call: primary_value "::" operation2 paren_args */
10665#line 3820 "ripper.y"
10666 {
10667#if 0
10668 (yyval.val) = new_qcall(p, ID2VAL(idCOLON2), (yyvsp[-3].val), (yyvsp[-1].val), (yyvsp[0].val), &(yylsp[-1]), &(yyloc));
10669 nd_set_line((yyval.val), (yylsp[-1]).end_pos.lineno);
10670#endif
10671 {VALUE v1,v2,v3,v4,v5,v6,v7;v1=(yyvsp[-3].val);v2=ID2VAL(idCOLON2);v3=(yyvsp[-1].val);v4=dispatch3(call,v1,v2,v3);v5=v4;v6=(yyvsp[0].val);v7=dispatch2(method_add_arg,v5,v6);(yyval.val)=v7;}
10672 }
10673#line 10669 "ripper.c"
10674 break;
10675
10676 case 456: /* method_call: primary_value "::" operation3 */
10677#line 3828 "ripper.y"
10678 {
10679#if 0
10680 (yyval.val) = new_qcall(p, ID2VAL(idCOLON2), (yyvsp[-2].val), (yyvsp[0].val), Qnull, &(yylsp[0]), &(yyloc));
10681#endif
10682 {VALUE v1,v2,v3,v4;v1=(yyvsp[-2].val);v2=ID2VAL(idCOLON2);v3=(yyvsp[0].val);v4=dispatch3(call,v1,v2,v3);(yyval.val)=v4;}
10683 }
10684#line 10680 "ripper.c"
10685 break;
10686
10687 case 457: /* method_call: primary_value call_op paren_args */
10688#line 3835 "ripper.y"
10689 {
10690#if 0
10691 (yyval.val) = new_qcall(p, (yyvsp[-1].val), (yyvsp[-2].val), ID2VAL(idCall), (yyvsp[0].val), &(yylsp[-1]), &(yyloc));
10692 nd_set_line((yyval.val), (yylsp[-1]).end_pos.lineno);
10693#endif
10694 {VALUE v1,v2,v3,v4,v5,v6,v7;v1=(yyvsp[-2].val);v2=(yyvsp[-1].val);v3=ID2VAL(idCall);v4=dispatch3(call,v1,v2,v3);v5=v4;v6=(yyvsp[0].val);v7=dispatch2(method_add_arg,v5,v6);(yyval.val)=v7;}
10695 }
10696#line 10692 "ripper.c"
10697 break;
10698
10699 case 458: /* method_call: primary_value "::" paren_args */
10700#line 3843 "ripper.y"
10701 {
10702#if 0
10703 (yyval.val) = new_qcall(p, ID2VAL(idCOLON2), (yyvsp[-2].val), ID2VAL(idCall), (yyvsp[0].val), &(yylsp[-1]), &(yyloc));
10704 nd_set_line((yyval.val), (yylsp[-1]).end_pos.lineno);
10705#endif
10706 {VALUE v1,v2,v3,v4,v5,v6,v7;v1=(yyvsp[-2].val);v2=ID2VAL(idCOLON2);v3=ID2VAL(idCall);v4=dispatch3(call,v1,v2,v3);v5=v4;v6=(yyvsp[0].val);v7=dispatch2(method_add_arg,v5,v6);(yyval.val)=v7;}
10707 }
10708#line 10704 "ripper.c"
10709 break;
10710
10711 case 459: /* method_call: "`super'" paren_args */
10712#line 3851 "ripper.y"
10713 {
10714#if 0
10715 (yyval.val) = NEW_SUPER((yyvsp[0].val), &(yyloc));
10716#endif
10717 {VALUE v1,v2;v1=(yyvsp[0].val);v2=dispatch1(super,v1);(yyval.val)=v2;}
10718 }
10719#line 10715 "ripper.c"
10720 break;
10721
10722 case 460: /* method_call: "`super'" */
10723#line 3858 "ripper.y"
10724 {
10725#if 0
10726 (yyval.val) = NEW_ZSUPER(&(yyloc));
10727#endif
10728 {VALUE v1;v1=dispatch0(zsuper);(yyval.val)=v1;}
10729 }
10730#line 10726 "ripper.c"
10731 break;
10732
10733 case 461: /* method_call: primary_value '[' opt_call_args rbracket */
10734#line 3865 "ripper.y"
10735 {
10736#if 0
10737 if ((yyvsp[-3].val) && nd_type((yyvsp[-3].val)) == NODE_SELF)
10738 (yyval.val) = NEW_FCALL(tAREF, (yyvsp[-1].val), &(yyloc));
10739 else
10740 (yyval.val) = NEW_CALL((yyvsp[-3].val), tAREF, (yyvsp[-1].val), &(yyloc));
10741 fixpos((yyval.val), (yyvsp[-3].val));
10742#endif
10743 {VALUE v1,v2,v3;v1=(yyvsp[-3].val);v2=escape_Qundef((yyvsp[-1].val));v3=dispatch2(aref,v1,v2);(yyval.val)=v3;}
10744 }
10745#line 10741 "ripper.c"
10746 break;
10747
10748 case 462: /* brace_block: '{' brace_body '}' */
10749#line 3878 "ripper.y"
10750 {
10751 (yyval.val) = (yyvsp[-1].val);
10752#if 0
10753 (yyval.val)->nd_body->nd_loc = code_loc_gen(&(yylsp[-2]), &(yylsp[0]));
10754 nd_set_line((yyval.val), (yylsp[-2]).end_pos.lineno);
10755#endif
10756 }
10757#line 10753 "ripper.c"
10758 break;
10759
10760 case 463: /* brace_block: k_do do_body k_end */
10761#line 3886 "ripper.y"
10762 {
10763 (yyval.val) = (yyvsp[-1].val);
10764#if 0
10765 (yyval.val)->nd_body->nd_loc = code_loc_gen(&(yylsp[-2]), &(yylsp[0]));
10766 nd_set_line((yyval.val), (yylsp[-2]).end_pos.lineno);
10767#endif
10768 }
10769#line 10765 "ripper.c"
10770 break;
10771
10772 case 464: /* @30: %empty */
10773#line 3895 "ripper.y"
10774 {(yyval.vars) = dyna_push(p);}
10775#line 10771 "ripper.c"
10776 break;
10777
10778 case 465: /* @31: %empty */
10779#line 3896 "ripper.y"
10780 {
10781 (yyval.num) = p->max_numparam;
10782 p->max_numparam = 0;
10783 }
10784#line 10780 "ripper.c"
10785 break;
10786
10787 case 466: /* @32: %empty */
10788#line 3900 "ripper.y"
10789 {
10790 (yyval.node) = numparam_push(p);
10791 }
10792#line 10788 "ripper.c"
10793 break;
10794
10795 case 467: /* brace_body: @30 @31 @32 opt_block_param compstmt */
10796#line 3904 "ripper.y"
10797 {
10798 int max_numparam = p->max_numparam;
10799 p->max_numparam = (yyvsp[-3].num);
10800 (yyvsp[-1].val) = args_with_numbered(p, (yyvsp[-1].val), max_numparam);
10801#if 0
10802 (yyval.val) = NEW_ITER((yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
10803#endif
10804 {VALUE v1,v2,v3;v1=escape_Qundef((yyvsp[-1].val));v2=(yyvsp[0].val);v3=dispatch2(brace_block,v1,v2);(yyval.val)=v3;}
10805 numparam_pop(p, (yyvsp[-2].node));
10806 dyna_pop(p, (yyvsp[-4].vars));
10807 }
10808#line 10804 "ripper.c"
10809 break;
10810
10811 case 468: /* @33: %empty */
10812#line 3917 "ripper.y"
10813 {(yyval.vars) = dyna_push(p);}
10814#line 10810 "ripper.c"
10815 break;
10816
10817 case 469: /* @34: %empty */
10818#line 3918 "ripper.y"
10819 {
10820 (yyval.num) = p->max_numparam;
10821 p->max_numparam = 0;
10822 }
10823#line 10819 "ripper.c"
10824 break;
10825
10826 case 470: /* @35: %empty */
10827#line 3922 "ripper.y"
10828 {
10829 (yyval.node) = numparam_push(p);
10830 CMDARG_PUSH(0);
10831 }
10832#line 10828 "ripper.c"
10833 break;
10834
10835 case 471: /* do_body: @33 @34 @35 opt_block_param bodystmt */
10836#line 3927 "ripper.y"
10837 {
10838 int max_numparam = p->max_numparam;
10839 p->max_numparam = (yyvsp[-3].num);
10840 (yyvsp[-1].val) = args_with_numbered(p, (yyvsp[-1].val), max_numparam);
10841#if 0
10842 (yyval.val) = NEW_ITER((yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
10843#endif
10844 {VALUE v1,v2,v3;v1=escape_Qundef((yyvsp[-1].val));v2=(yyvsp[0].val);v3=dispatch2(do_block,v1,v2);(yyval.val)=v3;}
10845 CMDARG_POP();
10846 numparam_pop(p, (yyvsp[-2].node));
10847 dyna_pop(p, (yyvsp[-4].vars));
10848 }
10849#line 10845 "ripper.c"
10850 break;
10851
10852 case 472: /* case_args: arg_value */
10853#line 3942 "ripper.y"
10854 {
10855#if 0
10856 check_literal_when(p, (yyvsp[0].val), &(yylsp[0]));
10857 (yyval.val) = NEW_LIST((yyvsp[0].val), &(yyloc));
10858#endif
10859 {VALUE v1,v2,v3,v4;v1=dispatch0(args_new);v2=v1;v3=(yyvsp[0].val);v4=dispatch2(args_add,v2,v3);(yyval.val)=v4;}
10860 }
10861#line 10857 "ripper.c"
10862 break;
10863
10864 case 473: /* case_args: "*" arg_value */
10865#line 3950 "ripper.y"
10866 {
10867#if 0
10868 (yyval.val) = NEW_SPLAT((yyvsp[0].val), &(yyloc));
10869#endif
10870 {VALUE v1,v2,v3,v4;v1=dispatch0(args_new);v2=v1;v3=(yyvsp[0].val);v4=dispatch2(args_add_star,v2,v3);(yyval.val)=v4;}
10871 }
10872#line 10868 "ripper.c"
10873 break;
10874
10875 case 474: /* case_args: case_args ',' arg_value */
10876#line 3957 "ripper.y"
10877 {
10878#if 0
10879 check_literal_when(p, (yyvsp[0].val), &(yylsp[0]));
10880 (yyval.val) = last_arg_append(p, (yyvsp[-2].val), (yyvsp[0].val), &(yyloc));
10881#endif
10882 {VALUE v1,v2,v3;v1=(yyvsp[-2].val);v2=(yyvsp[0].val);v3=dispatch2(args_add,v1,v2);(yyval.val)=v3;}
10883 }
10884#line 10880 "ripper.c"
10885 break;
10886
10887 case 475: /* case_args: case_args ',' "*" arg_value */
10888#line 3965 "ripper.y"
10889 {
10890#if 0
10891 (yyval.val) = rest_arg_append(p, (yyvsp[-3].val), (yyvsp[0].val), &(yyloc));
10892#endif
10893 {VALUE v1,v2,v3;v1=(yyvsp[-3].val);v2=(yyvsp[0].val);v3=dispatch2(args_add_star,v1,v2);(yyval.val)=v3;}
10894 }
10895#line 10891 "ripper.c"
10896 break;
10897
10898 case 476: /* case_body: k_when case_args then compstmt cases */
10899#line 3976 "ripper.y"
10900 {
10901#if 0
10902 (yyval.val) = NEW_WHEN((yyvsp[-3].val), (yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
10903 fixpos((yyval.val), (yyvsp[-3].val));
10904#endif
10905 {VALUE v1,v2,v3,v4;v1=(yyvsp[-3].val);v2=(yyvsp[-1].val);v3=escape_Qundef((yyvsp[0].val));v4=dispatch3(when,v1,v2,v3);(yyval.val)=v4;}
10906 }
10907#line 10903 "ripper.c"
10908 break;
10909
10910 case 479: /* @36: %empty */
10911#line 3990 "ripper.y"
10912 {
10913 SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
10914 p->command_start = FALSE;
10915 (yyvsp[0].ctxt) = p->ctxt;
10916 p->ctxt.in_kwarg = 1;
10917 (yyval.tbl) = push_pvtbl(p);
10918 }
10919#line 10915 "ripper.c"
10920 break;
10921
10922 case 480: /* @37: %empty */
10923#line 3997 "ripper.y"
10924 {
10925 (yyval.tbl) = push_pktbl(p);
10926 }
10927#line 10923 "ripper.c"
10928 break;
10929
10930 case 481: /* $@38: %empty */
10931#line 4001 "ripper.y"
10932 {
10933 pop_pktbl(p, (yyvsp[-2].tbl));
10934 pop_pvtbl(p, (yyvsp[-3].tbl));
10935 p->ctxt.in_kwarg = (yyvsp[-4].ctxt).in_kwarg;
10936 }
10937#line 10933 "ripper.c"
10938 break;
10939
10940 case 482: /* p_case_body: "`in'" @36 @37 p_top_expr then $@38 compstmt p_cases */
10941#line 4008 "ripper.y"
10942 {
10943#if 0
10944 (yyval.val) = NEW_IN((yyvsp[-4].val), (yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
10945#endif
10946 {VALUE v1,v2,v3,v4;v1=(yyvsp[-4].val);v2=(yyvsp[-1].val);v3=escape_Qundef((yyvsp[0].val));v4=dispatch3(in,v1,v2,v3);(yyval.val)=v4;}
10947 }
10948#line 10944 "ripper.c"
10949 break;
10950
10951 case 486: /* p_top_expr: p_top_expr_body "`if' modifier" expr_value */
10952#line 4022 "ripper.y"
10953 {
10954#if 0
10955 (yyval.val) = new_if(p, (yyvsp[0].val), remove_begin((yyvsp[-2].val)), 0, &(yyloc));
10956 fixpos((yyval.val), (yyvsp[0].val));
10957#endif
10958 {VALUE v1,v2,v3;v1=(yyvsp[0].val);v2=(yyvsp[-2].val);v3=dispatch2(if_mod,v1,v2);(yyval.val)=v3;}
10959 }
10960#line 10956 "ripper.c"
10961 break;
10962
10963 case 487: /* p_top_expr: p_top_expr_body "`unless' modifier" expr_value */
10964#line 4030 "ripper.y"
10965 {
10966#if 0
10967 (yyval.val) = new_unless(p, (yyvsp[0].val), remove_begin((yyvsp[-2].val)), 0, &(yyloc));
10968 fixpos((yyval.val), (yyvsp[0].val));
10969#endif
10970 {VALUE v1,v2,v3;v1=(yyvsp[0].val);v2=(yyvsp[-2].val);v3=dispatch2(unless_mod,v1,v2);(yyval.val)=v3;}
10971 }
10972#line 10968 "ripper.c"
10973 break;
10974
10975 case 489: /* p_top_expr_body: p_expr ',' */
10976#line 4041 "ripper.y"
10977 {
10978 (yyval.val) = new_array_pattern_tail(p, Qnone, 1, 0, Qnone, &(yyloc));
10979 (yyval.val) = new_array_pattern(p, Qnone, get_value((yyvsp[-1].val)), (yyval.val), &(yyloc));
10980 }
10981#line 10977 "ripper.c"
10982 break;
10983
10984 case 490: /* p_top_expr_body: p_expr ',' p_args */
10985#line 4046 "ripper.y"
10986 {
10987 (yyval.val) = new_array_pattern(p, Qnone, get_value((yyvsp[-2].val)), (yyvsp[0].val), &(yyloc));
10988#if 0
10989 nd_set_first_loc((yyval.val), (yylsp[-2]).beg_pos);
10990#endif
10991
10992 }
10993#line 10989 "ripper.c"
10994 break;
10995
10996 case 491: /* p_top_expr_body: p_find */
10997#line 4054 "ripper.y"
10998 {
10999 (yyval.val) = new_find_pattern(p, Qnone, (yyvsp[0].val), &(yyloc));
11000 }
11001#line 10997 "ripper.c"
11002 break;
11003
11004 case 492: /* p_top_expr_body: p_args_tail */
11005#line 4058 "ripper.y"
11006 {
11007 (yyval.val) = new_array_pattern(p, Qnone, Qnone, (yyvsp[0].val), &(yyloc));
11008 }
11009#line 11005 "ripper.c"
11010 break;
11011
11012 case 493: /* p_top_expr_body: p_kwargs */
11013#line 4062 "ripper.y"
11014 {
11015 (yyval.val) = new_hash_pattern(p, Qnone, (yyvsp[0].val), &(yyloc));
11016 }
11017#line 11013 "ripper.c"
11018 break;
11019
11020 case 495: /* p_as: p_expr "=>" p_variable */
11021#line 4071 "ripper.y"
11022 {
11023#if 0
11024 NODE *n = NEW_LIST((yyvsp[-2].val), &(yyloc));
11025 n = list_append(p, n, (yyvsp[0].val));
11026 (yyval.val) = new_hash(p, n, &(yyloc));
11027#endif
11028 {VALUE v1,v2,v3,v4;v1=(yyvsp[-2].val);v2=STATIC_ID2SYM(id_assoc);v3=(yyvsp[0].val);v4=dispatch3(binary,v1,v2,v3);(yyval.val)=v4;}
11029 }
11030#line 11026 "ripper.c"
11031 break;
11032
11033 case 497: /* p_alt: p_alt '|' p_expr_basic */
11034#line 4083 "ripper.y"
11035 {
11036#if 0
11037 (yyval.val) = NEW_NODE(NODE_OR, (yyvsp[-2].val), (yyvsp[0].val), 0, &(yyloc));
11038#endif
11039 {VALUE v1,v2,v3,v4;v1=(yyvsp[-2].val);v2=STATIC_ID2SYM(idOr);v3=(yyvsp[0].val);v4=dispatch3(binary,v1,v2,v3);(yyval.val)=v4;}
11040 }
11041#line 11037 "ripper.c"
11042 break;
11043
11044 case 499: /* p_lparen: '(' */
11045#line 4092 "ripper.y"
11046 {(yyval.tbl) = push_pktbl(p);}
11047#line 11043 "ripper.c"
11048 break;
11049
11050 case 500: /* p_lbracket: '[' */
11051#line 4093 "ripper.y"
11052 {(yyval.tbl) = push_pktbl(p);}
11053#line 11049 "ripper.c"
11054 break;
11055
11056 case 502: /* p_expr_basic: p_const p_lparen p_args rparen */
11057#line 4097 "ripper.y"
11058 {
11059 pop_pktbl(p, (yyvsp[-2].tbl));
11060 (yyval.val) = new_array_pattern(p, (yyvsp[-3].val), Qnone, (yyvsp[-1].val), &(yyloc));
11061#if 0
11062 nd_set_first_loc((yyval.val), (yylsp[-3]).beg_pos);
11063#endif
11064
11065 }
11066#line 11062 "ripper.c"
11067 break;
11068
11069 case 503: /* p_expr_basic: p_const p_lparen p_find rparen */
11070#line 4106 "ripper.y"
11071 {
11072 pop_pktbl(p, (yyvsp[-2].tbl));
11073 (yyval.val) = new_find_pattern(p, (yyvsp[-3].val), (yyvsp[-1].val), &(yyloc));
11074#if 0
11075 nd_set_first_loc((yyval.val), (yylsp[-3]).beg_pos);
11076#endif
11077
11078 }
11079#line 11075 "ripper.c"
11080 break;
11081
11082 case 504: /* p_expr_basic: p_const p_lparen p_kwargs rparen */
11083#line 4115 "ripper.y"
11084 {
11085 pop_pktbl(p, (yyvsp[-2].tbl));
11086 (yyval.val) = new_hash_pattern(p, (yyvsp[-3].val), (yyvsp[-1].val), &(yyloc));
11087#if 0
11088 nd_set_first_loc((yyval.val), (yylsp[-3]).beg_pos);
11089#endif
11090
11091 }
11092#line 11088 "ripper.c"
11093 break;
11094
11095 case 505: /* p_expr_basic: p_const '(' rparen */
11096#line 4124 "ripper.y"
11097 {
11098 (yyval.val) = new_array_pattern_tail(p, Qnone, 0, 0, Qnone, &(yyloc));
11099 (yyval.val) = new_array_pattern(p, (yyvsp[-2].val), Qnone, (yyval.val), &(yyloc));
11100 }
11101#line 11097 "ripper.c"
11102 break;
11103
11104 case 506: /* p_expr_basic: p_const p_lbracket p_args rbracket */
11105#line 4129 "ripper.y"
11106 {
11107 pop_pktbl(p, (yyvsp[-2].tbl));
11108 (yyval.val) = new_array_pattern(p, (yyvsp[-3].val), Qnone, (yyvsp[-1].val), &(yyloc));
11109#if 0
11110 nd_set_first_loc((yyval.val), (yylsp[-3]).beg_pos);
11111#endif
11112
11113 }
11114#line 11110 "ripper.c"
11115 break;
11116
11117 case 507: /* p_expr_basic: p_const p_lbracket p_find rbracket */
11118#line 4138 "ripper.y"
11119 {
11120 pop_pktbl(p, (yyvsp[-2].tbl));
11121 (yyval.val) = new_find_pattern(p, (yyvsp[-3].val), (yyvsp[-1].val), &(yyloc));
11122#if 0
11123 nd_set_first_loc((yyval.val), (yylsp[-3]).beg_pos);
11124#endif
11125
11126 }
11127#line 11123 "ripper.c"
11128 break;
11129
11130 case 508: /* p_expr_basic: p_const p_lbracket p_kwargs rbracket */
11131#line 4147 "ripper.y"
11132 {
11133 pop_pktbl(p, (yyvsp[-2].tbl));
11134 (yyval.val) = new_hash_pattern(p, (yyvsp[-3].val), (yyvsp[-1].val), &(yyloc));
11135#if 0
11136 nd_set_first_loc((yyval.val), (yylsp[-3]).beg_pos);
11137#endif
11138
11139 }
11140#line 11136 "ripper.c"
11141 break;
11142
11143 case 509: /* p_expr_basic: p_const '[' rbracket */
11144#line 4156 "ripper.y"
11145 {
11146 (yyval.val) = new_array_pattern_tail(p, Qnone, 0, 0, Qnone, &(yyloc));
11147 (yyval.val) = new_array_pattern(p, (yyvsp[-2].val), Qnone, (yyval.val), &(yyloc));
11148 }
11149#line 11145 "ripper.c"
11150 break;
11151
11152 case 510: /* p_expr_basic: "[" p_args rbracket */
11153#line 4161 "ripper.y"
11154 {
11155 (yyval.val) = new_array_pattern(p, Qnone, Qnone, (yyvsp[-1].val), &(yyloc));
11156 }
11157#line 11153 "ripper.c"
11158 break;
11159
11160 case 511: /* p_expr_basic: "[" p_find rbracket */
11161#line 4165 "ripper.y"
11162 {
11163 (yyval.val) = new_find_pattern(p, Qnone, (yyvsp[-1].val), &(yyloc));
11164 }
11165#line 11161 "ripper.c"
11166 break;
11167
11168 case 512: /* p_expr_basic: "[" rbracket */
11169#line 4169 "ripper.y"
11170 {
11171 (yyval.val) = new_array_pattern_tail(p, Qnone, 0, 0, Qnone, &(yyloc));
11172 (yyval.val) = new_array_pattern(p, Qnone, Qnone, (yyval.val), &(yyloc));
11173 }
11174#line 11170 "ripper.c"
11175 break;
11176
11177 case 513: /* @39: %empty */
11178#line 4174 "ripper.y"
11179 {
11180 (yyval.tbl) = push_pktbl(p);
11181 (yyvsp[0].ctxt) = p->ctxt;
11182 p->ctxt.in_kwarg = 0;
11183 }
11184#line 11180 "ripper.c"
11185 break;
11186
11187 case 514: /* p_expr_basic: "{" @39 p_kwargs rbrace */
11188#line 4180 "ripper.y"
11189 {
11190 pop_pktbl(p, (yyvsp[-2].tbl));
11191 p->ctxt.in_kwarg = (yyvsp[-3].ctxt).in_kwarg;
11192 (yyval.val) = new_hash_pattern(p, Qnone, (yyvsp[-1].val), &(yyloc));
11193 }
11194#line 11190 "ripper.c"
11195 break;
11196
11197 case 515: /* p_expr_basic: "{" rbrace */
11198#line 4186 "ripper.y"
11199 {
11200 (yyval.val) = new_hash_pattern_tail(p, Qnone, 0, &(yyloc));
11201 (yyval.val) = new_hash_pattern(p, Qnone, (yyval.val), &(yyloc));
11202 }
11203#line 11199 "ripper.c"
11204 break;
11205
11206 case 516: /* @40: %empty */
11207#line 4190 "ripper.y"
11208 {(yyval.tbl) = push_pktbl(p);}
11209#line 11205 "ripper.c"
11210 break;
11211
11212 case 517: /* p_expr_basic: "(" @40 p_expr rparen */
11213#line 4191 "ripper.y"
11214 {
11215 pop_pktbl(p, (yyvsp[-2].tbl));
11216 (yyval.val) = (yyvsp[-1].val);
11217 }
11218#line 11214 "ripper.c"
11219 break;
11220
11221 case 518: /* p_args: p_expr */
11222#line 4198 "ripper.y"
11223 {
11224#if 0
11225 NODE *pre_args = NEW_LIST((yyvsp[0].val), &(yyloc));
11226 (yyval.val) = new_array_pattern_tail(p, pre_args, 0, 0, Qnone, &(yyloc));
11227#endif
11228 (yyval.val) = new_array_pattern_tail(p, rb_ary_new_from_args(1, get_value((yyvsp[0].val))), 0, 0, Qnone, &(yyloc));
11229
11230 }
11231#line 11227 "ripper.c"
11232 break;
11233
11234 case 519: /* p_args: p_args_head */
11235#line 4207 "ripper.y"
11236 {
11237 (yyval.val) = new_array_pattern_tail(p, (yyvsp[0].val), 1, 0, Qnone, &(yyloc));
11238 }
11239#line 11235 "ripper.c"
11240 break;
11241
11242 case 520: /* p_args: p_args_head p_arg */
11243#line 4211 "ripper.y"
11244 {
11245#if 0
11246 (yyval.val) = new_array_pattern_tail(p, list_concat((yyvsp[-1].val), (yyvsp[0].val)), 0, 0, Qnone, &(yyloc));
11247#endif
11248 VALUE pre_args = rb_ary_concat((yyvsp[-1].val), get_value((yyvsp[0].val)));
11249 (yyval.val) = new_array_pattern_tail(p, pre_args, 0, 0, Qnone, &(yyloc));
11250
11251 }
11252#line 11248 "ripper.c"
11253 break;
11254
11255 case 521: /* p_args: p_args_head "*" "local variable or method" */
11256#line 4220 "ripper.y"
11257 {
11258 (yyval.val) = new_array_pattern_tail(p, (yyvsp[-2].val), 1, (yyvsp[0].val), Qnone, &(yyloc));
11259 }
11260#line 11256 "ripper.c"
11261 break;
11262
11263 case 522: /* p_args: p_args_head "*" "local variable or method" ',' p_args_post */
11264#line 4224 "ripper.y"
11265 {
11266 (yyval.val) = new_array_pattern_tail(p, (yyvsp[-4].val), 1, (yyvsp[-2].val), (yyvsp[0].val), &(yyloc));
11267 }
11268#line 11264 "ripper.c"
11269 break;
11270
11271 case 523: /* p_args: p_args_head "*" */
11272#line 4228 "ripper.y"
11273 {
11274 (yyval.val) = new_array_pattern_tail(p, (yyvsp[-1].val), 1, 0, Qnone, &(yyloc));
11275 }
11276#line 11272 "ripper.c"
11277 break;
11278
11279 case 524: /* p_args: p_args_head "*" ',' p_args_post */
11280#line 4232 "ripper.y"
11281 {
11282 (yyval.val) = new_array_pattern_tail(p, (yyvsp[-3].val), 1, 0, (yyvsp[0].val), &(yyloc));
11283 }
11284#line 11280 "ripper.c"
11285 break;
11286
11287 case 526: /* p_args_head: p_arg ',' */
11288#line 4239 "ripper.y"
11289 {
11290 (yyval.val) = (yyvsp[-1].val);
11291 }
11292#line 11288 "ripper.c"
11293 break;
11294
11295 case 527: /* p_args_head: p_args_head p_arg ',' */
11296#line 4243 "ripper.y"
11297 {
11298#if 0
11299 (yyval.val) = list_concat((yyvsp[-2].val), (yyvsp[-1].val));
11300#endif
11301 (yyval.val)=rb_ary_concat((yyvsp[-2].val), get_value((yyvsp[-1].val)));
11302 }
11303#line 11299 "ripper.c"
11304 break;
11305
11306 case 528: /* p_args_tail: p_rest */
11307#line 4252 "ripper.y"
11308 {
11309 (yyval.val) = new_array_pattern_tail(p, Qnone, 1, (yyvsp[0].val), Qnone, &(yyloc));
11310 }
11311#line 11307 "ripper.c"
11312 break;
11313
11314 case 529: /* p_args_tail: p_rest ',' p_args_post */
11315#line 4256 "ripper.y"
11316 {
11317 (yyval.val) = new_array_pattern_tail(p, Qnone, 1, (yyvsp[-2].val), (yyvsp[0].val), &(yyloc));
11318 }
11319#line 11315 "ripper.c"
11320 break;
11321
11322 case 530: /* p_find: p_rest ',' p_args_post ',' p_rest */
11323#line 4262 "ripper.y"
11324 {
11325 (yyval.val) = new_find_pattern_tail(p, (yyvsp[-4].val), (yyvsp[-2].val), (yyvsp[0].val), &(yyloc));
11326
11328 rb_warn0L_experimental(nd_line((yyval.val)), "Find pattern is experimental, and the behavior may change in future versions of Ruby!");
11329 }
11330#line 11326 "ripper.c"
11331 break;
11332
11333 case 531: /* p_rest: "*" "local variable or method" */
11334#line 4272 "ripper.y"
11335 {
11336 (yyval.val) = (yyvsp[0].val);
11337 }
11338#line 11334 "ripper.c"
11339 break;
11340
11341 case 532: /* p_rest: "*" */
11342#line 4276 "ripper.y"
11343 {
11344 (yyval.val) = 0;
11345 }
11346#line 11342 "ripper.c"
11347 break;
11348
11349 case 534: /* p_args_post: p_args_post ',' p_arg */
11350#line 4283 "ripper.y"
11351 {
11352#if 0
11353 (yyval.val) = list_concat((yyvsp[-2].val), (yyvsp[0].val));
11354#endif
11355 (yyval.val)=rb_ary_concat((yyvsp[-2].val), get_value((yyvsp[0].val)));
11356 }
11357#line 11353 "ripper.c"
11358 break;
11359
11360 case 535: /* p_arg: p_expr */
11361#line 4292 "ripper.y"
11362 {
11363#if 0
11364 (yyval.val) = NEW_LIST((yyvsp[0].val), &(yyloc));
11365#endif
11366 (yyval.val)=rb_ary_new_from_args(1, get_value((yyvsp[0].val)));
11367 }
11368#line 11364 "ripper.c"
11369 break;
11370
11371 case 536: /* p_kwargs: p_kwarg ',' p_any_kwrest */
11372#line 4301 "ripper.y"
11373 {
11374 (yyval.val) = new_hash_pattern_tail(p, new_unique_key_hash(p, (yyvsp[-2].val), &(yyloc)), (yyvsp[0].val), &(yyloc));
11375 }
11376#line 11372 "ripper.c"
11377 break;
11378
11379 case 537: /* p_kwargs: p_kwarg */
11380#line 4305 "ripper.y"
11381 {
11382 (yyval.val) = new_hash_pattern_tail(p, new_unique_key_hash(p, (yyvsp[0].val), &(yyloc)), 0, &(yyloc));
11383 }
11384#line 11380 "ripper.c"
11385 break;
11386
11387 case 538: /* p_kwargs: p_kwarg ',' */
11388#line 4309 "ripper.y"
11389 {
11390 (yyval.val) = new_hash_pattern_tail(p, new_unique_key_hash(p, (yyvsp[-1].val), &(yyloc)), 0, &(yyloc));
11391 }
11392#line 11388 "ripper.c"
11393 break;
11394
11395 case 539: /* p_kwargs: p_any_kwrest */
11396#line 4313 "ripper.y"
11397 {
11398 (yyval.val) = new_hash_pattern_tail(p, new_hash(p, Qnone, &(yyloc)), (yyvsp[0].val), &(yyloc));
11399 }
11400#line 11396 "ripper.c"
11401 break;
11402
11403 case 540: /* p_kwarg: p_kw */
11404#line 4319 "ripper.y"
11405 {(yyval.val)=rb_ary_new_from_args(1, (yyvsp[0].val));}
11406#line 11402 "ripper.c"
11407 break;
11408
11409 case 541: /* p_kwarg: p_kwarg ',' p_kw */
11410#line 4321 "ripper.y"
11411 {
11412#if 0
11413 (yyval.val) = list_concat((yyvsp[-2].val), (yyvsp[0].val));
11414#endif
11415 (yyval.val)=rb_ary_push((yyvsp[-2].val), (yyvsp[0].val));
11416 }
11417#line 11413 "ripper.c"
11418 break;
11419
11420 case 542: /* p_kw: p_kw_label p_expr */
11421#line 4330 "ripper.y"
11422 {
11423 error_duplicate_pattern_key(p, get_id((yyvsp[-1].val)), &(yylsp[-1]));
11424#if 0
11425 (yyval.val) = list_append(p, NEW_LIST(NEW_LIT(ID2SYM((yyvsp[-1].val)), &(yyloc)), &(yyloc)), (yyvsp[0].val));
11426#endif
11427 (yyval.val)=rb_ary_new_from_args(2, get_value((yyvsp[-1].val)), get_value((yyvsp[0].val)));
11428 }
11429#line 11425 "ripper.c"
11430 break;
11431
11432 case 543: /* p_kw: p_kw_label */
11433#line 4338 "ripper.y"
11434 {
11435 error_duplicate_pattern_key(p, get_id((yyvsp[0].val)), &(yylsp[0]));
11436 if ((yyvsp[0].val) && !is_local_id(get_id((yyvsp[0].val)))) {
11437 yyerror1(&(yylsp[0]), "key must be valid as local variables");
11438 }
11439 error_duplicate_pattern_variable(p, get_id((yyvsp[0].val)), &(yylsp[0]));
11440#if 0
11441 (yyval.val) = list_append(p, NEW_LIST(NEW_LIT(ID2SYM((yyvsp[0].val)), &(yyloc)), &(yyloc)), assignable(p, (yyvsp[0].val), 0, &(yyloc)));
11442#endif
11443 (yyval.val)=rb_ary_new_from_args(2, get_value((yyvsp[0].val)), Qnil);
11444 }
11445#line 11441 "ripper.c"
11446 break;
11447
11448 case 545: /* p_kw_label: "string literal" string_contents tLABEL_END */
11449#line 4353 "ripper.y"
11450 {
11451 YYLTYPE loc = code_loc_gen(&(yylsp[-2]), &(yylsp[0]));
11452#if 0
11453 if (!(yyvsp[-1].val) || nd_type((yyvsp[-1].val)) == NODE_STR) {
11454 NODE *node = dsym_node(p, (yyvsp[-1].val), &loc);
11455 (yyval.val) = SYM2ID(node->nd_lit);
11456 }
11457#endif
11458 if (ripper_is_node_yylval((yyvsp[-1].val)) && RNODE((yyvsp[-1].val))->nd_cval) {
11459 VALUE label = RNODE((yyvsp[-1].val))->nd_cval;
11460 VALUE rval = RNODE((yyvsp[-1].val))->nd_rval;
11461 (yyval.val) = ripper_new_yylval(p, rb_intern_str(label), rval, label);
11462 RNODE((yyval.val))->nd_loc = loc;
11463 }
11464
11465 else {
11466 yyerror1(&loc, "symbol literal with interpolation is not allowed");
11467 (yyval.val) = 0;
11468 }
11469 }
11470#line 11466 "ripper.c"
11471 break;
11472
11473 case 546: /* p_kwrest: kwrest_mark "local variable or method" */
11474#line 4376 "ripper.y"
11475 {
11476 (yyval.val) = (yyvsp[0].val);
11477 }
11478#line 11474 "ripper.c"
11479 break;
11480
11481 case 547: /* p_kwrest: kwrest_mark */
11482#line 4380 "ripper.y"
11483 {
11484 (yyval.val) = 0;
11485 }
11486#line 11482 "ripper.c"
11487 break;
11488
11489 case 548: /* p_kwnorest: kwrest_mark "`nil'" */
11490#line 4386 "ripper.y"
11491 {
11492 (yyval.val) = 0;
11493 }
11494#line 11490 "ripper.c"
11495 break;
11496
11497 case 550: /* p_any_kwrest: p_kwnorest */
11498#line 4392 "ripper.y"
11499 {(yyval.val) = ID2VAL(idNil);}
11500#line 11496 "ripper.c"
11501 break;
11502
11503 case 552: /* p_value: p_primitive ".." p_primitive */
11504#line 4397 "ripper.y"
11505 {
11506#if 0
11507 value_expr((yyvsp[-2].val));
11508 value_expr((yyvsp[0].val));
11509 (yyval.val) = NEW_DOT2((yyvsp[-2].val), (yyvsp[0].val), &(yyloc));
11510#endif
11511 {VALUE v1,v2,v3;v1=(yyvsp[-2].val);v2=(yyvsp[0].val);v3=dispatch2(dot2,v1,v2);(yyval.val)=v3;}
11512 }
11513#line 11509 "ripper.c"
11514 break;
11515
11516 case 553: /* p_value: p_primitive "..." p_primitive */
11517#line 4406 "ripper.y"
11518 {
11519#if 0
11520 value_expr((yyvsp[-2].val));
11521 value_expr((yyvsp[0].val));
11522 (yyval.val) = NEW_DOT3((yyvsp[-2].val), (yyvsp[0].val), &(yyloc));
11523#endif
11524 {VALUE v1,v2,v3;v1=(yyvsp[-2].val);v2=(yyvsp[0].val);v3=dispatch2(dot3,v1,v2);(yyval.val)=v3;}
11525 }
11526#line 11522 "ripper.c"
11527 break;
11528
11529 case 554: /* p_value: p_primitive ".." */
11530#line 4415 "ripper.y"
11531 {
11532#if 0
11533 value_expr((yyvsp[-1].val));
11534 (yyval.val) = NEW_DOT2((yyvsp[-1].val), new_nil_at(p, &(yylsp[0]).end_pos), &(yyloc));
11535#endif
11536 {VALUE v1,v2,v3;v1=(yyvsp[-1].val);v2=Qnil;v3=dispatch2(dot2,v1,v2);(yyval.val)=v3;}
11537 }
11538#line 11534 "ripper.c"
11539 break;
11540
11541 case 555: /* p_value: p_primitive "..." */
11542#line 4423 "ripper.y"
11543 {
11544#if 0
11545 value_expr((yyvsp[-1].val));
11546 (yyval.val) = NEW_DOT3((yyvsp[-1].val), new_nil_at(p, &(yylsp[0]).end_pos), &(yyloc));
11547#endif
11548 {VALUE v1,v2,v3;v1=(yyvsp[-1].val);v2=Qnil;v3=dispatch2(dot3,v1,v2);(yyval.val)=v3;}
11549 }
11550#line 11546 "ripper.c"
11551 break;
11552
11553 case 559: /* p_value: "(.." p_primitive */
11554#line 4434 "ripper.y"
11555 {
11556#if 0
11557 value_expr((yyvsp[0].val));
11558 (yyval.val) = NEW_DOT2(new_nil_at(p, &(yylsp[-1]).beg_pos), (yyvsp[0].val), &(yyloc));
11559#endif
11560 {VALUE v1,v2,v3;v1=Qnil;v2=(yyvsp[0].val);v3=dispatch2(dot2,v1,v2);(yyval.val)=v3;}
11561 }
11562#line 11558 "ripper.c"
11563 break;
11564
11565 case 560: /* p_value: "(..." p_primitive */
11566#line 4442 "ripper.y"
11567 {
11568#if 0
11569 value_expr((yyvsp[0].val));
11570 (yyval.val) = NEW_DOT3(new_nil_at(p, &(yylsp[-1]).beg_pos), (yyvsp[0].val), &(yyloc));
11571#endif
11572 {VALUE v1,v2,v3;v1=Qnil;v2=(yyvsp[0].val);v3=dispatch2(dot3,v1,v2);(yyval.val)=v3;}
11573 }
11574#line 11570 "ripper.c"
11575 break;
11576
11577 case 569: /* p_primitive: keyword_variable */
11578#line 4460 "ripper.y"
11579 {
11580#if 0
11581 if (!((yyval.val) = gettable(p, (yyvsp[0].val), &(yyloc)))) (yyval.val) = NEW_BEGIN(0, &(yyloc));
11582#endif
11583 {VALUE v1,v2;v1=(yyvsp[0].val);v2=dispatch1(var_ref,v1);(yyval.val)=v2;}
11584 }
11585#line 11581 "ripper.c"
11586 break;
11587
11588 case 571: /* p_variable: "local variable or method" */
11589#line 4470 "ripper.y"
11590 {
11591#if 0
11592 error_duplicate_pattern_variable(p, (yyvsp[0].val), &(yylsp[0]));
11593 (yyval.val) = assignable(p, (yyvsp[0].val), 0, &(yyloc));
11594#endif
11595 (yyval.val)=assignable(p, var_field(p, (yyvsp[0].val)));
11596 }
11597#line 11593 "ripper.c"
11598 break;
11599
11600 case 572: /* p_var_ref: '^' "local variable or method" */
11601#line 4480 "ripper.y"
11602 {
11603#if 0
11604 NODE *n = gettable(p, (yyvsp[0].val), &(yyloc));
11605 if (!(nd_type(n) == NODE_LVAR || nd_type(n) == NODE_DVAR)) {
11606 compile_error(p, "%"PRIsVALUE": no such local variable", rb_id2str((yyvsp[0].val)));
11607 }
11608 (yyval.val) = n;
11609#endif
11610 {VALUE v1,v2;v1=(yyvsp[0].val);v2=dispatch1(var_ref,v1);(yyval.val)=v2;}
11611 }
11612#line 11608 "ripper.c"
11613 break;
11614
11615 case 573: /* p_const: ":: at EXPR_BEG" cname */
11616#line 4493 "ripper.y"
11617 {
11618#if 0
11619 (yyval.val) = NEW_COLON3((yyvsp[0].val), &(yyloc));
11620#endif
11621 {VALUE v1,v2;v1=(yyvsp[0].val);v2=dispatch1(top_const_ref,v1);(yyval.val)=v2;}
11622 }
11623#line 11619 "ripper.c"
11624 break;
11625
11626 case 574: /* p_const: p_const "::" cname */
11627#line 4500 "ripper.y"
11628 {
11629#if 0
11630 (yyval.val) = NEW_COLON2((yyvsp[-2].val), (yyvsp[0].val), &(yyloc));
11631#endif
11632 {VALUE v1,v2,v3;v1=(yyvsp[-2].val);v2=(yyvsp[0].val);v3=dispatch2(const_path_ref,v1,v2);(yyval.val)=v3;}
11633 }
11634#line 11630 "ripper.c"
11635 break;
11636
11637 case 575: /* p_const: "constant" */
11638#line 4507 "ripper.y"
11639 {
11640#if 0
11641 (yyval.val) = gettable(p, (yyvsp[0].val), &(yyloc));
11642#endif
11643 {VALUE v1,v2;v1=(yyvsp[0].val);v2=dispatch1(var_ref,v1);(yyval.val)=v2;}
11644 }
11645#line 11641 "ripper.c"
11646 break;
11647
11648 case 576: /* opt_rescue: k_rescue exc_list exc_var then compstmt opt_rescue */
11649#line 4518 "ripper.y"
11650 {
11651#if 0
11652 (yyval.val) = NEW_RESBODY((yyvsp[-4].val),
11653 (yyvsp[-3].val) ? block_append(p, node_assign(p, (yyvsp[-3].val), NEW_ERRINFO(&(yylsp[-3])), NO_LEX_CTXT, &(yylsp[-3])), (yyvsp[-1].val)) : (yyvsp[-1].val),
11654 (yyvsp[0].val), &(yyloc));
11655 fixpos((yyval.val), (yyvsp[-4].val)?(yyvsp[-4].val):(yyvsp[-1].val));
11656#endif
11657 {VALUE v1,v2,v3,v4,v5;v1=escape_Qundef((yyvsp[-4].val));v2=escape_Qundef((yyvsp[-3].val));v3=escape_Qundef((yyvsp[-1].val));v4=escape_Qundef((yyvsp[0].val));v5=dispatch4(rescue,v1,v2,v3,v4);(yyval.val)=v5;}
11658 }
11659#line 11655 "ripper.c"
11660 break;
11661
11662 case 578: /* exc_list: arg_value */
11663#line 4531 "ripper.y"
11664 {
11665#if 0
11666 (yyval.val) = NEW_LIST((yyvsp[0].val), &(yyloc));
11667#endif
11668 (yyval.val)=rb_ary_new3(1, get_value((yyvsp[0].val)));
11669 }
11670#line 11666 "ripper.c"
11671 break;
11672
11673 case 579: /* exc_list: mrhs */
11674#line 4538 "ripper.y"
11675 {
11676#if 0
11677 if (!((yyval.val) = splat_array((yyvsp[0].val)))) (yyval.val) = (yyvsp[0].val);
11678#endif
11679 (yyval.val)=(yyvsp[0].val);
11680 }
11681#line 11677 "ripper.c"
11682 break;
11683
11684 case 581: /* exc_var: "=>" lhs */
11685#line 4548 "ripper.y"
11686 {
11687 (yyval.val) = (yyvsp[0].val);
11688 }
11689#line 11685 "ripper.c"
11690 break;
11691
11692 case 583: /* opt_ensure: k_ensure compstmt */
11693#line 4555 "ripper.y"
11694 {
11695#if 0
11696 (yyval.val) = (yyvsp[0].val);
11697#endif
11698 {VALUE v1,v2;v1=(yyvsp[0].val);v2=dispatch1(ensure,v1);(yyval.val)=v2;}
11699 }
11700#line 11696 "ripper.c"
11701 break;
11702
11703 case 587: /* strings: string */
11704#line 4569 "ripper.y"
11705 {
11706#if 0
11707 NODE *node = (yyvsp[0].val);
11708 if (!node) {
11709 node = NEW_STR(STR_NEW0(), &(yyloc));
11710 RB_OBJ_WRITTEN(p->ast, Qnil, node->nd_lit);
11711 }
11712 else {
11713 node = evstr2dstr(p, node);
11714 }
11715 (yyval.val) = node;
11716#endif
11717 (yyval.val)=(yyvsp[0].val);
11718 }
11719#line 11715 "ripper.c"
11720 break;
11721
11722 case 590: /* string: string string1 */
11723#line 4588 "ripper.y"
11724 {
11725#if 0
11726 (yyval.val) = literal_concat(p, (yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
11727#endif
11728 {VALUE v1,v2,v3;v1=(yyvsp[-1].val);v2=(yyvsp[0].val);v3=dispatch2(string_concat,v1,v2);(yyval.val)=v3;}
11729 }
11730#line 11726 "ripper.c"
11731 break;
11732
11733 case 591: /* string1: "string literal" string_contents "terminator" */
11734#line 4597 "ripper.y"
11735 {
11736#if 0
11737 (yyval.val) = heredoc_dedent(p, (yyvsp[-1].val));
11738 if ((yyval.val)) nd_set_loc((yyval.val), &(yyloc));
11739#endif
11740 {VALUE v1,v2;v1=heredoc_dedent(p, (yyvsp[-1].val));v2=dispatch1(string_literal,v1);(yyval.val)=v2;}
11741 }
11742#line 11738 "ripper.c"
11743 break;
11744
11745 case 592: /* xstring: "backtick literal" xstring_contents "terminator" */
11746#line 4607 "ripper.y"
11747 {
11748#if 0
11749 (yyval.val) = new_xstring(p, heredoc_dedent(p, (yyvsp[-1].val)), &(yyloc));
11750#endif
11751 {VALUE v1,v2;v1=heredoc_dedent(p, (yyvsp[-1].val));v2=dispatch1(xstring_literal,v1);(yyval.val)=v2;}
11752 }
11753#line 11749 "ripper.c"
11754 break;
11755
11756 case 593: /* regexp: "regexp literal" regexp_contents tREGEXP_END */
11757#line 4616 "ripper.y"
11758 {
11759 (yyval.val) = new_regexp(p, (yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
11760 }
11761#line 11757 "ripper.c"
11762 break;
11763
11764 case 594: /* words: "word list" ' ' word_list "terminator" */
11765#line 4622 "ripper.y"
11766 {
11767#if 0
11768 (yyval.val) = make_list((yyvsp[-1].val), &(yyloc));
11769#endif
11770 {VALUE v1,v2;v1=(yyvsp[-1].val);v2=dispatch1(array,v1);(yyval.val)=v2;}
11771 }
11772#line 11768 "ripper.c"
11773 break;
11774
11775 case 595: /* word_list: %empty */
11776#line 4631 "ripper.y"
11777 {
11778#if 0
11779 (yyval.val) = 0;
11780#endif
11781 {VALUE v1;v1=dispatch0(words_new);(yyval.val)=v1;}
11782 }
11783#line 11779 "ripper.c"
11784 break;
11785
11786 case 596: /* word_list: word_list word ' ' */
11787#line 4638 "ripper.y"
11788 {
11789#if 0
11790 (yyval.val) = list_append(p, (yyvsp[-2].val), evstr2dstr(p, (yyvsp[-1].val)));
11791#endif
11792 {VALUE v1,v2,v3;v1=(yyvsp[-2].val);v2=(yyvsp[-1].val);v3=dispatch2(words_add,v1,v2);(yyval.val)=v3;}
11793 }
11794#line 11790 "ripper.c"
11795 break;
11796
11797 case 597: /* word: string_content */
11798#line 4647 "ripper.y"
11799 {{VALUE v1,v2,v3,v4;v1=dispatch0(word_new);v2=v1;v3=(yyvsp[0].val);v4=dispatch2(word_add,v2,v3);(yyval.val)=v4;}}
11800#line 11796 "ripper.c"
11801 break;
11802
11803 case 598: /* word: word string_content */
11804#line 4649 "ripper.y"
11805 {
11806#if 0
11807 (yyval.val) = literal_concat(p, (yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
11808#endif
11809 {VALUE v1,v2,v3;v1=(yyvsp[-1].val);v2=(yyvsp[0].val);v3=dispatch2(word_add,v1,v2);(yyval.val)=v3;}
11810 }
11811#line 11807 "ripper.c"
11812 break;
11813
11814 case 599: /* symbols: "symbol list" ' ' symbol_list "terminator" */
11815#line 4658 "ripper.y"
11816 {
11817#if 0
11818 (yyval.val) = make_list((yyvsp[-1].val), &(yyloc));
11819#endif
11820 {VALUE v1,v2;v1=(yyvsp[-1].val);v2=dispatch1(array,v1);(yyval.val)=v2;}
11821 }
11822#line 11818 "ripper.c"
11823 break;
11824
11825 case 600: /* symbol_list: %empty */
11826#line 4667 "ripper.y"
11827 {
11828#if 0
11829 (yyval.val) = 0;
11830#endif
11831 {VALUE v1;v1=dispatch0(symbols_new);(yyval.val)=v1;}
11832 }
11833#line 11829 "ripper.c"
11834 break;
11835
11836 case 601: /* symbol_list: symbol_list word ' ' */
11837#line 4674 "ripper.y"
11838 {
11839#if 0
11840 (yyval.val) = symbol_append(p, (yyvsp[-2].val), evstr2dstr(p, (yyvsp[-1].val)));
11841#endif
11842 {VALUE v1,v2,v3;v1=(yyvsp[-2].val);v2=(yyvsp[-1].val);v3=dispatch2(symbols_add,v1,v2);(yyval.val)=v3;}
11843 }
11844#line 11840 "ripper.c"
11845 break;
11846
11847 case 602: /* qwords: "verbatim word list" ' ' qword_list "terminator" */
11848#line 4683 "ripper.y"
11849 {
11850#if 0
11851 (yyval.val) = make_list((yyvsp[-1].val), &(yyloc));
11852#endif
11853 {VALUE v1,v2;v1=(yyvsp[-1].val);v2=dispatch1(array,v1);(yyval.val)=v2;}
11854 }
11855#line 11851 "ripper.c"
11856 break;
11857
11858 case 603: /* qsymbols: "verbatim symbol list" ' ' qsym_list "terminator" */
11859#line 4692 "ripper.y"
11860 {
11861#if 0
11862 (yyval.val) = make_list((yyvsp[-1].val), &(yyloc));
11863#endif
11864 {VALUE v1,v2;v1=(yyvsp[-1].val);v2=dispatch1(array,v1);(yyval.val)=v2;}
11865 }
11866#line 11862 "ripper.c"
11867 break;
11868
11869 case 604: /* qword_list: %empty */
11870#line 4701 "ripper.y"
11871 {
11872#if 0
11873 (yyval.val) = 0;
11874#endif
11875 {VALUE v1;v1=dispatch0(qwords_new);(yyval.val)=v1;}
11876 }
11877#line 11873 "ripper.c"
11878 break;
11879
11880 case 605: /* qword_list: qword_list "literal content" ' ' */
11881#line 4708 "ripper.y"
11882 {
11883#if 0
11884 (yyval.val) = list_append(p, (yyvsp[-2].val), (yyvsp[-1].val));
11885#endif
11886 {VALUE v1,v2,v3;v1=(yyvsp[-2].val);v2=(yyvsp[-1].val);v3=dispatch2(qwords_add,v1,v2);(yyval.val)=v3;}
11887 }
11888#line 11884 "ripper.c"
11889 break;
11890
11891 case 606: /* qsym_list: %empty */
11892#line 4717 "ripper.y"
11893 {
11894#if 0
11895 (yyval.val) = 0;
11896#endif
11897 {VALUE v1;v1=dispatch0(qsymbols_new);(yyval.val)=v1;}
11898 }
11899#line 11895 "ripper.c"
11900 break;
11901
11902 case 607: /* qsym_list: qsym_list "literal content" ' ' */
11903#line 4724 "ripper.y"
11904 {
11905#if 0
11906 (yyval.val) = symbol_append(p, (yyvsp[-2].val), (yyvsp[-1].val));
11907#endif
11908 {VALUE v1,v2,v3;v1=(yyvsp[-2].val);v2=(yyvsp[-1].val);v3=dispatch2(qsymbols_add,v1,v2);(yyval.val)=v3;}
11909 }
11910#line 11906 "ripper.c"
11911 break;
11912
11913 case 608: /* string_contents: %empty */
11914#line 4733 "ripper.y"
11915 {
11916#if 0
11917 (yyval.val) = 0;
11918#endif
11919 {VALUE v1;v1=dispatch0(string_content);(yyval.val)=v1;}
11920#if 0
11921#endif
11922 (yyval.val) = ripper_new_yylval(p, 0, (yyval.val), 0);
11923
11924 }
11925#line 11921 "ripper.c"
11926 break;
11927
11928 case 609: /* string_contents: string_contents string_content */
11929#line 4744 "ripper.y"
11930 {
11931#if 0
11932 (yyval.val) = literal_concat(p, (yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
11933#endif
11934 {VALUE v1,v2,v3;v1=(yyvsp[-1].val);v2=(yyvsp[0].val);v3=dispatch2(string_add,v1,v2);(yyval.val)=v3;}
11935#if 0
11936#endif
11937 if (ripper_is_node_yylval((yyvsp[-1].val)) && ripper_is_node_yylval((yyvsp[0].val)) &&
11938 !RNODE((yyvsp[-1].val))->nd_cval) {
11939 RNODE((yyvsp[-1].val))->nd_cval = RNODE((yyvsp[0].val))->nd_cval;
11940 RNODE((yyvsp[-1].val))->nd_rval = add_mark_object(p, (yyval.val));
11941 (yyval.val) = (yyvsp[-1].val);
11942 }
11943
11944 }
11945#line 11941 "ripper.c"
11946 break;
11947
11948 case 610: /* xstring_contents: %empty */
11949#line 4762 "ripper.y"
11950 {
11951#if 0
11952 (yyval.val) = 0;
11953#endif
11954 {VALUE v1;v1=dispatch0(xstring_new);(yyval.val)=v1;}
11955 }
11956#line 11952 "ripper.c"
11957 break;
11958
11959 case 611: /* xstring_contents: xstring_contents string_content */
11960#line 4769 "ripper.y"
11961 {
11962#if 0
11963 (yyval.val) = literal_concat(p, (yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
11964#endif
11965 {VALUE v1,v2,v3;v1=(yyvsp[-1].val);v2=(yyvsp[0].val);v3=dispatch2(xstring_add,v1,v2);(yyval.val)=v3;}
11966 }
11967#line 11963 "ripper.c"
11968 break;
11969
11970 case 612: /* regexp_contents: %empty */
11971#line 4778 "ripper.y"
11972 {
11973#if 0
11974 (yyval.val) = 0;
11975#endif
11976 {VALUE v1;v1=dispatch0(regexp_new);(yyval.val)=v1;}
11977#if 0
11978#endif
11979 (yyval.val) = ripper_new_yylval(p, 0, (yyval.val), 0);
11980
11981 }
11982#line 11978 "ripper.c"
11983 break;
11984
11985 case 613: /* regexp_contents: regexp_contents string_content */
11986#line 4789 "ripper.y"
11987 {
11988#if 0
11989 NODE *head = (yyvsp[-1].val), *tail = (yyvsp[0].val);
11990 if (!head) {
11991 (yyval.val) = tail;
11992 }
11993 else if (!tail) {
11994 (yyval.val) = head;
11995 }
11996 else {
11997 switch (nd_type(head)) {
11998 case NODE_STR:
11999 nd_set_type(head, NODE_DSTR);
12000 break;
12001 case NODE_DSTR:
12002 break;
12003 default:
12004 head = list_append(p, NEW_DSTR(Qnil, &(yyloc)), head);
12005 break;
12006 }
12007 (yyval.val) = list_append(p, head, tail);
12008 }
12009#endif
12010 VALUE s1 = 1, s2 = 0, n1 = (yyvsp[-1].val), n2 = (yyvsp[0].val);
12011 if (ripper_is_node_yylval(n1)) {
12012 s1 = RNODE(n1)->nd_cval;
12013 n1 = RNODE(n1)->nd_rval;
12014 }
12015 if (ripper_is_node_yylval(n2)) {
12016 s2 = RNODE(n2)->nd_cval;
12017 n2 = RNODE(n2)->nd_rval;
12018 }
12019 (yyval.val) = dispatch2(regexp_add, n1, n2);
12020 if (!s1 && s2) {
12021 (yyval.val) = ripper_new_yylval(p, 0, (yyval.val), s2);
12022 }
12023
12024 }
12025#line 12021 "ripper.c"
12026 break;
12027
12028 case 614: /* string_content: "literal content" */
12029#line 4830 "ripper.y"
12030 {(yyval.val)=ripper_new_yylval(p, 0, get_value((yyvsp[0].val)), (yyvsp[0].val));}
12031#line 12027 "ripper.c"
12032 break;
12033
12034 case 615: /* @41: %empty */
12035#line 4832 "ripper.y"
12036 {
12037 /* need to backup p->lex.strterm so that a string literal `%&foo,#$&,bar&` can be parsed */
12038 (yyval.strterm) = p->lex.strterm;
12039 p->lex.strterm = 0;
12040 SET_LEX_STATE(EXPR_BEG);
12041 }
12042#line 12038 "ripper.c"
12043 break;
12044
12045 case 616: /* string_content: tSTRING_DVAR @41 string_dvar */
12046#line 4839 "ripper.y"
12047 {
12048 p->lex.strterm = (yyvsp[-1].strterm);
12049#if 0
12050 (yyval.val) = NEW_EVSTR((yyvsp[0].val), &(yyloc));
12051 nd_set_line((yyval.val), (yylsp[0]).end_pos.lineno);
12052#endif
12053 {VALUE v1,v2;v1=(yyvsp[0].val);v2=dispatch1(string_dvar,v1);(yyval.val)=v2;}
12054 }
12055#line 12051 "ripper.c"
12056 break;
12057
12058 case 617: /* $@42: %empty */
12059#line 4848 "ripper.y"
12060 {
12061 CMDARG_PUSH(0);
12062 COND_PUSH(0);
12063 }
12064#line 12060 "ripper.c"
12065 break;
12066
12067 case 618: /* @43: %empty */
12068#line 4852 "ripper.y"
12069 {
12070 /* need to backup p->lex.strterm so that a string literal `%!foo,#{ !0 },bar!` can be parsed */
12071 (yyval.strterm) = p->lex.strterm;
12072 p->lex.strterm = 0;
12073 }
12074#line 12070 "ripper.c"
12075 break;
12076
12077 case 619: /* @44: %empty */
12078#line 4857 "ripper.y"
12079 {
12080 (yyval.num) = p->lex.state;
12081 SET_LEX_STATE(EXPR_BEG);
12082 }
12083#line 12079 "ripper.c"
12084 break;
12085
12086 case 620: /* @45: %empty */
12087#line 4861 "ripper.y"
12088 {
12089 (yyval.num) = p->lex.brace_nest;
12090 p->lex.brace_nest = 0;
12091 }
12092#line 12088 "ripper.c"
12093 break;
12094
12095 case 621: /* @46: %empty */
12096#line 4865 "ripper.y"
12097 {
12098 (yyval.num) = p->heredoc_indent;
12099 p->heredoc_indent = 0;
12100 }
12101#line 12097 "ripper.c"
12102 break;
12103
12104 case 622: /* string_content: tSTRING_DBEG $@42 @43 @44 @45 @46 compstmt "'}'" */
12105#line 4870 "ripper.y"
12106 {
12107 COND_POP();
12108 CMDARG_POP();
12109 p->lex.strterm = (yyvsp[-5].strterm);
12110 SET_LEX_STATE((yyvsp[-4].num));
12111 p->lex.brace_nest = (yyvsp[-3].num);
12112 p->heredoc_indent = (yyvsp[-2].num);
12113 p->heredoc_line_indent = -1;
12114#if 0
12115 if ((yyvsp[-1].val)) (yyvsp[-1].val)->flags &= ~NODE_FL_NEWLINE;
12116 (yyval.val) = new_evstr(p, (yyvsp[-1].val), &(yyloc));
12117#endif
12118 {VALUE v1,v2;v1=(yyvsp[-1].val);v2=dispatch1(string_embexpr,v1);(yyval.val)=v2;}
12119 }
12120#line 12116 "ripper.c"
12121 break;
12122
12123 case 623: /* string_dvar: "global variable" */
12124#line 4887 "ripper.y"
12125 {
12126#if 0
12127 (yyval.val) = NEW_GVAR((yyvsp[0].val), &(yyloc));
12128#endif
12129 {VALUE v1,v2;v1=(yyvsp[0].val);v2=dispatch1(var_ref,v1);(yyval.val)=v2;}
12130 }
12131#line 12127 "ripper.c"
12132 break;
12133
12134 case 624: /* string_dvar: "instance variable" */
12135#line 4894 "ripper.y"
12136 {
12137#if 0
12138 (yyval.val) = NEW_IVAR((yyvsp[0].val), &(yyloc));
12139#endif
12140 {VALUE v1,v2;v1=(yyvsp[0].val);v2=dispatch1(var_ref,v1);(yyval.val)=v2;}
12141 }
12142#line 12138 "ripper.c"
12143 break;
12144
12145 case 625: /* string_dvar: "class variable" */
12146#line 4901 "ripper.y"
12147 {
12148#if 0
12149 (yyval.val) = NEW_CVAR((yyvsp[0].val), &(yyloc));
12150#endif
12151 {VALUE v1,v2;v1=(yyvsp[0].val);v2=dispatch1(var_ref,v1);(yyval.val)=v2;}
12152 }
12153#line 12149 "ripper.c"
12154 break;
12155
12156 case 629: /* ssym: "symbol literal" sym */
12157#line 4915 "ripper.y"
12158 {
12159 SET_LEX_STATE(EXPR_END);
12160#if 0
12161 (yyval.val) = NEW_LIT(ID2SYM((yyvsp[0].val)), &(yyloc));
12162#endif
12163 {VALUE v1,v2,v3,v4;v1=(yyvsp[0].val);v2=dispatch1(symbol,v1);v3=v2;v4=dispatch1(symbol_literal,v3);(yyval.val)=v4;}
12164 }
12165#line 12161 "ripper.c"
12166 break;
12167
12168 case 634: /* dsym: "symbol literal" string_contents "terminator" */
12169#line 4931 "ripper.y"
12170 {
12171 SET_LEX_STATE(EXPR_END);
12172#if 0
12173 (yyval.val) = dsym_node(p, (yyvsp[-1].val), &(yyloc));
12174#endif
12175 {VALUE v1,v2;v1=(yyvsp[-1].val);v2=dispatch1(dyna_symbol,v1);(yyval.val)=v2;}
12176 }
12177#line 12173 "ripper.c"
12178 break;
12179
12180 case 636: /* numeric: tUMINUS_NUM simple_numeric */
12181#line 4942 "ripper.y"
12182 {
12183#if 0
12184 (yyval.val) = (yyvsp[0].val);
12185 RB_OBJ_WRITE(p->ast, &(yyval.val)->nd_lit, negate_lit(p, (yyval.val)->nd_lit));
12186#endif
12187 {VALUE v1,v2,v3;v1=ID2VAL(idUMinus);v2=(yyvsp[0].val);v3=dispatch2(unary,v1,v2);(yyval.val)=v3;}
12188 }
12189#line 12185 "ripper.c"
12190 break;
12191
12192 case 646: /* keyword_variable: "`nil'" */
12193#line 4964 "ripper.y"
12194 {(yyval.val) = KWD2EID(nil, (yyvsp[0].val));}
12195#line 12191 "ripper.c"
12196 break;
12197
12198 case 647: /* keyword_variable: "`self'" */
12199#line 4965 "ripper.y"
12200 {(yyval.val) = KWD2EID(self, (yyvsp[0].val));}
12201#line 12197 "ripper.c"
12202 break;
12203
12204 case 648: /* keyword_variable: "`true'" */
12205#line 4966 "ripper.y"
12206 {(yyval.val) = KWD2EID(true, (yyvsp[0].val));}
12207#line 12203 "ripper.c"
12208 break;
12209
12210 case 649: /* keyword_variable: "`false'" */
12211#line 4967 "ripper.y"
12212 {(yyval.val) = KWD2EID(false, (yyvsp[0].val));}
12213#line 12209 "ripper.c"
12214 break;
12215
12216 case 650: /* keyword_variable: "`__FILE__'" */
12217#line 4968 "ripper.y"
12218 {(yyval.val) = KWD2EID(_FILE__, (yyvsp[0].val));}
12219#line 12215 "ripper.c"
12220 break;
12221
12222 case 651: /* keyword_variable: "`__LINE__'" */
12223#line 4969 "ripper.y"
12224 {(yyval.val) = KWD2EID(_LINE__, (yyvsp[0].val));}
12225#line 12221 "ripper.c"
12226 break;
12227
12228 case 652: /* keyword_variable: "`__ENCODING__'" */
12229#line 4970 "ripper.y"
12230 {(yyval.val) = KWD2EID(_ENCODING__, (yyvsp[0].val));}
12231#line 12227 "ripper.c"
12232 break;
12233
12234 case 653: /* var_ref: user_variable */
12235#line 4974 "ripper.y"
12236 {
12237#if 0
12238 if (!((yyval.val) = gettable(p, (yyvsp[0].val), &(yyloc)))) (yyval.val) = NEW_BEGIN(0, &(yyloc));
12239#endif
12240 if (id_is_var(p, get_id((yyvsp[0].val)))) {
12241 (yyval.val) = dispatch1(var_ref, (yyvsp[0].val));
12242 }
12243 else {
12244 (yyval.val) = dispatch1(vcall, (yyvsp[0].val));
12245 }
12246
12247 }
12248#line 12244 "ripper.c"
12249 break;
12250
12251 case 654: /* var_ref: keyword_variable */
12252#line 4987 "ripper.y"
12253 {
12254#if 0
12255 if (!((yyval.val) = gettable(p, (yyvsp[0].val), &(yyloc)))) (yyval.val) = NEW_BEGIN(0, &(yyloc));
12256#endif
12257 {VALUE v1,v2;v1=(yyvsp[0].val);v2=dispatch1(var_ref,v1);(yyval.val)=v2;}
12258 }
12259#line 12255 "ripper.c"
12260 break;
12261
12262 case 655: /* var_lhs: user_variable */
12263#line 4996 "ripper.y"
12264 {
12265#if 0
12266 (yyval.val) = assignable(p, (yyvsp[0].val), 0, &(yyloc));
12267#endif
12268 (yyval.val)=assignable(p, var_field(p, (yyvsp[0].val)));
12269 }
12270#line 12266 "ripper.c"
12271 break;
12272
12273 case 656: /* var_lhs: keyword_variable */
12274#line 5003 "ripper.y"
12275 {
12276#if 0
12277 (yyval.val) = assignable(p, (yyvsp[0].val), 0, &(yyloc));
12278#endif
12279 (yyval.val)=assignable(p, var_field(p, (yyvsp[0].val)));
12280 }
12281#line 12277 "ripper.c"
12282 break;
12283
12284 case 659: /* $@47: %empty */
12285#line 5016 "ripper.y"
12286 {
12287 SET_LEX_STATE(EXPR_BEG);
12288 p->command_start = TRUE;
12289 }
12290#line 12286 "ripper.c"
12291 break;
12292
12293 case 660: /* superclass: '<' $@47 expr_value term */
12294#line 5021 "ripper.y"
12295 {
12296 (yyval.val) = (yyvsp[-1].val);
12297 }
12298#line 12294 "ripper.c"
12299 break;
12300
12301 case 661: /* superclass: %empty */
12302#line 5025 "ripper.y"
12303 {
12304#if 0
12305 (yyval.val) = 0;
12306#endif
12307 (yyval.val)=Qnil;
12308 }
12309#line 12305 "ripper.c"
12310 break;
12311
12312 case 664: /* f_paren_args: '(' f_args rparen */
12313#line 5036 "ripper.y"
12314 {
12315#if 0
12316 (yyval.val) = (yyvsp[-1].val);
12317#endif
12318 {VALUE v1,v2;v1=(yyvsp[-1].val);v2=dispatch1(paren,v1);(yyval.val)=v2;}
12319 SET_LEX_STATE(EXPR_BEG);
12320 p->command_start = TRUE;
12321 }
12322#line 12318 "ripper.c"
12323 break;
12324
12325 case 665: /* f_paren_args: '(' f_arg ',' args_forward rparen */
12326#line 5045 "ripper.y"
12327 {
12328 add_forwarding_args(p);
12329#if 0
12330 (yyval.val) = new_args_forward_def(p, (yyvsp[-3].val), &(yyloc));
12331#endif
12332 {VALUE v1,v2,v3,v4,v5,v6,v7,v8,v9,v10;v1=(yyvsp[-3].val);v2=Qnone;v3=(yyvsp[-1].val);v4=Qnone;v5=Qnone;v6=Qnone;v7=Qnone;v8=dispatch7(params,v1,v2,v3,v4,v5,v6,v7);v9=v8;v10=dispatch1(paren,v9);(yyval.val)=v10;}
12333 SET_LEX_STATE(EXPR_BEG);
12334 p->command_start = TRUE;
12335 }
12336#line 12332 "ripper.c"
12337 break;
12338
12339 case 666: /* f_paren_args: '(' args_forward rparen */
12340#line 5055 "ripper.y"
12341 {
12342 add_forwarding_args(p);
12343#if 0
12344 (yyval.val) = new_args_forward_def(p, 0, &(yyloc));
12345#endif
12346 {VALUE v1,v2,v3,v4,v5,v6,v7,v8,v9,v10;v1=Qnone;v2=Qnone;v3=(yyvsp[-1].val);v4=Qnone;v5=Qnone;v6=Qnone;v7=Qnone;v8=dispatch7(params,v1,v2,v3,v4,v5,v6,v7);v9=v8;v10=dispatch1(paren,v9);(yyval.val)=v10;}
12347 SET_LEX_STATE(EXPR_BEG);
12348 p->command_start = TRUE;
12349 }
12350#line 12346 "ripper.c"
12351 break;
12352
12353 case 668: /* @48: %empty */
12354#line 5067 "ripper.y"
12355 {
12356 (yyval.ctxt) = p->ctxt;
12357 p->ctxt.in_kwarg = 1;
12358 SET_LEX_STATE(p->lex.state|EXPR_LABEL); /* force for args */
12359 }
12360#line 12356 "ripper.c"
12361 break;
12362
12363 case 669: /* f_arglist: @48 f_args term */
12364#line 5073 "ripper.y"
12365 {
12366 p->ctxt.in_kwarg = (yyvsp[-2].ctxt).in_kwarg;
12367 (yyval.val) = (yyvsp[-1].val);
12368 SET_LEX_STATE(EXPR_BEG);
12369 p->command_start = TRUE;
12370 }
12371#line 12367 "ripper.c"
12372 break;
12373
12374 case 670: /* args_tail: f_kwarg ',' f_kwrest opt_f_block_arg */
12375#line 5082 "ripper.y"
12376 {
12377 (yyval.val) = new_args_tail(p, (yyvsp[-3].val), (yyvsp[-1].val), (yyvsp[0].val), &(yylsp[-1]));
12378 }
12379#line 12375 "ripper.c"
12380 break;
12381
12382 case 671: /* args_tail: f_kwarg opt_f_block_arg */
12383#line 5086 "ripper.y"
12384 {
12385 (yyval.val) = new_args_tail(p, (yyvsp[-1].val), Qnone, (yyvsp[0].val), &(yylsp[-1]));
12386 }
12387#line 12383 "ripper.c"
12388 break;
12389
12390 case 672: /* args_tail: f_any_kwrest opt_f_block_arg */
12391#line 5090 "ripper.y"
12392 {
12393 (yyval.val) = new_args_tail(p, Qnone, (yyvsp[-1].val), (yyvsp[0].val), &(yylsp[-1]));
12394 }
12395#line 12391 "ripper.c"
12396 break;
12397
12398 case 673: /* args_tail: f_block_arg */
12399#line 5094 "ripper.y"
12400 {
12401 (yyval.val) = new_args_tail(p, Qnone, Qnone, (yyvsp[0].val), &(yylsp[0]));
12402 }
12403#line 12399 "ripper.c"
12404 break;
12405
12406 case 674: /* opt_args_tail: ',' args_tail */
12407#line 5100 "ripper.y"
12408 {
12409 (yyval.val) = (yyvsp[0].val);
12410 }
12411#line 12407 "ripper.c"
12412 break;
12413
12414 case 675: /* opt_args_tail: %empty */
12415#line 5104 "ripper.y"
12416 {
12417 (yyval.val) = new_args_tail(p, Qnone, Qnone, Qnone, &(yylsp[0]));
12418 }
12419#line 12415 "ripper.c"
12420 break;
12421
12422 case 676: /* f_args: f_arg ',' f_optarg ',' f_rest_arg opt_args_tail */
12423#line 5110 "ripper.y"
12424 {
12425 (yyval.val) = new_args(p, (yyvsp[-5].val), (yyvsp[-3].val), (yyvsp[-1].val), Qnone, (yyvsp[0].val), &(yyloc));
12426 }
12427#line 12423 "ripper.c"
12428 break;
12429
12430 case 677: /* f_args: f_arg ',' f_optarg ',' f_rest_arg ',' f_arg opt_args_tail */
12431#line 5114 "ripper.y"
12432 {
12433 (yyval.val) = new_args(p, (yyvsp[-7].val), (yyvsp[-5].val), (yyvsp[-3].val), (yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
12434 }
12435#line 12431 "ripper.c"
12436 break;
12437
12438 case 678: /* f_args: f_arg ',' f_optarg opt_args_tail */
12439#line 5118 "ripper.y"
12440 {
12441 (yyval.val) = new_args(p, (yyvsp[-3].val), (yyvsp[-1].val), Qnone, Qnone, (yyvsp[0].val), &(yyloc));
12442 }
12443#line 12439 "ripper.c"
12444 break;
12445
12446 case 679: /* f_args: f_arg ',' f_optarg ',' f_arg opt_args_tail */
12447#line 5122 "ripper.y"
12448 {
12449 (yyval.val) = new_args(p, (yyvsp[-5].val), (yyvsp[-3].val), Qnone, (yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
12450 }
12451#line 12447 "ripper.c"
12452 break;
12453
12454 case 680: /* f_args: f_arg ',' f_rest_arg opt_args_tail */
12455#line 5126 "ripper.y"
12456 {
12457 (yyval.val) = new_args(p, (yyvsp[-3].val), Qnone, (yyvsp[-1].val), Qnone, (yyvsp[0].val), &(yyloc));
12458 }
12459#line 12455 "ripper.c"
12460 break;
12461
12462 case 681: /* f_args: f_arg ',' f_rest_arg ',' f_arg opt_args_tail */
12463#line 5130 "ripper.y"
12464 {
12465 (yyval.val) = new_args(p, (yyvsp[-5].val), Qnone, (yyvsp[-3].val), (yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
12466 }
12467#line 12463 "ripper.c"
12468 break;
12469
12470 case 682: /* f_args: f_arg opt_args_tail */
12471#line 5134 "ripper.y"
12472 {
12473 (yyval.val) = new_args(p, (yyvsp[-1].val), Qnone, Qnone, Qnone, (yyvsp[0].val), &(yyloc));
12474 }
12475#line 12471 "ripper.c"
12476 break;
12477
12478 case 683: /* f_args: f_optarg ',' f_rest_arg opt_args_tail */
12479#line 5138 "ripper.y"
12480 {
12481 (yyval.val) = new_args(p, Qnone, (yyvsp[-3].val), (yyvsp[-1].val), Qnone, (yyvsp[0].val), &(yyloc));
12482 }
12483#line 12479 "ripper.c"
12484 break;
12485
12486 case 684: /* f_args: f_optarg ',' f_rest_arg ',' f_arg opt_args_tail */
12487#line 5142 "ripper.y"
12488 {
12489 (yyval.val) = new_args(p, Qnone, (yyvsp[-5].val), (yyvsp[-3].val), (yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
12490 }
12491#line 12487 "ripper.c"
12492 break;
12493
12494 case 685: /* f_args: f_optarg opt_args_tail */
12495#line 5146 "ripper.y"
12496 {
12497 (yyval.val) = new_args(p, Qnone, (yyvsp[-1].val), Qnone, Qnone, (yyvsp[0].val), &(yyloc));
12498 }
12499#line 12495 "ripper.c"
12500 break;
12501
12502 case 686: /* f_args: f_optarg ',' f_arg opt_args_tail */
12503#line 5150 "ripper.y"
12504 {
12505 (yyval.val) = new_args(p, Qnone, (yyvsp[-3].val), Qnone, (yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
12506 }
12507#line 12503 "ripper.c"
12508 break;
12509
12510 case 687: /* f_args: f_rest_arg opt_args_tail */
12511#line 5154 "ripper.y"
12512 {
12513 (yyval.val) = new_args(p, Qnone, Qnone, (yyvsp[-1].val), Qnone, (yyvsp[0].val), &(yyloc));
12514 }
12515#line 12511 "ripper.c"
12516 break;
12517
12518 case 688: /* f_args: f_rest_arg ',' f_arg opt_args_tail */
12519#line 5158 "ripper.y"
12520 {
12521 (yyval.val) = new_args(p, Qnone, Qnone, (yyvsp[-3].val), (yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
12522 }
12523#line 12519 "ripper.c"
12524 break;
12525
12526 case 689: /* f_args: args_tail */
12527#line 5162 "ripper.y"
12528 {
12529 (yyval.val) = new_args(p, Qnone, Qnone, Qnone, Qnone, (yyvsp[0].val), &(yyloc));
12530 }
12531#line 12527 "ripper.c"
12532 break;
12533
12534 case 690: /* f_args: %empty */
12535#line 5166 "ripper.y"
12536 {
12537 (yyval.val) = new_args_tail(p, Qnone, Qnone, Qnone, &(yylsp[0]));
12538 (yyval.val) = new_args(p, Qnone, Qnone, Qnone, Qnone, (yyval.val), &(yylsp[0]));
12539 }
12540#line 12536 "ripper.c"
12541 break;
12542
12543 case 691: /* args_forward: "(..." */
12544#line 5173 "ripper.y"
12545 {
12546#if 0
12547 (yyval.val) = idDot3;
12548#endif
12549 {VALUE v1;v1=dispatch0(args_forward);(yyval.val)=v1;}
12550 }
12551#line 12547 "ripper.c"
12552 break;
12553
12554 case 692: /* f_bad_arg: "constant" */
12555#line 5182 "ripper.y"
12556 {
12557 static const char mesg[] = "formal argument cannot be a constant";
12558#if 0
12559 yyerror1(&(yylsp[0]), mesg);
12560 (yyval.val) = 0;
12561#endif
12562 {VALUE v1,v2,v3;v1=ERR_MESG();v2=(yyvsp[0].val);v3=dispatch2(param_error,v1,v2);(yyval.val)=v3;}ripper_error(p);
12563 }
12564#line 12560 "ripper.c"
12565 break;
12566
12567 case 693: /* f_bad_arg: "instance variable" */
12568#line 5191 "ripper.y"
12569 {
12570 static const char mesg[] = "formal argument cannot be an instance variable";
12571#if 0
12572 yyerror1(&(yylsp[0]), mesg);
12573 (yyval.val) = 0;
12574#endif
12575 {VALUE v1,v2,v3;v1=ERR_MESG();v2=(yyvsp[0].val);v3=dispatch2(param_error,v1,v2);(yyval.val)=v3;}ripper_error(p);
12576 }
12577#line 12573 "ripper.c"
12578 break;
12579
12580 case 694: /* f_bad_arg: "global variable" */
12581#line 5200 "ripper.y"
12582 {
12583 static const char mesg[] = "formal argument cannot be a global variable";
12584#if 0
12585 yyerror1(&(yylsp[0]), mesg);
12586 (yyval.val) = 0;
12587#endif
12588 {VALUE v1,v2,v3;v1=ERR_MESG();v2=(yyvsp[0].val);v3=dispatch2(param_error,v1,v2);(yyval.val)=v3;}ripper_error(p);
12589 }
12590#line 12586 "ripper.c"
12591 break;
12592
12593 case 695: /* f_bad_arg: "class variable" */
12594#line 5209 "ripper.y"
12595 {
12596 static const char mesg[] = "formal argument cannot be a class variable";
12597#if 0
12598 yyerror1(&(yylsp[0]), mesg);
12599 (yyval.val) = 0;
12600#endif
12601 {VALUE v1,v2,v3;v1=ERR_MESG();v2=(yyvsp[0].val);v3=dispatch2(param_error,v1,v2);(yyval.val)=v3;}ripper_error(p);
12602 }
12603#line 12599 "ripper.c"
12604 break;
12605
12606 case 697: /* f_norm_arg: "local variable or method" */
12607#line 5221 "ripper.y"
12608 {
12609 formal_argument(p, (yyvsp[0].val));
12611 (yyval.val) = (yyvsp[0].val);
12612 }
12613#line 12609 "ripper.c"
12614 break;
12615
12616 case 698: /* f_arg_asgn: f_norm_arg */
12617#line 5229 "ripper.y"
12618 {
12619 ID id = get_id((yyvsp[0].val));
12620 arg_var(p, id);
12621 p->cur_arg = id;
12622 (yyval.val) = (yyvsp[0].val);
12623 }
12624#line 12620 "ripper.c"
12625 break;
12626
12627 case 699: /* f_arg_item: f_arg_asgn */
12628#line 5238 "ripper.y"
12629 {
12630 p->cur_arg = 0;
12631#if 0
12632 (yyval.val) = NEW_ARGS_AUX((yyvsp[0].val), 1, &NULL_LOC);
12633#endif
12634 (yyval.val)=get_value((yyvsp[0].val));
12635 }
12636#line 12632 "ripper.c"
12637 break;
12638
12639 case 700: /* f_arg_item: "(" f_margs rparen */
12640#line 5246 "ripper.y"
12641 {
12642#if 0
12643 ID tid = internal_id(p);
12644 YYLTYPE loc;
12645 loc.beg_pos = (yylsp[-1]).beg_pos;
12646 loc.end_pos = (yylsp[-1]).beg_pos;
12647 arg_var(p, tid);
12648 if (dyna_in_block(p)) {
12649 (yyvsp[-1].val)->nd_value = NEW_DVAR(tid, &loc);
12650 }
12651 else {
12652 (yyvsp[-1].val)->nd_value = NEW_LVAR(tid, &loc);
12653 }
12654 (yyval.val) = NEW_ARGS_AUX(tid, 1, &NULL_LOC);
12655 (yyval.val)->nd_next = (yyvsp[-1].val);
12656#endif
12657 {VALUE v1,v2;v1=(yyvsp[-1].val);v2=dispatch1(mlhs_paren,v1);(yyval.val)=v2;}
12658 }
12659#line 12655 "ripper.c"
12660 break;
12661
12662 case 701: /* f_arg: f_arg_item */
12663#line 5267 "ripper.y"
12664 {(yyval.val)=rb_ary_new3(1, get_value((yyvsp[0].val)));}
12665#line 12661 "ripper.c"
12666 break;
12667
12668 case 702: /* f_arg: f_arg ',' f_arg_item */
12669#line 5269 "ripper.y"
12670 {
12671#if 0
12672 (yyval.val) = (yyvsp[-2].val);
12673 (yyval.val)->nd_plen++;
12674 (yyval.val)->nd_next = block_append(p, (yyval.val)->nd_next, (yyvsp[0].val)->nd_next);
12675 rb_discard_node(p, (yyvsp[0].val));
12676#endif
12677 (yyval.val)=rb_ary_push((yyvsp[-2].val), get_value((yyvsp[0].val)));
12678 }
12679#line 12675 "ripper.c"
12680 break;
12681
12682 case 703: /* f_label: "label" */
12683#line 5282 "ripper.y"
12684 {
12685 arg_var(p, formal_argument(p, (yyvsp[0].val)));
12686 p->cur_arg = get_id((yyvsp[0].val));
12688 (yyval.val) = (yyvsp[0].val);
12689 }
12690#line 12686 "ripper.c"
12691 break;
12692
12693 case 704: /* f_kw: f_label arg_value */
12694#line 5291 "ripper.y"
12695 {
12696 p->cur_arg = 0;
12697#if 0
12698 (yyval.val) = new_kw_arg(p, assignable(p, (yyvsp[-1].val), (yyvsp[0].val), &(yyloc)), &(yyloc));
12699#endif
12700 (yyval.val)=rb_assoc_new(get_value(assignable(p, (yyvsp[-1].val))), get_value((yyvsp[0].val)));
12701 }
12702#line 12698 "ripper.c"
12703 break;
12704
12705 case 705: /* f_kw: f_label */
12706#line 5299 "ripper.y"
12707 {
12708 p->cur_arg = 0;
12709#if 0
12710 (yyval.val) = new_kw_arg(p, assignable(p, (yyvsp[0].val), NODE_SPECIAL_REQUIRED_KEYWORD, &(yyloc)), &(yyloc));
12711#endif
12712 (yyval.val)=rb_assoc_new(get_value(assignable(p, (yyvsp[0].val))), 0);
12713 }
12714#line 12710 "ripper.c"
12715 break;
12716
12717 case 706: /* f_block_kw: f_label primary_value */
12718#line 5309 "ripper.y"
12719 {
12720#if 0
12721 (yyval.val) = new_kw_arg(p, assignable(p, (yyvsp[-1].val), (yyvsp[0].val), &(yyloc)), &(yyloc));
12722#endif
12723 (yyval.val)=rb_assoc_new(get_value(assignable(p, (yyvsp[-1].val))), get_value((yyvsp[0].val)));
12724 }
12725#line 12721 "ripper.c"
12726 break;
12727
12728 case 707: /* f_block_kw: f_label */
12729#line 5316 "ripper.y"
12730 {
12731#if 0
12732 (yyval.val) = new_kw_arg(p, assignable(p, (yyvsp[0].val), NODE_SPECIAL_REQUIRED_KEYWORD, &(yyloc)), &(yyloc));
12733#endif
12734 (yyval.val)=rb_assoc_new(get_value(assignable(p, (yyvsp[0].val))), 0);
12735 }
12736#line 12732 "ripper.c"
12737 break;
12738
12739 case 708: /* f_block_kwarg: f_block_kw */
12740#line 5325 "ripper.y"
12741 {
12742#if 0
12743 (yyval.val) = (yyvsp[0].val);
12744#endif
12745 (yyval.val)=rb_ary_new3(1, get_value((yyvsp[0].val)));
12746 }
12747#line 12743 "ripper.c"
12748 break;
12749
12750 case 709: /* f_block_kwarg: f_block_kwarg ',' f_block_kw */
12751#line 5332 "ripper.y"
12752 {
12753#if 0
12754 (yyval.val) = kwd_append((yyvsp[-2].val), (yyvsp[0].val));
12755#endif
12756 (yyval.val)=rb_ary_push((yyvsp[-2].val), get_value((yyvsp[0].val)));
12757 }
12758#line 12754 "ripper.c"
12759 break;
12760
12761 case 710: /* f_kwarg: f_kw */
12762#line 5342 "ripper.y"
12763 {
12764#if 0
12765 (yyval.val) = (yyvsp[0].val);
12766#endif
12767 (yyval.val)=rb_ary_new3(1, get_value((yyvsp[0].val)));
12768 }
12769#line 12765 "ripper.c"
12770 break;
12771
12772 case 711: /* f_kwarg: f_kwarg ',' f_kw */
12773#line 5349 "ripper.y"
12774 {
12775#if 0
12776 (yyval.val) = kwd_append((yyvsp[-2].val), (yyvsp[0].val));
12777#endif
12778 (yyval.val)=rb_ary_push((yyvsp[-2].val), get_value((yyvsp[0].val)));
12779 }
12780#line 12776 "ripper.c"
12781 break;
12782
12783 case 714: /* f_no_kwarg: kwrest_mark "`nil'" */
12784#line 5362 "ripper.y"
12785 {
12786#if 0
12787#endif
12788 {VALUE v1,v2;v1=Qnil;v2=dispatch1(nokw_param,v1);(yyval.val)=v2;}
12789 }
12790#line 12786 "ripper.c"
12791 break;
12792
12793 case 715: /* f_kwrest: kwrest_mark "local variable or method" */
12794#line 5370 "ripper.y"
12795 {
12796 arg_var(p, shadowing_lvar(p, get_id((yyvsp[0].val))));
12797#if 0
12798 (yyval.val) = (yyvsp[0].val);
12799#endif
12800 {VALUE v1,v2;v1=(yyvsp[0].val);v2=dispatch1(kwrest_param,v1);(yyval.val)=v2;}
12801 }
12802#line 12798 "ripper.c"
12803 break;
12804
12805 case 716: /* f_kwrest: kwrest_mark */
12806#line 5378 "ripper.y"
12807 {
12808#if 0
12809 (yyval.val) = internal_id(p);
12810 arg_var(p, (yyval.val));
12811#endif
12812 {VALUE v1,v2;v1=Qnil;v2=dispatch1(kwrest_param,v1);(yyval.val)=v2;}
12813 }
12814#line 12810 "ripper.c"
12815 break;
12816
12817 case 717: /* f_opt: f_arg_asgn '=' arg_value */
12818#line 5388 "ripper.y"
12819 {
12820 p->cur_arg = 0;
12821#if 0
12822 (yyval.val) = NEW_OPT_ARG(0, assignable(p, (yyvsp[-2].val), (yyvsp[0].val), &(yyloc)), &(yyloc));
12823#endif
12824 (yyval.val)=rb_assoc_new(get_value(assignable(p, (yyvsp[-2].val))), get_value((yyvsp[0].val)));
12825 }
12826#line 12822 "ripper.c"
12827 break;
12828
12829 case 718: /* f_block_opt: f_arg_asgn '=' primary_value */
12830#line 5398 "ripper.y"
12831 {
12832 p->cur_arg = 0;
12833#if 0
12834 (yyval.val) = NEW_OPT_ARG(0, assignable(p, (yyvsp[-2].val), (yyvsp[0].val), &(yyloc)), &(yyloc));
12835#endif
12836 (yyval.val)=rb_assoc_new(get_value(assignable(p, (yyvsp[-2].val))), get_value((yyvsp[0].val)));
12837 }
12838#line 12834 "ripper.c"
12839 break;
12840
12841 case 719: /* f_block_optarg: f_block_opt */
12842#line 5408 "ripper.y"
12843 {
12844#if 0
12845 (yyval.val) = (yyvsp[0].val);
12846#endif
12847 (yyval.val)=rb_ary_new3(1, get_value((yyvsp[0].val)));
12848 }
12849#line 12845 "ripper.c"
12850 break;
12851
12852 case 720: /* f_block_optarg: f_block_optarg ',' f_block_opt */
12853#line 5415 "ripper.y"
12854 {
12855#if 0
12856 (yyval.val) = opt_arg_append((yyvsp[-2].val), (yyvsp[0].val));
12857#endif
12858 (yyval.val)=rb_ary_push((yyvsp[-2].val), get_value((yyvsp[0].val)));
12859 }
12860#line 12856 "ripper.c"
12861 break;
12862
12863 case 721: /* f_optarg: f_opt */
12864#line 5424 "ripper.y"
12865 {
12866#if 0
12867 (yyval.val) = (yyvsp[0].val);
12868#endif
12869 (yyval.val)=rb_ary_new3(1, get_value((yyvsp[0].val)));
12870 }
12871#line 12867 "ripper.c"
12872 break;
12873
12874 case 722: /* f_optarg: f_optarg ',' f_opt */
12875#line 5431 "ripper.y"
12876 {
12877#if 0
12878 (yyval.val) = opt_arg_append((yyvsp[-2].val), (yyvsp[0].val));
12879#endif
12880 (yyval.val)=rb_ary_push((yyvsp[-2].val), get_value((yyvsp[0].val)));
12881 }
12882#line 12878 "ripper.c"
12883 break;
12884
12885 case 725: /* f_rest_arg: restarg_mark "local variable or method" */
12886#line 5444 "ripper.y"
12887 {
12888 arg_var(p, shadowing_lvar(p, get_id((yyvsp[0].val))));
12889#if 0
12890 (yyval.val) = (yyvsp[0].val);
12891#endif
12892 {VALUE v1,v2;v1=(yyvsp[0].val);v2=dispatch1(rest_param,v1);(yyval.val)=v2;}
12893 }
12894#line 12890 "ripper.c"
12895 break;
12896
12897 case 726: /* f_rest_arg: restarg_mark */
12898#line 5452 "ripper.y"
12899 {
12900#if 0
12901 (yyval.val) = internal_id(p);
12902 arg_var(p, (yyval.val));
12903#endif
12904 {VALUE v1,v2;v1=Qnil;v2=dispatch1(rest_param,v1);(yyval.val)=v2;}
12905 }
12906#line 12902 "ripper.c"
12907 break;
12908
12909 case 729: /* f_block_arg: blkarg_mark "local variable or method" */
12910#line 5466 "ripper.y"
12911 {
12912 arg_var(p, shadowing_lvar(p, get_id((yyvsp[0].val))));
12913#if 0
12914 (yyval.val) = (yyvsp[0].val);
12915#endif
12916 {VALUE v1,v2;v1=(yyvsp[0].val);v2=dispatch1(blockarg,v1);(yyval.val)=v2;}
12917 }
12918#line 12914 "ripper.c"
12919 break;
12920
12921 case 730: /* opt_f_block_arg: ',' f_block_arg */
12922#line 5476 "ripper.y"
12923 {
12924 (yyval.val) = (yyvsp[0].val);
12925 }
12926#line 12922 "ripper.c"
12927 break;
12928
12929 case 731: /* opt_f_block_arg: none */
12930#line 5480 "ripper.y"
12931 {
12932 (yyval.val) = Qnull;
12933 }
12934#line 12930 "ripper.c"
12935 break;
12936
12937 case 732: /* singleton: var_ref */
12938#line 5486 "ripper.y"
12939 {
12940 value_expr((yyvsp[0].val));
12941 (yyval.val) = (yyvsp[0].val);
12942 }
12943#line 12939 "ripper.c"
12944 break;
12945
12946 case 733: /* $@49: %empty */
12947#line 5490 "ripper.y"
12948 {SET_LEX_STATE(EXPR_BEG);}
12949#line 12945 "ripper.c"
12950 break;
12951
12952 case 734: /* singleton: '(' $@49 expr rparen */
12953#line 5491 "ripper.y"
12954 {
12955#if 0
12956 switch (nd_type((yyvsp[-1].val))) {
12957 case NODE_STR:
12958 case NODE_DSTR:
12959 case NODE_XSTR:
12960 case NODE_DXSTR:
12961 case NODE_DREGX:
12962 case NODE_LIT:
12963 case NODE_LIST:
12964 case NODE_ZLIST:
12965 yyerror1(&(yylsp[-1]), "can't define singleton method for literals");
12966 break;
12967 default:
12968 value_expr((yyvsp[-1].val));
12969 break;
12970 }
12971 (yyval.val) = (yyvsp[-1].val);
12972#endif
12973 {VALUE v1,v2;v1=(yyvsp[-1].val);v2=dispatch1(paren,v1);(yyval.val)=v2;}
12974 }
12975#line 12971 "ripper.c"
12976 break;
12977
12978 case 736: /* assoc_list: assocs trailer */
12979#line 5516 "ripper.y"
12980 {
12981#if 0
12982 (yyval.val) = (yyvsp[-1].val);
12983#endif
12984 {VALUE v1,v2;v1=(yyvsp[-1].val);v2=dispatch1(assoclist_from_args,v1);(yyval.val)=v2;}
12985 }
12986#line 12982 "ripper.c"
12987 break;
12988
12989 case 737: /* assocs: assoc */
12990#line 5525 "ripper.y"
12991 {(yyval.val)=rb_ary_new3(1, get_value((yyvsp[0].val)));}
12992#line 12988 "ripper.c"
12993 break;
12994
12995 case 738: /* assocs: assocs ',' assoc */
12996#line 5527 "ripper.y"
12997 {
12998#if 0
12999 NODE *assocs = (yyvsp[-2].val);
13000 NODE *tail = (yyvsp[0].val);
13001 if (!assocs) {
13002 assocs = tail;
13003 }
13004 else if (tail) {
13005 if (assocs->nd_head &&
13006 !tail->nd_head && nd_type(tail->nd_next) == NODE_LIST &&
13007 nd_type(tail->nd_next->nd_head) == NODE_HASH) {
13008 /* DSTAR */
13009 tail = tail->nd_next->nd_head->nd_head;
13010 }
13011 assocs = list_concat(assocs, tail);
13012 }
13013 (yyval.val) = assocs;
13014#endif
13015 (yyval.val)=rb_ary_push((yyvsp[-2].val), get_value((yyvsp[0].val)));
13016 }
13017#line 13013 "ripper.c"
13018 break;
13019
13020 case 739: /* assoc: arg_value "=>" arg_value */
13021#line 5550 "ripper.y"
13022 {
13023#if 0
13024 if (nd_type((yyvsp[-2].val)) == NODE_STR) {
13025 nd_set_type((yyvsp[-2].val), NODE_LIT);
13026 RB_OBJ_WRITE(p->ast, &(yyvsp[-2].val)->nd_lit, rb_fstring((yyvsp[-2].val)->nd_lit));
13027 }
13028 (yyval.val) = list_append(p, NEW_LIST((yyvsp[-2].val), &(yyloc)), (yyvsp[0].val));
13029#endif
13030 {VALUE v1,v2,v3;v1=(yyvsp[-2].val);v2=(yyvsp[0].val);v3=dispatch2(assoc_new,v1,v2);(yyval.val)=v3;}
13031 }
13032#line 13028 "ripper.c"
13033 break;
13034
13035 case 740: /* assoc: "label" arg_value */
13036#line 5561 "ripper.y"
13037 {
13038#if 0
13039 (yyval.val) = list_append(p, NEW_LIST(NEW_LIT(ID2SYM((yyvsp[-1].val)), &(yylsp[-1])), &(yyloc)), (yyvsp[0].val));
13040#endif
13041 {VALUE v1,v2,v3;v1=(yyvsp[-1].val);v2=(yyvsp[0].val);v3=dispatch2(assoc_new,v1,v2);(yyval.val)=v3;}
13042 }
13043#line 13039 "ripper.c"
13044 break;
13045
13046 case 741: /* assoc: "string literal" string_contents tLABEL_END arg_value */
13047#line 5568 "ripper.y"
13048 {
13049#if 0
13050 YYLTYPE loc = code_loc_gen(&(yylsp[-3]), &(yylsp[-1]));
13051 (yyval.val) = list_append(p, NEW_LIST(dsym_node(p, (yyvsp[-2].val), &loc), &loc), (yyvsp[0].val));
13052#endif
13053 {VALUE v1,v2,v3,v4,v5;v1=(yyvsp[-2].val);v2=dispatch1(dyna_symbol,v1);v3=v2;v4=(yyvsp[0].val);v5=dispatch2(assoc_new,v3,v4);(yyval.val)=v5;}
13054 }
13055#line 13051 "ripper.c"
13056 break;
13057
13058 case 742: /* assoc: "**arg" arg_value */
13059#line 5576 "ripper.y"
13060 {
13061#if 0
13062 if (nd_type((yyvsp[0].val)) == NODE_HASH &&
13063 !((yyvsp[0].val)->nd_head && (yyvsp[0].val)->nd_head->nd_alen)) {
13064 static VALUE empty_hash;
13065 if (!empty_hash) {
13066 empty_hash = rb_obj_freeze(rb_hash_new());
13067 rb_gc_register_mark_object(empty_hash);
13068 }
13069 (yyval.val) = list_append(p, NEW_LIST(0, &(yyloc)), NEW_LIT(empty_hash, &(yyloc)));
13070 }
13071 else
13072 (yyval.val) = list_append(p, NEW_LIST(0, &(yyloc)), (yyvsp[0].val));
13073#endif
13074 {VALUE v1,v2;v1=(yyvsp[0].val);v2=dispatch1(assoc_splat,v1);(yyval.val)=v2;}
13075 }
13076#line 13072 "ripper.c"
13077 break;
13078
13079 case 769: /* term: ';' */
13080#line 5644 "ripper.y"
13081 {yyerrok;token_flush(p);}
13082#line 13078 "ripper.c"
13083 break;
13084
13085 case 770: /* term: '\n' */
13086#line 5645 "ripper.y"
13087 {token_flush(p);}
13088#line 13084 "ripper.c"
13089 break;
13090
13091 case 772: /* terms: terms ';' */
13092#line 5649 "ripper.y"
13093 {yyerrok;}
13094#line 13090 "ripper.c"
13095 break;
13096
13097 case 773: /* none: %empty */
13098#line 5653 "ripper.y"
13099 {
13100 (yyval.val) = Qnull;
13101 }
13102#line 13098 "ripper.c"
13103 break;
13104
13105
13106#line 13102 "ripper.c"
13107
13108 default: break;
13109 }
13110 /* User semantic actions sometimes alter yychar, and that requires
13111 that yytoken be updated with the new translation. We take the
13112 approach of translating immediately before every use of yytoken.
13113 One alternative is translating here after every semantic action,
13114 but that translation would be missed if the semantic action invokes
13115 YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
13116 if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
13117 incorrect destructor might then be invoked immediately. In the
13118 case of YYERROR or YYBACKUP, subsequent parser actions might lead
13119 to an incorrect destructor call or verbose syntax error message
13120 before the lookahead is translated. */
13121 YY_SYMBOL_PRINT ("-> $$ =", YY_CAST (yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc);
13122
13123 YYPOPSTACK (yylen);
13124 yylen = 0;
13125
13126 *++yyvsp = yyval;
13127 *++yylsp = yyloc;
13128
13129 /* Now 'shift' the result of the reduction. Determine what state
13130 that goes to, based on the state we popped back to and the rule
13131 number reduced by. */
13132 {
13133 const int yylhs = yyr1[yyn] - YYNTOKENS;
13134 const int yyi = yypgoto[yylhs] + *yyssp;
13135 yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp
13136 ? yytable[yyi]
13137 : yydefgoto[yylhs]);
13138 }
13139
13140 goto yynewstate;
13141
13142
13143/*--------------------------------------.
13144| yyerrlab -- here on detecting error. |
13145`--------------------------------------*/
13146yyerrlab:
13147 /* Make sure we have latest lookahead translation. See comments at
13148 user semantic actions for why this is necessary. */
13149 yytoken = yychar == YYEMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE (yychar);
13150 /* If not already recovering from an error, report this error. */
13151 if (!yyerrstatus)
13152 {
13153 ++yynerrs;
13154 {
13155 yypcontext_t yyctx
13156 = {yyssp, yytoken, &yylloc};
13157 char const *yymsgp = YY_("syntax error");
13158 int yysyntax_error_status;
13159 yysyntax_error_status = yysyntax_error (p, &yymsg_alloc, &yymsg, &yyctx);
13160 if (yysyntax_error_status == 0)
13161 yymsgp = yymsg;
13162 else if (yysyntax_error_status == -1)
13163 {
13164 if (yymsg != yymsgbuf)
13165 YYSTACK_FREE (yymsg);
13166 yymsg = YY_CAST (char *,
13167 YYSTACK_ALLOC (YY_CAST (YYSIZE_T, yymsg_alloc)));
13168 if (yymsg)
13169 {
13170 yysyntax_error_status
13171 = yysyntax_error (p, &yymsg_alloc, &yymsg, &yyctx);
13172 yymsgp = yymsg;
13173 }
13174 else
13175 {
13176 yymsg = yymsgbuf;
13177 yymsg_alloc = sizeof yymsgbuf;
13178 yysyntax_error_status = YYENOMEM;
13179 }
13180 }
13181 yyerror (&yylloc, p, yymsgp);
13182 if (yysyntax_error_status == YYENOMEM)
13183 YYNOMEM;
13184 }
13185 }
13186
13187 yyerror_range[1] = yylloc;
13188 if (yyerrstatus == 3)
13189 {
13190 /* If just tried and failed to reuse lookahead token after an
13191 error, discard it. */
13192
13193 if (yychar <= END_OF_INPUT)
13194 {
13195 /* Return failure if at end of input. */
13196 if (yychar == END_OF_INPUT)
13197 YYABORT;
13198 }
13199 else
13200 {
13201 yydestruct ("Error: discarding",
13202 yytoken, &yylval, &yylloc, p);
13203 yychar = YYEMPTY;
13204 }
13205 }
13206
13207 /* Else will try to reuse lookahead token after shifting the error
13208 token. */
13209 goto yyerrlab1;
13210
13211
13212/*---------------------------------------------------.
13213| yyerrorlab -- error raised explicitly by YYERROR. |
13214`---------------------------------------------------*/
13215yyerrorlab:
13216 /* Pacify compilers when the user code never invokes YYERROR and the
13217 label yyerrorlab therefore never appears in user code. */
13218 if (0)
13219 YYERROR;
13220 ++yynerrs;
13221
13222 /* Do not reclaim the symbols of the rule whose action triggered
13223 this YYERROR. */
13224 YYPOPSTACK (yylen);
13225 yylen = 0;
13226 YY_STACK_PRINT (yyss, yyssp);
13227 yystate = *yyssp;
13228 goto yyerrlab1;
13229
13230
13231/*-------------------------------------------------------------.
13232| yyerrlab1 -- common code for both syntax error and YYERROR. |
13233`-------------------------------------------------------------*/
13234yyerrlab1:
13235 yyerrstatus = 3; /* Each real token shifted decrements this. */
13236
13237 /* Pop stack until we find a state that shifts the error token. */
13238 for (;;)
13239 {
13240 yyn = yypact[yystate];
13241 if (!yypact_value_is_default (yyn))
13242 {
13243 yyn += YYSYMBOL_YYerror;
13244 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror)
13245 {
13246 yyn = yytable[yyn];
13247 if (0 < yyn)
13248 break;
13249 }
13250 }
13251
13252 /* Pop the current state because it cannot handle the error token. */
13253 if (yyssp == yyss)
13254 YYABORT;
13255
13256 yyerror_range[1] = *yylsp;
13257 yydestruct ("Error: popping",
13258 YY_ACCESSING_SYMBOL (yystate), yyvsp, yylsp, p);
13259 YYPOPSTACK (1);
13260 yystate = *yyssp;
13261 YY_STACK_PRINT (yyss, yyssp);
13262 }
13263
13265 *++yyvsp = yylval;
13267
13268 yyerror_range[2] = yylloc;
13269 ++yylsp;
13270 YYLLOC_DEFAULT (*yylsp, yyerror_range, 2);
13271
13272 /* Shift the error token. */
13273 YY_SYMBOL_PRINT ("Shifting", YY_ACCESSING_SYMBOL (yyn), yyvsp, yylsp);
13274
13275 yystate = yyn;
13276 goto yynewstate;
13277
13278
13279/*-------------------------------------.
13280| yyacceptlab -- YYACCEPT comes here. |
13281`-------------------------------------*/
13282yyacceptlab:
13283 yyresult = 0;
13284 goto yyreturnlab;
13285
13286
13287/*-----------------------------------.
13288| yyabortlab -- YYABORT comes here. |
13289`-----------------------------------*/
13290yyabortlab:
13291 yyresult = 1;
13292 goto yyreturnlab;
13293
13294
13295/*-----------------------------------------------------------.
13296| yyexhaustedlab -- YYNOMEM (memory exhaustion) comes here. |
13297`-----------------------------------------------------------*/
13298yyexhaustedlab:
13299 yyerror (&yylloc, p, YY_("memory exhausted"));
13300 yyresult = 2;
13301 goto yyreturnlab;
13302
13303
13304/*----------------------------------------------------------.
13305| yyreturnlab -- parsing is finished, clean up and return. |
13306`----------------------------------------------------------*/
13307yyreturnlab:
13308 if (yychar != YYEMPTY)
13309 {
13310 /* Make sure we have latest lookahead translation. See comments at
13311 user semantic actions for why this is necessary. */
13312 yytoken = YYTRANSLATE (yychar);
13313 yydestruct ("Cleanup: discarding lookahead",
13314 yytoken, &yylval, &yylloc, p);
13315 }
13316 /* Do not reclaim the symbols of the rule whose action triggered
13317 this YYABORT or YYACCEPT. */
13318 YYPOPSTACK (yylen);
13319 YY_STACK_PRINT (yyss, yyssp);
13320 while (yyssp != yyss)
13321 {
13322 yydestruct ("Cleanup: popping",
13323 YY_ACCESSING_SYMBOL (+*yyssp), yyvsp, yylsp, p);
13324 YYPOPSTACK (1);
13325 }
13326#ifndef yyoverflow
13327 if (yyss != yyssa)
13328 YYSTACK_FREE (yyss);
13329#endif
13330 if (yymsg != yymsgbuf)
13331 YYSTACK_FREE (yymsg);
13332 return yyresult;
13333}
13334
13335#line 5657 "ripper.y"
13336
13337# undef p
13338# undef yylex
13339# undef yylval
13340# define yylval (*p->lval)
13341
13342static int regx_options(struct parser_params*);
13343static int tokadd_string(struct parser_params*,int,int,int,long*,rb_encoding**,rb_encoding**);
13344static void tokaddmbc(struct parser_params *p, int c, rb_encoding *enc);
13345static enum yytokentype parse_string(struct parser_params*,rb_strterm_literal_t*);
13346static enum yytokentype here_document(struct parser_params*,rb_strterm_heredoc_t*);
13347
13348#ifndef RIPPER
13349# define set_yylval_node(x) { \
13350 YYLTYPE _cur_loc; \
13351 rb_parser_set_location(p, &_cur_loc); \
13352 yylval.node = (x); \
13353}
13354# define set_yylval_str(x) \
13355do { \
13356 set_yylval_node(NEW_STR(x, &_cur_loc)); \
13357 RB_OBJ_WRITTEN(p->ast, Qnil, x); \
13358} while(0)
13359# define set_yylval_literal(x) \
13360do { \
13361 set_yylval_node(NEW_LIT(x, &_cur_loc)); \
13362 RB_OBJ_WRITTEN(p->ast, Qnil, x); \
13363} while(0)
13364# define set_yylval_num(x) (yylval.num = (x))
13365# define set_yylval_id(x) (yylval.id = (x))
13366# define set_yylval_name(x) (yylval.id = (x))
13367# define yylval_id() (yylval.id)
13368#else
13369static inline VALUE
13370ripper_yylval_id(struct parser_params *p, ID x)
13371{
13372 return ripper_new_yylval(p, x, ID2SYM(x), 0);
13373}
13374# define set_yylval_str(x) (yylval.val = add_mark_object(p, (x)))
13375# define set_yylval_num(x) (yylval.val = ripper_new_yylval(p, (x), 0, 0))
13376# define set_yylval_id(x) (void)(x)
13377# define set_yylval_name(x) (void)(yylval.val = ripper_yylval_id(p, x))
13378# define set_yylval_literal(x) add_mark_object(p, (x))
13379# define set_yylval_node(x) (yylval.val = ripper_new_yylval(p, 0, 0, STR_NEW(p->lex.ptok, p->lex.pcur-p->lex.ptok)))
13380# define yylval_id() yylval.id
13381# define _cur_loc NULL_LOC /* dummy */
13382#endif
13383
13384#define set_yylval_noname() set_yylval_id(keyword_nil)
13385
13386#ifndef RIPPER
13387#define literal_flush(p, ptr) ((p)->lex.ptok = (ptr))
13388#define dispatch_scan_event(p, t) ((void)0)
13389#define dispatch_delayed_token(p, t) ((void)0)
13390#define has_delayed_token(p) (0)
13391#else
13392#define literal_flush(p, ptr) ((void)(ptr))
13393
13394#define yylval_rval (*(RB_TYPE_P(yylval.val, T_NODE) ? &yylval.node->nd_rval : &yylval.val))
13395
13396static inline VALUE
13397intern_sym(const char *name)
13398{
13399 ID id = rb_intern_const(name);
13400 return ID2SYM(id);
13401}
13402
13403static int
13404ripper_has_scan_event(struct parser_params *p)
13405{
13406 if (p->lex.pcur < p->lex.ptok) rb_raise(rb_eRuntimeError, "lex.pcur < lex.ptok");
13407 return p->lex.pcur > p->lex.ptok;
13408}
13409
13410static VALUE
13411ripper_scan_event_val(struct parser_params *p, enum yytokentype t)
13412{
13413 VALUE str = STR_NEW(p->lex.ptok, p->lex.pcur - p->lex.ptok);
13414 VALUE rval = ripper_dispatch1(p, ripper_token2eventid(t), str);
13415 token_flush(p);
13416 return rval;
13417}
13418
13419static void
13420ripper_dispatch_scan_event(struct parser_params *p, enum yytokentype t)
13421{
13422 if (!ripper_has_scan_event(p)) return;
13423 add_mark_object(p, yylval_rval = ripper_scan_event_val(p, t));
13424}
13425#define dispatch_scan_event(p, t) ripper_dispatch_scan_event(p, t)
13426
13427static void
13428ripper_dispatch_delayed_token(struct parser_params *p, enum yytokentype t)
13429{
13430 int saved_line = p->ruby_sourceline;
13431 const char *saved_tokp = p->lex.ptok;
13432
13433 if (NIL_P(p->delayed.token)) return;
13434 p->ruby_sourceline = p->delayed.line;
13435 p->lex.ptok = p->lex.pbeg + p->delayed.col;
13436 add_mark_object(p, yylval_rval = ripper_dispatch1(p, ripper_token2eventid(t), p->delayed.token));
13437 p->delayed.token = Qnil;
13438 p->ruby_sourceline = saved_line;
13439 p->lex.ptok = saved_tokp;
13440}
13441#define dispatch_delayed_token(p, t) ripper_dispatch_delayed_token(p, t)
13442#define has_delayed_token(p) (!NIL_P(p->delayed.token))
13443#endif /* RIPPER */
13444
13445static inline int
13446is_identchar(const char *ptr, const char *MAYBE_UNUSED(ptr_end), rb_encoding *enc)
13447{
13448 return rb_enc_isalnum((unsigned char)*ptr, enc) || *ptr == '_' || !ISASCII(*ptr);
13449}
13450
13451static inline int
13452parser_is_identchar(struct parser_params *p)
13453{
13454 return !(p)->eofp && is_identchar(p->lex.pcur-1, p->lex.pend, p->enc);
13455}
13456
13457static inline int
13458parser_isascii(struct parser_params *p)
13459{
13460 return ISASCII(*(p->lex.pcur-1));
13461}
13462
13463static void
13464token_info_setup(token_info *ptinfo, const char *ptr, const rb_code_location_t *loc)
13465{
13466 int column = 1, nonspc = 0, i;
13467 for (i = 0; i < loc->beg_pos.column; i++, ptr++) {
13468 if (*ptr == '\t') {
13469 column = (((column - 1) / TAB_WIDTH) + 1) * TAB_WIDTH;
13470 }
13471 column++;
13472 if (*ptr != ' ' && *ptr != '\t') {
13473 nonspc = 1;
13474 }
13475 }
13476
13477 ptinfo->beg = loc->beg_pos;
13478 ptinfo->indent = column;
13479 ptinfo->nonspc = nonspc;
13480}
13481
13482static void
13483token_info_push(struct parser_params *p, const char *token, const rb_code_location_t *loc)
13484{
13485 token_info *ptinfo;
13486
13487 if (!p->token_info_enabled) return;
13488 ptinfo = ALLOC(token_info);
13489 ptinfo->token = token;
13490 ptinfo->next = p->token_info;
13491 token_info_setup(ptinfo, p->lex.pbeg, loc);
13492
13493 p->token_info = ptinfo;
13494}
13495
13496static void
13497token_info_pop(struct parser_params *p, const char *token, const rb_code_location_t *loc)
13498{
13499 token_info *ptinfo_beg = p->token_info;
13500
13501 if (!ptinfo_beg) return;
13502 p->token_info = ptinfo_beg->next;
13503
13504 /* indentation check of matched keywords (begin..end, if..end, etc.) */
13505 token_info_warn(p, token, ptinfo_beg, 1, loc);
13506 ruby_sized_xfree(ptinfo_beg, sizeof(*ptinfo_beg));
13507}
13508
13509static void
13510token_info_drop(struct parser_params *p, const char *token, rb_code_position_t beg_pos)
13511{
13512 token_info *ptinfo_beg = p->token_info;
13513
13514 if (!ptinfo_beg) return;
13515 p->token_info = ptinfo_beg->next;
13516
13517 if (ptinfo_beg->beg.lineno != beg_pos.lineno ||
13518 ptinfo_beg->beg.column != beg_pos.column ||
13519 strcmp(ptinfo_beg->token, token)) {
13520 compile_error(p, "token position mismatch: %d:%d:%s expected but %d:%d:%s",
13521 beg_pos.lineno, beg_pos.column, token,
13522 ptinfo_beg->beg.lineno, ptinfo_beg->beg.column,
13523 ptinfo_beg->token);
13524 }
13525
13526 ruby_sized_xfree(ptinfo_beg, sizeof(*ptinfo_beg));
13527}
13528
13529static void
13530token_info_warn(struct parser_params *p, const char *token, token_info *ptinfo_beg, int same, const rb_code_location_t *loc)
13531{
13532 token_info ptinfo_end_body, *ptinfo_end = &ptinfo_end_body;
13533 if (!p->token_info_enabled) return;
13534 if (!ptinfo_beg) return;
13535 token_info_setup(ptinfo_end, p->lex.pbeg, loc);
13536 if (ptinfo_beg->beg.lineno == ptinfo_end->beg.lineno) return; /* ignore one-line block */
13537 if (ptinfo_beg->nonspc || ptinfo_end->nonspc) return; /* ignore keyword in the middle of a line */
13538 if (ptinfo_beg->indent == ptinfo_end->indent) return; /* the indents are matched */
13539 if (!same && ptinfo_beg->indent < ptinfo_end->indent) return;
13540 rb_warn3L(ptinfo_end->beg.lineno,
13541 "mismatched indentations at '%s' with '%s' at %d",
13542 WARN_S(token), WARN_S(ptinfo_beg->token), WARN_I(ptinfo_beg->beg.lineno));
13543}
13544
13545static int
13546parser_precise_mbclen(struct parser_params *p, const char *ptr)
13547{
13548 int len = rb_enc_precise_mbclen(ptr, p->lex.pend, p->enc);
13549 if (!MBCLEN_CHARFOUND_P(len)) {
13550 compile_error(p, "invalid multibyte char (%s)", rb_enc_name(p->enc));
13551 return -1;
13552 }
13553 return len;
13554}
13555
13556#ifndef RIPPER
13557static void ruby_show_error_line(VALUE errbuf, const YYLTYPE *yylloc, int lineno, VALUE str);
13558
13559static inline void
13560parser_show_error_line(struct parser_params *p, const YYLTYPE *yylloc)
13561{
13562 VALUE str;
13563 int lineno = p->ruby_sourceline;
13564 if (!yylloc) {
13565 return;
13566 }
13567 else if (yylloc->beg_pos.lineno == lineno) {
13568 str = p->lex.lastline;
13569 }
13570 else {
13571 return;
13572 }
13573 ruby_show_error_line(p->error_buffer, yylloc, lineno, str);
13574}
13575
13576static int
13577parser_yyerror(struct parser_params *p, const YYLTYPE *yylloc, const char *msg)
13578{
13579 YYLTYPE current;
13580
13581 if (!yylloc) {
13582 yylloc = RUBY_SET_YYLLOC(current);
13583 }
13584 else if ((p->ruby_sourceline != yylloc->beg_pos.lineno &&
13585 p->ruby_sourceline != yylloc->end_pos.lineno) ||
13586 (yylloc->beg_pos.lineno == yylloc->end_pos.lineno &&
13587 yylloc->beg_pos.column == yylloc->end_pos.column)) {
13588 yylloc = 0;
13589 }
13590 compile_error(p, "%s", msg);
13591 parser_show_error_line(p, yylloc);
13592 return 0;
13593}
13594
13595static void
13596ruby_show_error_line(VALUE errbuf, const YYLTYPE *yylloc, int lineno, VALUE str)
13597{
13598 VALUE mesg;
13599 const int max_line_margin = 30;
13600 const char *ptr, *ptr_end, *pt, *pb;
13601 const char *pre = "", *post = "", *pend;
13602 const char *code = "", *caret = "";
13603 const char *lim;
13604 const char *const pbeg = RSTRING_PTR(str);
13605 char *buf;
13606 long len;
13607 int i;
13608
13609 if (!yylloc) return;
13610 pend = RSTRING_END(str);
13611 if (pend > pbeg && pend[-1] == '\n') {
13612 if (--pend > pbeg && pend[-1] == '\r') --pend;
13613 }
13614
13615 pt = pend;
13616 if (lineno == yylloc->end_pos.lineno &&
13617 (pend - pbeg) > yylloc->end_pos.column) {
13618 pt = pbeg + yylloc->end_pos.column;
13619 }
13620
13621 ptr = ptr_end = pt;
13622 lim = ptr - pbeg > max_line_margin ? ptr - max_line_margin : pbeg;
13623 while ((lim < ptr) && (*(ptr-1) != '\n')) ptr--;
13624
13625 lim = pend - ptr_end > max_line_margin ? ptr_end + max_line_margin : pend;
13626 while ((ptr_end < lim) && (*ptr_end != '\n') && (*ptr_end != '\r')) ptr_end++;
13627
13628 len = ptr_end - ptr;
13629 if (len > 4) {
13630 if (ptr > pbeg) {
13631 ptr = rb_enc_prev_char(pbeg, ptr, pt, rb_enc_get(str));
13632 if (ptr > pbeg) pre = "...";
13633 }
13634 if (ptr_end < pend) {
13635 ptr_end = rb_enc_prev_char(pt, ptr_end, pend, rb_enc_get(str));
13636 if (ptr_end < pend) post = "...";
13637 }
13638 }
13639 pb = pbeg;
13640 if (lineno == yylloc->beg_pos.lineno) {
13641 pb += yylloc->beg_pos.column;
13642 if (pb > pt) pb = pt;
13643 }
13644 if (pb < ptr) pb = ptr;
13645 if (len <= 4 && yylloc->beg_pos.lineno == yylloc->end_pos.lineno) {
13646 return;
13647 }
13648 if (RTEST(errbuf)) {
13649 mesg = rb_attr_get(errbuf, idMesg);
13650 if (RSTRING_LEN(mesg) > 0 && *(RSTRING_END(mesg)-1) != '\n')
13651 rb_str_cat_cstr(mesg, "\n");
13652 }
13653 else {
13654 mesg = rb_enc_str_new(0, 0, rb_enc_get(str));
13655 }
13656 if (!errbuf && rb_stderr_tty_p()) {
13657#define CSI_BEGIN "\033["
13658#define CSI_SGR "m"
13659 rb_str_catf(mesg,
13660 CSI_BEGIN""CSI_SGR"%s" /* pre */
13661 CSI_BEGIN"1"CSI_SGR"%.*s"
13662 CSI_BEGIN"1;4"CSI_SGR"%.*s"
13663 CSI_BEGIN";1"CSI_SGR"%.*s"
13664 CSI_BEGIN""CSI_SGR"%s" /* post */
13665 "\n",
13666 pre,
13667 (int)(pb - ptr), ptr,
13668 (int)(pt - pb), pb,
13669 (int)(ptr_end - pt), pt,
13670 post);
13671 }
13672 else {
13673 char *p2;
13674
13675 len = ptr_end - ptr;
13676 lim = pt < pend ? pt : pend;
13677 i = (int)(lim - ptr);
13678 buf = ALLOCA_N(char, i+2);
13679 code = ptr;
13680 caret = p2 = buf;
13681 if (ptr <= pb) {
13682 while (ptr < pb) {
13683 *p2++ = *ptr++ == '\t' ? '\t' : ' ';
13684 }
13685 *p2++ = '^';
13686 ptr++;
13687 }
13688 if (lim > ptr) {
13689 memset(p2, '~', (lim - ptr));
13690 p2 += (lim - ptr);
13691 }
13692 *p2 = '\0';
13693 rb_str_catf(mesg, "%s%.*s%s\n""%s%s\n",
13694 pre, (int)len, code, post,
13695 pre, caret);
13696 }
13697 if (!errbuf) rb_write_error_str(mesg);
13698}
13699#else
13700static int
13701parser_yyerror(struct parser_params *p, const YYLTYPE *yylloc, const char *msg)
13702{
13703 const char *pcur = 0, *ptok = 0;
13704 if (yylloc &&
13705 p->ruby_sourceline == yylloc->beg_pos.lineno &&
13706 p->ruby_sourceline == yylloc->end_pos.lineno) {
13707 pcur = p->lex.pcur;
13708 ptok = p->lex.ptok;
13709 p->lex.ptok = p->lex.pbeg + yylloc->beg_pos.column;
13710 p->lex.pcur = p->lex.pbeg + yylloc->end_pos.column;
13711 }
13712 dispatch1(parse_error, STR_NEW2(msg));
13713 ripper_error(p);
13714 if (pcur) {
13715 p->lex.ptok = ptok;
13716 p->lex.pcur = pcur;
13717 }
13718 return 0;
13719}
13720
13721static inline void
13722parser_show_error_line(struct parser_params *p, const YYLTYPE *yylloc)
13723{
13724}
13725#endif /* !RIPPER */
13726
13727#ifndef RIPPER
13728static int
13729vtable_size(const struct vtable *tbl)
13730{
13731 if (!DVARS_TERMINAL_P(tbl)) {
13732 return tbl->pos;
13733 }
13734 else {
13735 return 0;
13736 }
13737}
13738#endif
13739
13740static struct vtable *
13741vtable_alloc_gen(struct parser_params *p, int line, struct vtable *prev)
13742{
13743 struct vtable *tbl = ALLOC(struct vtable);
13744 tbl->pos = 0;
13745 tbl->capa = 8;
13746 tbl->tbl = ALLOC_N(ID, tbl->capa);
13747 tbl->prev = prev;
13748#ifndef RIPPER
13749 if (p->debug) {
13750 rb_parser_printf(p, "vtable_alloc:%d: %p\n", line, (void *)tbl);
13751 }
13752#endif
13753 return tbl;
13754}
13755#define vtable_alloc(prev) vtable_alloc_gen(p, __LINE__, prev)
13756
13757static void
13758vtable_free_gen(struct parser_params *p, int line, const char *name,
13759 struct vtable *tbl)
13760{
13761#ifndef RIPPER
13762 if (p->debug) {
13763 rb_parser_printf(p, "vtable_free:%d: %s(%p)\n", line, name, (void *)tbl);
13764 }
13765#endif
13766 if (!DVARS_TERMINAL_P(tbl)) {
13767 if (tbl->tbl) {
13768 ruby_sized_xfree(tbl->tbl, tbl->capa * sizeof(ID));
13769 }
13770 ruby_sized_xfree(tbl, sizeof(*tbl));
13771 }
13772}
13773#define vtable_free(tbl) vtable_free_gen(p, __LINE__, #tbl, tbl)
13774
13775static void
13776vtable_add_gen(struct parser_params *p, int line, const char *name,
13777 struct vtable *tbl, ID id)
13778{
13779#ifndef RIPPER
13780 if (p->debug) {
13781 rb_parser_printf(p, "vtable_add:%d: %s(%p), %s\n",
13782 line, name, (void *)tbl, rb_id2name(id));
13783 }
13784#endif
13785 if (DVARS_TERMINAL_P(tbl)) {
13786 rb_parser_fatal(p, "vtable_add: vtable is not allocated (%p)", (void *)tbl);
13787 return;
13788 }
13789 if (tbl->pos == tbl->capa) {
13790 tbl->capa = tbl->capa * 2;
13791 SIZED_REALLOC_N(tbl->tbl, ID, tbl->capa, tbl->pos);
13792 }
13793 tbl->tbl[tbl->pos++] = id;
13794}
13795#define vtable_add(tbl, id) vtable_add_gen(p, __LINE__, #tbl, tbl, id)
13796
13797#ifndef RIPPER
13798static void
13799vtable_pop_gen(struct parser_params *p, int line, const char *name,
13800 struct vtable *tbl, int n)
13801{
13802 if (p->debug) {
13803 rb_parser_printf(p, "vtable_pop:%d: %s(%p), %d\n",
13804 line, name, (void *)tbl, n);
13805 }
13806 if (tbl->pos < n) {
13807 rb_parser_fatal(p, "vtable_pop: unreachable (%d < %d)", tbl->pos, n);
13808 return;
13809 }
13810 tbl->pos -= n;
13811}
13812#define vtable_pop(tbl, n) vtable_pop_gen(p, __LINE__, #tbl, tbl, n)
13813#endif
13814
13815static int
13816vtable_included(const struct vtable * tbl, ID id)
13817{
13818 int i;
13819
13820 if (!DVARS_TERMINAL_P(tbl)) {
13821 for (i = 0; i < tbl->pos; i++) {
13822 if (tbl->tbl[i] == id) {
13823 return i+1;
13824 }
13825 }
13826 }
13827 return 0;
13828}
13829
13830static void parser_prepare(struct parser_params *p);
13831
13832#ifndef RIPPER
13833static NODE *parser_append_options(struct parser_params *p, NODE *node);
13834
13835static VALUE
13836debug_lines(VALUE fname)
13837{
13838 ID script_lines;
13839 CONST_ID(script_lines, "SCRIPT_LINES__");
13840 if (rb_const_defined_at(rb_cObject, script_lines)) {
13841 VALUE hash = rb_const_get_at(rb_cObject, script_lines);
13842 if (RB_TYPE_P(hash, T_HASH)) {
13843 VALUE lines = rb_ary_new();
13844 rb_hash_aset(hash, fname, lines);
13845 return lines;
13846 }
13847 }
13848 return 0;
13849}
13850
13851static int
13852e_option_supplied(struct parser_params *p)
13853{
13854 return strcmp(p->ruby_sourcefile, "-e") == 0;
13855}
13856
13857static VALUE
13858yycompile0(VALUE arg)
13859{
13860 int n;
13861 NODE *tree;
13862 struct parser_params *p = (struct parser_params *)arg;
13863 VALUE cov = Qfalse;
13864
13867 if (p->debug_lines && p->ruby_sourceline > 0) {
13869 n = p->ruby_sourceline;
13870 do {
13872 } while (--n);
13873 }
13874
13875 if (!e_option_supplied(p)) {
13876 cov = Qtrue;
13877 }
13878 }
13879
13880 parser_prepare(p);
13881#define RUBY_DTRACE_PARSE_HOOK(name) \
13882 if (RUBY_DTRACE_PARSE_##name##_ENABLED()) { \
13883 RUBY_DTRACE_PARSE_##name(p->ruby_sourcefile, p->ruby_sourceline); \
13884 }
13886 n = yyparse(p);
13888 p->debug_lines = 0;
13889
13890 p->lex.strterm = 0;
13891 p->lex.pcur = p->lex.pbeg = p->lex.pend = 0;
13892 p->lex.prevline = p->lex.lastline = p->lex.nextline = 0;
13893 if (n || p->error_p) {
13894 VALUE mesg = p->error_buffer;
13895 if (!mesg) {
13897 }
13898 rb_set_errinfo(mesg);
13899 return FALSE;
13900 }
13901 tree = p->eval_tree;
13902 if (!tree) {
13903 tree = NEW_NIL(&NULL_LOC);
13904 }
13905 else {
13906 VALUE opt = p->compile_option;
13907 NODE *prelude;
13908 NODE *body = parser_append_options(p, tree->nd_body);
13909 if (!opt) opt = rb_obj_hide(rb_ident_hash_new());
13910 rb_hash_aset(opt, rb_sym_intern_ascii_cstr("coverage_enabled"), cov);
13911 prelude = block_append(p, p->eval_tree_begin, body);
13912 tree->nd_body = prelude;
13913 RB_OBJ_WRITE(p->ast, &p->ast->body.compile_option, opt);
13914 }
13915 p->ast->body.root = tree;
13916 p->ast->body.line_count = p->line_count;
13917 return TRUE;
13918}
13919
13920static rb_ast_t *
13921yycompile(VALUE vparser, struct parser_params *p, VALUE fname, int line)
13922{
13923 rb_ast_t *ast;
13924 if (NIL_P(fname)) {
13926 p->ruby_sourcefile = "(none)";
13927 }
13928 else {
13930 p->ruby_sourcefile = StringValueCStr(fname);
13931 }
13932 p->ruby_sourceline = line - 1;
13933
13934 p->ast = ast = rb_ast_new();
13935 rb_suppress_tracing(yycompile0, (VALUE)p);
13936 p->ast = 0;
13937 RB_GC_GUARD(vparser); /* prohibit tail call optimization */
13938
13939 return ast;
13940}
13941#endif /* !RIPPER */
13942
13943static rb_encoding *
13944must_be_ascii_compatible(VALUE s)
13945{
13947 if (!rb_enc_asciicompat(enc)) {
13948 rb_raise(rb_eArgError, "invalid source encoding");
13949 }
13950 return enc;
13951}
13952
13953static VALUE
13954lex_get_str(struct parser_params *p, VALUE s)
13955{
13956 char *beg, *end, *start;
13957 long len;
13958
13959 beg = RSTRING_PTR(s);
13960 len = RSTRING_LEN(s);
13961 start = beg;
13962 if (p->lex.gets_.ptr) {
13963 if (len == p->lex.gets_.ptr) return Qnil;
13964 beg += p->lex.gets_.ptr;
13965 len -= p->lex.gets_.ptr;
13966 }
13967 end = memchr(beg, '\n', len);
13968 if (end) len = ++end - beg;
13969 p->lex.gets_.ptr += len;
13970 return rb_str_subseq(s, beg - start, len);
13971}
13972
13973static VALUE
13974lex_getline(struct parser_params *p)
13975{
13976 VALUE line = (*p->lex.gets)(p, p->lex.input);
13977 if (NIL_P(line)) return line;
13978 must_be_ascii_compatible(line);
13979#ifndef RIPPER
13980 if (p->debug_lines) {
13981 rb_enc_associate(line, p->enc);
13982 rb_ary_push(p->debug_lines, line);
13983 }
13984#endif
13985 p->line_count++;
13986 return line;
13987}
13988
13989static const rb_data_type_t parser_data_type;
13990
13991#ifndef RIPPER
13992static rb_ast_t*
13993parser_compile_string(VALUE vparser, VALUE fname, VALUE s, int line)
13994{
13995 struct parser_params *p;
13996
13997 TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, p);
13998
13999 p->lex.gets = lex_get_str;
14000 p->lex.gets_.ptr = 0;
14001 p->lex.input = rb_str_new_frozen(s);
14002 p->lex.pbeg = p->lex.pcur = p->lex.pend = 0;
14003
14004 return yycompile(vparser, p, fname, line);
14005}
14006
14007rb_ast_t*
14008rb_parser_compile_string(VALUE vparser, const char *f, VALUE s, int line)
14009{
14011}
14012
14013rb_ast_t*
14015{
14016 must_be_ascii_compatible(s);
14017 return parser_compile_string(vparser, f, s, line);
14018}
14019
14021
14022static VALUE
14023lex_io_gets(struct parser_params *p, VALUE io)
14024{
14025 return rb_io_gets_internal(io);
14026}
14027
14028rb_ast_t*
14030{
14031 struct parser_params *p;
14032
14033 TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, p);
14034
14035 p->lex.gets = lex_io_gets;
14036 p->lex.input = file;
14037 p->lex.pbeg = p->lex.pcur = p->lex.pend = 0;
14038
14039 return yycompile(vparser, p, fname, start);
14040}
14041
14042static VALUE
14043lex_generic_gets(struct parser_params *p, VALUE input)
14044{
14045 return (*p->lex.gets_.call)(input, p->line_count);
14046}
14047
14048rb_ast_t*
14049rb_parser_compile_generic(VALUE vparser, VALUE (*lex_gets)(VALUE, int), VALUE fname, VALUE input, int start)
14050{
14051 struct parser_params *p;
14052
14053 TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, p);
14054
14055 p->lex.gets = lex_generic_gets;
14056 p->lex.gets_.call = lex_gets;
14057 p->lex.input = input;
14058 p->lex.pbeg = p->lex.pcur = p->lex.pend = 0;
14059
14060 return yycompile(vparser, p, fname, start);
14061}
14062#endif /* !RIPPER */
14063
14064#define STR_FUNC_ESCAPE 0x01
14065#define STR_FUNC_EXPAND 0x02
14066#define STR_FUNC_REGEXP 0x04
14067#define STR_FUNC_QWORDS 0x08
14068#define STR_FUNC_SYMBOL 0x10
14069#define STR_FUNC_INDENT 0x20
14070#define STR_FUNC_LABEL 0x40
14071#define STR_FUNC_LIST 0x4000
14072#define STR_FUNC_TERM 0x8000
14073
14085
14086static VALUE
14087parser_str_new(const char *ptr, long len, rb_encoding *enc, int func, rb_encoding *enc0)
14088{
14089 VALUE str;
14090
14092 if (!(func & STR_FUNC_REGEXP) && rb_enc_asciicompat(enc)) {
14094 }
14095 else if (enc0 == rb_usascii_encoding() && enc != rb_utf8_encoding()) {
14097 }
14098 }
14099
14100 return str;
14101}
14102
14103#define lex_goto_eol(p) ((p)->lex.pcur = (p)->lex.pend)
14104#define lex_eol_p(p) ((p)->lex.pcur >= (p)->lex.pend)
14105#define lex_eol_n_p(p,n) ((p)->lex.pcur+(n) >= (p)->lex.pend)
14106#define peek(p,c) peek_n(p, (c), 0)
14107#define peek_n(p,c,n) (!lex_eol_n_p(p, n) && (c) == (unsigned char)(p)->lex.pcur[n])
14108#define peekc(p) peekc_n(p, 0)
14109#define peekc_n(p,n) (lex_eol_n_p(p, n) ? -1 : (unsigned char)(p)->lex.pcur[n])
14110
14111#ifdef RIPPER
14112static void
14113add_delayed_token(struct parser_params *p, const char *tok, const char *end)
14114{
14115 if (tok < end) {
14116 if (!has_delayed_token(p)) {
14117 p->delayed.token = rb_str_buf_new(end - tok);
14118 rb_enc_associate(p->delayed.token, p->enc);
14119 p->delayed.line = p->ruby_sourceline;
14120 p->delayed.col = rb_long2int(tok - p->lex.pbeg);
14121 }
14122 rb_str_buf_cat(p->delayed.token, tok, end - tok);
14123 p->lex.ptok = end;
14124 }
14125}
14126#else
14127#define add_delayed_token(p, tok, end) ((void)(tok), (void)(end))
14128#endif
14129
14130static int
14131nextline(struct parser_params *p)
14132{
14133 VALUE v = p->lex.nextline;
14134 p->lex.nextline = 0;
14135 if (!v) {
14136 if (p->eofp)
14137 return -1;
14138
14139 if (p->lex.pend > p->lex.pbeg && *(p->lex.pend-1) != '\n') {
14140 goto end_of_input;
14141 }
14142
14143 if (!p->lex.input || NIL_P(v = lex_getline(p))) {
14144 end_of_input:
14145 p->eofp = 1;
14146 lex_goto_eol(p);
14147 return -1;
14148 }
14149 p->cr_seen = FALSE;
14150 }
14151 else if (NIL_P(v)) {
14152 /* after here-document without terminator */
14153 goto end_of_input;
14154 }
14155 add_delayed_token(p, p->lex.ptok, p->lex.pend);
14156 if (p->heredoc_end > 0) {
14158 p->heredoc_end = 0;
14159 }
14160 p->ruby_sourceline++;
14161 p->lex.pbeg = p->lex.pcur = RSTRING_PTR(v);
14162 p->lex.pend = p->lex.pcur + RSTRING_LEN(v);
14163 token_flush(p);
14164 p->lex.prevline = p->lex.lastline;
14165 p->lex.lastline = v;
14166 return 0;
14167}
14168
14169static int
14170parser_cr(struct parser_params *p, int c)
14171{
14172 if (peek(p, '\n')) {
14173 p->lex.pcur++;
14174 c = '\n';
14175 }
14176 return c;
14177}
14178
14179static inline int
14180nextc(struct parser_params *p)
14181{
14182 int c;
14183
14184 if (UNLIKELY((p->lex.pcur == p->lex.pend) || p->eofp || RTEST(p->lex.nextline))) {
14185 if (nextline(p)) return -1;
14186 }
14187 c = (unsigned char)*p->lex.pcur++;
14188 if (UNLIKELY(c == '\r')) {
14189 c = parser_cr(p, c);
14190 }
14191
14192 return c;
14193}
14194
14195static void
14196pushback(struct parser_params *p, int c)
14197{
14198 if (c == -1) return;
14199 p->lex.pcur--;
14200 if (p->lex.pcur > p->lex.pbeg && p->lex.pcur[0] == '\n' && p->lex.pcur[-1] == '\r') {
14201 p->lex.pcur--;
14202 }
14203}
14204
14205#define was_bol(p) ((p)->lex.pcur == (p)->lex.pbeg + 1)
14206
14207#define tokfix(p) ((p)->tokenbuf[(p)->tokidx]='\0')
14208#define tok(p) (p)->tokenbuf
14209#define toklen(p) (p)->tokidx
14210
14211static int
14212looking_at_eol_p(struct parser_params *p)
14213{
14214 const char *ptr = p->lex.pcur;
14215 while (ptr < p->lex.pend) {
14216 int c = (unsigned char)*ptr++;
14217 int eol = (c == '\n' || c == '#');
14218 if (eol || !ISSPACE(c)) {
14219 return eol;
14220 }
14221 }
14222 return TRUE;
14223}
14224
14225static char*
14226newtok(struct parser_params *p)
14227{
14228 p->tokidx = 0;
14229 p->tokline = p->ruby_sourceline;
14230 if (!p->tokenbuf) {
14231 p->toksiz = 60;
14232 p->tokenbuf = ALLOC_N(char, 60);
14233 }
14234 if (p->toksiz > 4096) {
14235 p->toksiz = 60;
14236 REALLOC_N(p->tokenbuf, char, 60);
14237 }
14238 return p->tokenbuf;
14239}
14240
14241static char *
14242tokspace(struct parser_params *p, int n)
14243{
14244 p->tokidx += n;
14245
14246 if (p->tokidx >= p->toksiz) {
14247 do {p->toksiz *= 2;} while (p->toksiz < p->tokidx);
14248 REALLOC_N(p->tokenbuf, char, p->toksiz);
14249 }
14250 return &p->tokenbuf[p->tokidx-n];
14251}
14252
14253static void
14254tokadd(struct parser_params *p, int c)
14255{
14256 p->tokenbuf[p->tokidx++] = (char)c;
14257 if (p->tokidx >= p->toksiz) {
14258 p->toksiz *= 2;
14259 REALLOC_N(p->tokenbuf, char, p->toksiz);
14260 }
14261}
14262
14263static int
14264tok_hex(struct parser_params *p, size_t *numlen)
14265{
14266 int c;
14267
14268 c = scan_hex(p->lex.pcur, 2, numlen);
14269 if (!*numlen) {
14270 yyerror0("invalid hex escape");
14271 token_flush(p);
14272 return 0;
14273 }
14274 p->lex.pcur += *numlen;
14275 return c;
14276}
14277
14278#define tokcopy(p, n) memcpy(tokspace(p, n), (p)->lex.pcur - (n), (n))
14279
14280static int
14281escaped_control_code(int c)
14282{
14283 int c2 = 0;
14284 switch (c) {
14285 case ' ':
14286 c2 = 's';
14287 break;
14288 case '\n':
14289 c2 = 'n';
14290 break;
14291 case '\t':
14292 c2 = 't';
14293 break;
14294 case '\v':
14295 c2 = 'v';
14296 break;
14297 case '\r':
14298 c2 = 'r';
14299 break;
14300 case '\f':
14301 c2 = 'f';
14302 break;
14303 }
14304 return c2;
14305}
14306
14307#define WARN_SPACE_CHAR(c, prefix) \
14308 rb_warn1("invalid character syntax; use "prefix"\\%c", WARN_I(c2))
14309
14310static int
14311tokadd_codepoint(struct parser_params *p, rb_encoding **encp,
14312 int regexp_literal, int wide)
14313{
14314 size_t numlen;
14315 int codepoint = scan_hex(p->lex.pcur, wide ? p->lex.pend - p->lex.pcur : 4, &numlen);
14316 literal_flush(p, p->lex.pcur);
14317 p->lex.pcur += numlen;
14318 if (wide ? (numlen == 0 || numlen > 6) : (numlen < 4)) {
14319 yyerror0("invalid Unicode escape");
14320 return wide && numlen > 0;
14321 }
14322 if (codepoint > 0x10ffff) {
14323 yyerror0("invalid Unicode codepoint (too large)");
14324 return wide;
14325 }
14326 if ((codepoint & 0xfffff800) == 0xd800) {
14327 yyerror0("invalid Unicode codepoint");
14328 return wide;
14329 }
14330 if (regexp_literal) {
14331 tokcopy(p, (int)numlen);
14332 }
14333 else if (codepoint >= 0x80) {
14334 rb_encoding *utf8 = rb_utf8_encoding();
14335 if (*encp && utf8 != *encp) {
14336 YYLTYPE loc = RUBY_INIT_YYLLOC();
14337 compile_error(p, "UTF-8 mixed within %s source", rb_enc_name(*encp));
14338 parser_show_error_line(p, &loc);
14339 return wide;
14340 }
14341 *encp = utf8;
14342 tokaddmbc(p, codepoint, *encp);
14343 }
14344 else {
14345 tokadd(p, codepoint);
14346 }
14347 return TRUE;
14348}
14349
14350/* return value is for ?\u3042 */
14351static void
14352tokadd_utf8(struct parser_params *p, rb_encoding **encp,
14353 int term, int symbol_literal, int regexp_literal)
14354{
14355 /*
14356 * If `term` is not -1, then we allow multiple codepoints in \u{}
14357 * upto `term` byte, otherwise we're parsing a character literal.
14358 * And then add the codepoints to the current token.
14359 */
14360 static const char multiple_codepoints[] = "Multiple codepoints at single character literal";
14361
14362 const int open_brace = '{', close_brace = '}';
14363
14364 if (regexp_literal) { tokadd(p, '\\'); tokadd(p, 'u'); }
14365
14366 if (peek(p, open_brace)) { /* handle \u{...} form */
14367 const char *second = NULL;
14368 int c, last = nextc(p);
14369 if (p->lex.pcur >= p->lex.pend) goto unterminated;
14370 while (ISSPACE(c = *p->lex.pcur) && ++p->lex.pcur < p->lex.pend);
14371 while (c != close_brace) {
14372 if (c == term) goto unterminated;
14373 if (second == multiple_codepoints)
14374 second = p->lex.pcur;
14375 if (regexp_literal) tokadd(p, last);
14376 if (!tokadd_codepoint(p, encp, regexp_literal, TRUE)) {
14377 break;
14378 }
14379 while (ISSPACE(c = *p->lex.pcur)) {
14380 if (++p->lex.pcur >= p->lex.pend) goto unterminated;
14381 last = c;
14382 }
14383 if (term == -1 && !second)
14384 second = multiple_codepoints;
14385 }
14386
14387 if (c != close_brace) {
14388 unterminated:
14389 token_flush(p);
14390 yyerror0("unterminated Unicode escape");
14391 return;
14392 }
14393 if (second && second != multiple_codepoints) {
14394 const char *pcur = p->lex.pcur;
14395 p->lex.pcur = second;
14397 token_flush(p);
14398 p->lex.pcur = pcur;
14399 yyerror0(multiple_codepoints);
14400 token_flush(p);
14401 }
14402
14403 if (regexp_literal) tokadd(p, close_brace);
14404 nextc(p);
14405 }
14406 else { /* handle \uxxxx form */
14407 if (!tokadd_codepoint(p, encp, regexp_literal, FALSE)) {
14408 token_flush(p);
14409 return;
14410 }
14411 }
14412}
14413
14414#define ESCAPE_CONTROL 1
14415#define ESCAPE_META 2
14416
14417static int
14418read_escape(struct parser_params *p, int flags, rb_encoding **encp)
14419{
14420 int c;
14421 size_t numlen;
14422
14423 switch (c = nextc(p)) {
14424 case '\\': /* Backslash */
14425 return c;
14426
14427 case 'n': /* newline */
14428 return '\n';
14429
14430 case 't': /* horizontal tab */
14431 return '\t';
14432
14433 case 'r': /* carriage-return */
14434 return '\r';
14435
14436 case 'f': /* form-feed */
14437 return '\f';
14438
14439 case 'v': /* vertical tab */
14440 return '\13';
14441
14442 case 'a': /* alarm(bell) */
14443 return '\007';
14444
14445 case 'e': /* escape */
14446 return 033;
14447
14448 case '0': case '1': case '2': case '3': /* octal constant */
14449 case '4': case '5': case '6': case '7':
14450 pushback(p, c);
14451 c = scan_oct(p->lex.pcur, 3, &numlen);
14452 p->lex.pcur += numlen;
14453 return c;
14454
14455 case 'x': /* hex constant */
14456 c = tok_hex(p, &numlen);
14457 if (numlen == 0) return 0;
14458 return c;
14459
14460 case 'b': /* backspace */
14461 return '\010';
14462
14463 case 's': /* space */
14464 return ' ';
14465
14466 case 'M':
14467 if (flags & ESCAPE_META) goto eof;
14468 if ((c = nextc(p)) != '-') {
14469 goto eof;
14470 }
14471 if ((c = nextc(p)) == '\\') {
14472 switch (peekc(p)) {
14473 case 'u': case 'U':
14474 nextc(p);
14475 goto eof;
14476 }
14477 return read_escape(p, flags|ESCAPE_META, encp) | 0x80;
14478 }
14479 else if (c == -1 || !ISASCII(c)) goto eof;
14480 else {
14481 int c2 = escaped_control_code(c);
14482 if (c2) {
14483 if (ISCNTRL(c) || !(flags & ESCAPE_CONTROL)) {
14484 WARN_SPACE_CHAR(c2, "\\M-");
14485 }
14486 else {
14487 WARN_SPACE_CHAR(c2, "\\C-\\M-");
14488 }
14489 }
14490 else if (ISCNTRL(c)) goto eof;
14491 return ((c & 0xff) | 0x80);
14492 }
14493
14494 case 'C':
14495 if ((c = nextc(p)) != '-') {
14496 goto eof;
14497 }
14498 case 'c':
14499 if (flags & ESCAPE_CONTROL) goto eof;
14500 if ((c = nextc(p))== '\\') {
14501 switch (peekc(p)) {
14502 case 'u': case 'U':
14503 nextc(p);
14504 goto eof;
14505 }
14506 c = read_escape(p, flags|ESCAPE_CONTROL, encp);
14507 }
14508 else if (c == '?')
14509 return 0177;
14510 else if (c == -1 || !ISASCII(c)) goto eof;
14511 else {
14512 int c2 = escaped_control_code(c);
14513 if (c2) {
14514 if (ISCNTRL(c)) {
14515 if (flags & ESCAPE_META) {
14516 WARN_SPACE_CHAR(c2, "\\M-");
14517 }
14518 else {
14519 WARN_SPACE_CHAR(c2, "");
14520 }
14521 }
14522 else {
14523 if (flags & ESCAPE_META) {
14524 WARN_SPACE_CHAR(c2, "\\M-\\C-");
14525 }
14526 else {
14527 WARN_SPACE_CHAR(c2, "\\C-");
14528 }
14529 }
14530 }
14531 else if (ISCNTRL(c)) goto eof;
14532 }
14533 return c & 0x9f;
14534
14535 eof:
14536 case -1:
14537 yyerror0("Invalid escape character syntax");
14538 token_flush(p);
14539 return '\0';
14540
14541 default:
14542 return c;
14543 }
14544}
14545
14546static void
14547tokaddmbc(struct parser_params *p, int c, rb_encoding *enc)
14548{
14549 int len = rb_enc_codelen(c, enc);
14550 rb_enc_mbcput(c, tokspace(p, len), enc);
14551}
14552
14553static int
14554tokadd_escape(struct parser_params *p, rb_encoding **encp)
14555{
14556 int c;
14557 int flags = 0;
14558 size_t numlen;
14559
14560 first:
14561 switch (c = nextc(p)) {
14562 case '\n':
14563 return 0; /* just ignore */
14564
14565 case '0': case '1': case '2': case '3': /* octal constant */
14566 case '4': case '5': case '6': case '7':
14567 {
14568 ruby_scan_oct(--p->lex.pcur, 3, &numlen);
14569 if (numlen == 0) goto eof;
14570 p->lex.pcur += numlen;
14571 tokcopy(p, (int)numlen + 1);
14572 }
14573 return 0;
14574
14575 case 'x': /* hex constant */
14576 {
14577 tok_hex(p, &numlen);
14578 if (numlen == 0) return -1;
14579 tokcopy(p, (int)numlen + 2);
14580 }
14581 return 0;
14582
14583 case 'M':
14584 if (flags & ESCAPE_META) goto eof;
14585 if ((c = nextc(p)) != '-') {
14586 pushback(p, c);
14587 goto eof;
14588 }
14589 tokcopy(p, 3);
14590 flags |= ESCAPE_META;
14591 goto escaped;
14592
14593 case 'C':
14594 if (flags & ESCAPE_CONTROL) goto eof;
14595 if ((c = nextc(p)) != '-') {
14596 pushback(p, c);
14597 goto eof;
14598 }
14599 tokcopy(p, 3);
14600 goto escaped;
14601
14602 case 'c':
14603 if (flags & ESCAPE_CONTROL) goto eof;
14604 tokcopy(p, 2);
14605 flags |= ESCAPE_CONTROL;
14606 escaped:
14607 if ((c = nextc(p)) == '\\') {
14608 goto first;
14609 }
14610 else if (c == -1) goto eof;
14611 tokadd(p, c);
14612 return 0;
14613
14614 eof:
14615 case -1:
14616 yyerror0("Invalid escape character syntax");
14617 token_flush(p);
14618 return -1;
14619
14620 default:
14621 tokadd(p, '\\');
14622 tokadd(p, c);
14623 }
14624 return 0;
14625}
14626
14627static int
14628regx_options(struct parser_params *p)
14629{
14630 int kcode = 0;
14631 int kopt = 0;
14632 int options = 0;
14633 int c, opt, kc;
14634
14635 newtok(p);
14636 while (c = nextc(p), ISALPHA(c)) {
14637 if (c == 'o') {
14638 options |= RE_OPTION_ONCE;
14639 }
14640 else if (rb_char_to_option_kcode(c, &opt, &kc)) {
14641 if (kc >= 0) {
14642 if (kc != rb_ascii8bit_encindex()) kcode = c;
14643 kopt = opt;
14644 }
14645 else {
14646 options |= opt;
14647 }
14648 }
14649 else {
14650 tokadd(p, c);
14651 }
14652 }
14653 options |= kopt;
14654 pushback(p, c);
14655 if (toklen(p)) {
14656 YYLTYPE loc = RUBY_INIT_YYLLOC();
14657 tokfix(p);
14658 compile_error(p, "unknown regexp option%s - %*s",
14659 toklen(p) > 1 ? "s" : "", toklen(p), tok(p));
14660 parser_show_error_line(p, &loc);
14661 }
14662 return options | RE_OPTION_ENCODING(kcode);
14663}
14664
14665static int
14666tokadd_mbchar(struct parser_params *p, int c)
14667{
14668 int len = parser_precise_mbclen(p, p->lex.pcur-1);
14669 if (len < 0) return -1;
14670 tokadd(p, c);
14671 p->lex.pcur += --len;
14672 if (len > 0) tokcopy(p, len);
14673 return c;
14674}
14675
14676static inline int
14677simple_re_meta(int c)
14678{
14679 switch (c) {
14680 case '$': case '*': case '+': case '.':
14681 case '?': case '^': case '|':
14682 case ')': case ']': case '}': case '>':
14683 return TRUE;
14684 default:
14685 return FALSE;
14686 }
14687}
14688
14689static int
14690parser_update_heredoc_indent(struct parser_params *p, int c)
14691{
14692 if (p->heredoc_line_indent == -1) {
14693 if (c == '\n') p->heredoc_line_indent = 0;
14694 }
14695 else {
14696 if (c == ' ') {
14698 return TRUE;
14699 }
14700 else if (c == '\t') {
14701 int w = (p->heredoc_line_indent / TAB_WIDTH) + 1;
14703 return TRUE;
14704 }
14705 else if (c != '\n') {
14706 if (p->heredoc_indent > p->heredoc_line_indent) {
14708 }
14709 p->heredoc_line_indent = -1;
14710 }
14711 }
14712 return FALSE;
14713}
14714
14715static void
14716parser_mixed_error(struct parser_params *p, rb_encoding *enc1, rb_encoding *enc2)
14717{
14718 YYLTYPE loc = RUBY_INIT_YYLLOC();
14719 const char *n1 = rb_enc_name(enc1), *n2 = rb_enc_name(enc2);
14720 compile_error(p, "%s mixed within %s source", n1, n2);
14721 parser_show_error_line(p, &loc);
14722}
14723
14724static void
14725parser_mixed_escape(struct parser_params *p, const char *beg, rb_encoding *enc1, rb_encoding *enc2)
14726{
14727 const char *pos = p->lex.pcur;
14728 p->lex.pcur = beg;
14729 parser_mixed_error(p, enc1, enc2);
14730 p->lex.pcur = pos;
14731}
14732
14733static int
14734tokadd_string(struct parser_params *p,
14735 int func, int term, int paren, long *nest,
14736 rb_encoding **encp, rb_encoding **enc)
14737{
14738 int c;
14739 bool erred = false;
14740
14741#define mixed_error(enc1, enc2) \
14742 (void)(erred || (parser_mixed_error(p, enc1, enc2), erred = true))
14743#define mixed_escape(beg, enc1, enc2) \
14744 (void)(erred || (parser_mixed_escape(p, beg, enc1, enc2), erred = true))
14745
14746 while ((c = nextc(p)) != -1) {
14747 if (p->heredoc_indent > 0) {
14748 parser_update_heredoc_indent(p, c);
14749 }
14750
14751 if (paren && c == paren) {
14752 ++*nest;
14753 }
14754 else if (c == term) {
14755 if (!nest || !*nest) {
14756 pushback(p, c);
14757 break;
14758 }
14759 --*nest;
14760 }
14761 else if ((func & STR_FUNC_EXPAND) && c == '#' && p->lex.pcur < p->lex.pend) {
14762 int c2 = *p->lex.pcur;
14763 if (c2 == '$' || c2 == '@' || c2 == '{') {
14764 pushback(p, c);
14765 break;
14766 }
14767 }
14768 else if (c == '\\') {
14769 literal_flush(p, p->lex.pcur - 1);
14770 c = nextc(p);
14771 switch (c) {
14772 case '\n':
14773 if (func & STR_FUNC_QWORDS) break;
14774 if (func & STR_FUNC_EXPAND) {
14775 if (!(func & STR_FUNC_INDENT) || (p->heredoc_indent < 0))
14776 continue;
14777 if (c == term) {
14778 c = '\\';
14779 goto terminate;
14780 }
14781 }
14782 tokadd(p, '\\');
14783 break;
14784
14785 case '\\':
14786 if (func & STR_FUNC_ESCAPE) tokadd(p, c);
14787 break;
14788
14789 case 'u':
14790 if ((func & STR_FUNC_EXPAND) == 0) {
14791 tokadd(p, '\\');
14792 break;
14793 }
14794 tokadd_utf8(p, enc, term,
14795 func & STR_FUNC_SYMBOL,
14796 func & STR_FUNC_REGEXP);
14797 continue;
14798
14799 default:
14800 if (c == -1) return -1;
14801 if (!ISASCII(c)) {
14802 if ((func & STR_FUNC_EXPAND) == 0) tokadd(p, '\\');
14803 goto non_ascii;
14804 }
14805 if (func & STR_FUNC_REGEXP) {
14806 if (c == term && !simple_re_meta(c)) {
14807 tokadd(p, c);
14808 continue;
14809 }
14810 pushback(p, c);
14811 if ((c = tokadd_escape(p, enc)) < 0)
14812 return -1;
14813 if (*enc && *enc != *encp) {
14814 mixed_escape(p->lex.ptok+2, *enc, *encp);
14815 }
14816 continue;
14817 }
14818 else if (func & STR_FUNC_EXPAND) {
14819 pushback(p, c);
14820 if (func & STR_FUNC_ESCAPE) tokadd(p, '\\');
14821 c = read_escape(p, 0, enc);
14822 }
14823 else if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) {
14824 /* ignore backslashed spaces in %w */
14825 }
14826 else if (c != term && !(paren && c == paren)) {
14827 tokadd(p, '\\');
14828 pushback(p, c);
14829 continue;
14830 }
14831 }
14832 }
14833 else if (!parser_isascii(p)) {
14834 non_ascii:
14835 if (!*enc) {
14836 *enc = *encp;
14837 }
14838 else if (*enc != *encp) {
14839 mixed_error(*enc, *encp);
14840 continue;
14841 }
14842 if (tokadd_mbchar(p, c) == -1) return -1;
14843 continue;
14844 }
14845 else if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) {
14846 pushback(p, c);
14847 break;
14848 }
14849 if (c & 0x80) {
14850 if (!*enc) {
14851 *enc = *encp;
14852 }
14853 else if (*enc != *encp) {
14854 mixed_error(*enc, *encp);
14855 continue;
14856 }
14857 }
14858 tokadd(p, c);
14859 }
14860 terminate:
14861 if (*enc) *encp = *enc;
14862 return c;
14863}
14864
14865static inline rb_strterm_t *
14866new_strterm(VALUE v1, VALUE v2, VALUE v3, VALUE v0)
14867{
14868 return (rb_strterm_t*)rb_imemo_new(imemo_parser_strterm, v1, v2, v3, v0);
14869}
14870
14871/* imemo_parser_strterm for literal */
14872#define NEW_STRTERM(func, term, paren) \
14873 new_strterm((VALUE)(func), (VALUE)(paren), (VALUE)(term), 0)
14874
14875#ifdef RIPPER
14876static void
14878{
14879 VALUE content = yylval.val;
14880 if (!ripper_is_node_yylval(content))
14881 content = ripper_new_yylval(p, 0, 0, content);
14882 if (has_delayed_token(p)) {
14883 ptrdiff_t len = p->lex.pcur - p->lex.ptok;
14884 if (len > 0) {
14885 rb_enc_str_buf_cat(p->delayed.token, p->lex.ptok, len, enc);
14886 }
14888 p->lex.ptok = p->lex.pcur;
14889 RNODE(content)->nd_rval = yylval.val;
14890 }
14892 if (yylval.val != content)
14893 RNODE(content)->nd_rval = yylval.val;
14894 yylval.val = content;
14895}
14896#else
14897#define flush_string_content(p, enc) ((void)(enc))
14898#endif
14899
14900RUBY_FUNC_EXPORTED const unsigned int ruby_global_name_punct_bits[(0x7e - 0x20 + 31) / 32];
14901/* this can be shared with ripper, since it's independent from struct
14902 * parser_params. */
14903#ifndef RIPPER
14904#define BIT(c, idx) (((c) / 32 - 1 == idx) ? (1U << ((c) % 32)) : 0)
14905#define SPECIAL_PUNCT(idx) ( \
14906 BIT('~', idx) | BIT('*', idx) | BIT('$', idx) | BIT('?', idx) | \
14907 BIT('!', idx) | BIT('@', idx) | BIT('/', idx) | BIT('\\', idx) | \
14908 BIT(';', idx) | BIT(',', idx) | BIT('.', idx) | BIT('=', idx) | \
14909 BIT(':', idx) | BIT('<', idx) | BIT('>', idx) | BIT('\"', idx) | \
14910 BIT('&', idx) | BIT('`', idx) | BIT('\'', idx) | BIT('+', idx) | \
14911 BIT('0', idx))
14912const unsigned int ruby_global_name_punct_bits[] = {
14913 SPECIAL_PUNCT(0),
14914 SPECIAL_PUNCT(1),
14915 SPECIAL_PUNCT(2),
14916};
14917#undef BIT
14918#undef SPECIAL_PUNCT
14919#endif
14920
14921static enum yytokentype
14922parser_peek_variable_name(struct parser_params *p)
14923{
14924 int c;
14925 const char *ptr = p->lex.pcur;
14926
14927 if (ptr + 1 >= p->lex.pend) return 0;
14928 c = *ptr++;
14929 switch (c) {
14930 case '$':
14931 if ((c = *ptr) == '-') {
14932 if (++ptr >= p->lex.pend) return 0;
14933 c = *ptr;
14934 }
14935 else if (is_global_name_punct(c) || ISDIGIT(c)) {
14936 return tSTRING_DVAR;
14937 }
14938 break;
14939 case '@':
14940 if ((c = *ptr) == '@') {
14941 if (++ptr >= p->lex.pend) return 0;
14942 c = *ptr;
14943 }
14944 break;
14945 case '{':
14946 p->lex.pcur = ptr;
14947 p->command_start = TRUE;
14948 return tSTRING_DBEG;
14949 default:
14950 return 0;
14951 }
14952 if (!ISASCII(c) || c == '_' || ISALPHA(c))
14953 return tSTRING_DVAR;
14954 return 0;
14955}
14956
14957#define IS_ARG() IS_lex_state(EXPR_ARG_ANY)
14958#define IS_END() IS_lex_state(EXPR_END_ANY)
14959#define IS_BEG() (IS_lex_state(EXPR_BEG_ANY) || IS_lex_state_all(EXPR_ARG|EXPR_LABELED))
14960#define IS_SPCARG(c) (IS_ARG() && space_seen && !ISSPACE(c))
14961#define IS_LABEL_POSSIBLE() (\
14962 (IS_lex_state(EXPR_LABEL|EXPR_ENDFN) && !cmd_state) || \
14963 IS_ARG())
14964#define IS_LABEL_SUFFIX(n) (peek_n(p, ':',(n)) && !peek_n(p, ':', (n)+1))
14965#define IS_AFTER_OPERATOR() IS_lex_state(EXPR_FNAME | EXPR_DOT)
14966
14967static inline enum yytokentype
14968parser_string_term(struct parser_params *p, int func)
14969{
14970 p->lex.strterm = 0;
14971 if (func & STR_FUNC_REGEXP) {
14972 set_yylval_num(regx_options(p));
14973 dispatch_scan_event(p, tREGEXP_END);
14974 SET_LEX_STATE(EXPR_END);
14975 return tREGEXP_END;
14976 }
14977 if ((func & STR_FUNC_LABEL) && IS_LABEL_SUFFIX(0)) {
14978 nextc(p);
14979 SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
14980 return tLABEL_END;
14981 }
14982 SET_LEX_STATE(EXPR_END);
14983 return tSTRING_END;
14984}
14985
14986static enum yytokentype
14987parse_string(struct parser_params *p, rb_strterm_literal_t *quote)
14988{
14989 int func = (int)quote->u1.func;
14990 int term = (int)quote->u3.term;
14991 int paren = (int)quote->u2.paren;
14992 int c, space = 0;
14993 rb_encoding *enc = p->enc;
14994 rb_encoding *base_enc = 0;
14995 VALUE lit;
14996
14997 if (func & STR_FUNC_TERM) {
14998 if (func & STR_FUNC_QWORDS) nextc(p); /* delayed term */
14999 SET_LEX_STATE(EXPR_END);
15000 p->lex.strterm = 0;
15001 return func & STR_FUNC_REGEXP ? tREGEXP_END : tSTRING_END;
15002 }
15003 c = nextc(p);
15004 if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) {
15005 do {c = nextc(p);} while (ISSPACE(c));
15006 space = 1;
15007 }
15008 if (func & STR_FUNC_LIST) {
15009 quote->u1.func &= ~STR_FUNC_LIST;
15010 space = 1;
15011 }
15012 if (c == term && !quote->u0.nest) {
15013 if (func & STR_FUNC_QWORDS) {
15014 quote->u1.func |= STR_FUNC_TERM;
15015 pushback(p, c); /* dispatch the term at tSTRING_END */
15016 add_delayed_token(p, p->lex.ptok, p->lex.pcur);
15017 return ' ';
15018 }
15019 return parser_string_term(p, func);
15020 }
15021 if (space) {
15022 pushback(p, c);
15023 add_delayed_token(p, p->lex.ptok, p->lex.pcur);
15024 return ' ';
15025 }
15026 newtok(p);
15027 if ((func & STR_FUNC_EXPAND) && c == '#') {
15028 int t = parser_peek_variable_name(p);
15029 if (t) return t;
15030 tokadd(p, '#');
15031 c = nextc(p);
15032 }
15033 pushback(p, c);
15034 if (tokadd_string(p, func, term, paren, &quote->u0.nest,
15035 &enc, &base_enc) == -1) {
15036 if (p->eofp) {
15037#ifndef RIPPER
15038# define unterminated_literal(mesg) yyerror0(mesg)
15039#else
15040# define unterminated_literal(mesg) compile_error(p, mesg)
15041#endif
15042 literal_flush(p, p->lex.pcur);
15043 if (func & STR_FUNC_QWORDS) {
15044 /* no content to add, bailing out here */
15045 unterminated_literal("unterminated list meets end of file");
15046 p->lex.strterm = 0;
15047 return tSTRING_END;
15048 }
15049 if (func & STR_FUNC_REGEXP) {
15050 unterminated_literal("unterminated regexp meets end of file");
15051 }
15052 else {
15053 unterminated_literal("unterminated string meets end of file");
15054 }
15055 quote->u1.func |= STR_FUNC_TERM;
15056 }
15057 }
15058
15059 tokfix(p);
15060 lit = STR_NEW3(tok(p), toklen(p), enc, func);
15061 set_yylval_str(lit);
15062 flush_string_content(p, enc);
15063
15064 return tSTRING_CONTENT;
15065}
15066
15067static enum yytokentype
15068heredoc_identifier(struct parser_params *p)
15069{
15070 /*
15071 * term_len is length of `<<"END"` except `END`,
15072 * in this case term_len is 4 (<, <, " and ").
15073 */
15074 long len, offset = p->lex.pcur - p->lex.pbeg;
15075 int c = nextc(p), term, func = 0, quote = 0;
15076 enum yytokentype token = tSTRING_BEG;
15077 int indent = 0;
15078
15079 if (c == '-') {
15080 c = nextc(p);
15081 func = STR_FUNC_INDENT;
15082 offset++;
15083 }
15084 else if (c == '~') {
15085 c = nextc(p);
15086 func = STR_FUNC_INDENT;
15087 offset++;
15088 indent = INT_MAX;
15089 }
15090 switch (c) {
15091 case '\'':
15092 func |= str_squote; goto quoted;
15093 case '"':
15094 func |= str_dquote; goto quoted;
15095 case '`':
15097 func |= str_xquote; goto quoted;
15098
15099 quoted:
15100 quote++;
15101 offset++;
15102 term = c;
15103 len = 0;
15104 while ((c = nextc(p)) != term) {
15105 if (c == -1 || c == '\r' || c == '\n') {
15106 yyerror(NULL, p, "unterminated here document identifier");
15107 return -1;
15108 }
15109 }
15110 break;
15111
15112 default:
15113 if (!parser_is_identchar(p)) {
15114 pushback(p, c);
15115 if (func & STR_FUNC_INDENT) {
15116 pushback(p, indent > 0 ? '~' : '-');
15117 }
15118 return 0;
15119 }
15120 func |= str_dquote;
15121 do {
15122 int n = parser_precise_mbclen(p, p->lex.pcur-1);
15123 if (n < 0) return 0;
15124 p->lex.pcur += --n;
15125 } while ((c = nextc(p)) != -1 && parser_is_identchar(p));
15126 pushback(p, c);
15127 break;
15128 }
15129
15130 len = p->lex.pcur - (p->lex.pbeg + offset) - quote;
15131 if ((unsigned long)len >= HERETERM_LENGTH_MAX)
15132 yyerror(NULL, p, "too long here document identifier");
15134 lex_goto_eol(p);
15135
15136 p->lex.strterm = new_strterm(0, 0, 0, p->lex.lastline);
15139 here->offset = offset;
15140 here->sourceline = p->ruby_sourceline;
15141 here->length = (int)len;
15142 here->quote = quote;
15143 here->func = func;
15144
15145 token_flush(p);
15146 p->heredoc_indent = indent;
15147 p->heredoc_line_indent = 0;
15148 return token;
15149}
15150
15151static void
15152heredoc_restore(struct parser_params *p, rb_strterm_heredoc_t *here)
15153{
15154 VALUE line;
15155
15156 p->lex.strterm = 0;
15157 line = here->lastline;
15158 p->lex.lastline = line;
15159 p->lex.pbeg = RSTRING_PTR(line);
15160 p->lex.pend = p->lex.pbeg + RSTRING_LEN(line);
15161 p->lex.pcur = p->lex.pbeg + here->offset + here->length + here->quote;
15162 p->lex.ptok = p->lex.pbeg + here->offset - here->quote;
15164 p->ruby_sourceline = (int)here->sourceline;
15165 if (p->eofp) p->lex.nextline = Qnil;
15166 p->eofp = 0;
15167}
15168
15169static int
15170dedent_string(VALUE string, int width)
15171{
15172 char *str;
15173 long len;
15174 int i, col = 0;
15175
15176 RSTRING_GETMEM(string, str, len);
15177 for (i = 0; i < len && col < width; i++) {
15178 if (str[i] == ' ') {
15179 col++;
15180 }
15181 else if (str[i] == '\t') {
15182 int n = TAB_WIDTH * (col / TAB_WIDTH + 1);
15183 if (n > width) break;
15184 col = n;
15185 }
15186 else {
15187 break;
15188 }
15189 }
15190 if (!i) return 0;
15191 rb_str_modify(string);
15192 str = RSTRING_PTR(string);
15193 if (RSTRING_LEN(string) != len)
15194 rb_fatal("literal string changed: %+"PRIsVALUE, string);
15195 MEMMOVE(str, str + i, char, len - i);
15196 rb_str_set_len(string, len - i);
15197 return i;
15198}
15199
15200#ifndef RIPPER
15201static NODE *
15202heredoc_dedent(struct parser_params *p, NODE *root)
15203{
15204 NODE *node, *str_node, *prev_node;
15205 int indent = p->heredoc_indent;
15206 VALUE prev_lit = 0;
15207
15208 if (indent <= 0) return root;
15209 p->heredoc_indent = 0;
15210 if (!root) return root;
15211
15212 prev_node = node = str_node = root;
15213 if (nd_type(root) == NODE_LIST) str_node = root->nd_head;
15214
15215 while (str_node) {
15216 VALUE lit = str_node->nd_lit;
15217 if (str_node->flags & NODE_FL_NEWLINE) {
15218 dedent_string(lit, indent);
15219 }
15220 if (!prev_lit) {
15221 prev_lit = lit;
15222 }
15223 else if (!literal_concat0(p, prev_lit, lit)) {
15224 return 0;
15225 }
15226 else {
15227 NODE *end = node->nd_end;
15228 node = prev_node->nd_next = node->nd_next;
15229 if (!node) {
15230 if (nd_type(prev_node) == NODE_DSTR)
15231 nd_set_type(prev_node, NODE_STR);
15232 break;
15233 }
15234 node->nd_end = end;
15235 goto next_str;
15236 }
15237
15238 str_node = 0;
15239 while ((node = (prev_node = node)->nd_next) != 0) {
15240 next_str:
15241 if (nd_type(node) != NODE_LIST) break;
15242 if ((str_node = node->nd_head) != 0) {
15243 enum node_type type = nd_type(str_node);
15244 if (type == NODE_STR || type == NODE_DSTR) break;
15245 prev_lit = 0;
15246 str_node = 0;
15247 }
15248 }
15249 }
15250 return root;
15251}
15252#else /* RIPPER */
15253static VALUE
15254heredoc_dedent(struct parser_params *p, VALUE array)
15255{
15256 int indent = p->heredoc_indent;
15257
15258 if (indent <= 0) return array;
15259 p->heredoc_indent = 0;
15260 dispatch2(heredoc_dedent, array, INT2NUM(indent));
15261 return array;
15262}
15263
15264/*
15265 * call-seq:
15266 * Ripper.dedent_string(input, width) -> Integer
15267 *
15268 * USE OF RIPPER LIBRARY ONLY.
15269 *
15270 * Strips up to +width+ leading whitespaces from +input+,
15271 * and returns the stripped column width.
15272 */
15273static VALUE
15274parser_dedent_string(VALUE self, VALUE input, VALUE width)
15275{
15276 int wid, col;
15277
15279 wid = NUM2UINT(width);
15280 col = dedent_string(input, wid);
15281 return INT2NUM(col);
15282}
15283#endif
15284
15285static int
15286whole_match_p(struct parser_params *p, const char *eos, long len, int indent)
15287{
15288 const char *ptr = p->lex.pbeg;
15289 long n;
15290
15291 if (indent) {
15292 while (*ptr && ISSPACE(*ptr)) ptr++;
15293 }
15294 n = p->lex.pend - (ptr + len);
15295 if (n < 0) return FALSE;
15296 if (n > 0 && ptr[len] != '\n') {
15297 if (ptr[len] != '\r') return FALSE;
15298 if (n <= 1 || ptr[len+1] != '\n') return FALSE;
15299 }
15300 return strncmp(eos, ptr, len) == 0;
15301}
15302
15303static int
15304word_match_p(struct parser_params *p, const char *word, long len)
15305{
15306 if (strncmp(p->lex.pcur, word, len)) return 0;
15307 if (p->lex.pcur + len == p->lex.pend) return 1;
15308 int c = (unsigned char)p->lex.pcur[len];
15309 if (ISSPACE(c)) return 1;
15310 switch (c) {
15311 case '\0': case '\004': case '\032': return 1;
15312 }
15313 return 0;
15314}
15315
15316#define NUM_SUFFIX_R (1<<0)
15317#define NUM_SUFFIX_I (1<<1)
15318#define NUM_SUFFIX_ALL 3
15319
15320static int
15321number_literal_suffix(struct parser_params *p, int mask)
15322{
15323 int c, result = 0;
15324 const char *lastp = p->lex.pcur;
15325
15326 while ((c = nextc(p)) != -1) {
15327 if ((mask & NUM_SUFFIX_I) && c == 'i') {
15328 result |= (mask & NUM_SUFFIX_I);
15329 mask &= ~NUM_SUFFIX_I;
15330 /* r after i, rational of complex is disallowed */
15331 mask &= ~NUM_SUFFIX_R;
15332 continue;
15333 }
15334 if ((mask & NUM_SUFFIX_R) && c == 'r') {
15335 result |= (mask & NUM_SUFFIX_R);
15336 mask &= ~NUM_SUFFIX_R;
15337 continue;
15338 }
15339 if (!ISASCII(c) || ISALPHA(c) || c == '_') {
15340 p->lex.pcur = lastp;
15341 literal_flush(p, p->lex.pcur);
15342 return 0;
15343 }
15344 pushback(p, c);
15345 break;
15346 }
15347 return result;
15348}
15349
15350static enum yytokentype
15351set_number_literal(struct parser_params *p, VALUE v,
15352 enum yytokentype type, int suffix)
15353{
15354 if (suffix & NUM_SUFFIX_I) {
15355 v = rb_complex_raw(INT2FIX(0), v);
15356 type = tIMAGINARY;
15357 }
15359 SET_LEX_STATE(EXPR_END);
15360 return type;
15361}
15362
15363static enum yytokentype
15364set_integer_literal(struct parser_params *p, VALUE v, int suffix)
15365{
15366 enum yytokentype type = tINTEGER;
15367 if (suffix & NUM_SUFFIX_R) {
15368 v = rb_rational_raw1(v);
15369 type = tRATIONAL;
15370 }
15371 return set_number_literal(p, v, type, suffix);
15372}
15373
15374#ifdef RIPPER
15375static void
15377{
15378 VALUE str;
15379 if (has_delayed_token(p))
15381 str = STR_NEW(p->lex.ptok, p->lex.pend - p->lex.ptok);
15382 ripper_dispatch1(p, ripper_token2eventid(tHEREDOC_END), str);
15383 lex_goto_eol(p);
15384 token_flush(p);
15385}
15386
15387#else
15388#define dispatch_heredoc_end(p) ((void)0)
15389#endif
15390
15391static enum yytokentype
15392here_document(struct parser_params *p, rb_strterm_heredoc_t *here)
15393{
15394 int c, func, indent = 0;
15395 const char *eos, *ptr, *ptr_end;
15396 long len;
15397 VALUE str = 0;
15398 rb_encoding *enc = p->enc;
15399 rb_encoding *base_enc = 0;
15400 int bol;
15401
15402 eos = RSTRING_PTR(here->lastline) + here->offset;
15403 len = here->length;
15404 indent = (func = here->func) & STR_FUNC_INDENT;
15405
15406 if ((c = nextc(p)) == -1) {
15407 error:
15408#ifdef RIPPER
15409 if (!has_delayed_token(p)) {
15411 }
15412 else {
15413 if ((len = p->lex.pcur - p->lex.ptok) > 0) {
15414 if (!(func & STR_FUNC_REGEXP) && rb_enc_asciicompat(enc)) {
15415 int cr = ENC_CODERANGE_UNKNOWN;
15417 if (cr != ENC_CODERANGE_7BIT &&
15418 p->enc == rb_usascii_encoding() &&
15419 enc != rb_utf8_encoding()) {
15421 }
15422 }
15423 rb_enc_str_buf_cat(p->delayed.token, p->lex.ptok, len, enc);
15424 }
15426 }
15427 lex_goto_eol(p);
15428#endif
15429 heredoc_restore(p, &p->lex.strterm->u.heredoc);
15430 compile_error(p, "can't find string \"%.*s\" anywhere before EOF",
15431 (int)len, eos);
15432 token_flush(p);
15433 p->lex.strterm = 0;
15434 SET_LEX_STATE(EXPR_END);
15435 return tSTRING_END;
15436 }
15437 bol = was_bol(p);
15438 if (!bol) {
15439 /* not beginning of line, cannot be the terminator */
15440 }
15441 else if (p->heredoc_line_indent == -1) {
15442 /* `heredoc_line_indent == -1` means
15443 * - "after an interpolation in the same line", or
15444 * - "in a continuing line"
15445 */
15446 p->heredoc_line_indent = 0;
15447 }
15448 else if (whole_match_p(p, eos, len, indent)) {
15450 restore:
15451 heredoc_restore(p, &p->lex.strterm->u.heredoc);
15452 token_flush(p);
15453 p->lex.strterm = 0;
15454 SET_LEX_STATE(EXPR_END);
15455 return tSTRING_END;
15456 }
15457
15458 if (!(func & STR_FUNC_EXPAND)) {
15459 do {
15461 ptr_end = p->lex.pend;
15462 if (ptr_end > ptr) {
15463 switch (ptr_end[-1]) {
15464 case '\n':
15465 if (--ptr_end == ptr || ptr_end[-1] != '\r') {
15466 ptr_end++;
15467 break;
15468 }
15469 case '\r':
15470 --ptr_end;
15471 }
15472 }
15473
15474 if (p->heredoc_indent > 0) {
15475 long i = 0;
15476 while (ptr + i < ptr_end && parser_update_heredoc_indent(p, ptr[i]))
15477 i++;
15478 p->heredoc_line_indent = 0;
15479 }
15480
15481 if (str)
15482 rb_str_cat(str, ptr, ptr_end - ptr);
15483 else
15484 str = STR_NEW(ptr, ptr_end - ptr);
15485 if (ptr_end < p->lex.pend) rb_str_cat(str, "\n", 1);
15486 lex_goto_eol(p);
15487 if (p->heredoc_indent > 0) {
15488 goto flush_str;
15489 }
15490 if (nextc(p) == -1) {
15491 if (str) {
15492 str = 0;
15493 }
15494 goto error;
15495 }
15496 } while (!whole_match_p(p, eos, len, indent));
15497 }
15498 else {
15499 /* int mb = ENC_CODERANGE_7BIT, *mbp = &mb;*/
15500 newtok(p);
15501 if (c == '#') {
15502 int t = parser_peek_variable_name(p);
15503 if (p->heredoc_line_indent != -1) {
15504 if (p->heredoc_indent > p->heredoc_line_indent) {
15506 }
15507 p->heredoc_line_indent = -1;
15508 }
15509 if (t) return t;
15510 tokadd(p, '#');
15511 c = nextc(p);
15512 }
15513 do {
15514 pushback(p, c);
15515 enc = p->enc;
15516 if ((c = tokadd_string(p, func, '\n', 0, NULL, &enc, &base_enc)) == -1) {
15517 if (p->eofp) goto error;
15518 goto restore;
15519 }
15520 if (c != '\n') {
15521 if (c == '\\') p->heredoc_line_indent = -1;
15522 flush:
15523 str = STR_NEW3(tok(p), toklen(p), enc, func);
15524 flush_str:
15526#ifndef RIPPER
15527 if (bol) yylval.node->flags |= NODE_FL_NEWLINE;
15528#endif
15530 return tSTRING_CONTENT;
15531 }
15532 tokadd(p, nextc(p));
15533 if (p->heredoc_indent > 0) {
15534 lex_goto_eol(p);
15535 goto flush;
15536 }
15537 /* if (mbp && mb == ENC_CODERANGE_UNKNOWN) mbp = 0;*/
15538 if ((c = nextc(p)) == -1) goto error;
15539 } while (!whole_match_p(p, eos, len, indent));
15540 str = STR_NEW3(tok(p), toklen(p), enc, func);
15541 }
15543#ifdef RIPPER
15544 str = ripper_new_yylval(p, ripper_token2eventid(tSTRING_CONTENT),
15545 yylval.val, str);
15546#endif
15547 heredoc_restore(p, &p->lex.strterm->u.heredoc);
15548 token_flush(p);
15549 p->lex.strterm = NEW_STRTERM(func | STR_FUNC_TERM, 0, 0);
15551#ifndef RIPPER
15552 if (bol) yylval.node->flags |= NODE_FL_NEWLINE;
15553#endif
15554 return tSTRING_CONTENT;
15555}
15556
15557#include "lex.c"
15558
15559static int
15560arg_ambiguous(struct parser_params *p, char c)
15561{
15562#ifndef RIPPER
15563 if (c == '/') {
15564 rb_warning1("ambiguity between regexp and two divisions: wrap regexp in parentheses or add a space after `%c' operator", WARN_I(c));
15565 }
15566 else {
15567 rb_warning1("ambiguous first argument; put parentheses or a space even after `%c' operator", WARN_I(c));
15568 }
15569#else
15570 dispatch1(arg_ambiguous, rb_usascii_str_new(&c, 1));
15571#endif
15572 return TRUE;
15573}
15574
15575static ID
15576#ifndef RIPPER
15577formal_argument(struct parser_params *p, ID lhs)
15578#else
15579formal_argument(struct parser_params *p, VALUE lhs)
15580#endif
15581{
15582 switch (id_type(get_id(lhs))) {
15583 case ID_LOCAL:
15584 break;
15585#ifndef RIPPER
15586# define ERR(mesg) yyerror0(mesg)
15587#else
15588# define ERR(mesg) (dispatch2(param_error, WARN_S(mesg), lhs), ripper_error(p))
15589#endif
15590 case ID_CONST:
15591 ERR("formal argument cannot be a constant");
15592 return 0;
15593 case ID_INSTANCE:
15594 ERR("formal argument cannot be an instance variable");
15595 return 0;
15596 case ID_GLOBAL:
15597 ERR("formal argument cannot be a global variable");
15598 return 0;
15599 case ID_CLASS:
15600 ERR("formal argument cannot be a class variable");
15601 return 0;
15602 default:
15603 ERR("formal argument must be local variable");
15604 return 0;
15605#undef ERR
15606 }
15607 shadowing_lvar(p, lhs);
15608 return lhs;
15609}
15610
15611static int
15612lvar_defined(struct parser_params *p, ID id)
15613{
15614 return (dyna_in_block(p) && dvar_defined(p, id)) || local_id(p, id);
15615}
15616
15617/* emacsen -*- hack */
15618static long
15619parser_encode_length(struct parser_params *p, const char *name, long len)
15620{
15621 long nlen;
15622
15623 if (len > 5 && name[nlen = len - 5] == '-') {
15624 if (rb_memcicmp(name + nlen + 1, "unix", 4) == 0)
15625 return nlen;
15626 }
15627 if (len > 4 && name[nlen = len - 4] == '-') {
15628 if (rb_memcicmp(name + nlen + 1, "dos", 3) == 0)
15629 return nlen;
15630 if (rb_memcicmp(name + nlen + 1, "mac", 3) == 0 &&
15631 !(len == 8 && rb_memcicmp(name, "utf8-mac", len) == 0))
15632 /* exclude UTF8-MAC because the encoding named "UTF8" doesn't exist in Ruby */
15633 return nlen;
15634 }
15635 return len;
15636}
15637
15638static void
15639parser_set_encode(struct parser_params *p, const char *name)
15640{
15641 int idx = rb_enc_find_index(name);
15643 VALUE excargs[3];
15644
15645 if (idx < 0) {
15646 excargs[1] = rb_sprintf("unknown encoding name: %s", name);
15647 error:
15648 excargs[0] = rb_eArgError;
15649 excargs[2] = rb_make_backtrace();
15651 rb_exc_raise(rb_make_exception(3, excargs));
15652 }
15653 enc = rb_enc_from_index(idx);
15654 if (!rb_enc_asciicompat(enc)) {
15655 excargs[1] = rb_sprintf("%s is not ASCII compatible", rb_enc_name(enc));
15656 goto error;
15657 }
15658 p->enc = enc;
15659#ifndef RIPPER
15660 if (p->debug_lines) {
15661 VALUE lines = p->debug_lines;
15662 long i, n = RARRAY_LEN(lines);
15663 for (i = 0; i < n; ++i) {
15664 rb_enc_associate_index(RARRAY_AREF(lines, i), idx);
15665 }
15666 }
15667#endif
15668}
15669
15670static int
15671comment_at_top(struct parser_params *p)
15672{
15673 const char *ptr = p->lex.pbeg, *ptr_end = p->lex.pcur - 1;
15674 if (p->line_count != (p->has_shebang ? 2 : 1)) return 0;
15675 while (ptr < ptr_end) {
15676 if (!ISSPACE(*ptr)) return 0;
15677 ptr++;
15678 }
15679 return 1;
15680}
15681
15682typedef long (*rb_magic_comment_length_t)(struct parser_params *p, const char *name, long len);
15683typedef void (*rb_magic_comment_setter_t)(struct parser_params *p, const char *name, const char *val);
15684
15685static int parser_invalid_pragma_value(struct parser_params *p, const char *name, const char *val);
15686
15687static void
15688magic_comment_encoding(struct parser_params *p, const char *name, const char *val)
15689{
15690 if (!comment_at_top(p)) {
15691 return;
15692 }
15693 parser_set_encode(p, val);
15694}
15695
15696static int
15697parser_get_bool(struct parser_params *p, const char *name, const char *val)
15698{
15699 switch (*val) {
15700 case 't': case 'T':
15701 if (STRCASECMP(val, "true") == 0) {
15702 return TRUE;
15703 }
15704 break;
15705 case 'f': case 'F':
15706 if (STRCASECMP(val, "false") == 0) {
15707 return FALSE;
15708 }
15709 break;
15710 }
15711 return parser_invalid_pragma_value(p, name, val);
15712}
15713
15714static int
15715parser_invalid_pragma_value(struct parser_params *p, const char *name, const char *val)
15716{
15717 rb_warning2("invalid value for %s: %s", WARN_S(name), WARN_S(val));
15718 return -1;
15719}
15720
15721static void
15722parser_set_token_info(struct parser_params *p, const char *name, const char *val)
15723{
15724 int b = parser_get_bool(p, name, val);
15725 if (b >= 0) p->token_info_enabled = b;
15726}
15727
15728static void
15729parser_set_compile_option_flag(struct parser_params *p, const char *name, const char *val)
15730{
15731 int b;
15732
15733 if (p->token_seen) {
15734 rb_warning1("`%s' is ignored after any tokens", WARN_S(name));
15735 return;
15736 }
15737
15738 b = parser_get_bool(p, name, val);
15739 if (b < 0) return;
15740
15741 if (!p->compile_option)
15744 (b ? Qtrue : Qfalse));
15745}
15746
15747static void
15748parser_set_shareable_constant_value(struct parser_params *p, const char *name, const char *val)
15749{
15750 for (const char *s = p->lex.pbeg, *e = p->lex.pcur; s < e; ++s) {
15751 if (*s == ' ' || *s == '\t') continue;
15752 if (*s == '#') break;
15753 rb_warning1("`%s' is ignored unless in comment-only line", WARN_S(name));
15754 return;
15755 }
15756
15757 switch (*val) {
15758 case 'n': case 'N':
15759 if (STRCASECMP(val, "none") == 0) {
15760 p->ctxt.shareable_constant_value = shareable_none;
15761 return;
15762 }
15763 break;
15764 case 'l': case 'L':
15765 if (STRCASECMP(val, "literal") == 0) {
15766 p->ctxt.shareable_constant_value = shareable_literal;
15767 return;
15768 }
15769 break;
15770 case 'e': case 'E':
15771 if (STRCASECMP(val, "experimental_copy") == 0) {
15772 p->ctxt.shareable_constant_value = shareable_copy;
15773 return;
15774 }
15775 if (STRCASECMP(val, "experimental_everything") == 0) {
15776 p->ctxt.shareable_constant_value = shareable_everything;
15777 return;
15778 }
15779 break;
15780 }
15781 parser_invalid_pragma_value(p, name, val);
15782}
15783
15784# if WARN_PAST_SCOPE
15785static void
15786parser_set_past_scope(struct parser_params *p, const char *name, const char *val)
15787{
15788 int b = parser_get_bool(p, name, val);
15789 if (b >= 0) p->past_scope_enabled = b;
15790}
15791# endif
15792
15794 const char *name;
15797};
15798
15799static const struct magic_comment magic_comments[] = {
15800 {"coding", magic_comment_encoding, parser_encode_length},
15801 {"encoding", magic_comment_encoding, parser_encode_length},
15802 {"frozen_string_literal", parser_set_compile_option_flag},
15803 {"shareable_constant_value", parser_set_shareable_constant_value},
15804 {"warn_indent", parser_set_token_info},
15805# if WARN_PAST_SCOPE
15806 {"warn_past_scope", parser_set_past_scope},
15807# endif
15808};
15809
15810static const char *
15811magic_comment_marker(const char *str, long len)
15812{
15813 long i = 2;
15814
15815 while (i < len) {
15816 switch (str[i]) {
15817 case '-':
15818 if (str[i-1] == '*' && str[i-2] == '-') {
15819 return str + i + 1;
15820 }
15821 i += 2;
15822 break;
15823 case '*':
15824 if (i + 1 >= len) return 0;
15825 if (str[i+1] != '-') {
15826 i += 4;
15827 }
15828 else if (str[i-1] != '-') {
15829 i += 2;
15830 }
15831 else {
15832 return str + i + 2;
15833 }
15834 break;
15835 default:
15836 i += 3;
15837 break;
15838 }
15839 }
15840 return 0;
15841}
15842
15843static int
15844parser_magic_comment(struct parser_params *p, const char *str, long len)
15845{
15846 int indicator = 0;
15847 VALUE name = 0, val = 0;
15848 const char *beg, *end, *vbeg, *vend;
15849#define str_copy(_s, _p, _n) ((_s) \
15850 ? (void)(rb_str_resize((_s), (_n)), \
15851 MEMCPY(RSTRING_PTR(_s), (_p), char, (_n)), (_s)) \
15852 : (void)((_s) = STR_NEW((_p), (_n))))
15853
15854 if (len <= 7) return FALSE;
15855 if (!!(beg = magic_comment_marker(str, len))) {
15856 if (!(end = magic_comment_marker(beg, str + len - beg)))
15857 return FALSE;
15858 indicator = TRUE;
15859 str = beg;
15860 len = end - beg - 3;
15861 }
15862
15863 /* %r"([^\\s\'\":;]+)\\s*:\\s*(\"(?:\\\\.|[^\"])*\"|[^\"\\s;]+)[\\s;]*" */
15864 while (len > 0) {
15865 const struct magic_comment *mc = magic_comments;
15866 char *s;
15867 int i;
15868 long n = 0;
15869
15870 for (; len > 0 && *str; str++, --len) {
15871 switch (*str) {
15872 case '\'': case '"': case ':': case ';':
15873 continue;
15874 }
15875 if (!ISSPACE(*str)) break;
15876 }
15877 for (beg = str; len > 0; str++, --len) {
15878 switch (*str) {
15879 case '\'': case '"': case ':': case ';':
15880 break;
15881 default:
15882 if (ISSPACE(*str)) break;
15883 continue;
15884 }
15885 break;
15886 }
15887 for (end = str; len > 0 && ISSPACE(*str); str++, --len);
15888 if (!len) break;
15889 if (*str != ':') {
15890 if (!indicator) return FALSE;
15891 continue;
15892 }
15893
15894 do str++; while (--len > 0 && ISSPACE(*str));
15895 if (!len) break;
15896 if (*str == '"') {
15897 for (vbeg = ++str; --len > 0 && *str != '"'; str++) {
15898 if (*str == '\\') {
15899 --len;
15900 ++str;
15901 }
15902 }
15903 vend = str;
15904 if (len) {
15905 --len;
15906 ++str;
15907 }
15908 }
15909 else {
15910 for (vbeg = str; len > 0 && *str != '"' && *str != ';' && !ISSPACE(*str); --len, str++);
15911 vend = str;
15912 }
15913 if (indicator) {
15914 while (len > 0 && (*str == ';' || ISSPACE(*str))) --len, str++;
15915 }
15916 else {
15917 while (len > 0 && (ISSPACE(*str))) --len, str++;
15918 if (len) return FALSE;
15919 }
15920
15921 n = end - beg;
15922 str_copy(name, beg, n);
15923 s = RSTRING_PTR(name);
15924 for (i = 0; i < n; ++i) {
15925 if (s[i] == '-') s[i] = '_';
15926 }
15927 do {
15928 if (STRNCASECMP(mc->name, s, n) == 0 && !mc->name[n]) {
15929 n = vend - vbeg;
15930 if (mc->length) {
15931 n = (*mc->length)(p, vbeg, n);
15932 }
15933 str_copy(val, vbeg, n);
15934 (*mc->func)(p, mc->name, RSTRING_PTR(val));
15935 break;
15936 }
15937 } while (++mc < magic_comments + numberof(magic_comments));
15938#ifdef RIPPER
15939 str_copy(val, vbeg, vend - vbeg);
15940 dispatch2(magic_comment, name, val);
15941#endif
15942 }
15943
15944 return TRUE;
15945}
15946
15947static void
15948set_file_encoding(struct parser_params *p, const char *str, const char *send)
15949{
15950 int sep = 0;
15951 const char *beg = str;
15952 VALUE s;
15953
15954 for (;;) {
15955 if (send - str <= 6) return;
15956 switch (str[6]) {
15957 case 'C': case 'c': str += 6; continue;
15958 case 'O': case 'o': str += 5; continue;
15959 case 'D': case 'd': str += 4; continue;
15960 case 'I': case 'i': str += 3; continue;
15961 case 'N': case 'n': str += 2; continue;
15962 case 'G': case 'g': str += 1; continue;
15963 case '=': case ':':
15964 sep = 1;
15965 str += 6;
15966 break;
15967 default:
15968 str += 6;
15969 if (ISSPACE(*str)) break;
15970 continue;
15971 }
15972 if (STRNCASECMP(str-6, "coding", 6) == 0) break;
15973 }
15974 for (;;) {
15975 do {
15976 if (++str >= send) return;
15977 } while (ISSPACE(*str));
15978 if (sep) break;
15979 if (*str != '=' && *str != ':') return;
15980 sep = 1;
15981 str++;
15982 }
15983 beg = str;
15984 while ((*str == '-' || *str == '_' || ISALNUM(*str)) && ++str < send);
15985 s = rb_str_new(beg, parser_encode_length(p, beg, str - beg));
15986 parser_set_encode(p, RSTRING_PTR(s));
15987 rb_str_resize(s, 0);
15988}
15989
15990static void
15991parser_prepare(struct parser_params *p)
15992{
15993 int c = nextc(p);
15995 switch (c) {
15996 case '#':
15997 if (peek(p, '!')) p->has_shebang = 1;
15998 break;
15999 case 0xef: /* UTF-8 BOM marker */
16000 if (p->lex.pend - p->lex.pcur >= 2 &&
16001 (unsigned char)p->lex.pcur[0] == 0xbb &&
16002 (unsigned char)p->lex.pcur[1] == 0xbf) {
16003 p->enc = rb_utf8_encoding();
16004 p->lex.pcur += 2;
16005 p->lex.pbeg = p->lex.pcur;
16006 return;
16007 }
16008 break;
16009 case EOF:
16010 return;
16011 }
16012 pushback(p, c);
16013 p->enc = rb_enc_get(p->lex.lastline);
16014}
16015
16016#ifndef RIPPER
16017#define ambiguous_operator(tok, op, syn) ( \
16018 rb_warning0("`"op"' after local variable or literal is interpreted as binary operator"), \
16019 rb_warning0("even though it seems like "syn""))
16020#else
16021#define ambiguous_operator(tok, op, syn) \
16022 dispatch2(operator_ambiguous, TOKEN2VAL(tok), rb_str_new_cstr(syn))
16023#endif
16024#define warn_balanced(tok, op, syn) ((void) \
16025 (!IS_lex_state_for(last_state, EXPR_CLASS|EXPR_DOT|EXPR_FNAME|EXPR_ENDFN) && \
16026 space_seen && !ISSPACE(c) && \
16027 (ambiguous_operator(tok, op, syn), 0)), \
16028 (enum yytokentype)(tok))
16029
16030static VALUE
16031parse_rational(struct parser_params *p, char *str, int len, int seen_point)
16032{
16033 VALUE v;
16034 char *point = &str[seen_point];
16035 size_t fraclen = len-seen_point-1;
16036 memmove(point, point+1, fraclen+1);
16037 v = rb_cstr_to_inum(str, 10, FALSE);
16038 return rb_rational_new(v, rb_int_positive_pow(10, fraclen));
16039}
16040
16041static enum yytokentype
16042no_digits(struct parser_params *p)
16043{
16044 yyerror0("numeric literal without digits");
16045 if (peek(p, '_')) nextc(p);
16046 /* dummy 0, for tUMINUS_NUM at numeric */
16047 return set_integer_literal(p, INT2FIX(0), 0);
16048}
16049
16050static enum yytokentype
16051parse_numeric(struct parser_params *p, int c)
16052{
16053 int is_float, seen_point, seen_e, nondigit;
16054 int suffix;
16055
16056 is_float = seen_point = seen_e = nondigit = 0;
16057 SET_LEX_STATE(EXPR_END);
16058 newtok(p);
16059 if (c == '-' || c == '+') {
16060 tokadd(p, c);
16061 c = nextc(p);
16062 }
16063 if (c == '0') {
16064 int start = toklen(p);
16065 c = nextc(p);
16066 if (c == 'x' || c == 'X') {
16067 /* hexadecimal */
16068 c = nextc(p);
16069 if (c != -1 && ISXDIGIT(c)) {
16070 do {
16071 if (c == '_') {
16072 if (nondigit) break;
16073 nondigit = c;
16074 continue;
16075 }
16076 if (!ISXDIGIT(c)) break;
16077 nondigit = 0;
16078 tokadd(p, c);
16079 } while ((c = nextc(p)) != -1);
16080 }
16081 pushback(p, c);
16082 tokfix(p);
16083 if (toklen(p) == start) {
16084 return no_digits(p);
16085 }
16086 else if (nondigit) goto trailing_uc;
16087 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
16088 return set_integer_literal(p, rb_cstr_to_inum(tok(p), 16, FALSE), suffix);
16089 }
16090 if (c == 'b' || c == 'B') {
16091 /* binary */
16092 c = nextc(p);
16093 if (c == '0' || c == '1') {
16094 do {
16095 if (c == '_') {
16096 if (nondigit) break;
16097 nondigit = c;
16098 continue;
16099 }
16100 if (c != '0' && c != '1') break;
16101 nondigit = 0;
16102 tokadd(p, c);
16103 } while ((c = nextc(p)) != -1);
16104 }
16105 pushback(p, c);
16106 tokfix(p);
16107 if (toklen(p) == start) {
16108 return no_digits(p);
16109 }
16110 else if (nondigit) goto trailing_uc;
16111 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
16112 return set_integer_literal(p, rb_cstr_to_inum(tok(p), 2, FALSE), suffix);
16113 }
16114 if (c == 'd' || c == 'D') {
16115 /* decimal */
16116 c = nextc(p);
16117 if (c != -1 && ISDIGIT(c)) {
16118 do {
16119 if (c == '_') {
16120 if (nondigit) break;
16121 nondigit = c;
16122 continue;
16123 }
16124 if (!ISDIGIT(c)) break;
16125 nondigit = 0;
16126 tokadd(p, c);
16127 } while ((c = nextc(p)) != -1);
16128 }
16129 pushback(p, c);
16130 tokfix(p);
16131 if (toklen(p) == start) {
16132 return no_digits(p);
16133 }
16134 else if (nondigit) goto trailing_uc;
16135 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
16136 return set_integer_literal(p, rb_cstr_to_inum(tok(p), 10, FALSE), suffix);
16137 }
16138 if (c == '_') {
16139 /* 0_0 */
16140 goto octal_number;
16141 }
16142 if (c == 'o' || c == 'O') {
16143 /* prefixed octal */
16144 c = nextc(p);
16145 if (c == -1 || c == '_' || !ISDIGIT(c)) {
16146 return no_digits(p);
16147 }
16148 }
16149 if (c >= '0' && c <= '7') {
16150 /* octal */
16151 octal_number:
16152 do {
16153 if (c == '_') {
16154 if (nondigit) break;
16155 nondigit = c;
16156 continue;
16157 }
16158 if (c < '0' || c > '9') break;
16159 if (c > '7') goto invalid_octal;
16160 nondigit = 0;
16161 tokadd(p, c);
16162 } while ((c = nextc(p)) != -1);
16163 if (toklen(p) > start) {
16164 pushback(p, c);
16165 tokfix(p);
16166 if (nondigit) goto trailing_uc;
16167 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
16168 return set_integer_literal(p, rb_cstr_to_inum(tok(p), 8, FALSE), suffix);
16169 }
16170 if (nondigit) {
16171 pushback(p, c);
16172 goto trailing_uc;
16173 }
16174 }
16175 if (c > '7' && c <= '9') {
16176 invalid_octal:
16177 yyerror0("Invalid octal digit");
16178 }
16179 else if (c == '.' || c == 'e' || c == 'E') {
16180 tokadd(p, '0');
16181 }
16182 else {
16183 pushback(p, c);
16184 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
16185 return set_integer_literal(p, INT2FIX(0), suffix);
16186 }
16187 }
16188
16189 for (;;) {
16190 switch (c) {
16191 case '0': case '1': case '2': case '3': case '4':
16192 case '5': case '6': case '7': case '8': case '9':
16193 nondigit = 0;
16194 tokadd(p, c);
16195 break;
16196
16197 case '.':
16198 if (nondigit) goto trailing_uc;
16199 if (seen_point || seen_e) {
16200 goto decode_num;
16201 }
16202 else {
16203 int c0 = nextc(p);
16204 if (c0 == -1 || !ISDIGIT(c0)) {
16205 pushback(p, c0);
16206 goto decode_num;
16207 }
16208 c = c0;
16209 }
16210 seen_point = toklen(p);
16211 tokadd(p, '.');
16212 tokadd(p, c);
16213 is_float++;
16214 nondigit = 0;
16215 break;
16216
16217 case 'e':
16218 case 'E':
16219 if (nondigit) {
16220 pushback(p, c);
16221 c = nondigit;
16222 goto decode_num;
16223 }
16224 if (seen_e) {
16225 goto decode_num;
16226 }
16227 nondigit = c;
16228 c = nextc(p);
16229 if (c != '-' && c != '+' && !ISDIGIT(c)) {
16230 pushback(p, c);
16231 nondigit = 0;
16232 goto decode_num;
16233 }
16234 tokadd(p, nondigit);
16235 seen_e++;
16236 is_float++;
16237 tokadd(p, c);
16238 nondigit = (c == '-' || c == '+') ? c : 0;
16239 break;
16240
16241 case '_': /* `_' in number just ignored */
16242 if (nondigit) goto decode_num;
16243 nondigit = c;
16244 break;
16245
16246 default:
16247 goto decode_num;
16248 }
16249 c = nextc(p);
16250 }
16251
16252 decode_num:
16253 pushback(p, c);
16254 if (nondigit) {
16255 trailing_uc:
16256 literal_flush(p, p->lex.pcur - 1);
16257 YYLTYPE loc = RUBY_INIT_YYLLOC();
16258 compile_error(p, "trailing `%c' in number", nondigit);
16259 parser_show_error_line(p, &loc);
16260 }
16261 tokfix(p);
16262 if (is_float) {
16263 enum yytokentype type = tFLOAT;
16264 VALUE v;
16265
16266 suffix = number_literal_suffix(p, seen_e ? NUM_SUFFIX_I : NUM_SUFFIX_ALL);
16267 if (suffix & NUM_SUFFIX_R) {
16268 type = tRATIONAL;
16269 v = parse_rational(p, tok(p), toklen(p), seen_point);
16270 }
16271 else {
16272 double d = strtod(tok(p), 0);
16273 if (errno == ERANGE) {
16274 rb_warning1("Float %s out of range", WARN_S(tok(p)));
16275 errno = 0;
16276 }
16277 v = DBL2NUM(d);
16278 }
16279 return set_number_literal(p, v, type, suffix);
16280 }
16281 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
16282 return set_integer_literal(p, rb_cstr_to_inum(tok(p), 10, FALSE), suffix);
16283}
16284
16285static enum yytokentype
16286parse_qmark(struct parser_params *p, int space_seen)
16287{
16288 rb_encoding *enc;
16289 register int c;
16290 VALUE lit;
16291
16292 if (IS_END()) {
16294 return '?';
16295 }
16296 c = nextc(p);
16297 if (c == -1) {
16298 compile_error(p, "incomplete character syntax");
16299 return 0;
16300 }
16301 if (rb_enc_isspace(c, p->enc)) {
16302 if (!IS_ARG()) {
16303 int c2 = escaped_control_code(c);
16304 if (c2) {
16305 WARN_SPACE_CHAR(c2, "?");
16306 }
16307 }
16308 ternary:
16309 pushback(p, c);
16311 return '?';
16312 }
16313 newtok(p);
16314 enc = p->enc;
16315 if (!parser_isascii(p)) {
16316 if (tokadd_mbchar(p, c) == -1) return 0;
16317 }
16318 else if ((rb_enc_isalnum(c, p->enc) || c == '_') &&
16319 p->lex.pcur < p->lex.pend && is_identchar(p->lex.pcur, p->lex.pend, p->enc)) {
16320 if (space_seen) {
16321 const char *start = p->lex.pcur - 1, *ptr = start;
16322 do {
16323 int n = parser_precise_mbclen(p, ptr);
16324 if (n < 0) return -1;
16325 ptr += n;
16326 } while (ptr < p->lex.pend && is_identchar(ptr, p->lex.pend, p->enc));
16327 rb_warn2("`?' just followed by `%.*s' is interpreted as" \
16328 " a conditional operator, put a space after `?'",
16329 WARN_I((int)(ptr - start)), WARN_S_L(start, (ptr - start)));
16330 }
16331 goto ternary;
16332 }
16333 else if (c == '\\') {
16334 if (peek(p, 'u')) {
16335 nextc(p);
16336 enc = rb_utf8_encoding();
16337 tokadd_utf8(p, &enc, -1, 0, 0);
16338 }
16339 else if (!lex_eol_p(p) && !(c = *p->lex.pcur, ISASCII(c))) {
16340 nextc(p);
16341 if (tokadd_mbchar(p, c) == -1) return 0;
16342 }
16343 else {
16344 c = read_escape(p, 0, &enc);
16345 tokadd(p, c);
16346 }
16347 }
16348 else {
16349 tokadd(p, c);
16350 }
16351 tokfix(p);
16352 lit = STR_NEW3(tok(p), toklen(p), enc, 0);
16353 set_yylval_str(lit);
16354 SET_LEX_STATE(EXPR_END);
16355 return tCHAR;
16356}
16357
16358static enum yytokentype
16359parse_percent(struct parser_params *p, const int space_seen, const enum lex_state_e last_state)
16360{
16361 register int c;
16362 const char *ptok = p->lex.pcur;
16363
16364 if (IS_BEG()) {
16365 int term;
16366 int paren;
16367
16368 c = nextc(p);
16369 quotation:
16370 if (c == -1 || !ISALNUM(c)) {
16371 term = c;
16372 if (!ISASCII(c)) goto unknown;
16373 c = 'Q';
16374 }
16375 else {
16376 term = nextc(p);
16377 if (rb_enc_isalnum(term, p->enc) || !parser_isascii(p)) {
16378 unknown:
16379 pushback(p, term);
16380 c = parser_precise_mbclen(p, p->lex.pcur);
16381 if (c < 0) return 0;
16382 p->lex.pcur += c;
16383 yyerror0("unknown type of %string");
16384 return 0;
16385 }
16386 }
16387 if (term == -1) {
16388 compile_error(p, "unterminated quoted string meets end of file");
16389 return 0;
16390 }
16391 paren = term;
16392 if (term == '(') term = ')';
16393 else if (term == '[') term = ']';
16394 else if (term == '{') term = '}';
16395 else if (term == '<') term = '>';
16396 else paren = 0;
16397
16398 p->lex.ptok = ptok-1;
16399 switch (c) {
16400 case 'Q':
16401 p->lex.strterm = NEW_STRTERM(str_dquote, term, paren);
16402 return tSTRING_BEG;
16403
16404 case 'q':
16405 p->lex.strterm = NEW_STRTERM(str_squote, term, paren);
16406 return tSTRING_BEG;
16407
16408 case 'W':
16409 p->lex.strterm = NEW_STRTERM(str_dword, term, paren);
16410 return tWORDS_BEG;
16411
16412 case 'w':
16413 p->lex.strterm = NEW_STRTERM(str_sword, term, paren);
16414 return tQWORDS_BEG;
16415
16416 case 'I':
16417 p->lex.strterm = NEW_STRTERM(str_dword, term, paren);
16418 return tSYMBOLS_BEG;
16419
16420 case 'i':
16421 p->lex.strterm = NEW_STRTERM(str_sword, term, paren);
16422 return tQSYMBOLS_BEG;
16423
16424 case 'x':
16425 p->lex.strterm = NEW_STRTERM(str_xquote, term, paren);
16426 return tXSTRING_BEG;
16427
16428 case 'r':
16429 p->lex.strterm = NEW_STRTERM(str_regexp, term, paren);
16430 return tREGEXP_BEG;
16431
16432 case 's':
16433 p->lex.strterm = NEW_STRTERM(str_ssym, term, paren);
16434 SET_LEX_STATE(EXPR_FNAME|EXPR_FITEM);
16435 return tSYMBEG;
16436
16437 default:
16438 yyerror0("unknown type of %string");
16439 return 0;
16440 }
16441 }
16442 if ((c = nextc(p)) == '=') {
16443 set_yylval_id('%');
16444 SET_LEX_STATE(EXPR_BEG);
16445 return tOP_ASGN;
16446 }
16447 if (IS_SPCARG(c) || (IS_lex_state(EXPR_FITEM) && c == 's')) {
16448 goto quotation;
16449 }
16450 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
16451 pushback(p, c);
16452 return warn_balanced('%', "%%", "string literal");
16453}
16454
16455static int
16456tokadd_ident(struct parser_params *p, int c)
16457{
16458 do {
16459 if (tokadd_mbchar(p, c) == -1) return -1;
16460 c = nextc(p);
16461 } while (parser_is_identchar(p));
16462 pushback(p, c);
16463 return 0;
16464}
16465
16466static ID
16467tokenize_ident(struct parser_params *p, const enum lex_state_e last_state)
16468{
16469 ID ident = TOK_INTERN();
16470
16471 set_yylval_name(ident);
16472
16473 return ident;
16474}
16475
16476static int
16477parse_numvar(struct parser_params *p)
16478{
16479 size_t len;
16480 int overflow;
16481 unsigned long n = ruby_scan_digits(tok(p)+1, toklen(p)-1, 10, &len, &overflow);
16482 const unsigned long nth_ref_max =
16483 ((FIXNUM_MAX < INT_MAX) ? FIXNUM_MAX : INT_MAX) >> 1;
16484 /* NTH_REF is left-shifted to be ORed with back-ref flag and
16485 * turned into a Fixnum, in compile.c */
16486
16487 if (overflow || n > nth_ref_max) {
16488 /* compile_error()? */
16489 rb_warn1("`%s' is too big for a number variable, always nil", WARN_S(tok(p)));
16490 return 0; /* $0 is $PROGRAM_NAME, not NTH_REF */
16491 }
16492 else {
16493 return (int)n;
16494 }
16495}
16496
16497static enum yytokentype
16498parse_gvar(struct parser_params *p, const enum lex_state_e last_state)
16499{
16500 const char *ptr = p->lex.pcur;
16501 register int c;
16502
16503 SET_LEX_STATE(EXPR_END);
16504 p->lex.ptok = ptr - 1; /* from '$' */
16505 newtok(p);
16506 c = nextc(p);
16507 switch (c) {
16508 case '_': /* $_: last read line string */
16509 c = nextc(p);
16510 if (parser_is_identchar(p)) {
16511 tokadd(p, '$');
16512 tokadd(p, '_');
16513 break;
16514 }
16515 pushback(p, c);
16516 c = '_';
16517 /* fall through */
16518 case '~': /* $~: match-data */
16519 case '*': /* $*: argv */
16520 case '$': /* $$: pid */
16521 case '?': /* $?: last status */
16522 case '!': /* $!: error string */
16523 case '@': /* $@: error position */
16524 case '/': /* $/: input record separator */
16525 case '\\': /* $\: output record separator */
16526 case ';': /* $;: field separator */
16527 case ',': /* $,: output field separator */
16528 case '.': /* $.: last read line number */
16529 case '=': /* $=: ignorecase */
16530 case ':': /* $:: load path */
16531 case '<': /* $<: reading filename */
16532 case '>': /* $>: default output handle */
16533 case '\"': /* $": already loaded files */
16534 tokadd(p, '$');
16535 tokadd(p, c);
16536 goto gvar;
16537
16538 case '-':
16539 tokadd(p, '$');
16540 tokadd(p, c);
16541 c = nextc(p);
16542 if (parser_is_identchar(p)) {
16543 if (tokadd_mbchar(p, c) == -1) return 0;
16544 }
16545 else {
16546 pushback(p, c);
16547 pushback(p, '-');
16548 return '$';
16549 }
16550 gvar:
16552 return tGVAR;
16553
16554 case '&': /* $&: last match */
16555 case '`': /* $`: string before last match */
16556 case '\'': /* $': string after last match */
16557 case '+': /* $+: string matches last paren. */
16558 if (IS_lex_state_for(last_state, EXPR_FNAME)) {
16559 tokadd(p, '$');
16560 tokadd(p, c);
16561 goto gvar;
16562 }
16563 set_yylval_node(NEW_BACK_REF(c, &_cur_loc));
16564 return tBACK_REF;
16565
16566 case '1': case '2': case '3':
16567 case '4': case '5': case '6':
16568 case '7': case '8': case '9':
16569 tokadd(p, '$');
16570 do {
16571 tokadd(p, c);
16572 c = nextc(p);
16573 } while (c != -1 && ISDIGIT(c));
16574 pushback(p, c);
16575 if (IS_lex_state_for(last_state, EXPR_FNAME)) goto gvar;
16576 tokfix(p);
16577 c = parse_numvar(p);
16578 set_yylval_node(NEW_NTH_REF(c, &_cur_loc));
16579 return tNTH_REF;
16580
16581 default:
16582 if (!parser_is_identchar(p)) {
16583 YYLTYPE loc = RUBY_INIT_YYLLOC();
16584 if (c == -1 || ISSPACE(c)) {
16585 compile_error(p, "`$' without identifiers is not allowed as a global variable name");
16586 }
16587 else {
16588 pushback(p, c);
16589 compile_error(p, "`$%c' is not allowed as a global variable name", c);
16590 }
16591 parser_show_error_line(p, &loc);
16593 return tGVAR;
16594 }
16595 /* fall through */
16596 case '0':
16597 tokadd(p, '$');
16598 }
16599
16600 if (tokadd_ident(p, c)) return 0;
16601 SET_LEX_STATE(EXPR_END);
16602 tokenize_ident(p, last_state);
16603 return tGVAR;
16604}
16605
16606#ifndef RIPPER
16607static bool
16608parser_numbered_param(struct parser_params *p, int n)
16609{
16610 if (n < 0) return false;
16611
16613 return false;
16614 }
16615 if (p->max_numparam == ORDINAL_PARAM) {
16616 compile_error(p, "ordinary parameter is defined");
16617 return false;
16618 }
16619 struct vtable *args = p->lvtbl->args;
16620 if (p->max_numparam < n) {
16621 p->max_numparam = n;
16622 }
16623 while (n > args->pos) {
16624 vtable_add(args, NUMPARAM_IDX_TO_ID(args->pos+1));
16625 }
16626 return true;
16627}
16628#endif
16629
16630static enum yytokentype
16631parse_atmark(struct parser_params *p, const enum lex_state_e last_state)
16632{
16633 const char *ptr = p->lex.pcur;
16634 enum yytokentype result = tIVAR;
16635 register int c = nextc(p);
16636 YYLTYPE loc;
16637
16638 p->lex.ptok = ptr - 1; /* from '@' */
16639 newtok(p);
16640 tokadd(p, '@');
16641 if (c == '@') {
16642 result = tCVAR;
16643 tokadd(p, '@');
16644 c = nextc(p);
16645 }
16646 SET_LEX_STATE(IS_lex_state_for(last_state, EXPR_FNAME) ? EXPR_ENDFN : EXPR_END);
16647 if (c == -1 || !parser_is_identchar(p)) {
16648 pushback(p, c);
16649 RUBY_SET_YYLLOC(loc);
16650 if (result == tIVAR) {
16651 compile_error(p, "`@' without identifiers is not allowed as an instance variable name");
16652 }
16653 else {
16654 compile_error(p, "`@@' without identifiers is not allowed as a class variable name");
16655 }
16656 parser_show_error_line(p, &loc);
16658 SET_LEX_STATE(EXPR_END);
16659 return result;
16660 }
16661 else if (ISDIGIT(c)) {
16662 pushback(p, c);
16663 RUBY_SET_YYLLOC(loc);
16664 if (result == tIVAR) {
16665 compile_error(p, "`@%c' is not allowed as an instance variable name", c);
16666 }
16667 else {
16668 compile_error(p, "`@@%c' is not allowed as a class variable name", c);
16669 }
16670 parser_show_error_line(p, &loc);
16672 SET_LEX_STATE(EXPR_END);
16673 return result;
16674 }
16675
16676 if (tokadd_ident(p, c)) return 0;
16677 tokenize_ident(p, last_state);
16678 return result;
16679}
16680
16681static enum yytokentype
16682parse_ident(struct parser_params *p, int c, int cmd_state)
16683{
16684 enum yytokentype result;
16685 int mb = ENC_CODERANGE_7BIT;
16686 const enum lex_state_e last_state = p->lex.state;
16687 ID ident;
16688
16689 do {
16690 if (!ISASCII(c)) mb = ENC_CODERANGE_UNKNOWN;
16691 if (tokadd_mbchar(p, c) == -1) return 0;
16692 c = nextc(p);
16693 } while (parser_is_identchar(p));
16694 if ((c == '!' || c == '?') && !peek(p, '=')) {
16695 result = tFID;
16696 tokadd(p, c);
16697 }
16698 else if (c == '=' && IS_lex_state(EXPR_FNAME) &&
16699 (!peek(p, '~') && !peek(p, '>') && (!peek(p, '=') || (peek_n(p, '>', 1))))) {
16700 result = tIDENTIFIER;
16701 tokadd(p, c);
16702 }
16703 else {
16704 result = tCONSTANT; /* assume provisionally */
16705 pushback(p, c);
16706 }
16707 tokfix(p);
16708
16709 if (IS_LABEL_POSSIBLE()) {
16710 if (IS_LABEL_SUFFIX(0)) {
16711 SET_LEX_STATE(EXPR_ARG|EXPR_LABELED);
16712 nextc(p);
16714 return tLABEL;
16715 }
16716 }
16717 if (mb == ENC_CODERANGE_7BIT && !IS_lex_state(EXPR_DOT)) {
16718 const struct kwtable *kw;
16719
16720 /* See if it is a reserved word. */
16721 kw = rb_reserved_word(tok(p), toklen(p));
16722 if (kw) {
16723 enum lex_state_e state = p->lex.state;
16724 if (IS_lex_state_for(state, EXPR_FNAME)) {
16725 SET_LEX_STATE(EXPR_ENDFN);
16727 return kw->id[0];
16728 }
16729 SET_LEX_STATE(kw->state);
16730 if (IS_lex_state(EXPR_BEG)) {
16731 p->command_start = TRUE;
16732 }
16733 if (kw->id[0] == keyword_do) {
16734 if (lambda_beginning_p()) {
16735 p->lex.lpar_beg = -1; /* make lambda_beginning_p() == FALSE in the body of "-> do ... end" */
16736 return keyword_do_LAMBDA;
16737 }
16738 if (COND_P()) return keyword_do_cond;
16739 if (CMDARG_P() && !IS_lex_state_for(state, EXPR_CMDARG))
16740 return keyword_do_block;
16741 return keyword_do;
16742 }
16743 if (IS_lex_state_for(state, (EXPR_BEG | EXPR_LABELED)))
16744 return kw->id[0];
16745 else {
16746 if (kw->id[0] != kw->id[1])
16747 SET_LEX_STATE(EXPR_BEG | EXPR_LABEL);
16748 return kw->id[1];
16749 }
16750 }
16751 }
16752
16753 if (IS_lex_state(EXPR_BEG_ANY | EXPR_ARG_ANY | EXPR_DOT)) {
16754 if (cmd_state) {
16755 SET_LEX_STATE(EXPR_CMDARG);
16756 }
16757 else {
16758 SET_LEX_STATE(EXPR_ARG);
16759 }
16760 }
16761 else if (p->lex.state == EXPR_FNAME) {
16762 SET_LEX_STATE(EXPR_ENDFN);
16763 }
16764 else {
16765 SET_LEX_STATE(EXPR_END);
16766 }
16767
16768 ident = tokenize_ident(p, last_state);
16769 if (result == tCONSTANT && is_local_id(ident)) result = tIDENTIFIER;
16770 if (!IS_lex_state_for(last_state, EXPR_DOT|EXPR_FNAME) &&
16771 (result == tIDENTIFIER) && /* not EXPR_FNAME, not attrasgn */
16772 lvar_defined(p, ident)) {
16773 SET_LEX_STATE(EXPR_END|EXPR_LABEL);
16774 }
16775 return result;
16776}
16777
16778static enum yytokentype
16779parser_yylex(struct parser_params *p)
16780{
16781 register int c;
16782 int space_seen = 0;
16783 int cmd_state;
16784 int label;
16785 enum lex_state_e last_state;
16786 int fallthru = FALSE;
16787 int token_seen = p->token_seen;
16788
16789 if (p->lex.strterm) {
16790 if (p->lex.strterm->flags & STRTERM_HEREDOC) {
16791 return here_document(p, &p->lex.strterm->u.heredoc);
16792 }
16793 else {
16794 token_flush(p);
16795 return parse_string(p, &p->lex.strterm->u.literal);
16796 }
16797 }
16798 cmd_state = p->command_start;
16799 p->command_start = FALSE;
16800 p->token_seen = TRUE;
16801 retry:
16802 last_state = p->lex.state;
16803#ifndef RIPPER
16804 token_flush(p);
16805#endif
16806 switch (c = nextc(p)) {
16807 case '\0': /* NUL */
16808 case '\004': /* ^D */
16809 case '\032': /* ^Z */
16810 case -1: /* end of script. */
16811 return 0;
16812
16813 /* white spaces */
16814 case '\r':
16815 if (!p->cr_seen) {
16816 p->cr_seen = TRUE;
16817 /* carried over with p->lex.nextline for nextc() */
16818 rb_warn0("encountered \\r in middle of line, treated as a mere space");
16819 }
16820 /* fall through */
16821 case ' ': case '\t': case '\f':
16822 case '\13': /* '\v' */
16823 space_seen = 1;
16824#ifdef RIPPER
16825 while ((c = nextc(p))) {
16826 switch (c) {
16827 case ' ': case '\t': case '\f': case '\r':
16828 case '\13': /* '\v' */
16829 break;
16830 default:
16831 goto outofloop;
16832 }
16833 }
16834 outofloop:
16835 pushback(p, c);
16837#endif
16838 goto retry;
16839
16840 case '#': /* it's a comment */
16841 p->token_seen = token_seen;
16842 /* no magic_comment in shebang line */
16843 if (!parser_magic_comment(p, p->lex.pcur, p->lex.pend - p->lex.pcur)) {
16844 if (comment_at_top(p)) {
16845 set_file_encoding(p, p->lex.pcur, p->lex.pend);
16846 }
16847 }
16848 lex_goto_eol(p);
16850 fallthru = TRUE;
16851 /* fall through */
16852 case '\n':
16853 p->token_seen = token_seen;
16854 c = (IS_lex_state(EXPR_BEG|EXPR_CLASS|EXPR_FNAME|EXPR_DOT) &&
16855 !IS_lex_state(EXPR_LABELED));
16856 if (c || IS_lex_state_all(EXPR_ARG|EXPR_LABELED)) {
16857 if (!fallthru) {
16859 }
16860 fallthru = FALSE;
16861 if (!c && p->ctxt.in_kwarg) {
16862 goto normal_newline;
16863 }
16864 goto retry;
16865 }
16866 while (1) {
16867 switch (c = nextc(p)) {
16868 case ' ': case '\t': case '\f': case '\r':
16869 case '\13': /* '\v' */
16870 space_seen = 1;
16871 break;
16872 case '#':
16873 pushback(p, c);
16874 if (space_seen) dispatch_scan_event(p, tSP);
16875 goto retry;
16876 case '&':
16877 case '.': {
16879 if (peek(p, '.') == (c == '&')) {
16880 pushback(p, c);
16882 goto retry;
16883 }
16884 }
16885 default:
16886 p->ruby_sourceline--;
16887 p->lex.nextline = p->lex.lastline;
16888 case -1: /* EOF no decrement*/
16889#ifndef RIPPER
16890 if (p->lex.prevline && !p->eofp) p->lex.lastline = p->lex.prevline;
16891 p->lex.pbeg = RSTRING_PTR(p->lex.lastline);
16892 p->lex.pend = p->lex.pcur = p->lex.pbeg + RSTRING_LEN(p->lex.lastline);
16893 pushback(p, 1); /* always pushback */
16894 p->lex.ptok = p->lex.pcur;
16895#else
16896 lex_goto_eol(p);
16897 if (c != -1) {
16898 p->lex.ptok = p->lex.pcur;
16899 }
16900#endif
16901 goto normal_newline;
16902 }
16903 }
16904 normal_newline:
16905 p->command_start = TRUE;
16906 SET_LEX_STATE(EXPR_BEG);
16907 return '\n';
16908
16909 case '*':
16910 if ((c = nextc(p)) == '*') {
16911 if ((c = nextc(p)) == '=') {
16913 SET_LEX_STATE(EXPR_BEG);
16914 return tOP_ASGN;
16915 }
16916 pushback(p, c);
16917 if (IS_SPCARG(c)) {
16918 rb_warning0("`**' interpreted as argument prefix");
16919 c = tDSTAR;
16920 }
16921 else if (IS_BEG()) {
16922 c = tDSTAR;
16923 }
16924 else {
16925 c = warn_balanced((enum ruby_method_ids)tPOW, "**", "argument prefix");
16926 }
16927 }
16928 else {
16929 if (c == '=') {
16930 set_yylval_id('*');
16931 SET_LEX_STATE(EXPR_BEG);
16932 return tOP_ASGN;
16933 }
16934 pushback(p, c);
16935 if (IS_SPCARG(c)) {
16936 rb_warning0("`*' interpreted as argument prefix");
16937 c = tSTAR;
16938 }
16939 else if (IS_BEG()) {
16940 c = tSTAR;
16941 }
16942 else {
16943 c = warn_balanced('*', "*", "argument prefix");
16944 }
16945 }
16946 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
16947 return c;
16948
16949 case '!':
16950 c = nextc(p);
16951 if (IS_AFTER_OPERATOR()) {
16952 SET_LEX_STATE(EXPR_ARG);
16953 if (c == '@') {
16954 return '!';
16955 }
16956 }
16957 else {
16958 SET_LEX_STATE(EXPR_BEG);
16959 }
16960 if (c == '=') {
16961 return tNEQ;
16962 }
16963 if (c == '~') {
16964 return tNMATCH;
16965 }
16966 pushback(p, c);
16967 return '!';
16968
16969 case '=':
16970 if (was_bol(p)) {
16971 /* skip embedded rd document */
16972 if (word_match_p(p, "begin", 5)) {
16973 int first_p = TRUE;
16974
16975 lex_goto_eol(p);
16977 for (;;) {
16978 lex_goto_eol(p);
16979 if (!first_p) {
16981 }
16982 first_p = FALSE;
16983 c = nextc(p);
16984 if (c == -1) {
16985 compile_error(p, "embedded document meets end of file");
16986 return 0;
16987 }
16988 if (c == '=' && word_match_p(p, "end", 3)) {
16989 break;
16990 }
16991 pushback(p, c);
16992 }
16993 lex_goto_eol(p);
16995 goto retry;
16996 }
16997 }
16998
16999 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
17000 if ((c = nextc(p)) == '=') {
17001 if ((c = nextc(p)) == '=') {
17002 return tEQQ;
17003 }
17004 pushback(p, c);
17005 return tEQ;
17006 }
17007 if (c == '~') {
17008 return tMATCH;
17009 }
17010 else if (c == '>') {
17011 return tASSOC;
17012 }
17013 pushback(p, c);
17014 return '=';
17015
17016 case '<':
17017 c = nextc(p);
17018 if (c == '<' &&
17019 !IS_lex_state(EXPR_DOT | EXPR_CLASS) &&
17020 !IS_END() &&
17021 (!IS_ARG() || IS_lex_state(EXPR_LABELED) || space_seen)) {
17022 int token = heredoc_identifier(p);
17023 if (token) return token < 0 ? 0 : token;
17024 }
17025 if (IS_AFTER_OPERATOR()) {
17026 SET_LEX_STATE(EXPR_ARG);
17027 }
17028 else {
17029 if (IS_lex_state(EXPR_CLASS))
17030 p->command_start = TRUE;
17031 SET_LEX_STATE(EXPR_BEG);
17032 }
17033 if (c == '=') {
17034 if ((c = nextc(p)) == '>') {
17035 return tCMP;
17036 }
17037 pushback(p, c);
17038 return tLEQ;
17039 }
17040 if (c == '<') {
17041 if ((c = nextc(p)) == '=') {
17043 SET_LEX_STATE(EXPR_BEG);
17044 return tOP_ASGN;
17045 }
17046 pushback(p, c);
17047 return warn_balanced((enum ruby_method_ids)tLSHFT, "<<", "here document");
17048 }
17049 pushback(p, c);
17050 return '<';
17051
17052 case '>':
17053 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
17054 if ((c = nextc(p)) == '=') {
17055 return tGEQ;
17056 }
17057 if (c == '>') {
17058 if ((c = nextc(p)) == '=') {
17060 SET_LEX_STATE(EXPR_BEG);
17061 return tOP_ASGN;
17062 }
17063 pushback(p, c);
17064 return tRSHFT;
17065 }
17066 pushback(p, c);
17067 return '>';
17068
17069 case '"':
17070 label = (IS_LABEL_POSSIBLE() ? str_label : 0);
17071 p->lex.strterm = NEW_STRTERM(str_dquote | label, '"', 0);
17072 p->lex.ptok = p->lex.pcur-1;
17073 return tSTRING_BEG;
17074
17075 case '`':
17076 if (IS_lex_state(EXPR_FNAME)) {
17077 SET_LEX_STATE(EXPR_ENDFN);
17078 return c;
17079 }
17080 if (IS_lex_state(EXPR_DOT)) {
17081 if (cmd_state)
17082 SET_LEX_STATE(EXPR_CMDARG);
17083 else
17084 SET_LEX_STATE(EXPR_ARG);
17085 return c;
17086 }
17087 p->lex.strterm = NEW_STRTERM(str_xquote, '`', 0);
17088 return tXSTRING_BEG;
17089
17090 case '\'':
17091 label = (IS_LABEL_POSSIBLE() ? str_label : 0);
17092 p->lex.strterm = NEW_STRTERM(str_squote | label, '\'', 0);
17093 p->lex.ptok = p->lex.pcur-1;
17094 return tSTRING_BEG;
17095
17096 case '?':
17097 return parse_qmark(p, space_seen);
17098
17099 case '&':
17100 if ((c = nextc(p)) == '&') {
17101 SET_LEX_STATE(EXPR_BEG);
17102 if ((c = nextc(p)) == '=') {
17104 SET_LEX_STATE(EXPR_BEG);
17105 return tOP_ASGN;
17106 }
17107 pushback(p, c);
17108 return tANDOP;
17109 }
17110 else if (c == '=') {
17111 set_yylval_id('&');
17112 SET_LEX_STATE(EXPR_BEG);
17113 return tOP_ASGN;
17114 }
17115 else if (c == '.') {
17117 SET_LEX_STATE(EXPR_DOT);
17118 return tANDDOT;
17119 }
17120 pushback(p, c);
17121 if (IS_SPCARG(c)) {
17122 if ((c != ':') ||
17123 (c = peekc_n(p, 1)) == -1 ||
17124 !(c == '\'' || c == '"' ||
17125 is_identchar((p->lex.pcur+1), p->lex.pend, p->enc))) {
17126 rb_warning0("`&' interpreted as argument prefix");
17127 }
17128 c = tAMPER;
17129 }
17130 else if (IS_BEG()) {
17131 c = tAMPER;
17132 }
17133 else {
17134 c = warn_balanced('&', "&", "argument prefix");
17135 }
17136 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
17137 return c;
17138
17139 case '|':
17140 if ((c = nextc(p)) == '|') {
17141 SET_LEX_STATE(EXPR_BEG);
17142 if ((c = nextc(p)) == '=') {
17144 SET_LEX_STATE(EXPR_BEG);
17145 return tOP_ASGN;
17146 }
17147 pushback(p, c);
17148 if (IS_lex_state_for(last_state, EXPR_BEG)) {
17149 c = '|';
17150 pushback(p, '|');
17151 return c;
17152 }
17153 return tOROP;
17154 }
17155 if (c == '=') {
17156 set_yylval_id('|');
17157 SET_LEX_STATE(EXPR_BEG);
17158 return tOP_ASGN;
17159 }
17160 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG|EXPR_LABEL);
17161 pushback(p, c);
17162 return '|';
17163
17164 case '+':
17165 c = nextc(p);
17166 if (IS_AFTER_OPERATOR()) {
17167 SET_LEX_STATE(EXPR_ARG);
17168 if (c == '@') {
17169 return tUPLUS;
17170 }
17171 pushback(p, c);
17172 return '+';
17173 }
17174 if (c == '=') {
17175 set_yylval_id('+');
17176 SET_LEX_STATE(EXPR_BEG);
17177 return tOP_ASGN;
17178 }
17179 if (IS_BEG() || (IS_SPCARG(c) && arg_ambiguous(p, '+'))) {
17180 SET_LEX_STATE(EXPR_BEG);
17181 pushback(p, c);
17182 if (c != -1 && ISDIGIT(c)) {
17183 return parse_numeric(p, '+');
17184 }
17185 return tUPLUS;
17186 }
17187 SET_LEX_STATE(EXPR_BEG);
17188 pushback(p, c);
17189 return warn_balanced('+', "+", "unary operator");
17190
17191 case '-':
17192 c = nextc(p);
17193 if (IS_AFTER_OPERATOR()) {
17194 SET_LEX_STATE(EXPR_ARG);
17195 if (c == '@') {
17196 return tUMINUS;
17197 }
17198 pushback(p, c);
17199 return '-';
17200 }
17201 if (c == '=') {
17202 set_yylval_id('-');
17203 SET_LEX_STATE(EXPR_BEG);
17204 return tOP_ASGN;
17205 }
17206 if (c == '>') {
17207 SET_LEX_STATE(EXPR_ENDFN);
17208 return tLAMBDA;
17209 }
17210 if (IS_BEG() || (IS_SPCARG(c) && arg_ambiguous(p, '-'))) {
17211 SET_LEX_STATE(EXPR_BEG);
17212 pushback(p, c);
17213 if (c != -1 && ISDIGIT(c)) {
17214 return tUMINUS_NUM;
17215 }
17216 return tUMINUS;
17217 }
17218 SET_LEX_STATE(EXPR_BEG);
17219 pushback(p, c);
17220 return warn_balanced('-', "-", "unary operator");
17221
17222 case '.': {
17223 int is_beg = IS_BEG();
17224 SET_LEX_STATE(EXPR_BEG);
17225 if ((c = nextc(p)) == '.') {
17226 if ((c = nextc(p)) == '.') {
17227 if (p->lex.paren_nest == 0 && looking_at_eol_p(p)) {
17228 rb_warn0("... at EOL, should be parenthesized?");
17229 }
17230 else if (p->lex.lpar_beg >= 0 && p->lex.lpar_beg+1 == p->lex.paren_nest) {
17231 if (IS_lex_state_for(last_state, EXPR_LABEL))
17232 return tDOT3;
17233 }
17234 return is_beg ? tBDOT3 : tDOT3;
17235 }
17236 pushback(p, c);
17237 return is_beg ? tBDOT2 : tDOT2;
17238 }
17239 pushback(p, c);
17240 if (c != -1 && ISDIGIT(c)) {
17241 char prev = p->lex.pcur-1 > p->lex.pbeg ? *(p->lex.pcur-2) : 0;
17242 parse_numeric(p, '.');
17243 if (ISDIGIT(prev)) {
17244 yyerror0("unexpected fraction part after numeric literal");
17245 }
17246 else {
17247 yyerror0("no .<digit> floating literal anymore; put 0 before dot");
17248 }
17249 SET_LEX_STATE(EXPR_END);
17250 p->lex.ptok = p->lex.pcur;
17251 goto retry;
17252 }
17253 set_yylval_id('.');
17254 SET_LEX_STATE(EXPR_DOT);
17255 return '.';
17256 }
17257
17258 case '0': case '1': case '2': case '3': case '4':
17259 case '5': case '6': case '7': case '8': case '9':
17260 return parse_numeric(p, c);
17261
17262 case ')':
17263 COND_POP();
17264 CMDARG_POP();
17265 SET_LEX_STATE(EXPR_ENDFN);
17266 p->lex.paren_nest--;
17267 return c;
17268
17269 case ']':
17270 COND_POP();
17271 CMDARG_POP();
17272 SET_LEX_STATE(EXPR_END);
17273 p->lex.paren_nest--;
17274 return c;
17275
17276 case '}':
17277 /* tSTRING_DEND does COND_POP and CMDARG_POP in the yacc's rule */
17278 if (!p->lex.brace_nest--) return tSTRING_DEND;
17279 COND_POP();
17280 CMDARG_POP();
17281 SET_LEX_STATE(EXPR_END);
17282 p->lex.paren_nest--;
17283 return c;
17284
17285 case ':':
17286 c = nextc(p);
17287 if (c == ':') {
17288 if (IS_BEG() || IS_lex_state(EXPR_CLASS) || IS_SPCARG(-1)) {
17289 SET_LEX_STATE(EXPR_BEG);
17290 return tCOLON3;
17291 }
17293 SET_LEX_STATE(EXPR_DOT);
17294 return tCOLON2;
17295 }
17296 if (IS_END() || ISSPACE(c) || c == '#') {
17297 pushback(p, c);
17298 c = warn_balanced(':', ":", "symbol literal");
17299 SET_LEX_STATE(EXPR_BEG);
17300 return c;
17301 }
17302 switch (c) {
17303 case '\'':
17304 p->lex.strterm = NEW_STRTERM(str_ssym, c, 0);
17305 break;
17306 case '"':
17307 p->lex.strterm = NEW_STRTERM(str_dsym, c, 0);
17308 break;
17309 default:
17310 pushback(p, c);
17311 break;
17312 }
17313 SET_LEX_STATE(EXPR_FNAME);
17314 return tSYMBEG;
17315
17316 case '/':
17317 if (IS_BEG()) {
17318 p->lex.strterm = NEW_STRTERM(str_regexp, '/', 0);
17319 return tREGEXP_BEG;
17320 }
17321 if ((c = nextc(p)) == '=') {
17322 set_yylval_id('/');
17323 SET_LEX_STATE(EXPR_BEG);
17324 return tOP_ASGN;
17325 }
17326 pushback(p, c);
17327 if (IS_SPCARG(c)) {
17328 arg_ambiguous(p, '/');
17329 p->lex.strterm = NEW_STRTERM(str_regexp, '/', 0);
17330 return tREGEXP_BEG;
17331 }
17332 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
17333 return warn_balanced('/', "/", "regexp literal");
17334
17335 case '^':
17336 if ((c = nextc(p)) == '=') {
17337 set_yylval_id('^');
17338 SET_LEX_STATE(EXPR_BEG);
17339 return tOP_ASGN;
17340 }
17341 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
17342 pushback(p, c);
17343 return '^';
17344
17345 case ';':
17346 SET_LEX_STATE(EXPR_BEG);
17347 p->command_start = TRUE;
17348 return ';';
17349
17350 case ',':
17351 SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
17352 return ',';
17353
17354 case '~':
17355 if (IS_AFTER_OPERATOR()) {
17356 if ((c = nextc(p)) != '@') {
17357 pushback(p, c);
17358 }
17359 SET_LEX_STATE(EXPR_ARG);
17360 }
17361 else {
17362 SET_LEX_STATE(EXPR_BEG);
17363 }
17364 return '~';
17365
17366 case '(':
17367 if (IS_BEG()) {
17368 c = tLPAREN;
17369 }
17370 else if (!space_seen) {
17371 /* foo( ... ) => method call, no ambiguity */
17372 }
17373 else if (IS_ARG() || IS_lex_state_all(EXPR_END|EXPR_LABEL)) {
17374 c = tLPAREN_ARG;
17375 }
17376 else if (IS_lex_state(EXPR_ENDFN) && !lambda_beginning_p()) {
17377 rb_warning0("parentheses after method name is interpreted as "
17378 "an argument list, not a decomposed argument");
17379 }
17380 p->lex.paren_nest++;
17381 COND_PUSH(0);
17382 CMDARG_PUSH(0);
17383 SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
17384 return c;
17385
17386 case '[':
17387 p->lex.paren_nest++;
17388 if (IS_AFTER_OPERATOR()) {
17389 if ((c = nextc(p)) == ']') {
17390 p->lex.paren_nest--;
17391 SET_LEX_STATE(EXPR_ARG);
17392 if ((c = nextc(p)) == '=') {
17393 return tASET;
17394 }
17395 pushback(p, c);
17396 return tAREF;
17397 }
17398 pushback(p, c);
17399 SET_LEX_STATE(EXPR_ARG|EXPR_LABEL);
17400 return '[';
17401 }
17402 else if (IS_BEG()) {
17403 c = tLBRACK;
17404 }
17405 else if (IS_ARG() && (space_seen || IS_lex_state(EXPR_LABELED))) {
17406 c = tLBRACK;
17407 }
17408 SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
17409 COND_PUSH(0);
17410 CMDARG_PUSH(0);
17411 return c;
17412
17413 case '{':
17414 ++p->lex.brace_nest;
17415 if (lambda_beginning_p())
17416 c = tLAMBEG;
17417 else if (IS_lex_state(EXPR_LABELED))
17418 c = tLBRACE; /* hash */
17419 else if (IS_lex_state(EXPR_ARG_ANY | EXPR_END | EXPR_ENDFN))
17420 c = '{'; /* block (primary) */
17421 else if (IS_lex_state(EXPR_ENDARG))
17422 c = tLBRACE_ARG; /* block (expr) */
17423 else
17424 c = tLBRACE; /* hash */
17425 if (c != tLBRACE) {
17426 p->command_start = TRUE;
17427 SET_LEX_STATE(EXPR_BEG);
17428 }
17429 else {
17430 SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
17431 }
17432 ++p->lex.paren_nest; /* after lambda_beginning_p() */
17433 COND_PUSH(0);
17434 CMDARG_PUSH(0);
17435 return c;
17436
17437 case '\\':
17438 c = nextc(p);
17439 if (c == '\n') {
17440 space_seen = 1;
17442 goto retry; /* skip \\n */
17443 }
17444 if (c == ' ') return tSP;
17445 if (ISSPACE(c)) return c;
17446 pushback(p, c);
17447 return '\\';
17448
17449 case '%':
17450 return parse_percent(p, space_seen, last_state);
17451
17452 case '$':
17453 return parse_gvar(p, last_state);
17454
17455 case '@':
17456 return parse_atmark(p, last_state);
17457
17458 case '_':
17459 if (was_bol(p) && whole_match_p(p, "__END__", 7, 0)) {
17460 p->ruby__end__seen = 1;
17461 p->eofp = 1;
17462#ifndef RIPPER
17463 return -1;
17464#else
17465 lex_goto_eol(p);
17467 return 0;
17468#endif
17469 }
17470 newtok(p);
17471 break;
17472
17473 default:
17474 if (!parser_is_identchar(p)) {
17475 compile_error(p, "Invalid char `\\x%02X' in expression", c);
17476 token_flush(p);
17477 goto retry;
17478 }
17479
17480 newtok(p);
17481 break;
17482 }
17483
17484 return parse_ident(p, c, cmd_state);
17485}
17486
17487static enum yytokentype
17488yylex(YYSTYPE *lval, YYLTYPE *yylloc, struct parser_params *p)
17489{
17490 enum yytokentype t;
17491
17492 p->lval = lval;
17493 lval->val = Qundef;
17494 t = parser_yylex(p);
17495
17496 if (p->lex.strterm && (p->lex.strterm->flags & STRTERM_HEREDOC))
17498 else
17499 RUBY_SET_YYLLOC(*yylloc);
17500
17501 if (has_delayed_token(p))
17503 else if (t != 0)
17505
17506 return t;
17507}
17508
17509#define LVAR_USED ((ID)1 << (sizeof(ID) * CHAR_BIT - 1))
17510
17511static NODE*
17512node_newnode(struct parser_params *p, enum node_type type, VALUE a0, VALUE a1, VALUE a2, const rb_code_location_t *loc)
17513{
17514 NODE *n = rb_ast_newnode(p->ast, type);
17515
17516 rb_node_init(n, type, a0, a1, a2);
17517
17518 nd_set_loc(n, loc);
17519 nd_set_node_id(n, parser_get_node_id(p));
17520 return n;
17521}
17522
17523static NODE *
17524nd_set_loc(NODE *nd, const YYLTYPE *loc)
17525{
17526 nd->nd_loc = *loc;
17527 nd_set_line(nd, loc->beg_pos.lineno);
17528 return nd;
17529}
17530
17531#ifndef RIPPER
17532static enum node_type
17533nodetype(NODE *node) /* for debug */
17534{
17535 return (enum node_type)nd_type(node);
17536}
17537
17538static int
17539nodeline(NODE *node)
17540{
17541 return nd_line(node);
17542}
17543
17544static NODE*
17545newline_node(NODE *node)
17546{
17547 if (node) {
17548 node = remove_begin(node);
17549 node->flags |= NODE_FL_NEWLINE;
17550 }
17551 return node;
17552}
17553
17554static void
17555fixpos(NODE *node, NODE *orig)
17556{
17557 if (!node) return;
17558 if (!orig) return;
17559 nd_set_line(node, nd_line(orig));
17560}
17561
17562static void
17563parser_warning(struct parser_params *p, NODE *node, const char *mesg)
17564{
17565 rb_compile_warning(p->ruby_sourcefile, nd_line(node), "%s", mesg);
17566}
17567
17568static void
17569parser_warn(struct parser_params *p, NODE *node, const char *mesg)
17570{
17571 rb_compile_warn(p->ruby_sourcefile, nd_line(node), "%s", mesg);
17572}
17573
17574static NODE*
17575block_append(struct parser_params *p, NODE *head, NODE *tail)
17576{
17577 NODE *end, *h = head, *nd;
17578
17579 if (tail == 0) return head;
17580
17581 if (h == 0) return tail;
17582 switch (nd_type(h)) {
17583 case NODE_LIT:
17584 case NODE_STR:
17585 case NODE_SELF:
17586 case NODE_TRUE:
17587 case NODE_FALSE:
17588 case NODE_NIL:
17589 parser_warning(p, h, "unused literal ignored");
17590 return tail;
17591 default:
17592 h = end = NEW_BLOCK(head, &head->nd_loc);
17593 end->nd_end = end;
17594 head = end;
17595 break;
17596 case NODE_BLOCK:
17597 end = h->nd_end;
17598 break;
17599 }
17600
17601 nd = end->nd_head;
17602 switch (nd_type(nd)) {
17603 case NODE_RETURN:
17604 case NODE_BREAK:
17605 case NODE_NEXT:
17606 case NODE_REDO:
17607 case NODE_RETRY:
17608 if (RTEST(ruby_verbose)) {
17609 parser_warning(p, tail, "statement not reached");
17610 }
17611 break;
17612
17613 default:
17614 break;
17615 }
17616
17617 if (nd_type(tail) != NODE_BLOCK) {
17618 tail = NEW_BLOCK(tail, &tail->nd_loc);
17619 tail->nd_end = tail;
17620 }
17621 end->nd_next = tail;
17622 h->nd_end = tail->nd_end;
17623 nd_set_last_loc(head, nd_last_loc(tail));
17624 return head;
17625}
17626
17627/* append item to the list */
17628static NODE*
17629list_append(struct parser_params *p, NODE *list, NODE *item)
17630{
17631 NODE *last;
17632
17633 if (list == 0) return NEW_LIST(item, &item->nd_loc);
17634 if (list->nd_next) {
17635 last = list->nd_next->nd_end;
17636 }
17637 else {
17638 last = list;
17639 }
17640
17641 list->nd_alen += 1;
17642 last->nd_next = NEW_LIST(item, &item->nd_loc);
17643 list->nd_next->nd_end = last->nd_next;
17644
17645 nd_set_last_loc(list, nd_last_loc(item));
17646
17647 return list;
17648}
17649
17650/* concat two lists */
17651static NODE*
17652list_concat(NODE *head, NODE *tail)
17653{
17654 NODE *last;
17655
17656 if (head->nd_next) {
17657 last = head->nd_next->nd_end;
17658 }
17659 else {
17660 last = head;
17661 }
17662
17663 head->nd_alen += tail->nd_alen;
17664 last->nd_next = tail;
17665 if (tail->nd_next) {
17666 head->nd_next->nd_end = tail->nd_next->nd_end;
17667 }
17668 else {
17669 head->nd_next->nd_end = tail;
17670 }
17671
17672 nd_set_last_loc(head, nd_last_loc(tail));
17673
17674 return head;
17675}
17676
17677static int
17678literal_concat0(struct parser_params *p, VALUE head, VALUE tail)
17679{
17680 if (NIL_P(tail)) return 1;
17681 if (!rb_enc_compatible(head, tail)) {
17682 compile_error(p, "string literal encodings differ (%s / %s)",
17683 rb_enc_name(rb_enc_get(head)),
17684 rb_enc_name(rb_enc_get(tail)));
17685 rb_str_resize(head, 0);
17686 rb_str_resize(tail, 0);
17687 return 0;
17688 }
17689 rb_str_buf_append(head, tail);
17690 return 1;
17691}
17692
17693static VALUE
17694string_literal_head(enum node_type htype, NODE *head)
17695{
17696 if (htype != NODE_DSTR) return Qfalse;
17697 if (head->nd_next) {
17698 head = head->nd_next->nd_end->nd_head;
17699 if (!head || nd_type(head) != NODE_STR) return Qfalse;
17700 }
17701 const VALUE lit = head->nd_lit;
17702 ASSUME(lit != Qfalse);
17703 return lit;
17704}
17705
17706/* concat two string literals */
17707static NODE *
17708literal_concat(struct parser_params *p, NODE *head, NODE *tail, const YYLTYPE *loc)
17709{
17710 enum node_type htype;
17711 VALUE lit;
17712
17713 if (!head) return tail;
17714 if (!tail) return head;
17715
17716 htype = nd_type(head);
17717 if (htype == NODE_EVSTR) {
17718 head = new_dstr(p, head, loc);
17719 htype = NODE_DSTR;
17720 }
17721 if (p->heredoc_indent > 0) {
17722 switch (htype) {
17723 case NODE_STR:
17724 nd_set_type(head, NODE_DSTR);
17725 case NODE_DSTR:
17726 return list_append(p, head, tail);
17727 default:
17728 break;
17729 }
17730 }
17731 switch (nd_type(tail)) {
17732 case NODE_STR:
17733 if ((lit = string_literal_head(htype, head)) != Qfalse) {
17734 htype = NODE_STR;
17735 }
17736 else {
17737 lit = head->nd_lit;
17738 }
17739 if (htype == NODE_STR) {
17740 if (!literal_concat0(p, lit, tail->nd_lit)) {
17741 error:
17742 rb_discard_node(p, head);
17743 rb_discard_node(p, tail);
17744 return 0;
17745 }
17746 rb_discard_node(p, tail);
17747 }
17748 else {
17749 list_append(p, head, tail);
17750 }
17751 break;
17752
17753 case NODE_DSTR:
17754 if (htype == NODE_STR) {
17755 if (!literal_concat0(p, head->nd_lit, tail->nd_lit))
17756 goto error;
17757 tail->nd_lit = head->nd_lit;
17758 rb_discard_node(p, head);
17759 head = tail;
17760 }
17761 else if (NIL_P(tail->nd_lit)) {
17762 append:
17763 head->nd_alen += tail->nd_alen - 1;
17764 if (!head->nd_next) {
17765 head->nd_next = tail->nd_next;
17766 }
17767 else if (tail->nd_next) {
17768 head->nd_next->nd_end->nd_next = tail->nd_next;
17769 head->nd_next->nd_end = tail->nd_next->nd_end;
17770 }
17771 rb_discard_node(p, tail);
17772 }
17773 else if ((lit = string_literal_head(htype, head)) != Qfalse) {
17774 if (!literal_concat0(p, lit, tail->nd_lit))
17775 goto error;
17776 tail->nd_lit = Qnil;
17777 goto append;
17778 }
17779 else {
17780 list_concat(head, NEW_NODE(NODE_LIST, NEW_STR(tail->nd_lit, loc), tail->nd_alen, tail->nd_next, loc));
17781 }
17782 break;
17783
17784 case NODE_EVSTR:
17785 if (htype == NODE_STR) {
17786 nd_set_type(head, NODE_DSTR);
17787 head->nd_alen = 1;
17788 }
17789 list_append(p, head, tail);
17790 break;
17791 }
17792 return head;
17793}
17794
17795static NODE *
17796evstr2dstr(struct parser_params *p, NODE *node)
17797{
17798 if (nd_type(node) == NODE_EVSTR) {
17799 node = new_dstr(p, node, &node->nd_loc);
17800 }
17801 return node;
17802}
17803
17804static NODE *
17805new_evstr(struct parser_params *p, NODE *node, const YYLTYPE *loc)
17806{
17807 NODE *head = node;
17808
17809 if (node) {
17810 switch (nd_type(node)) {
17811 case NODE_STR:
17812 nd_set_type(node, NODE_DSTR);
17813 case NODE_DSTR: case NODE_EVSTR:
17814 return node;
17815 }
17816 }
17817 return NEW_EVSTR(head, loc);
17818}
17819
17820static NODE *
17821new_dstr(struct parser_params *p, NODE *node, const YYLTYPE *loc)
17822{
17823 VALUE lit = STR_NEW0();
17824 NODE *dstr = NEW_DSTR(lit, loc);
17825 RB_OBJ_WRITTEN(p->ast, Qnil, lit);
17826 return list_append(p, dstr, node);
17827}
17828
17829static NODE *
17830call_bin_op(struct parser_params *p, NODE *recv, ID id, NODE *arg1,
17831 const YYLTYPE *op_loc, const YYLTYPE *loc)
17832{
17833 NODE *expr;
17834 value_expr(recv);
17835 value_expr(arg1);
17836 expr = NEW_OPCALL(recv, id, NEW_LIST(arg1, &arg1->nd_loc), loc);
17837 nd_set_line(expr, op_loc->beg_pos.lineno);
17838 return expr;
17839}
17840
17841static NODE *
17842call_uni_op(struct parser_params *p, NODE *recv, ID id, const YYLTYPE *op_loc, const YYLTYPE *loc)
17843{
17844 NODE *opcall;
17845 value_expr(recv);
17846 opcall = NEW_OPCALL(recv, id, 0, loc);
17847 nd_set_line(opcall, op_loc->beg_pos.lineno);
17848 return opcall;
17849}
17850
17851static NODE *
17852new_qcall(struct parser_params* p, ID atype, NODE *recv, ID mid, NODE *args, const YYLTYPE *op_loc, const YYLTYPE *loc)
17853{
17854 NODE *qcall = NEW_QCALL(atype, recv, mid, args, loc);
17855 nd_set_line(qcall, op_loc->beg_pos.lineno);
17856 return qcall;
17857}
17858
17859static NODE*
17860new_command_qcall(struct parser_params* p, ID atype, NODE *recv, ID mid, NODE *args, NODE *block, const YYLTYPE *op_loc, const YYLTYPE *loc)
17861{
17862 NODE *ret;
17863 if (block) block_dup_check(p, args, block);
17864 ret = new_qcall(p, atype, recv, mid, args, op_loc, loc);
17865 if (block) ret = method_add_block(p, ret, block, loc);
17866 fixpos(ret, recv);
17867 return ret;
17868}
17869
17870#define nd_once_body(node) (nd_type(node) == NODE_ONCE ? (node)->nd_body : node)
17871static NODE*
17872match_op(struct parser_params *p, NODE *node1, NODE *node2, const YYLTYPE *op_loc, const YYLTYPE *loc)
17873{
17874 NODE *n;
17875 int line = op_loc->beg_pos.lineno;
17876
17877 value_expr(node1);
17878 value_expr(node2);
17879 if (node1 && (n = nd_once_body(node1)) != 0) {
17880 switch (nd_type(n)) {
17881 case NODE_DREGX:
17882 {
17883 NODE *match = NEW_MATCH2(node1, node2, loc);
17884 nd_set_line(match, line);
17885 return match;
17886 }
17887
17888 case NODE_LIT:
17889 if (RB_TYPE_P(n->nd_lit, T_REGEXP)) {
17890 const VALUE lit = n->nd_lit;
17891 NODE *match = NEW_MATCH2(node1, node2, loc);
17892 match->nd_args = reg_named_capture_assign(p, lit, loc);
17893 nd_set_line(match, line);
17894 return match;
17895 }
17896 }
17897 }
17898
17899 if (node2 && (n = nd_once_body(node2)) != 0) {
17900 NODE *match3;
17901
17902 switch (nd_type(n)) {
17903 case NODE_LIT:
17904 if (!RB_TYPE_P(n->nd_lit, T_REGEXP)) break;
17905 /* fallthru */
17906 case NODE_DREGX:
17907 match3 = NEW_MATCH3(node2, node1, loc);
17908 return match3;
17909 }
17910 }
17911
17912 n = NEW_CALL(node1, tMATCH, NEW_LIST(node2, &node2->nd_loc), loc);
17913 nd_set_line(n, line);
17914 return n;
17915}
17916
17917# if WARN_PAST_SCOPE
17918static int
17919past_dvar_p(struct parser_params *p, ID id)
17920{
17921 struct vtable *past = p->lvtbl->past;
17922 while (past) {
17923 if (vtable_included(past, id)) return 1;
17924 past = past->prev;
17925 }
17926 return 0;
17927}
17928# endif
17929
17930static int
17931numparam_nested_p(struct parser_params *p)
17932{
17933 struct local_vars *local = p->lvtbl;
17934 NODE *outer = local->numparam.outer;
17935 NODE *inner = local->numparam.inner;
17936 if (outer || inner) {
17937 NODE *used = outer ? outer : inner;
17938 compile_error(p, "numbered parameter is already used in\n"
17939 "%s:%d: %s block here",
17941 outer ? "outer" : "inner");
17942 parser_show_error_line(p, &used->nd_loc);
17943 return 1;
17944 }
17945 return 0;
17946}
17947
17948static NODE*
17949gettable(struct parser_params *p, ID id, const YYLTYPE *loc)
17950{
17951 ID *vidp = NULL;
17952 NODE *node;
17953 switch (id) {
17954 case keyword_self:
17955 return NEW_SELF(loc);
17956 case keyword_nil:
17957 return NEW_NIL(loc);
17958 case keyword_true:
17959 return NEW_TRUE(loc);
17960 case keyword_false:
17961 return NEW_FALSE(loc);
17962 case keyword__FILE__:
17963 {
17965 if (NIL_P(file))
17966 file = rb_str_new(0, 0);
17967 else
17968 file = rb_str_dup(file);
17969 node = NEW_STR(file, loc);
17971 }
17972 return node;
17973 case keyword__LINE__:
17974 return NEW_LIT(INT2FIX(p->tokline), loc);
17976 node = NEW_LIT(rb_enc_from_encoding(p->enc), loc);
17977 RB_OBJ_WRITTEN(p->ast, Qnil, node->nd_lit);
17978 return node;
17979
17980 }
17981 switch (id_type(id)) {
17982 case ID_LOCAL:
17983 if (dyna_in_block(p) && dvar_defined_ref(p, id, &vidp)) {
17984 if (NUMPARAM_ID_P(id) && numparam_nested_p(p)) return 0;
17985 if (id == p->cur_arg) {
17986 compile_error(p, "circular argument reference - %"PRIsWARN, rb_id2str(id));
17987 return 0;
17988 }
17989 if (vidp) *vidp |= LVAR_USED;
17990 node = NEW_DVAR(id, loc);
17991 return node;
17992 }
17993 if (local_id_ref(p, id, &vidp)) {
17994 if (id == p->cur_arg) {
17995 compile_error(p, "circular argument reference - %"PRIsWARN, rb_id2str(id));
17996 return 0;
17997 }
17998 if (vidp) *vidp |= LVAR_USED;
17999 node = NEW_LVAR(id, loc);
18000 return node;
18001 }
18002 if (dyna_in_block(p) && NUMPARAM_ID_P(id) &&
18003 parser_numbered_param(p, NUMPARAM_ID_TO_IDX(id))) {
18004 if (numparam_nested_p(p)) return 0;
18005 node = NEW_DVAR(id, loc);
18006 struct local_vars *local = p->lvtbl;
18007 if (!local->numparam.current) local->numparam.current = node;
18008 return node;
18009 }
18010# if WARN_PAST_SCOPE
18011 if (!p->ctxt.in_defined && RTEST(ruby_verbose) && past_dvar_p(p, id)) {
18012 rb_warning1("possible reference to past scope - %"PRIsWARN, rb_id2str(id));
18013 }
18014# endif
18015 /* method call without arguments */
18016 return NEW_VCALL(id, loc);
18017 case ID_GLOBAL:
18018 return NEW_GVAR(id, loc);
18019 case ID_INSTANCE:
18020 return NEW_IVAR(id, loc);
18021 case ID_CONST:
18022 return NEW_CONST(id, loc);
18023 case ID_CLASS:
18024 return NEW_CVAR(id, loc);
18025 }
18026 compile_error(p, "identifier %"PRIsVALUE" is not valid to get", rb_id2str(id));
18027 return 0;
18028}
18029
18030static NODE *
18031opt_arg_append(NODE *opt_list, NODE *opt)
18032{
18033 NODE *opts = opt_list;
18034 opts->nd_loc.end_pos = opt->nd_loc.end_pos;
18035
18036 while (opts->nd_next) {
18037 opts = opts->nd_next;
18038 opts->nd_loc.end_pos = opt->nd_loc.end_pos;
18039 }
18040 opts->nd_next = opt;
18041
18042 return opt_list;
18043}
18044
18045static NODE *
18046kwd_append(NODE *kwlist, NODE *kw)
18047{
18048 if (kwlist) {
18049 NODE *kws = kwlist;
18050 kws->nd_loc.end_pos = kw->nd_loc.end_pos;
18051 while (kws->nd_next) {
18052 kws = kws->nd_next;
18053 kws->nd_loc.end_pos = kw->nd_loc.end_pos;
18054 }
18055 kws->nd_next = kw;
18056 }
18057 return kwlist;
18058}
18059
18060static NODE *
18061new_defined(struct parser_params *p, NODE *expr, const YYLTYPE *loc)
18062{
18063 return NEW_DEFINED(remove_begin_all(expr), loc);
18064}
18065
18066static NODE*
18067symbol_append(struct parser_params *p, NODE *symbols, NODE *symbol)
18068{
18069 enum node_type type = nd_type(symbol);
18070 switch (type) {
18071 case NODE_DSTR:
18072 nd_set_type(symbol, NODE_DSYM);
18073 break;
18074 case NODE_STR:
18075 nd_set_type(symbol, NODE_LIT);
18076 RB_OBJ_WRITTEN(p->ast, Qnil, symbol->nd_lit = rb_str_intern(symbol->nd_lit));
18077 break;
18078 default:
18079 compile_error(p, "unexpected node as symbol: %s", ruby_node_name(type));
18080 }
18081 return list_append(p, symbols, symbol);
18082}
18083
18084static NODE *
18085new_regexp(struct parser_params *p, NODE *node, int options, const YYLTYPE *loc)
18086{
18087 NODE *list, *prev;
18088 VALUE lit;
18089
18090 if (!node) {
18091 node = NEW_LIT(reg_compile(p, STR_NEW0(), options), loc);
18092 RB_OBJ_WRITTEN(p->ast, Qnil, node->nd_lit);
18093 return node;
18094 }
18095 switch (nd_type(node)) {
18096 case NODE_STR:
18097 {
18098 VALUE src = node->nd_lit;
18099 nd_set_type(node, NODE_LIT);
18100 nd_set_loc(node, loc);
18101 RB_OBJ_WRITTEN(p->ast, Qnil, node->nd_lit = reg_compile(p, src, options));
18102 }
18103 break;
18104 default:
18105 lit = STR_NEW0();
18106 node = NEW_NODE(NODE_DSTR, lit, 1, NEW_LIST(node, loc), loc);
18107 RB_OBJ_WRITTEN(p->ast, Qnil, lit);
18108 /* fall through */
18109 case NODE_DSTR:
18110 nd_set_type(node, NODE_DREGX);
18111 nd_set_loc(node, loc);
18112 node->nd_cflag = options & RE_OPTION_MASK;
18113 if (!NIL_P(node->nd_lit)) reg_fragment_check(p, node->nd_lit, options);
18114 for (list = (prev = node)->nd_next; list; list = list->nd_next) {
18115 NODE *frag = list->nd_head;
18116 enum node_type type = nd_type(frag);
18117 if (type == NODE_STR || (type == NODE_DSTR && !frag->nd_next)) {
18118 VALUE tail = frag->nd_lit;
18119 if (reg_fragment_check(p, tail, options) && prev && !NIL_P(prev->nd_lit)) {
18120 VALUE lit = prev == node ? prev->nd_lit : prev->nd_head->nd_lit;
18121 if (!literal_concat0(p, lit, tail)) {
18122 return NEW_NIL(loc); /* dummy node on error */
18123 }
18124 rb_str_resize(tail, 0);
18125 prev->nd_next = list->nd_next;
18126 rb_discard_node(p, list->nd_head);
18127 rb_discard_node(p, list);
18128 list = prev;
18129 }
18130 else {
18131 prev = list;
18132 }
18133 }
18134 else {
18135 prev = 0;
18136 }
18137 }
18138 if (!node->nd_next) {
18139 VALUE src = node->nd_lit;
18140 nd_set_type(node, NODE_LIT);
18141 RB_OBJ_WRITTEN(p->ast, Qnil, node->nd_lit = reg_compile(p, src, options));
18142 }
18143 if (options & RE_OPTION_ONCE) {
18144 node = NEW_NODE(NODE_ONCE, 0, node, 0, loc);
18145 }
18146 break;
18147 }
18148 return node;
18149}
18150
18151static NODE *
18152new_kw_arg(struct parser_params *p, NODE *k, const YYLTYPE *loc)
18153{
18154 if (!k) return 0;
18155 return NEW_KW_ARG(0, (k), loc);
18156}
18157
18158static NODE *
18159new_xstring(struct parser_params *p, NODE *node, const YYLTYPE *loc)
18160{
18161 if (!node) {
18162 VALUE lit = STR_NEW0();
18163 NODE *xstr = NEW_XSTR(lit, loc);
18164 RB_OBJ_WRITTEN(p->ast, Qnil, lit);
18165 return xstr;
18166 }
18167 switch (nd_type(node)) {
18168 case NODE_STR:
18169 nd_set_type(node, NODE_XSTR);
18170 nd_set_loc(node, loc);
18171 break;
18172 case NODE_DSTR:
18173 nd_set_type(node, NODE_DXSTR);
18174 nd_set_loc(node, loc);
18175 break;
18176 default:
18177 node = NEW_NODE(NODE_DXSTR, Qnil, 1, NEW_LIST(node, loc), loc);
18178 break;
18179 }
18180 return node;
18181}
18182
18183static void
18184check_literal_when(struct parser_params *p, NODE *arg, const YYLTYPE *loc)
18185{
18186 VALUE lit;
18187
18188 if (!arg || !p->case_labels) return;
18189
18191 if (lit == Qundef) return;
18192 if (nd_type(arg) == NODE_STR) {
18193 RB_OBJ_WRITTEN(p->ast, Qnil, arg->nd_lit = lit);
18194 }
18195
18196 if (NIL_P(p->case_labels)) {
18198 }
18199 else {
18200 VALUE line = rb_hash_lookup(p->case_labels, lit);
18201 if (!NIL_P(line)) {
18202 rb_warning1("duplicated `when' clause with line %d is ignored",
18203 WARN_IVAL(line));
18204 return;
18205 }
18206 }
18208}
18209
18210#else /* !RIPPER */
18211static int
18212id_is_var(struct parser_params *p, ID id)
18213{
18214 if (is_notop_id(id)) {
18215 switch (id & ID_SCOPE_MASK) {
18216 case ID_GLOBAL: case ID_INSTANCE: case ID_CONST: case ID_CLASS:
18217 return 1;
18218 case ID_LOCAL:
18219 if (dyna_in_block(p)) {
18220 if (NUMPARAM_ID_P(id) || dvar_defined(p, id)) return 1;
18221 }
18222 if (local_id(p, id)) return 1;
18223 /* method call without arguments */
18224 return 0;
18225 }
18226 }
18227 compile_error(p, "identifier %"PRIsVALUE" is not valid to get", rb_id2str(id));
18228 return 0;
18229}
18230
18231static VALUE
18232new_regexp(struct parser_params *p, VALUE re, VALUE opt, const YYLTYPE *loc)
18233{
18234 VALUE src = 0, err;
18235 int options = 0;
18236 if (ripper_is_node_yylval(re)) {
18237 src = RNODE(re)->nd_cval;
18238 re = RNODE(re)->nd_rval;
18239 }
18240 if (ripper_is_node_yylval(opt)) {
18241 options = (int)RNODE(opt)->nd_tag;
18242 opt = RNODE(opt)->nd_rval;
18243 }
18244 if (src && NIL_P(parser_reg_compile(p, src, options, &err))) {
18245 compile_error(p, "%"PRIsVALUE, err);
18246 }
18247 return dispatch2(regexp_literal, re, opt);
18248}
18249#endif /* !RIPPER */
18250
18251
18252#ifndef RIPPER
18253static const char rb_parser_lex_state_names[][8] = {
18254 "BEG", "END", "ENDARG", "ENDFN", "ARG",
18255 "CMDARG", "MID", "FNAME", "DOT", "CLASS",
18256 "LABEL", "LABELED","FITEM",
18257};
18258
18259static VALUE
18260append_lex_state_name(enum lex_state_e state, VALUE buf)
18261{
18262 int i, sep = 0;
18263 unsigned int mask = 1;
18264 static const char none[] = "NONE";
18265
18266 for (i = 0; i < EXPR_MAX_STATE; ++i, mask <<= 1) {
18267 if ((unsigned)state & mask) {
18268 if (sep) {
18269 rb_str_cat(buf, "|", 1);
18270 }
18271 sep = 1;
18272 rb_str_cat_cstr(buf, rb_parser_lex_state_names[i]);
18273 }
18274 }
18275 if (!sep) {
18276 rb_str_cat(buf, none, sizeof(none)-1);
18277 }
18278 return buf;
18279}
18280
18281static void
18282flush_debug_buffer(struct parser_params *p, VALUE out, VALUE str)
18283{
18284 VALUE mesg = p->debug_buffer;
18285
18286 if (!NIL_P(mesg) && RSTRING_LEN(mesg)) {
18287 p->debug_buffer = Qnil;
18288 rb_io_puts(1, &mesg, out);
18289 }
18290 if (!NIL_P(str) && RSTRING_LEN(str)) {
18292 }
18293}
18294
18295enum lex_state_e
18297 enum lex_state_e to, int line)
18298{
18299 VALUE mesg;
18300 mesg = rb_str_new_cstr("lex_state: ");
18301 append_lex_state_name(from, mesg);
18302 rb_str_cat_cstr(mesg, " -> ");
18303 append_lex_state_name(to, mesg);
18304 rb_str_catf(mesg, " at line %d\n", line);
18305 flush_debug_buffer(p, p->debug_output, mesg);
18306 return to;
18307}
18308
18309VALUE
18311{
18312 return rb_fstring(append_lex_state_name(state, rb_str_new(0, 0)));
18313}
18314
18315static void
18316append_bitstack_value(stack_type stack, VALUE mesg)
18317{
18318 if (stack == 0) {
18319 rb_str_cat_cstr(mesg, "0");
18320 }
18321 else {
18322 stack_type mask = (stack_type)1U << (CHAR_BIT * sizeof(stack_type) - 1);
18323 for (; mask && !(stack & mask); mask >>= 1) continue;
18324 for (; mask; mask >>= 1) rb_str_cat(mesg, stack & mask ? "1" : "0", 1);
18325 }
18326}
18327
18328void
18330 const char *name, int line)
18331{
18332 VALUE mesg = rb_sprintf("%s: ", name);
18333 append_bitstack_value(stack, mesg);
18334 rb_str_catf(mesg, " at line %d\n", line);
18335 flush_debug_buffer(p, p->debug_output, mesg);
18336}
18337
18338void
18339rb_parser_fatal(struct parser_params *p, const char *fmt, ...)
18340{
18341 va_list ap;
18342 VALUE mesg = rb_str_new_cstr("internal parser error: ");
18343
18344 va_start(ap, fmt);
18345 rb_str_vcatf(mesg, fmt, ap);
18346 va_end(ap);
18347 parser_yyerror(p, NULL, RSTRING_PTR(mesg));
18348 RB_GC_GUARD(mesg);
18349
18350 mesg = rb_str_new(0, 0);
18351 append_lex_state_name(p->lex.state, mesg);
18352 compile_error(p, "lex.state: %"PRIsVALUE, mesg);
18353 rb_str_resize(mesg, 0);
18354 append_bitstack_value(p->cond_stack, mesg);
18355 compile_error(p, "cond_stack: %"PRIsVALUE, mesg);
18356 rb_str_resize(mesg, 0);
18357 append_bitstack_value(p->cmdarg_stack, mesg);
18358 compile_error(p, "cmdarg_stack: %"PRIsVALUE, mesg);
18359 if (p->debug_output == rb_ractor_stdout())
18361 p->debug = TRUE;
18362}
18363
18364YYLTYPE *
18366{
18367 int sourceline = here->sourceline;
18368 int beg_pos = (int)here->offset - here->quote
18369 - (rb_strlen_lit("<<-") - !(here->func & STR_FUNC_INDENT));
18370 int end_pos = (int)here->offset + here->length + here->quote;
18371
18372 yylloc->beg_pos.lineno = sourceline;
18373 yylloc->beg_pos.column = beg_pos;
18374 yylloc->end_pos.lineno = sourceline;
18375 yylloc->end_pos.column = end_pos;
18376 return yylloc;
18377}
18378
18379YYLTYPE *
18381{
18382 yylloc->beg_pos.lineno = p->ruby_sourceline;
18383 yylloc->beg_pos.column = (int)(p->lex.ptok - p->lex.pbeg);
18384 yylloc->end_pos.lineno = p->ruby_sourceline;
18385 yylloc->end_pos.column = (int)(p->lex.ptok - p->lex.pbeg);
18386 return yylloc;
18387}
18388
18389YYLTYPE *
18391{
18392 yylloc->beg_pos.lineno = p->ruby_sourceline;
18393 yylloc->beg_pos.column = (int)(p->lex.ptok - p->lex.pbeg);
18394 yylloc->end_pos.lineno = p->ruby_sourceline;
18395 yylloc->end_pos.column = (int)(p->lex.pcur - p->lex.pbeg);
18396 return yylloc;
18397}
18398#endif /* !RIPPER */
18399
18400static void
18401parser_token_value_print(struct parser_params *p, enum yytokentype type, const YYSTYPE *valp)
18402{
18403 VALUE v;
18404
18405 switch (type) {
18406 case tIDENTIFIER: case tFID: case tGVAR: case tIVAR:
18407 case tCONSTANT: case tCVAR: case tLABEL: case tOP_ASGN:
18408#ifndef RIPPER
18409 v = rb_id2str(valp->id);
18410#else
18411 v = valp->node->nd_rval;
18412#endif
18413 rb_parser_printf(p, "%"PRIsVALUE, v);
18414 break;
18415 case tINTEGER: case tFLOAT: case tRATIONAL: case tIMAGINARY:
18416 case tSTRING_CONTENT: case tCHAR:
18417#ifndef RIPPER
18418 v = valp->node->nd_lit;
18419#else
18420 v = valp->val;
18421#endif
18422 rb_parser_printf(p, "%+"PRIsVALUE, v);
18423 break;
18424 case tNTH_REF:
18425#ifndef RIPPER
18426 rb_parser_printf(p, "$%ld", valp->node->nd_nth);
18427#else
18428 rb_parser_printf(p, "%"PRIsVALUE, valp->val);
18429#endif
18430 break;
18431 case tBACK_REF:
18432#ifndef RIPPER
18433 rb_parser_printf(p, "$%c", (int)valp->node->nd_nth);
18434#else
18435 rb_parser_printf(p, "%"PRIsVALUE, valp->val);
18436#endif
18437 break;
18438 default:
18439 break;
18440 }
18441}
18442
18443static int
18444assignable0(struct parser_params *p, ID id, const char **err)
18445{
18446 if (!id) return -1;
18447 switch (id) {
18448 case keyword_self:
18449 *err = "Can't change the value of self";
18450 return -1;
18451 case keyword_nil:
18452 *err = "Can't assign to nil";
18453 return -1;
18454 case keyword_true:
18455 *err = "Can't assign to true";
18456 return -1;
18457 case keyword_false:
18458 *err = "Can't assign to false";
18459 return -1;
18460 case keyword__FILE__:
18461 *err = "Can't assign to __FILE__";
18462 return -1;
18463 case keyword__LINE__:
18464 *err = "Can't assign to __LINE__";
18465 return -1;
18467 *err = "Can't assign to __ENCODING__";
18468 return -1;
18469 }
18470 switch (id_type(id)) {
18471 case ID_LOCAL:
18472 if (dyna_in_block(p)) {
18473 if (p->max_numparam > NO_PARAM && NUMPARAM_ID_P(id)) {
18474 compile_error(p, "Can't assign to numbered parameter _%d",
18475 NUMPARAM_ID_TO_IDX(id));
18476 return -1;
18477 }
18478 if (dvar_curr(p, id)) return NODE_DASGN_CURR;
18479 if (dvar_defined(p, id)) return NODE_DASGN;
18480 if (local_id(p, id)) return NODE_LASGN;
18481 dyna_var(p, id);
18482 return NODE_DASGN_CURR;
18483 }
18484 else {
18485 if (!local_id(p, id)) local_var(p, id);
18486 return NODE_LASGN;
18487 }
18488 break;
18489 case ID_GLOBAL: return NODE_GASGN;
18490 case ID_INSTANCE: return NODE_IASGN;
18491 case ID_CONST:
18492 if (!p->ctxt.in_def) return NODE_CDECL;
18493 *err = "dynamic constant assignment";
18494 return -1;
18495 case ID_CLASS: return NODE_CVASGN;
18496 default:
18497 compile_error(p, "identifier %"PRIsVALUE" is not valid to set", rb_id2str(id));
18498 }
18499 return -1;
18500}
18501
18502#ifndef RIPPER
18503static NODE*
18504assignable(struct parser_params *p, ID id, NODE *val, const YYLTYPE *loc)
18505{
18506 const char *err = 0;
18507 int node_type = assignable0(p, id, &err);
18508 switch (node_type) {
18509 case NODE_DASGN_CURR: return NEW_DASGN_CURR(id, val, loc);
18510 case NODE_DASGN: return NEW_DASGN(id, val, loc);
18511 case NODE_LASGN: return NEW_LASGN(id, val, loc);
18512 case NODE_GASGN: return NEW_GASGN(id, val, loc);
18513 case NODE_IASGN: return NEW_IASGN(id, val, loc);
18514 case NODE_CDECL: return NEW_CDECL(id, val, 0, loc);
18515 case NODE_CVASGN: return NEW_CVASGN(id, val, loc);
18516 }
18517 if (err) yyerror1(loc, err);
18518 return NEW_BEGIN(0, loc);
18519}
18520#else
18521static VALUE
18522assignable(struct parser_params *p, VALUE lhs)
18523{
18524 const char *err = 0;
18525 assignable0(p, get_id(lhs), &err);
18526 if (err) lhs = assign_error(p, err, lhs);
18527 return lhs;
18528}
18529#endif
18530
18531static int
18532is_private_local_id(ID name)
18533{
18534 VALUE s;
18535 if (name == idUScore) return 1;
18536 if (!is_local_id(name)) return 0;
18537 s = rb_id2str(name);
18538 if (!s) return 0;
18539 return RSTRING_PTR(s)[0] == '_';
18540}
18541
18542static int
18543shadowing_lvar_0(struct parser_params *p, ID name)
18544{
18545 if (is_private_local_id(name)) return 1;
18546 if (dyna_in_block(p)) {
18547 if (dvar_curr(p, name)) {
18548 yyerror0("duplicated argument name");
18549 }
18550 else if (dvar_defined(p, name) || local_id(p, name)) {
18551 vtable_add(p->lvtbl->vars, name);
18552 if (p->lvtbl->used) {
18554 }
18555 return 0;
18556 }
18557 }
18558 else {
18559 if (local_id(p, name)) {
18560 yyerror0("duplicated argument name");
18561 }
18562 }
18563 return 1;
18564}
18565
18566static ID
18567shadowing_lvar(struct parser_params *p, ID name)
18568{
18569 shadowing_lvar_0(p, name);
18570 return name;
18571}
18572
18573static void
18574new_bv(struct parser_params *p, ID name)
18575{
18576 if (!name) return;
18577 if (!is_local_id(name)) {
18578 compile_error(p, "invalid local variable - %"PRIsVALUE,
18579 rb_id2str(name));
18580 return;
18581 }
18582 if (!shadowing_lvar_0(p, name)) return;
18583 dyna_var(p, name);
18584}
18585
18586#ifndef RIPPER
18587static NODE *
18588aryset(struct parser_params *p, NODE *recv, NODE *idx, const YYLTYPE *loc)
18589{
18590 return NEW_ATTRASGN(recv, tASET, idx, loc);
18591}
18592
18593static void
18594block_dup_check(struct parser_params *p, NODE *node1, NODE *node2)
18595{
18596 if (node2 && node1 && nd_type(node1) == NODE_BLOCK_PASS) {
18597 compile_error(p, "both block arg and actual block given");
18598 }
18599}
18600
18601static NODE *
18602attrset(struct parser_params *p, NODE *recv, ID atype, ID id, const YYLTYPE *loc)
18603{
18604 if (!CALL_Q_P(atype)) id = rb_id_attrset(id);
18605 return NEW_ATTRASGN(recv, id, 0, loc);
18606}
18607
18608static void
18609rb_backref_error(struct parser_params *p, NODE *node)
18610{
18611 switch (nd_type(node)) {
18612 case NODE_NTH_REF:
18613 compile_error(p, "Can't set variable $%ld", node->nd_nth);
18614 break;
18615 case NODE_BACK_REF:
18616 compile_error(p, "Can't set variable $%c", (int)node->nd_nth);
18617 break;
18618 }
18619}
18620#else
18621static VALUE
18622backref_error(struct parser_params *p, NODE *ref, VALUE expr)
18623{
18624 VALUE mesg = rb_str_new_cstr("Can't set variable ");
18625 rb_str_append(mesg, ref->nd_cval);
18626 return dispatch2(assign_error, mesg, expr);
18627}
18628#endif
18629
18630#ifndef RIPPER
18631static NODE *
18632arg_append(struct parser_params *p, NODE *node1, NODE *node2, const YYLTYPE *loc)
18633{
18634 if (!node1) return NEW_LIST(node2, &node2->nd_loc);
18635 switch (nd_type(node1)) {
18636 case NODE_LIST:
18637 return list_append(p, node1, node2);
18638 case NODE_BLOCK_PASS:
18639 node1->nd_head = arg_append(p, node1->nd_head, node2, loc);
18640 node1->nd_loc.end_pos = node1->nd_head->nd_loc.end_pos;
18641 return node1;
18642 case NODE_ARGSPUSH:
18643 node1->nd_body = list_append(p, NEW_LIST(node1->nd_body, &node1->nd_body->nd_loc), node2);
18644 node1->nd_loc.end_pos = node1->nd_body->nd_loc.end_pos;
18645 nd_set_type(node1, NODE_ARGSCAT);
18646 return node1;
18647 case NODE_ARGSCAT:
18648 if (nd_type(node1->nd_body) != NODE_LIST) break;
18649 node1->nd_body = list_append(p, node1->nd_body, node2);
18650 node1->nd_loc.end_pos = node1->nd_body->nd_loc.end_pos;
18651 return node1;
18652 }
18653 return NEW_ARGSPUSH(node1, node2, loc);
18654}
18655
18656static NODE *
18657arg_concat(struct parser_params *p, NODE *node1, NODE *node2, const YYLTYPE *loc)
18658{
18659 if (!node2) return node1;
18660 switch (nd_type(node1)) {
18661 case NODE_BLOCK_PASS:
18662 if (node1->nd_head)
18663 node1->nd_head = arg_concat(p, node1->nd_head, node2, loc);
18664 else
18665 node1->nd_head = NEW_LIST(node2, loc);
18666 return node1;
18667 case NODE_ARGSPUSH:
18668 if (nd_type(node2) != NODE_LIST) break;
18669 node1->nd_body = list_concat(NEW_LIST(node1->nd_body, loc), node2);
18670 nd_set_type(node1, NODE_ARGSCAT);
18671 return node1;
18672 case NODE_ARGSCAT:
18673 if (nd_type(node2) != NODE_LIST ||
18674 nd_type(node1->nd_body) != NODE_LIST) break;
18675 node1->nd_body = list_concat(node1->nd_body, node2);
18676 return node1;
18677 }
18678 return NEW_ARGSCAT(node1, node2, loc);
18679}
18680
18681static NODE *
18682last_arg_append(struct parser_params *p, NODE *args, NODE *last_arg, const YYLTYPE *loc)
18683{
18684 NODE *n1;
18685 if ((n1 = splat_array(args)) != 0) {
18686 return list_append(p, n1, last_arg);
18687 }
18688 return arg_append(p, args, last_arg, loc);
18689}
18690
18691static NODE *
18692rest_arg_append(struct parser_params *p, NODE *args, NODE *rest_arg, const YYLTYPE *loc)
18693{
18694 NODE *n1;
18695 if ((nd_type(rest_arg) == NODE_LIST) && (n1 = splat_array(args)) != 0) {
18696 return list_concat(n1, rest_arg);
18697 }
18698 return arg_concat(p, args, rest_arg, loc);
18699}
18700
18701static NODE *
18702splat_array(NODE* node)
18703{
18704 if (nd_type(node) == NODE_SPLAT) node = node->nd_head;
18705 if (nd_type(node) == NODE_LIST) return node;
18706 return 0;
18707}
18708
18709static void
18710mark_lvar_used(struct parser_params *p, NODE *rhs)
18711{
18712 ID *vidp = NULL;
18713 if (!rhs) return;
18714 switch (nd_type(rhs)) {
18715 case NODE_LASGN:
18716 if (local_id_ref(p, rhs->nd_vid, &vidp)) {
18717 if (vidp) *vidp |= LVAR_USED;
18718 }
18719 break;
18720 case NODE_DASGN:
18721 case NODE_DASGN_CURR:
18722 if (dvar_defined_ref(p, rhs->nd_vid, &vidp)) {
18723 if (vidp) *vidp |= LVAR_USED;
18724 }
18725 break;
18726#if 0
18727 case NODE_MASGN:
18728 for (rhs = rhs->nd_head; rhs; rhs = rhs->nd_next) {
18729 mark_lvar_used(p, rhs->nd_head);
18730 }
18731 break;
18732#endif
18733 }
18734}
18735
18736static NODE *
18737const_decl_path(struct parser_params *p, NODE **dest)
18738{
18739 NODE *n = *dest;
18740 if (nd_type(n) != NODE_CALL) {
18741 const YYLTYPE *loc = &n->nd_loc;
18742 VALUE path;
18743 if (n->nd_vid) {
18744 path = rb_id2str(n->nd_vid);
18745 }
18746 else {
18747 n = n->nd_else;
18748 path = rb_ary_new();
18749 for (; n && nd_type(n) == NODE_COLON2; n = n->nd_head) {
18750 rb_ary_push(path, rb_id2str(n->nd_mid));
18751 }
18752 if (n && nd_type(n) == NODE_CONST) {
18753 // Const::Name
18754 rb_ary_push(path, rb_id2str(n->nd_vid));
18755 }
18756 else if (n && nd_type(n) == NODE_COLON3) {
18757 // ::Const::Name
18758 rb_ary_push(path, rb_str_new(0, 0));
18759 }
18760 else {
18761 // expression::Name
18762 rb_ary_push(path, rb_str_new_cstr("..."));
18763 }
18764 path = rb_ary_join(rb_ary_reverse(path), rb_str_new_cstr("::"));
18765 path = rb_fstring(path);
18766 }
18767 *dest = n = NEW_LIT(path, loc);
18768 }
18769 return n;
18770}
18771
18773
18774static NODE *
18775make_shareable_node(struct parser_params *p, NODE *value, bool copy, const YYLTYPE *loc)
18776{
18777 NODE *fcore = NEW_LIT(rb_mRubyVMFrozenCore, loc);
18778
18779 if (copy) {
18780 return NEW_CALL(fcore, rb_intern("make_shareable_copy"),
18781 NEW_LIST(value, loc), loc);
18782 }
18783 else {
18784 return NEW_CALL(fcore, rb_intern("make_shareable"),
18785 NEW_LIST(value, loc), loc);
18786 }
18787}
18788
18789static NODE *
18790ensure_shareable_node(struct parser_params *p, NODE **dest, NODE *value, const YYLTYPE *loc)
18791{
18792 NODE *fcore = NEW_LIT(rb_mRubyVMFrozenCore, loc);
18793 NODE *args = NEW_LIST(value, loc);
18794 args = list_append(p, args, const_decl_path(p, dest));
18795 return NEW_CALL(fcore, rb_intern("ensure_shareable"), args, loc);
18796}
18797
18798static int is_static_content(NODE *node);
18799
18800static VALUE
18801shareable_literal_value(NODE *node)
18802{
18803 if (!node) return Qnil;
18804 enum node_type type = nd_type(node);
18805 switch (type) {
18806 case NODE_TRUE:
18807 return Qtrue;
18808 case NODE_FALSE:
18809 return Qfalse;
18810 case NODE_NIL:
18811 return Qnil;
18812 case NODE_LIT:
18813 return node->nd_lit;
18814 default:
18815 return Qundef;
18816 }
18817}
18818
18819#ifndef SHAREABLE_BARE_EXPRESSION
18820#define SHAREABLE_BARE_EXPRESSION 1
18821#endif
18822
18823static NODE *
18824shareable_literal_constant(struct parser_params *p, enum shareability shareable,
18825 NODE **dest, NODE *value, const YYLTYPE *loc, size_t level)
18826{
18827# define shareable_literal_constant_next(n) \
18828 shareable_literal_constant(p, shareable, dest, (n), &(n)->nd_loc, level+1)
18829 VALUE lit = Qnil;
18830
18831 if (!value) return 0;
18832 enum node_type type = nd_type(value);
18833 switch (type) {
18834 case NODE_TRUE:
18835 case NODE_FALSE:
18836 case NODE_NIL:
18837 case NODE_LIT:
18838 return value;
18839
18840 case NODE_DSTR:
18841 if (shareable == shareable_literal) {
18842 value = NEW_CALL(value, idUMinus, 0, loc);
18843 }
18844 return value;
18845
18846 case NODE_STR:
18847 lit = rb_fstring(value->nd_lit);
18848 nd_set_type(value, NODE_LIT);
18849 RB_OBJ_WRITE(p->ast, &value->nd_lit, lit);
18850 return value;
18851
18852 case NODE_ZLIST:
18853 lit = rb_ary_new();
18854 OBJ_FREEZE_RAW(lit);
18855 return NEW_LIT(lit, loc);
18856
18857 case NODE_LIST:
18858 lit = rb_ary_new();
18859 for (NODE *n = value; n; n = n->nd_next) {
18860 NODE *elt = n->nd_head;
18861 if (elt) {
18863 if (elt) {
18864 n->nd_head = elt;
18865 }
18866 else if (RTEST(lit)) {
18867 rb_ary_clear(lit);
18868 lit = Qfalse;
18869 }
18870 }
18871 if (RTEST(lit)) {
18872 VALUE e = shareable_literal_value(elt);
18873 if (e != Qundef) {
18874 rb_ary_push(lit, e);
18875 }
18876 else {
18877 rb_ary_clear(lit);
18878 lit = Qnil; /* make shareable at runtime */
18879 }
18880 }
18881 }
18882 break;
18883
18884 case NODE_HASH:
18885 if (!value->nd_brace) return 0;
18886 lit = rb_hash_new();
18887 for (NODE *n = value->nd_head; n; n = n->nd_next->nd_next) {
18888 NODE *key = n->nd_head;
18889 NODE *val = n->nd_next->nd_head;
18890 if (key) {
18892 if (key) {
18893 n->nd_head = key;
18894 }
18895 else if (RTEST(lit)) {
18896 rb_hash_clear(lit);
18897 lit = Qfalse;
18898 }
18899 }
18900 if (val) {
18902 if (val) {
18903 n->nd_next->nd_head = val;
18904 }
18905 else if (RTEST(lit)) {
18906 rb_hash_clear(lit);
18907 lit = Qfalse;
18908 }
18909 }
18910 if (RTEST(lit)) {
18911 VALUE k = shareable_literal_value(key);
18912 VALUE v = shareable_literal_value(val);
18913 if (k != Qundef && v != Qundef) {
18914 rb_hash_aset(lit, k, v);
18915 }
18916 else {
18917 rb_hash_clear(lit);
18918 lit = Qnil; /* make shareable at runtime */
18919 }
18920 }
18921 }
18922 break;
18923
18924 default:
18925 if (shareable == shareable_literal &&
18926 (SHAREABLE_BARE_EXPRESSION || level > 0)) {
18927 return ensure_shareable_node(p, dest, value, loc);
18928 }
18929 return 0;
18930 }
18931
18932 /* Array or Hash */
18933 if (!lit) return 0;
18934 if (NIL_P(lit)) {
18935 // if shareable_literal, all elements should have been ensured
18936 // as shareable
18937 value = make_shareable_node(p, value, false, loc);
18938 }
18939 else {
18940 value = NEW_LIT(rb_ractor_make_shareable(lit), loc);
18941 }
18942
18943 return value;
18944# undef shareable_literal_constant_next
18945}
18946
18947static NODE *
18948shareable_constant_value(struct parser_params *p, enum shareability shareable,
18949 NODE *lhs, NODE *value, const YYLTYPE *loc)
18950{
18951 if (!value) return 0;
18952 switch (shareable) {
18953 case shareable_none:
18954 return value;
18955
18956 case shareable_literal:
18957 {
18958 NODE *lit = shareable_literal_constant(p, shareable, &lhs, value, loc, 0);
18959 if (lit) return lit;
18960 return value;
18961 }
18962 break;
18963
18964 case shareable_copy:
18966 {
18967 NODE *lit = shareable_literal_constant(p, shareable, &lhs, value, loc, 0);
18968 if (lit) return lit;
18969 return make_shareable_node(p, value, shareable == shareable_copy, loc);
18970 }
18971 break;
18972
18973 default:
18975 }
18976}
18977
18978static NODE *
18979node_assign(struct parser_params *p, NODE *lhs, NODE *rhs, struct lex_context ctxt, const YYLTYPE *loc)
18980{
18981 if (!lhs) return 0;
18982
18983 switch (nd_type(lhs)) {
18984 case NODE_CDECL:
18985 rhs = shareable_constant_value(p, ctxt.shareable_constant_value, lhs, rhs, loc);
18986 /* fallthru */
18987
18988 case NODE_GASGN:
18989 case NODE_IASGN:
18990 case NODE_LASGN:
18991 case NODE_DASGN:
18992 case NODE_DASGN_CURR:
18993 case NODE_MASGN:
18994 case NODE_CVASGN:
18995 lhs->nd_value = rhs;
18996 nd_set_loc(lhs, loc);
18997 break;
18998
18999 case NODE_ATTRASGN:
19000 lhs->nd_args = arg_append(p, lhs->nd_args, rhs, loc);
19001 nd_set_loc(lhs, loc);
19002 break;
19003
19004 default:
19005 /* should not happen */
19006 break;
19007 }
19008
19009 return lhs;
19010}
19011
19012static NODE *
19013value_expr_check(struct parser_params *p, NODE *node)
19014{
19015 NODE *void_node = 0, *vn;
19016
19017 if (!node) {
19018 rb_warning0("empty expression");
19019 }
19020 while (node) {
19021 switch (nd_type(node)) {
19022 case NODE_RETURN:
19023 case NODE_BREAK:
19024 case NODE_NEXT:
19025 case NODE_REDO:
19026 case NODE_RETRY:
19027 return void_node ? void_node : node;
19028
19029 case NODE_CASE3:
19030 if (!node->nd_body || nd_type(node->nd_body) != NODE_IN) {
19031 compile_error(p, "unexpected node");
19032 return NULL;
19033 }
19034 if (node->nd_body->nd_body) {
19035 return NULL;
19036 }
19037 /* single line pattern matching */
19038 return void_node ? void_node : node;
19039
19040 case NODE_BLOCK:
19041 while (node->nd_next) {
19042 node = node->nd_next;
19043 }
19044 node = node->nd_head;
19045 break;
19046
19047 case NODE_BEGIN:
19048 node = node->nd_body;
19049 break;
19050
19051 case NODE_IF:
19052 case NODE_UNLESS:
19053 if (!node->nd_body) {
19054 return NULL;
19055 }
19056 else if (!node->nd_else) {
19057 return NULL;
19058 }
19059 vn = value_expr_check(p, node->nd_body);
19060 if (!vn) return NULL;
19061 if (!void_node) void_node = vn;
19062 node = node->nd_else;
19063 break;
19064
19065 case NODE_AND:
19066 case NODE_OR:
19067 node = node->nd_1st;
19068 break;
19069
19070 case NODE_LASGN:
19071 case NODE_DASGN:
19072 case NODE_DASGN_CURR:
19073 case NODE_MASGN:
19074 mark_lvar_used(p, node);
19075 return NULL;
19076
19077 default:
19078 return NULL;
19079 }
19080 }
19081
19082 return NULL;
19083}
19084
19085static int
19086value_expr_gen(struct parser_params *p, NODE *node)
19087{
19088 NODE *void_node = value_expr_check(p, node);
19089 if (void_node) {
19090 yyerror1(&void_node->nd_loc, "void value expression");
19091 /* or "control never reach"? */
19092 return FALSE;
19093 }
19094 return TRUE;
19095}
19096static void
19097void_expr(struct parser_params *p, NODE *node)
19098{
19099 const char *useless = 0;
19100
19101 if (!RTEST(ruby_verbose)) return;
19102
19103 if (!node || !(node = nd_once_body(node))) return;
19104 switch (nd_type(node)) {
19105 case NODE_OPCALL:
19106 switch (node->nd_mid) {
19107 case '+':
19108 case '-':
19109 case '*':
19110 case '/':
19111 case '%':
19112 case tPOW:
19113 case tUPLUS:
19114 case tUMINUS:
19115 case '|':
19116 case '^':
19117 case '&':
19118 case tCMP:
19119 case '>':
19120 case tGEQ:
19121 case '<':
19122 case tLEQ:
19123 case tEQ:
19124 case tNEQ:
19125 useless = rb_id2name(node->nd_mid);
19126 break;
19127 }
19128 break;
19129
19130 case NODE_LVAR:
19131 case NODE_DVAR:
19132 case NODE_GVAR:
19133 case NODE_IVAR:
19134 case NODE_CVAR:
19135 case NODE_NTH_REF:
19136 case NODE_BACK_REF:
19137 useless = "a variable";
19138 break;
19139 case NODE_CONST:
19140 useless = "a constant";
19141 break;
19142 case NODE_LIT:
19143 case NODE_STR:
19144 case NODE_DSTR:
19145 case NODE_DREGX:
19146 useless = "a literal";
19147 break;
19148 case NODE_COLON2:
19149 case NODE_COLON3:
19150 useless = "::";
19151 break;
19152 case NODE_DOT2:
19153 useless = "..";
19154 break;
19155 case NODE_DOT3:
19156 useless = "...";
19157 break;
19158 case NODE_SELF:
19159 useless = "self";
19160 break;
19161 case NODE_NIL:
19162 useless = "nil";
19163 break;
19164 case NODE_TRUE:
19165 useless = "true";
19166 break;
19167 case NODE_FALSE:
19168 useless = "false";
19169 break;
19170 case NODE_DEFINED:
19171 useless = "defined?";
19172 break;
19173 }
19174
19175 if (useless) {
19176 rb_warn1L(nd_line(node), "possibly useless use of %s in void context", WARN_S(useless));
19177 }
19178}
19179
19180static NODE *
19181void_stmts(struct parser_params *p, NODE *node)
19182{
19183 NODE *const n = node;
19184 if (!RTEST(ruby_verbose)) return n;
19185 if (!node) return n;
19186 if (nd_type(node) != NODE_BLOCK) return n;
19187
19188 while (node->nd_next) {
19189 void_expr(p, node->nd_head);
19190 node = node->nd_next;
19191 }
19192 return n;
19193}
19194
19195static NODE *
19196remove_begin(NODE *node)
19197{
19198 NODE **n = &node, *n1 = node;
19199 while (n1 && nd_type(n1) == NODE_BEGIN && n1->nd_body) {
19200 *n = n1 = n1->nd_body;
19201 }
19202 return node;
19203}
19204
19205static NODE *
19206remove_begin_all(NODE *node)
19207{
19208 NODE **n = &node, *n1 = node;
19209 while (n1 && nd_type(n1) == NODE_BEGIN) {
19210 *n = n1 = n1->nd_body;
19211 }
19212 return node;
19213}
19214
19215static void
19216reduce_nodes(struct parser_params *p, NODE **body)
19217{
19218 NODE *node = *body;
19219
19220 if (!node) {
19221 *body = NEW_NIL(&NULL_LOC);
19222 return;
19223 }
19224#define subnodes(n1, n2) \
19225 ((!node->n1) ? (node->n2 ? (body = &node->n2, 1) : 0) : \
19226 (!node->n2) ? (body = &node->n1, 1) : \
19227 (reduce_nodes(p, &node->n1), body = &node->n2, 1))
19228
19229 while (node) {
19230 int newline = (int)(node->flags & NODE_FL_NEWLINE);
19231 switch (nd_type(node)) {
19232 end:
19233 case NODE_NIL:
19234 *body = 0;
19235 return;
19236 case NODE_RETURN:
19237 *body = node = node->nd_stts;
19238 if (newline && node) node->flags |= NODE_FL_NEWLINE;
19239 continue;
19240 case NODE_BEGIN:
19241 *body = node = node->nd_body;
19242 if (newline && node) node->flags |= NODE_FL_NEWLINE;
19243 continue;
19244 case NODE_BLOCK:
19245 body = &node->nd_end->nd_head;
19246 break;
19247 case NODE_IF:
19248 case NODE_UNLESS:
19249 if (subnodes(nd_body, nd_else)) break;
19250 return;
19251 case NODE_CASE:
19252 body = &node->nd_body;
19253 break;
19254 case NODE_WHEN:
19255 if (!subnodes(nd_body, nd_next)) goto end;
19256 break;
19257 case NODE_ENSURE:
19258 if (!subnodes(nd_head, nd_resq)) goto end;
19259 break;
19260 case NODE_RESCUE:
19261 if (node->nd_else) {
19262 body = &node->nd_resq;
19263 break;
19264 }
19265 if (!subnodes(nd_head, nd_resq)) goto end;
19266 break;
19267 default:
19268 return;
19269 }
19270 node = *body;
19271 if (newline && node) node->flags |= NODE_FL_NEWLINE;
19272 }
19273
19274#undef subnodes
19275}
19276
19277static int
19278is_static_content(NODE *node)
19279{
19280 if (!node) return 1;
19281 switch (nd_type(node)) {
19282 case NODE_HASH:
19283 if (!(node = node->nd_head)) break;
19284 case NODE_LIST:
19285 do {
19286 if (!is_static_content(node->nd_head)) return 0;
19287 } while ((node = node->nd_next) != 0);
19288 case NODE_LIT:
19289 case NODE_STR:
19290 case NODE_NIL:
19291 case NODE_TRUE:
19292 case NODE_FALSE:
19293 case NODE_ZLIST:
19294 break;
19295 default:
19296 return 0;
19297 }
19298 return 1;
19299}
19300
19301static int
19302assign_in_cond(struct parser_params *p, NODE *node)
19303{
19304 switch (nd_type(node)) {
19305 case NODE_MASGN:
19306 case NODE_LASGN:
19307 case NODE_DASGN:
19308 case NODE_DASGN_CURR:
19309 case NODE_GASGN:
19310 case NODE_IASGN:
19311 break;
19312
19313 default:
19314 return 0;
19315 }
19316
19317 if (!node->nd_value) return 1;
19318 if (is_static_content(node->nd_value)) {
19319 /* reports always */
19320 parser_warn(p, node->nd_value, "found `= literal' in conditional, should be ==");
19321 }
19322 return 1;
19323}
19324
19330
19331#define SWITCH_BY_COND_TYPE(t, w, arg) \
19332 switch (t) { \
19333 case COND_IN_OP: break; \
19334 case COND_IN_COND: rb_##w##0(arg "literal in condition"); break; \
19335 case COND_IN_FF: rb_##w##0(arg "literal in flip-flop"); break; \
19336 }
19337
19338static NODE *cond0(struct parser_params*,NODE*,enum cond_type,const YYLTYPE*);
19339
19340static NODE*
19341range_op(struct parser_params *p, NODE *node, const YYLTYPE *loc)
19342{
19343 enum node_type type;
19344
19345 if (node == 0) return 0;
19346
19347 type = nd_type(node);
19348 value_expr(node);
19349 if (type == NODE_LIT && FIXNUM_P(node->nd_lit)) {
19350 if (!e_option_supplied(p)) parser_warn(p, node, "integer literal in flip-flop");
19351 ID lineno = rb_intern("$.");
19352 return NEW_CALL(node, tEQ, NEW_LIST(NEW_GVAR(lineno, loc), loc), loc);
19353 }
19354 return cond0(p, node, COND_IN_FF, loc);
19355}
19356
19357static NODE*
19358cond0(struct parser_params *p, NODE *node, enum cond_type type, const YYLTYPE *loc)
19359{
19360 if (node == 0) return 0;
19361 if (!(node = nd_once_body(node))) return 0;
19362 assign_in_cond(p, node);
19363
19364 switch (nd_type(node)) {
19365 case NODE_DSTR:
19366 case NODE_EVSTR:
19367 case NODE_STR:
19368 SWITCH_BY_COND_TYPE(type, warn, "string ")
19369 break;
19370
19371 case NODE_DREGX:
19372 if (!e_option_supplied(p)) SWITCH_BY_COND_TYPE(type, warning, "regex ")
19373
19374 return NEW_MATCH2(node, NEW_GVAR(idLASTLINE, loc), loc);
19375
19376 case NODE_AND:
19377 case NODE_OR:
19378 node->nd_1st = cond0(p, node->nd_1st, COND_IN_COND, loc);
19379 node->nd_2nd = cond0(p, node->nd_2nd, COND_IN_COND, loc);
19380 break;
19381
19382 case NODE_DOT2:
19383 case NODE_DOT3:
19384 node->nd_beg = range_op(p, node->nd_beg, loc);
19385 node->nd_end = range_op(p, node->nd_end, loc);
19386 if (nd_type(node) == NODE_DOT2) nd_set_type(node,NODE_FLIP2);
19387 else if (nd_type(node) == NODE_DOT3) nd_set_type(node, NODE_FLIP3);
19388 break;
19389
19390 case NODE_DSYM:
19391 SWITCH_BY_COND_TYPE(type, warning, "string ")
19392 break;
19393
19394 case NODE_LIT:
19395 if (RB_TYPE_P(node->nd_lit, T_REGEXP)) {
19396 if (!e_option_supplied(p)) SWITCH_BY_COND_TYPE(type, warn, "regex ")
19397 nd_set_type(node, NODE_MATCH);
19398 }
19399 else if (node->nd_lit == Qtrue ||
19400 node->nd_lit == Qfalse) {
19401 /* booleans are OK, e.g., while true */
19402 }
19403 else {
19404 SWITCH_BY_COND_TYPE(type, warning, "")
19405 }
19406 default:
19407 break;
19408 }
19409 return node;
19410}
19411
19412static NODE*
19413cond(struct parser_params *p, NODE *node, const YYLTYPE *loc)
19414{
19415 if (node == 0) return 0;
19416 return cond0(p, node, COND_IN_COND, loc);
19417}
19418
19419static NODE*
19420method_cond(struct parser_params *p, NODE *node, const YYLTYPE *loc)
19421{
19422 if (node == 0) return 0;
19423 return cond0(p, node, COND_IN_OP, loc);
19424}
19425
19426static NODE*
19427new_nil_at(struct parser_params *p, const rb_code_position_t *pos)
19428{
19429 YYLTYPE loc = {*pos, *pos};
19430 return NEW_NIL(&loc);
19431}
19432
19433static NODE*
19434new_if(struct parser_params *p, NODE *cc, NODE *left, NODE *right, const YYLTYPE *loc)
19435{
19436 if (!cc) return right;
19437 cc = cond0(p, cc, COND_IN_COND, loc);
19438 return newline_node(NEW_IF(cc, left, right, loc));
19439}
19440
19441static NODE*
19442new_unless(struct parser_params *p, NODE *cc, NODE *left, NODE *right, const YYLTYPE *loc)
19443{
19444 if (!cc) return right;
19445 cc = cond0(p, cc, COND_IN_COND, loc);
19446 return newline_node(NEW_UNLESS(cc, left, right, loc));
19447}
19448
19449static NODE*
19450logop(struct parser_params *p, ID id, NODE *left, NODE *right,
19451 const YYLTYPE *op_loc, const YYLTYPE *loc)
19452{
19453 enum node_type type = id == idAND || id == idANDOP ? NODE_AND : NODE_OR;
19454 NODE *op;
19455 value_expr(left);
19456 if (left && (enum node_type)nd_type(left) == type) {
19457 NODE *node = left, *second;
19458 while ((second = node->nd_2nd) != 0 && (enum node_type)nd_type(second) == type) {
19459 node = second;
19460 }
19461 node->nd_2nd = NEW_NODE(type, second, right, 0, loc);
19462 nd_set_line(node->nd_2nd, op_loc->beg_pos.lineno);
19463 left->nd_loc.end_pos = loc->end_pos;
19464 return left;
19465 }
19466 op = NEW_NODE(type, left, right, 0, loc);
19467 nd_set_line(op, op_loc->beg_pos.lineno);
19468 return op;
19469}
19470
19471static void
19472no_blockarg(struct parser_params *p, NODE *node)
19473{
19474 if (node && nd_type(node) == NODE_BLOCK_PASS) {
19475 compile_error(p, "block argument should not be given");
19476 }
19477}
19478
19479static NODE *
19480ret_args(struct parser_params *p, NODE *node)
19481{
19482 if (node) {
19483 no_blockarg(p, node);
19484 if (nd_type(node) == NODE_LIST) {
19485 if (node->nd_next == 0) {
19486 node = node->nd_head;
19487 }
19488 else {
19489 nd_set_type(node, NODE_VALUES);
19490 }
19491 }
19492 }
19493 return node;
19494}
19495
19496static NODE *
19497new_yield(struct parser_params *p, NODE *node, const YYLTYPE *loc)
19498{
19499 if (node) no_blockarg(p, node);
19500
19501 return NEW_YIELD(node, loc);
19502}
19503
19504static VALUE
19505negate_lit(struct parser_params *p, VALUE lit)
19506{
19507 if (FIXNUM_P(lit)) {
19508 return LONG2FIX(-FIX2LONG(lit));
19509 }
19510 if (SPECIAL_CONST_P(lit)) {
19511#if USE_FLONUM
19512 if (FLONUM_P(lit)) {
19513 return DBL2NUM(-RFLOAT_VALUE(lit));
19514 }
19515#endif
19516 goto unknown;
19517 }
19518 switch (BUILTIN_TYPE(lit)) {
19519 case T_BIGNUM:
19520 BIGNUM_NEGATE(lit);
19521 lit = rb_big_norm(lit);
19522 break;
19523 case T_RATIONAL:
19524 RATIONAL_SET_NUM(lit, negate_lit(p, RRATIONAL(lit)->num));
19525 break;
19526 case T_COMPLEX:
19527 RCOMPLEX_SET_REAL(lit, negate_lit(p, RCOMPLEX(lit)->real));
19528 RCOMPLEX_SET_IMAG(lit, negate_lit(p, RCOMPLEX(lit)->imag));
19529 break;
19530 case T_FLOAT:
19531 RFLOAT(lit)->float_value = -RFLOAT_VALUE(lit);
19532 break;
19533 unknown:
19534 default:
19535 rb_parser_fatal(p, "unknown literal type (%s) passed to negate_lit",
19537 break;
19538 }
19539 return lit;
19540}
19541
19542static NODE *
19543arg_blk_pass(NODE *node1, NODE *node2)
19544{
19545 if (node2) {
19546 if (!node1) return node2;
19547 node2->nd_head = node1;
19548 nd_set_first_lineno(node2, nd_first_lineno(node1));
19549 nd_set_first_column(node2, nd_first_column(node1));
19550 return node2;
19551 }
19552 return node1;
19553}
19554
19555static bool
19556args_info_empty_p(struct rb_args_info *args)
19557{
19558 if (args->pre_args_num) return false;
19559 if (args->post_args_num) return false;
19560 if (args->rest_arg) return false;
19561 if (args->opt_args) return false;
19562 if (args->block_arg) return false;
19563 if (args->kw_args) return false;
19564 if (args->kw_rest_arg) return false;
19565 return true;
19566}
19567
19568static NODE*
19569new_args(struct parser_params *p, NODE *pre_args, NODE *opt_args, ID rest_arg, NODE *post_args, NODE *tail, const YYLTYPE *loc)
19570{
19571 int saved_line = p->ruby_sourceline;
19572 struct rb_args_info *args = tail->nd_ainfo;
19573
19574 args->pre_args_num = pre_args ? rb_long2int(pre_args->nd_plen) : 0;
19575 args->pre_init = pre_args ? pre_args->nd_next : 0;
19576
19577 args->post_args_num = post_args ? rb_long2int(post_args->nd_plen) : 0;
19578 args->post_init = post_args ? post_args->nd_next : 0;
19579 args->first_post_arg = post_args ? post_args->nd_pid : 0;
19580
19581 args->rest_arg = rest_arg;
19582
19583 args->opt_args = opt_args;
19584
19586
19587 p->ruby_sourceline = saved_line;
19588 nd_set_loc(tail, loc);
19589
19590 return tail;
19591}
19592
19593static NODE*
19594new_args_tail(struct parser_params *p, NODE *kw_args, ID kw_rest_arg, ID block, const YYLTYPE *kw_rest_loc)
19595{
19596 int saved_line = p->ruby_sourceline;
19597 NODE *node;
19598 VALUE tmpbuf = rb_imemo_tmpbuf_auto_free_pointer();
19599 struct rb_args_info *args = ZALLOC(struct rb_args_info);
19600 rb_imemo_tmpbuf_set_ptr(tmpbuf, args);
19601 args->imemo = tmpbuf;
19602 node = NEW_NODE(NODE_ARGS, 0, 0, args, &NULL_LOC);
19603 RB_OBJ_WRITTEN(p->ast, Qnil, tmpbuf);
19604 if (p->error_p) return node;
19605
19606 args->block_arg = block;
19607 args->kw_args = kw_args;
19608
19609 if (kw_args) {
19610 /*
19611 * def foo(k1: 1, kr1:, k2: 2, **krest, &b)
19612 * variable order: k1, kr1, k2, &b, internal_id, krest
19613 * #=> <reorder>
19614 * variable order: kr1, k1, k2, internal_id, krest, &b
19615 */
19616 ID kw_bits = internal_id(p), *required_kw_vars, *kw_vars;
19617 struct vtable *vtargs = p->lvtbl->args;
19618 NODE *kwn = kw_args;
19619
19620 vtable_pop(vtargs, !!block + !!kw_rest_arg);
19621 required_kw_vars = kw_vars = &vtargs->tbl[vtargs->pos];
19622 while (kwn) {
19623 if (!NODE_REQUIRED_KEYWORD_P(kwn->nd_body))
19624 --kw_vars;
19625 --required_kw_vars;
19626 kwn = kwn->nd_next;
19627 }
19628
19629 for (kwn = kw_args; kwn; kwn = kwn->nd_next) {
19630 ID vid = kwn->nd_body->nd_vid;
19631 if (NODE_REQUIRED_KEYWORD_P(kwn->nd_body)) {
19632 *required_kw_vars++ = vid;
19633 }
19634 else {
19635 *kw_vars++ = vid;
19636 }
19637 }
19638
19639 arg_var(p, kw_bits);
19640 if (kw_rest_arg) arg_var(p, kw_rest_arg);
19641 if (block) arg_var(p, block);
19642
19643 args->kw_rest_arg = NEW_DVAR(kw_rest_arg, kw_rest_loc);
19644 args->kw_rest_arg->nd_cflag = kw_bits;
19645 }
19646 else if (kw_rest_arg == idNil) {
19647 args->no_kwarg = 1;
19648 }
19649 else if (kw_rest_arg) {
19650 args->kw_rest_arg = NEW_DVAR(kw_rest_arg, kw_rest_loc);
19651 }
19652
19653 p->ruby_sourceline = saved_line;
19654 return node;
19655}
19656
19657static NODE *
19658args_with_numbered(struct parser_params *p, NODE *args, int max_numparam)
19659{
19660 if (max_numparam > NO_PARAM) {
19661 if (!args) {
19662 YYLTYPE loc = RUBY_INIT_YYLLOC();
19663 args = new_args_tail(p, 0, 0, 0, 0);
19664 nd_set_loc(args, &loc);
19665 }
19666 args->nd_ainfo->pre_args_num = max_numparam;
19667 }
19668 return args;
19669}
19670
19671static NODE*
19672new_array_pattern(struct parser_params *p, NODE *constant, NODE *pre_arg, NODE *aryptn, const YYLTYPE *loc)
19673{
19674 struct rb_ary_pattern_info *apinfo = aryptn->nd_apinfo;
19675
19676 aryptn->nd_pconst = constant;
19677
19678 if (pre_arg) {
19679 NODE *pre_args = NEW_LIST(pre_arg, loc);
19680 if (apinfo->pre_args) {
19681 apinfo->pre_args = list_concat(pre_args, apinfo->pre_args);
19682 }
19683 else {
19684 apinfo->pre_args = pre_args;
19685 }
19686 }
19687 return aryptn;
19688}
19689
19690static NODE*
19691new_array_pattern_tail(struct parser_params *p, NODE *pre_args, int has_rest, ID rest_arg, NODE *post_args, const YYLTYPE *loc)
19692{
19693 int saved_line = p->ruby_sourceline;
19694 NODE *node;
19695 VALUE tmpbuf = rb_imemo_tmpbuf_auto_free_pointer();
19696 struct rb_ary_pattern_info *apinfo = ZALLOC(struct rb_ary_pattern_info);
19697 rb_imemo_tmpbuf_set_ptr(tmpbuf, apinfo);
19698 node = NEW_NODE(NODE_ARYPTN, 0, tmpbuf, apinfo, loc);
19699 RB_OBJ_WRITTEN(p->ast, Qnil, tmpbuf);
19700
19701 apinfo->pre_args = pre_args;
19702
19703 if (has_rest) {
19704 if (rest_arg) {
19705 apinfo->rest_arg = assignable(p, rest_arg, 0, loc);
19706 }
19707 else {
19709 }
19710 }
19711 else {
19712 apinfo->rest_arg = NULL;
19713 }
19714
19715 apinfo->post_args = post_args;
19716
19717 p->ruby_sourceline = saved_line;
19718 return node;
19719}
19720
19721static NODE*
19722new_find_pattern(struct parser_params *p, NODE *constant, NODE *fndptn, const YYLTYPE *loc)
19723{
19724 fndptn->nd_pconst = constant;
19725
19726 return fndptn;
19727}
19728
19729static NODE*
19730new_find_pattern_tail(struct parser_params *p, ID pre_rest_arg, NODE *args, ID post_rest_arg, const YYLTYPE *loc)
19731{
19732 int saved_line = p->ruby_sourceline;
19733 NODE *node;
19734 VALUE tmpbuf = rb_imemo_tmpbuf_auto_free_pointer();
19735 struct rb_fnd_pattern_info *fpinfo = ZALLOC(struct rb_fnd_pattern_info);
19736 rb_imemo_tmpbuf_set_ptr(tmpbuf, fpinfo);
19737 node = NEW_NODE(NODE_FNDPTN, 0, tmpbuf, fpinfo, loc);
19738 RB_OBJ_WRITTEN(p->ast, Qnil, tmpbuf);
19739
19740 fpinfo->pre_rest_arg = pre_rest_arg ? assignable(p, pre_rest_arg, 0, loc) : NODE_SPECIAL_NO_NAME_REST;
19741 fpinfo->args = args;
19742 fpinfo->post_rest_arg = post_rest_arg ? assignable(p, post_rest_arg, 0, loc) : NODE_SPECIAL_NO_NAME_REST;
19743
19744 p->ruby_sourceline = saved_line;
19745 return node;
19746}
19747
19748static NODE*
19749new_hash_pattern(struct parser_params *p, NODE *constant, NODE *hshptn, const YYLTYPE *loc)
19750{
19751 hshptn->nd_pconst = constant;
19752 return hshptn;
19753}
19754
19755static NODE*
19756new_hash_pattern_tail(struct parser_params *p, NODE *kw_args, ID kw_rest_arg, const YYLTYPE *loc)
19757{
19758 int saved_line = p->ruby_sourceline;
19759 NODE *node, *kw_rest_arg_node;
19760
19761 if (kw_rest_arg == idNil) {
19762 kw_rest_arg_node = NODE_SPECIAL_NO_REST_KEYWORD;
19763 }
19764 else if (kw_rest_arg) {
19765 kw_rest_arg_node = assignable(p, kw_rest_arg, 0, loc);
19766 }
19767 else {
19768 kw_rest_arg_node = NULL;
19769 }
19770
19771 node = NEW_NODE(NODE_HSHPTN, 0, kw_args, kw_rest_arg_node, loc);
19772
19773 p->ruby_sourceline = saved_line;
19774 return node;
19775}
19776
19777static void
19778warn_one_line_pattern_matching(struct parser_params *p, NODE *node, NODE *pattern, bool right_assign)
19779{
19780 enum node_type type;
19781 type = nd_type(pattern);
19782
19784 !(right_assign && (type == NODE_LASGN || type == NODE_DASGN || type == NODE_DASGN_CURR)))
19785 rb_warn0L_experimental(nd_line(node), "One-line pattern matching is experimental, and the behavior may change in future versions of Ruby!");
19786}
19787
19788static NODE*
19789dsym_node(struct parser_params *p, NODE *node, const YYLTYPE *loc)
19790{
19791 VALUE lit;
19792
19793 if (!node) {
19794 return NEW_LIT(ID2SYM(idNULL), loc);
19795 }
19796
19797 switch (nd_type(node)) {
19798 case NODE_DSTR:
19799 nd_set_type(node, NODE_DSYM);
19800 nd_set_loc(node, loc);
19801 break;
19802 case NODE_STR:
19803 lit = node->nd_lit;
19804 RB_OBJ_WRITTEN(p->ast, Qnil, node->nd_lit = ID2SYM(rb_intern_str(lit)));
19805 nd_set_type(node, NODE_LIT);
19806 nd_set_loc(node, loc);
19807 break;
19808 default:
19809 node = NEW_NODE(NODE_DSYM, Qnil, 1, NEW_LIST(node, loc), loc);
19810 break;
19811 }
19812 return node;
19813}
19814
19815static int
19816append_literal_keys(st_data_t k, st_data_t v, st_data_t h)
19817{
19818 NODE *node = (NODE *)v;
19819 NODE **result = (NODE **)h;
19820 node->nd_alen = 2;
19821 node->nd_next->nd_end = node->nd_next;
19822 node->nd_next->nd_next = 0;
19823 if (*result)
19824 list_concat(*result, node);
19825 else
19826 *result = node;
19827 return ST_CONTINUE;
19828}
19829
19830static NODE *
19831remove_duplicate_keys(struct parser_params *p, NODE *hash)
19832{
19833 st_table *literal_keys = st_init_numtable_with_size(hash->nd_alen / 2);
19834 NODE *result = 0;
19835 rb_code_location_t loc = hash->nd_loc;
19836 while (hash && hash->nd_head && hash->nd_next) {
19837 NODE *head = hash->nd_head;
19838 NODE *value = hash->nd_next;
19839 NODE *next = value->nd_next;
19840 VALUE key = (VALUE)head;
19841 st_data_t data;
19842 if (nd_type(head) == NODE_LIT &&
19843 st_lookup(literal_keys, (key = head->nd_lit), &data)) {
19845 "key %+"PRIsVALUE" is duplicated and overwritten on line %d",
19846 head->nd_lit, nd_line(head));
19847 head = ((NODE *)data)->nd_next;
19848 head->nd_head = block_append(p, head->nd_head, value->nd_head);
19849 }
19850 else {
19851 st_insert(literal_keys, (st_data_t)key, (st_data_t)hash);
19852 }
19853 hash = next;
19854 }
19855 st_foreach(literal_keys, append_literal_keys, (st_data_t)&result);
19856 st_free_table(literal_keys);
19857 if (hash) {
19858 if (!result) result = hash;
19859 else list_concat(result, hash);
19860 }
19861 result->nd_loc = loc;
19862 return result;
19863}
19864
19865static NODE *
19866new_hash(struct parser_params *p, NODE *hash, const YYLTYPE *loc)
19867{
19868 if (hash) hash = remove_duplicate_keys(p, hash);
19869 return NEW_HASH(hash, loc);
19870}
19871#endif
19872
19873static void
19874error_duplicate_pattern_variable(struct parser_params *p, ID id, const YYLTYPE *loc)
19875{
19876 if (is_private_local_id(id)) {
19877 return;
19878 }
19879 if (st_is_member(p->pvtbl, id)) {
19880 yyerror1(loc, "duplicated variable name");
19881 }
19882 else {
19883 st_insert(p->pvtbl, (st_data_t)id, 0);
19884 }
19885}
19886
19887static void
19888error_duplicate_pattern_key(struct parser_params *p, VALUE key, const YYLTYPE *loc)
19889{
19890 if (!p->pktbl) {
19891 p->pktbl = st_init_numtable();
19892 }
19893 else if (st_is_member(p->pktbl, key)) {
19894 yyerror1(loc, "duplicated key name");
19895 return;
19896 }
19897 st_insert(p->pktbl, (st_data_t)key, 0);
19898}
19899
19900#ifndef RIPPER
19901static NODE *
19902new_unique_key_hash(struct parser_params *p, NODE *hash, const YYLTYPE *loc)
19903{
19904 return NEW_HASH(hash, loc);
19905}
19906#endif /* !RIPPER */
19907
19908#ifndef RIPPER
19909static NODE *
19910new_op_assign(struct parser_params *p, NODE *lhs, ID op, NODE *rhs, struct lex_context ctxt, const YYLTYPE *loc)
19911{
19912 NODE *asgn;
19913
19914 if (lhs) {
19915 ID vid = lhs->nd_vid;
19916 YYLTYPE lhs_loc = lhs->nd_loc;
19917 int shareable = ctxt.shareable_constant_value;
19918 if (shareable) {
19919 switch (nd_type(lhs)) {
19920 case NODE_CDECL:
19921 case NODE_COLON2:
19922 case NODE_COLON3:
19923 break;
19924 default:
19925 shareable = 0;
19926 break;
19927 }
19928 }
19929 if (op == tOROP) {
19930 rhs = shareable_constant_value(p, shareable, lhs, rhs, &rhs->nd_loc);
19931 lhs->nd_value = rhs;
19932 nd_set_loc(lhs, loc);
19933 asgn = NEW_OP_ASGN_OR(gettable(p, vid, &lhs_loc), lhs, loc);
19934 if (is_notop_id(vid)) {
19935 switch (id_type(vid)) {
19936 case ID_GLOBAL:
19937 case ID_INSTANCE:
19938 case ID_CLASS:
19939 asgn->nd_aid = vid;
19940 }
19941 }
19942 }
19943 else if (op == tANDOP) {
19944 if (shareable) {
19945 rhs = shareable_constant_value(p, shareable, lhs, rhs, &rhs->nd_loc);
19946 }
19947 lhs->nd_value = rhs;
19948 nd_set_loc(lhs, loc);
19949 asgn = NEW_OP_ASGN_AND(gettable(p, vid, &lhs_loc), lhs, loc);
19950 }
19951 else {
19952 asgn = lhs;
19953 rhs = NEW_CALL(gettable(p, vid, &lhs_loc), op, NEW_LIST(rhs, &rhs->nd_loc), loc);
19954 if (shareable) {
19955 rhs = shareable_constant_value(p, shareable, lhs, rhs, &rhs->nd_loc);
19956 }
19957 asgn->nd_value = rhs;
19958 nd_set_loc(asgn, loc);
19959 }
19960 }
19961 else {
19962 asgn = NEW_BEGIN(0, loc);
19963 }
19964 return asgn;
19965}
19966
19967static NODE *
19968new_ary_op_assign(struct parser_params *p, NODE *ary,
19969 NODE *args, ID op, NODE *rhs, const YYLTYPE *args_loc, const YYLTYPE *loc)
19970{
19971 NODE *asgn;
19972
19973 args = make_list(args, args_loc);
19974 if (nd_type(args) == NODE_BLOCK_PASS) {
19975 args = NEW_ARGSCAT(args, rhs, loc);
19976 }
19977 else {
19978 args = arg_concat(p, args, rhs, loc);
19979 }
19980 asgn = NEW_OP_ASGN1(ary, op, args, loc);
19981 fixpos(asgn, ary);
19982 return asgn;
19983}
19984
19985static NODE *
19986new_attr_op_assign(struct parser_params *p, NODE *lhs,
19987 ID atype, ID attr, ID op, NODE *rhs, const YYLTYPE *loc)
19988{
19989 NODE *asgn;
19990
19991 asgn = NEW_OP_ASGN2(lhs, CALL_Q_P(atype), attr, op, rhs, loc);
19992 fixpos(asgn, lhs);
19993 return asgn;
19994}
19995
19996static NODE *
19997new_const_op_assign(struct parser_params *p, NODE *lhs, ID op, NODE *rhs, struct lex_context ctxt, const YYLTYPE *loc)
19998{
19999 NODE *asgn;
20000
20001 if (lhs) {
20002 rhs = shareable_constant_value(p, ctxt.shareable_constant_value, lhs, rhs, loc);
20003 asgn = NEW_OP_CDECL(lhs, op, rhs, loc);
20004 }
20005 else {
20006 asgn = NEW_BEGIN(0, loc);
20007 }
20008 fixpos(asgn, lhs);
20009 return asgn;
20010}
20011
20012static NODE *
20013const_decl(struct parser_params *p, NODE *path, const YYLTYPE *loc)
20014{
20015 if (p->ctxt.in_def) {
20016 yyerror1(loc, "dynamic constant assignment");
20017 }
20018 return NEW_CDECL(0, 0, (path), loc);
20019}
20020#else
20021static VALUE
20022const_decl(struct parser_params *p, VALUE path)
20023{
20024 if (p->ctxt.in_def) {
20025 path = assign_error(p, "dynamic constant assignment", path);
20026 }
20027 return path;
20028}
20029
20030static VALUE
20031assign_error(struct parser_params *p, const char *mesg, VALUE a)
20032{
20033 a = dispatch2(assign_error, ERR_MESG(), a);
20034 ripper_error(p);
20035 return a;
20036}
20037
20038static VALUE
20039var_field(struct parser_params *p, VALUE a)
20040{
20041 return ripper_new_yylval(p, get_id(a), dispatch1(var_field, a), 0);
20042}
20043#endif
20044
20045#ifndef RIPPER
20046static NODE *
20047new_bodystmt(struct parser_params *p, NODE *head, NODE *rescue, NODE *rescue_else, NODE *ensure, const YYLTYPE *loc)
20048{
20049 NODE *result = head;
20050 if (rescue) {
20051 NODE *tmp = rescue_else ? rescue_else : rescue;
20052 YYLTYPE rescue_loc = code_loc_gen(&head->nd_loc, &tmp->nd_loc);
20053
20054 result = NEW_RESCUE(head, rescue, rescue_else, &rescue_loc);
20055 nd_set_line(result, rescue->nd_loc.beg_pos.lineno);
20056 }
20057 else if (rescue_else) {
20058 result = block_append(p, result, rescue_else);
20059 }
20060 if (ensure) {
20061 result = NEW_ENSURE(result, ensure, loc);
20062 }
20063 fixpos(result, head);
20064 return result;
20065}
20066#endif
20067
20068static void
20069warn_unused_var(struct parser_params *p, struct local_vars *local)
20070{
20071 int cnt;
20072
20073 if (!local->used) return;
20074 cnt = local->used->pos;
20075 if (cnt != local->vars->pos) {
20076 rb_parser_fatal(p, "local->used->pos != local->vars->pos");
20077 }
20078#ifndef RIPPER
20079 ID *v = local->vars->tbl;
20080 ID *u = local->used->tbl;
20081 for (int i = 0; i < cnt; ++i) {
20082 if (!v[i] || (u[i] & LVAR_USED)) continue;
20083 if (is_private_local_id(v[i])) continue;
20084 rb_warn1L((int)u[i], "assigned but unused variable - %"PRIsWARN, rb_id2str(v[i]));
20085 }
20086#endif
20087}
20088
20089static void
20090local_push(struct parser_params *p, int toplevel_scope)
20091{
20092 struct local_vars *local;
20093 int inherits_dvars = toplevel_scope && compile_for_eval;
20094 int warn_unused_vars = RTEST(ruby_verbose);
20095
20096 local = ALLOC(struct local_vars);
20097 local->prev = p->lvtbl;
20098 local->args = vtable_alloc(0);
20099 local->vars = vtable_alloc(inherits_dvars ? DVARS_INHERIT : DVARS_TOPSCOPE);
20100#ifndef RIPPER
20101 if (toplevel_scope && compile_for_eval) warn_unused_vars = 0;
20102 if (toplevel_scope && e_option_supplied(p)) warn_unused_vars = 0;
20103 local->numparam.outer = 0;
20104 local->numparam.inner = 0;
20105 local->numparam.current = 0;
20106#endif
20107 local->used = warn_unused_vars ? vtable_alloc(0) : 0;
20108
20109# if WARN_PAST_SCOPE
20110 local->past = 0;
20111# endif
20112 CMDARG_PUSH(0);
20113 COND_PUSH(0);
20114 p->lvtbl = local;
20115}
20116
20117static void
20118local_pop(struct parser_params *p)
20119{
20120 struct local_vars *local = p->lvtbl->prev;
20121 if (p->lvtbl->used) {
20122 warn_unused_var(p, p->lvtbl);
20123 vtable_free(p->lvtbl->used);
20124 }
20125# if WARN_PAST_SCOPE
20126 while (p->lvtbl->past) {
20127 struct vtable *past = p->lvtbl->past;
20128 p->lvtbl->past = past->prev;
20129 vtable_free(past);
20130 }
20131# endif
20132 vtable_free(p->lvtbl->args);
20133 vtable_free(p->lvtbl->vars);
20134 CMDARG_POP();
20135 COND_POP();
20136 ruby_sized_xfree(p->lvtbl, sizeof(*p->lvtbl));
20137 p->lvtbl = local;
20138}
20139
20140#ifndef RIPPER
20141static ID*
20142local_tbl(struct parser_params *p)
20143{
20144 int cnt_args = vtable_size(p->lvtbl->args);
20145 int cnt_vars = vtable_size(p->lvtbl->vars);
20146 int cnt = cnt_args + cnt_vars;
20147 int i, j;
20148 ID *buf;
20149
20150 if (cnt <= 0) return 0;
20151 buf = ALLOC_N(ID, cnt + 2);
20152 MEMCPY(buf+1, p->lvtbl->args->tbl, ID, cnt_args);
20153 /* remove IDs duplicated to warn shadowing */
20154 for (i = 0, j = cnt_args+1; i < cnt_vars; ++i) {
20155 ID id = p->lvtbl->vars->tbl[i];
20156 if (!vtable_included(p->lvtbl->args, id)) {
20157 buf[j++] = id;
20158 }
20159 }
20160 if (--j < cnt) {
20161 REALLOC_N(buf, ID, (cnt = j) + 2);
20162 }
20163 buf[0] = cnt;
20165
20166 return buf;
20167}
20168
20169static NODE*
20170node_newnode_with_locals(struct parser_params *p, enum node_type type, VALUE a1, VALUE a2, const rb_code_location_t *loc)
20171{
20172 ID *a0;
20173 NODE *n;
20174
20175 a0 = local_tbl(p);
20176 n = NEW_NODE(type, a0, a1, a2, loc);
20177 return n;
20178}
20179
20180#endif
20181
20182static void
20183numparam_name(struct parser_params *p, ID id)
20184{
20185 if (!NUMPARAM_ID_P(id)) return;
20186 compile_error(p, "_%d is reserved for numbered parameter",
20187 NUMPARAM_ID_TO_IDX(id));
20188}
20189
20190static void
20191arg_var(struct parser_params *p, ID id)
20192{
20193 numparam_name(p, id);
20194 vtable_add(p->lvtbl->args, id);
20195}
20196
20197static void
20198local_var(struct parser_params *p, ID id)
20199{
20200 numparam_name(p, id);
20201 vtable_add(p->lvtbl->vars, id);
20202 if (p->lvtbl->used) {
20204 }
20205}
20206
20207static int
20208local_id_ref(struct parser_params *p, ID id, ID **vidrefp)
20209{
20210 struct vtable *vars, *args, *used;
20211
20212 vars = p->lvtbl->vars;
20213 args = p->lvtbl->args;
20214 used = p->lvtbl->used;
20215
20216 while (vars && !DVARS_TERMINAL_P(vars->prev)) {
20217 vars = vars->prev;
20218 args = args->prev;
20219 if (used) used = used->prev;
20220 }
20221
20222 if (vars && vars->prev == DVARS_INHERIT) {
20223 return rb_local_defined(id, p->parent_iseq);
20224 }
20225 else if (vtable_included(args, id)) {
20226 return 1;
20227 }
20228 else {
20229 int i = vtable_included(vars, id);
20230 if (i && used && vidrefp) *vidrefp = &used->tbl[i-1];
20231 return i != 0;
20232 }
20233}
20234
20235static int
20236local_id(struct parser_params *p, ID id)
20237{
20238 return local_id_ref(p, id, NULL);
20239}
20240
20241static int
20242check_forwarding_args(struct parser_params *p)
20243{
20244 if (local_id(p, idFWD_REST) &&
20245#if idFWD_KWREST
20246 local_id(p, idFWD_KWREST) &&
20247#endif
20248 local_id(p, idFWD_BLOCK)) return TRUE;
20249 compile_error(p, "unexpected ...");
20250 return FALSE;
20251}
20252
20253static void
20254add_forwarding_args(struct parser_params *p)
20255{
20256 arg_var(p, idFWD_REST);
20257#if idFWD_KWREST
20258 arg_var(p, idFWD_KWREST);
20259#endif
20260 arg_var(p, idFWD_BLOCK);
20261}
20262
20263#ifndef RIPPER
20264static NODE *
20265new_args_forward_call(struct parser_params *p, NODE *leading, const YYLTYPE *loc, const YYLTYPE *argsloc)
20266{
20267 NODE *splat = NEW_SPLAT(NEW_LVAR(idFWD_REST, loc), loc);
20268#if idFWD_KWREST
20269 NODE *kwrest = list_append(p, NEW_LIST(0, loc), NEW_LVAR(idFWD_KWREST, loc));
20270#endif
20271 NODE *block = NEW_BLOCK_PASS(NEW_LVAR(idFWD_BLOCK, loc), loc);
20272 NODE *args = leading ? rest_arg_append(p, leading, splat, argsloc) : splat;
20273#if idFWD_KWREST
20274 args = arg_append(p, splat, new_hash(p, kwrest, loc), loc);
20275#endif
20276 return arg_blk_pass(args, block);
20277}
20278
20279static NODE *
20280new_args_forward_def(struct parser_params *p, NODE *leading, const YYLTYPE *loc)
20281{
20282 NODE *n = new_args_tail(p, Qnone, idFWD_KWREST, idFWD_BLOCK, loc);
20283 return new_args(p, leading, Qnone, idFWD_REST, Qnone, n, loc);
20284}
20285#endif
20286
20287static NODE *
20288numparam_push(struct parser_params *p)
20289{
20290#ifndef RIPPER
20291 struct local_vars *local = p->lvtbl;
20292 NODE *inner = local->numparam.inner;
20293 if (!local->numparam.outer) {
20294 local->numparam.outer = local->numparam.current;
20295 }
20296 local->numparam.inner = 0;
20297 local->numparam.current = 0;
20298 return inner;
20299#else
20300 return 0;
20301#endif
20302}
20303
20304static void
20305numparam_pop(struct parser_params *p, NODE *prev_inner)
20306{
20307#ifndef RIPPER
20308 struct local_vars *local = p->lvtbl;
20309 if (prev_inner) {
20310 /* prefer first one */
20311 local->numparam.inner = prev_inner;
20312 }
20313 else if (local->numparam.current) {
20314 /* current and inner are exclusive */
20315 local->numparam.inner = local->numparam.current;
20316 }
20317 if (p->max_numparam > NO_PARAM) {
20318 /* current and outer are exclusive */
20319 local->numparam.current = local->numparam.outer;
20320 local->numparam.outer = 0;
20321 }
20322 else {
20323 /* no numbered parameter */
20324 local->numparam.current = 0;
20325 }
20326#endif
20327}
20328
20329static const struct vtable *
20330dyna_push(struct parser_params *p)
20331{
20332 p->lvtbl->args = vtable_alloc(p->lvtbl->args);
20333 p->lvtbl->vars = vtable_alloc(p->lvtbl->vars);
20334 if (p->lvtbl->used) {
20335 p->lvtbl->used = vtable_alloc(p->lvtbl->used);
20336 }
20337 return p->lvtbl->args;
20338}
20339
20340static void
20341dyna_pop_vtable(struct parser_params *p, struct vtable **vtblp)
20342{
20343 struct vtable *tmp = *vtblp;
20344 *vtblp = tmp->prev;
20345# if WARN_PAST_SCOPE
20346 if (p->past_scope_enabled) {
20347 tmp->prev = p->lvtbl->past;
20348 p->lvtbl->past = tmp;
20349 return;
20350 }
20351# endif
20352 vtable_free(tmp);
20353}
20354
20355static void
20356dyna_pop_1(struct parser_params *p)
20357{
20358 struct vtable *tmp;
20359
20360 if ((tmp = p->lvtbl->used) != 0) {
20361 warn_unused_var(p, p->lvtbl);
20362 p->lvtbl->used = p->lvtbl->used->prev;
20363 vtable_free(tmp);
20364 }
20365 dyna_pop_vtable(p, &p->lvtbl->args);
20366 dyna_pop_vtable(p, &p->lvtbl->vars);
20367}
20368
20369static void
20370dyna_pop(struct parser_params *p, const struct vtable *lvargs)
20371{
20372 while (p->lvtbl->args != lvargs) {
20373 dyna_pop_1(p);
20374 if (!p->lvtbl->args) {
20375 struct local_vars *local = p->lvtbl->prev;
20376 ruby_sized_xfree(p->lvtbl, sizeof(*p->lvtbl));
20377 p->lvtbl = local;
20378 }
20379 }
20380 dyna_pop_1(p);
20381}
20382
20383static int
20384dyna_in_block(struct parser_params *p)
20385{
20386 return !DVARS_TERMINAL_P(p->lvtbl->vars) && p->lvtbl->vars->prev != DVARS_TOPSCOPE;
20387}
20388
20389static int
20390dvar_defined_ref(struct parser_params *p, ID id, ID **vidrefp)
20391{
20392 struct vtable *vars, *args, *used;
20393 int i;
20394
20395 args = p->lvtbl->args;
20396 vars = p->lvtbl->vars;
20397 used = p->lvtbl->used;
20398
20399 while (!DVARS_TERMINAL_P(vars)) {
20400 if (vtable_included(args, id)) {
20401 return 1;
20402 }
20403 if ((i = vtable_included(vars, id)) != 0) {
20404 if (used && vidrefp) *vidrefp = &used->tbl[i-1];
20405 return 1;
20406 }
20407 args = args->prev;
20408 vars = vars->prev;
20409 if (!vidrefp) used = 0;
20410 if (used) used = used->prev;
20411 }
20412
20413 if (vars == DVARS_INHERIT && !NUMPARAM_ID_P(id)) {
20414 return rb_dvar_defined(id, p->parent_iseq);
20415 }
20416
20417 return 0;
20418}
20419
20420static int
20421dvar_defined(struct parser_params *p, ID id)
20422{
20423 return dvar_defined_ref(p, id, NULL);
20424}
20425
20426static int
20427dvar_curr(struct parser_params *p, ID id)
20428{
20429 return (vtable_included(p->lvtbl->args, id) ||
20430 vtable_included(p->lvtbl->vars, id));
20431}
20432
20433static void
20434reg_fragment_enc_error(struct parser_params* p, VALUE str, int c)
20435{
20436 compile_error(p,
20437 "regexp encoding option '%c' differs from source encoding '%s'",
20439}
20440
20441#ifndef RIPPER
20442int
20444{
20445 int c = RE_OPTION_ENCODING_IDX(options);
20446
20447 if (c) {
20448 int opt, idx;
20449 rb_char_to_option_kcode(c, &opt, &idx);
20450 if (idx != ENCODING_GET(str) &&
20452 goto error;
20453 }
20454 ENCODING_SET(str, idx);
20455 }
20456 else if (RE_OPTION_ENCODING_NONE(options)) {
20457 if (!ENCODING_IS_ASCII8BIT(str) &&
20459 c = 'n';
20460 goto error;
20461 }
20463 }
20464 else if (p->enc == rb_usascii_encoding()) {
20466 /* raise in re.c */
20468 }
20469 else {
20471 }
20472 }
20473 return 0;
20474
20475 error:
20476 return c;
20477}
20478
20479static void
20480reg_fragment_setenc(struct parser_params* p, VALUE str, int options)
20481{
20482 int c = rb_reg_fragment_setenc(p, str, options);
20483 if (c) reg_fragment_enc_error(p, str, c);
20484}
20485
20486static int
20487reg_fragment_check(struct parser_params* p, VALUE str, int options)
20488{
20489 VALUE err;
20490 reg_fragment_setenc(p, str, options);
20492 if (err != Qnil) {
20494 compile_error(p, "%"PRIsVALUE, err);
20495 return 0;
20496 }
20497 return 1;
20498}
20499
20500typedef struct {
20504 const YYLTYPE *loc;
20506
20507static int
20508reg_named_capture_assign_iter(const OnigUChar *name, const OnigUChar *name_end,
20509 int back_num, int *back_refs, OnigRegex regex, void *arg0)
20510{
20512 struct parser_params* p = arg->parser;
20513 rb_encoding *enc = arg->enc;
20514 long len = name_end - name;
20515 const char *s = (const char *)name;
20516 ID var;
20517 NODE *node, *succ;
20518
20519 if (!len) return ST_CONTINUE;
20520 if (rb_enc_symname_type(s, len, enc, (1U<<ID_LOCAL)) != ID_LOCAL)
20521 return ST_CONTINUE;
20522
20523 var = intern_cstr(s, len, enc);
20524 if (len < MAX_WORD_LENGTH && rb_reserved_word(s, (int)len)) {
20525 if (!lvar_defined(p, var)) return ST_CONTINUE;
20526 }
20527 node = node_assign(p, assignable(p, var, 0, arg->loc), NEW_LIT(ID2SYM(var), arg->loc), NO_LEX_CTXT, arg->loc);
20528 succ = arg->succ_block;
20529 if (!succ) succ = NEW_BEGIN(0, arg->loc);
20530 succ = block_append(p, succ, node);
20531 arg->succ_block = succ;
20532 return ST_CONTINUE;
20533}
20534
20535static NODE *
20536reg_named_capture_assign(struct parser_params* p, VALUE regexp, const YYLTYPE *loc)
20537{
20539
20540 arg.parser = p;
20541 arg.enc = rb_enc_get(regexp);
20542 arg.succ_block = 0;
20543 arg.loc = loc;
20544 onig_foreach_name(RREGEXP_PTR(regexp), reg_named_capture_assign_iter, &arg);
20545
20546 if (!arg.succ_block) return 0;
20547 return arg.succ_block->nd_next;
20548}
20549
20550static VALUE
20551parser_reg_compile(struct parser_params* p, VALUE str, int options)
20552{
20553 reg_fragment_setenc(p, str, options);
20554 return rb_parser_reg_compile(p, str, options);
20555}
20556
20557VALUE
20559{
20561}
20562
20563static VALUE
20564reg_compile(struct parser_params* p, VALUE str, int options)
20565{
20566 VALUE re;
20567 VALUE err;
20568
20569 err = rb_errinfo();
20570 re = parser_reg_compile(p, str, options);
20571 if (NIL_P(re)) {
20572 VALUE m = rb_attr_get(rb_errinfo(), idMesg);
20574 compile_error(p, "%"PRIsVALUE, m);
20575 return Qnil;
20576 }
20577 return re;
20578}
20579#else
20580static VALUE
20581parser_reg_compile(struct parser_params* p, VALUE str, int options, VALUE *errmsg)
20582{
20583 VALUE err = rb_errinfo();
20584 VALUE re;
20585 str = ripper_is_node_yylval(str) ? RNODE(str)->nd_cval : str;
20586 int c = rb_reg_fragment_setenc(p, str, options);
20587 if (c) reg_fragment_enc_error(p, str, c);
20588 re = rb_parser_reg_compile(p, str, options);
20589 if (NIL_P(re)) {
20590 *errmsg = rb_attr_get(rb_errinfo(), idMesg);
20592 }
20593 return re;
20594}
20595#endif
20596
20597#ifndef RIPPER
20598void
20599rb_parser_set_options(VALUE vparser, int print, int loop, int chomp, int split)
20600{
20601 struct parser_params *p;
20602 TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, p);
20603 p->do_print = print;
20604 p->do_loop = loop;
20605 p->do_chomp = chomp;
20606 p->do_split = split;
20607}
20608
20609static NODE *
20610parser_append_options(struct parser_params *p, NODE *node)
20611{
20612 static const YYLTYPE default_location = {{1, 0}, {1, 0}};
20613 const YYLTYPE *const LOC = &default_location;
20614
20615 if (p->do_print) {
20616 NODE *print = NEW_FCALL(rb_intern("print"),
20617 NEW_LIST(NEW_GVAR(idLASTLINE, LOC), LOC),
20618 LOC);
20619 node = block_append(p, node, print);
20620 }
20621
20622 if (p->do_loop) {
20623 if (p->do_split) {
20624 ID ifs = rb_intern("$;");
20625 ID fields = rb_intern("$F");
20626 NODE *args = NEW_LIST(NEW_GVAR(ifs, LOC), LOC);
20627 NODE *split = NEW_GASGN(fields,
20628 NEW_CALL(NEW_GVAR(idLASTLINE, LOC),
20629 rb_intern("split"), args, LOC),
20630 LOC);
20631 node = block_append(p, split, node);
20632 }
20633 if (p->do_chomp) {
20634 NODE *chomp = NEW_CALL(NEW_GVAR(idLASTLINE, LOC),
20635 rb_intern("chomp!"), 0, LOC);
20636 node = block_append(p, chomp, node);
20637 }
20638
20639 node = NEW_WHILE(NEW_VCALL(idGets, LOC), node, 1, LOC);
20640 }
20641
20642 return node;
20643}
20644
20645void
20647{
20648 /* just to suppress unused-function warnings */
20649 (void)nodetype;
20650 (void)nodeline;
20651}
20652
20653static ID
20654internal_id(struct parser_params *p)
20655{
20656 const ID max_id = RB_ID_SERIAL_MAX & ~0xffff;
20657 ID id = (ID)vtable_size(p->lvtbl->args) + (ID)vtable_size(p->lvtbl->vars);
20658 id = max_id - id;
20659 return ID_STATIC_SYM | ID_INTERNAL | (id << ID_SCOPE_SHIFT);
20660}
20661#endif /* !RIPPER */
20662
20663static void
20664parser_initialize(struct parser_params *p)
20665{
20666 /* note: we rely on TypedData_Make_Struct to set most fields to 0 */
20667 p->command_start = TRUE;
20669 p->lex.lpar_beg = -1; /* make lambda_beginning_p() == FALSE at first */
20670 p->node_id = 0;
20671#ifdef RIPPER
20672 p->delayed.token = Qnil;
20673 p->result = Qnil;
20674 p->parsing_thread = Qnil;
20675#else
20676 p->error_buffer = Qfalse;
20677#endif
20678 p->debug_buffer = Qnil;
20680 p->enc = rb_utf8_encoding();
20681}
20682
20683#ifdef RIPPER
20684#define parser_mark ripper_parser_mark
20685#define parser_free ripper_parser_free
20686#endif
20687
20688static void
20689parser_mark(void *ptr)
20690{
20691 struct parser_params *p = (struct parser_params*)ptr;
20692
20693 rb_gc_mark(p->lex.input);
20699 rb_gc_mark((VALUE)p->ast);
20701#ifndef RIPPER
20705#else
20706 rb_gc_mark(p->delayed.token);
20707 rb_gc_mark(p->value);
20708 rb_gc_mark(p->result);
20709 rb_gc_mark(p->parsing_thread);
20710#endif
20713#ifdef YYMALLOC
20714 rb_gc_mark((VALUE)p->heap);
20715#endif
20716}
20717
20718static void
20719parser_free(void *ptr)
20720{
20721 struct parser_params *p = (struct parser_params*)ptr;
20722 struct local_vars *local, *prev;
20723
20724 if (p->tokenbuf) {
20726 }
20727 for (local = p->lvtbl; local; local = prev) {
20728 if (local->vars) xfree(local->vars);
20729 prev = local->prev;
20730 xfree(local);
20731 }
20732 {
20733 token_info *ptinfo;
20734 while ((ptinfo = p->token_info) != 0) {
20735 p->token_info = ptinfo->next;
20736 xfree(ptinfo);
20737 }
20738 }
20739 xfree(ptr);
20740}
20741
20742static size_t
20743parser_memsize(const void *ptr)
20744{
20745 struct parser_params *p = (struct parser_params*)ptr;
20746 struct local_vars *local;
20747 size_t size = sizeof(*p);
20748
20749 size += p->toksiz;
20750 for (local = p->lvtbl; local; local = local->prev) {
20751 size += sizeof(*local);
20752 if (local->vars) size += local->vars->capa * sizeof(ID);
20753 }
20754 return size;
20755}
20756
20757static const rb_data_type_t parser_data_type = {
20758#ifndef RIPPER
20759 "parser",
20760#else
20761 "ripper",
20762#endif
20763 {
20764 parser_mark,
20765 parser_free,
20766 parser_memsize,
20767 },
20769};
20770
20771#ifndef RIPPER
20772#undef rb_reserved_word
20773
20774const struct kwtable *
20775rb_reserved_word(const char *str, unsigned int len)
20776{
20777 return reserved_word(str, len);
20778}
20779
20780VALUE
20782{
20783 struct parser_params *p;
20784 VALUE parser = TypedData_Make_Struct(0, struct parser_params,
20785 &parser_data_type, p);
20786 parser_initialize(p);
20787 return parser;
20788}
20789
20790VALUE
20791rb_parser_set_context(VALUE vparser, const struct rb_iseq_struct *base, int main)
20792{
20793 struct parser_params *p;
20794
20795 TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, p);
20796 p->error_buffer = main ? Qfalse : Qnil;
20797 p->parent_iseq = base;
20798 return vparser;
20799}
20800#endif
20801
20802#ifdef RIPPER
20803#define rb_parser_end_seen_p ripper_parser_end_seen_p
20804#define rb_parser_encoding ripper_parser_encoding
20805#define rb_parser_get_yydebug ripper_parser_get_yydebug
20806#define rb_parser_set_yydebug ripper_parser_set_yydebug
20807#define rb_parser_get_debug_output ripper_parser_get_debug_output
20808#define rb_parser_set_debug_output ripper_parser_set_debug_output
20809static VALUE ripper_parser_end_seen_p(VALUE vparser);
20810static VALUE ripper_parser_encoding(VALUE vparser);
20811static VALUE ripper_parser_get_yydebug(VALUE self);
20812static VALUE ripper_parser_set_yydebug(VALUE self, VALUE flag);
20813static VALUE ripper_parser_get_debug_output(VALUE self);
20814static VALUE ripper_parser_set_debug_output(VALUE self, VALUE output);
20815
20816/*
20817 * call-seq:
20818 * ripper.error? -> Boolean
20819 *
20820 * Return true if parsed source has errors.
20821 */
20822static VALUE
20823ripper_error_p(VALUE vparser)
20824{
20825 struct parser_params *p;
20826
20827 TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, p);
20828 return p->error_p ? Qtrue : Qfalse;
20829}
20830#endif
20831
20832/*
20833 * call-seq:
20834 * ripper.end_seen? -> Boolean
20835 *
20836 * Return true if parsed source ended by +\_\_END\_\_+.
20837 */
20838VALUE
20840{
20841 struct parser_params *p;
20842
20843 TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, p);
20844 return p->ruby__end__seen ? Qtrue : Qfalse;
20845}
20846
20847/*
20848 * call-seq:
20849 * ripper.encoding -> encoding
20850 *
20851 * Return encoding of the source.
20852 */
20853VALUE
20855{
20856 struct parser_params *p;
20857
20858 TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, p);
20859 return rb_enc_from_encoding(p->enc);
20860}
20861
20862#ifdef RIPPER
20863/*
20864 * call-seq:
20865 * ripper.yydebug -> true or false
20866 *
20867 * Get yydebug.
20868 */
20869VALUE
20870rb_parser_get_yydebug(VALUE self)
20871{
20872 struct parser_params *p;
20873
20874 TypedData_Get_Struct(self, struct parser_params, &parser_data_type, p);
20875 return p->debug ? Qtrue : Qfalse;
20876}
20877#endif
20878
20879/*
20880 * call-seq:
20881 * ripper.yydebug = flag
20882 *
20883 * Set yydebug.
20884 */
20885VALUE
20887{
20888 struct parser_params *p;
20889
20890 TypedData_Get_Struct(self, struct parser_params, &parser_data_type, p);
20891 p->debug = RTEST(flag);
20892 return flag;
20893}
20894
20895/*
20896 * call-seq:
20897 * ripper.debug_output -> obj
20898 *
20899 * Get debug output.
20900 */
20901VALUE
20903{
20904 struct parser_params *p;
20905
20906 TypedData_Get_Struct(self, struct parser_params, &parser_data_type, p);
20907 return p->debug_output;
20908}
20909
20910/*
20911 * call-seq:
20912 * ripper.debug_output = obj
20913 *
20914 * Set debug output.
20915 */
20916VALUE
20918{
20919 struct parser_params *p;
20920
20921 TypedData_Get_Struct(self, struct parser_params, &parser_data_type, p);
20922 return p->debug_output = output;
20923}
20924
20925#ifndef RIPPER
20926#ifdef YYMALLOC
20927#define HEAPCNT(n, size) ((n) * (size) / sizeof(YYSTYPE))
20928/* Keep the order; NEWHEAP then xmalloc and ADD2HEAP to get rid of
20929 * potential memory leak */
20930#define NEWHEAP() rb_imemo_tmpbuf_parser_heap(0, p->heap, 0)
20931#define ADD2HEAP(new, cnt, ptr) ((p->heap = (new))->ptr = (ptr), \
20932 (new)->cnt = (cnt), (ptr))
20933
20934void *
20936{
20937 size_t cnt = HEAPCNT(1, size);
20939 void *ptr = xmalloc(size);
20940
20941 return ADD2HEAP(n, cnt, ptr);
20942}
20943
20944void *
20945rb_parser_calloc(struct parser_params *p, size_t nelem, size_t size)
20946{
20947 size_t cnt = HEAPCNT(nelem, size);
20949 void *ptr = xcalloc(nelem, size);
20950
20951 return ADD2HEAP(n, cnt, ptr);
20952}
20953
20954void *
20955rb_parser_realloc(struct parser_params *p, void *ptr, size_t size)
20956{
20958 size_t cnt = HEAPCNT(1, size);
20959
20960 if (ptr && (n = p->heap) != NULL) {
20961 do {
20962 if (n->ptr == ptr) {
20963 n->ptr = ptr = xrealloc(ptr, size);
20964 if (n->cnt) n->cnt = cnt;
20965 return ptr;
20966 }
20967 } while ((n = n->next) != NULL);
20968 }
20969 n = NEWHEAP();
20970 ptr = xrealloc(ptr, size);
20971 return ADD2HEAP(n, cnt, ptr);
20972}
20973
20974void
20976{
20977 rb_imemo_tmpbuf_t **prev = &p->heap, *n;
20978
20979 while ((n = *prev) != NULL) {
20980 if (n->ptr == ptr) {
20981 *prev = n->next;
20983 break;
20984 }
20985 prev = &n->next;
20986 }
20987 xfree(ptr);
20988}
20989#endif
20990
20991void
20992rb_parser_printf(struct parser_params *p, const char *fmt, ...)
20993{
20994 va_list ap;
20995 VALUE mesg = p->debug_buffer;
20996
20997 if (NIL_P(mesg)) p->debug_buffer = mesg = rb_str_new(0, 0);
20998 va_start(ap, fmt);
20999 rb_str_vcatf(mesg, fmt, ap);
21000 va_end(ap);
21001 if (RSTRING_END(mesg)[-1] == '\n') {
21002 rb_io_write(p->debug_output, mesg);
21003 p->debug_buffer = Qnil;
21004 }
21005}
21006
21007static void
21008parser_compile_error(struct parser_params *p, const char *fmt, ...)
21009{
21010 va_list ap;
21011
21013 p->error_p = 1;
21014 va_start(ap, fmt);
21015 p->error_buffer =
21018 p->ruby_sourceline,
21019 rb_long2int(p->lex.pcur - p->lex.pbeg),
21020 p->enc, fmt, ap);
21021 va_end(ap);
21022}
21023
21024static size_t
21025count_char(const char *str, int c)
21026{
21027 int n = 0;
21028 while (str[n] == c) ++n;
21029 return n;
21030}
21031
21032/*
21033 * strip enclosing double-quotes, same as the default yytnamerr except
21034 * for that single-quotes matching back-quotes do not stop stripping.
21035 *
21036 * "\"`class' keyword\"" => "`class' keyword"
21037 */
21038RUBY_FUNC_EXPORTED size_t
21039rb_yytnamerr(struct parser_params *p, char *yyres, const char *yystr)
21040{
21041 if (*yystr == '"') {
21042 size_t yyn = 0, bquote = 0;
21043 const char *yyp = yystr;
21044
21045 while (*++yyp) {
21046 switch (*yyp) {
21047 case '`':
21048 if (!bquote) {
21049 bquote = count_char(yyp+1, '`') + 1;
21050 if (yyres) memcpy(&yyres[yyn], yyp, bquote);
21051 yyn += bquote;
21052 yyp += bquote - 1;
21053 break;
21054 }
21055 goto default_char;
21056
21057 case '\'':
21058 if (bquote && count_char(yyp+1, '\'') + 1 == bquote) {
21059 if (yyres) memcpy(yyres + yyn, yyp, bquote);
21060 yyn += bquote;
21061 yyp += bquote - 1;
21062 bquote = 0;
21063 break;
21064 }
21065 if (yyp[1] && yyp[1] != '\'' && yyp[2] == '\'') {
21066 if (yyres) memcpy(yyres + yyn, yyp, 3);
21067 yyn += 3;
21068 yyp += 2;
21069 break;
21070 }
21071 goto do_not_strip_quotes;
21072
21073 case ',':
21074 goto do_not_strip_quotes;
21075
21076 case '\\':
21077 if (*++yyp != '\\')
21078 goto do_not_strip_quotes;
21079 /* Fall through. */
21080 default_char:
21081 default:
21082 if (yyres)
21083 yyres[yyn] = *yyp;
21084 yyn++;
21085 break;
21086
21087 case '"':
21088 case '\0':
21089 if (yyres)
21090 yyres[yyn] = '\0';
21091 return yyn;
21092 }
21093 }
21094 do_not_strip_quotes: ;
21095 }
21096
21097 if (!yyres) return strlen(yystr);
21098
21099 return (YYSIZE_T)(yystpcpy(yyres, yystr) - yyres);
21100}
21101#endif
21102
21103#ifdef RIPPER
21104#ifdef RIPPER_DEBUG
21105/* :nodoc: */
21106static VALUE
21107ripper_validate_object(VALUE self, VALUE x)
21108{
21109 if (x == Qfalse) return x;
21110 if (x == Qtrue) return x;
21111 if (x == Qnil) return x;
21112 if (x == Qundef)
21113 rb_raise(rb_eArgError, "Qundef given");
21114 if (FIXNUM_P(x)) return x;
21115 if (SYMBOL_P(x)) return x;
21116 switch (BUILTIN_TYPE(x)) {
21117 case T_STRING:
21118 case T_OBJECT:
21119 case T_ARRAY:
21120 case T_BIGNUM:
21121 case T_FLOAT:
21122 case T_COMPLEX:
21123 case T_RATIONAL:
21124 break;
21125 case T_NODE:
21126 if (nd_type((NODE *)x) != NODE_RIPPER) {
21127 rb_raise(rb_eArgError, "NODE given: %p", (void *)x);
21128 }
21129 x = ((NODE *)x)->nd_rval;
21130 break;
21131 default:
21132 rb_raise(rb_eArgError, "wrong type of ruby object: %p (%s)",
21133 (void *)x, rb_obj_classname(x));
21134 }
21135 if (!RBASIC_CLASS(x)) {
21136 rb_raise(rb_eArgError, "hidden ruby object: %p (%s)",
21137 (void *)x, rb_builtin_type_name(TYPE(x)));
21138 }
21139 return x;
21140}
21141#endif
21142
21143#define validate(x) ((x) = get_value(x))
21144
21145static VALUE
21146ripper_dispatch0(struct parser_params *p, ID mid)
21147{
21148 return rb_funcall(p->value, mid, 0);
21149}
21150
21151static VALUE
21152ripper_dispatch1(struct parser_params *p, ID mid, VALUE a)
21153{
21154 validate(a);
21155 return rb_funcall(p->value, mid, 1, a);
21156}
21157
21158static VALUE
21159ripper_dispatch2(struct parser_params *p, ID mid, VALUE a, VALUE b)
21160{
21161 validate(a);
21162 validate(b);
21163 return rb_funcall(p->value, mid, 2, a, b);
21164}
21165
21166static VALUE
21167ripper_dispatch3(struct parser_params *p, ID mid, VALUE a, VALUE b, VALUE c)
21168{
21169 validate(a);
21170 validate(b);
21171 validate(c);
21172 return rb_funcall(p->value, mid, 3, a, b, c);
21173}
21174
21175static VALUE
21176ripper_dispatch4(struct parser_params *p, ID mid, VALUE a, VALUE b, VALUE c, VALUE d)
21177{
21178 validate(a);
21179 validate(b);
21180 validate(c);
21181 validate(d);
21182 return rb_funcall(p->value, mid, 4, a, b, c, d);
21183}
21184
21185static VALUE
21186ripper_dispatch5(struct parser_params *p, ID mid, VALUE a, VALUE b, VALUE c, VALUE d, VALUE e)
21187{
21188 validate(a);
21189 validate(b);
21190 validate(c);
21191 validate(d);
21192 validate(e);
21193 return rb_funcall(p->value, mid, 5, a, b, c, d, e);
21194}
21195
21196static VALUE
21197ripper_dispatch7(struct parser_params *p, ID mid, VALUE a, VALUE b, VALUE c, VALUE d, VALUE e, VALUE f, VALUE g)
21198{
21199 validate(a);
21200 validate(b);
21201 validate(c);
21202 validate(d);
21203 validate(e);
21204 validate(f);
21205 validate(g);
21206 return rb_funcall(p->value, mid, 7, a, b, c, d, e, f, g);
21207}
21208
21209static ID
21210ripper_get_id(VALUE v)
21211{
21212 NODE *nd;
21213 if (!RB_TYPE_P(v, T_NODE)) return 0;
21214 nd = (NODE *)v;
21215 if (nd_type(nd) != NODE_RIPPER) return 0;
21216 return nd->nd_vid;
21217}
21218
21219static VALUE
21220ripper_get_value(VALUE v)
21221{
21222 NODE *nd;
21223 if (v == Qundef) return Qnil;
21224 if (!RB_TYPE_P(v, T_NODE)) return v;
21225 nd = (NODE *)v;
21226 if (nd_type(nd) != NODE_RIPPER) return Qnil;
21227 return nd->nd_rval;
21228}
21229
21230static void
21231ripper_error(struct parser_params *p)
21232{
21233 p->error_p = TRUE;
21234}
21235
21236static void
21237ripper_compile_error(struct parser_params *p, const char *fmt, ...)
21238{
21239 VALUE str;
21240 va_list args;
21241
21242 va_start(args, fmt);
21243 str = rb_vsprintf(fmt, args);
21244 va_end(args);
21245 rb_funcall(p->value, rb_intern("compile_error"), 1, str);
21246 ripper_error(p);
21247}
21248
21249static VALUE
21250ripper_lex_get_generic(struct parser_params *p, VALUE src)
21251{
21252 VALUE line = rb_funcallv_public(src, id_gets, 0, 0);
21253 if (!NIL_P(line) && !RB_TYPE_P(line, T_STRING)) {
21255 "gets returned %"PRIsVALUE" (expected String or nil)",
21256 rb_obj_class(line));
21257 }
21258 return line;
21259}
21260
21261static VALUE
21262ripper_lex_io_get(struct parser_params *p, VALUE src)
21263{
21264 return rb_io_gets(src);
21265}
21266
21267static VALUE
21268ripper_s_allocate(VALUE klass)
21269{
21270 struct parser_params *p;
21271 VALUE self = TypedData_Make_Struct(klass, struct parser_params,
21272 &parser_data_type, p);
21273 p->value = self;
21274 return self;
21275}
21276
21277#define ripper_initialized_p(r) ((r)->lex.input != 0)
21278
21279/*
21280 * call-seq:
21281 * Ripper.new(src, filename="(ripper)", lineno=1) -> ripper
21282 *
21283 * Create a new Ripper object.
21284 * _src_ must be a String, an IO, or an Object which has #gets method.
21285 *
21286 * This method does not starts parsing.
21287 * See also Ripper#parse and Ripper.parse.
21288 */
21289static VALUE
21290ripper_initialize(int argc, VALUE *argv, VALUE self)
21291{
21292 struct parser_params *p;
21293 VALUE src, fname, lineno;
21294
21295 TypedData_Get_Struct(self, struct parser_params, &parser_data_type, p);
21296 rb_scan_args(argc, argv, "12", &src, &fname, &lineno);
21297 if (RB_TYPE_P(src, T_FILE)) {
21298 p->lex.gets = ripper_lex_io_get;
21299 }
21300 else if (rb_respond_to(src, id_gets)) {
21301 p->lex.gets = ripper_lex_get_generic;
21302 }
21303 else {
21304 StringValue(src);
21305 p->lex.gets = lex_get_str;
21306 }
21307 p->lex.input = src;
21308 p->eofp = 0;
21309 if (NIL_P(fname)) {
21310 fname = STR_NEW2("(ripper)");
21311 OBJ_FREEZE(fname);
21312 }
21313 else {
21314 StringValueCStr(fname);
21315 fname = rb_str_new_frozen(fname);
21316 }
21317 parser_initialize(p);
21318
21319 p->ruby_sourcefile_string = fname;
21320 p->ruby_sourcefile = RSTRING_PTR(fname);
21321 p->ruby_sourceline = NIL_P(lineno) ? 0 : NUM2INT(lineno) - 1;
21322
21323 return Qnil;
21324}
21325
21326static VALUE
21327ripper_parse0(VALUE parser_v)
21328{
21329 struct parser_params *p;
21330
21331 TypedData_Get_Struct(parser_v, struct parser_params, &parser_data_type, p);
21332 parser_prepare(p);
21333 p->ast = rb_ast_new();
21334 ripper_yyparse((void*)p);
21335 rb_ast_dispose(p->ast);
21336 p->ast = 0;
21337 return p->result;
21338}
21339
21340static VALUE
21341ripper_ensure(VALUE parser_v)
21342{
21343 struct parser_params *p;
21344
21345 TypedData_Get_Struct(parser_v, struct parser_params, &parser_data_type, p);
21346 p->parsing_thread = Qnil;
21347 return Qnil;
21348}
21349
21350/*
21351 * call-seq:
21352 * ripper.parse
21353 *
21354 * Start parsing and returns the value of the root action.
21355 */
21356static VALUE
21357ripper_parse(VALUE self)
21358{
21359 struct parser_params *p;
21360
21361 TypedData_Get_Struct(self, struct parser_params, &parser_data_type, p);
21362 if (!ripper_initialized_p(p)) {
21363 rb_raise(rb_eArgError, "method called for uninitialized object");
21364 }
21365 if (!NIL_P(p->parsing_thread)) {
21366 if (p->parsing_thread == rb_thread_current())
21367 rb_raise(rb_eArgError, "Ripper#parse is not reentrant");
21368 else
21369 rb_raise(rb_eArgError, "Ripper#parse is not multithread-safe");
21370 }
21371 p->parsing_thread = rb_thread_current();
21372 rb_ensure(ripper_parse0, self, ripper_ensure, self);
21373
21374 return p->result;
21375}
21376
21377/*
21378 * call-seq:
21379 * ripper.column -> Integer
21380 *
21381 * Return column number of current parsing line.
21382 * This number starts from 0.
21383 */
21384static VALUE
21385ripper_column(VALUE self)
21386{
21387 struct parser_params *p;
21388 long col;
21389
21390 TypedData_Get_Struct(self, struct parser_params, &parser_data_type, p);
21391 if (!ripper_initialized_p(p)) {
21392 rb_raise(rb_eArgError, "method called for uninitialized object");
21393 }
21394 if (NIL_P(p->parsing_thread)) return Qnil;
21395 col = p->lex.ptok - p->lex.pbeg;
21396 return LONG2NUM(col);
21397}
21398
21399/*
21400 * call-seq:
21401 * ripper.filename -> String
21402 *
21403 * Return current parsing filename.
21404 */
21405static VALUE
21406ripper_filename(VALUE self)
21407{
21408 struct parser_params *p;
21409
21410 TypedData_Get_Struct(self, struct parser_params, &parser_data_type, p);
21411 if (!ripper_initialized_p(p)) {
21412 rb_raise(rb_eArgError, "method called for uninitialized object");
21413 }
21414 return p->ruby_sourcefile_string;
21415}
21416
21417/*
21418 * call-seq:
21419 * ripper.lineno -> Integer
21420 *
21421 * Return line number of current parsing line.
21422 * This number starts from 1.
21423 */
21424static VALUE
21425ripper_lineno(VALUE self)
21426{
21427 struct parser_params *p;
21428
21429 TypedData_Get_Struct(self, struct parser_params, &parser_data_type, p);
21430 if (!ripper_initialized_p(p)) {
21431 rb_raise(rb_eArgError, "method called for uninitialized object");
21432 }
21433 if (NIL_P(p->parsing_thread)) return Qnil;
21434 return INT2NUM(p->ruby_sourceline);
21435}
21436
21437/*
21438 * call-seq:
21439 * ripper.state -> Integer
21440 *
21441 * Return scanner state of current token.
21442 */
21443static VALUE
21444ripper_state(VALUE self)
21445{
21446 struct parser_params *p;
21447
21448 TypedData_Get_Struct(self, struct parser_params, &parser_data_type, p);
21449 if (!ripper_initialized_p(p)) {
21450 rb_raise(rb_eArgError, "method called for uninitialized object");
21451 }
21452 if (NIL_P(p->parsing_thread)) return Qnil;
21453 return INT2NUM(p->lex.state);
21454}
21455
21456/*
21457 * call-seq:
21458 * ripper.token -> String
21459 *
21460 * Return the current token string.
21461 */
21462static VALUE
21463ripper_token(VALUE self)
21464{
21465 struct parser_params *p;
21466 long pos, len;
21467
21468 TypedData_Get_Struct(self, struct parser_params, &parser_data_type, p);
21469 if (!ripper_initialized_p(p)) {
21470 rb_raise(rb_eArgError, "method called for uninitialized object");
21471 }
21472 if (NIL_P(p->parsing_thread)) return Qnil;
21473 pos = p->lex.ptok - p->lex.pbeg;
21474 len = p->lex.pcur - p->lex.ptok;
21475 return rb_str_subseq(p->lex.lastline, pos, len);
21476}
21477
21478#ifdef RIPPER_DEBUG
21479/* :nodoc: */
21480static VALUE
21481ripper_assert_Qundef(VALUE self, VALUE obj, VALUE msg)
21482{
21483 StringValue(msg);
21484 if (obj == Qundef) {
21486 }
21487 return Qnil;
21488}
21489
21490/* :nodoc: */
21491static VALUE
21492ripper_value(VALUE self, VALUE obj)
21493{
21494 return ULONG2NUM(obj);
21495}
21496#endif
21497
21498/*
21499 * call-seq:
21500 * Ripper.lex_state_name(integer) -> string
21501 *
21502 * Returns a string representation of lex_state.
21503 */
21504static VALUE
21505ripper_lex_state_name(VALUE self, VALUE state)
21506{
21508}
21509
21510void
21511Init_ripper(void)
21512{
21513 ripper_init_eventids1();
21514 ripper_init_eventids2();
21515 id_warn = rb_intern_const("warn");
21516 id_warning = rb_intern_const("warning");
21517 id_gets = rb_intern_const("gets");
21518 id_assoc = rb_intern_const("=>");
21519
21520 (void)yystpcpy; /* may not used in newer bison */
21521
21522 InitVM(ripper);
21523}
21524
21525void
21526InitVM_ripper(void)
21527{
21528 VALUE Ripper;
21529
21530 Ripper = rb_define_class("Ripper", rb_cObject);
21531 /* version of Ripper */
21532 rb_define_const(Ripper, "Version", rb_usascii_str_new2(RIPPER_VERSION));
21533 rb_define_alloc_func(Ripper, ripper_s_allocate);
21534 rb_define_method(Ripper, "initialize", ripper_initialize, -1);
21535 rb_define_method(Ripper, "parse", ripper_parse, 0);
21536 rb_define_method(Ripper, "column", ripper_column, 0);
21537 rb_define_method(Ripper, "filename", ripper_filename, 0);
21538 rb_define_method(Ripper, "lineno", ripper_lineno, 0);
21539 rb_define_method(Ripper, "state", ripper_state, 0);
21540 rb_define_method(Ripper, "token", ripper_token, 0);
21541 rb_define_method(Ripper, "end_seen?", rb_parser_end_seen_p, 0);
21542 rb_define_method(Ripper, "encoding", rb_parser_encoding, 0);
21543 rb_define_method(Ripper, "yydebug", rb_parser_get_yydebug, 0);
21544 rb_define_method(Ripper, "yydebug=", rb_parser_set_yydebug, 1);
21545 rb_define_method(Ripper, "debug_output", rb_parser_get_debug_output, 0);
21546 rb_define_method(Ripper, "debug_output=", rb_parser_set_debug_output, 1);
21547 rb_define_method(Ripper, "error?", ripper_error_p, 0);
21548#ifdef RIPPER_DEBUG
21549 rb_define_method(Ripper, "assert_Qundef", ripper_assert_Qundef, 2);
21550 rb_define_method(Ripper, "rawVALUE", ripper_value, 1);
21551 rb_define_method(Ripper, "validate_object", ripper_validate_object, 1);
21552#endif
21553
21554 rb_define_singleton_method(Ripper, "dedent_string", parser_dedent_string, 2);
21555 rb_define_private_method(Ripper, "dedent_string", parser_dedent_string, 2);
21556
21557 rb_define_singleton_method(Ripper, "lex_state_name", ripper_lex_state_name, 1);
21558
21559 /* ignore newline, +/- is a sign. */
21560 rb_define_const(Ripper, "EXPR_BEG", INT2NUM(EXPR_BEG));
21561 /* newline significant, +/- is an operator. */
21562 rb_define_const(Ripper, "EXPR_END", INT2NUM(EXPR_END));
21563 /* ditto, and unbound braces. */
21564 rb_define_const(Ripper, "EXPR_ENDARG", INT2NUM(EXPR_ENDARG));
21565 /* ditto, and unbound braces. */
21566 rb_define_const(Ripper, "EXPR_ENDFN", INT2NUM(EXPR_ENDFN));
21567 /* newline significant, +/- is an operator. */
21568 rb_define_const(Ripper, "EXPR_ARG", INT2NUM(EXPR_ARG));
21569 /* newline significant, +/- is an operator. */
21570 rb_define_const(Ripper, "EXPR_CMDARG", INT2NUM(EXPR_CMDARG));
21571 /* newline significant, +/- is an operator. */
21572 rb_define_const(Ripper, "EXPR_MID", INT2NUM(EXPR_MID));
21573 /* ignore newline, no reserved words. */
21574 rb_define_const(Ripper, "EXPR_FNAME", INT2NUM(EXPR_FNAME));
21575 /* right after `.' or `::', no reserved words. */
21576 rb_define_const(Ripper, "EXPR_DOT", INT2NUM(EXPR_DOT));
21577 /* immediate after `class', no here document. */
21578 rb_define_const(Ripper, "EXPR_CLASS", INT2NUM(EXPR_CLASS));
21579 /* flag bit, label is allowed. */
21580 rb_define_const(Ripper, "EXPR_LABEL", INT2NUM(EXPR_LABEL));
21581 /* flag bit, just after a label. */
21582 rb_define_const(Ripper, "EXPR_LABELED", INT2NUM(EXPR_LABELED));
21583 /* symbol literal as FNAME. */
21584 rb_define_const(Ripper, "EXPR_FITEM", INT2NUM(EXPR_FITEM));
21585 /* equals to +EXPR_BEG+ */
21586 rb_define_const(Ripper, "EXPR_VALUE", INT2NUM(EXPR_VALUE));
21587 /* equals to <tt>(EXPR_BEG | EXPR_MID | EXPR_CLASS)</tt> */
21588 rb_define_const(Ripper, "EXPR_BEG_ANY", INT2NUM(EXPR_BEG_ANY));
21589 /* equals to <tt>(EXPR_ARG | EXPR_CMDARG)</tt> */
21590 rb_define_const(Ripper, "EXPR_ARG_ANY", INT2NUM(EXPR_ARG_ANY));
21591 /* equals to <tt>(EXPR_END | EXPR_ENDARG | EXPR_ENDFN)</tt> */
21592 rb_define_const(Ripper, "EXPR_END_ANY", INT2NUM(EXPR_END_ANY));
21593 /* equals to +0+ */
21594 rb_define_const(Ripper, "EXPR_NONE", INT2NUM(EXPR_NONE));
21595
21596 ripper_init_eventids1_table(Ripper);
21597 ripper_init_eventids2_table(Ripper);
21598
21599# if 0
21600 /* Hack to let RDoc document SCRIPT_LINES__ */
21601
21602 /*
21603 * When a Hash is assigned to +SCRIPT_LINES__+ the contents of files loaded
21604 * after the assignment will be added as an Array of lines with the file
21605 * name as the key.
21606 */
21607 rb_define_global_const("SCRIPT_LINES__", Qnil);
21608#endif
21609
21610}
21611#endif /* RIPPER */
21612
21613/*
21614 * Local variables:
21615 * mode: c
21616 * c-file-style: "ruby"
21617 * End:
21618 */
VALUE rb_ary_reverse(VALUE ary)
Definition: array.c:2998
VALUE rb_ary_push(VALUE ary, VALUE item)
Definition: array.c:1301
VALUE rb_ary_unshift(VALUE ary, VALUE item)
Definition: array.c:1654
VALUE rb_ary_new(void)
Definition: array.c:749
VALUE rb_ary_concat(VALUE x, VALUE y)
Definition: array.c:4859
VALUE rb_ary_clear(VALUE ary)
Definition: array.c:4534
VALUE rb_assoc_new(VALUE car, VALUE cdr)
Definition: array.c:975
VALUE rb_ary_join(VALUE ary, VALUE sep)
Definition: array.c:2780
#define END(name)
Definition: asm.h:115
#define PRINTF_ARGS(decl, string_index, first_to_check)
Definition: attributes.h:112
#define UNREACHABLE_RETURN
Definition: assume.h:31
#define ASSUME
Definition: assume.h:29
VALUE rb_big_norm(VALUE x)
Definition: bignum.c:3158
VALUE rb_cstr_to_inum(const char *str, int base, int badcheck)
Definition: bignum.c:4016
#define local
Definition: blast.c:36
int main(void)
Definition: closure_fn0.c:49
int rb_dvar_defined(ID id, const rb_iseq_t *iseq)
Definition: compile.c:9772
VALUE rb_node_case_when_optimizable_literal(const NODE *const node)
Definition: compile.c:4480
int rb_local_defined(ID id, const rb_iseq_t *iseq)
Definition: compile.c:9797
Internal header for the compiler.
Internal header absorbing C compipler differences.
VALUE rb_complex_raw(VALUE x, VALUE y)
Definition: complex.c:1536
Our own, locale independent, character handling routines.
#define ISSPACE
Definition: ctype.h:38
#define ISDIGIT
Definition: ctype.h:43
#define STRCASECMP
Definition: ctype.h:52
#define ISALPHA
Definition: ctype.h:42
#define STRNCASECMP
Definition: ctype.h:53
#define ISASCII
Definition: ctype.h:35
#define ISXDIGIT
Definition: ctype.h:44
#define ISCNTRL
Definition: ctype.h:46
#define ISALNUM
Definition: ctype.h:41
#define rb_define_method(klass, mid, func, arity)
Defines klass#mid.
Definition: cxxanyargs.hpp:653
#define rb_define_singleton_method(klass, mid, func, arity)
Defines klass.mid.
Definition: cxxanyargs.hpp:668
#define rb_define_private_method(klass, mid, func, arity)
Defines klass#mid and makes it private.
Definition: cxxanyargs.hpp:660
VALUE rb_int_positive_pow(long x, unsigned long y)
Definition: numeric.c:4022
enum @11::@13::@14 mask
struct RIMemo * ptr
Definition: debug.c:88
#define free(x)
Definition: dln.c:52
#define RFLOAT_VALUE
Definition: double.h:28
#define DBL2NUM
Definition: double.h:29
#define rb_ascii8bit_encindex()
Definition: encindex.h:57
int rb_enc_precise_mbclen(const char *p, const char *e, rb_encoding *enc)
Definition: encoding.c:1230
VALUE rb_enc_associate(VALUE obj, rb_encoding *enc)
Definition: encoding.c:1064
rb_encoding * rb_utf8_encoding(void)
Definition: encoding.c:1537
rb_encoding * rb_ascii8bit_encoding(void)
Definition: encoding.c:1525
rb_encoding * rb_enc_from_index(int index)
Definition: encoding.c:414
rb_encoding * rb_enc_get(VALUE obj)
Definition: encoding.c:1070
rb_encoding * rb_enc_compatible(VALUE str1, VALUE str2)
Definition: encoding.c:1172
rb_encoding * rb_usascii_encoding(void)
Definition: encoding.c:1549
VALUE rb_enc_from_encoding(rb_encoding *encoding)
Definition: encoding.c:188
VALUE rb_enc_associate_index(VALUE obj, int idx)
Definition: encoding.c:1036
int rb_enc_find_index(const char *name)
Definition: encoding.c:879
int rb_enc_codelen(int c, rb_encoding *enc)
Definition: encoding.c:1287
struct @77 g
int root
Definition: enough.c:226
big_t * num
Definition: enough.c:232
string_t out
Definition: enough.c:230
uint8_t len
Definition: escape.c:17
char str[HTML_ESCAPE_MAX_LEN+1]
Definition: escape.c:18
unsigned long ruby_scan_digits(const char *str, ssize_t len, int base, size_t *retlen, int *overflow)
Definition: util.c:101
#define numberof(array)
Definition: etc.c:649
#define tEMBDOC
Definition: eventids2.c:9
#define tHEREDOC_BEG
Definition: eventids2.c:13
#define k__END__
Definition: eventids2.c:17
#define tCOMMENT
Definition: eventids2.c:5
#define tEMBDOC_BEG
Definition: eventids2.c:7
#define tHEREDOC_END
Definition: eventids2.c:15
#define tEMBDOC_END
Definition: eventids2.c:11
#define tIGNORED_NL
Definition: eventids2.c:3
#define RSTRING_LEN(string)
Definition: fbuffer.h:22
#define RSTRING_PTR(string)
Definition: fbuffer.h:19
#define MAYBE_UNUSED
Definition: ffi_common.h:30
#define UNLIKELY(x)
Definition: ffi_common.h:126
#define memcpy(d, s, n)
Definition: ffi_common.h:55
#define PRIsVALUE
Definition: function.c:10
void rb_gc_force_recycle(VALUE obj)
Definition: gc.c:7968
void rb_gc_mark(VALUE ptr)
Definition: gc.c:6112
VALUE rb_imemo_new(enum imemo_type type, VALUE v1, VALUE v2, VALUE v3, VALUE v0)
Definition: gc.c:2412
void rb_gc_register_mark_object(VALUE obj)
Inform the garbage collector that object is a live Ruby object that should not be moved.
Definition: gc.c:8022
#define rb_intern_str(string)
Definition: generator.h:16
VALUE rb_define_class(const char *name, VALUE super)
Defines a top-level class.
Definition: class.c:748
int rb_scan_args(int argc, const VALUE *argv, const char *fmt,...)
Definition: class.c:2296
#define OBJ_FREEZE_RAW
Definition: fl_type.h:135
#define OBJ_FREEZE
Definition: fl_type.h:134
VALUE rb_syntax_error_append(VALUE exc, VALUE file, int line, int column, rb_encoding *enc, const char *fmt, va_list args)
Definition: error.c:125
void rb_raise(VALUE exc, const char *fmt,...)
Definition: error.c:2917
void rb_compile_warn(const char *file, int line, const char *fmt,...)
Definition: error.c:351
void rb_exc_raise(VALUE mesg)
Raises an exception in the current thread.
Definition: eval.c:712
void rb_set_errinfo(VALUE err)
Sets the current exception ($!) to the given value.
Definition: eval.c:1925
VALUE rb_ident_hash_new(void)
Definition: hash.c:4443
const char * rb_builtin_type_name(int t)
Definition: error.c:890
VALUE rb_eTypeError
Definition: error.c:1057
void rb_fatal(const char *fmt,...)
Definition: error.c:2968
const char * rb_builtin_class_name(VALUE x)
Definition: error.c:937
VALUE rb_make_exception(int argc, const VALUE *argv)
Make an Exception object from the list of arguments in a manner similar to Kernel#raise.
Definition: eval.c:888
VALUE rb_eRuntimeError
Definition: error.c:1055
VALUE rb_eArgError
Definition: error.c:1058
void rb_compile_warning(const char *file, int line, const char *fmt,...)
Definition: error.c:366
VALUE rb_ensure(VALUE(*b_proc)(VALUE), VALUE data1, VALUE(*e_proc)(VALUE), VALUE data2)
An equivalent to ensure clause.
Definition: eval.c:1148
VALUE rb_errinfo(void)
The current exception in the current thread.
Definition: eval.c:1911
VALUE rb_eSyntaxError
Definition: error.c:1073
bool rb_warning_category_enabled_p(rb_warning_category_t category)
Definition: error.c:182
VALUE rb_cObject
Object class.
Definition: object.c:49
VALUE rb_class_new_instance(int, const VALUE *, VALUE)
Allocates and initializes an instance of klass.
Definition: object.c:1953
VALUE rb_obj_hide(VALUE obj)
Make the object invisible from Ruby code.
Definition: object.c:92
VALUE rb_obj_class(VALUE)
Definition: object.c:245
VALUE rb_obj_freeze(VALUE)
Make the object unmodifiable.
Definition: object.c:1101
unsigned char suffix[65536]
Definition: gun.c:164
unsigned char match[65280+2]
Definition: gun.c:165
unsigned in(void *in_desc, z_const unsigned char **buf)
Definition: gun.c:89
VALUE rb_hash_aset(VALUE hash, VALUE key, VALUE val)
Definition: hash.c:2901
VALUE rb_hash_lookup(VALUE hash, VALUE key)
Definition: hash.c:2072
VALUE rb_hash_clear(VALUE hash)
Definition: hash.c:2819
VALUE rb_hash_new(void)
Definition: hash.c:1538
#define tANDDOT
Definition: id.c:33
#define tNMATCH
Definition: id.c:27
#define tCOLON2
Definition: id.c:30
#define tGEQ
Definition: id.c:22
#define tUMINUS
Definition: id.c:16
#define tDOT3
Definition: id.c:14
#define tUPLUS
Definition: id.c:15
#define tPOW
Definition: id.c:17
#define tLEQ
Definition: id.c:21
#define tRSHFT
Definition: id.c:20
#define tANDOP
Definition: id.c:31
#define tEQ
Definition: id.c:23
#define tMATCH
Definition: id.c:26
#define tOROP
Definition: id.c:32
#define tNEQ
Definition: id.c:25
#define tLSHFT
Definition: id.c:19
#define tAREF
Definition: id.c:28
#define tEQQ
Definition: id.c:24
#define tASET
Definition: id.c:29
#define tDOT2
Definition: id.c:13
const char term
Definition: id.c:37
unsigned short token
Definition: id.c:36
#define tCMP
Definition: id.c:18
ruby_method_ids
Definition: id.h:78
@ idEq
Definition: id.h:96
@ idUPlus
Definition: id.h:81
@ idGE
Definition: id.h:95
@ idGTGT
Definition: id.h:91
@ idANDOP
Definition: id.h:108
@ idEqq
Definition: id.h:97
@ idOROP
Definition: id.h:109
@ idNULL
Definition: id.h:113
@ idCmp
Definition: id.h:84
@ idDot3
Definition: id.h:80
@ idOr
Definition: id.h:101
@ idCOLON2
Definition: id.h:107
@ idLTLT
Definition: id.h:90
@ idUMinus
Definition: id.h:82
@ idLE
Definition: id.h:93
@ idPow
Definition: id.h:83
@ idANDDOT
Definition: id.h:110
@ idNeq
Definition: id.h:98
@ idNeqTilde
Definition: id.h:104
#define ID_GLOBAL
Definition: id.h:35
#define ID_CLASS
Definition: id.h:38
#define ID_CONST
Definition: id.h:37
#define ID_SCOPE_SHIFT
Definition: id.h:31
#define ID_INSTANCE
Definition: id.h:34
#define ID_LOCAL
Definition: id.h:33
#define ID_SCOPE_MASK
Definition: id.h:32
#define ID_INTERNAL
Definition: id.h:40
#define ID_STATIC_SYM
Definition: id.h:30
IMEMO: Internal memo object.
@ imemo_parser_strterm
Definition: imemo.h:45
#define ENC_CODERANGE_7BIT
Definition: encoding.h:93
#define rb_enc_mbcput(c, buf, enc)
Definition: encoding.h:208
#define rb_enc_prev_char(s, p, e, enc)
Definition: encoding.h:211
int rb_enc_str_coderange(VALUE)
Definition: string.c:725
#define ENC_CODERANGE_UNKNOWN
Definition: encoding.h:92
VALUE rb_enc_str_new(const char *, long, rb_encoding *)
Definition: string.c:857
#define rb_enc_name(enc)
Definition: encoding.h:168
#define ENCODING_GET(obj)
Definition: encoding.h:51
VALUE rb_enc_str_buf_cat(VALUE str, const char *ptr, long len, rb_encoding *enc)
Definition: string.c:3072
#define rb_enc_asciicompat(enc)
Definition: encoding.h:236
#define rb_enc_isalnum(c, enc)
Definition: encoding.h:226
int rb_char_to_option_kcode(int c, int *option, int *kcode)
Definition: re.c:329
long rb_str_coderange_scan_restartable(const char *, const char *, rb_encoding *, int *)
Definition: string.c:617
#define MBCLEN_CHARFOUND_P(ret)
Definition: encoding.h:182
#define ENCODING_SET(obj, i)
Definition: encoding.h:49
#define ENCODING_IS_ASCII8BIT(obj)
Definition: encoding.h:52
#define rb_enc_isspace(c, enc)
Definition: encoding.h:228
Thin wrapper to ruby/config.h.
@ RB_WARN_CATEGORY_EXPERIMENTAL
Definition: error.h:35
#define ruby_verbose
Definition: error.h:68
VALUE rb_funcall(VALUE, ID, int,...)
Calls a method.
Definition: vm_eval.c:1077
VALUE rb_funcallv_public(VALUE, ID, int, const VALUE *)
Calls a method.
Definition: vm_eval.c:1137
#define rb_ary_new3
Definition: array.h:73
VALUE rb_io_gets(VALUE)
Definition: io.c:3738
VALUE rb_io_write(VALUE, VALUE)
Definition: io.c:1953
VALUE rb_io_flush(VALUE)
Definition: io.c:2052
VALUE rb_io_puts(int, const VALUE *, VALUE)
Definition: io.c:7895
VALUE rb_default_rs
Definition: io.c:202
ID rb_id_attrset(ID)
Definition: symbol.c:113
#define rb_rational_raw1(x)
Definition: rational.h:31
VALUE rb_rational_new(VALUE, VALUE)
Definition: rational.c:1962
int rb_memcicmp(const void *, const void *, long)
Definition: re.c:88
VALUE rb_str_resize(VALUE, long)
Definition: string.c:2859
#define rb_str_new(str, len)
Definition: string.h:213
#define rb_str_buf_cat
Definition: string.h:283
VALUE rb_str_cat(VALUE, const char *, long)
Definition: string.c:2962
#define rb_usascii_str_new(str, len)
Definition: string.h:224
void rb_str_set_len(VALUE, long)
Definition: string.c:2842
void rb_str_modify(VALUE)
Definition: string.c:2262
VALUE rb_str_buf_new(long)
Definition: string.c:1398
VALUE rb_filesystem_str_new_cstr(const char *)
Definition: string.c:1187
#define rb_usascii_str_new2
Definition: string.h:282
VALUE rb_str_subseq(VALUE, long, long)
Definition: string.c:2624
#define rb_strlen_lit(str)
Definition: string.h:286
VALUE rb_str_append(VALUE, VALUE)
Definition: string.c:3118
VALUE rb_str_new_frozen(VALUE)
Definition: string.c:1273
VALUE rb_str_buf_append(VALUE, VALUE)
Definition: string.c:3103
VALUE rb_str_intern(VALUE)
Definition: symbol.c:840
VALUE rb_obj_as_string(VALUE)
Definition: string.c:1529
#define rb_str_cat_cstr(buf, str)
Definition: string.h:266
VALUE rb_str_dup(VALUE)
Definition: string.c:1631
#define rb_str_new_cstr(str)
Definition: string.h:219
VALUE rb_thread_current(void)
Definition: thread.c:2911
int rb_const_defined_at(VALUE, ID)
Definition: variable.c:2934
VALUE rb_const_get_at(VALUE, ID)
Definition: variable.c:2630
VALUE rb_attr_get(VALUE, ID)
Definition: variable.c:1242
int rb_respond_to(VALUE, ID)
Definition: vm_method.c:2561
void rb_define_alloc_func(VALUE, rb_alloc_func_t)
VALUE rb_make_backtrace(void)
#define ID2SYM
Definition: symbol.h:44
const char * rb_id2name(ID)
Definition: symbol.c:944
#define SYM2ID
Definition: symbol.h:45
ID rb_intern2(const char *, long)
Definition: symbol.c:778
ID rb_intern(const char *)
Definition: symbol.c:785
#define CONST_ID
Definition: symbol.h:47
void rb_define_global_const(const char *, VALUE)
Definition: variable.c:3162
void rb_define_const(VALUE, const char *, VALUE)
Definition: variable.c:3150
void * memmove(void *, const void *, size_t)
Definition: memmove.c:7
unsigned long ruby_scan_oct(const char *, size_t, size_t *)
Definition: util.c:38
#define strtod(s, e)
Definition: util.h:45
#define scan_hex(s, l, e)
Definition: util.h:24
#define scan_oct(s, l, e)
Definition: util.h:22
#define NUM2UINT
Definition: int.h:45
#define NUM2INT
Definition: int.h:44
#define INT2NUM
Definition: int.h:43
Internal header for Complex.
#define RCOMPLEX_SET_IMAG(cmp, i)
Definition: complex.h:24
#define RCOMPLEX_SET_REAL(cmp, r)
Definition: complex.h:23
#define RCOMPLEX(obj)
Definition: complex.h:20
#define SIZED_REALLOC_N(v, T, m, n)
Definition: gc.h:159
#define ruby_sized_xfree
Definition: gc.h:166
Internal header for Hash.
Internal header for IO.
int rb_stderr_tty_p(void)
Definition: io.c:8105
Internal header for Numeric.
#define RFLOAT(obj)
Definition: numeric.h:44
Internal header for the parser.
Internal header for Rational.
#define RRATIONAL(obj)
Definition: rational.h:24
Internal header for Regexp.
VALUE rb_reg_check_preprocess(VALUE)
Definition: re.c:2718
VALUE rb_reg_compile(VALUE str, int options, const char *sourcefile, int sourceline)
Definition: re.c:2966
#define STATIC_ASSERT
Definition: static_assert.h:14
VALUE rb_fstring(VALUE)
Definition: string.c:353
Internal header for Thread.
VALUE rb_suppress_tracing(VALUE(*func)(VALUE), VALUE arg)
Definition: vm_trace.c:418
Internal header corresponding util.c.
#define rb_ary_new_from_args(...)
Definition: internal.h:65
#define rb_sym_intern_ascii_cstr(...)
Definition: internal.h:74
voidpf void uLong size
Definition: ioapi.h:138
typedef long(ZCALLBACK *tell_file_func) OF((voidpf opaque
voidpf uLong offset
Definition: ioapi.h:144
typedef int(ZCALLBACK *close_file_func) OF((voidpf opaque
voidpf void * buf
Definition: ioapi.h:138
const char * ruby_node_name(int node)
Definition: iseq.c:2593
#define rb_reserved_word(str, len)
Definition: lex.c:38
Historical shim for <limits.h>.
#define CHAR_BIT
Definition: limits.h:44
#define INT2FIX
Definition: long.h:48
#define ULONG2NUM
Definition: long.h:60
#define LONG2FIX
Definition: long.h:49
#define LONG2NUM
Definition: long.h:50
#define rb_long2int
Definition: long.h:62
#define FIX2LONG
Definition: long.h:46
#define MEMCPY(p1, p2, type, n)
Definition: memory.h:129
#define REALLOC_N
Definition: memory.h:137
#define ALLOCA_N(type, n)
Definition: memory.h:112
#define ALLOC_N
Definition: memory.h:133
#define RB_GC_GUARD(v)
Definition: memory.h:91
#define MEMMOVE(p1, p2, type, n)
Definition: memory.h:130
VALUE type(ANYARGS)
ANYARGS-ed function type.
Definition: cxxanyargs.hpp:56
unsigned int input
Definition: nkf.c:4325
const int id
Definition: nkf.c:209
const char * name
Definition: nkf.c:208
const char * alias
Definition: nkf.c:1159
unsigned int last
Definition: nkf.c:4324
#define TRUE
Definition: nkf.h:175
#define FALSE
Definition: nkf.h:174
void rb_node_init(NODE *n, enum node_type type, VALUE a0, VALUE a1, VALUE a2)
Definition: node.c:1139
void rb_ast_dispose(rb_ast_t *ast)
Definition: node.c:1448
rb_ast_t * rb_ast_new(void)
Definition: node.c:1299
void rb_ast_add_mark_object(rb_ast_t *ast, VALUE obj)
Definition: node.c:1454
NODE * rb_ast_newnode(rb_ast_t *ast, enum node_type type)
Definition: node.c:1264
void rb_ast_add_local_table(rb_ast_t *ast, ID *buf)
Definition: node.c:1283
void rb_ast_delete_node(rb_ast_t *ast, NODE *n)
Definition: node.c:1291
#define NEW_DSTR(s, loc)
Definition: node.h:346
#define NEW_VCALL(m, loc)
Definition: node.h:354
#define NEW_ITER(a, b, loc)
Definition: node.h:304
#define nd_state
Definition: node.h:265
#define NEW_BLOCK(a, loc)
Definition: node.h:292
#define NEW_POSTEXE(b, loc)
Definition: node.h:382
#define NEW_CVASGN(v, val, loc)
Definition: node.h:326
#define NEW_DOT2(b, e, loc)
Definition: node.h:373
#define NEW_UNLESS(c, t, e, loc)
Definition: node.h:294
#define NEW_RETURN(s, loc)
Definition: node.h:314
#define NEW_ALIAS(n, o, loc)
Definition: node.h:365
#define NEW_MODULE(n, b, loc)
Definition: node.h:370
#define nd_first_lineno(n)
Definition: node.h:202
#define nd_set_type(n, t)
Definition: node.h:189
#define NEW_DOT3(b, e, loc)
Definition: node.h:374
#define NEW_HASH(a, loc)
Definition: node.h:318
#define NEW_BREAK(s, loc)
Definition: node.h:306
#define NEW_EVSTR(n, loc)
Definition: node.h:350
#define NEW_COLON2(c, i, loc)
Definition: node.h:371
#define nd_mid
Definition: node.h:254
#define NEW_IF(c, t, e, loc)
Definition: node.h:293
#define NEW_NIL(loc)
Definition: node.h:376
#define nd_resq
Definition: node.h:224
#define NEW_GASGN(v, val, loc)
Definition: node.h:320
#define NEW_BEGIN(b, loc)
Definition: node.h:310
#define nd_end
Definition: node.h:264
#define NEW_OPT_ARG(i, v, loc)
Definition: node.h:358
#define nd_line(n)
Definition: node.h:196
#define NEW_SPLAT(a, loc)
Definition: node.h:363
#define NEW_IASGN(v, val, loc)
Definition: node.h:324
#define NEW_ARGS_AUX(r, b, loc)
Definition: node.h:357
#define NEW_CDECL(v, val, path, loc)
Definition: node.h:325
#define nd_ainfo
Definition: node.h:256
#define NEW_SELF(loc)
Definition: node.h:375
#define NEW_CALL(r, m, a, loc)
Definition: node.h:351
#define NEW_DASGN(v, val, loc)
Definition: node.h:322
#define nd_1st
Definition: node.h:227
#define NEW_ARGSPUSH(a, b, loc)
Definition: node.h:362
#define NEW_FALSE(loc)
Definition: node.h:378
#define NEW_CASE(h, b, loc)
Definition: node.h:295
#define NEW_RETRY(loc)
Definition: node.h:309
#define nd_first_column(n)
Definition: node.h:200
node_type
Definition: node.h:21
@ NODE_OR
Definition: node.h:45
@ NODE_LVAR
Definition: node.h:72
@ NODE_SPLAT
Definition: node.h:98
@ NODE_DEFS
Definition: node.h:101
@ NODE_REDO
Definition: node.h:38
@ NODE_IN
Definition: node.h:30
@ NODE_MATCH
Definition: node.h:80
@ NODE_STR
Definition: node.h:84
@ NODE_DSYM
Definition: node.h:121
@ NODE_DASGN_CURR
Definition: node.h:49
@ NODE_LIST
Definition: node.h:66
@ NODE_CVAR
Definition: node.h:77
@ NODE_NEXT
Definition: node.h:37
@ NODE_ARGSCAT
Definition: node.h:96
@ NODE_DASGN
Definition: node.h:48
@ NODE_LASGN
Definition: node.h:47
@ NODE_AND
Definition: node.h:44
@ NODE_MASGN
Definition: node.h:46
@ NODE_CVASGN
Definition: node.h:53
@ NODE_CALL
Definition: node.h:59
@ NODE_FALSE
Definition: node.h:117
@ NODE_FLIP2
Definition: node.h:112
@ NODE_EVSTR
Definition: node.h:88
@ NODE_DVAR
Definition: node.h:73
@ NODE_ATTRASGN
Definition: node.h:122
@ NODE_BEGIN
Definition: node.h:40
@ NODE_DXSTR
Definition: node.h:87
@ NODE_IASGN
Definition: node.h:51
@ NODE_GASGN
Definition: node.h:50
@ NODE_RESCUE
Definition: node.h:41
@ NODE_SCOPE
Definition: node.h:22
@ NODE_HASH
Definition: node.h:69
@ NODE_YIELD
Definition: node.h:71
@ NODE_CDECL
Definition: node.h:52
@ NODE_BLOCK
Definition: node.h:23
@ NODE_TRUE
Definition: node.h:116
@ NODE_ARGS_AUX
Definition: node.h:92
@ NODE_CASE
Definition: node.h:26
@ NODE_RETRY
Definition: node.h:39
@ NODE_DOT3
Definition: node.h:111
@ NODE_RETURN
Definition: node.h:70
@ NODE_BACK_REF
Definition: node.h:79
@ NODE_ENSURE
Definition: node.h:43
@ NODE_SELF
Definition: node.h:114
@ NODE_DOT2
Definition: node.h:110
@ NODE_FNDPTN
Definition: node.h:126
@ NODE_LIT
Definition: node.h:83
@ NODE_FLIP3
Definition: node.h:113
@ NODE_NTH_REF
Definition: node.h:78
@ NODE_DEFN
Definition: node.h:100
@ NODE_GVAR
Definition: node.h:74
@ NODE_COLON2
Definition: node.h:108
@ NODE_IVAR
Definition: node.h:75
@ NODE_BLOCK_PASS
Definition: node.h:99
@ NODE_DREGX
Definition: node.h:89
@ NODE_DEFINED
Definition: node.h:119
@ NODE_ONCE
Definition: node.h:90
@ NODE_IF
Definition: node.h:24
@ NODE_HSHPTN
Definition: node.h:125
@ NODE_ZLIST
Definition: node.h:67
@ NODE_ARYPTN
Definition: node.h:124
@ NODE_XSTR
Definition: node.h:86
@ NODE_BREAK
Definition: node.h:36
@ NODE_UNLESS
Definition: node.h:25
@ NODE_WHEN
Definition: node.h:29
@ NODE_CASE3
Definition: node.h:28
@ NODE_COLON3
Definition: node.h:109
@ NODE_CONST
Definition: node.h:76
@ NODE_NIL
Definition: node.h:115
@ NODE_VALUES
Definition: node.h:68
@ NODE_DSTR
Definition: node.h:85
@ NODE_ARGSPUSH
Definition: node.h:97
@ NODE_OPCALL
Definition: node.h:60
@ NODE_ARGS
Definition: node.h:91
#define nd_brace
Definition: node.h:276
#define nd_2nd
Definition: node.h:228
#define NEW_SUPER(a, loc)
Definition: node.h:355
#define nd_set_node_id(n, id)
Definition: node.h:214
#define NEW_LASGN(v, val, loc)
Definition: node.h:321
#define NEW_MATCH2(n1, n2, loc)
Definition: node.h:342
#define nd_set_last_loc(n, v)
Definition: node.h:212
#define NEW_OPCALL(r, m, a, loc)
Definition: node.h:352
#define NEW_SCOPE(a, b, loc)
Definition: node.h:291
#define NEW_MATCH3(r, n2, loc)
Definition: node.h:343
#define NEW_LIST(a, loc)
Definition: node.h:316
#define NEW_XSTR(s, loc)
Definition: node.h:347
#define NEW_CASE2(b, loc)
Definition: node.h:296
#define RNODE(obj)
Definition: node.h:176
#define nd_last_loc(n)
Definition: node.h:211
#define NEW_UNTIL(c, b, n, loc)
Definition: node.h:301
#define NEW_OP_ASGN_OR(i, val, loc)
Definition: node.h:330
#define NEW_OP_ASGN1(p, id, a, loc)
Definition: node.h:327
#define NEW_SCLASS(r, b, loc)
Definition: node.h:369
#define nd_set_first_lineno(n, v)
Definition: node.h:203
#define NEW_DEFINED(e, loc)
Definition: node.h:380
#define NEW_REDO(loc)
Definition: node.h:308
#define NEW_CONST(v, loc)
Definition: node.h:337
#define NEW_DVAR(v, loc)
Definition: node.h:335
#define NEW_FOR_MASGN(v, loc)
Definition: node.h:303
#define NODE_SPECIAL_REQUIRED_KEYWORD
Definition: node.h:385
#define nd_args
Definition: node.h:255
#define NEW_RESCUE(b, res, e, loc)
Definition: node.h:311
#define NEW_TRUE(loc)
Definition: node.h:377
#define nd_rval
Definition: node.h:266
#define NEW_YIELD(a, loc)
Definition: node.h:315
#define NEW_MASGN(l, r, loc)
Definition: node.h:319
#define NEW_NEXT(s, loc)
Definition: node.h:307
#define NEW_BLOCK_PASS(b, loc)
Definition: node.h:364
#define nd_else
Definition: node.h:222
#define NODE_SPECIAL_NO_REST_KEYWORD
Definition: node.h:390
#define NEW_FCALL(m, a, loc)
Definition: node.h:353
#define NEW_OP_ASGN_AND(i, val, loc)
Definition: node.h:331
#define nd_lit
Definition: node.h:246
#define NEW_CLASS(n, b, s, loc)
Definition: node.h:368
#define nd_head
Definition: node.h:216
#define NEW_LVAR(v, loc)
Definition: node.h:334
#define nd_set_line(n, l)
Definition: node.h:197
#define NODE_FL_NEWLINE
Definition: node.h:183
#define NEW_LAMBDA(a, b, loc)
Definition: node.h:305
#define NEW_WHILE(c, b, n, loc)
Definition: node.h:300
#define NODE_REQUIRED_KEYWORD_P(node)
Definition: node.h:386
#define NEW_FOR(i, b, loc)
Definition: node.h:302
#define NEW_RESBODY(a, ex, n, loc)
Definition: node.h:312
#define NEW_IN(c, t, e, loc)
Definition: node.h:299
#define nd_beg
Definition: node.h:263
#define NEW_ZSUPER(loc)
Definition: node.h:356
#define NEW_CASE3(h, b, loc)
Definition: node.h:297
#define NEW_WHEN(c, t, e, loc)
Definition: node.h:298
#define NEW_GVAR(v, loc)
Definition: node.h:333
#define nd_set_first_column(n, v)
Definition: node.h:201
#define NEW_OP_CDECL(v, op, val, loc)
Definition: node.h:332
#define NEW_UNDEF(i, loc)
Definition: node.h:367
#define NEW_COLON3(i, loc)
Definition: node.h:372
#define NEW_BACK_REF(n, loc)
Definition: node.h:340
#define nd_type(n)
Definition: node.h:188
#define NEW_IVAR(v, loc)
Definition: node.h:336
#define NEW_VALIAS(n, o, loc)
Definition: node.h:366
#define nd_set_first_loc(n, v)
Definition: node.h:205
#define nd_body
Definition: node.h:221
#define NEW_POSTARG(i, v, loc)
Definition: node.h:360
#define nd_value
Definition: node.h:243
#define NEW_NODE(t, a0, a1, a2, loc)
Definition: node.h:286
#define NEW_ENSURE(b, en, loc)
Definition: node.h:313
#define nd_defn
Definition: node.h:258
#define NODE_SPECIAL_NO_NAME_REST
Definition: node.h:387
#define NEW_CVAR(v, loc)
Definition: node.h:338
#define NODE_SPECIAL_EXCESSIVE_COMMA
Definition: node.h:389
#define NEW_KW_ARG(i, v, loc)
Definition: node.h:359
#define NEW_STR(s, loc)
Definition: node.h:345
#define nd_next
Definition: node.h:218
#define NEW_ARGSCAT(a, b, loc)
Definition: node.h:361
#define NEW_DASGN_CURR(v, val, loc)
Definition: node.h:323
#define NEW_ATTRASGN(r, m, a, loc)
Definition: node.h:383
#define NEW_OP_ASGN2(r, t, i, o, val, loc)
Definition: node.h:328
#define NEW_LIT(l, loc)
Definition: node.h:344
#define NEW_ERRINFO(loc)
Definition: node.h:379
#define NEW_NTH_REF(n, loc)
Definition: node.h:339
#define nd_plen
Definition: node.h:251
unsigned char OnigUChar
Definition: onigmo.h:79
ONIG_EXTERN int onig_foreach_name(OnigRegex reg, int(*func)(const OnigUChar *, const OnigUChar *, int, int *, OnigRegex, void *), void *arg)
#define HERETERM_LENGTH_BITS
Definition: parse.c:792
yysymbol_kind_t
Definition: parse.c:1355
void(* rb_magic_comment_setter_t)(struct parser_params *p, const char *name, const char *val)
Definition: parse.c:15638
lex_state_e
Definition: parse.c:198
yytype_int16 yy_state_t
Definition: parse.c:1897
long(* rb_magic_comment_length_t)(struct parser_params *p, const char *name, long len)
Definition: parse.c:15637
shareability
Definition: parse.c:117
VALUE stack_type
Definition: parse.c:230
yytokentype
Definition: parse.h:52
@ tBACK_REF
Definition: parse.h:119
@ keyword_alias
Definition: parse.h:99
@ tLPAREN_ARG
Definition: parse.h:150
@ tBDOT3
Definition: parse.h:139
@ tWORDS_BEG
Definition: parse.h:163
@ tAMPER
Definition: parse.h:157
@ keyword_do_cond
Definition: parse.h:81
@ END_OF_INPUT
Definition: parse.h:54
@ keyword_do_block
Definition: parse.h:82
@ keyword_defined
Definition: parse.h:100
@ tLPAREN
Definition: parse.h:149
@ tSTRING_DEND
Definition: parse.h:168
@ tCHAR
Definition: parse.h:117
@ keyword_return
Definition: parse.h:84
@ tCONSTANT
Definition: parse.h:110
@ tFLOAT
Definition: parse.h:114
@ tLABEL_END
Definition: parse.h:172
@ keyword_module
Definition: parse.h:58
@ tLAMBEG
Definition: parse.h:171
@ tCVAR
Definition: parse.h:111
@ tSTRING_DVAR
Definition: parse.h:170
@ keyword_undef
Definition: parse.h:60
@ tLBRACE
Definition: parse.h:153
@ keyword_redo
Definition: parse.h:77
@ tSTRING_CONTENT
Definition: parse.h:120
@ keyword_false
Definition: parse.h:90
@ keyword_class
Definition: parse.h:57
@ keyword_ensure
Definition: parse.h:63
@ keyword_end
Definition: parse.h:64
@ keyword_and
Definition: parse.h:91
@ keyword_when
Definition: parse.h:71
@ YYerror
Definition: parse.h:55
@ tASSOC
Definition: parse.h:148
@ keyword_retry
Definition: parse.h:78
@ tSYMBOLS_BEG
Definition: parse.h:165
@ tLBRACE_ARG
Definition: parse.h:154
@ YYEMPTY
Definition: parse.h:53
@ tREGEXP_END
Definition: parse.h:121
@ keyword_or
Definition: parse.h:92
@ keyword__ENCODING__
Definition: parse.h:105
@ keyword_do
Definition: parse.h:80
@ keyword_rescue
Definition: parse.h:62
@ keyword_END
Definition: parse.h:102
@ tBDOT2
Definition: parse.h:138
@ keyword_next
Definition: parse.h:76
@ modifier_if
Definition: parse.h:94
@ tLOWEST
Definition: parse.h:173
@ tSYMBEG
Definition: parse.h:159
@ keyword_nil
Definition: parse.h:88
@ tLABEL
Definition: parse.h:112
@ tSTAR
Definition: parse.h:155
@ keyword_if
Definition: parse.h:65
@ keyword_BEGIN
Definition: parse.h:101
@ tIMAGINARY
Definition: parse.h:116
@ tSTRING_DBEG
Definition: parse.h:169
@ tNTH_REF
Definition: parse.h:118
@ tINTEGER
Definition: parse.h:113
@ tSTRING_BEG
Definition: parse.h:160
@ tXSTRING_BEG
Definition: parse.h:161
@ tIVAR
Definition: parse.h:109
@ keyword_then
Definition: parse.h:67
@ YYUNDEF
Definition: parse.h:56
@ modifier_while
Definition: parse.h:96
@ tQSYMBOLS_BEG
Definition: parse.h:166
@ keyword_def
Definition: parse.h:59
@ keyword__FILE__
Definition: parse.h:104
@ tIDENTIFIER
Definition: parse.h:106
@ keyword_super
Definition: parse.h:86
@ tOP_ASGN
Definition: parse.h:147
@ keyword_while
Definition: parse.h:72
@ tGVAR
Definition: parse.h:108
@ keyword_true
Definition: parse.h:89
@ keyword__LINE__
Definition: parse.h:103
@ keyword_else
Definition: parse.h:69
@ tSTRING_END
Definition: parse.h:167
@ keyword_in
Definition: parse.h:79
@ modifier_unless
Definition: parse.h:95
@ tRATIONAL
Definition: parse.h:115
@ tUMINUS_NUM
Definition: parse.h:174
@ keyword_unless
Definition: parse.h:66
@ tDSTAR
Definition: parse.h:156
@ keyword_do_LAMBDA
Definition: parse.h:83
@ tCOLON3
Definition: parse.h:146
@ keyword_for
Definition: parse.h:74
@ modifier_rescue
Definition: parse.h:98
@ tFID
Definition: parse.h:107
@ keyword_not
Definition: parse.h:93
@ keyword_begin
Definition: parse.h:61
@ keyword_self
Definition: parse.h:87
@ tRPAREN
Definition: parse.h:151
@ keyword_break
Definition: parse.h:75
@ keyword_until
Definition: parse.h:73
@ keyword_case
Definition: parse.h:70
@ tSP
Definition: parse.h:122
@ keyword_yield
Definition: parse.h:85
@ tLBRACK
Definition: parse.h:152
@ tQWORDS_BEG
Definition: parse.h:164
@ tREGEXP_BEG
Definition: parse.h:162
@ modifier_until
Definition: parse.h:97
@ tLAST_TOKEN
Definition: parse.h:175
@ tLAMBDA
Definition: parse.h:158
@ keyword_elsif
Definition: parse.h:68
enum yytokentype yytoken_kind_t
Definition: parse.h:177
#define RARRAY_AREF(a, i)
Definition: psych_emitter.c:7
VALUE rb_ractor_stderr(void)
Definition: ractor.c:2148
VALUE rb_ractor_stdout(void)
Definition: ractor.c:2136
VALUE rb_ractor_make_shareable(VALUE obj)
Definition: ractor.c:2499
#define RARRAY_LEN
Definition: rarray.h:52
#define RBASIC(obj)
Definition: rbasic.h:34
#define RBASIC_CLASS
Definition: rbasic.h:35
#define BEG(no)
Definition: re.c:33
#define NULL
Definition: regenc.h:69
#define RB_OBJ_WRITE(a, slot, b)
WB for new reference from ‘a’ to ‘b’.
Definition: rgengc.h:107
#define RB_OBJ_WRITTEN(a, oldv, b)
WB for new reference from ‘a’ to ‘b’.
Definition: rgengc.h:114
#define RE_OPTION_ENCODING(e)
Definition: ripper.c:766
enum lex_state_e rb_parser_trace_lex_state(struct parser_params *, enum lex_state_e, enum lex_state_e, int)
Definition: ripper.c:18296
#define NUM_SUFFIX_I
Definition: ripper.c:15317
#define Qnull
Definition: ripper.c:1062
void rb_parser_fatal(struct parser_params *p, const char *fmt,...)
Definition: ripper.c:18339
#define yyerror0(msg)
Definition: ripper.c:458
#define DEF_EXPR(n)
Definition: ripper.c:199
#define dispatch_delayed_token(p, t)
Definition: ripper.c:13389
#define IS_LABEL_POSSIBLE()
Definition: ripper.c:14961
#define has_delayed_token(p)
Definition: ripper.c:13390
#define set_yylval_name(x)
Definition: ripper.c:13366
#define DVARS_TOPSCOPE
Definition: ripper.c:295
#define idFWD_REST
Definition: ripper.c:756
#define IS_BEG()
Definition: ripper.c:14959
#define DVARS_TERMINAL_P(tbl)
Definition: ripper.c:296
#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
Definition: ripper.c:1942
#define YYMAXDEPTH
Definition: ripper.c:6350
VALUE rb_mRubyVMFrozenCore
Definition: vm.c:375
#define STR_NEW2(ptr)
Definition: ripper.c:423
VALUE rb_parser_new(void)
Definition: ripper.c:20781
#define RUBY_DTRACE_PARSE_HOOK(name)
#define rb_warn0L_experimental(l, fmt)
Definition: ripper.c:1126
#define YYSTACK_FREE
Definition: ripper.c:2015
#define AREF(ary, i)
Definition: ripper.c:136
#define STR_FUNC_QWORDS
Definition: ripper.c:14067
#define DVARS_INHERIT
Definition: ripper.c:294
#define LVAR_USED
Definition: ripper.c:17509
yysymbol_kind_t
Definition: ripper.c:1352
@ YYSYMBOL_none
Definition: ripper.c:1777
@ YYSYMBOL_137_
Definition: ripper.c:1491
@ YYSYMBOL_exc_var
Definition: ripper.c:1687
@ YYSYMBOL_keyword_redo
Definition: ripper.c:1377
@ YYSYMBOL_command_call
Definition: ripper.c:1540
@ YYSYMBOL_if_tail
Definition: ripper.c:1612
@ YYSYMBOL_k_if
Definition: ripper.c:1592
@ YYSYMBOL_keyword_not
Definition: ripper.c:1393
@ YYSYMBOL_68_
Definition: ripper.c:1422
@ YYSYMBOL_tAMPER
Definition: ripper.c:1463
@ YYSYMBOL_74_escaped_vertical_tab_
Definition: ripper.c:1428
@ YYSYMBOL_assocs
Definition: ripper.c:1761
@ YYSYMBOL_fitem
Definition: ripper.c:1556
@ YYSYMBOL_f_no_kwarg
Definition: ripper.c:1747
@ YYSYMBOL_k_case
Definition: ripper.c:1596
@ YYSYMBOL_mlhs_head
Definition: ripper.c:1549
@ YYSYMBOL_operation3
Definition: ripper.c:1765
@ YYSYMBOL_undef_list
Definition: ripper.c:1557
@ YYSYMBOL_method_call
Definition: ripper.c:1638
@ YYSYMBOL_405_49
Definition: ripper.c:1759
@ YYSYMBOL_mrhs
Definition: ripper.c:1579
@ YYSYMBOL_keyword_module
Definition: ripper.c:1358
@ YYSYMBOL_f_kwrest
Definition: ripper.c:1748
@ YYSYMBOL_restarg_mark
Definition: ripper.c:1753
@ YYSYMBOL_168_4
Definition: ripper.c:1522
@ YYSYMBOL_excessed_comma
Definition: ripper.c:1622
@ YYSYMBOL_k_def
Definition: ripper.c:1600
@ YYSYMBOL_tASET
Definition: ripper.c:1447
@ YYSYMBOL_tNMATCH
Definition: ripper.c:1441
@ YYSYMBOL_stmt
Definition: ripper.c:1521
@ YYSYMBOL_YYUNDEF
Definition: ripper.c:1356
@ YYSYMBOL_expr_value_do
Definition: ripper.c:1537
@ YYSYMBOL_152_
Definition: ripper.c:1506
@ YYSYMBOL_trailer
Definition: ripper.c:1774
@ YYSYMBOL_expr_value
Definition: ripper.c:1536
@ YYSYMBOL_356_43
Definition: ripper.c:1710
@ YYSYMBOL_176_9
Definition: ripper.c:1530
@ YYSYMBOL_tSTRING_DEND
Definition: ripper.c:1474
@ YYSYMBOL_tWORDS_BEG
Definition: ripper.c:1469
@ YYSYMBOL_69_backslash_
Definition: ripper.c:1423
@ YYSYMBOL_288_31
Definition: ripper.c:1642
@ YYSYMBOL_359_46
Definition: ripper.c:1713
@ YYSYMBOL_tSTRING_DBEG
Definition: ripper.c:1475
@ YYSYMBOL_call_op2
Definition: ripper.c:1768
@ YYSYMBOL_k_module
Definition: ripper.c:1599
@ YYSYMBOL_k_ensure
Definition: ripper.c:1604
@ YYSYMBOL_tLOWEST
Definition: ripper.c:1479
@ YYSYMBOL_tAREF
Definition: ripper.c:1446
@ YYSYMBOL_tSTRING_END
Definition: ripper.c:1473
@ YYSYMBOL_tCOLON3
Definition: ripper.c:1452
@ YYSYMBOL_289_32
Definition: ripper.c:1643
@ YYSYMBOL_keyword_end
Definition: ripper.c:1364
@ YYSYMBOL_147_
Definition: ripper.c:1501
@ YYSYMBOL_tREGEXP_END
Definition: ripper.c:1421
@ YYSYMBOL_354_41
Definition: ripper.c:1708
@ YYSYMBOL_regexp
Definition: ripper.c:1694
@ YYSYMBOL_208_15
Definition: ripper.c:1562
@ YYSYMBOL_tQSYMBOLS_BEG
Definition: ripper.c:1472
@ YYSYMBOL_args_forward
Definition: ripper.c:1735
@ YYSYMBOL_p_args_tail
Definition: ripper.c:1668
@ YYSYMBOL_p_expr
Definition: ripper.c:1658
@ YYSYMBOL_tLABEL_END
Definition: ripper.c:1478
@ YYSYMBOL_k_else
Definition: ripper.c:1606
@ YYSYMBOL_do_body
Definition: ripper.c:1644
@ YYSYMBOL_357_44
Definition: ripper.c:1711
@ YYSYMBOL_primary
Definition: ripper.c:1580
@ YYSYMBOL_k_do_block
Definition: ripper.c:1602
@ YYSYMBOL_blkarg_mark
Definition: ripper.c:1755
@ YYSYMBOL_tNTH_REF
Definition: ripper.c:1418
@ YYSYMBOL_tDSTAR
Definition: ripper.c:1462
@ YYSYMBOL_tANDDOT
Definition: ripper.c:1450
@ YYSYMBOL_keyword_while
Definition: ripper.c:1372
@ YYSYMBOL_p_rest
Definition: ripper.c:1670
@ YYSYMBOL_73_escaped_carriage_return_
Definition: ripper.c:1427
@ YYSYMBOL_138_
Definition: ripper.c:1492
@ YYSYMBOL_185_13
Definition: ripper.c:1539
@ YYSYMBOL_p_any_kwrest
Definition: ripper.c:1679
@ YYSYMBOL_f_block_opt
Definition: ripper.c:1750
@ YYSYMBOL_235_25
Definition: ripper.c:1589
@ YYSYMBOL_keyword_else
Definition: ripper.c:1369
@ YYSYMBOL_f_arg_asgn
Definition: ripper.c:1738
@ YYSYMBOL_literal
Definition: ripper.c:1689
@ YYSYMBOL_keyword_do
Definition: ripper.c:1380
@ YYSYMBOL_block_args_tail
Definition: ripper.c:1620
@ YYSYMBOL_keyword_false
Definition: ripper.c:1390
@ YYSYMBOL_131_
Definition: ripper.c:1485
@ YYSYMBOL_symbol_list
Definition: ripper.c:1699
@ YYSYMBOL_rel_expr
Definition: ripper.c:1564
@ YYSYMBOL_p_case_body
Definition: ripper.c:1651
@ YYSYMBOL_opt_block_args_tail
Definition: ripper.c:1621
@ YYSYMBOL_tUMINUS_NUM
Definition: ripper.c:1493
@ YYSYMBOL_lhs
Definition: ripper.c:1552
@ YYSYMBOL_p_cases
Definition: ripper.c:1655
@ YYSYMBOL_YYerror
Definition: ripper.c:1355
@ YYSYMBOL_modifier_unless
Definition: ripper.c:1395
@ YYSYMBOL_modifier_if
Definition: ripper.c:1394
@ YYSYMBOL_keyword_def
Definition: ripper.c:1359
@ YYSYMBOL_word
Definition: ripper.c:1697
@ YYSYMBOL_numeric
Definition: ripper.c:1719
@ YYSYMBOL_keyword_do_LAMBDA
Definition: ripper.c:1383
@ YYSYMBOL_181_11
Definition: ripper.c:1535
@ YYSYMBOL_f_larglist
Definition: ripper.c:1634
@ YYSYMBOL_p_variable
Definition: ripper.c:1682
@ YYSYMBOL_p_expr_basic
Definition: ripper.c:1663
@ YYSYMBOL_operation
Definition: ripper.c:1763
@ YYSYMBOL_tSYMBOLS_BEG
Definition: ripper.c:1471
@ YYSYMBOL_keyword_case
Definition: ripper.c:1370
@ YYSYMBOL_modifier_until
Definition: ripper.c:1397
@ YYSYMBOL_p_find
Definition: ripper.c:1669
@ YYSYMBOL_bv_decls
Definition: ripper.c:1627
@ YYSYMBOL_tOROP
Definition: ripper.c:1439
@ YYSYMBOL_127_
Definition: ripper.c:1481
@ YYSYMBOL_p_args
Definition: ripper.c:1666
@ YYSYMBOL_299_37
Definition: ripper.c:1653
@ YYSYMBOL_tRPAREN
Definition: ripper.c:1457
@ YYSYMBOL_k_unless
Definition: ripper.c:1593
@ YYSYMBOL_k_while
Definition: ripper.c:1594
@ YYSYMBOL_f_arglist
Definition: ripper.c:1730
@ YYSYMBOL_opt_bv_decl
Definition: ripper.c:1626
@ YYSYMBOL_p_arg
Definition: ripper.c:1672
@ YYSYMBOL_keyword_BEGIN
Definition: ripper.c:1401
@ YYSYMBOL_dot_or_colon
Definition: ripper.c:1766
@ YYSYMBOL_p_const
Definition: ripper.c:1684
@ YYSYMBOL_p_lbracket
Definition: ripper.c:1662
@ YYSYMBOL_words
Definition: ripper.c:1695
@ YYSYMBOL_modifier_rescue
Definition: ripper.c:1398
@ YYSYMBOL_p_value
Definition: ripper.c:1680
@ YYSYMBOL_f_optarg
Definition: ripper.c:1752
@ YYSYMBOL_355_42
Definition: ripper.c:1709
@ YYSYMBOL_assoc
Definition: ripper.c:1762
@ YYSYMBOL_dsym
Definition: ripper.c:1718
@ YYSYMBOL_opt_block_arg
Definition: ripper.c:1576
@ YYSYMBOL_tLABEL
Definition: ripper.c:1412
@ YYSYMBOL_bodystmt
Definition: ripper.c:1515
@ YYSYMBOL_tCVAR
Definition: ripper.c:1411
@ YYSYMBOL_300_38
Definition: ripper.c:1654
@ YYSYMBOL_tFID
Definition: ripper.c:1407
@ YYSYMBOL_373_47
Definition: ripper.c:1727
@ YYSYMBOL_opt_terms
Definition: ripper.c:1769
@ YYSYMBOL_310_39
Definition: ripper.c:1664
@ YYSYMBOL_311_40
Definition: ripper.c:1665
@ YYSYMBOL_tLBRACK
Definition: ripper.c:1458
@ YYSYMBOL_keyword_break
Definition: ripper.c:1375
@ YYSYMBOL_expr
Definition: ripper.c:1525
@ YYSYMBOL_p_primitive
Definition: ripper.c:1681
@ YYSYMBOL_293_35
Definition: ripper.c:1647
@ YYSYMBOL_xstring_contents
Definition: ripper.c:1705
@ YYSYMBOL_string_dvar
Definition: ripper.c:1714
@ YYSYMBOL_tREGEXP_BEG
Definition: ripper.c:1468
@ YYSYMBOL_p_top_expr_body
Definition: ripper.c:1657
@ YYSYMBOL_233_23
Definition: ripper.c:1587
@ YYSYMBOL_tSTRING_BEG
Definition: ripper.c:1466
@ YYSYMBOL_tLPAREN_ARG
Definition: ripper.c:1456
@ YYSYMBOL_assoc_list
Definition: ripper.c:1760
@ YYSYMBOL_tLBRACE
Definition: ripper.c:1459
@ YYSYMBOL_129_
Definition: ripper.c:1483
@ YYSYMBOL_287_30
Definition: ripper.c:1641
@ YYSYMBOL_aref_args
Definition: ripper.c:1567
@ YYSYMBOL_278_28
Definition: ripper.c:1632
@ YYSYMBOL_f_rest_marg
Definition: ripper.c:1618
@ YYSYMBOL_tSTAR
Definition: ripper.c:1461
@ YYSYMBOL_150_
Definition: ripper.c:1504
@ YYSYMBOL_tIMAGINARY
Definition: ripper.c:1416
@ YYSYMBOL_lambda_body
Definition: ripper.c:1635
@ YYSYMBOL_k_end
Definition: ripper.c:1608
@ YYSYMBOL_146_
Definition: ripper.c:1500
@ YYSYMBOL_command_asgn
Definition: ripper.c:1523
@ YYSYMBOL_tIDENTIFIER
Definition: ripper.c:1406
@ YYSYMBOL_command_args
Definition: ripper.c:1573
@ YYSYMBOL_136_
Definition: ripper.c:1490
@ YYSYMBOL_p_var_ref
Definition: ripper.c:1683
@ YYSYMBOL_130_
Definition: ripper.c:1484
@ YYSYMBOL_block_call
Definition: ripper.c:1637
@ YYSYMBOL_defs_head
Definition: ripper.c:1534
@ YYSYMBOL_block_param
Definition: ripper.c:1623
@ YYSYMBOL_f_arg_item
Definition: ripper.c:1739
@ YYSYMBOL_args_tail
Definition: ripper.c:1732
@ YYSYMBOL_tRATIONAL
Definition: ripper.c:1415
@ YYSYMBOL_block_param_def
Definition: ripper.c:1625
@ YYSYMBOL_172_5
Definition: ripper.c:1526
@ YYSYMBOL_symbol
Definition: ripper.c:1715
@ YYSYMBOL_tRSHFT
Definition: ripper.c:1449
@ YYSYMBOL_fcall
Definition: ripper.c:1543
@ YYSYMBOL_keyword_when
Definition: ripper.c:1371
@ YYSYMBOL_133_
Definition: ripper.c:1487
@ YYSYMBOL_singleton
Definition: ripper.c:1758
@ YYSYMBOL_keyword__LINE__
Definition: ripper.c:1403
@ YYSYMBOL_k_rescue
Definition: ripper.c:1603
@ YYSYMBOL_tLPAREN
Definition: ripper.c:1455
@ YYSYMBOL_p_kwarg
Definition: ripper.c:1674
@ YYSYMBOL_relop
Definition: ripper.c:1563
@ YYSYMBOL_k_until
Definition: ripper.c:1595
@ YYSYMBOL_keyword_or
Definition: ripper.c:1392
@ YYSYMBOL_k_return
Definition: ripper.c:1609
@ YYSYMBOL_op
Definition: ripper.c:1559
@ YYSYMBOL_tASSOC
Definition: ripper.c:1454
@ YYSYMBOL_simple_numeric
Definition: ripper.c:1720
@ YYSYMBOL_291_33
Definition: ripper.c:1645
@ YYSYMBOL_tSTRING_CONTENT
Definition: ripper.c:1420
@ YYSYMBOL_f_block_kwarg
Definition: ripper.c:1744
@ YYSYMBOL_p_top_expr
Definition: ripper.c:1656
@ YYSYMBOL_f_block_kw
Definition: ripper.c:1743
@ YYSYMBOL_f_bad_arg
Definition: ripper.c:1736
@ YYSYMBOL_mlhs_node
Definition: ripper.c:1551
@ YYSYMBOL_166_3
Definition: ripper.c:1520
@ YYSYMBOL_tNEQ
Definition: ripper.c:1435
@ YYSYMBOL_keyword_variable
Definition: ripper.c:1722
@ YYSYMBOL_regexp_contents
Definition: ripper.c:1706
@ YYSYMBOL_opt_args_tail
Definition: ripper.c:1733
@ YYSYMBOL_keyword_undef
Definition: ripper.c:1360
@ YYSYMBOL_k_begin
Definition: ripper.c:1591
@ YYSYMBOL_do_block
Definition: ripper.c:1636
@ YYSYMBOL_modifier_while
Definition: ripper.c:1396
@ YYSYMBOL_f_arg
Definition: ripper.c:1740
@ YYSYMBOL_backref
Definition: ripper.c:1725
@ YYSYMBOL_tCMP
Definition: ripper.c:1432
@ YYSYMBOL_keyword_unless
Definition: ripper.c:1366
@ YYSYMBOL_tQWORDS_BEG
Definition: ripper.c:1470
@ YYSYMBOL_keyword_alias
Definition: ripper.c:1399
@ YYSYMBOL_220_16
Definition: ripper.c:1574
@ YYSYMBOL_brace_block
Definition: ripper.c:1639
@ YYSYMBOL_string
Definition: ripper.c:1691
@ YYSYMBOL_mrhs_arg
Definition: ripper.c:1578
@ YYSYMBOL_230_20
Definition: ripper.c:1584
@ YYSYMBOL_lambda
Definition: ripper.c:1629
@ YYSYMBOL_args
Definition: ripper.c:1577
@ YYSYMBOL_f_label
Definition: ripper.c:1741
@ YYSYMBOL_tFLOAT
Definition: ripper.c:1414
@ YYSYMBOL_keyword_do_cond
Definition: ripper.c:1381
@ YYSYMBOL_128_
Definition: ripper.c:1482
@ YYSYMBOL_377_48
Definition: ripper.c:1731
@ YYSYMBOL_cmd_brace_block
Definition: ripper.c:1542
@ YYSYMBOL_tBDOT3
Definition: ripper.c:1445
@ YYSYMBOL_block_command
Definition: ripper.c:1541
@ YYSYMBOL_top_stmts
Definition: ripper.c:1512
@ YYSYMBOL_keyword_true
Definition: ripper.c:1389
@ YYSYMBOL_qsym_list
Definition: ripper.c:1703
@ YYSYMBOL_strings
Definition: ripper.c:1690
@ YYSYMBOL_tBACK_REF
Definition: ripper.c:1419
@ YYSYMBOL_p_kwrest
Definition: ripper.c:1677
@ YYSYMBOL_keyword__ENCODING__
Definition: ripper.c:1405
@ YYSYMBOL_141_
Definition: ripper.c:1495
@ YYSYMBOL_keyword_in
Definition: ripper.c:1379
@ YYSYMBOL_tLSHFT
Definition: ripper.c:1448
@ YYSYMBOL_keyword_yield
Definition: ripper.c:1385
@ YYSYMBOL_228_18
Definition: ripper.c:1582
@ YYSYMBOL_135_
Definition: ripper.c:1489
@ YYSYMBOL_tLAST_TOKEN
Definition: ripper.c:1496
@ YYSYMBOL_string_content
Definition: ripper.c:1707
@ YYSYMBOL_tEQ
Definition: ripper.c:1433
@ YYSYMBOL_keyword_then
Definition: ripper.c:1367
@ YYSYMBOL_top_compstmt
Definition: ripper.c:1511
@ YYSYMBOL_292_34
Definition: ripper.c:1646
@ YYSYMBOL_exc_list
Definition: ripper.c:1686
@ YYSYMBOL_stmt_or_begin
Definition: ripper.c:1519
@ YYSYMBOL_call_op
Definition: ripper.c:1767
@ YYSYMBOL_rbrace
Definition: ripper.c:1773
@ YYSYMBOL_229_19
Definition: ripper.c:1583
@ YYSYMBOL_compstmt
Definition: ripper.c:1517
@ YYSYMBOL_p_args_head
Definition: ripper.c:1667
@ YYSYMBOL_kwrest_mark
Definition: ripper.c:1746
@ YYSYMBOL_keyword_class
Definition: ripper.c:1357
@ YYSYMBOL_keyword_retry
Definition: ripper.c:1378
@ YYSYMBOL_var_ref
Definition: ripper.c:1723
@ YYSYMBOL_keyword_ensure
Definition: ripper.c:1363
@ YYSYMBOL_qsymbols
Definition: ripper.c:1701
@ YYSYMBOL_204_14
Definition: ripper.c:1558
@ YYSYMBOL_symbols
Definition: ripper.c:1698
@ YYSYMBOL_paren_args
Definition: ripper.c:1569
@ YYSYMBOL_arg
Definition: ripper.c:1561
@ YYSYMBOL_opt_ensure
Definition: ripper.c:1688
@ YYSYMBOL_keyword_rescue
Definition: ripper.c:1362
@ YYSYMBOL_227_17
Definition: ripper.c:1581
@ YYSYMBOL_keyword_until
Definition: ripper.c:1373
@ YYSYMBOL_277_27
Definition: ripper.c:1631
@ YYSYMBOL_do
Definition: ripper.c:1611
@ YYSYMBOL_term
Definition: ripper.c:1775
@ YYSYMBOL_p_args_post
Definition: ripper.c:1671
@ YYSYMBOL_for_var
Definition: ripper.c:1614
@ YYSYMBOL_arg_rhs
Definition: ripper.c:1568
@ YYSYMBOL_then
Definition: ripper.c:1610
@ YYSYMBOL_f_block_arg
Definition: ripper.c:1756
@ YYSYMBOL_276_26
Definition: ripper.c:1630
@ YYSYMBOL_YYACCEPT
Definition: ripper.c:1508
@ YYSYMBOL_cpath
Definition: ripper.c:1554
@ YYSYMBOL_173_6
Definition: ripper.c:1527
@ YYSYMBOL_keyword_for
Definition: ripper.c:1374
@ YYSYMBOL_140_
Definition: ripper.c:1494
@ YYSYMBOL_keyword_next
Definition: ripper.c:1376
@ YYSYMBOL_153_n_
Definition: ripper.c:1507
@ YYSYMBOL_fname
Definition: ripper.c:1555
@ YYSYMBOL_f_block_optarg
Definition: ripper.c:1751
@ YYSYMBOL_begin_block
Definition: ripper.c:1514
@ YYSYMBOL_keyword_super
Definition: ripper.c:1386
@ YYSYMBOL_148_
Definition: ripper.c:1502
@ YYSYMBOL_opt_f_block_arg
Definition: ripper.c:1757
@ YYSYMBOL_tGVAR
Definition: ripper.c:1408
@ YYSYMBOL_134_
Definition: ripper.c:1488
@ YYSYMBOL_arg_value
Definition: ripper.c:1566
@ YYSYMBOL_298_36
Definition: ripper.c:1652
@ YYSYMBOL_tUPLUS
Definition: ripper.c:1429
@ YYSYMBOL_tIVAR
Definition: ripper.c:1409
@ YYSYMBOL_tOP_ASGN
Definition: ripper.c:1453
@ YYSYMBOL_174_7
Definition: ripper.c:1528
@ YYSYMBOL_case_args
Definition: ripper.c:1648
@ YYSYMBOL_keyword_if
Definition: ripper.c:1365
@ YYSYMBOL_tCONSTANT
Definition: ripper.c:1410
@ YYSYMBOL_f_opt_paren_args
Definition: ripper.c:1728
@ YYSYMBOL_terms
Definition: ripper.c:1776
@ YYSYMBOL_358_45
Definition: ripper.c:1712
@ YYSYMBOL_tSYMBEG
Definition: ripper.c:1465
@ YYSYMBOL_keyword_END
Definition: ripper.c:1402
@ YYSYMBOL_f_norm_arg
Definition: ripper.c:1737
@ YYSYMBOL_f_margs
Definition: ripper.c:1617
@ YYSYMBOL_YYEOF
Definition: ripper.c:1354
@ YYSYMBOL_p_as
Definition: ripper.c:1659
@ YYSYMBOL_mlhs_post
Definition: ripper.c:1550
@ YYSYMBOL_opt_else
Definition: ripper.c:1613
@ YYSYMBOL_case_body
Definition: ripper.c:1649
@ YYSYMBOL_rparen
Definition: ripper.c:1771
@ YYSYMBOL_opt_nl
Definition: ripper.c:1770
@ YYSYMBOL_primary_value
Definition: ripper.c:1590
@ YYSYMBOL_qwords
Definition: ripper.c:1700
@ YYSYMBOL_keyword_elsif
Definition: ripper.c:1368
@ YYSYMBOL_tEQQ
Definition: ripper.c:1434
@ YYSYMBOL_tLAMBDA
Definition: ripper.c:1464
@ YYSYMBOL_reswords
Definition: ripper.c:1560
@ YYSYMBOL_mlhs_basic
Definition: ripper.c:1547
@ YYSYMBOL_ssym
Definition: ripper.c:1716
@ YYSYMBOL_k_when
Definition: ripper.c:1605
@ YYSYMBOL_177_10
Definition: ripper.c:1531
@ YYSYMBOL_def_name
Definition: ripper.c:1532
@ YYSYMBOL_mlhs
Definition: ripper.c:1545
@ YYSYMBOL_p_alt
Definition: ripper.c:1660
@ YYSYMBOL_151_
Definition: ripper.c:1505
@ YYSYMBOL_f_marg
Definition: ripper.c:1615
@ YYSYMBOL_k_class
Definition: ripper.c:1598
@ YYSYMBOL_231_21
Definition: ripper.c:1585
@ YYSYMBOL_keyword_self
Definition: ripper.c:1387
@ YYSYMBOL_143_
Definition: ripper.c:1497
@ YYSYMBOL_p_kwargs
Definition: ripper.c:1673
@ YYSYMBOL_145_
Definition: ripper.c:1499
@ YYSYMBOL_p_kwnorest
Definition: ripper.c:1678
@ YYSYMBOL_program
Definition: ripper.c:1509
@ YYSYMBOL_tANDOP
Definition: ripper.c:1438
@ YYSYMBOL_tINTEGER
Definition: ripper.c:1413
@ YYSYMBOL_f_marg_list
Definition: ripper.c:1616
@ YYSYMBOL_k_do
Definition: ripper.c:1601
@ YYSYMBOL_162_2
Definition: ripper.c:1516
@ YYSYMBOL_sym
Definition: ripper.c:1717
@ YYSYMBOL_opt_call_args
Definition: ripper.c:1571
@ YYSYMBOL_f_kwarg
Definition: ripper.c:1745
@ YYSYMBOL_279_29
Definition: ripper.c:1633
@ YYSYMBOL_operation2
Definition: ripper.c:1764
@ YYSYMBOL_p_lparen
Definition: ripper.c:1661
@ YYSYMBOL_132_
Definition: ripper.c:1486
@ YYSYMBOL_tLBRACE_ARG
Definition: ripper.c:1460
@ YYSYMBOL_f_opt
Definition: ripper.c:1749
@ YYSYMBOL_k_elsif
Definition: ripper.c:1607
@ YYSYMBOL_cases
Definition: ripper.c:1650
@ YYSYMBOL_keyword_defined
Definition: ripper.c:1400
@ YYSYMBOL_keyword_begin
Definition: ripper.c:1361
@ YYSYMBOL_user_variable
Definition: ripper.c:1721
@ YYSYMBOL_tBDOT2
Definition: ripper.c:1444
@ YYSYMBOL_mlhs_inner
Definition: ripper.c:1546
@ YYSYMBOL_p_kw
Definition: ripper.c:1675
@ YYSYMBOL_keyword_return
Definition: ripper.c:1384
@ YYSYMBOL_tUMINUS
Definition: ripper.c:1430
@ YYSYMBOL_word_list
Definition: ripper.c:1696
@ YYSYMBOL_defn_head
Definition: ripper.c:1533
@ YYSYMBOL_YYEMPTY
Definition: ripper.c:1353
@ YYSYMBOL_tMATCH
Definition: ripper.c:1440
@ YYSYMBOL_tDOT2
Definition: ripper.c:1442
@ YYSYMBOL_opt_block_param
Definition: ripper.c:1624
@ YYSYMBOL_f_paren_args
Definition: ripper.c:1729
@ YYSYMBOL_234_24
Definition: ripper.c:1588
@ YYSYMBOL_156_1
Definition: ripper.c:1510
@ YYSYMBOL_tSTRING_DVAR
Definition: ripper.c:1476
@ YYSYMBOL_f_kw
Definition: ripper.c:1742
@ YYSYMBOL_top_stmt
Definition: ripper.c:1513
@ YYSYMBOL_tSP
Definition: ripper.c:1424
@ YYSYMBOL_brace_body
Definition: ripper.c:1640
@ YYSYMBOL_126_
Definition: ripper.c:1480
@ YYSYMBOL_qword_list
Definition: ripper.c:1702
@ YYSYMBOL_tLEQ
Definition: ripper.c:1437
@ YYSYMBOL_175_8
Definition: ripper.c:1529
@ YYSYMBOL_149_
Definition: ripper.c:1503
@ YYSYMBOL_tCOLON2
Definition: ripper.c:1451
@ YYSYMBOL_keyword__FILE__
Definition: ripper.c:1404
@ YYSYMBOL_tCHAR
Definition: ripper.c:1417
@ YYSYMBOL_mlhs_item
Definition: ripper.c:1548
@ YYSYMBOL_cname
Definition: ripper.c:1553
@ YYSYMBOL_superclass
Definition: ripper.c:1726
@ YYSYMBOL_tGEQ
Definition: ripper.c:1436
@ YYSYMBOL_p_kw_label
Definition: ripper.c:1676
@ YYSYMBOL_string_contents
Definition: ripper.c:1704
@ YYSYMBOL_144_
Definition: ripper.c:1498
@ YYSYMBOL_lex_ctxt
Definition: ripper.c:1565
@ YYSYMBOL_string1
Definition: ripper.c:1692
@ YYSYMBOL_stmts
Definition: ripper.c:1518
@ YYSYMBOL_opt_paren_args
Definition: ripper.c:1570
@ YYSYMBOL_keyword_and
Definition: ripper.c:1391
@ YYSYMBOL_tPOW
Definition: ripper.c:1431
@ YYSYMBOL_tXSTRING_BEG
Definition: ripper.c:1467
@ YYSYMBOL_xstring
Definition: ripper.c:1693
@ YYSYMBOL_f_rest_arg
Definition: ripper.c:1754
@ YYSYMBOL_f_args
Definition: ripper.c:1734
@ YYSYMBOL_tDOT3
Definition: ripper.c:1443
@ YYSYMBOL_command
Definition: ripper.c:1544
@ YYSYMBOL_bvar
Definition: ripper.c:1628
@ YYSYMBOL_k_for
Definition: ripper.c:1597
@ YYSYMBOL_block_arg
Definition: ripper.c:1575
@ YYSYMBOL_184_12
Definition: ripper.c:1538
@ YYSYMBOL_232_22
Definition: ripper.c:1586
@ YYSYMBOL_var_lhs
Definition: ripper.c:1724
@ YYSYMBOL_opt_rescue
Definition: ripper.c:1685
@ YYSYMBOL_f_any_kwrest
Definition: ripper.c:1619
@ YYSYMBOL_command_rhs
Definition: ripper.c:1524
@ YYSYMBOL_keyword_do_block
Definition: ripper.c:1382
@ YYSYMBOL_call_args
Definition: ripper.c:1572
@ YYSYMBOL_72_escaped_form_feed_
Definition: ripper.c:1426
@ YYSYMBOL_keyword_nil
Definition: ripper.c:1388
@ YYSYMBOL_tLAMBEG
Definition: ripper.c:1477
@ YYSYMBOL_rbracket
Definition: ripper.c:1772
@ YYSYMBOL_71_escaped_horizontal_tab_
Definition: ripper.c:1425
#define yyerrok
Definition: ripper.c:5890
#define add_delayed_token(p, tok, end)
Definition: ripper.c:14127
#define STRTERM_HEREDOC
Definition: ripper.c:816
#define YY_ASSERT(E)
Definition: ripper.c:1973
#define NUMPARAM_ID_P(id)
Definition: ripper.c:282
#define str_copy(_s, _p, _n)
#define YY_(Msgid)
Definition: ripper.c:1907
#define get_value(val)
Definition: ripper.c:642
#define YYNOMEM
Definition: ripper.c:5896
#define SWITCH_BY_COND_TYPE(t, w, arg)
Definition: ripper.c:19331
#define make_list(list, loc)
Definition: ripper.c:621
#define rb_warn1L(l, fmt, a)
Definition: ripper.c:1081
void * rb_parser_malloc(struct parser_params *p, size_t size)
Definition: ripper.c:20935
#define dispatch_heredoc_end(p)
Definition: ripper.c:15388
#define YY_IGNORE_MAYBE_UNINITIALIZED_END
Definition: ripper.c:1947
#define YYNSTATES
Definition: ripper.c:2117
VALUE rb_io_gets_internal(VALUE io)
Definition: io.c:3744
rb_ast_t * rb_parser_compile_string(VALUE vparser, const char *f, VALUE s, int line)
Definition: ripper.c:14008
void(* rb_magic_comment_setter_t)(struct parser_params *p, const char *name, const char *val)
Definition: ripper.c:15683
#define NEW_STRTERM(func, term, paren)
Definition: ripper.c:14872
#define YY_IGNORE_USELESS_CAST_END
Definition: ripper.c:1964
#define lex_goto_eol(p)
Definition: ripper.c:14103
#define literal_flush(p, ptr)
Definition: ripper.c:13387
#define IS_END()
Definition: ripper.c:14958
#define RE_OPTION_MASK
Definition: ripper.c:769
#define yyerror(yylloc, p, msg)
Definition: ripper.c:460
struct token_info token_info
void rb_parser_printf(struct parser_params *p, const char *fmt,...)
Definition: ripper.c:20992
#define NO_LEX_CTXT
Definition: ripper.c:134
#define WARN_S(s)
Definition: ripper.c:1118
#define tok(p)
Definition: ripper.c:14208
#define KWD2EID(t, v)
Definition: ripper.c:1012
#define ESCAPE_CONTROL
Definition: ripper.c:14414
#define YYABORT
Definition: ripper.c:5894
#define idFWD_KWREST
Definition: ripper.c:760
VALUE rb_parser_reg_compile(struct parser_params *p, VALUE str, int options)
Definition: ripper.c:20558
#define tokcopy(p, n)
Definition: ripper.c:14278
#define PRIsWARN
Definition: ripper.c:1122
lex_state_e
Definition: ripper.c:198
@ EXPR_END_ANY
Definition: ripper.c:216
@ EXPR_VALUE
Definition: ripper.c:213
@ EXPR_NONE
Definition: ripper.c:217
@ EXPR_BEG_ANY
Definition: ripper.c:214
@ EXPR_ARG_ANY
Definition: ripper.c:215
#define IS_lex_state(ls)
Definition: ripper.c:221
YYLTYPE * rb_parser_set_location(struct parser_params *p, YYLTYPE *yylloc)
Definition: ripper.c:18390
yytype_int16 yy_state_t
Definition: ripper.c:1894
#define WARN_SPACE_CHAR(c, prefix)
Definition: ripper.c:14307
#define YYLLOC_DEFAULT(Current, Rhs, N)
Definition: ripper.c:155
#define intern_cstr(n, l, en)
Definition: ripper.c:419
#define TAB_WIDTH
Definition: ripper.c:142
#define CMDARG_POP()
Definition: ripper.c:250
#define YY_REDUCE_PRINT(Rule)
Definition: ripper.c:6333
#define ERR(mesg)
rb_ast_t * rb_parser_compile_string_path(VALUE vparser, VALUE f, VALUE s, int line)
Definition: ripper.c:14014
#define YY_CAST(Type, Val)
Definition: ripper.c:1144
void rb_parser_set_options(VALUE vparser, int print, int loop, int chomp, int split)
Definition: ripper.c:20599
#define vtable_alloc(prev)
Definition: ripper.c:13755
VALUE rb_parser_set_context(VALUE vparser, const struct rb_iseq_struct *base, int main)
Definition: ripper.c:20791
#define was_bol(p)
Definition: ripper.c:14205
@ NUMPARAM_MAX
Definition: ripper.c:279
@ ORDINAL_PARAM
Definition: ripper.c:277
@ NO_PARAM
Definition: ripper.c:278
#define IS_lex_state_for(x, ls)
Definition: ripper.c:219
#define WARN_S_L(s, l)
Definition: ripper.c:1117
#define dispatch_scan_event(p, t)
Definition: ripper.c:13388
#define YYCASE_(N, S)
#define set_yylval_id(x)
Definition: ripper.c:13365
#define NUM_SUFFIX_R
Definition: ripper.c:15316
#define NEW_QCALL(q, r, m, a, loc)
Definition: ripper.c:479
long(* rb_magic_comment_length_t)(struct parser_params *p, const char *name, long len)
Definition: ripper.c:15682
#define warn_balanced(tok, op, syn)
Definition: ripper.c:16024
#define YY_NULLPTR
Definition: ripper.c:1154
#define RE_OPTION_ENCODING_NONE(o)
Definition: ripper.c:768
YYLTYPE * rb_parser_set_location_from_strterm_heredoc(struct parser_params *p, rb_strterm_heredoc_t *here, YYLTYPE *yylloc)
Definition: ripper.c:18365
#define STR_FUNC_TERM
Definition: ripper.c:14072
#define set_yylval_literal(x)
Definition: ripper.c:13359
#define set_yylval_str(x)
Definition: ripper.c:13354
#define YYFINAL
Definition: ripper.c:2106
rb_ast_t * rb_parser_compile_generic(VALUE vparser, VALUE(*lex_gets)(VALUE, int), VALUE fname, VALUE input, int start)
Definition: ripper.c:14049
#define RUBY_INIT_YYLLOC()
Definition: ripper.c:175
#define YY_ACCESSING_SYMBOL(State)
Accessing symbol of state STATE.
Definition: ripper.c:2258
#define YY_SYMBOL_PRINT(Title, Kind, Value, Location)
Definition: ripper.c:6331
void rb_init_parse(void)
Definition: ripper.c:20646
#define YY_INITIAL_VALUE(Value)
Definition: ripper.c:1957
#define TOK_INTERN()
Definition: ripper.c:425
#define vtable_free(tbl)
Definition: ripper.c:13773
#define CALL_Q_P(q)
Definition: ripper.c:477
#define yyparse
Definition: ripper.c:533
#define STR_NEW3(ptr, len, e, func)
Definition: ripper.c:424
#define yylval
Definition: ripper.c:13340
#define YYNTOKENS
Definition: ripper.c:2111
VALUE rb_parser_encoding(VALUE vparser)
Definition: ripper.c:20854
int rb_reg_fragment_setenc(struct parser_params *, VALUE, int)
Definition: ripper.c:20443
#define yytnamerr(yyres, yystr)
Definition: ripper.c:838
VALUE rb_parser_get_debug_output(VALUE self)
Definition: ripper.c:20902
int_least16_t yytype_int16
Definition: ripper.c:1816
#define Qnone
Definition: ripper.c:1061
#define peek(p, c)
Definition: ripper.c:14106
#define YY_STACK_PRINT(Bottom, Top)
Definition: ripper.c:6332
#define compile_for_eval
Definition: ripper.c:472
lex_state_bits
Definition: ripper.c:181
@ EXPR_ENDARG_bit
Definition: ripper.c:184
@ EXPR_ENDFN_bit
Definition: ripper.c:185
@ EXPR_MAX_STATE
Definition: ripper.c:195
@ EXPR_END_bit
Definition: ripper.c:183
@ EXPR_FNAME_bit
Definition: ripper.c:189
@ EXPR_LABEL_bit
Definition: ripper.c:192
@ EXPR_FITEM_bit
Definition: ripper.c:194
@ EXPR_CLASS_bit
Definition: ripper.c:191
@ EXPR_MID_bit
Definition: ripper.c:188
@ EXPR_CMDARG_bit
Definition: ripper.c:187
@ EXPR_LABELED_bit
Definition: ripper.c:193
@ EXPR_ARG_bit
Definition: ripper.c:186
@ EXPR_DOT_bit
Definition: ripper.c:190
@ EXPR_BEG_bit
Definition: ripper.c:182
#define rb_warning2(fmt, a, b)
Definition: ripper.c:1077
#define STR_NEW(ptr, len)
Definition: ripper.c:421
#define lambda_beginning_p()
Definition: ripper.c:481
#define YYSIZE_T
Definition: ripper.c:1878
#define RUBY_SET_YYLLOC_FROM_STRTERM_HEREDOC(Current)
Definition: ripper.c:169
#define YYSTACK_ALLOC_MAXIMUM
Definition: ripper.c:2017
#define IS_lex_state_all(ls)
Definition: ripper.c:222
#define yydebug
Definition: ripper.c:144
#define NUMPARAM_IDX_TO_ID(idx)
Definition: ripper.c:284
#define YY_IGNORE_USELESS_CAST_BEGIN
Definition: ripper.c:1961
shareability
Definition: ripper.c:117
@ shareable_none
Definition: ripper.c:118
@ shareable_copy
Definition: ripper.c:120
@ shareable_literal
Definition: ripper.c:119
@ shareable_everything
Definition: ripper.c:121
#define IS_SPCARG(c)
Definition: ripper.c:14960
void rb_strterm_mark(VALUE obj)
Definition: ripper.c:828
#define rb_warn2(fmt, a, b)
Definition: ripper.c:1072
uint_least16_t yytype_uint16
Definition: ripper.c:1848
void rb_parser_show_bitstack(struct parser_params *, stack_type, const char *, int)
Definition: ripper.c:18329
#define IS_ARG()
Definition: ripper.c:14957
#define value_expr(node)
Definition: ripper.c:550
#define RE_OPTION_ONCE
Definition: ripper.c:764
#define ADD2HEAP(new, cnt, ptr)
Definition: ripper.c:20931
#define SHAREABLE_BARE_EXPRESSION
Definition: ripper.c:18820
#define YYPTRDIFF_T
Definition: ripper.c:1866
#define NEWHEAP()
Definition: ripper.c:20930
@ YYENOMEM
Definition: ripper.c:5888
#define WARN_EOL(tok)
Definition: ripper.c:1134
#define mixed_escape(beg, enc1, enc2)
#define COND_POP()
Definition: ripper.c:243
#define lex_eol_p(p)
Definition: ripper.c:14104
#define RE_OPTION_ENCODING_IDX(o)
Definition: ripper.c:767
#define vtable_pop(tbl, n)
Definition: ripper.c:13812
#define WARN_ID(i)
Definition: ripper.c:1120
#define set_yylval_noname()
Definition: ripper.c:13384
size_t rb_yytnamerr(struct parser_params *p, char *yyres, const char *yystr)
Definition: ripper.c:21039
void * rb_parser_realloc(struct parser_params *p, void *ptr, size_t size)
Definition: ripper.c:20955
VALUE rb_parser_set_debug_output(VALUE self, VALUE output)
Definition: ripper.c:20917
#define rb_warn1(fmt, a)
Definition: ripper.c:1071
#define set_yylval_node(x)
Definition: ripper.c:13349
VALUE rb_parser_set_yydebug(VALUE self, VALUE flag)
Definition: ripper.c:20886
VALUE rb_parser_end_seen_p(VALUE vparser)
Definition: ripper.c:20839
#define RUBY_SET_YYLLOC(Current)
Definition: ripper.c:173
#define WARN_IVAL(i)
Definition: ripper.c:1121
#define YYACCEPT
Definition: ripper.c:5893
#define ID2VAL(id)
Definition: ripper.c:1010
#define yytable_value_is_error(Yyn)
Definition: ripper.c:2366
#define toklen(p)
Definition: ripper.c:14209
#define new_nil(loc)
Definition: ripper.c:537
struct rb_strterm_literal_struct rb_strterm_literal_t
#define YYTRANSLATE(YYX)
Definition: ripper.c:2125
#define shareable_literal_constant_next(n)
#define subnodes(n1, n2)
#define HERETERM_LENGTH_MAX
Definition: ripper.c:803
#define rb_warn0(fmt)
Definition: ripper.c:1070
YYLTYPE * rb_parser_set_location_of_none(struct parser_params *p, YYLTYPE *yylloc)
Definition: ripper.c:18380
#define STR_FUNC_LIST
Definition: ripper.c:14071
#define YY_ATTRIBUTE_UNUSED
Definition: ripper.c:1922
#define STR_FUNC_ESCAPE
Definition: ripper.c:14064
#define ifndef_ripper(x)
Definition: ripper.c:1063
#define STR_FUNC_SYMBOL
Definition: ripper.c:14068
#define CMDARG_PUSH(n)
Definition: ripper.c:249
int_least8_t yytype_int8
Definition: ripper.c:1808
#define peekc(p)
Definition: ripper.c:14108
void rb_parser_free(struct parser_params *p, void *ptr)
Definition: ripper.c:20975
#define CMDARG_P()
Definition: ripper.c:251
#define STR_FUNC_LABEL
Definition: ripper.c:14070
#define rb_warning0(fmt)
Definition: ripper.c:1075
#define STR_FUNC_INDENT
Definition: ripper.c:14069
#define peek_n(p, c, n)
Definition: ripper.c:14107
#define COND_P()
Definition: ripper.c:244
#define ESCAPE_META
Definition: ripper.c:14415
#define METHOD_NOT
Definition: ripper.c:753
rb_ast_t * rb_parser_compile_file_path(VALUE vparser, VALUE fname, VALUE file, int start)
Definition: ripper.c:14029
#define NUMPARAM_ID_TO_IDX(id)
Definition: ripper.c:283
#define HEAPCNT(n, size)
Definition: ripper.c:20927
#define YYPOPSTACK(N)
int yy_state_fast_t
Definition: ripper.c:1897
#define SET_LEX_STATE(ls)
Definition: ripper.c:224
#define STR_FUNC_REGEXP
Definition: ripper.c:14066
#define RUBY_SET_YYLLOC_OF_NONE(Current)
Definition: ripper.c:171
#define idFWD_BLOCK
Definition: ripper.c:762
#define vtable_add(tbl, id)
Definition: ripper.c:13795
#define WARN_I(i)
Definition: ripper.c:1119
#define COND_PUSH(n)
Definition: ripper.c:242
#define token_flush(ptr)
Definition: ripper.c:461
#define get_id(id)
Definition: ripper.c:641
string_type
Definition: ripper.c:14074
@ str_dsym
Definition: ripper.c:14083
@ str_dword
Definition: ripper.c:14081
@ str_label
Definition: ripper.c:14075
@ str_ssym
Definition: ripper.c:14082
@ str_xquote
Definition: ripper.c:14078
@ str_dquote
Definition: ripper.c:14077
@ str_regexp
Definition: ripper.c:14079
@ str_squote
Definition: ripper.c:14076
@ str_sword
Definition: ripper.c:14080
#define mixed_error(enc1, enc2)
#define dyna_var(p, id)
Definition: ripper.c:740
#define rb_node_newnode(type, a1, a2, a3, loc)
Definition: ripper.c:509
#define IS_LABEL_SUFFIX(n)
Definition: ripper.c:14964
#define nd_once_body(node)
Definition: ripper.c:17870
#define yyerror1(loc, msg)
Definition: ripper.c:459
#define tokfix(p)
Definition: ripper.c:14207
#define YYLAST
Definition: ripper.c:2108
#define NUM_SUFFIX_ALL
Definition: ripper.c:15318
VALUE stack_type
Definition: ripper.c:230
#define yypact_value_is_default(Yyn)
Definition: ripper.c:2361
cond_type
Definition: ripper.c:19325
@ COND_IN_COND
Definition: ripper.c:19327
@ COND_IN_OP
Definition: ripper.c:19326
@ COND_IN_FF
Definition: ripper.c:19328
#define YYINITDEPTH
Definition: ripper.c:6339
#define flush_string_content(p, enc)
Definition: ripper.c:14897
#define CSI_BEGIN
#define STR_NEW0()
Definition: ripper.c:422
uint_least8_t yytype_uint8
Definition: ripper.c:1837
#define rb_warn3L(l, fmt, a, b, c)
Definition: ripper.c:1083
#define CSI_SGR
#define STR_FUNC_EXPAND
Definition: ripper.c:14065
#define rb_warning1(fmt, a)
Definition: ripper.c:1076
#define YYERROR
Definition: ripper.c:5895
void * rb_parser_calloc(struct parser_params *p, size_t nelem, size_t size)
Definition: ripper.c:20945
#define YYSIZEOF(X)
Definition: ripper.c:1890
#define YYFPRINTF
Definition: ripper.c:150
const unsigned int ruby_global_name_punct_bits[(0x7e - 0x20+31)/32]
Definition: ripper.c:14900
#define YYSTACK_ALLOC
Definition: ripper.c:2014
#define YYDPRINTF(Args)
Definition: ripper.c:6330
VALUE rb_parser_lex_state_name(enum lex_state_e state)
Definition: ripper.c:18310
#define peekc_n(p, n)
Definition: ripper.c:14109
#define compile_error
Definition: ripper.c:1131
#define IS_AFTER_OPERATOR()
Definition: ripper.c:14965
#define YY_USE(E)
Definition: ripper.c:1930
#define RREGEXP_PTR(obj)
Definition: rregexp.h:32
#define StringValue(v)
Definition: rstring.h:50
#define RSTRING_GETMEM(str, ptrvar, lenvar)
Definition: rstring.h:211
#define StringValueCStr(v)
Definition: rstring.h:52
#define TypedData_Get_Struct(obj, type, data_type, sval)
Definition: rtypeddata.h:130
@ RUBY_TYPED_FREE_IMMEDIATELY
Definition: rtypeddata.h:62
#define TypedData_Make_Struct(klass, type, data_type, sval)
Definition: rtypeddata.h:122
const char * rb_obj_classname(VALUE)
Definition: variable.c:308
#define InitVM(ext)
Definition: ruby.h:112
int argc
Definition: ruby.c:240
char ** argv
Definition: ruby.c:241
unsigned char uint8_t
Definition: sha2.h:100
rb_atomic_t cnt[RUBY_NSIG]
Definition: signal.c:508
#define Qundef
#define SPECIAL_CONST_P
#define Qtrue
#define RTEST
#define Qnil
#define Qfalse
#define NIL_P
#define FIXNUM_P
#define f
VALUE rb_vsprintf(const char *, va_list)
Definition: sprintf.c:1197
VALUE rb_str_vcatf(VALUE, const char *, va_list)
Definition: sprintf.c:1216
VALUE rb_str_catf(VALUE, const char *,...)
Definition: sprintf.c:1243
VALUE rb_sprintf(const char *,...)
Definition: sprintf.c:1203
#define malloc
Definition: st.c:170
@ ST_CONTINUE
Definition: st.h:99
unsigned long st_data_t
Definition: st.h:22
#define st_init_numtable_with_size
Definition: st.h:108
#define st_is_member(table, key)
Definition: st.h:97
#define st_foreach
Definition: st.h:142
#define st_init_numtable
Definition: st.h:106
#define st_lookup
Definition: st.h:128
#define st_insert
Definition: st.h:124
#define st_free_table
Definition: st.h:156
size_t strlen(const char *)
Definition: node.h:149
rb_code_location_t nd_loc
Definition: node.h:172
VALUE flags
Definition: node.h:150
Definition: parse.h:205
int last_line
Definition: parse.h:208
int first_column
Definition: parse.h:207
int first_line
Definition: parse.h:206
int last_column
Definition: parse.h:209
Definition: inftree9.h:24
Definition: gzappend.c:170
Definition: lex.c:34
short id[2]
Definition: lex.c:34
short state
Definition: lex.c:34
unsigned int in_kwarg
Definition: ripper.c:126
BITFIELD(enum shareability, shareable_constant_value, 2)
unsigned int in_defined
Definition: ripper.c:125
unsigned int in_class
Definition: ripper.c:128
unsigned int in_def
Definition: ripper.c:127
struct local_vars * prev
Definition: ripper.c:268
struct local_vars::@65 numparam
NODE * current
Definition: ripper.c:271
struct vtable * vars
Definition: ripper.c:263
NODE * outer
Definition: ripper.c:271
NODE * inner
Definition: ripper.c:271
struct vtable * args
Definition: ripper.c:262
struct vtable * used
Definition: ripper.c:264
rb_magic_comment_length_t length
Definition: ripper.c:15796
rb_magic_comment_setter_t func
Definition: ripper.c:15795
const char * name
Definition: ripper.c:15794
VALUE(* gets)(struct parser_params *, VALUE)
Definition: ripper.c:324
int brace_nest
Definition: ripper.c:343
VALUE compile_option
Definition: ripper.c:364
rb_strterm_t * strterm
Definition: ripper.c:323
st_table * pktbl
Definition: ripper.c:356
const char * ruby_sourcefile
Definition: ripper.c:359
int heredoc_line_indent
Definition: ripper.c:352
unsigned int debug
Definition: ripper.c:381
unsigned int ruby__end__seen
Definition: ripper.c:380
YYSTYPE * lval
Definition: ripper.c:320
unsigned int has_shebang
Definition: ripper.c:382
VALUE(* call)(VALUE, int)
Definition: ripper.c:335
int lpar_beg
Definition: ripper.c:341
int heredoc_end
Definition: ripper.c:350
st_table * pvtbl
Definition: ripper.c:355
int tokline
Definition: ripper.c:349
int line_count
Definition: ripper.c:357
rb_encoding * enc
Definition: ripper.c:361
token_info * token_info
Definition: ripper.c:362
unsigned int do_chomp
Definition: ripper.c:396
VALUE input
Definition: ripper.c:325
char * tokenbuf
Definition: ripper.c:353
VALUE nextline
Definition: ripper.c:328
const char * ptok
Definition: ripper.c:332
rb_imemo_tmpbuf_t * heap
Definition: ripper.c:318
unsigned int token_seen
Definition: ripper.c:383
VALUE debug_lines
Definition: ripper.c:402
unsigned int command_start
Definition: ripper.c:378
enum lex_state_e state
Definition: ripper.c:337
struct parser_params::@66 lex
VALUE lastline
Definition: ripper.c:327
stack_type cond_stack
Definition: ripper.c:345
int node_id
Definition: ripper.c:372
NODE * eval_tree
Definition: ripper.c:400
const char * pend
Definition: ripper.c:331
unsigned int eofp
Definition: ripper.c:379
unsigned int error_p
Definition: ripper.c:388
union parser_params::@66::@67 gets_
int heredoc_indent
Definition: ripper.c:351
VALUE case_labels
Definition: ripper.c:363
int max_numparam
Definition: ripper.c:374
unsigned int do_loop
Definition: ripper.c:395
VALUE debug_buffer
Definition: ripper.c:366
struct lex_context ctxt
Definition: ripper.c:376
const char * pbeg
Definition: ripper.c:329
long ptr
Definition: ripper.c:334
rb_ast_t * ast
Definition: ripper.c:371
const struct rb_iseq_struct * parent_iseq
Definition: ripper.c:403
int ruby_sourceline
Definition: ripper.c:358
unsigned int do_split
Definition: ripper.c:397
unsigned int do_print
Definition: ripper.c:394
NODE * eval_tree_begin
Definition: ripper.c:399
stack_type cmdarg_stack
Definition: ripper.c:346
VALUE error_buffer
Definition: ripper.c:401
VALUE debug_output
Definition: ripper.c:367
unsigned int token_info_enabled
Definition: ripper.c:384
VALUE ruby_sourcefile_string
Definition: ripper.c:360
int paren_nest
Definition: ripper.c:339
int tokidx
Definition: ripper.c:347
const char * pcur
Definition: ripper.c:330
VALUE prevline
Definition: ripper.c:326
int toksiz
Definition: ripper.c:348
struct local_vars * lvtbl
Definition: ripper.c:354
unsigned int cr_seen
Definition: ripper.c:389
Definition: zran.c:68
ID block_arg
Definition: node.h:446
NODE * pre_init
Definition: node.h:437
int post_args_num
Definition: node.h:441
ID first_post_arg
Definition: node.h:443
NODE * kw_args
Definition: node.h:448
unsigned int ruby2_keywords
Definition: node.h:453
VALUE imemo
Definition: node.h:455
NODE * opt_args
Definition: node.h:451
ID rest_arg
Definition: node.h:445
NODE * kw_rest_arg
Definition: node.h:449
NODE * post_init
Definition: node.h:438
unsigned int no_kwarg
Definition: node.h:452
int pre_args_num
Definition: node.h:440
NODE * rest_arg
Definition: node.h:460
NODE * post_args
Definition: node.h:461
NODE * pre_args
Definition: node.h:459
const NODE * root
Definition: node.h:399
VALUE compile_option
Definition: node.h:400
rb_ast_body_t body
Definition: node.h:406
rb_code_position_t beg_pos
Definition: node.h:136
rb_code_position_t end_pos
Definition: node.h:137
NODE * post_rest_arg
Definition: node.h:467
NODE * pre_rest_arg
Definition: node.h:465
struct rb_imemo_tmpbuf_struct * next
Definition: imemo.h:97
union rb_strterm_literal_struct::@68 u0
union rb_strterm_literal_struct::@71 u3
union rb_strterm_literal_struct::@70 u2
union rb_strterm_literal_struct::@69 u1
rb_strterm_literal_t literal
Definition: ripper.c:821
union rb_strterm_struct::@72 u
rb_strterm_heredoc_t heredoc
Definition: ripper.c:822
const YYLTYPE * loc
Definition: ripper.c:20504
struct parser_params * parser
Definition: ripper.c:20501
Definition: st.h:79
Definition: blast.c:41
int nonspc
Definition: ripper.c:302
int indent
Definition: ripper.c:301
rb_code_position_t beg
Definition: ripper.c:300
const char * token
Definition: ripper.c:299
struct token_info * next
Definition: ripper.c:303
Definition: ripper.c:254
ID * tbl
Definition: ripper.c:255
int capa
Definition: ripper.c:257
struct vtable * prev
Definition: ripper.c:258
int pos
Definition: ripper.c:256
yysymbol_kind_t yytoken
Definition: ripper.c:6358
yy_state_t * yyssp
Definition: ripper.c:6357
YYLTYPE * yylloc
Definition: ripper.c:6359
#define t
Definition: symbol.c:253
#define is_identchar(p, e, enc)
Definition: symbol.c:45
int rb_enc_symname_type(const char *name, long len, rb_encoding *enc, unsigned int allowed_attrset)
Definition: symbol.c:365
#define STATIC_ID2SYM(id)
Definition: symbol.h:18
#define is_attrset_id(id)
Definition: symbol.h:39
#define is_notop_id(id)
Definition: symbol.h:35
#define is_local_id(id)
Definition: symbol.h:36
Definition: parse.h:183
struct rb_strterm_struct * strterm
Definition: parse.h:191
ID id
Definition: parse.h:187
struct lex_context ctxt
Definition: parse.h:192
VALUE val
Definition: parse.h:185
int num
Definition: parse.h:188
NODE * node
Definition: parse.h:186
st_table * tbl
Definition: parse.h:189
const struct vtable * vars
Definition: parse.h:190
void error(const char *msg)
Definition: untgz.c:593
#define ALLOC(size)
Definition: unzip.c:112
unsigned long VALUE
Definition: value.h:38
#define SIZEOF_VALUE
Definition: value.h:41
unsigned long ID
Definition: value.h:39
#define T_COMPLEX
Definition: value_type.h:58
#define TYPE(_)
Definition: value_type.h:105
#define T_FILE
Definition: value_type.h:61
#define T_STRING
Definition: value_type.h:77
#define T_FLOAT
Definition: value_type.h:63
#define T_BIGNUM
Definition: value_type.h:56
#define T_NODE
Definition: value_type.h:72
#define T_RATIONAL
Definition: value_type.h:75
#define T_HASH
Definition: value_type.h:64
#define T_ARRAY
Definition: value_type.h:55
#define T_OBJECT
Definition: value_type.h:74
#define BUILTIN_TYPE
Definition: value_type.h:84
#define SYMBOL_P
Definition: value_type.h:87
#define T_REGEXP
Definition: value_type.h:76
#define rb_id2str(id)
Definition: vm_backtrace.c:30
#define EOF
Definition: vsnprintf.c:203
int err
Definition: win32.c:142
if((ID)(DISPID) nameid !=nameid)
Definition: win32ole.c:357
void rb_write_error_str(VALUE mesg)
Definition: io.c:8083
#define xfree
Definition: xmalloc.h:49
#define xrealloc
Definition: xmalloc.h:47
#define xmalloc
Definition: xmalloc.h:44
#define xcalloc
Definition: xmalloc.h:46
#define MAX_WORD_LENGTH
Definition: zonetab.h:45
int def(FILE *source, FILE *dest, int level)
Definition: zpipe.c:36
#define ZALLOC(strm, items, size)
Definition: zutil.h:266