Ruby 3.1.4p223 (2023-03-30 revision HEAD)
ripper.c
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
82#include "ruby/internal/config.h"
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/variable.h"
105#include "node.h"
106#include "probes.h"
107#include "regenc.h"
108#include "ruby/encoding.h"
109#include "ruby/regex.h"
110#include "ruby/ruby.h"
111#include "ruby/st.h"
112#include "ruby/util.h"
113#include "ruby/ractor.h"
114#include "symbol.h"
115
116enum shareability {
117 shareable_none,
118 shareable_literal,
119 shareable_copy,
120 shareable_everything,
121};
122
123struct lex_context {
124 unsigned int in_defined: 1;
125 unsigned int in_kwarg: 1;
126 unsigned int in_argdef: 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#define YY_(Msgid) \
169 (((Msgid)[0] == 'm') && (strcmp((Msgid), "memory exhausted") == 0) ? \
170 "nesting too deep" : (Msgid))
171
172#define RUBY_SET_YYLLOC_FROM_STRTERM_HEREDOC(Current) \
173 rb_parser_set_location_from_strterm_heredoc(p, &p->lex.strterm->u.heredoc, &(Current))
174#define RUBY_SET_YYLLOC_OF_NONE(Current) \
175 rb_parser_set_location_of_none(p, &(Current))
176#define RUBY_SET_YYLLOC(Current) \
177 rb_parser_set_location(p, &(Current))
178#define RUBY_INIT_YYLLOC() \
179 { \
180 {p->ruby_sourceline, (int)(p->lex.ptok - p->lex.pbeg)}, \
181 {p->ruby_sourceline, (int)(p->lex.pcur - p->lex.pbeg)}, \
182 }
183
184enum lex_state_bits {
185 EXPR_BEG_bit, /* ignore newline, +/- is a sign. */
186 EXPR_END_bit, /* newline significant, +/- is an operator. */
187 EXPR_ENDARG_bit, /* ditto, and unbound braces. */
188 EXPR_ENDFN_bit, /* ditto, and unbound braces. */
189 EXPR_ARG_bit, /* newline significant, +/- is an operator. */
190 EXPR_CMDARG_bit, /* newline significant, +/- is an operator. */
191 EXPR_MID_bit, /* newline significant, +/- is an operator. */
192 EXPR_FNAME_bit, /* ignore newline, no reserved words. */
193 EXPR_DOT_bit, /* right after `.' or `::', no reserved words. */
194 EXPR_CLASS_bit, /* immediate after `class', no here document. */
195 EXPR_LABEL_bit, /* flag bit, label is allowed. */
196 EXPR_LABELED_bit, /* flag bit, just after a label. */
197 EXPR_FITEM_bit, /* symbol literal as FNAME. */
198 EXPR_MAX_STATE
199};
200/* examine combinations */
201enum lex_state_e {
202#define DEF_EXPR(n) EXPR_##n = (1 << EXPR_##n##_bit)
203 DEF_EXPR(BEG),
204 DEF_EXPR(END),
205 DEF_EXPR(ENDARG),
206 DEF_EXPR(ENDFN),
207 DEF_EXPR(ARG),
208 DEF_EXPR(CMDARG),
209 DEF_EXPR(MID),
210 DEF_EXPR(FNAME),
211 DEF_EXPR(DOT),
212 DEF_EXPR(CLASS),
213 DEF_EXPR(LABEL),
214 DEF_EXPR(LABELED),
215 DEF_EXPR(FITEM),
216 EXPR_VALUE = EXPR_BEG,
217 EXPR_BEG_ANY = (EXPR_BEG | EXPR_MID | EXPR_CLASS),
218 EXPR_ARG_ANY = (EXPR_ARG | EXPR_CMDARG),
219 EXPR_END_ANY = (EXPR_END | EXPR_ENDARG | EXPR_ENDFN),
220 EXPR_NONE = 0
221};
222#define IS_lex_state_for(x, ls) ((x) & (ls))
223#define IS_lex_state_all_for(x, ls) (((x) & (ls)) == (ls))
224#define IS_lex_state(ls) IS_lex_state_for(p->lex.state, (ls))
225#define IS_lex_state_all(ls) IS_lex_state_all_for(p->lex.state, (ls))
226
227# define SET_LEX_STATE(ls) \
228 parser_set_lex_state(p, ls, __LINE__)
229static inline enum lex_state_e parser_set_lex_state(struct parser_params *p, enum lex_state_e ls, int line);
230
231typedef VALUE stack_type;
232
233static const rb_code_location_t NULL_LOC = { {0, -1}, {0, -1} };
234
235# define SHOW_BITSTACK(stack, name) (p->debug ? rb_parser_show_bitstack(p, stack, name, __LINE__) : (void)0)
236# define BITSTACK_PUSH(stack, n) (((p->stack) = ((p->stack)<<1)|((n)&1)), SHOW_BITSTACK(p->stack, #stack"(push)"))
237# define BITSTACK_POP(stack) (((p->stack) = (p->stack) >> 1), SHOW_BITSTACK(p->stack, #stack"(pop)"))
238# define BITSTACK_SET_P(stack) (SHOW_BITSTACK(p->stack, #stack), (p->stack)&1)
239# define BITSTACK_SET(stack, n) ((p->stack)=(n), SHOW_BITSTACK(p->stack, #stack"(set)"))
240
241/* A flag to identify keyword_do_cond, "do" keyword after condition expression.
242 Examples: `while ... do`, `until ... do`, and `for ... in ... do` */
243#define COND_PUSH(n) BITSTACK_PUSH(cond_stack, (n))
244#define COND_POP() BITSTACK_POP(cond_stack)
245#define COND_P() BITSTACK_SET_P(cond_stack)
246#define COND_SET(n) BITSTACK_SET(cond_stack, (n))
247
248/* A flag to identify keyword_do_block; "do" keyword after command_call.
249 Example: `foo 1, 2 do`. */
250#define CMDARG_PUSH(n) BITSTACK_PUSH(cmdarg_stack, (n))
251#define CMDARG_POP() BITSTACK_POP(cmdarg_stack)
252#define CMDARG_P() BITSTACK_SET_P(cmdarg_stack)
253#define CMDARG_SET(n) BITSTACK_SET(cmdarg_stack, (n))
254
255struct vtable {
256 ID *tbl;
257 int pos;
258 int capa;
259 struct vtable *prev;
260};
261
262struct local_vars {
263 struct vtable *args;
264 struct vtable *vars;
265 struct vtable *used;
266# if WARN_PAST_SCOPE
267 struct vtable *past;
268# endif
269 struct local_vars *prev;
270# ifndef RIPPER
271 struct {
272 NODE *outer, *inner, *current;
273 } numparam;
274# endif
275};
276
277enum {
278 ORDINAL_PARAM = -1,
279 NO_PARAM = 0,
280 NUMPARAM_MAX = 9,
281};
282
283#define NUMPARAM_ID_P(id) numparam_id_p(id)
284#define NUMPARAM_ID_TO_IDX(id) (unsigned int)(((id) >> ID_SCOPE_SHIFT) - tNUMPARAM_1 + 1)
285#define NUMPARAM_IDX_TO_ID(idx) TOKEN2LOCALID((tNUMPARAM_1 + (idx) - 1))
286static int
287numparam_id_p(ID id)
288{
289 if (!is_local_id(id)) return 0;
290 unsigned int idx = NUMPARAM_ID_TO_IDX(id);
291 return idx > 0 && idx <= NUMPARAM_MAX;
292}
293static void numparam_name(struct parser_params *p, ID id);
294
295#define DVARS_INHERIT ((void*)1)
296#define DVARS_TOPSCOPE NULL
297#define DVARS_TERMINAL_P(tbl) ((tbl) == DVARS_INHERIT || (tbl) == DVARS_TOPSCOPE)
298
299typedef struct token_info {
300 const char *token;
302 int indent;
303 int nonspc;
304 struct token_info *next;
305} token_info;
306
307typedef struct rb_strterm_struct rb_strterm_t;
308
309/*
310 Structure of Lexer Buffer:
311
312 lex.pbeg lex.ptok lex.pcur lex.pend
313 | | | |
314 |------------+------------+------------|
315 |<---------->|
316 token
317*/
318struct parser_params {
319 rb_imemo_tmpbuf_t *heap;
320
321 YYSTYPE *lval;
322
323 struct {
324 rb_strterm_t *strterm;
325 VALUE (*gets)(struct parser_params*,VALUE);
326 VALUE input;
327 VALUE prevline;
328 VALUE lastline;
329 VALUE nextline;
330 const char *pbeg;
331 const char *pcur;
332 const char *pend;
333 const char *ptok;
334 union {
335 long ptr;
336 VALUE (*call)(VALUE, int);
337 } gets_;
338 enum lex_state_e state;
339 /* track the nest level of any parens "()[]{}" */
340 int paren_nest;
341 /* keep p->lex.paren_nest at the beginning of lambda "->" to detect tLAMBEG and keyword_do_LAMBDA */
342 int lpar_beg;
343 /* track the nest level of only braces "{}" */
344 int brace_nest;
345 } lex;
346 stack_type cond_stack;
347 stack_type cmdarg_stack;
348 int tokidx;
349 int toksiz;
350 int tokline;
351 int heredoc_end;
352 int heredoc_indent;
353 int heredoc_line_indent;
354 char *tokenbuf;
355 struct local_vars *lvtbl;
356 st_table *pvtbl;
357 st_table *pktbl;
358 int line_count;
359 int ruby_sourceline; /* current line no. */
360 const char *ruby_sourcefile; /* current source file */
361 VALUE ruby_sourcefile_string;
362 rb_encoding *enc;
364 VALUE case_labels;
365 VALUE compile_option;
366
367 VALUE debug_buffer;
368 VALUE debug_output;
369
370 ID cur_arg;
371
372 rb_ast_t *ast;
373 int node_id;
374
375 int max_numparam;
376
377 struct lex_context ctxt;
378
379 unsigned int command_start:1;
380 unsigned int eofp: 1;
381 unsigned int ruby__end__seen: 1;
382 unsigned int debug: 1;
383 unsigned int has_shebang: 1;
384 unsigned int token_seen: 1;
385 unsigned int token_info_enabled: 1;
386# if WARN_PAST_SCOPE
387 unsigned int past_scope_enabled: 1;
388# endif
389 unsigned int error_p: 1;
390 unsigned int cr_seen: 1;
391
392#ifndef RIPPER
393 /* Ruby core only */
394
395 unsigned int do_print: 1;
396 unsigned int do_loop: 1;
397 unsigned int do_chomp: 1;
398 unsigned int do_split: 1;
399 unsigned int keep_script_lines: 1;
400
401 NODE *eval_tree_begin;
402 NODE *eval_tree;
403 VALUE error_buffer;
404 VALUE debug_lines;
405 const struct rb_iseq_struct *parent_iseq;
406#else
407 /* Ripper only */
408
409 struct {
410 VALUE token;
411 int line;
412 int col;
413 } delayed;
414
415 VALUE value;
416 VALUE result;
417 VALUE parsing_thread;
418#endif
419};
420
421#define intern_cstr(n,l,en) rb_intern3(n,l,en)
422
423#define STR_NEW(ptr,len) rb_enc_str_new((ptr),(len),p->enc)
424#define STR_NEW0() rb_enc_str_new(0,0,p->enc)
425#define STR_NEW2(ptr) rb_enc_str_new((ptr),strlen(ptr),p->enc)
426#define STR_NEW3(ptr,len,e,func) parser_str_new((ptr),(len),(e),(func),p->enc)
427#define TOK_INTERN() intern_cstr(tok(p), toklen(p), p->enc)
428
429static st_table *
430push_pvtbl(struct parser_params *p)
431{
432 st_table *tbl = p->pvtbl;
433 p->pvtbl = st_init_numtable();
434 return tbl;
435}
436
437static void
438pop_pvtbl(struct parser_params *p, st_table *tbl)
439{
440 st_free_table(p->pvtbl);
441 p->pvtbl = tbl;
442}
443
444static st_table *
445push_pktbl(struct parser_params *p)
446{
447 st_table *tbl = p->pktbl;
448 p->pktbl = 0;
449 return tbl;
450}
451
452static void
453pop_pktbl(struct parser_params *p, st_table *tbl)
454{
455 if (p->pktbl) st_free_table(p->pktbl);
456 p->pktbl = tbl;
457}
458
459RBIMPL_ATTR_NONNULL((1, 2, 3))
460static int parser_yyerror(struct parser_params*, const YYLTYPE *yylloc, const char*);
462static int parser_yyerror0(struct parser_params*, const char*);
463#define yyerror0(msg) parser_yyerror0(p, (msg))
464#define yyerror1(loc, msg) parser_yyerror(p, (loc), (msg))
465#define yyerror(yylloc, p, msg) parser_yyerror(p, yylloc, msg)
466#define token_flush(ptr) ((ptr)->lex.ptok = (ptr)->lex.pcur)
467
468static void token_info_setup(token_info *ptinfo, const char *ptr, const rb_code_location_t *loc);
469static void token_info_push(struct parser_params*, const char *token, const rb_code_location_t *loc);
470static void token_info_pop(struct parser_params*, const char *token, const rb_code_location_t *loc);
471static void token_info_warn(struct parser_params *p, const char *token, token_info *ptinfo_beg, int same, const rb_code_location_t *loc);
472static void token_info_drop(struct parser_params *p, const char *token, rb_code_position_t beg_pos);
473
474#ifdef RIPPER
475#define compile_for_eval (0)
476#else
477#define compile_for_eval (p->parent_iseq != 0)
478#endif
479
480#define token_column ((int)(p->lex.ptok - p->lex.pbeg))
481
482#define CALL_Q_P(q) ((q) == TOKEN2VAL(tANDDOT))
483#define NODE_CALL_Q(q) (CALL_Q_P(q) ? NODE_QCALL : NODE_CALL)
484#define NEW_QCALL(q,r,m,a,loc) NEW_NODE(NODE_CALL_Q(q),r,m,a,loc)
485
486#define lambda_beginning_p() (p->lex.lpar_beg == p->lex.paren_nest)
487
488#define ANON_BLOCK_ID '&'
489
490static enum yytokentype yylex(YYSTYPE*, YYLTYPE*, struct parser_params*);
491
492#ifndef RIPPER
493static inline void
494rb_discard_node(struct parser_params *p, NODE *n)
495{
496 rb_ast_delete_node(p->ast, n);
497}
498#endif
499
500#ifdef RIPPER
501static inline VALUE
502add_mark_object(struct parser_params *p, VALUE obj)
503{
504 if (!SPECIAL_CONST_P(obj)
505 && !RB_TYPE_P(obj, T_NODE) /* Ripper jumbles NODE objects and other objects... */
506 ) {
507 rb_ast_add_mark_object(p->ast, obj);
508 }
509 return obj;
510}
511#else
512static NODE* node_newnode_with_locals(struct parser_params *, enum node_type, VALUE, VALUE, const rb_code_location_t*);
513#endif
514
515static NODE* node_newnode(struct parser_params *, enum node_type, VALUE, VALUE, VALUE, const rb_code_location_t*);
516#define rb_node_newnode(type, a1, a2, a3, loc) node_newnode(p, (type), (a1), (a2), (a3), (loc))
517
518static NODE *nd_set_loc(NODE *nd, const YYLTYPE *loc);
519
520static int
521parser_get_node_id(struct parser_params *p)
522{
523 int node_id = p->node_id;
524 p->node_id++;
525 return node_id;
526}
527
528#ifndef RIPPER
529static inline void
530set_line_body(NODE *body, int line)
531{
532 if (!body) return;
533 switch (nd_type(body)) {
534 case NODE_RESCUE:
535 case NODE_ENSURE:
536 nd_set_line(body, line);
537 }
538}
539
540#define yyparse ruby_yyparse
541
542static NODE* cond(struct parser_params *p, NODE *node, const YYLTYPE *loc);
543static NODE* method_cond(struct parser_params *p, NODE *node, const YYLTYPE *loc);
544#define new_nil(loc) NEW_NIL(loc)
545static NODE *new_nil_at(struct parser_params *p, const rb_code_position_t *pos);
546static NODE *new_if(struct parser_params*,NODE*,NODE*,NODE*,const YYLTYPE*);
547static NODE *new_unless(struct parser_params*,NODE*,NODE*,NODE*,const YYLTYPE*);
548static NODE *logop(struct parser_params*,ID,NODE*,NODE*,const YYLTYPE*,const YYLTYPE*);
549
550static NODE *newline_node(NODE*);
551static void fixpos(NODE*,NODE*);
552
553static int value_expr_gen(struct parser_params*,NODE*);
554static void void_expr(struct parser_params*,NODE*);
555static NODE *remove_begin(NODE*);
556static NODE *remove_begin_all(NODE*);
557#define value_expr(node) value_expr_gen(p, (node))
558static NODE *void_stmts(struct parser_params*,NODE*);
559static void reduce_nodes(struct parser_params*,NODE**);
560static void block_dup_check(struct parser_params*,NODE*,NODE*);
561
562static NODE *block_append(struct parser_params*,NODE*,NODE*);
563static NODE *list_append(struct parser_params*,NODE*,NODE*);
564static NODE *list_concat(NODE*,NODE*);
565static NODE *arg_append(struct parser_params*,NODE*,NODE*,const YYLTYPE*);
566static NODE *last_arg_append(struct parser_params *p, NODE *args, NODE *last_arg, const YYLTYPE *loc);
567static NODE *rest_arg_append(struct parser_params *p, NODE *args, NODE *rest_arg, const YYLTYPE *loc);
568static NODE *literal_concat(struct parser_params*,NODE*,NODE*,const YYLTYPE*);
569static NODE *new_evstr(struct parser_params*,NODE*,const YYLTYPE*);
570static NODE *new_dstr(struct parser_params*,NODE*,const YYLTYPE*);
571static NODE *evstr2dstr(struct parser_params*,NODE*);
572static NODE *splat_array(NODE*);
573static void mark_lvar_used(struct parser_params *p, NODE *rhs);
574
575static NODE *call_bin_op(struct parser_params*,NODE*,ID,NODE*,const YYLTYPE*,const YYLTYPE*);
576static NODE *call_uni_op(struct parser_params*,NODE*,ID,const YYLTYPE*,const YYLTYPE*);
577static NODE *new_qcall(struct parser_params* p, ID atype, NODE *recv, ID mid, NODE *args, const YYLTYPE *op_loc, const YYLTYPE *loc);
578static 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);
579static 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;}
580
581static bool args_info_empty_p(struct rb_args_info *args);
582static NODE *new_args(struct parser_params*,NODE*,NODE*,ID,NODE*,NODE*,const YYLTYPE*);
583static NODE *new_args_tail(struct parser_params*,NODE*,ID,ID,const YYLTYPE*);
584static NODE *new_array_pattern(struct parser_params *p, NODE *constant, NODE *pre_arg, NODE *aryptn, const YYLTYPE *loc);
585static NODE *new_array_pattern_tail(struct parser_params *p, NODE *pre_args, int has_rest, ID rest_arg, NODE *post_args, const YYLTYPE *loc);
586static NODE *new_find_pattern(struct parser_params *p, NODE *constant, NODE *fndptn, const YYLTYPE *loc);
587static NODE *new_find_pattern_tail(struct parser_params *p, ID pre_rest_arg, NODE *args, ID post_rest_arg, const YYLTYPE *loc);
588static NODE *new_hash_pattern(struct parser_params *p, NODE *constant, NODE *hshptn, const YYLTYPE *loc);
589static NODE *new_hash_pattern_tail(struct parser_params *p, NODE *kw_args, ID kw_rest_arg, const YYLTYPE *loc);
590
591static NODE *new_kw_arg(struct parser_params *p, NODE *k, const YYLTYPE *loc);
592static NODE *args_with_numbered(struct parser_params*,NODE*,int);
593
594static VALUE negate_lit(struct parser_params*, VALUE);
595static NODE *ret_args(struct parser_params*,NODE*);
596static NODE *arg_blk_pass(NODE*,NODE*);
597static NODE *new_yield(struct parser_params*,NODE*,const YYLTYPE*);
598static NODE *dsym_node(struct parser_params*,NODE*,const YYLTYPE*);
599
600static NODE *gettable(struct parser_params*,ID,const YYLTYPE*);
601static NODE *assignable(struct parser_params*,ID,NODE*,const YYLTYPE*);
602
603static NODE *aryset(struct parser_params*,NODE*,NODE*,const YYLTYPE*);
604static NODE *attrset(struct parser_params*,NODE*,ID,ID,const YYLTYPE*);
605
606static void rb_backref_error(struct parser_params*,NODE*);
607static NODE *node_assign(struct parser_params*,NODE*,NODE*,struct lex_context,const YYLTYPE*);
608
609static NODE *new_op_assign(struct parser_params *p, NODE *lhs, ID op, NODE *rhs, struct lex_context, const YYLTYPE *loc);
610static NODE *new_ary_op_assign(struct parser_params *p, NODE *ary, NODE *args, ID op, NODE *rhs, const YYLTYPE *args_loc, const YYLTYPE *loc);
611static NODE *new_attr_op_assign(struct parser_params *p, NODE *lhs, ID atype, ID attr, ID op, NODE *rhs, const YYLTYPE *loc);
612static NODE *new_const_op_assign(struct parser_params *p, NODE *lhs, ID op, NODE *rhs, struct lex_context, const YYLTYPE *loc);
613static NODE *new_bodystmt(struct parser_params *p, NODE *head, NODE *rescue, NODE *rescue_else, NODE *ensure, const YYLTYPE *loc);
614
615static NODE *const_decl(struct parser_params *p, NODE* path, const YYLTYPE *loc);
616
617static NODE *opt_arg_append(NODE*, NODE*);
618static NODE *kwd_append(NODE*, NODE*);
619
620static NODE *new_hash(struct parser_params *p, NODE *hash, const YYLTYPE *loc);
621static NODE *new_unique_key_hash(struct parser_params *p, NODE *hash, const YYLTYPE *loc);
622
623static NODE *new_defined(struct parser_params *p, NODE *expr, const YYLTYPE *loc);
624
625static NODE *new_regexp(struct parser_params *, NODE *, int, const YYLTYPE *);
626
627#define make_list(list, loc) ((list) ? (nd_set_loc(list, loc), list) : NEW_ZLIST(loc))
628
629static NODE *new_xstring(struct parser_params *, NODE *, const YYLTYPE *loc);
630
631static NODE *symbol_append(struct parser_params *p, NODE *symbols, NODE *symbol);
632
633static NODE *match_op(struct parser_params*,NODE*,NODE*,const YYLTYPE*,const YYLTYPE*);
634
635static rb_ast_id_table_t *local_tbl(struct parser_params*);
636
637static VALUE reg_compile(struct parser_params*, VALUE, int);
638static void reg_fragment_setenc(struct parser_params*, VALUE, int);
639static int reg_fragment_check(struct parser_params*, VALUE, int);
640static NODE *reg_named_capture_assign(struct parser_params* p, VALUE regexp, const YYLTYPE *loc);
641
642static int literal_concat0(struct parser_params *p, VALUE head, VALUE tail);
643static NODE *heredoc_dedent(struct parser_params*,NODE*);
644
645static void check_literal_when(struct parser_params *p, NODE *args, const YYLTYPE *loc);
646
647#define get_id(id) (id)
648#define get_value(val) (val)
649#define get_num(num) (num)
650#else /* RIPPER */
651#define NODE_RIPPER NODE_CDECL
652#define NEW_RIPPER(a,b,c,loc) (VALUE)NEW_CDECL(a,b,c,loc)
653
654static inline int ripper_is_node_yylval(VALUE n);
655
656static inline VALUE
657ripper_new_yylval(struct parser_params *p, ID a, VALUE b, VALUE c)
658{
659 if (ripper_is_node_yylval(c)) c = RNODE(c)->nd_cval;
660 add_mark_object(p, b);
661 add_mark_object(p, c);
662 return NEW_RIPPER(a, b, c, &NULL_LOC);
663}
664
665static inline int
666ripper_is_node_yylval(VALUE n)
667{
668 return RB_TYPE_P(n, T_NODE) && nd_type_p(RNODE(n), NODE_RIPPER);
669}
670
671#define value_expr(node) ((void)(node))
672#define remove_begin(node) (node)
673#define void_stmts(p,x) (x)
674#define rb_dvar_defined(id, base) 0
675#define rb_local_defined(id, base) 0
676static ID ripper_get_id(VALUE);
677#define get_id(id) ripper_get_id(id)
678static VALUE ripper_get_value(VALUE);
679#define get_value(val) ripper_get_value(val)
680#define get_num(num) (int)get_id(num)
681static VALUE assignable(struct parser_params*,VALUE);
682static int id_is_var(struct parser_params *p, ID id);
683
684#define method_cond(p,node,loc) (node)
685#define call_bin_op(p, recv,id,arg1,op_loc,loc) dispatch3(binary, (recv), STATIC_ID2SYM(id), (arg1))
686#define match_op(p,node1,node2,op_loc,loc) call_bin_op(0, (node1), idEqTilde, (node2), op_loc, loc)
687#define call_uni_op(p, recv,id,op_loc,loc) dispatch2(unary, STATIC_ID2SYM(id), (recv))
688#define logop(p,id,node1,node2,op_loc,loc) call_bin_op(0, (node1), (id), (node2), op_loc, loc)
689
690#define new_nil(loc) Qnil
691
692static VALUE new_regexp(struct parser_params *, VALUE, VALUE, const YYLTYPE *);
693
694static VALUE const_decl(struct parser_params *p, VALUE path);
695
696static VALUE var_field(struct parser_params *p, VALUE a);
697static VALUE assign_error(struct parser_params *p, const char *mesg, VALUE a);
698
699static VALUE parser_reg_compile(struct parser_params*, VALUE, int, VALUE *);
700
701static VALUE backref_error(struct parser_params*, NODE *, VALUE);
702#endif /* !RIPPER */
703
704/* forward declaration */
706
707RUBY_SYMBOL_EXPORT_BEGIN
708VALUE rb_parser_reg_compile(struct parser_params* p, VALUE str, int options);
709int rb_reg_fragment_setenc(struct parser_params*, VALUE, int);
710enum lex_state_e rb_parser_trace_lex_state(struct parser_params *, enum lex_state_e, enum lex_state_e, int);
711VALUE rb_parser_lex_state_name(enum lex_state_e state);
712void rb_parser_show_bitstack(struct parser_params *, stack_type, const char *, int);
713PRINTF_ARGS(void rb_parser_fatal(struct parser_params *p, const char *fmt, ...), 2, 3);
714YYLTYPE *rb_parser_set_location_from_strterm_heredoc(struct parser_params *p, rb_strterm_heredoc_t *here, YYLTYPE *yylloc);
715YYLTYPE *rb_parser_set_location_of_none(struct parser_params *p, YYLTYPE *yylloc);
716YYLTYPE *rb_parser_set_location(struct parser_params *p, YYLTYPE *yylloc);
717RUBY_SYMBOL_EXPORT_END
718
719static void error_duplicate_pattern_variable(struct parser_params *p, ID id, const YYLTYPE *loc);
720static void error_duplicate_pattern_key(struct parser_params *p, ID id, const YYLTYPE *loc);
721#ifndef RIPPER
722static ID formal_argument(struct parser_params*, ID);
723#else
724static ID formal_argument(struct parser_params*, VALUE);
725#endif
726static ID shadowing_lvar(struct parser_params*,ID);
727static void new_bv(struct parser_params*,ID);
728
729static void local_push(struct parser_params*,int);
730static void local_pop(struct parser_params*);
731static void local_var(struct parser_params*, ID);
732static void arg_var(struct parser_params*, ID);
733static int local_id(struct parser_params *p, ID id);
734static int local_id_ref(struct parser_params*, ID, ID **);
735#ifndef RIPPER
736static ID internal_id(struct parser_params*);
737static NODE *new_args_forward_call(struct parser_params*, NODE*, const YYLTYPE*, const YYLTYPE*);
738#endif
739static int check_forwarding_args(struct parser_params*);
740static void add_forwarding_args(struct parser_params *p);
741
742static const struct vtable *dyna_push(struct parser_params *);
743static void dyna_pop(struct parser_params*, const struct vtable *);
744static int dyna_in_block(struct parser_params*);
745#define dyna_var(p, id) local_var(p, id)
746static int dvar_defined(struct parser_params*, ID);
747static int dvar_defined_ref(struct parser_params*, ID, ID**);
748static int dvar_curr(struct parser_params*,ID);
749
750static int lvar_defined(struct parser_params*, ID);
751
752static NODE *numparam_push(struct parser_params *p);
753static void numparam_pop(struct parser_params *p, NODE *prev_inner);
754
755#ifdef RIPPER
756# define METHOD_NOT idNOT
757#else
758# define METHOD_NOT '!'
759#endif
760
761#define idFWD_REST '*'
762#ifdef RUBY3_KEYWORDS
763#define idFWD_KWREST idPow /* Use simple "**", as tDSTAR is "**arg" */
764#else
765#define idFWD_KWREST 0
766#endif
767#define idFWD_BLOCK '&'
768
769#define RE_OPTION_ONCE (1<<16)
770#define RE_OPTION_ENCODING_SHIFT 8
771#define RE_OPTION_ENCODING(e) (((e)&0xff)<<RE_OPTION_ENCODING_SHIFT)
772#define RE_OPTION_ENCODING_IDX(o) (((o)>>RE_OPTION_ENCODING_SHIFT)&0xff)
773#define RE_OPTION_ENCODING_NONE(o) ((o)&RE_OPTION_ARG_ENCODING_NONE)
774#define RE_OPTION_MASK 0xff
775#define RE_OPTION_ARG_ENCODING_NONE 32
776
777/* structs for managing terminator of string literal and heredocment */
778typedef struct rb_strterm_literal_struct {
779 union {
780 VALUE dummy;
781 long nest;
782 } u0;
783 union {
784 VALUE dummy;
785 long func; /* STR_FUNC_* (e.g., STR_FUNC_ESCAPE and STR_FUNC_EXPAND) */
786 } u1;
787 union {
788 VALUE dummy;
789 long paren; /* '(' of `%q(...)` */
790 } u2;
791 union {
792 VALUE dummy;
793 long term; /* ')' of `%q(...)` */
794 } u3;
796
797#define HERETERM_LENGTH_BITS ((SIZEOF_VALUE - 1) * CHAR_BIT - 1)
798
800 VALUE lastline; /* the string of line that contains `<<"END"` */
801 long offset; /* the column of END in `<<"END"` */
802 int sourceline; /* lineno of the line that contains `<<"END"` */
803 unsigned length /* the length of END in `<<"END"` */
804#if HERETERM_LENGTH_BITS < SIZEOF_INT * CHAR_BIT
805 : HERETERM_LENGTH_BITS
806# define HERETERM_LENGTH_MAX ((1U << HERETERM_LENGTH_BITS) - 1)
807#else
808# define HERETERM_LENGTH_MAX UINT_MAX
809#endif
810 ;
811#if HERETERM_LENGTH_BITS < SIZEOF_INT * CHAR_BIT
812 unsigned quote: 1;
813 unsigned func: 8;
814#else
815 uint8_t quote;
816 uint8_t func;
817#endif
818};
819STATIC_ASSERT(rb_strterm_heredoc_t, sizeof(rb_strterm_heredoc_t) <= 4 * SIZEOF_VALUE);
820
821#define STRTERM_HEREDOC IMEMO_FL_USER0
822
823struct rb_strterm_struct {
824 VALUE flags;
825 union {
826 rb_strterm_literal_t literal;
827 rb_strterm_heredoc_t heredoc;
828 } u;
829};
830
831#ifndef RIPPER
832void
833rb_strterm_mark(VALUE obj)
834{
835 rb_strterm_t *strterm = (rb_strterm_t*)obj;
836 if (RBASIC(obj)->flags & STRTERM_HEREDOC) {
837 rb_strterm_heredoc_t *heredoc = &strterm->u.heredoc;
838 rb_gc_mark(heredoc->lastline);
839 }
840}
841#endif
842
843#define yytnamerr(yyres, yystr) (YYSIZE_T)rb_yytnamerr(p, yyres, yystr)
844size_t rb_yytnamerr(struct parser_params *p, char *yyres, const char *yystr);
845
846#define TOKEN2ID(tok) ( \
847 tTOKEN_LOCAL_BEGIN<(tok)&&(tok)<tTOKEN_LOCAL_END ? TOKEN2LOCALID(tok) : \
848 tTOKEN_INSTANCE_BEGIN<(tok)&&(tok)<tTOKEN_INSTANCE_END ? TOKEN2INSTANCEID(tok) : \
849 tTOKEN_GLOBAL_BEGIN<(tok)&&(tok)<tTOKEN_GLOBAL_END ? TOKEN2GLOBALID(tok) : \
850 tTOKEN_CONST_BEGIN<(tok)&&(tok)<tTOKEN_CONST_END ? TOKEN2CONSTID(tok) : \
851 tTOKEN_CLASS_BEGIN<(tok)&&(tok)<tTOKEN_CLASS_END ? TOKEN2CLASSID(tok) : \
852 tTOKEN_ATTRSET_BEGIN<(tok)&&(tok)<tTOKEN_ATTRSET_END ? TOKEN2ATTRSETID(tok) : \
853 ((tok) / ((tok)<tPRESERVED_ID_END && ((tok)>=128 || rb_ispunct(tok)))))
854
855/****** Ripper *******/
856
857#ifdef RIPPER
858#define RIPPER_VERSION "0.1.0"
859
860static inline VALUE intern_sym(const char *name);
861
862#include "eventids1.c"
863#include "eventids2.c"
864
865static VALUE ripper_dispatch0(struct parser_params*,ID);
866static VALUE ripper_dispatch1(struct parser_params*,ID,VALUE);
867static VALUE ripper_dispatch2(struct parser_params*,ID,VALUE,VALUE);
868static VALUE ripper_dispatch3(struct parser_params*,ID,VALUE,VALUE,VALUE);
869static VALUE ripper_dispatch4(struct parser_params*,ID,VALUE,VALUE,VALUE,VALUE);
870static VALUE ripper_dispatch5(struct parser_params*,ID,VALUE,VALUE,VALUE,VALUE,VALUE);
871static VALUE ripper_dispatch7(struct parser_params*,ID,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE);
872static void ripper_error(struct parser_params *p);
873
874#define dispatch0(n) ripper_dispatch0(p, TOKEN_PASTE(ripper_id_, n))
875#define dispatch1(n,a) ripper_dispatch1(p, TOKEN_PASTE(ripper_id_, n), (a))
876#define dispatch2(n,a,b) ripper_dispatch2(p, TOKEN_PASTE(ripper_id_, n), (a), (b))
877#define dispatch3(n,a,b,c) ripper_dispatch3(p, TOKEN_PASTE(ripper_id_, n), (a), (b), (c))
878#define dispatch4(n,a,b,c,d) ripper_dispatch4(p, TOKEN_PASTE(ripper_id_, n), (a), (b), (c), (d))
879#define dispatch5(n,a,b,c,d,e) ripper_dispatch5(p, TOKEN_PASTE(ripper_id_, n), (a), (b), (c), (d), (e))
880#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))
881
882#define yyparse ripper_yyparse
883
884#define ID2VAL(id) STATIC_ID2SYM(id)
885#define TOKEN2VAL(t) ID2VAL(TOKEN2ID(t))
886#define KWD2EID(t, v) ripper_new_yylval(p, keyword_##t, get_value(v), 0)
887
888#define params_new(pars, opts, rest, pars2, kws, kwrest, blk) \
889 dispatch7(params, (pars), (opts), (rest), (pars2), (kws), (kwrest), (blk))
890
891#define escape_Qundef(x) ((x)==Qundef ? Qnil : (x))
892
893static inline VALUE
894new_args(struct parser_params *p, VALUE pre_args, VALUE opt_args, VALUE rest_arg, VALUE post_args, VALUE tail, YYLTYPE *loc)
895{
896 NODE *t = (NODE *)tail;
897 VALUE kw_args = t->u1.value, kw_rest_arg = t->u2.value, block = t->u3.value;
898 return params_new(pre_args, opt_args, rest_arg, post_args, kw_args, kw_rest_arg, escape_Qundef(block));
899}
900
901static inline VALUE
902new_args_tail(struct parser_params *p, VALUE kw_args, VALUE kw_rest_arg, VALUE block, YYLTYPE *loc)
903{
904 NODE *t = rb_node_newnode(NODE_ARGS_AUX, kw_args, kw_rest_arg, block, &NULL_LOC);
905 add_mark_object(p, kw_args);
906 add_mark_object(p, kw_rest_arg);
907 add_mark_object(p, block);
908 return (VALUE)t;
909}
910
911static inline VALUE
912args_with_numbered(struct parser_params *p, VALUE args, int max_numparam)
913{
914 return args;
915}
916
917static VALUE
918new_array_pattern(struct parser_params *p, VALUE constant, VALUE pre_arg, VALUE aryptn, const YYLTYPE *loc)
919{
920 NODE *t = (NODE *)aryptn;
921 VALUE pre_args = t->u1.value, rest_arg = t->u2.value, post_args = t->u3.value;
922
923 if (!NIL_P(pre_arg)) {
924 if (!NIL_P(pre_args)) {
925 rb_ary_unshift(pre_args, pre_arg);
926 }
927 else {
928 pre_args = rb_ary_new_from_args(1, pre_arg);
929 }
930 }
931 return dispatch4(aryptn, constant, pre_args, rest_arg, post_args);
932}
933
934static VALUE
935new_array_pattern_tail(struct parser_params *p, VALUE pre_args, VALUE has_rest, VALUE rest_arg, VALUE post_args, const YYLTYPE *loc)
936{
937 NODE *t;
938
939 if (has_rest) {
940 rest_arg = dispatch1(var_field, rest_arg ? rest_arg : Qnil);
941 }
942 else {
943 rest_arg = Qnil;
944 }
945
946 t = rb_node_newnode(NODE_ARYPTN, pre_args, rest_arg, post_args, &NULL_LOC);
947 add_mark_object(p, pre_args);
948 add_mark_object(p, rest_arg);
949 add_mark_object(p, post_args);
950 return (VALUE)t;
951}
952
953static VALUE
954new_find_pattern(struct parser_params *p, VALUE constant, VALUE fndptn, const YYLTYPE *loc)
955{
956 NODE *t = (NODE *)fndptn;
957 VALUE pre_rest_arg = t->u1.value, args = t->u2.value, post_rest_arg = t->u3.value;
958
959 return dispatch4(fndptn, constant, pre_rest_arg, args, post_rest_arg);
960}
961
962static VALUE
963new_find_pattern_tail(struct parser_params *p, VALUE pre_rest_arg, VALUE args, VALUE post_rest_arg, const YYLTYPE *loc)
964{
965 NODE *t;
966
967 pre_rest_arg = dispatch1(var_field, pre_rest_arg ? pre_rest_arg : Qnil);
968 post_rest_arg = dispatch1(var_field, post_rest_arg ? post_rest_arg : Qnil);
969
970 t = rb_node_newnode(NODE_FNDPTN, pre_rest_arg, args, post_rest_arg, &NULL_LOC);
971 add_mark_object(p, pre_rest_arg);
972 add_mark_object(p, args);
973 add_mark_object(p, post_rest_arg);
974 return (VALUE)t;
975}
976
977#define new_hash(p,h,l) rb_ary_new_from_args(0)
978
979static VALUE
980new_unique_key_hash(struct parser_params *p, VALUE ary, const YYLTYPE *loc)
981{
982 return ary;
983}
984
985static VALUE
986new_hash_pattern(struct parser_params *p, VALUE constant, VALUE hshptn, const YYLTYPE *loc)
987{
988 NODE *t = (NODE *)hshptn;
989 VALUE kw_args = t->u1.value, kw_rest_arg = t->u2.value;
990 return dispatch3(hshptn, constant, kw_args, kw_rest_arg);
991}
992
993static VALUE
994new_hash_pattern_tail(struct parser_params *p, VALUE kw_args, VALUE kw_rest_arg, const YYLTYPE *loc)
995{
996 NODE *t;
997 if (kw_rest_arg) {
998 kw_rest_arg = dispatch1(var_field, kw_rest_arg);
999 }
1000 else {
1001 kw_rest_arg = Qnil;
1002 }
1003 t = rb_node_newnode(NODE_HSHPTN, kw_args, kw_rest_arg, 0, &NULL_LOC);
1004
1005 add_mark_object(p, kw_args);
1006 add_mark_object(p, kw_rest_arg);
1007 return (VALUE)t;
1008}
1009
1010#define new_defined(p,expr,loc) dispatch1(defined, (expr))
1011
1012static VALUE heredoc_dedent(struct parser_params*,VALUE);
1013
1014#else
1015#define ID2VAL(id) (id)
1016#define TOKEN2VAL(t) ID2VAL(t)
1017#define KWD2EID(t, v) keyword_##t
1018
1019static NODE *
1020set_defun_body(struct parser_params *p, NODE *n, NODE *args, NODE *body, const YYLTYPE *loc)
1021{
1022 body = remove_begin(body);
1023 reduce_nodes(p, &body);
1024 n->nd_defn = NEW_SCOPE(args, body, loc);
1025 n->nd_loc = *loc;
1026 nd_set_line(n->nd_defn, loc->end_pos.lineno);
1027 set_line_body(body, loc->beg_pos.lineno);
1028 return n;
1029}
1030
1031static NODE *
1032rescued_expr(struct parser_params *p, NODE *arg, NODE *rescue,
1033 const YYLTYPE *arg_loc, const YYLTYPE *mod_loc, const YYLTYPE *res_loc)
1034{
1035 YYLTYPE loc = code_loc_gen(mod_loc, res_loc);
1036 rescue = NEW_RESBODY(0, remove_begin(rescue), 0, &loc);
1037 loc.beg_pos = arg_loc->beg_pos;
1038 return NEW_RESCUE(arg, rescue, 0, &loc);
1039}
1040
1041#endif /* RIPPER */
1042
1043static void
1044restore_defun(struct parser_params *p, NODE *name)
1045{
1046 YYSTYPE c = {.val = name->nd_cval};
1047 p->cur_arg = name->nd_vid;
1048 p->ctxt.in_def = c.ctxt.in_def;
1049 p->ctxt.shareable_constant_value = c.ctxt.shareable_constant_value;
1050}
1051
1052static void
1053endless_method_name(struct parser_params *p, NODE *defn, const YYLTYPE *loc)
1054{
1055#ifdef RIPPER
1056 defn = defn->nd_defn;
1057#endif
1058 ID mid = defn->nd_mid;
1059 if (is_attrset_id(mid)) {
1060 yyerror1(loc, "setter method cannot be defined in an endless method definition");
1061 }
1062 token_info_drop(p, "def", loc->beg_pos);
1063}
1064
1065#ifndef RIPPER
1066# define Qnone 0
1067# define Qnull 0
1068# define ifndef_ripper(x) (x)
1069#else
1070# define Qnone Qnil
1071# define Qnull Qundef
1072# define ifndef_ripper(x)
1073#endif
1074
1075# define rb_warn0(fmt) WARN_CALL(WARN_ARGS(fmt, 1))
1076# define rb_warn1(fmt,a) WARN_CALL(WARN_ARGS(fmt, 2), (a))
1077# define rb_warn2(fmt,a,b) WARN_CALL(WARN_ARGS(fmt, 3), (a), (b))
1078# define rb_warn3(fmt,a,b,c) WARN_CALL(WARN_ARGS(fmt, 4), (a), (b), (c))
1079# define rb_warn4(fmt,a,b,c,d) WARN_CALL(WARN_ARGS(fmt, 5), (a), (b), (c), (d))
1080# define rb_warning0(fmt) WARNING_CALL(WARNING_ARGS(fmt, 1))
1081# define rb_warning1(fmt,a) WARNING_CALL(WARNING_ARGS(fmt, 2), (a))
1082# define rb_warning2(fmt,a,b) WARNING_CALL(WARNING_ARGS(fmt, 3), (a), (b))
1083# define rb_warning3(fmt,a,b,c) WARNING_CALL(WARNING_ARGS(fmt, 4), (a), (b), (c))
1084# define rb_warning4(fmt,a,b,c,d) WARNING_CALL(WARNING_ARGS(fmt, 5), (a), (b), (c), (d))
1085# define rb_warn0L(l,fmt) WARN_CALL(WARN_ARGS_L(l, fmt, 1))
1086# define rb_warn1L(l,fmt,a) WARN_CALL(WARN_ARGS_L(l, fmt, 2), (a))
1087# define rb_warn2L(l,fmt,a,b) WARN_CALL(WARN_ARGS_L(l, fmt, 3), (a), (b))
1088# define rb_warn3L(l,fmt,a,b,c) WARN_CALL(WARN_ARGS_L(l, fmt, 4), (a), (b), (c))
1089# define rb_warn4L(l,fmt,a,b,c,d) WARN_CALL(WARN_ARGS_L(l, fmt, 5), (a), (b), (c), (d))
1090# define rb_warning0L(l,fmt) WARNING_CALL(WARNING_ARGS_L(l, fmt, 1))
1091# define rb_warning1L(l,fmt,a) WARNING_CALL(WARNING_ARGS_L(l, fmt, 2), (a))
1092# define rb_warning2L(l,fmt,a,b) WARNING_CALL(WARNING_ARGS_L(l, fmt, 3), (a), (b))
1093# define rb_warning3L(l,fmt,a,b,c) WARNING_CALL(WARNING_ARGS_L(l, fmt, 4), (a), (b), (c))
1094# define rb_warning4L(l,fmt,a,b,c,d) WARNING_CALL(WARNING_ARGS_L(l, fmt, 5), (a), (b), (c), (d))
1095#ifdef RIPPER
1096static ID id_warn, id_warning, id_gets, id_assoc;
1097# define ERR_MESG() STR_NEW2(mesg) /* to bypass Ripper DSL */
1098# define WARN_S_L(s,l) STR_NEW(s,l)
1099# define WARN_S(s) STR_NEW2(s)
1100# define WARN_I(i) INT2NUM(i)
1101# define WARN_ID(i) rb_id2str(i)
1102# define WARN_IVAL(i) i
1103# define PRIsWARN "s"
1104# define rb_warn0L_experimental(l,fmt) WARN_CALL(WARN_ARGS_L(l, fmt, 1))
1105# define WARN_ARGS(fmt,n) p->value, id_warn, n, rb_usascii_str_new_lit(fmt)
1106# define WARN_ARGS_L(l,fmt,n) WARN_ARGS(fmt,n)
1107# ifdef HAVE_VA_ARGS_MACRO
1108# define WARN_CALL(...) rb_funcall(__VA_ARGS__)
1109# else
1110# define WARN_CALL rb_funcall
1111# endif
1112# define WARNING_ARGS(fmt,n) p->value, id_warning, n, rb_usascii_str_new_lit(fmt)
1113# define WARNING_ARGS_L(l, fmt,n) WARNING_ARGS(fmt,n)
1114# ifdef HAVE_VA_ARGS_MACRO
1115# define WARNING_CALL(...) rb_funcall(__VA_ARGS__)
1116# else
1117# define WARNING_CALL rb_funcall
1118# endif
1119PRINTF_ARGS(static void ripper_compile_error(struct parser_params*, const char *fmt, ...), 2, 3);
1120# define compile_error ripper_compile_error
1121#else
1122# define WARN_S_L(s,l) s
1123# define WARN_S(s) s
1124# define WARN_I(i) i
1125# define WARN_ID(i) rb_id2name(i)
1126# define WARN_IVAL(i) NUM2INT(i)
1127# define PRIsWARN PRIsVALUE
1128# define WARN_ARGS(fmt,n) WARN_ARGS_L(p->ruby_sourceline,fmt,n)
1129# define WARN_ARGS_L(l,fmt,n) p->ruby_sourcefile, (l), (fmt)
1130# define WARN_CALL rb_compile_warn
1131# define rb_warn0L_experimental(l,fmt) rb_category_compile_warn(RB_WARN_CATEGORY_EXPERIMENTAL, WARN_ARGS_L(l, fmt, 1))
1132# define WARNING_ARGS(fmt,n) WARN_ARGS(fmt,n)
1133# define WARNING_ARGS_L(l,fmt,n) WARN_ARGS_L(l,fmt,n)
1134# define WARNING_CALL rb_compile_warning
1135PRINTF_ARGS(static void parser_compile_error(struct parser_params*, const char *fmt, ...), 2, 3);
1136# define compile_error parser_compile_error
1137#endif
1138
1139#define WARN_EOL(tok) \
1140 (looking_at_eol_p(p) ? \
1141 (void)rb_warning0("`" tok "' at the end of line without an expression") : \
1142 (void)0)
1143static int looking_at_eol_p(struct parser_params *p);
1144
1145#line 1146 "ripper.c"
1146
1147# ifndef YY_CAST
1148# ifdef __cplusplus
1149# define YY_CAST(Type, Val) static_cast<Type> (Val)
1150# define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast<Type> (Val)
1151# else
1152# define YY_CAST(Type, Val) ((Type) (Val))
1153# define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val))
1154# endif
1155# endif
1156# ifndef YY_NULLPTR
1157# if defined __cplusplus
1158# if 201103L <= __cplusplus
1159# define YY_NULLPTR nullptr
1160# else
1161# define YY_NULLPTR 0
1162# endif
1163# else
1164# define YY_NULLPTR ((void*)0)
1165# endif
1166# endif
1167
1168
1169/* Debug traces. */
1170#ifndef YYDEBUG
1171# define YYDEBUG 1
1172#endif
1173#if YYDEBUG
1174#ifndef yydebug
1175extern int yydebug;
1176#endif
1177#endif
1178
1179/* Token kinds. */
1180#ifndef YYTOKENTYPE
1181# define YYTOKENTYPE
1182 enum yytokentype
1183 {
1184 YYEMPTY = -2,
1185 END_OF_INPUT = 0, /* "end-of-input" */
1186 YYerror = 256, /* error */
1187 YYUNDEF = 257, /* "invalid token" */
1188 keyword_class = 258, /* "`class'" */
1189 keyword_module = 259, /* "`module'" */
1190 keyword_def = 260, /* "`def'" */
1191 keyword_undef = 261, /* "`undef'" */
1192 keyword_begin = 262, /* "`begin'" */
1193 keyword_rescue = 263, /* "`rescue'" */
1194 keyword_ensure = 264, /* "`ensure'" */
1195 keyword_end = 265, /* "`end'" */
1196 keyword_if = 266, /* "`if'" */
1197 keyword_unless = 267, /* "`unless'" */
1198 keyword_then = 268, /* "`then'" */
1199 keyword_elsif = 269, /* "`elsif'" */
1200 keyword_else = 270, /* "`else'" */
1201 keyword_case = 271, /* "`case'" */
1202 keyword_when = 272, /* "`when'" */
1203 keyword_while = 273, /* "`while'" */
1204 keyword_until = 274, /* "`until'" */
1205 keyword_for = 275, /* "`for'" */
1206 keyword_break = 276, /* "`break'" */
1207 keyword_next = 277, /* "`next'" */
1208 keyword_redo = 278, /* "`redo'" */
1209 keyword_retry = 279, /* "`retry'" */
1210 keyword_in = 280, /* "`in'" */
1211 keyword_do = 281, /* "`do'" */
1212 keyword_do_cond = 282, /* "`do' for condition" */
1213 keyword_do_block = 283, /* "`do' for block" */
1214 keyword_do_LAMBDA = 284, /* "`do' for lambda" */
1215 keyword_return = 285, /* "`return'" */
1216 keyword_yield = 286, /* "`yield'" */
1217 keyword_super = 287, /* "`super'" */
1218 keyword_self = 288, /* "`self'" */
1219 keyword_nil = 289, /* "`nil'" */
1220 keyword_true = 290, /* "`true'" */
1221 keyword_false = 291, /* "`false'" */
1222 keyword_and = 292, /* "`and'" */
1223 keyword_or = 293, /* "`or'" */
1224 keyword_not = 294, /* "`not'" */
1225 modifier_if = 295, /* "`if' modifier" */
1226 modifier_unless = 296, /* "`unless' modifier" */
1227 modifier_while = 297, /* "`while' modifier" */
1228 modifier_until = 298, /* "`until' modifier" */
1229 modifier_rescue = 299, /* "`rescue' modifier" */
1230 keyword_alias = 300, /* "`alias'" */
1231 keyword_defined = 301, /* "`defined?'" */
1232 keyword_BEGIN = 302, /* "`BEGIN'" */
1233 keyword_END = 303, /* "`END'" */
1234 keyword__LINE__ = 304, /* "`__LINE__'" */
1235 keyword__FILE__ = 305, /* "`__FILE__'" */
1236 keyword__ENCODING__ = 306, /* "`__ENCODING__'" */
1237 tIDENTIFIER = 307, /* "local variable or method" */
1238 tFID = 308, /* "method" */
1239 tGVAR = 309, /* "global variable" */
1240 tIVAR = 310, /* "instance variable" */
1241 tCONSTANT = 311, /* "constant" */
1242 tCVAR = 312, /* "class variable" */
1243 tLABEL = 313, /* "label" */
1244 tINTEGER = 314, /* "integer literal" */
1245 tFLOAT = 315, /* "float literal" */
1246 tRATIONAL = 316, /* "rational literal" */
1247 tIMAGINARY = 317, /* "imaginary literal" */
1248 tCHAR = 318, /* "char literal" */
1249 tNTH_REF = 319, /* "numbered reference" */
1250 tBACK_REF = 320, /* "back reference" */
1251 tSTRING_CONTENT = 321, /* "literal content" */
1252 tREGEXP_END = 322, /* tREGEXP_END */
1253 tSP = 323, /* "escaped space" */
1254 tUPLUS = 132, /* "unary+" */
1255 tUMINUS = 133, /* "unary-" */
1256 tPOW = 134, /* "**" */
1257 tCMP = 135, /* "<=>" */
1258 tEQ = 140, /* "==" */
1259 tEQQ = 141, /* "===" */
1260 tNEQ = 142, /* "!=" */
1261 tGEQ = 139, /* ">=" */
1262 tLEQ = 138, /* "<=" */
1263 tANDOP = 148, /* "&&" */
1264 tOROP = 149, /* "||" */
1265 tMATCH = 143, /* "=~" */
1266 tNMATCH = 144, /* "!~" */
1267 tDOT2 = 128, /* ".." */
1268 tDOT3 = 129, /* "..." */
1269 tBDOT2 = 130, /* "(.." */
1270 tBDOT3 = 131, /* "(..." */
1271 tAREF = 145, /* "[]" */
1272 tASET = 146, /* "[]=" */
1273 tLSHFT = 136, /* "<<" */
1274 tRSHFT = 137, /* ">>" */
1275 tANDDOT = 150, /* "&." */
1276 tCOLON2 = 147, /* "::" */
1277 tCOLON3 = 324, /* ":: at EXPR_BEG" */
1278 tOP_ASGN = 325, /* "operator-assignment" */
1279 tASSOC = 326, /* "=>" */
1280 tLPAREN = 327, /* "(" */
1281 tLPAREN_ARG = 328, /* "( arg" */
1282 tRPAREN = 329, /* ")" */
1283 tLBRACK = 330, /* "[" */
1284 tLBRACE = 331, /* "{" */
1285 tLBRACE_ARG = 332, /* "{ arg" */
1286 tSTAR = 333, /* "*" */
1287 tDSTAR = 334, /* "**arg" */
1288 tAMPER = 335, /* "&" */
1289 tLAMBDA = 336, /* "->" */
1290 tSYMBEG = 337, /* "symbol literal" */
1291 tSTRING_BEG = 338, /* "string literal" */
1292 tXSTRING_BEG = 339, /* "backtick literal" */
1293 tREGEXP_BEG = 340, /* "regexp literal" */
1294 tWORDS_BEG = 341, /* "word list" */
1295 tQWORDS_BEG = 342, /* "verbatim word list" */
1296 tSYMBOLS_BEG = 343, /* "symbol list" */
1297 tQSYMBOLS_BEG = 344, /* "verbatim symbol list" */
1298 tSTRING_END = 345, /* "terminator" */
1299 tSTRING_DEND = 346, /* "'}'" */
1300 tSTRING_DBEG = 347, /* tSTRING_DBEG */
1301 tSTRING_DVAR = 348, /* tSTRING_DVAR */
1302 tLAMBEG = 349, /* tLAMBEG */
1303 tLABEL_END = 350, /* tLABEL_END */
1304 tLOWEST = 351, /* tLOWEST */
1305 tUMINUS_NUM = 352, /* tUMINUS_NUM */
1306 tLAST_TOKEN = 353 /* tLAST_TOKEN */
1307 };
1308 typedef enum yytokentype yytoken_kind_t;
1309#endif
1310
1311/* Value type. */
1312#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
1313union YYSTYPE
1314{
1315#line 1126 "ripper.y"
1316
1317 VALUE val;
1318 NODE *node;
1319 ID id;
1320 int num;
1321 st_table *tbl;
1322 const struct vtable *vars;
1323 struct rb_strterm_struct *strterm;
1324 struct lex_context ctxt;
1325
1326#line 1325 "ripper.c"
1327
1328};
1329typedef union YYSTYPE YYSTYPE;
1330# define YYSTYPE_IS_TRIVIAL 1
1331# define YYSTYPE_IS_DECLARED 1
1332#endif
1333
1334/* Location type. */
1335#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
1336typedef struct YYLTYPE YYLTYPE;
1337struct YYLTYPE
1338{
1339 int first_line;
1340 int first_column;
1341 int last_line;
1342 int last_column;
1343};
1344# define YYLTYPE_IS_DECLARED 1
1345# define YYLTYPE_IS_TRIVIAL 1
1346#endif
1347
1348
1349
1350
1351int yyparse (struct parser_params *p);
1352
1353
1354
1355/* Symbol kind. */
1356enum yysymbol_kind_t
1357{
1358 YYSYMBOL_YYEMPTY = -2,
1359 YYSYMBOL_YYEOF = 0, /* "end-of-input" */
1360 YYSYMBOL_YYerror = 1, /* error */
1361 YYSYMBOL_YYUNDEF = 2, /* "invalid token" */
1362 YYSYMBOL_keyword_class = 3, /* "`class'" */
1363 YYSYMBOL_keyword_module = 4, /* "`module'" */
1364 YYSYMBOL_keyword_def = 5, /* "`def'" */
1365 YYSYMBOL_keyword_undef = 6, /* "`undef'" */
1366 YYSYMBOL_keyword_begin = 7, /* "`begin'" */
1367 YYSYMBOL_keyword_rescue = 8, /* "`rescue'" */
1368 YYSYMBOL_keyword_ensure = 9, /* "`ensure'" */
1369 YYSYMBOL_keyword_end = 10, /* "`end'" */
1370 YYSYMBOL_keyword_if = 11, /* "`if'" */
1371 YYSYMBOL_keyword_unless = 12, /* "`unless'" */
1372 YYSYMBOL_keyword_then = 13, /* "`then'" */
1373 YYSYMBOL_keyword_elsif = 14, /* "`elsif'" */
1374 YYSYMBOL_keyword_else = 15, /* "`else'" */
1375 YYSYMBOL_keyword_case = 16, /* "`case'" */
1376 YYSYMBOL_keyword_when = 17, /* "`when'" */
1377 YYSYMBOL_keyword_while = 18, /* "`while'" */
1378 YYSYMBOL_keyword_until = 19, /* "`until'" */
1379 YYSYMBOL_keyword_for = 20, /* "`for'" */
1380 YYSYMBOL_keyword_break = 21, /* "`break'" */
1381 YYSYMBOL_keyword_next = 22, /* "`next'" */
1382 YYSYMBOL_keyword_redo = 23, /* "`redo'" */
1383 YYSYMBOL_keyword_retry = 24, /* "`retry'" */
1384 YYSYMBOL_keyword_in = 25, /* "`in'" */
1385 YYSYMBOL_keyword_do = 26, /* "`do'" */
1386 YYSYMBOL_keyword_do_cond = 27, /* "`do' for condition" */
1387 YYSYMBOL_keyword_do_block = 28, /* "`do' for block" */
1388 YYSYMBOL_keyword_do_LAMBDA = 29, /* "`do' for lambda" */
1389 YYSYMBOL_keyword_return = 30, /* "`return'" */
1390 YYSYMBOL_keyword_yield = 31, /* "`yield'" */
1391 YYSYMBOL_keyword_super = 32, /* "`super'" */
1392 YYSYMBOL_keyword_self = 33, /* "`self'" */
1393 YYSYMBOL_keyword_nil = 34, /* "`nil'" */
1394 YYSYMBOL_keyword_true = 35, /* "`true'" */
1395 YYSYMBOL_keyword_false = 36, /* "`false'" */
1396 YYSYMBOL_keyword_and = 37, /* "`and'" */
1397 YYSYMBOL_keyword_or = 38, /* "`or'" */
1398 YYSYMBOL_keyword_not = 39, /* "`not'" */
1399 YYSYMBOL_modifier_if = 40, /* "`if' modifier" */
1400 YYSYMBOL_modifier_unless = 41, /* "`unless' modifier" */
1401 YYSYMBOL_modifier_while = 42, /* "`while' modifier" */
1402 YYSYMBOL_modifier_until = 43, /* "`until' modifier" */
1403 YYSYMBOL_modifier_rescue = 44, /* "`rescue' modifier" */
1404 YYSYMBOL_keyword_alias = 45, /* "`alias'" */
1405 YYSYMBOL_keyword_defined = 46, /* "`defined?'" */
1406 YYSYMBOL_keyword_BEGIN = 47, /* "`BEGIN'" */
1407 YYSYMBOL_keyword_END = 48, /* "`END'" */
1408 YYSYMBOL_keyword__LINE__ = 49, /* "`__LINE__'" */
1409 YYSYMBOL_keyword__FILE__ = 50, /* "`__FILE__'" */
1410 YYSYMBOL_keyword__ENCODING__ = 51, /* "`__ENCODING__'" */
1411 YYSYMBOL_tIDENTIFIER = 52, /* "local variable or method" */
1412 YYSYMBOL_tFID = 53, /* "method" */
1413 YYSYMBOL_tGVAR = 54, /* "global variable" */
1414 YYSYMBOL_tIVAR = 55, /* "instance variable" */
1415 YYSYMBOL_tCONSTANT = 56, /* "constant" */
1416 YYSYMBOL_tCVAR = 57, /* "class variable" */
1417 YYSYMBOL_tLABEL = 58, /* "label" */
1418 YYSYMBOL_tINTEGER = 59, /* "integer literal" */
1419 YYSYMBOL_tFLOAT = 60, /* "float literal" */
1420 YYSYMBOL_tRATIONAL = 61, /* "rational literal" */
1421 YYSYMBOL_tIMAGINARY = 62, /* "imaginary literal" */
1422 YYSYMBOL_tCHAR = 63, /* "char literal" */
1423 YYSYMBOL_tNTH_REF = 64, /* "numbered reference" */
1424 YYSYMBOL_tBACK_REF = 65, /* "back reference" */
1425 YYSYMBOL_tSTRING_CONTENT = 66, /* "literal content" */
1426 YYSYMBOL_tREGEXP_END = 67, /* tREGEXP_END */
1427 YYSYMBOL_68_ = 68, /* '.' */
1428 YYSYMBOL_69_backslash_ = 69, /* "backslash" */
1429 YYSYMBOL_tSP = 70, /* "escaped space" */
1430 YYSYMBOL_71_escaped_horizontal_tab_ = 71, /* "escaped horizontal tab" */
1431 YYSYMBOL_72_escaped_form_feed_ = 72, /* "escaped form feed" */
1432 YYSYMBOL_73_escaped_carriage_return_ = 73, /* "escaped carriage return" */
1433 YYSYMBOL_74_escaped_vertical_tab_ = 74, /* "escaped vertical tab" */
1434 YYSYMBOL_tUPLUS = 75, /* "unary+" */
1435 YYSYMBOL_tUMINUS = 76, /* "unary-" */
1436 YYSYMBOL_tPOW = 77, /* "**" */
1437 YYSYMBOL_tCMP = 78, /* "<=>" */
1438 YYSYMBOL_tEQ = 79, /* "==" */
1439 YYSYMBOL_tEQQ = 80, /* "===" */
1440 YYSYMBOL_tNEQ = 81, /* "!=" */
1441 YYSYMBOL_tGEQ = 82, /* ">=" */
1442 YYSYMBOL_tLEQ = 83, /* "<=" */
1443 YYSYMBOL_tANDOP = 84, /* "&&" */
1444 YYSYMBOL_tOROP = 85, /* "||" */
1445 YYSYMBOL_tMATCH = 86, /* "=~" */
1446 YYSYMBOL_tNMATCH = 87, /* "!~" */
1447 YYSYMBOL_tDOT2 = 88, /* ".." */
1448 YYSYMBOL_tDOT3 = 89, /* "..." */
1449 YYSYMBOL_tBDOT2 = 90, /* "(.." */
1450 YYSYMBOL_tBDOT3 = 91, /* "(..." */
1451 YYSYMBOL_tAREF = 92, /* "[]" */
1452 YYSYMBOL_tASET = 93, /* "[]=" */
1453 YYSYMBOL_tLSHFT = 94, /* "<<" */
1454 YYSYMBOL_tRSHFT = 95, /* ">>" */
1455 YYSYMBOL_tANDDOT = 96, /* "&." */
1456 YYSYMBOL_tCOLON2 = 97, /* "::" */
1457 YYSYMBOL_tCOLON3 = 98, /* ":: at EXPR_BEG" */
1458 YYSYMBOL_tOP_ASGN = 99, /* "operator-assignment" */
1459 YYSYMBOL_tASSOC = 100, /* "=>" */
1460 YYSYMBOL_tLPAREN = 101, /* "(" */
1461 YYSYMBOL_tLPAREN_ARG = 102, /* "( arg" */
1462 YYSYMBOL_tRPAREN = 103, /* ")" */
1463 YYSYMBOL_tLBRACK = 104, /* "[" */
1464 YYSYMBOL_tLBRACE = 105, /* "{" */
1465 YYSYMBOL_tLBRACE_ARG = 106, /* "{ arg" */
1466 YYSYMBOL_tSTAR = 107, /* "*" */
1467 YYSYMBOL_tDSTAR = 108, /* "**arg" */
1468 YYSYMBOL_tAMPER = 109, /* "&" */
1469 YYSYMBOL_tLAMBDA = 110, /* "->" */
1470 YYSYMBOL_tSYMBEG = 111, /* "symbol literal" */
1471 YYSYMBOL_tSTRING_BEG = 112, /* "string literal" */
1472 YYSYMBOL_tXSTRING_BEG = 113, /* "backtick literal" */
1473 YYSYMBOL_tREGEXP_BEG = 114, /* "regexp literal" */
1474 YYSYMBOL_tWORDS_BEG = 115, /* "word list" */
1475 YYSYMBOL_tQWORDS_BEG = 116, /* "verbatim word list" */
1476 YYSYMBOL_tSYMBOLS_BEG = 117, /* "symbol list" */
1477 YYSYMBOL_tQSYMBOLS_BEG = 118, /* "verbatim symbol list" */
1478 YYSYMBOL_tSTRING_END = 119, /* "terminator" */
1479 YYSYMBOL_tSTRING_DEND = 120, /* "'}'" */
1480 YYSYMBOL_tSTRING_DBEG = 121, /* tSTRING_DBEG */
1481 YYSYMBOL_tSTRING_DVAR = 122, /* tSTRING_DVAR */
1482 YYSYMBOL_tLAMBEG = 123, /* tLAMBEG */
1483 YYSYMBOL_tLABEL_END = 124, /* tLABEL_END */
1484 YYSYMBOL_tLOWEST = 125, /* tLOWEST */
1485 YYSYMBOL_126_ = 126, /* '=' */
1486 YYSYMBOL_127_ = 127, /* '?' */
1487 YYSYMBOL_128_ = 128, /* ':' */
1488 YYSYMBOL_129_ = 129, /* '>' */
1489 YYSYMBOL_130_ = 130, /* '<' */
1490 YYSYMBOL_131_ = 131, /* '|' */
1491 YYSYMBOL_132_ = 132, /* '^' */
1492 YYSYMBOL_133_ = 133, /* '&' */
1493 YYSYMBOL_134_ = 134, /* '+' */
1494 YYSYMBOL_135_ = 135, /* '-' */
1495 YYSYMBOL_136_ = 136, /* '*' */
1496 YYSYMBOL_137_ = 137, /* '/' */
1497 YYSYMBOL_138_ = 138, /* '%' */
1498 YYSYMBOL_tUMINUS_NUM = 139, /* tUMINUS_NUM */
1499 YYSYMBOL_140_ = 140, /* '!' */
1500 YYSYMBOL_141_ = 141, /* '~' */
1501 YYSYMBOL_tLAST_TOKEN = 142, /* tLAST_TOKEN */
1502 YYSYMBOL_143_ = 143, /* '{' */
1503 YYSYMBOL_144_ = 144, /* '}' */
1504 YYSYMBOL_145_ = 145, /* '[' */
1505 YYSYMBOL_146_ = 146, /* ',' */
1506 YYSYMBOL_147_ = 147, /* '`' */
1507 YYSYMBOL_148_ = 148, /* '(' */
1508 YYSYMBOL_149_ = 149, /* ')' */
1509 YYSYMBOL_150_ = 150, /* ']' */
1510 YYSYMBOL_151_ = 151, /* ';' */
1511 YYSYMBOL_152_ = 152, /* ' ' */
1512 YYSYMBOL_153_n_ = 153, /* '\n' */
1513 YYSYMBOL_YYACCEPT = 154, /* $accept */
1514 YYSYMBOL_program = 155, /* program */
1515 YYSYMBOL_156_1 = 156, /* $@1 */
1516 YYSYMBOL_top_compstmt = 157, /* top_compstmt */
1517 YYSYMBOL_top_stmts = 158, /* top_stmts */
1518 YYSYMBOL_top_stmt = 159, /* top_stmt */
1519 YYSYMBOL_begin_block = 160, /* begin_block */
1520 YYSYMBOL_bodystmt = 161, /* bodystmt */
1521 YYSYMBOL_162_2 = 162, /* $@2 */
1522 YYSYMBOL_compstmt = 163, /* compstmt */
1523 YYSYMBOL_stmts = 164, /* stmts */
1524 YYSYMBOL_stmt_or_begin = 165, /* stmt_or_begin */
1525 YYSYMBOL_166_3 = 166, /* $@3 */
1526 YYSYMBOL_stmt = 167, /* stmt */
1527 YYSYMBOL_168_4 = 168, /* $@4 */
1528 YYSYMBOL_command_asgn = 169, /* command_asgn */
1529 YYSYMBOL_command_rhs = 170, /* command_rhs */
1530 YYSYMBOL_expr = 171, /* expr */
1531 YYSYMBOL_172_5 = 172, /* @5 */
1532 YYSYMBOL_173_6 = 173, /* @6 */
1533 YYSYMBOL_174_7 = 174, /* @7 */
1534 YYSYMBOL_175_8 = 175, /* @8 */
1535 YYSYMBOL_def_name = 176, /* def_name */
1536 YYSYMBOL_defn_head = 177, /* defn_head */
1537 YYSYMBOL_defs_head = 178, /* defs_head */
1538 YYSYMBOL_179_9 = 179, /* $@9 */
1539 YYSYMBOL_expr_value = 180, /* expr_value */
1540 YYSYMBOL_expr_value_do = 181, /* expr_value_do */
1541 YYSYMBOL_182_10 = 182, /* $@10 */
1542 YYSYMBOL_183_11 = 183, /* $@11 */
1543 YYSYMBOL_command_call = 184, /* command_call */
1544 YYSYMBOL_block_command = 185, /* block_command */
1545 YYSYMBOL_cmd_brace_block = 186, /* cmd_brace_block */
1546 YYSYMBOL_fcall = 187, /* fcall */
1547 YYSYMBOL_command = 188, /* command */
1548 YYSYMBOL_mlhs = 189, /* mlhs */
1549 YYSYMBOL_mlhs_inner = 190, /* mlhs_inner */
1550 YYSYMBOL_mlhs_basic = 191, /* mlhs_basic */
1551 YYSYMBOL_mlhs_item = 192, /* mlhs_item */
1552 YYSYMBOL_mlhs_head = 193, /* mlhs_head */
1553 YYSYMBOL_mlhs_post = 194, /* mlhs_post */
1554 YYSYMBOL_mlhs_node = 195, /* mlhs_node */
1555 YYSYMBOL_lhs = 196, /* lhs */
1556 YYSYMBOL_cname = 197, /* cname */
1557 YYSYMBOL_cpath = 198, /* cpath */
1558 YYSYMBOL_fname = 199, /* fname */
1559 YYSYMBOL_fitem = 200, /* fitem */
1560 YYSYMBOL_undef_list = 201, /* undef_list */
1561 YYSYMBOL_202_12 = 202, /* $@12 */
1562 YYSYMBOL_op = 203, /* op */
1563 YYSYMBOL_reswords = 204, /* reswords */
1564 YYSYMBOL_arg = 205, /* arg */
1565 YYSYMBOL_206_13 = 206, /* $@13 */
1566 YYSYMBOL_relop = 207, /* relop */
1567 YYSYMBOL_rel_expr = 208, /* rel_expr */
1568 YYSYMBOL_lex_ctxt = 209, /* lex_ctxt */
1569 YYSYMBOL_arg_value = 210, /* arg_value */
1570 YYSYMBOL_aref_args = 211, /* aref_args */
1571 YYSYMBOL_arg_rhs = 212, /* arg_rhs */
1572 YYSYMBOL_paren_args = 213, /* paren_args */
1573 YYSYMBOL_opt_paren_args = 214, /* opt_paren_args */
1574 YYSYMBOL_opt_call_args = 215, /* opt_call_args */
1575 YYSYMBOL_call_args = 216, /* call_args */
1576 YYSYMBOL_command_args = 217, /* command_args */
1577 YYSYMBOL_218_14 = 218, /* $@14 */
1578 YYSYMBOL_block_arg = 219, /* block_arg */
1579 YYSYMBOL_opt_block_arg = 220, /* opt_block_arg */
1580 YYSYMBOL_args = 221, /* args */
1581 YYSYMBOL_mrhs_arg = 222, /* mrhs_arg */
1582 YYSYMBOL_mrhs = 223, /* mrhs */
1583 YYSYMBOL_primary = 224, /* primary */
1584 YYSYMBOL_225_15 = 225, /* $@15 */
1585 YYSYMBOL_226_16 = 226, /* $@16 */
1586 YYSYMBOL_227_17 = 227, /* $@17 */
1587 YYSYMBOL_228_18 = 228, /* $@18 */
1588 YYSYMBOL_229_19 = 229, /* @19 */
1589 YYSYMBOL_230_20 = 230, /* @20 */
1590 YYSYMBOL_231_21 = 231, /* $@21 */
1591 YYSYMBOL_232_22 = 232, /* $@22 */
1592 YYSYMBOL_233_23 = 233, /* $@23 */
1593 YYSYMBOL_primary_value = 234, /* primary_value */
1594 YYSYMBOL_k_begin = 235, /* k_begin */
1595 YYSYMBOL_k_if = 236, /* k_if */
1596 YYSYMBOL_k_unless = 237, /* k_unless */
1597 YYSYMBOL_k_while = 238, /* k_while */
1598 YYSYMBOL_k_until = 239, /* k_until */
1599 YYSYMBOL_k_case = 240, /* k_case */
1600 YYSYMBOL_k_for = 241, /* k_for */
1601 YYSYMBOL_k_class = 242, /* k_class */
1602 YYSYMBOL_k_module = 243, /* k_module */
1603 YYSYMBOL_k_def = 244, /* k_def */
1604 YYSYMBOL_k_do = 245, /* k_do */
1605 YYSYMBOL_k_do_block = 246, /* k_do_block */
1606 YYSYMBOL_k_rescue = 247, /* k_rescue */
1607 YYSYMBOL_k_ensure = 248, /* k_ensure */
1608 YYSYMBOL_k_when = 249, /* k_when */
1609 YYSYMBOL_k_else = 250, /* k_else */
1610 YYSYMBOL_k_elsif = 251, /* k_elsif */
1611 YYSYMBOL_k_end = 252, /* k_end */
1612 YYSYMBOL_k_return = 253, /* k_return */
1613 YYSYMBOL_then = 254, /* then */
1614 YYSYMBOL_do = 255, /* do */
1615 YYSYMBOL_if_tail = 256, /* if_tail */
1616 YYSYMBOL_opt_else = 257, /* opt_else */
1617 YYSYMBOL_for_var = 258, /* for_var */
1618 YYSYMBOL_f_marg = 259, /* f_marg */
1619 YYSYMBOL_f_marg_list = 260, /* f_marg_list */
1620 YYSYMBOL_f_margs = 261, /* f_margs */
1621 YYSYMBOL_f_rest_marg = 262, /* f_rest_marg */
1622 YYSYMBOL_f_any_kwrest = 263, /* f_any_kwrest */
1623 YYSYMBOL_f_eq = 264, /* f_eq */
1624 YYSYMBOL_265_24 = 265, /* $@24 */
1625 YYSYMBOL_block_args_tail = 266, /* block_args_tail */
1626 YYSYMBOL_opt_block_args_tail = 267, /* opt_block_args_tail */
1627 YYSYMBOL_excessed_comma = 268, /* excessed_comma */
1628 YYSYMBOL_block_param = 269, /* block_param */
1629 YYSYMBOL_opt_block_param = 270, /* opt_block_param */
1630 YYSYMBOL_block_param_def = 271, /* block_param_def */
1631 YYSYMBOL_opt_bv_decl = 272, /* opt_bv_decl */
1632 YYSYMBOL_bv_decls = 273, /* bv_decls */
1633 YYSYMBOL_bvar = 274, /* bvar */
1634 YYSYMBOL_lambda = 275, /* lambda */
1635 YYSYMBOL_276_25 = 276, /* @25 */
1636 YYSYMBOL_277_26 = 277, /* @26 */
1637 YYSYMBOL_278_27 = 278, /* @27 */
1638 YYSYMBOL_279_28 = 279, /* $@28 */
1639 YYSYMBOL_f_larglist = 280, /* f_larglist */
1640 YYSYMBOL_lambda_body = 281, /* lambda_body */
1641 YYSYMBOL_do_block = 282, /* do_block */
1642 YYSYMBOL_block_call = 283, /* block_call */
1643 YYSYMBOL_method_call = 284, /* method_call */
1644 YYSYMBOL_brace_block = 285, /* brace_block */
1645 YYSYMBOL_brace_body = 286, /* brace_body */
1646 YYSYMBOL_287_29 = 287, /* @29 */
1647 YYSYMBOL_288_30 = 288, /* @30 */
1648 YYSYMBOL_289_31 = 289, /* @31 */
1649 YYSYMBOL_do_body = 290, /* do_body */
1650 YYSYMBOL_291_32 = 291, /* @32 */
1651 YYSYMBOL_292_33 = 292, /* @33 */
1652 YYSYMBOL_293_34 = 293, /* @34 */
1653 YYSYMBOL_case_args = 294, /* case_args */
1654 YYSYMBOL_case_body = 295, /* case_body */
1655 YYSYMBOL_cases = 296, /* cases */
1656 YYSYMBOL_p_case_body = 297, /* p_case_body */
1657 YYSYMBOL_298_35 = 298, /* @35 */
1658 YYSYMBOL_299_36 = 299, /* @36 */
1659 YYSYMBOL_300_37 = 300, /* $@37 */
1660 YYSYMBOL_p_cases = 301, /* p_cases */
1661 YYSYMBOL_p_top_expr = 302, /* p_top_expr */
1662 YYSYMBOL_p_top_expr_body = 303, /* p_top_expr_body */
1663 YYSYMBOL_p_expr = 304, /* p_expr */
1664 YYSYMBOL_p_as = 305, /* p_as */
1665 YYSYMBOL_p_alt = 306, /* p_alt */
1666 YYSYMBOL_p_lparen = 307, /* p_lparen */
1667 YYSYMBOL_p_lbracket = 308, /* p_lbracket */
1668 YYSYMBOL_p_expr_basic = 309, /* p_expr_basic */
1669 YYSYMBOL_310_38 = 310, /* @38 */
1670 YYSYMBOL_311_39 = 311, /* @39 */
1671 YYSYMBOL_p_args = 312, /* p_args */
1672 YYSYMBOL_p_args_head = 313, /* p_args_head */
1673 YYSYMBOL_p_args_tail = 314, /* p_args_tail */
1674 YYSYMBOL_p_find = 315, /* p_find */
1675 YYSYMBOL_p_rest = 316, /* p_rest */
1676 YYSYMBOL_p_args_post = 317, /* p_args_post */
1677 YYSYMBOL_p_arg = 318, /* p_arg */
1678 YYSYMBOL_p_kwargs = 319, /* p_kwargs */
1679 YYSYMBOL_p_kwarg = 320, /* p_kwarg */
1680 YYSYMBOL_p_kw = 321, /* p_kw */
1681 YYSYMBOL_p_kw_label = 322, /* p_kw_label */
1682 YYSYMBOL_p_kwrest = 323, /* p_kwrest */
1683 YYSYMBOL_p_kwnorest = 324, /* p_kwnorest */
1684 YYSYMBOL_p_any_kwrest = 325, /* p_any_kwrest */
1685 YYSYMBOL_p_value = 326, /* p_value */
1686 YYSYMBOL_p_primitive = 327, /* p_primitive */
1687 YYSYMBOL_p_variable = 328, /* p_variable */
1688 YYSYMBOL_p_var_ref = 329, /* p_var_ref */
1689 YYSYMBOL_p_expr_ref = 330, /* p_expr_ref */
1690 YYSYMBOL_p_const = 331, /* p_const */
1691 YYSYMBOL_opt_rescue = 332, /* opt_rescue */
1692 YYSYMBOL_exc_list = 333, /* exc_list */
1693 YYSYMBOL_exc_var = 334, /* exc_var */
1694 YYSYMBOL_opt_ensure = 335, /* opt_ensure */
1695 YYSYMBOL_literal = 336, /* literal */
1696 YYSYMBOL_strings = 337, /* strings */
1697 YYSYMBOL_string = 338, /* string */
1698 YYSYMBOL_string1 = 339, /* string1 */
1699 YYSYMBOL_xstring = 340, /* xstring */
1700 YYSYMBOL_regexp = 341, /* regexp */
1701 YYSYMBOL_words = 342, /* words */
1702 YYSYMBOL_word_list = 343, /* word_list */
1703 YYSYMBOL_word = 344, /* word */
1704 YYSYMBOL_symbols = 345, /* symbols */
1705 YYSYMBOL_symbol_list = 346, /* symbol_list */
1706 YYSYMBOL_qwords = 347, /* qwords */
1707 YYSYMBOL_qsymbols = 348, /* qsymbols */
1708 YYSYMBOL_qword_list = 349, /* qword_list */
1709 YYSYMBOL_qsym_list = 350, /* qsym_list */
1710 YYSYMBOL_string_contents = 351, /* string_contents */
1711 YYSYMBOL_xstring_contents = 352, /* xstring_contents */
1712 YYSYMBOL_regexp_contents = 353, /* regexp_contents */
1713 YYSYMBOL_string_content = 354, /* string_content */
1714 YYSYMBOL_355_40 = 355, /* @40 */
1715 YYSYMBOL_356_41 = 356, /* $@41 */
1716 YYSYMBOL_357_42 = 357, /* @42 */
1717 YYSYMBOL_358_43 = 358, /* @43 */
1718 YYSYMBOL_359_44 = 359, /* @44 */
1719 YYSYMBOL_360_45 = 360, /* @45 */
1720 YYSYMBOL_string_dvar = 361, /* string_dvar */
1721 YYSYMBOL_symbol = 362, /* symbol */
1722 YYSYMBOL_ssym = 363, /* ssym */
1723 YYSYMBOL_sym = 364, /* sym */
1724 YYSYMBOL_dsym = 365, /* dsym */
1725 YYSYMBOL_numeric = 366, /* numeric */
1726 YYSYMBOL_simple_numeric = 367, /* simple_numeric */
1727 YYSYMBOL_nonlocal_var = 368, /* nonlocal_var */
1728 YYSYMBOL_user_variable = 369, /* user_variable */
1729 YYSYMBOL_keyword_variable = 370, /* keyword_variable */
1730 YYSYMBOL_var_ref = 371, /* var_ref */
1731 YYSYMBOL_var_lhs = 372, /* var_lhs */
1732 YYSYMBOL_backref = 373, /* backref */
1733 YYSYMBOL_superclass = 374, /* superclass */
1734 YYSYMBOL_375_46 = 375, /* $@46 */
1735 YYSYMBOL_f_opt_paren_args = 376, /* f_opt_paren_args */
1736 YYSYMBOL_f_paren_args = 377, /* f_paren_args */
1737 YYSYMBOL_f_arglist = 378, /* f_arglist */
1738 YYSYMBOL_379_47 = 379, /* @47 */
1739 YYSYMBOL_args_tail = 380, /* args_tail */
1740 YYSYMBOL_opt_args_tail = 381, /* opt_args_tail */
1741 YYSYMBOL_f_args = 382, /* f_args */
1742 YYSYMBOL_args_forward = 383, /* args_forward */
1743 YYSYMBOL_f_bad_arg = 384, /* f_bad_arg */
1744 YYSYMBOL_f_norm_arg = 385, /* f_norm_arg */
1745 YYSYMBOL_f_arg_asgn = 386, /* f_arg_asgn */
1746 YYSYMBOL_f_arg_item = 387, /* f_arg_item */
1747 YYSYMBOL_f_arg = 388, /* f_arg */
1748 YYSYMBOL_f_label = 389, /* f_label */
1749 YYSYMBOL_f_kw = 390, /* f_kw */
1750 YYSYMBOL_f_block_kw = 391, /* f_block_kw */
1751 YYSYMBOL_f_block_kwarg = 392, /* f_block_kwarg */
1752 YYSYMBOL_f_kwarg = 393, /* f_kwarg */
1753 YYSYMBOL_kwrest_mark = 394, /* kwrest_mark */
1754 YYSYMBOL_f_no_kwarg = 395, /* f_no_kwarg */
1755 YYSYMBOL_f_kwrest = 396, /* f_kwrest */
1756 YYSYMBOL_f_opt = 397, /* f_opt */
1757 YYSYMBOL_f_block_opt = 398, /* f_block_opt */
1758 YYSYMBOL_f_block_optarg = 399, /* f_block_optarg */
1759 YYSYMBOL_f_optarg = 400, /* f_optarg */
1760 YYSYMBOL_restarg_mark = 401, /* restarg_mark */
1761 YYSYMBOL_f_rest_arg = 402, /* f_rest_arg */
1762 YYSYMBOL_blkarg_mark = 403, /* blkarg_mark */
1763 YYSYMBOL_f_block_arg = 404, /* f_block_arg */
1764 YYSYMBOL_opt_f_block_arg = 405, /* opt_f_block_arg */
1765 YYSYMBOL_singleton = 406, /* singleton */
1766 YYSYMBOL_407_48 = 407, /* $@48 */
1767 YYSYMBOL_assoc_list = 408, /* assoc_list */
1768 YYSYMBOL_assocs = 409, /* assocs */
1769 YYSYMBOL_assoc = 410, /* assoc */
1770 YYSYMBOL_operation = 411, /* operation */
1771 YYSYMBOL_operation2 = 412, /* operation2 */
1772 YYSYMBOL_operation3 = 413, /* operation3 */
1773 YYSYMBOL_dot_or_colon = 414, /* dot_or_colon */
1774 YYSYMBOL_call_op = 415, /* call_op */
1775 YYSYMBOL_call_op2 = 416, /* call_op2 */
1776 YYSYMBOL_opt_terms = 417, /* opt_terms */
1777 YYSYMBOL_opt_nl = 418, /* opt_nl */
1778 YYSYMBOL_rparen = 419, /* rparen */
1779 YYSYMBOL_rbracket = 420, /* rbracket */
1780 YYSYMBOL_rbrace = 421, /* rbrace */
1781 YYSYMBOL_trailer = 422, /* trailer */
1782 YYSYMBOL_term = 423, /* term */
1783 YYSYMBOL_terms = 424, /* terms */
1784 YYSYMBOL_none = 425 /* none */
1785};
1786typedef enum yysymbol_kind_t yysymbol_kind_t;
1787
1788
1789
1790
1791#ifdef short
1792# undef short
1793#endif
1794
1795/* On compilers that do not define __PTRDIFF_MAX__ etc., make sure
1796 <limits.h> and (if available) <stdint.h> are included
1797 so that the code can choose integer types of a good width. */
1798
1799#ifndef __PTRDIFF_MAX__
1800# include <limits.h> /* INFRINGES ON USER NAME SPACE */
1801# if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
1802# include <stdint.h> /* INFRINGES ON USER NAME SPACE */
1803# define YY_STDINT_H
1804# endif
1805#endif
1806
1807/* Narrow types that promote to a signed type and that can represent a
1808 signed or unsigned integer of at least N bits. In tables they can
1809 save space and decrease cache pressure. Promoting to a signed type
1810 helps avoid bugs in integer arithmetic. */
1811
1812#ifdef __INT_LEAST8_MAX__
1813typedef __INT_LEAST8_TYPE__ yytype_int8;
1814#elif defined YY_STDINT_H
1815typedef int_least8_t yytype_int8;
1816#else
1817typedef signed char yytype_int8;
1818#endif
1819
1820#ifdef __INT_LEAST16_MAX__
1821typedef __INT_LEAST16_TYPE__ yytype_int16;
1822#elif defined YY_STDINT_H
1823typedef int_least16_t yytype_int16;
1824#else
1825typedef short yytype_int16;
1826#endif
1827
1828/* Work around bug in HP-UX 11.23, which defines these macros
1829 incorrectly for preprocessor constants. This workaround can likely
1830 be removed in 2023, as HPE has promised support for HP-UX 11.23
1831 (aka HP-UX 11i v2) only through the end of 2022; see Table 2 of
1832 <https://h20195.www2.hpe.com/V2/getpdf.aspx/4AA4-7673ENW.pdf>. */
1833#ifdef __hpux
1834# undef UINT_LEAST8_MAX
1835# undef UINT_LEAST16_MAX
1836# define UINT_LEAST8_MAX 255
1837# define UINT_LEAST16_MAX 65535
1838#endif
1839
1840#if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__
1841typedef __UINT_LEAST8_TYPE__ yytype_uint8;
1842#elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \
1843 && UINT_LEAST8_MAX <= INT_MAX)
1844typedef uint_least8_t yytype_uint8;
1845#elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX
1846typedef unsigned char yytype_uint8;
1847#else
1848typedef short yytype_uint8;
1849#endif
1850
1851#if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__
1852typedef __UINT_LEAST16_TYPE__ yytype_uint16;
1853#elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \
1854 && UINT_LEAST16_MAX <= INT_MAX)
1855typedef uint_least16_t yytype_uint16;
1856#elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX
1857typedef unsigned short yytype_uint16;
1858#else
1859typedef int yytype_uint16;
1860#endif
1861
1862#ifndef YYPTRDIFF_T
1863# if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__
1864# define YYPTRDIFF_T __PTRDIFF_TYPE__
1865# define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__
1866# elif defined PTRDIFF_MAX
1867# ifndef ptrdiff_t
1868# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
1869# endif
1870# define YYPTRDIFF_T ptrdiff_t
1871# define YYPTRDIFF_MAXIMUM PTRDIFF_MAX
1872# else
1873# define YYPTRDIFF_T long
1874# define YYPTRDIFF_MAXIMUM LONG_MAX
1875# endif
1876#endif
1877
1878#ifndef YYSIZE_T
1879# ifdef __SIZE_TYPE__
1880# define YYSIZE_T __SIZE_TYPE__
1881# elif defined size_t
1882# define YYSIZE_T size_t
1883# elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
1884# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
1885# define YYSIZE_T size_t
1886# else
1887# define YYSIZE_T unsigned
1888# endif
1889#endif
1890
1891#define YYSIZE_MAXIMUM \
1892 YY_CAST (YYPTRDIFF_T, \
1893 (YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1) \
1894 ? YYPTRDIFF_MAXIMUM \
1895 : YY_CAST (YYSIZE_T, -1)))
1896
1897#define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X))
1898
1899
1900/* Stored state numbers (used for stacks). */
1901typedef yytype_int16 yy_state_t;
1902
1903/* State numbers in computations. */
1904typedef int yy_state_fast_t;
1905
1906#ifndef YY_
1907# if defined YYENABLE_NLS && YYENABLE_NLS
1908# if ENABLE_NLS
1909# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
1910# define YY_(Msgid) dgettext ("bison-runtime", Msgid)
1911# endif
1912# endif
1913# ifndef YY_
1914# define YY_(Msgid) Msgid
1915# endif
1916#endif
1917
1918
1919#ifndef YY_ATTRIBUTE_PURE
1920# if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__)
1921# define YY_ATTRIBUTE_PURE __attribute__ ((__pure__))
1922# else
1923# define YY_ATTRIBUTE_PURE
1924# endif
1925#endif
1926
1927#ifndef YY_ATTRIBUTE_UNUSED
1928# if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__)
1929# define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
1930# else
1931# define YY_ATTRIBUTE_UNUSED
1932# endif
1933#endif
1934
1935/* Suppress unused-variable warnings by "using" E. */
1936#if ! defined lint || defined __GNUC__
1937# define YY_USE(E) ((void) (E))
1938#else
1939# define YY_USE(E) /* empty */
1940#endif
1941
1942/* Suppress an incorrect diagnostic about yylval being uninitialized. */
1943#if defined __GNUC__ && ! defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__
1944# if __GNUC__ * 100 + __GNUC_MINOR__ < 407
1945# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
1946 _Pragma ("GCC diagnostic push") \
1947 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")
1948# else
1949# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
1950 _Pragma ("GCC diagnostic push") \
1951 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \
1952 _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
1953# endif
1954# define YY_IGNORE_MAYBE_UNINITIALIZED_END \
1955 _Pragma ("GCC diagnostic pop")
1956#else
1957# define YY_INITIAL_VALUE(Value) Value
1958#endif
1959#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1960# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1961# define YY_IGNORE_MAYBE_UNINITIALIZED_END
1962#endif
1963#ifndef YY_INITIAL_VALUE
1964# define YY_INITIAL_VALUE(Value) /* Nothing. */
1965#endif
1966
1967#if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__
1968# define YY_IGNORE_USELESS_CAST_BEGIN \
1969 _Pragma ("GCC diagnostic push") \
1970 _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"")
1971# define YY_IGNORE_USELESS_CAST_END \
1972 _Pragma ("GCC diagnostic pop")
1973#endif
1974#ifndef YY_IGNORE_USELESS_CAST_BEGIN
1975# define YY_IGNORE_USELESS_CAST_BEGIN
1976# define YY_IGNORE_USELESS_CAST_END
1977#endif
1978
1979
1980#define YY_ASSERT(E) ((void) (0 && (E)))
1981
1982#if 1
1983
1984/* The parser invokes alloca or malloc; define the necessary symbols. */
1985
1986# ifdef YYSTACK_USE_ALLOCA
1987# if YYSTACK_USE_ALLOCA
1988# ifdef __GNUC__
1989# define YYSTACK_ALLOC __builtin_alloca
1990# elif defined __BUILTIN_VA_ARG_INCR
1991# include <alloca.h> /* INFRINGES ON USER NAME SPACE */
1992# elif defined _AIX
1993# define YYSTACK_ALLOC __alloca
1994# elif defined _MSC_VER
1995# include <malloc.h> /* INFRINGES ON USER NAME SPACE */
1996# define alloca _alloca
1997# else
1998# define YYSTACK_ALLOC alloca
1999# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
2000# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
2001 /* Use EXIT_SUCCESS as a witness for stdlib.h. */
2002# ifndef EXIT_SUCCESS
2003# define EXIT_SUCCESS 0
2004# endif
2005# endif
2006# endif
2007# endif
2008# endif
2009
2010# ifdef YYSTACK_ALLOC
2011 /* Pacify GCC's 'empty if-body' warning. */
2012# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
2013# ifndef YYSTACK_ALLOC_MAXIMUM
2014 /* The OS might guarantee only one guard page at the bottom of the stack,
2015 and a page size can be as small as 4096 bytes. So we cannot safely
2016 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
2017 to allow for a few compiler-allocated temporary stack slots. */
2018# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
2019# endif
2020# else
2021# define YYSTACK_ALLOC YYMALLOC
2022# define YYSTACK_FREE YYFREE
2023# ifndef YYSTACK_ALLOC_MAXIMUM
2024# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
2025# endif
2026# if (defined __cplusplus && ! defined EXIT_SUCCESS \
2027 && ! ((defined YYMALLOC || defined malloc) \
2028 && (defined YYFREE || defined free)))
2029# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
2030# ifndef EXIT_SUCCESS
2031# define EXIT_SUCCESS 0
2032# endif
2033# endif
2034# ifndef YYMALLOC
2035# define YYMALLOC malloc
2036# if ! defined malloc && ! defined EXIT_SUCCESS
2037void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
2038# endif
2039# endif
2040# ifndef YYFREE
2041# define YYFREE free
2042# if ! defined free && ! defined EXIT_SUCCESS
2043void free (void *); /* INFRINGES ON USER NAME SPACE */
2044# endif
2045# endif
2046# endif
2047#endif /* 1 */
2048
2049#if (! defined yyoverflow \
2050 && (! defined __cplusplus \
2051 || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \
2052 && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
2053
2054/* A type that is properly aligned for any stack member. */
2055union yyalloc
2056{
2057 yy_state_t yyss_alloc;
2058 YYSTYPE yyvs_alloc;
2059 YYLTYPE yyls_alloc;
2060};
2061
2062/* The size of the maximum gap between one aligned stack and the next. */
2063# define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1)
2064
2065/* The size of an array large to enough to hold all stacks, each with
2066 N elements. */
2067# define YYSTACK_BYTES(N) \
2068 ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE) \
2069 + YYSIZEOF (YYLTYPE)) \
2070 + 2 * YYSTACK_GAP_MAXIMUM)
2071
2072# define YYCOPY_NEEDED 1
2073
2074/* Relocate STACK from its old location to the new one. The
2075 local variables YYSIZE and YYSTACKSIZE give the old and new number of
2076 elements in the stack, and YYPTR gives the new location of the
2077 stack. Advance YYPTR to a properly aligned location for the next
2078 stack. */
2079# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
2080 do \
2081 { \
2082 YYPTRDIFF_T yynewbytes; \
2083 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
2084 Stack = &yyptr->Stack_alloc; \
2085 yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \
2086 yyptr += yynewbytes / YYSIZEOF (*yyptr); \
2087 } \
2088 while (0)
2089
2090#endif
2091
2092#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
2093/* Copy COUNT objects from SRC to DST. The source and destination do
2094 not overlap. */
2095# ifndef YYCOPY
2096# if defined __GNUC__ && 1 < __GNUC__
2097# define YYCOPY(Dst, Src, Count) \
2098 __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src)))
2099# else
2100# define YYCOPY(Dst, Src, Count) \
2101 do \
2102 { \
2103 YYPTRDIFF_T yyi; \
2104 for (yyi = 0; yyi < (Count); yyi++) \
2105 (Dst)[yyi] = (Src)[yyi]; \
2106 } \
2107 while (0)
2108# endif
2109# endif
2110#endif /* !YYCOPY_NEEDED */
2111
2112/* YYFINAL -- State number of the termination state. */
2113#define YYFINAL 3
2114/* YYLAST -- Last index in YYTABLE. */
2115#define YYLAST 15161
2116
2117/* YYNTOKENS -- Number of terminals. */
2118#define YYNTOKENS 154
2119/* YYNNTS -- Number of nonterminals. */
2120#define YYNNTS 272
2121/* YYNRULES -- Number of rules. */
2122#define YYNRULES 785
2123/* YYNSTATES -- Number of states. */
2124#define YYNSTATES 1309
2125
2126/* YYMAXUTOK -- Last valid token kind. */
2127#define YYMAXUTOK 353
2128
2129
2130/* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM
2131 as returned by yylex, with out-of-bounds checking. */
2132#define YYTRANSLATE(YYX) \
2133 (0 <= (YYX) && (YYX) <= YYMAXUTOK \
2134 ? YY_CAST (yysymbol_kind_t, yytranslate[YYX]) \
2135 : YYSYMBOL_YYUNDEF)
2136
2137/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
2138 as returned by yylex. */
2139static const yytype_uint8 yytranslate[] =
2140{
2141 0, 2, 2, 2, 2, 2, 2, 2, 2, 71,
2142 153, 74, 72, 73, 2, 2, 2, 2, 2, 2,
2143 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2144 2, 2, 152, 140, 2, 2, 2, 138, 133, 2,
2145 148, 149, 136, 134, 146, 135, 68, 137, 2, 2,
2146 2, 2, 2, 2, 2, 2, 2, 2, 128, 151,
2147 130, 126, 129, 127, 2, 2, 2, 2, 2, 2,
2148 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2149 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2150 2, 145, 69, 150, 132, 2, 147, 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, 143, 131, 144, 141, 2, 88, 89,
2154 90, 91, 75, 76, 77, 78, 94, 95, 83, 82,
2155 79, 80, 81, 86, 87, 92, 93, 97, 84, 85,
2156 96, 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, 2, 2, 2, 2,
2160 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2161 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2162 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2163 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2164 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2165 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2166 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
2167 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
2168 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
2169 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
2170 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
2171 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
2172 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
2173 65, 66, 67, 70, 98, 99, 100, 101, 102, 103,
2174 104, 105, 106, 107, 108, 109, 110, 111, 112, 113,
2175 114, 115, 116, 117, 118, 119, 120, 121, 122, 123,
2176 124, 125, 139, 142
2177};
2178
2179#if YYDEBUG
2180/* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
2181static const yytype_int16 yyrline[] =
2182{
2183 0, 1327, 1327, 1327, 1353, 1359, 1366, 1373, 1380, 1386,
2184 1387, 1393, 1406, 1404, 1415, 1426, 1432, 1439, 1446, 1453,
2185 1459, 1464, 1463, 1473, 1473, 1480, 1487, 1497, 1506, 1513,
2186 1521, 1529, 1541, 1553, 1563, 1577, 1578, 1586, 1593, 1601,
2187 1608, 1611, 1618, 1625, 1633, 1640, 1647, 1655, 1662, 1673,
2188 1685, 1698, 1712, 1722, 1727, 1736, 1739, 1740, 1744, 1748,
2189 1752, 1757, 1765, 1756, 1779, 1787, 1778, 1800, 1803, 1820,
2190 1830, 1829, 1848, 1855, 1855, 1855, 1861, 1862, 1865, 1866,
2191 1875, 1885, 1895, 1904, 1915, 1922, 1929, 1936, 1943, 1951,
2192 1959, 1966, 1973, 1982, 1983, 1992, 1993, 2002, 2009, 2016,
2193 2023, 2030, 2037, 2044, 2051, 2058, 2065, 2074, 2075, 2084,
2194 2091, 2100, 2107, 2116, 2123, 2130, 2137, 2147, 2154, 2164,
2195 2171, 2178, 2188, 2195, 2202, 2209, 2216, 2223, 2230, 2237,
2196 2244, 2254, 2262, 2265, 2272, 2279, 2288, 2289, 2290, 2291,
2197 2296, 2299, 2306, 2309, 2316, 2316, 2326, 2327, 2328, 2329,
2198 2330, 2331, 2332, 2333, 2334, 2335, 2336, 2337, 2338, 2339,
2199 2340, 2341, 2342, 2343, 2344, 2345, 2346, 2347, 2348, 2349,
2200 2350, 2351, 2352, 2353, 2354, 2355, 2358, 2358, 2358, 2359,
2201 2359, 2360, 2360, 2360, 2361, 2361, 2361, 2361, 2362, 2362,
2202 2362, 2362, 2363, 2363, 2363, 2364, 2364, 2364, 2364, 2365,
2203 2365, 2365, 2365, 2366, 2366, 2366, 2366, 2367, 2367, 2367,
2204 2367, 2368, 2368, 2368, 2368, 2369, 2369, 2372, 2379, 2386,
2205 2393, 2400, 2407, 2414, 2422, 2430, 2438, 2447, 2456, 2464,
2206 2472, 2480, 2488, 2492, 2496, 2500, 2504, 2508, 2512, 2516,
2207 2520, 2524, 2528, 2532, 2536, 2540, 2541, 2545, 2549, 2553,
2208 2557, 2561, 2565, 2569, 2573, 2577, 2581, 2585, 2585, 2590,
2209 2599, 2610, 2622, 2635, 2649, 2655, 2656, 2657, 2658, 2661,
2210 2665, 2672, 2676, 2682, 2689, 2690, 2694, 2701, 2710, 2715,
2211 2725, 2732, 2744, 2758, 2759, 2762, 2763, 2764, 2768, 2775,
2212 2784, 2792, 2799, 2807, 2815, 2819, 2819, 2856, 2863, 2876,
2213 2880, 2887, 2894, 2901, 2908, 2918, 2919, 2923, 2930, 2937,
2214 2946, 2947, 2948, 2949, 2950, 2951, 2952, 2953, 2954, 2955,
2215 2956, 2964, 2963, 2978, 2978, 2985, 2985, 2993, 3001, 3008,
2216 3015, 3022, 3030, 3037, 3044, 3051, 3058, 3058, 3063, 3067,
2217 3071, 3078, 3079, 3087, 3088, 3099, 3110, 3120, 3131, 3130,
2218 3147, 3146, 3161, 3170, 3213, 3212, 3236, 3235, 3258, 3257,
2219 3280, 3292, 3306, 3313, 3320, 3327, 3336, 3343, 3349, 3366,
2220 3372, 3378, 3384, 3390, 3396, 3403, 3410, 3417, 3423, 3429,
2221 3435, 3441, 3447, 3462, 3469, 3475, 3482, 3483, 3484, 3487,
2222 3488, 3491, 3492, 3504, 3505, 3514, 3515, 3518, 3526, 3535,
2223 3542, 3551, 3558, 3565, 3572, 3579, 3588, 3596, 3605, 3606,
2224 3609, 3609, 3611, 3615, 3619, 3623, 3629, 3634, 3639, 3649,
2225 3653, 3657, 3661, 3665, 3669, 3674, 3678, 3682, 3686, 3690,
2226 3694, 3698, 3702, 3706, 3712, 3713, 3719, 3729, 3742, 3746,
2227 3755, 3757, 3761, 3766, 3773, 3779, 3783, 3787, 3772, 3812,
2228 3821, 3832, 3837, 3843, 3853, 3867, 3874, 3881, 3890, 3899,
2229 3907, 3915, 3922, 3930, 3938, 3945, 3952, 3965, 3973, 3983,
2230 3984, 3988, 3983, 4005, 4006, 4010, 4005, 4029, 4037, 4044,
2231 4052, 4061, 4073, 4074, 4078, 4085, 4089, 4077, 4104, 4105,
2232 4108, 4109, 4117, 4127, 4128, 4133, 4141, 4145, 4149, 4155,
2233 4158, 4167, 4170, 4177, 4180, 4181, 4183, 4184, 4185, 4194,
2234 4203, 4212, 4217, 4226, 4235, 4244, 4249, 4253, 4257, 4263,
2235 4262, 4274, 4279, 4279, 4286, 4295, 4299, 4308, 4312, 4316,
2236 4320, 4324, 4327, 4331, 4340, 4344, 4350, 4360, 4364, 4370,
2237 4371, 4380, 4389, 4393, 4397, 4401, 4407, 4409, 4418, 4426,
2238 4440, 4441, 4464, 4468, 4474, 4480, 4481, 4484, 4485, 4494,
2239 4503, 4511, 4519, 4520, 4521, 4522, 4530, 4540, 4541, 4542,
2240 4543, 4544, 4545, 4546, 4547, 4548, 4555, 4558, 4568, 4579,
2241 4588, 4597, 4604, 4611, 4620, 4632, 4635, 4642, 4649, 4652,
2242 4656, 4659, 4666, 4669, 4670, 4673, 4690, 4691, 4692, 4701,
2243 4711, 4720, 4726, 4736, 4742, 4751, 4753, 4762, 4772, 4778,
2244 4787, 4796, 4806, 4812, 4822, 4828, 4838, 4848, 4867, 4873,
2245 4883, 4893, 4934, 4937, 4936, 4953, 4957, 4962, 4966, 4970,
2246 4952, 4991, 4998, 5005, 5012, 5015, 5016, 5019, 5029, 5030,
2247 5031, 5032, 5035, 5045, 5046, 5056, 5057, 5058, 5059, 5062,
2248 5063, 5064, 5067, 5068, 5069, 5070, 5071, 5074, 5075, 5076,
2249 5077, 5078, 5079, 5080, 5083, 5096, 5105, 5112, 5121, 5122,
2250 5126, 5125, 5135, 5143, 5144, 5152, 5164, 5165, 5165, 5181,
2251 5185, 5189, 5193, 5197, 5204, 5209, 5214, 5218, 5222, 5226,
2252 5230, 5234, 5238, 5242, 5246, 5250, 5254, 5258, 5262, 5266,
2253 5271, 5277, 5286, 5295, 5304, 5313, 5324, 5325, 5333, 5342,
2254 5350, 5371, 5373, 5386, 5396, 5405, 5416, 5424, 5434, 5441,
2255 5451, 5458, 5467, 5468, 5471, 5479, 5487, 5497, 5508, 5519,
2256 5526, 5535, 5542, 5551, 5552, 5555, 5563, 5573, 5574, 5577,
2257 5585, 5595, 5599, 5605, 5610, 5610, 5634, 5635, 5644, 5646,
2258 5669, 5680, 5687, 5696, 5704, 5723, 5724, 5725, 5728, 5729,
2259 5730, 5731, 5734, 5735, 5736, 5739, 5740, 5743, 5744, 5747,
2260 5748, 5751, 5752, 5755, 5756, 5759, 5762, 5765, 5768, 5769,
2261 5770, 5773, 5774, 5777, 5778, 5782
2262};
2263#endif
2264
2266#define YY_ACCESSING_SYMBOL(State) YY_CAST (yysymbol_kind_t, yystos[State])
2267
2268#if 1
2269/* The user-facing name of the symbol whose (internal) number is
2270 YYSYMBOL. No bounds checking. */
2271static const char *yysymbol_name (yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED;
2272
2273/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
2274 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
2275static const char *const yytname[] =
2276{
2277 "\"end-of-input\"", "error", "\"invalid token\"", "\"`class'\"",
2278 "\"`module'\"", "\"`def'\"", "\"`undef'\"", "\"`begin'\"",
2279 "\"`rescue'\"", "\"`ensure'\"", "\"`end'\"", "\"`if'\"", "\"`unless'\"",
2280 "\"`then'\"", "\"`elsif'\"", "\"`else'\"", "\"`case'\"", "\"`when'\"",
2281 "\"`while'\"", "\"`until'\"", "\"`for'\"", "\"`break'\"", "\"`next'\"",
2282 "\"`redo'\"", "\"`retry'\"", "\"`in'\"", "\"`do'\"",
2283 "\"`do' for condition\"", "\"`do' for block\"", "\"`do' for lambda\"",
2284 "\"`return'\"", "\"`yield'\"", "\"`super'\"", "\"`self'\"", "\"`nil'\"",
2285 "\"`true'\"", "\"`false'\"", "\"`and'\"", "\"`or'\"", "\"`not'\"",
2286 "\"`if' modifier\"", "\"`unless' modifier\"", "\"`while' modifier\"",
2287 "\"`until' modifier\"", "\"`rescue' modifier\"", "\"`alias'\"",
2288 "\"`defined?'\"", "\"`BEGIN'\"", "\"`END'\"", "\"`__LINE__'\"",
2289 "\"`__FILE__'\"", "\"`__ENCODING__'\"", "\"local variable or method\"",
2290 "\"method\"", "\"global variable\"", "\"instance variable\"",
2291 "\"constant\"", "\"class variable\"", "\"label\"", "\"integer literal\"",
2292 "\"float literal\"", "\"rational literal\"", "\"imaginary literal\"",
2293 "\"char literal\"", "\"numbered reference\"", "\"back reference\"",
2294 "\"literal content\"", "tREGEXP_END", "'.'", "\"backslash\"",
2295 "\"escaped space\"", "\"escaped horizontal tab\"",
2296 "\"escaped form feed\"", "\"escaped carriage return\"",
2297 "\"escaped vertical tab\"", "\"unary+\"", "\"unary-\"", "\"**\"",
2298 "\"<=>\"", "\"==\"", "\"===\"", "\"!=\"", "\">=\"", "\"<=\"", "\"&&\"",
2299 "\"||\"", "\"=~\"", "\"!~\"", "\"..\"", "\"...\"", "\"(..\"", "\"(...\"",
2300 "\"[]\"", "\"[]=\"", "\"<<\"", "\">>\"", "\"&.\"", "\"::\"",
2301 "\":: at EXPR_BEG\"", "\"operator-assignment\"", "\"=>\"", "\"(\"",
2302 "\"( arg\"", "\")\"", "\"[\"", "\"{\"", "\"{ arg\"", "\"*\"",
2303 "\"**arg\"", "\"&\"", "\"->\"", "\"symbol literal\"",
2304 "\"string literal\"", "\"backtick literal\"", "\"regexp literal\"",
2305 "\"word list\"", "\"verbatim word list\"", "\"symbol list\"",
2306 "\"verbatim symbol list\"", "\"terminator\"", "\"'}'\"", "tSTRING_DBEG",
2307 "tSTRING_DVAR", "tLAMBEG", "tLABEL_END", "tLOWEST", "'='", "'?'", "':'",
2308 "'>'", "'<'", "'|'", "'^'", "'&'", "'+'", "'-'", "'*'", "'/'", "'%'",
2309 "tUMINUS_NUM", "'!'", "'~'", "tLAST_TOKEN", "'{'", "'}'", "'['", "','",
2310 "'`'", "'('", "')'", "']'", "';'", "' '", "'\\n'", "$accept", "program",
2311 "$@1", "top_compstmt", "top_stmts", "top_stmt", "begin_block",
2312 "bodystmt", "$@2", "compstmt", "stmts", "stmt_or_begin", "$@3", "stmt",
2313 "$@4", "command_asgn", "command_rhs", "expr", "@5", "@6", "@7", "@8",
2314 "def_name", "defn_head", "defs_head", "$@9", "expr_value",
2315 "expr_value_do", "$@10", "$@11", "command_call", "block_command",
2316 "cmd_brace_block", "fcall", "command", "mlhs", "mlhs_inner",
2317 "mlhs_basic", "mlhs_item", "mlhs_head", "mlhs_post", "mlhs_node", "lhs",
2318 "cname", "cpath", "fname", "fitem", "undef_list", "$@12", "op",
2319 "reswords", "arg", "$@13", "relop", "rel_expr", "lex_ctxt", "arg_value",
2320 "aref_args", "arg_rhs", "paren_args", "opt_paren_args", "opt_call_args",
2321 "call_args", "command_args", "$@14", "block_arg", "opt_block_arg",
2322 "args", "mrhs_arg", "mrhs", "primary", "$@15", "$@16", "$@17", "$@18",
2323 "@19", "@20", "$@21", "$@22", "$@23", "primary_value", "k_begin", "k_if",
2324 "k_unless", "k_while", "k_until", "k_case", "k_for", "k_class",
2325 "k_module", "k_def", "k_do", "k_do_block", "k_rescue", "k_ensure",
2326 "k_when", "k_else", "k_elsif", "k_end", "k_return", "then", "do",
2327 "if_tail", "opt_else", "for_var", "f_marg", "f_marg_list", "f_margs",
2328 "f_rest_marg", "f_any_kwrest", "f_eq", "$@24", "block_args_tail",
2329 "opt_block_args_tail", "excessed_comma", "block_param",
2330 "opt_block_param", "block_param_def", "opt_bv_decl", "bv_decls", "bvar",
2331 "lambda", "@25", "@26", "@27", "$@28", "f_larglist", "lambda_body",
2332 "do_block", "block_call", "method_call", "brace_block", "brace_body",
2333 "@29", "@30", "@31", "do_body", "@32", "@33", "@34", "case_args",
2334 "case_body", "cases", "p_case_body", "@35", "@36", "$@37", "p_cases",
2335 "p_top_expr", "p_top_expr_body", "p_expr", "p_as", "p_alt", "p_lparen",
2336 "p_lbracket", "p_expr_basic", "@38", "@39", "p_args", "p_args_head",
2337 "p_args_tail", "p_find", "p_rest", "p_args_post", "p_arg", "p_kwargs",
2338 "p_kwarg", "p_kw", "p_kw_label", "p_kwrest", "p_kwnorest",
2339 "p_any_kwrest", "p_value", "p_primitive", "p_variable", "p_var_ref",
2340 "p_expr_ref", "p_const", "opt_rescue", "exc_list", "exc_var",
2341 "opt_ensure", "literal", "strings", "string", "string1", "xstring",
2342 "regexp", "words", "word_list", "word", "symbols", "symbol_list",
2343 "qwords", "qsymbols", "qword_list", "qsym_list", "string_contents",
2344 "xstring_contents", "regexp_contents", "string_content", "@40", "$@41",
2345 "@42", "@43", "@44", "@45", "string_dvar", "symbol", "ssym", "sym",
2346 "dsym", "numeric", "simple_numeric", "nonlocal_var", "user_variable",
2347 "keyword_variable", "var_ref", "var_lhs", "backref", "superclass",
2348 "$@46", "f_opt_paren_args", "f_paren_args", "f_arglist", "@47",
2349 "args_tail", "opt_args_tail", "f_args", "args_forward", "f_bad_arg",
2350 "f_norm_arg", "f_arg_asgn", "f_arg_item", "f_arg", "f_label", "f_kw",
2351 "f_block_kw", "f_block_kwarg", "f_kwarg", "kwrest_mark", "f_no_kwarg",
2352 "f_kwrest", "f_opt", "f_block_opt", "f_block_optarg", "f_optarg",
2353 "restarg_mark", "f_rest_arg", "blkarg_mark", "f_block_arg",
2354 "opt_f_block_arg", "singleton", "$@48", "assoc_list", "assocs", "assoc",
2355 "operation", "operation2", "operation3", "dot_or_colon", "call_op",
2356 "call_op2", "opt_terms", "opt_nl", "rparen", "rbracket", "rbrace",
2357 "trailer", "term", "terms", "none", YY_NULLPTR
2358};
2359
2360static const char *
2361yysymbol_name (yysymbol_kind_t yysymbol)
2362{
2363 return yytname[yysymbol];
2364}
2365#endif
2366
2367#define YYPACT_NINF (-1086)
2368
2369#define yypact_value_is_default(Yyn) \
2370 ((Yyn) == YYPACT_NINF)
2371
2372#define YYTABLE_NINF (-786)
2373
2374#define yytable_value_is_error(Yyn) \
2375 ((Yyn) == YYTABLE_NINF)
2376
2377/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
2378 STATE-NUM. */
2379static const yytype_int16 yypact[] =
2380{
2381 -1086, 168, 4730, -1086, 10445, -1086, -1086, -1086, 9903, -1086,
2382 -1086, -1086, -1086, -1086, -1086, -1086, 10571, 10571, -1086, -1086,
2383 -1086, 6363, 5922, -1086, -1086, -1086, -1086, 574, 9758, 26,
2384 48, 92, -1086, -1086, -1086, 5187, 6069, -1086, -1086, 5334,
2385 -1086, -1086, -1086, -1086, -1086, -1086, -1086, -1086, 12335, 12335,
2386 12335, 12335, 273, 7958, 10697, 11201, 11579, 10187, -1086, 9613,
2387 -1086, -1086, -1086, 196, 239, 259, 302, 1067, 12461, 12335,
2388 -1086, 418, -1086, 1061, -1086, 774, 345, 345, -1086, -1086,
2389 195, 441, 364, -1086, 404, 12713, -1086, 405, 3899, 546,
2390 317, 329, -1086, 12587, 12587, -1086, -1086, 8940, 12835, 12957,
2391 13079, 9467, 10571, -1086, 70, 122, -1086, -1086, 471, -1086,
2392 -1086, -1086, -1086, -1086, -1086, -1086, -1086, -1086, -1086, -1086,
2393 -1086, 52, 353, -1086, 518, 678, -1086, -1086, -1086, -1086,
2394 -1086, -1086, -1086, -1086, -1086, -1086, -1086, -1086, -1086, -1086,
2395 -1086, -1086, -1086, -1086, -1086, -1086, -1086, -1086, -1086, -1086,
2396 -1086, -1086, -1086, -1086, -1086, -1086, -1086, -1086, -1086, -1086,
2397 -1086, -1086, -1086, -1086, -1086, -1086, -1086, -1086, -1086, -1086,
2398 -1086, -1086, -1086, -1086, -1086, -1086, -1086, -1086, -1086, -1086,
2399 -1086, -1086, -1086, -1086, -1086, -1086, -1086, -1086, -1086, -1086,
2400 -1086, -1086, -1086, -1086, -1086, -1086, -1086, -1086, -1086, -1086,
2401 -1086, -1086, -1086, -1086, -1086, 486, -1086, -1086, -1086, 505,
2402 12335, 610, 8109, 12335, 12335, 12335, -1086, 12335, 345, 345,
2403 -1086, 552, 5753, 602, -1086, -1086, 592, 369, 274, 454,
2404 641, 464, 615, -1086, -1086, 8814, -1086, 10571, 10823, -1086,
2405 -1086, 9066, -1086, 12587, 618, -1086, 616, 8260, -1086, 8411,
2406 -1086, -1086, 621, 651, 195, -1086, 385, -1086, 736, 5900,
2407 5900, 742, 10697, -1086, 7958, 682, 418, -1086, 1061, 26,
2408 707, -1086, 1061, 26, 699, 85, 617, -1086, 602, 692,
2409 617, -1086, 26, 798, 1067, 13201, 713, 713, 719, -1086,
2410 516, 596, 609, 611, -1086, -1086, -1086, -1086, -1086, 81,
2411 -1086, 453, 501, 470, -1086, -1086, -1086, -1086, 795, -1086,
2412 -1086, -1086, -1086, -1086, -1086, -1086, 9192, 12587, 12587, 12587,
2413 12587, 10697, 12587, 12587, 1785, 748, 754, 7102, 1785, -1086,
2414 761, 7102, -1086, -1086, -1086, 784, -1086, -1086, -1086, -1086,
2415 -1086, 823, -1086, 7958, 10316, 749, 823, -1086, 12335, 12335,
2416 12335, 12335, 12335, -1086, -1086, 12335, 12335, 12335, 12335, 12335,
2417 12335, 12335, 12335, -1086, 12335, -1086, -1086, 12335, 12335, 12335,
2418 12335, 12335, 12335, 12335, 12335, 12335, 12335, -1086, -1086, 13664,
2419 10571, 13754, 7102, 774, 151, 151, 8562, 12587, 8562, 418,
2420 -1086, 753, 844, -1086, -1086, 622, 884, 91, 121, 129,
2421 951, 1040, 12587, 379, -1086, 782, 661, -1086, -1086, -1086,
2422 -1086, 72, 304, 341, 344, 407, 420, 424, 510, 517,
2423 -1086, -1086, -1086, -1086, 548, -1086, -1086, -1086, 15014, -1086,
2424 -1086, 823, 823, -1086, -1086, 544, -1086, -1086, -1086, 904,
2425 804, 806, 823, 12335, 10949, -1086, -1086, 13844, 10571, 13934,
2426 823, 823, 11327, -1086, 26, 791, -1086, -1086, 12335, 26,
2427 -1086, 796, 26, 800, -1086, 159, -1086, -1086, -1086, -1086,
2428 -1086, 9903, -1086, 12335, 808, 813, 13844, 13934, 823, 1061,
2429 48, 26, -1086, -1086, 9318, 815, 26, -1086, -1086, 11453,
2430 -1086, -1086, 11579, -1086, -1086, -1086, 616, 669, -1086, -1086,
2431 821, -1086, 13201, 14024, 10571, 14114, -1086, -1086, -1086, -1086,
2432 -1086, -1086, -1086, -1086, -1086, -1086, -1086, 623, 56, 686,
2433 68, 12335, -1086, -1086, -1086, -1086, -1086, -1086, -1086, -1086,
2434 -1086, -1086, -1086, -1086, -1086, -1086, -1086, -1086, -1086, 1015,
2435 -1086, -1086, -1086, -1086, -1086, 828, -1086, 26, -1086, -1086,
2436 -1086, 843, -1086, 830, 12335, -1086, 832, 108, -1086, -1086,
2437 -1086, 835, 932, 841, 941, -1086, 12461, 987, 992, 418,
2438 12461, 987, 862, -1086, -1086, -1086, 987, -1086, 987, -1086,
2439 11705, -1086, 26, 13201, 875, -1086, 11705, -1086, 736, 6047,
2440 6047, 6047, 6047, 6194, 4208, 6047, 6047, 5900, 5900, 550,
2441 550, -1086, 6485, 1260, 1260, 1391, 386, 386, 736, 736,
2442 736, 1376, 1376, 6510, 5481, 6804, 5628, -1086, 651, -1086,
2443 26, 878, 751, -1086, 768, -1086, -1086, 6216, 987, -1086,
2444 7253, 1009, 7706, 987, 88, 987, 1007, 1020, 130, 14204,
2445 10571, 14294, -1086, 774, -1086, 669, -1086, -1086, -1086, 14384,
2446 10571, 14474, 7102, 12587, -1086, -1086, -1086, -1086, -1086, 3812,
2447 12461, 12461, 9903, 12335, 12335, 12335, 12335, -1086, 12335, 602,
2448 -1086, 615, 5039, 5775, 26, 595, 647, 12335, 12335, -1086,
2449 -1086, -1086, -1086, 11075, -1086, 11327, -1086, -1086, 12587, 5753,
2450 -1086, -1086, 651, 651, 12335, -1086, 261, -1086, -1086, 617,
2451 13201, 821, 403, 65, 26, 257, 298, 1528, -1086, 934,
2452 -1086, 63, -1086, 886, -1086, -1086, 71, 891, -1086, 736,
2453 1015, 1114, -1086, 890, 26, 900, -1086, 209, -1086, -1086,
2454 -1086, 12335, 924, 1785, -1086, -1086, 639, -1086, -1086, -1086,
2455 1785, -1086, -1086, 1696, -1086, -1086, 1011, 5312, -1086, -1086,
2456 -1086, 11831, 659, -1086, -1086, 1012, 5459, -1086, -1086, -1086,
2457 913, -1086, -1086, -1086, 12335, -1086, 914, 916, 1021, -1086,
2458 -1086, 821, 13201, -1086, -1086, 1024, 933, 5165, -1086, -1086,
2459 -1086, 766, 676, 4880, 4880, 935, 823, 823, -1086, 784,
2460 923, 797, 10949, 823, 823, -1086, -1086, 784, -1086, -1086,
2461 801, -1086, 1059, -1086, -1086, -1086, -1086, -1086, -1086, 1020,
2462 987, -1086, 11957, 987, 105, 297, 26, 138, 147, 8562,
2463 418, 12587, 7102, 1081, 65, -1086, 26, 987, 159, 10048,
2464 122, 441, -1086, 5606, -1086, -1086, -1086, -1086, -1086, -1086,
2465 -1086, 823, 823, 787, 823, 823, 26, 929, 159, -1086,
2466 -1086, -1086, 433, 1785, -1086, -1086, -1086, -1086, -1086, -1086,
2467 -1086, -1086, -1086, -1086, -1086, -1086, -1086, 26, -1086, 1015,
2468 -1086, 1091, -1086, -1086, -1086, -1086, -1086, 936, 940, -1086,
2469 1029, 828, 944, -1086, 945, -1086, 944, 12335, 12335, 914,
2470 -1086, 993, -1086, -1086, -1086, 8562, -1086, -1086, -1086, 12335,
2471 12335, 956, -1086, 956, 949, 12083, 10697, 821, 10697, 823,
2472 12335, 14564, 10571, 14654, -1086, -1086, -1086, 4593, 4593, 455,
2473 -1086, 4442, 12, 1045, -1086, 119, -1086, -1086, 215, -1086,
2474 967, -1086, -1086, -1086, 963, -1086, 971, -1086, 13597, -1086,
2475 -1086, -1086, -1086, 876, -1086, -1086, -1086, 38, -1086, -1086,
2476 -1086, -1086, -1086, -1086, -1086, -1086, -1086, 475, -1086, 12335,
2477 12461, 12461, -1086, -1086, 823, 12461, 12461, -1086, -1086, 8562,
2478 12587, 987, -1086, -1086, 987, -1086, -1086, 987, -1086, 12335,
2479 -1086, 118, -1086, 165, 987, 7102, 418, 987, -1086, -1086,
2480 -1086, -1086, -1086, -1086, 12335, 12335, 823, 12335, 12335, -1086,
2481 11327, -1086, 26, 78, -1086, -1086, -1086, 975, 985, 1785,
2482 -1086, 1696, -1086, -1086, 1696, -1086, 1696, -1086, -1086, 5753,
2483 5753, 13323, 151, -1086, -1086, 7832, 5753, 5753, 1232, 8411,
2484 -1086, -1086, 7102, 12335, 989, -1086, -1086, 12461, 5753, 6657,
2485 6951, 26, 793, 803, -1086, -1086, -1086, -1086, 13597, 286,
2486 26, 13478, -1086, 26, 994, -1086, 896, 995, -1086, -1086,
2487 930, -1086, -1086, -1086, -1086, 12587, -1086, 1063, 13564, 13597,
2488 13597, 896, 1033, 4593, 4593, 455, 465, 634, 4880, 4880,
2489 -1086, -1086, 5753, -1086, -1086, -1086, -1086, 12461, -1086, -1086,
2490 -1086, -1086, -1086, 151, -1086, -1086, 4880, -1086, -1086, 12209,
2491 7404, -1086, 987, -1086, -1086, 12335, 1001, 990, 7102, 8411,
2492 -1086, -1086, 1091, 1091, 944, 1008, 944, 944, 1082, -1086,
2493 779, 206, 214, 231, 7102, 1149, 828, -1086, 26, 1031,
2494 843, 1026, 13445, -1086, 1028, -1086, 1035, 1043, -1086, -1086,
2495 -1086, 1047, 827, 36, -1086, 60, 1033, 1049, -1086, -1086,
2496 -1086, 26, -1086, -1086, 1042, -1086, -1086, 1052, -1086, 1056,
2497 -1086, -1086, -1086, -1086, -1086, -1086, -1086, -1086, 26, 26,
2498 26, 26, 26, 26, -1086, -1086, 7253, 151, 969, 12335,
2499 -1086, 697, -1086, -1086, 1155, 987, 1060, 8688, 985, -1086,
2500 1696, -1086, -1086, -1086, 283, 14744, 10571, 14834, 992, -1086,
2501 -1086, 1044, -1086, 13445, 1358, -1086, -1086, 1152, 788, 639,
2502 -1086, 1358, -1086, 1466, -1086, -1086, 1068, 13597, -1086, 515,
2503 -1086, -1086, 13597, 13564, -1086, -1086, -1086, -1086, -1086, -1086,
2504 801, -1086, 12587, 12587, -1086, -1086, -1086, -1086, -1086, 698,
2505 -1086, -1086, -1086, -1086, 1095, 944, 182, 199, 26, 333,
2506 338, -1086, -1086, 788, -1086, 1071, 1073, -1086, 14924, -1086,
2507 828, 1077, -1086, 1079, 1077, 13597, 1096, 1096, -1086, -1086,
2508 -1086, 7555, -1086, -1086, 1155, -1086, -1086, -1086, 367, 1358,
2509 -1086, 1466, -1086, 1098, 1102, -1086, 1466, -1086, 1466, -1086,
2510 -1086, 1096, 13597, 586, -1086, 1077, 1097, 1077, 1077, -1086,
2511 -1086, -1086, -1086, 1466, -1086, -1086, -1086, 1077, -1086
2512};
2513
2514/* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
2515 Performed when YYTABLE does not specify something else to do. Zero
2516 means the default is an error. */
2517static const yytype_int16 yydefact[] =
2518{
2519 2, 0, 0, 1, 0, 374, 375, 376, 0, 367,
2520 368, 369, 372, 370, 371, 373, 362, 363, 364, 365,
2521 385, 295, 295, 658, 657, 659, 660, 773, 0, 773,
2522 0, 0, 662, 661, 663, 755, 757, 654, 653, 756,
2523 656, 645, 646, 647, 648, 596, 668, 669, 0, 0,
2524 0, 0, 0, 0, 323, 785, 785, 105, 444, 616,
2525 616, 618, 620, 0, 0, 0, 0, 0, 0, 0,
2526 3, 771, 6, 9, 35, 40, 677, 677, 56, 77,
2527 295, 76, 0, 93, 0, 97, 107, 0, 67, 245,
2528 264, 0, 321, 0, 0, 73, 73, 771, 0, 0,
2529 0, 0, 332, 343, 78, 341, 310, 311, 595, 597,
2530 312, 313, 314, 316, 315, 317, 594, 635, 636, 593,
2531 643, 664, 665, 318, 0, 319, 81, 5, 8, 186,
2532 197, 187, 210, 183, 203, 193, 192, 213, 214, 208,
2533 191, 190, 185, 211, 215, 216, 195, 184, 198, 202,
2534 204, 196, 189, 205, 212, 207, 206, 199, 209, 194,
2535 182, 201, 200, 181, 188, 179, 180, 176, 177, 178,
2536 136, 138, 137, 171, 172, 167, 149, 150, 151, 158,
2537 155, 157, 152, 153, 173, 174, 159, 160, 164, 168,
2538 154, 156, 146, 147, 148, 161, 162, 163, 165, 166,
2539 169, 170, 175, 141, 143, 28, 139, 140, 142, 0,
2540 752, 0, 0, 0, 0, 298, 616, 0, 677, 677,
2541 290, 0, 273, 301, 91, 294, 785, 0, 664, 665,
2542 0, 319, 785, 748, 92, 773, 89, 0, 785, 464,
2543 88, 773, 774, 0, 0, 23, 257, 0, 10, 0,
2544 362, 363, 335, 465, 0, 239, 0, 332, 240, 230,
2545 231, 329, 0, 21, 0, 0, 771, 17, 20, 773,
2546 95, 16, 325, 773, 0, 778, 778, 274, 0, 0,
2547 778, 746, 773, 0, 0, 0, 677, 677, 103, 366,
2548 0, 113, 114, 121, 445, 640, 639, 641, 638, 0,
2549 637, 0, 0, 0, 603, 612, 608, 614, 644, 60,
2550 251, 252, 781, 782, 4, 783, 772, 0, 0, 0,
2551 0, 0, 0, 0, 700, 0, 676, 0, 700, 674,
2552 0, 0, 377, 469, 458, 82, 473, 340, 378, 473,
2553 454, 785, 109, 0, 101, 98, 785, 64, 0, 0,
2554 0, 0, 0, 267, 268, 0, 0, 0, 0, 228,
2555 229, 0, 0, 61, 0, 265, 266, 0, 0, 0,
2556 0, 0, 0, 0, 0, 0, 0, 767, 768, 0,
2557 785, 0, 0, 72, 0, 0, 0, 0, 0, 771,
2558 350, 772, 0, 396, 395, 0, 0, 664, 665, 319,
2559 131, 132, 0, 0, 134, 672, 0, 664, 665, 319,
2560 358, 206, 199, 209, 194, 176, 177, 178, 136, 137,
2561 744, 69, 68, 743, 0, 90, 770, 769, 0, 342,
2562 598, 785, 785, 144, 751, 329, 302, 754, 297, 0,
2563 0, 0, 785, 0, 0, 291, 300, 0, 785, 0,
2564 785, 785, 0, 292, 773, 0, 334, 296, 701, 773,
2565 286, 785, 773, 785, 285, 773, 339, 59, 25, 27,
2566 26, 0, 336, 0, 0, 0, 0, 0, 785, 19,
2567 0, 773, 327, 15, 772, 94, 773, 324, 330, 780,
2568 779, 275, 780, 277, 331, 747, 0, 120, 644, 111,
2569 106, 676, 0, 0, 785, 0, 446, 622, 642, 625,
2570 623, 617, 599, 600, 619, 601, 621, 0, 0, 0,
2571 0, 0, 784, 7, 29, 30, 31, 32, 33, 57,
2572 58, 707, 704, 703, 702, 705, 713, 722, 701, 0,
2573 734, 723, 738, 737, 733, 785, 699, 773, 683, 706,
2574 708, 709, 711, 685, 715, 720, 785, 726, 409, 408,
2575 731, 685, 736, 685, 740, 682, 0, 0, 785, 0,
2576 0, 0, 0, 470, 469, 83, 0, 474, 0, 271,
2577 0, 272, 773, 0, 99, 110, 0, 65, 237, 244,
2578 246, 247, 248, 255, 256, 249, 250, 226, 227, 253,
2579 254, 62, 773, 241, 242, 243, 232, 233, 234, 235,
2580 236, 269, 270, 758, 760, 759, 761, 463, 295, 461,
2581 773, 785, 758, 760, 759, 761, 462, 295, 0, 387,
2582 0, 386, 0, 0, 0, 0, 348, 0, 329, 0,
2583 785, 0, 73, 356, 131, 132, 133, 670, 354, 0,
2584 785, 0, 0, 0, 765, 766, 70, 758, 759, 295,
2585 0, 0, 0, 0, 0, 0, 0, 750, 0, 303,
2586 299, 785, 758, 759, 773, 758, 759, 0, 0, 749,
2587 333, 775, 280, 287, 282, 289, 338, 24, 0, 258,
2588 11, 34, 0, 785, 0, 22, 96, 18, 326, 778,
2589 0, 104, 762, 119, 773, 758, 759, 700, 626, 0,
2590 602, 0, 605, 0, 610, 607, 0, 0, 611, 238,
2591 0, 407, 399, 401, 773, 404, 397, 0, 681, 742,
2592 675, 0, 0, 0, 692, 714, 0, 680, 724, 725,
2593 0, 695, 735, 0, 697, 739, 48, 260, 384, 360,
2594 379, 785, 785, 585, 678, 50, 262, 361, 467, 471,
2595 0, 468, 475, 453, 0, 36, 306, 0, 39, 305,
2596 108, 102, 0, 55, 41, 53, 0, 278, 301, 217,
2597 37, 0, 319, 0, 0, 0, 785, 785, 460, 86,
2598 0, 466, 287, 785, 785, 284, 459, 84, 283, 322,
2599 785, 388, 785, 346, 390, 74, 389, 347, 484, 0,
2600 0, 381, 0, 0, 762, 328, 773, 758, 759, 0,
2601 0, 0, 0, 131, 132, 135, 773, 0, 773, 0,
2602 455, 79, 42, 278, 218, 52, 225, 145, 753, 304,
2603 293, 785, 785, 466, 785, 785, 773, 785, 773, 224,
2604 276, 112, 466, 700, 447, 450, 627, 631, 632, 633,
2605 624, 634, 604, 606, 613, 609, 615, 773, 406, 0,
2606 710, 0, 741, 727, 411, 684, 712, 685, 685, 721,
2607 726, 785, 685, 732, 685, 709, 685, 0, 0, 586,
2608 587, 785, 588, 380, 382, 0, 12, 14, 592, 0,
2609 0, 785, 80, 785, 309, 0, 0, 100, 0, 785,
2610 0, 0, 785, 0, 577, 583, 550, 0, 0, 0,
2611 522, 773, 519, 538, 616, 0, 576, 66, 493, 499,
2612 501, 503, 497, 496, 534, 498, 543, 546, 549, 555,
2613 556, 545, 506, 557, 507, 562, 563, 564, 567, 568,
2614 569, 570, 571, 573, 572, 574, 575, 553, 63, 0,
2615 0, 0, 87, 776, 785, 0, 0, 85, 383, 0,
2616 0, 0, 391, 393, 0, 75, 485, 0, 352, 0,
2617 477, 0, 351, 466, 0, 0, 0, 0, 466, 359,
2618 745, 71, 456, 457, 0, 0, 785, 0, 0, 281,
2619 288, 337, 773, 0, 628, 398, 400, 402, 405, 0,
2620 688, 0, 690, 679, 0, 696, 0, 693, 698, 49,
2621 261, 0, 0, 590, 591, 0, 51, 263, 773, 0,
2622 435, 434, 0, 0, 307, 38, 54, 0, 279, 758,
2623 759, 773, 758, 759, 565, 566, 132, 581, 0, 524,
2624 773, 525, 531, 773, 0, 518, 0, 0, 521, 537,
2625 0, 578, 650, 649, 651, 0, 579, 0, 494, 0,
2626 0, 544, 548, 560, 561, 0, 505, 504, 0, 0,
2627 554, 552, 259, 47, 222, 46, 223, 0, 44, 220,
2628 45, 221, 394, 0, 344, 345, 0, 349, 478, 0,
2629 0, 353, 0, 671, 355, 0, 0, 438, 0, 0,
2630 448, 629, 0, 0, 685, 685, 685, 685, 0, 589,
2631 0, 664, 665, 319, 0, 785, 785, 433, 773, 0,
2632 709, 417, 717, 718, 785, 729, 417, 417, 415, 472,
2633 476, 308, 466, 773, 516, 529, 541, 526, 517, 532,
2634 616, 773, 777, 551, 0, 500, 495, 534, 502, 535,
2635 539, 547, 542, 558, 559, 582, 515, 511, 773, 773,
2636 773, 773, 773, 773, 43, 219, 0, 0, 490, 0,
2637 479, 785, 357, 449, 0, 0, 0, 0, 403, 689,
2638 0, 686, 691, 694, 329, 0, 785, 0, 785, 13,
2639 414, 0, 436, 0, 418, 426, 424, 0, 716, 0,
2640 413, 0, 429, 0, 431, 523, 527, 0, 533, 0,
2641 520, 580, 0, 0, 508, 509, 510, 512, 513, 514,
2642 785, 486, 0, 0, 480, 482, 483, 481, 442, 773,
2643 440, 443, 452, 451, 0, 685, 762, 328, 773, 758,
2644 759, 584, 437, 728, 416, 417, 417, 329, 0, 719,
2645 785, 417, 730, 417, 417, 0, 530, 535, 536, 540,
2646 392, 0, 491, 492, 0, 439, 630, 687, 466, 0,
2647 421, 0, 423, 762, 328, 412, 0, 430, 0, 427,
2648 432, 528, 0, 785, 441, 417, 417, 417, 417, 488,
2649 489, 487, 422, 0, 419, 425, 428, 417, 420
2650};
2651
2652/* YYPGOTO[NTERM-NUM]. */
2653static const yytype_int16 yypgoto[] =
2654{
2655 -1086, -1086, -1086, 997, -1086, 47, 772, -312, -1086, -24,
2656 -1086, 769, -1086, 74, -1086, -427, -543, -32, -1086, -1086,
2657 -1086, -1086, 426, 2327, 2557, -1086, -12, -74, -1086, -1086,
2658 -10, -1086, -640, 1214, -9, 1159, -125, 34, -42, -1086,
2659 -406, 32, 3056, -372, 1160, -55, -15, -1086, -1086, -7,
2660 -1086, 4007, -1086, 1170, -1086, 927, 668, -1086, 714, 8,
2661 604, -377, 97, 6, -1086, -404, -193, 17, -1086, -483,
2662 -19, -1086, -1086, -1086, -1086, -1086, -1086, -1086, -1086, -1086,
2663 918, -1086, -1086, -1086, -1086, -1086, -1086, -1086, -1086, -1086,
2664 -1086, -1086, -1086, -1086, -1086, -1086, 512, -1086, 811, 1895,
2665 -376, -1086, 35, -777, -1086, -768, -788, 549, 401, -296,
2666 141, -1086, 244, -438, -1086, -1086, 373, -1086, -896, -1086,
2667 3, 1019, -1086, -1086, -1086, -1086, -1086, -1086, 447, -1086,
2668 -1086, -99, 705, -1086, -1086, -1086, 946, -1086, -1086, -1086,
2669 -1086, -762, -1086, -13, -1086, -1086, -1086, -1086, -1086, -728,
2670 -258, -1086, -1086, -1086, -1086, 223, -1086, -1086, -38, -1086,
2671 -715, -829, -963, -613, -750, -119, -1086, 212, -1086, -1086,
2672 -1086, 222, -1086, -774, 230, -1086, -1086, -1086, 101, -1086,
2673 -1086, 176, 1381, 1652, -1086, 1195, 1974, 2151, 2180, -1086,
2674 794, 2262, -1086, 2645, 2678, -1086, -1086, -58, -1086, -1086,
2675 -261, -1086, -1086, -1086, -1086, -1086, -1086, -1086, 9, -1086,
2676 -1086, -1086, -1086, 30, -1086, 3022, 10, 1211, 3297, 1722,
2677 -1086, -1086, 29, 727, 23, -1086, -308, -381, -305, -206,
2678 -1060, -513, -313, -698, -451, -500, 578, 106, -1086, -1086,
2679 -663, -1086, -709, -696, -1085, 113, 585, -1086, -649, -1086,
2680 -433, -532, -1086, -1086, -1086, 43, -402, -1086, -324, -1086,
2681 -1086, -86, -1086, -20, 123, 482, 440, 170, -231, -61,
2682 31, -2
2683};
2684
2685/* YYDEFGOTO[NTERM-NUM]. */
2686static const yytype_int16 yydefgoto[] =
2687{
2688 0, 1, 2, 70, 71, 72, 248, 567, 1025, 568,
2689 266, 267, 480, 268, 471, 74, 774, 75, 601, 784,
2690 587, 783, 421, 218, 219, 829, 384, 386, 387, 975,
2691 78, 79, 575, 254, 81, 82, 269, 83, 84, 85,
2692 500, 86, 221, 404, 405, 203, 204, 205, 662, 616,
2693 207, 88, 473, 375, 89, 580, 223, 274, 779, 617,
2694 796, 459, 460, 236, 237, 225, 445, 621, 768, 769,
2695 90, 382, 273, 486, 688, 809, 637, 822, 820, 652,
2696 256, 92, 93, 94, 95, 96, 97, 98, 99, 100,
2697 101, 336, 339, 751, 895, 812, 969, 970, 749, 257,
2698 630, 805, 971, 972, 396, 722, 723, 724, 725, 545,
2699 731, 732, 1254, 1205, 1206, 1128, 1029, 1030, 1106, 1239,
2700 1240, 103, 294, 506, 707, 1003, 854, 1110, 340, 104,
2701 105, 337, 572, 573, 759, 901, 576, 577, 762, 903,
2702 981, 813, 1237, 810, 976, 1096, 1271, 1301, 1177, 927,
2703 1146, 929, 930, 1078, 1079, 931, 1056, 1048, 1050, 1051,
2704 1052, 933, 934, 1159, 1054, 935, 936, 937, 938, 939,
2705 940, 941, 942, 943, 944, 945, 946, 947, 752, 891,
2706 1022, 897, 106, 107, 108, 109, 110, 111, 112, 517,
2707 711, 113, 519, 114, 115, 518, 520, 299, 302, 303,
2708 511, 709, 708, 856, 1004, 1111, 1187, 860, 116, 117,
2709 300, 118, 119, 120, 1066, 228, 229, 123, 230, 231,
2710 648, 821, 325, 326, 327, 328, 875, 734, 547, 548,
2711 549, 550, 885, 552, 553, 554, 555, 1133, 1134, 556,
2712 557, 558, 559, 560, 1135, 1136, 561, 562, 563, 564,
2713 565, 728, 424, 653, 279, 463, 233, 126, 692, 619,
2714 656, 651, 428, 314, 455, 456, 791, 1058, 491, 631,
2715 391, 271
2716};
2717
2718/* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
2719 positive, shift that token. If negative, reduce the rule whose
2720 number is the opposite. If YYTABLE_NINF, syntax error. */
2721static const yytype_int16 yytable[] =
2722{
2723 127, 206, 301, 620, 298, 381, 429, 220, 220, 632,
2724 315, 551, 122, 245, 122, 551, 546, 208, 427, 571,
2725 546, 206, 388, 569, 737, 974, 726, 881, 240, 265,
2726 239, 646, 462, 226, 226, 876, 315, 208, 289, 453,
2727 670, 514, 516, 345, 883, 493, 422, 977, 670, 495,
2728 679, 128, 206, 277, 281, 618, 958, 627, 309, 232,
2729 232, 383, 383, 122, 122, 383, 289, 292, 932, 932,
2730 628, 674, 275, 880, 329, 329, 73, 390, 73, 289,
2731 289, 289, 385, 1008, 878, 389, 335, 270, 334, 288,
2732 679, 884, 1053, 220, 206, 292, 701, 308, 276, 280,
2733 331, 1006, 316, 780, 659, 1157, 330, 1108, 398, 408,
2734 408, 408, 1216, 224, 234, 804, -122, 832, 835, 226,
2735 957, 957, 713, 618, 1241, 627, 1262, 704, 272, 507,
2736 -126, 629, 1129, -328, 717, 1075, 1067, 507, 377, 481,
2737 -658, 449, 738, 1044, 1045, 232, -123, 507, 332, 962,
2738 243, -666, 246, 693, -130, -129, -773, 967, 439, 773,
2739 739, -328, -328, -125, 629, 242, 378, 426, 3, -658,
2740 477, 1061, -127, 1062, 1063, 714, 1064, 771, -122, 242,
2741 741, 693, 744, 1076, 509, 510, 1077, 718, 265, 242,
2742 -124, 247, 509, 510, 1262, -126, 322, 323, -113, 425,
2743 508, 1109, 509, 510, 505, 315, 1217, 726, 868, 465,
2744 -328, 467, -128, -759, 1241, 862, 329, 329, 582, -122,
2745 1065, 332, 122, 865, 446, 475, 220, -123, 220, 220,
2746 446, 489, 1201, 773, 773, 249, 464, -113, 490, 312,
2747 265, 313, 331, 499, -130, 127, 483, 440, 441, 1169,
2748 1172, -117, 226, -758, 226, 461, 712, 122, 712, 122,
2749 1268, 239, 334, 816, 1099, 333, 289, -114, 890, 312,
2750 453, 313, 122, 826, 122, -121, -120, 825, 232, 670,
2751 232, 670, -116, 679, -116, 383, 383, 383, 383, 882,
2752 529, 530, 886, -118, 872, 292, -129, 484, 270, 1163,
2753 1164, 1147, 312, 872, 313, 524, 525, 526, 527, 641,
2754 331, -115, 242, 883, 498, 1067, 876, 693, 542, 265,
2755 1160, 73, -128, -118, 1188, 289, 122, 693, 315, 261,
2756 -758, 122, 454, -126, 457, -126, 479, 122, 333, 581,
2757 827, 122, 543, 238, 581, 1006, -125, -759, 304, 1013,
2758 -128, -127, -128, 122, 292, 383, 726, -122, 726, -122,
2759 1115, 1068, 633, 523, 635, -123, 907, -123, 1178, 636,
2760 643, 220, -657, -666, 625, 634, 584, 270, 464, 1137,
2761 -124, 932, -130, -116, -130, -366, 1067, -94, 670, 626,
2762 73, 305, 122, 957, 551, 528, 122, 377, 122, 546,
2763 -122, -657, 855, -116, 1235, 496, -116, -108, 957, -659,
2764 -116, 306, -660, -366, -366, 957, 957, 1083, 1085, 1236,
2765 551, 625, 1088, 1090, -118, 378, 379, 551, -117, 581,
2766 581, 644, -541, 957, -129, 645, -129, 377, -659, 220,
2767 581, -660, 625, -119, -118, -759, 464, -118, 581, 581,
2768 863, -118, -667, 377, 307, 863, 687, 626, -115, 446,
2769 499, 446, -366, 348, 206, 378, 447, 1160, 850, 338,
2770 625, -785, 1160, 1269, 380, -662, 581, 846, 840, -123,
2771 208, 378, 476, 289, -125, 626, -125, 671, -661, -127,
2772 341, -127, -663, 324, 122, 220, 1010, 1012, 625, -114,
2773 1260, 1015, 464, 1017, -662, 1018, 876, 644, 754, 1080,
2774 987, 1046, 292, 626, 448, 1160, 1299, -661, -124, 507,
2775 -124, -663, 372, 373, 374, 928, 928, 1081, 1132, -117,
2776 448, 346, 699, 773, 773, 1041, 507, 515, 773, 773,
2777 551, 499, 1269, 729, 1174, 546, 880, 1047, 1002, -117,
2778 342, -758, -117, -667, 729, 1256, -117, 746, 1114, -115,
2779 1116, 755, 1263, 451, 289, 1117, 753, 507, 819, 312,
2780 765, 313, 512, 806, 509, 510, 775, 1131, -652, -115,
2781 -123, 507, -115, 60, 377, -655, -115, 618, 876, 627,
2782 -130, 509, 510, 292, 1200, 1138, 670, 767, 679, 726,
2783 726, 894, 1210, 767, 1266, 1100, 800, -652, 802, 1267,
2784 773, 808, 378, 503, -655, -773, 654, 431, 242, 446,
2785 513, 828, 509, 510, 789, 798, 788, 348, 353, 354,
2786 1296, 220, 433, 797, 625, 795, 509, 510, 464, 1153,
2787 122, 220, 122, 478, 625, 655, 1124, 837, 464, 626,
2788 775, 775, 1291, 241, 840, 206, 848, 798, 851, 626,
2789 773, 504, 122, 1049, -664, 831, 435, 795, 893, 446,
2790 -129, 208, 468, 1102, 894, 365, 366, -665, 442, -319,
2791 1072, 289, 469, 470, 370, 371, 372, 373, 374, 507,
2792 377, 798, -664, -664, 844, 913, 551, 536, 1212, 1214,
2793 788, 795, 443, 1165, 1132, -665, -665, -319, -319, 1132,
2794 292, 1132, 894, 1132, 811, 1130, 537, 1176, 378, 639,
2795 1140, -125, 241, 466, 278, 785, 847, 242, 1285, 377,
2796 499, 992, 1126, 1189, 1191, 1192, 1193, -329, 444, 1245,
2797 450, -664, 710, 790, 509, 510, 845, 541, 542, 892,
2798 898, 485, 507, 289, -665, 487, -319, 378, 649, 985,
2799 1261, 452, 1264, 492, 472, -329, -329, 640, 767, 235,
2800 490, 1138, 543, -127, 422, 432, 872, 432, 1138, 1132,
2801 1138, 1132, 292, -773, 581, 581, 1132, 242, 1132, 383,
2802 1143, 581, 581, 956, 956, 984, 1185, 790, 973, 238,
2803 973, 1231, -130, 1132, -130, 715, 650, 509, 510, 986,
2804 1049, 322, 323, 348, -329, 968, 894, 1280, 1282, 1248,
2805 1049, 1049, 206, 1287, -121, 1289, 1290, 790, 1295, 122,
2806 1297, 482, 122, -93, 377, 847, 494, 1298, 928, 581,
2807 581, 478, 581, 581, 1274, 446, 1138, 377, 1138, 488,
2808 793, 242, 1307, 1138, 497, 1138, 377, 1302, 1304, 1305,
2809 1306, 324, 378, 911, 1277, 502, 1060, 794, -129, 1308,
2810 1138, 1024, 521, 693, 566, 378, 1195, -125, 434, 729,
2811 -673, 436, 437, 438, 378, 1258, 996, 570, -120, 1023,
2812 574, 1130, 793, 579, -127, 585, 964, -116, 1130, 1031,
2813 638, 1031, 794, 220, 522, 122, 625, 581, 1126, 642,
2814 464, 912, 647, -124, -118, 1126, 122, 1126, 122, -125,
2815 91, 626, 91, -124, 1196, 1103, 964, 956, 956, -127,
2816 664, 956, 665, 650, 227, 227, 680, 1151, 383, 790,
2817 681, 682, 683, -115, 684, 1092, 685, 686, 956, 790,
2818 775, 775, 690, -124, 916, 775, 775, 691, 1093, 1170,
2819 1173, -108, 581, 696, 1073, 1074, 1130, 700, 698, -410,
2820 507, 91, 91, 537, 727, 290, 733, -755, 736, 122,
2821 1035, 740, 1036, 1126, 742, 1126, 227, 743, 857, 858,
2822 1126, 859, 1126, 745, 581, 122, 507, 748, 46, 47,
2823 750, 1125, 289, 290, 541, 1139, 758, 1126, 1150, 1232,
2824 1233, 227, 227, 501, 501, 227, 395, 406, 406, -652,
2825 227, 772, 801, 512, 792, 509, 510, 775, 663, 730,
2826 1156, 1122, 808, 383, 1197, 122, 869, 811, 864, 122,
2827 1168, 1171, 122, 866, 790, 1057, 871, -652, -652, 512,
2828 874, 509, 510, 1154, 1153, 887, 899, 902, 956, 909,
2829 -301, 956, 905, 959, 770, 906, -756, 531, 908, 532,
2830 533, 534, 535, 963, 894, 1000, 1181, 775, 956, 956,
2831 956, 739, 1009, 956, 956, 1186, 1011, 1028, 956, 956,
2832 1014, 1016, 1219, 1021, -755, -302, -652, 1059, 1069, -755,
2833 1198, 317, 318, 319, 320, 321, 956, -762, -655, 1070,
2834 122, 667, 669, 289, 843, 914, 720, 1071, 122, 122,
2835 278, 1112, 721, 898, 729, 1107, 41, 42, 43, 44,
2836 91, 1113, 729, 1067, 122, -303, -655, -655, 1194, 1152,
2837 1149, 1184, 408, 531, 852, 532, 533, 534, 535, -762,
2838 1183, 1107, 1230, 227, 1190, 227, 227, 669, 893, 227,
2839 278, 227, 1202, 1244, 790, 91, 531, 91, 532, 533,
2840 534, 535, 1204, 790, 1209, 1252, 790, -762, -762, 973,
2841 91, 1211, 91, -756, 289, -655, 122, 220, -756, 1213,
2842 625, 1221, 720, -304, 464, 1218, 753, 122, 1222, 790,
2843 383, 383, 1223, 290, 1243, 626, 870, 1238, 1257, 532,
2844 533, 534, 535, 408, 1265, 1276, 80, 1279, 80, 1281,
2845 1272, 1273, 735, 1286, -762, 1288, -762, 956, 973, -758,
2846 80, 80, 956, 956, 91, 227, 227, 227, 227, 91,
2847 227, 227, 1292, 1303, 474, 91, -758, 1293, 766, 91,
2848 -759, 1107, 695, 697, 778, 991, 983, 393, 729, 376,
2849 410, 91, 290, 830, 896, 1270, 988, 80, 80, 867,
2850 1007, 1203, 1127, 586, 1057, 956, 1032, 1294, 993, 760,
2851 1300, 122, 80, 1161, 531, 578, 532, 533, 534, 535,
2852 536, 973, 1158, 1162, 790, 790, 790, 1155, 227, 1251,
2853 91, 1199, 956, 430, 91, 227, 91, 80, 80, 537,
2854 990, 80, 423, 716, 879, 1259, 80, 1255, 877, 0,
2855 227, 1220, 0, 0, 0, 0, 0, 0, 999, 0,
2856 1001, 838, 0, 539, 0, 0, 839, 348, 0, 540,
2857 541, 542, 0, 0, 0, 0, 0, 0, 0, 1005,
2858 0, 669, 0, 278, 361, 362, 0, 0, 660, 661,
2859 0, 1055, 1275, 0, 0, 543, 227, 0, 544, 666,
2860 0, 790, 0, 0, 834, 836, 0, 677, 678, 0,
2861 0, 0, 757, 0, 0, 242, 0, 761, 0, 763,
2862 0, 834, 836, 369, 370, 371, 372, 373, 374, 873,
2863 0, 0, 91, 0, 0, 694, 0, 0, 849, 0,
2864 531, 0, 532, 533, 534, 535, 536, 0, 0, 889,
2865 290, 0, 227, 0, 0, 0, 80, 0, 0, 0,
2866 0, 0, 904, 0, 0, 537, 0, 0, 0, 799,
2867 0, 0, 0, 0, 803, 0, 807, 0, 0, 80,
2868 0, 80, 80, 348, 0, 80, 0, 80, 0, 539,
2869 669, 80, 0, 80, 0, 540, 541, 542, 348, 0,
2870 361, 362, 0, 0, 0, 0, 80, 0, 80, 0,
2871 980, 1142, 0, 0, 227, 361, 362, 0, 227, 0,
2872 1144, 543, 0, 1148, 544, 0, 0, 0, 227, 0,
2873 0, 290, 0, 0, 781, 0, 0, 367, 368, 369,
2874 370, 371, 372, 373, 374, 0, 1166, 0, 531, 0,
2875 532, 533, 534, 535, 536, 370, 371, 372, 373, 374,
2876 80, 80, 80, 80, 80, 80, 80, 80, 0, 0,
2877 0, 80, 0, 537, 0, 80, 0, 0, 91, 0,
2878 91, 0, 0, 0, 0, 0, 0, 80, 227, 1167,
2879 0, 0, 0, 0, 0, 0, 0, 539, 227, 0,
2880 91, 227, 0, 1034, 541, 542, 0, 0, 781, 781,
2881 531, 0, 532, 533, 534, 535, 536, 0, 0, 0,
2882 0, 0, 0, 0, 80, 0, 80, 0, 0, 543,
2883 80, 80, 80, 0, 0, 537, 227, 0, 0, 0,
2884 0, 1227, 1228, 1229, 0, 0, 80, 0, 290, 538,
2885 0, 978, 0, 0, 982, 1215, 0, 0, 0, 539,
2886 0, 0, 0, 0, 0, 540, 541, 542, 989, 0,
2887 0, 0, 0, 0, 0, 0, 0, 1098, 0, 0,
2888 1224, 1225, 1226, 0, 0, 0, 0, 0, 0, 0,
2889 0, 543, 80, 0, 544, 0, 0, 0, 278, 0,
2890 0, 0, 0, 0, 1084, 1086, 853, 0, 0, 1089,
2891 1091, 0, 0, 0, 0, 0, 0, 0, 1278, 0,
2892 290, 0, 0, 0, 0, 0, 0, 0, 80, 0,
2893 0, 1141, 0, 0, 0, 0, 0, 0, 1084, 1086,
2894 0, 1089, 1091, 960, 961, 0, 0, 0, 80, 0,
2895 965, 966, 0, 0, 125, 0, 125, 0, 0, 0,
2896 0, 0, 0, 0, 0, 0, 0, 91, 0, 227,
2897 91, 0, 0, 0, 0, 0, 0, 0, 531, 0,
2898 532, 533, 534, 535, 536, 0, 0, 0, 0, 0,
2899 0, 0, 0, 0, 0, 0, 0, 1180, 994, 995,
2900 0, 997, 998, 537, 0, 125, 125, 0, 0, 293,
2901 80, 0, 1094, 0, 80, 1095, 0, 538, 1097, 0,
2902 0, 0, 0, 0, 80, 1101, 0, 539, 1104, 0,
2903 80, 1175, 926, 926, 541, 542, 0, 293, 0, 0,
2904 0, 0, 0, 91, 0, 0, 0, 0, 0, 1175,
2905 399, 409, 409, 0, 91, 0, 91, 0, 0, 543,
2906 227, 0, 0, 0, 0, 0, 1037, 531, 0, 532,
2907 533, 534, 535, 536, 80, 0, 80, 1234, 0, 0,
2908 0, 0, 0, 0, 80, 0, 0, 0, 0, 0,
2909 0, 0, 537, 0, 80, 0, 80, 80, 0, 0,
2910 0, 0, 0, 0, 80, 80, 538, 0, 781, 781,
2911 0, 0, 0, 781, 781, 0, 539, 91, 227, 0,
2912 0, 1087, 540, 541, 542, 0, 0, 102, 0, 102,
2913 0, 0, 80, 91, 0, 0, 0, 0, 0, 0,
2914 0, 102, 102, 1182, 0, 0, 0, 0, 543, 0,
2915 0, 544, 0, 1105, 0, 0, 0, 0, 0, 0,
2916 0, 0, 0, 0, 125, 0, 926, 926, 0, 1120,
2917 926, 0, 0, 91, 0, 0, 0, 91, 102, 102,
2918 91, 0, 0, 0, 0, 781, 0, 926, 0, 0,
2919 0, 0, 0, 102, 0, 0, 0, 0, 0, 125,
2920 0, 125, 0, 0, 0, 0, 0, 0, 0, 0,
2921 0, 0, 0, 227, 125, 0, 125, 0, 102, 102,
2922 0, 0, 102, 0, 0, 0, 1242, 102, 0, 0,
2923 0, 0, 0, 0, 0, 781, 0, 293, 0, 0,
2924 0, 0, 0, 0, 0, 0, 0, 0, 91, 0,
2925 0, 0, 0, 0, 0, 0, 91, 91, 0, 0,
2926 0, 0, 0, 80, 0, 80, 80, 0, 125, 0,
2927 0, 0, 91, 125, 0, 0, 0, 0, 0, 125,
2928 1208, 0, 0, 125, 0, 0, 0, 0, 0, 0,
2929 0, 0, 0, 0, 0, 125, 293, 926, 0, 0,
2930 926, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2931 0, 0, 0, 0, 0, 0, 0, 926, 926, 926,
2932 0, 0, 926, 926, 91, 0, 0, 926, 926, 0,
2933 0, 0, 0, 0, 125, 91, 0, 102, 125, 80,
2934 125, 0, 0, 0, 227, 926, 0, 0, 0, 0,
2935 80, 1253, 80, 0, 0, 0, 80, 0, 0, 0,
2936 102, 0, 102, 102, 0, 0, 102, 0, 102, 0,
2937 0, 0, 102, 0, 102, 0, 0, 0, 0, 0,
2938 227, 227, 0, 0, 0, 0, 0, 102, 0, 102,
2939 0, 0, 0, 0, 948, 948, 0, 0, 0, 0,
2940 0, 0, 0, 0, 80, 80, 0, 0, 0, 80,
2941 80, 0, 0, 80, 80, 0, 0, 0, 0, 91,
2942 0, 0, 0, 0, 0, 0, 0, 0, 0, 80,
2943 0, 0, 0, 0, 0, 0, 125, 0, 0, 0,
2944 0, 102, 102, 102, 102, 102, 102, 102, 102, 0,
2945 0, 0, 102, 0, 293, 0, 102, 0, 0, 0,
2946 0, 0, 0, 0, 0, 0, 926, 0, 102, 80,
2947 0, 926, 926, 80, 0, 0, 80, 0, 0, 0,
2948 0, 80, 0, 0, 0, 0, 0, 0, 0, 0,
2949 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2950 0, 0, 0, 0, 0, 102, 0, 102, 0, 80,
2951 0, 102, 102, 102, 926, 0, 0, 0, 0, 0,
2952 0, 0, 0, 0, 0, 0, 0, 102, 948, 948,
2953 0, 80, 948, 0, 0, 293, 0, 0, 782, 0,
2954 0, 926, 0, 0, 80, 0, 0, 0, 0, 948,
2955 0, 0, 80, 80, 0, 0, 0, 0, 0, 76,
2956 0, 76, 0, 0, 0, 0, 0, 0, 80, 0,
2957 0, 0, 0, 102, 0, 0, 0, 0, 0, 0,
2958 0, 0, 125, 0, 125, 0, 0, 0, 0, 0,
2959 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2960 0, 0, 0, 0, 125, 0, 0, 0, 0, 102,
2961 76, 76, 782, 782, 286, 0, 0, 0, 0, 0,
2962 80, 0, 0, 0, 0, 0, 0, 0, 0, 102,
2963 0, 80, 0, 0, 0, 0, 0, 0, 0, 0,
2964 80, 0, 286, 0, 0, 0, 0, 0, 0, 0,
2965 0, 0, 293, 0, 0, 286, 286, 286, 0, 948,
2966 0, 861, 948, 0, 0, 949, 949, 0, 0, 0,
2967 0, 0, 0, 0, 0, 0, 80, 80, 0, 948,
2968 948, 948, 0, 0, 948, 948, 0, 0, 0, 948,
2969 948, 102, 0, 0, 0, 102, 0, 0, 0, 0,
2970 0, 0, 0, 0, 0, 102, 0, 948, 0, 0,
2971 0, 102, 0, 0, 0, 80, 0, 0, 0, 0,
2972 0, 0, 0, 0, 293, 0, 0, 0, 0, 0,
2973 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2974 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2975 0, 0, 0, 0, 0, 102, 0, 102, 0, 0,
2976 0, 0, 0, 0, 0, 102, 0, 0, 0, 76,
2977 0, 125, 0, 0, 125, 102, 0, 102, 102, 0,
2978 0, 0, 0, 0, 0, 102, 102, 0, 0, 77,
2979 0, 77, 0, 0, 0, 0, 0, 0, 0, 949,
2980 949, 0, 0, 949, 76, 0, 76, 0, 0, 0,
2981 0, 0, 0, 102, 0, 0, 0, 0, 0, 76,
2982 949, 76, 0, 0, 0, 0, 0, 0, 948, 0,
2983 0, 0, 0, 948, 948, 0, 0, 0, 0, 0,
2984 77, 77, 286, 0, 287, 0, 0, 125, 0, 0,
2985 0, 0, 0, 0, 0, 0, 0, 0, 125, 0,
2986 125, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2987 0, 0, 287, 76, 0, 0, 948, 0, 76, 0,
2988 0, 0, 0, 0, 76, 287, 287, 287, 76, 0,
2989 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2990 76, 286, 0, 948, 0, 0, 0, 0, 0, 0,
2991 0, 0, 782, 782, 0, 0, 0, 782, 782, 0,
2992 0, 125, 0, 0, 0, 0, 0, 0, 0, 0,
2993 949, 0, 0, 949, 0, 0, 0, 125, 0, 76,
2994 0, 0, 0, 76, 102, 76, 102, 102, 0, 0,
2995 949, 949, 949, 0, 0, 949, 949, 0, 0, 0,
2996 949, 949, 0, 0, 0, 0, 0, 0, 0, 0,
2997 0, 0, 0, 1123, 0, 0, 0, 125, 949, 0,
2998 0, 125, 0, 0, 125, 0, 0, 950, 950, 782,
2999 0, 0, 0, 0, 0, 0, 0, 0, 0, 77,
3000 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3001 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3002 102, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3003 0, 102, 0, 102, 77, 0, 77, 102, 0, 782,
3004 0, 76, 0, 0, 0, 0, 0, 0, 0, 77,
3005 0, 77, 125, 0, 0, 0, 0, 0, 0, 286,
3006 125, 125, 0, 0, 0, 0, 0, 0, 0, 0,
3007 0, 0, 287, 0, 0, 0, 125, 0, 0, 0,
3008 0, 0, 0, 0, 409, 102, 102, 0, 0, 0,
3009 102, 102, 0, 0, 102, 102, 0, 0, 0, 949,
3010 0, 0, 0, 77, 949, 949, 0, 0, 77, 0,
3011 102, 0, 0, 0, 77, 0, 0, 0, 77, 0,
3012 0, 950, 950, 0, 0, 950, 0, 0, 125, 0,
3013 77, 287, 0, 0, 0, 0, 0, 0, 0, 125,
3014 286, 0, 950, 76, 0, 0, 0, 949, 0, 0,
3015 102, 0, 0, 0, 102, 409, 0, 102, 0, 0,
3016 0, 0, 102, 0, 951, 951, 0, 0, 0, 77,
3017 0, 0, 0, 77, 949, 77, 0, 0, 0, 0,
3018 0, 0, 0, 0, 0, 0, 0, 76, 0, 76,
3019 102, 0, 0, 952, 952, 0, 0, 0, 0, 0,
3020 0, 0, 0, 0, 0, 0, 0, 0, 0, 76,
3021 0, 0, 102, 0, 0, 0, 0, 76, 76, 0,
3022 0, 0, 0, 125, 0, 102, 0, 0, 0, 0,
3023 0, 0, 0, 102, 102, 0, 0, 0, 0, 0,
3024 0, 0, 0, 0, 0, 0, 0, 0, 0, 102,
3025 0, 0, 950, 0, 121, 950, 121, 286, 0, 0,
3026 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3027 0, 77, 950, 950, 950, 953, 953, 950, 950, 0,
3028 0, 0, 950, 950, 0, 0, 0, 0, 87, 287,
3029 87, 0, 0, 0, 0, 0, 0, 0, 951, 951,
3030 950, 102, 951, 0, 0, 121, 121, 0, 0, 291,
3031 0, 0, 102, 0, 0, 0, 0, 0, 0, 951,
3032 0, 102, 0, 0, 0, 0, 0, 952, 952, 286,
3033 0, 952, 0, 0, 0, 0, 0, 291, 0, 87,
3034 87, 0, 0, 0, 0, 0, 0, 0, 952, 0,
3035 397, 407, 407, 407, 0, 0, 0, 102, 102, 0,
3036 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3037 287, 0, 0, 77, 0, 0, 76, 0, 0, 76,
3038 0, 0, 0, 0, 394, 0, 0, 0, 0, 0,
3039 0, 0, 0, 0, 0, 0, 102, 0, 0, 0,
3040 0, 0, 0, 0, 0, 0, 0, 0, 0, 953,
3041 953, 0, 0, 953, 0, 0, 0, 77, 0, 77,
3042 0, 950, 0, 0, 0, 0, 950, 950, 0, 951,
3043 953, 0, 951, 0, 0, 0, 0, 0, 0, 77,
3044 0, 0, 0, 0, 0, 0, 0, 77, 77, 951,
3045 951, 951, 76, 0, 951, 951, 0, 0, 952, 951,
3046 951, 952, 0, 76, 121, 76, 0, 0, 0, 950,
3047 0, 0, 0, 0, 0, 0, 0, 951, 952, 952,
3048 952, 0, 0, 952, 952, 0, 0, 287, 952, 952,
3049 0, 0, 0, 0, 0, 0, 950, 0, 87, 121,
3050 0, 121, 0, 0, 0, 0, 952, 0, 0, 0,
3051 0, 0, 0, 0, 121, 0, 121, 76, 76, 0,
3052 0, 0, 76, 76, 0, 0, 76, 0, 0, 124,
3053 0, 124, 0, 87, 0, 87, 0, 291, 0, 0,
3054 953, 0, 76, 953, 0, 0, 0, 0, 87, 0,
3055 87, 0, 0, 0, 0, 0, 0, 0, 0, 287,
3056 953, 953, 953, 0, 0, 953, 953, 0, 121, 0,
3057 953, 953, 0, 121, 0, 0, 0, 0, 286, 121,
3058 124, 124, 76, 121, 0, 0, 76, 0, 953, 76,
3059 0, 0, 0, 0, 76, 121, 291, 0, 951, 0,
3060 0, 0, 87, 951, 951, 0, 77, 87, 0, 77,
3061 0, 0, 0, 87, 0, 0, 0, 87, 0, 0,
3062 0, 0, 0, 0, 0, 0, 0, 952, 0, 87,
3063 0, 0, 952, 952, 121, 0, 0, 0, 121, 0,
3064 121, 0, 0, 0, 76, 0, 951, 0, 0, 0,
3065 0, 0, 0, 0, 0, 0, 0, 76, 954, 954,
3066 0, 0, 0, 0, 0, 76, 76, 0, 87, 0,
3067 0, 0, 87, 951, 87, 952, 0, 0, 0, 0,
3068 0, 76, 77, 0, 0, 0, 0, 0, 0, 286,
3069 0, 955, 955, 77, 0, 77, 0, 0, 0, 0,
3070 0, 0, 952, 0, 0, 0, 0, 0, 0, 953,
3071 0, 0, 0, 0, 953, 953, 0, 0, 0, 0,
3072 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3073 0, 0, 0, 76, 0, 0, 121, 0, 0, 124,
3074 0, 0, 0, 0, 76, 0, 0, 77, 77, 0,
3075 0, 0, 77, 77, 291, 0, 77, 953, 0, 0,
3076 286, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3077 87, 0, 77, 0, 124, 0, 124, 0, 0, 0,
3078 0, 0, 0, 0, 953, 0, 0, 0, 0, 124,
3079 0, 124, 954, 954, 0, 0, 954, 0, 0, 0,
3080 0, 0, 0, 0, 0, 0, 0, 0, 287, 0,
3081 0, 0, 77, 954, 0, 0, 77, 0, 0, 77,
3082 0, 0, 0, 0, 77, 955, 955, 0, 76, 955,
3083 0, 0, 0, 0, 0, 291, 0, 0, 0, 0,
3084 0, 0, 0, 124, 0, 0, 955, 0, 124, 0,
3085 0, 0, 0, 0, 124, 0, 0, 0, 124, 0,
3086 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3087 124, 0, 776, 0, 77, 0, 0, 0, 0, 0,
3088 0, 0, 121, 0, 121, 0, 0, 77, 0, 0,
3089 0, 0, 0, 0, 0, 77, 77, 0, 0, 0,
3090 0, 0, 0, 0, 121, 0, 0, 0, 0, 124,
3091 0, 77, 0, 124, 0, 124, 87, 0, 87, 287,
3092 0, 0, 0, 954, 0, 0, 954, 0, 0, 0,
3093 0, 0, 0, 0, 0, 0, 0, 0, 87, 0,
3094 0, 0, 0, 954, 954, 954, 776, 776, 954, 954,
3095 0, 0, 291, 954, 954, 0, 955, 0, 0, 955,
3096 0, 0, 0, 77, 0, 0, 0, 0, 0, 0,
3097 0, 954, 0, 0, 77, 0, 955, 955, 955, 0,
3098 0, 955, 955, 0, 0, 0, 955, 955, 0, 0,
3099 287, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3100 0, 0, 0, 0, 955, 0, 0, 0, 0, 0,
3101 0, 124, 0, 0, 0, 0, 0, 0, 0, 0,
3102 0, 0, 0, 0, 291, 0, 0, 0, 0, 0,
3103 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3104 0, 0, -785, 0, 0, 0, 0, 0, 0, 0,
3105 -785, -785, -785, 0, 0, -785, -785, -785, 77, -785,
3106 0, 0, 0, 0, 0, 0, 0, -785, -785, -785,
3107 0, 121, 0, 0, 121, 0, 0, 0, 0, -785,
3108 -785, 0, -785, -785, -785, -785, -785, 0, 0, 0,
3109 0, 0, 954, 0, 0, 0, 0, 954, 954, 0,
3110 0, 0, 0, 0, 0, 87, 0, 0, 87, 0,
3111 -785, 0, 0, 124, 0, 0, 0, 0, 0, 0,
3112 0, 0, 0, 0, 0, 955, 0, 0, 0, 0,
3113 955, 955, 0, 0, 0, 0, 0, 0, -785, -785,
3114 954, 0, 0, 0, 0, 0, 0, 121, 0, 0,
3115 0, 0, 0, 0, 347, 0, 0, 124, 121, 124,
3116 121, 0, -785, 0, 0, 0, 0, 954, 0, 0,
3117 0, 0, 0, 955, 0, 0, 0, 0, 0, 124,
3118 0, 87, 0, 0, 0, -785, -785, 124, 124, 0,
3119 238, -785, 87, -785, 87, -785, 0, 0, 0, 0,
3120 955, 0, 0, 0, 0, 0, 348, 349, 350, 351,
3121 352, 353, 354, 355, 356, 357, 358, 359, 360, 0,
3122 0, 121, 0, 361, 362, 0, 0, 0, 0, 363,
3123 0, 0, 0, 0, 0, 0, 0, 121, 0, 0,
3124 0, 0, 0, 0, 0, 0, 776, 776, 0, 0,
3125 0, 776, 776, 222, 222, 87, 364, 0, 365, 366,
3126 367, 368, 369, 370, 371, 372, 373, 374, 0, 0,
3127 0, 87, 0, 1121, 0, 0, 0, 121, 0, 0,
3128 0, 121, 0, 0, 121, 255, 258, 259, 260, 0,
3129 0, 0, 222, 222, 0, 0, 0, 0, 0, 0,
3130 0, 0, 0, 0, 0, 310, 311, 1119, 0, 0,
3131 0, 87, 0, 0, 0, 87, 0, 0, 87, 0,
3132 0, 0, 0, 776, 0, 0, 0, 0, 0, 0,
3133 0, 0, 0, 0, 0, 0, 0, 0, 0, 222,
3134 0, 0, 0, 0, 0, 0, 124, 0, 0, 124,
3135 0, 0, 121, 0, 0, 0, 0, 0, 0, 0,
3136 121, 121, 0, 0, 0, 0, 0, 0, 0, 0,
3137 0, 0, 0, 776, 0, 0, 121, 0, 0, 0,
3138 0, 0, 0, 0, 407, 0, 87, 0, 0, 0,
3139 0, 0, 0, 0, 87, 87, 0, 0, 0, 0,
3140 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3141 87, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3142 0, 0, 124, 0, 0, 0, 0, 0, 121, 0,
3143 0, 0, 0, 124, 0, 124, 0, 0, 0, 121,
3144 0, 0, 0, 0, 0, 0, 0, 222, 0, 0,
3145 222, 222, 222, 0, 310, 407, 0, 0, 0, 0,
3146 0, 0, 87, 0, 0, 0, 0, 0, 0, 0,
3147 0, 0, 222, 87, 222, 222, 0, 0, 0, 0,
3148 0, 0, 0, 0, 0, 0, 0, 124, 124, 0,
3149 0, 0, 124, 124, 0, 0, 124, 0, 0, 0,
3150 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3151 0, 0, 124, 0, 0, 348, 349, 350, 351, 352,
3152 353, 354, 355, 121, 357, 358, 0, 0, 0, 0,
3153 0, 0, 361, 362, 0, 0, 0, 0, 0, 0,
3154 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3155 0, 0, 124, 0, 0, 0, 124, 87, 0, 124,
3156 0, 0, 0, 0, 124, 0, 0, 365, 366, 367,
3157 368, 369, 370, 371, 372, 373, 374, 0, 0, 0,
3158 0, 0, 0, 0, 0, 588, 589, 590, 591, 592,
3159 0, 0, 593, 594, 595, 596, 597, 598, 599, 600,
3160 0, 602, 0, 0, 603, 604, 605, 606, 607, 608,
3161 609, 610, 611, 612, 124, 0, 0, 222, 0, 0,
3162 0, 0, 0, 0, 0, 0, 0, 124, 0, 0,
3163 0, 0, 0, 0, 0, 124, 124, 0, 0, 0,
3164 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3165 0, 124, 0, 0, 0, 0, 0, 0, 0, 0,
3166 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3167 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3168 222, 222, 0, 0, 0, 222, 0, 0, 0, 222,
3169 0, 0, 0, 0, 0, 260, 0, 0, 0, 0,
3170 0, 0, 0, 124, 0, 23, 24, 25, 26, 0,
3171 689, 0, 0, 0, 124, 0, 0, 0, 0, 0,
3172 0, 32, 33, 34, 914, 0, 222, 0, 915, 222,
3173 0, 41, 42, 43, 44, 45, 0, 0, 0, 0,
3174 0, 222, 0, 0, 0, 0, 0, 0, 0, 0,
3175 0, 0, 0, 0, 0, 0, 0, 0, 719, 0,
3176 0, 0, 917, 918, 0, 0, 0, 0, 0, 0,
3177 919, 0, 0, 920, 0, 0, 921, 922, 0, 923,
3178 0, 0, 58, 59, 60, 61, 62, 63, 64, 65,
3179 66, 222, 0, 0, 0, 0, 0, 0, 124, 0,
3180 0, 0, 0, 747, 925, 0, 0, 756, 0, 0,
3181 0, 284, 0, 0, 0, 0, 0, 222, 0, 0,
3182 0, 0, 0, 777, 0, 242, 0, 0, 0, 0,
3183 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3184 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3185 0, 0, 0, 0, 0, 0, 23, 24, 25, 26,
3186 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3187 0, 0, 32, 33, 34, 0, 0, 222, 0, 0,
3188 0, 0, 41, 42, 43, 44, 45, 222, 0, 0,
3189 0, 0, 0, 0, 0, 0, 0, 833, 833, 0,
3190 222, 747, 756, 833, 0, 222, 0, 0, 0, 0,
3191 0, 0, 0, 0, 833, 833, 0, 0, 0, 0,
3192 222, 0, 222, 0, 0, 0, 0, 0, 0, 0,
3193 0, 833, 0, 58, 59, 60, 61, 62, 63, 64,
3194 65, 66, 0, 0, 0, 0, 0, 0, 0, 0,
3195 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3196 -785, 4, 284, 5, 6, 7, 8, 9, 222, 0,
3197 0, 10, 11, 0, 0, 0, 12, 0, 13, 14,
3198 15, 16, 17, 18, 19, 0, 0, 0, 222, 0,
3199 20, 21, 22, 23, 24, 25, 26, 0, 0, 27,
3200 0, 222, 0, 0, 0, 28, 29, 30, 31, 32,
3201 33, 34, 35, 36, 37, 38, 39, 40, 0, 41,
3202 42, 43, 44, 45, 46, 47, 0, 0, 0, 222,
3203 0, 0, 0, 0, 0, 48, 49, 0, 0, 0,
3204 0, 0, 0, 0, 0, 0, 0, 0, 0, 222,
3205 50, 51, 0, 0, 0, 0, 0, 0, 52, 0,
3206 0, 53, 54, 0, 55, 56, 0, 57, 0, 0,
3207 58, 59, 60, 61, 62, 63, 64, 65, 66, 0,
3208 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3209 0, 0, 0, 0, 0, 0, 0, 0, 0, 67,
3210 68, 69, 0, 0, 0, 0, 0, 0, 0, 0,
3211 0, -785, 0, -785, 0, 0, 0, 0, 0, 0,
3212 0, 0, 0, 0, 1019, 1020, 0, 0, 0, 0,
3213 0, 0, 0, 0, 0, 0, 1026, 1027, 0, 0,
3214 0, 0, 222, 23, 24, 25, 26, 1038, 0, 222,
3215 0, 0, 0, 0, 0, 0, 0, 0, 0, 32,
3216 33, 34, 914, 0, 0, 0, 915, 0, 916, 41,
3217 42, 43, 44, 45, 0, 0, 0, 0, 0, 0,
3218 0, 0, 0, 0, 0, 0, 0, 537, 0, 0,
3219 0, 0, 0, 0, 0, 0, 1082, 833, 833, 0,
3220 917, 918, 833, 833, 0, 0, 0, 0, 919, 0,
3221 0, 920, 0, 0, 921, 922, 222, 923, 541, 0,
3222 58, 59, 924, 61, 62, 63, 64, 65, 66, 0,
3223 0, 833, 833, 0, 833, 833, 0, 222, 0, 0,
3224 0, 0, 925, 0, 0, 0, 0, 0, 0, 284,
3225 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3226 0, 0, 0, 0, 0, 0, 0, 0, 0, -762,
3227 222, 0, 0, 0, 833, 0, 0, -762, -762, -762,
3228 0, 0, -762, -762, -762, 0, -762, 0, 0, 0,
3229 0, 0, 0, 0, -762, -762, -762, -762, -762, 0,
3230 0, 0, 0, 0, 0, 0, -762, -762, 0, -762,
3231 -762, -762, -762, -762, 0, 0, 0, 0, 0, 0,
3232 0, 0, 0, 0, 833, 0, 0, 0, 0, 0,
3233 0, 0, 0, 0, 0, 0, 222, -762, 0, 0,
3234 0, 0, 833, 0, 0, 0, -762, -762, -762, -762,
3235 -762, -762, -762, -762, -762, -762, -762, -762, -762, 0,
3236 0, 0, 0, -762, -762, -762, -762, 0, 841, -762,
3237 0, 0, 0, 0, 0, -762, 0, 0, 0, 0,
3238 0, 0, 0, 0, 0, 0, 0, 0, 0, -762,
3239 0, 0, -762, 0, 0, -126, -762, -762, -762, -762,
3240 -762, -762, -762, -762, -762, -762, -762, -762, 0, 0,
3241 0, 0, -762, -762, -762, -762, 222, -652, -762, -762,
3242 -762, 0, -762, 0, 0, -652, -652, -652, 0, 0,
3243 -652, -652, -652, 222, -652, 0, 0, 0, 0, 910,
3244 0, 0, -652, 0, -652, -652, -652, 0, 0, 0,
3245 0, 0, 0, 0, -652, -652, 0, -652, -652, -652,
3246 -652, -652, 0, 0, 0, 0, 0, 0, 0, 0,
3247 0, 0, 348, 349, 350, 351, 352, 353, 354, 355,
3248 356, 357, 358, 359, 360, -652, 0, 0, 0, 361,
3249 362, 0, 0, 0, -652, -652, -652, -652, -652, -652,
3250 -652, -652, -652, -652, -652, -652, -652, 0, 0, 0,
3251 0, -652, -652, -652, -652, 0, -652, -652, 0, 0,
3252 0, 0, 364, -652, 365, 366, 367, 368, 369, 370,
3253 371, 372, 373, 374, 0, 0, 0, -652, 0, 0,
3254 -652, -273, 0, -652, -652, -652, -652, -652, -652, -652,
3255 -652, -652, -652, -652, -652, -652, 0, 0, 0, 0,
3256 0, -652, -652, -652, -655, 0, -652, -652, -652, 0,
3257 -652, 0, -655, -655, -655, 0, 0, -655, -655, -655,
3258 0, -655, 0, 0, 0, 0, 888, 0, 0, -655,
3259 0, -655, -655, -655, 0, 0, 0, 0, 0, 0,
3260 0, -655, -655, 0, -655, -655, -655, -655, -655, 0,
3261 0, 0, 0, 0, 0, 0, 0, 0, 0, 348,
3262 349, 350, 351, 352, 353, 354, 355, 356, 357, 358,
3263 359, 360, -655, 0, 0, 0, 361, 362, 0, 0,
3264 0, -655, -655, -655, -655, -655, -655, -655, -655, -655,
3265 -655, -655, -655, -655, 0, 0, 0, 0, -655, -655,
3266 -655, -655, 0, -655, -655, 0, 0, 0, 0, 364,
3267 -655, 365, 366, 367, 368, 369, 370, 371, 372, 373,
3268 374, 0, 0, 0, -655, 0, 0, -655, 0, 0,
3269 -655, -655, -655, -655, -655, -655, -655, -655, -655, -655,
3270 -655, -655, -655, 0, 0, 0, 0, 0, -655, -655,
3271 -655, -763, 0, -655, -655, -655, 0, -655, 0, -763,
3272 -763, -763, 0, 0, -763, -763, -763, 0, -763, 0,
3273 0, 0, 0, 900, 0, 0, -763, -763, -763, -763,
3274 -763, 0, 0, 0, 0, 0, 0, 0, -763, -763,
3275 0, -763, -763, -763, -763, -763, 0, 0, 0, 0,
3276 0, 0, 0, 0, 0, 0, 348, 349, 350, 351,
3277 352, 353, 354, 355, 356, 357, 358, 359, 360, -763,
3278 0, 0, 0, 361, 362, 0, 0, 0, -763, -763,
3279 -763, -763, -763, -763, -763, -763, -763, -763, -763, -763,
3280 -763, 0, 0, 0, 0, -763, -763, -763, -763, 0,
3281 0, -763, 0, 0, 0, 0, 364, -763, 365, 366,
3282 367, 368, 369, 370, 371, 372, 373, 374, 0, 0,
3283 0, -763, 0, 0, -763, 0, 0, 0, -763, -763,
3284 -763, -763, -763, -763, -763, -763, -763, -763, -763, -763,
3285 0, 0, 0, 0, -763, -763, -763, -763, -764, 0,
3286 -763, -763, -763, 0, -763, 0, -764, -764, -764, 0,
3287 0, -764, -764, -764, 0, -764, 0, 0, 0, 0,
3288 910, 0, 0, -764, -764, -764, -764, -764, 0, 0,
3289 0, 0, 0, 0, 0, -764, -764, 0, -764, -764,
3290 -764, -764, -764, 0, 0, 0, 0, 0, 0, 0,
3291 0, 0, 0, 348, 349, 350, 351, 352, 353, 354,
3292 355, 356, 357, 358, 359, 360, -764, 0, 0, 0,
3293 361, 362, 0, 0, 0, -764, -764, -764, -764, -764,
3294 -764, -764, -764, -764, -764, -764, -764, -764, 0, 0,
3295 0, 0, -764, -764, -764, -764, 0, 0, -764, 0,
3296 0, 0, 0, 364, -764, 365, 366, 367, 368, 369,
3297 370, 371, 372, 373, 374, 0, 0, 0, -764, 0,
3298 0, -764, 0, 0, 0, -764, -764, -764, -764, -764,
3299 -764, -764, -764, -764, -764, -764, -764, 0, 0, 0,
3300 0, -764, -764, -764, -764, -328, 0, -764, -764, -764,
3301 0, -764, 0, -328, -328, -328, 0, 0, -328, -328,
3302 -328, 0, -328, 0, 0, 0, 0, 0, 0, 0,
3303 -328, 0, -328, -328, -328, 0, 0, 0, 0, 0,
3304 0, 0, -328, -328, 0, -328, -328, -328, -328, -328,
3305 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3306 348, 349, 350, 351, 352, 353, 354, 355, 356, 357,
3307 358, 359, 360, -328, 0, 0, 0, 361, 362, 0,
3308 0, 0, -328, -328, -328, -328, -328, -328, -328, -328,
3309 -328, -328, -328, -328, -328, 0, 0, 0, 0, -328,
3310 -328, -328, -328, 0, 842, -328, 0, 0, 0, 0,
3311 364, -328, 365, 366, 367, 368, 369, 370, 371, 372,
3312 373, 374, 0, 0, 0, -328, 0, 0, -328, 0,
3313 0, -128, -328, -328, -328, -328, -328, -328, -328, -328,
3314 -328, -328, -328, -328, 0, 0, 0, 0, 0, -328,
3315 -328, -328, -465, 0, -328, -328, -328, 0, -328, 0,
3316 -465, -465, -465, 0, 0, -465, -465, -465, 0, -465,
3317 0, 0, 0, 0, 0, 0, 0, -465, -465, -465,
3318 -465, 0, 0, 0, 0, 0, 0, 0, 0, -465,
3319 -465, 0, -465, -465, -465, -465, -465, 0, 0, 0,
3320 0, 0, 0, 0, 0, 0, 0, 348, 349, 350,
3321 351, 352, 353, 354, 355, 356, 357, 358, -786, -786,
3322 -465, 0, 0, 0, 361, 362, 0, 0, 0, -465,
3323 -465, -465, -465, -465, -465, -465, -465, -465, -465, -465,
3324 -465, -465, 0, 0, 0, 0, -465, -465, -465, -465,
3325 0, 0, -465, 0, 0, 0, 0, 0, -465, 365,
3326 366, 367, 368, 369, 370, 371, 372, 373, 374, 0,
3327 0, 0, -465, 0, 0, 0, 0, 0, 0, -465,
3328 0, -465, -465, -465, -465, -465, -465, -465, -465, -465,
3329 -465, 0, 0, 0, 0, -465, -465, -465, -465, -320,
3330 238, -465, -465, -465, 0, -465, 0, -320, -320, -320,
3331 0, 0, -320, -320, -320, 0, -320, 0, 0, 0,
3332 0, 0, 0, 0, -320, 0, -320, -320, -320, 0,
3333 0, 0, 0, 0, 0, 0, -320, -320, 0, -320,
3334 -320, -320, -320, -320, 0, 0, 0, 0, 0, 0,
3335 0, 0, 0, 0, 348, -786, -786, -786, -786, 353,
3336 354, 0, 0, -786, -786, 0, 0, -320, 0, 0,
3337 0, 361, 362, 0, 0, 0, -320, -320, -320, -320,
3338 -320, -320, -320, -320, -320, -320, -320, -320, -320, 0,
3339 0, 0, 0, -320, -320, -320, -320, 0, 0, -320,
3340 0, 0, 0, 0, 0, -320, 365, 366, 367, 368,
3341 369, 370, 371, 372, 373, 374, 0, 0, 0, -320,
3342 0, 0, -320, 0, 0, 0, -320, -320, -320, -320,
3343 -320, -320, -320, -320, -320, -320, -320, -320, 0, 0,
3344 0, 0, 0, -320, -320, -320, -785, 0, -320, -320,
3345 -320, 0, -320, 0, -785, -785, -785, 0, 0, -785,
3346 -785, -785, 0, -785, 0, 0, 0, 0, 0, 0,
3347 0, -785, -785, -785, -785, 0, 0, 0, 0, 0,
3348 0, 0, 0, -785, -785, 0, -785, -785, -785, -785,
3349 -785, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3350 0, 348, 349, 350, 351, 352, 353, 354, 0, 0,
3351 357, 358, 0, 0, -785, 0, 0, 0, 361, 362,
3352 0, 0, 0, -785, -785, -785, -785, -785, -785, -785,
3353 -785, -785, -785, -785, -785, -785, 0, 0, 0, 0,
3354 -785, -785, -785, -785, 0, 0, -785, 0, 0, 0,
3355 0, 0, -785, 365, 366, 367, 368, 369, 370, 371,
3356 372, 373, 374, 0, 0, 0, -785, 0, 0, 0,
3357 0, 0, 0, -785, 0, -785, -785, -785, -785, -785,
3358 -785, -785, -785, -785, -785, 0, 0, 0, 0, -785,
3359 -785, -785, -785, -335, 238, -785, -785, -785, 0, -785,
3360 0, -335, -335, -335, 0, 0, -335, -335, -335, 0,
3361 -335, 0, 0, 0, 0, 0, 0, 0, -335, 0,
3362 -335, -335, 0, 0, 0, 0, 0, 0, 0, 0,
3363 -335, -335, 0, -335, -335, -335, -335, -335, 0, 0,
3364 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3365 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3366 0, -335, 0, 0, 0, 0, 0, 0, 0, 0,
3367 -335, -335, -335, -335, -335, -335, -335, -335, -335, -335,
3368 -335, -335, -335, 0, 0, 0, 0, -335, -335, -335,
3369 -335, 0, 0, -335, 0, 0, 0, 0, 0, -335,
3370 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3371 0, 0, 0, -335, 0, 0, 0, 0, 0, 0,
3372 -335, 0, -335, -335, -335, -335, -335, -335, -335, -335,
3373 -335, -335, 0, 0, 0, 0, 0, -335, -335, -335,
3374 -762, 235, -335, -335, -335, 0, -335, 0, -762, -762,
3375 -762, 0, 0, 0, -762, -762, 0, -762, 0, 0,
3376 0, 0, 0, 0, 0, -762, -762, 0, 0, 0,
3377 0, 0, 0, 0, 0, 0, 0, -762, -762, 0,
3378 -762, -762, -762, -762, -762, 0, 0, 0, 0, 0,
3379 0, 0, 348, 349, 350, 351, 352, 353, 354, 355,
3380 356, 357, 358, 359, 360, 0, 0, 0, -762, 361,
3381 362, 0, 0, 0, 0, 0, 0, -762, -762, -762,
3382 -762, -762, -762, -762, -762, -762, -762, -762, -762, -762,
3383 0, 0, 0, 0, -762, -762, -762, -762, 0, 786,
3384 -762, 0, 364, 0, 365, 366, 367, 368, 369, 370,
3385 371, 372, 373, 374, 0, 0, 0, 0, 0, 0,
3386 -762, 0, 0, 0, 0, 0, -126, -762, 242, -762,
3387 -762, -762, -762, -762, -762, -762, -762, -762, -762, 0,
3388 0, 0, 0, -762, -762, -762, -117, -762, 0, -762,
3389 0, -762, 0, -762, 0, -762, -762, -762, 0, 0,
3390 0, -762, -762, 0, -762, 0, 0, 0, 0, 0,
3391 0, 0, -762, -762, 0, 0, 0, 0, 0, 0,
3392 0, 0, 0, 0, -762, -762, 0, -762, -762, -762,
3393 -762, -762, 0, 0, 0, 0, 0, 0, 0, 0,
3394 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3395 0, 0, 0, 0, 0, -762, 0, 0, 0, 0,
3396 0, 0, 0, 0, -762, -762, -762, -762, -762, -762,
3397 -762, -762, -762, -762, -762, -762, -762, 0, 0, 0,
3398 0, -762, -762, -762, -762, 0, 786, -762, 0, 0,
3399 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3400 0, 0, 0, 0, 0, 0, 0, -762, 0, 0,
3401 0, 0, 0, -126, -762, 0, -762, -762, -762, -762,
3402 -762, -762, -762, -762, -762, -762, 0, 0, 0, 0,
3403 -762, -762, -762, -762, -328, 0, -762, 0, -762, 0,
3404 -762, 0, -328, -328, -328, 0, 0, 0, -328, -328,
3405 0, -328, 0, 0, 0, 0, 0, 0, 0, -328,
3406 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3407 0, -328, -328, 0, -328, -328, -328, -328, -328, 0,
3408 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3409 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3410 0, 0, -328, 0, 0, 0, 0, 0, 0, 0,
3411 0, -328, -328, -328, -328, -328, -328, -328, -328, -328,
3412 -328, -328, -328, -328, 0, 0, 0, 0, -328, -328,
3413 -328, -328, 0, 787, -328, 0, 0, 0, 0, 0,
3414 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3415 0, 0, 0, 0, -328, 0, 0, 0, 0, 0,
3416 -128, -328, 0, -328, -328, -328, -328, -328, -328, -328,
3417 -328, -328, -328, 0, 0, 0, 0, 0, -328, -328,
3418 -119, -328, 0, -328, 0, -328, 0, -328, 0, -328,
3419 -328, -328, 0, 0, 0, -328, -328, 0, -328, 0,
3420 0, 0, 0, 0, 0, 0, -328, 0, 0, 0,
3421 0, 0, 0, 0, 0, 0, 0, 0, -328, -328,
3422 0, -328, -328, -328, -328, -328, 0, 0, 0, 0,
3423 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3424 0, 0, 0, 0, 0, 0, 0, 0, 0, -328,
3425 0, 0, 0, 0, 0, 0, 0, 0, -328, -328,
3426 -328, -328, -328, -328, -328, -328, -328, -328, -328, -328,
3427 -328, 0, 0, 0, 0, -328, -328, -328, -328, 0,
3428 787, -328, 0, 0, 0, 0, 0, 0, 0, 0,
3429 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3430 0, -328, 0, 0, 0, 0, 0, -128, -328, 0,
3431 -328, -328, -328, -328, -328, -328, -328, -328, -328, -328,
3432 0, 0, 0, 0, 0, -328, -328, -328, 0, 0,
3433 -328, 0, -328, 262, -328, 5, 6, 7, 8, 9,
3434 -785, -785, -785, 10, 11, 0, 0, -785, 12, 0,
3435 13, 14, 15, 16, 17, 18, 19, 0, 0, 0,
3436 0, 0, 20, 21, 22, 23, 24, 25, 26, 0,
3437 0, 27, 0, 0, 0, 0, 0, 28, 29, 263,
3438 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
3439 0, 41, 42, 43, 44, 45, 46, 47, 0, 0,
3440 0, 0, 0, 0, 0, 0, 0, 48, 49, 0,
3441 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3442 0, 0, 50, 51, 0, 0, 0, 0, 0, 0,
3443 52, 0, 0, 53, 54, 0, 55, 56, 0, 57,
3444 0, 0, 58, 59, 60, 61, 62, 63, 64, 65,
3445 66, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3446 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3447 0, 67, 68, 69, 0, 0, 0, 0, 0, 0,
3448 0, 0, 0, -785, 262, -785, 5, 6, 7, 8,
3449 9, 0, 0, -785, 10, 11, 0, -785, -785, 12,
3450 0, 13, 14, 15, 16, 17, 18, 19, 0, 0,
3451 0, 0, 0, 20, 21, 22, 23, 24, 25, 26,
3452 0, 0, 27, 0, 0, 0, 0, 0, 28, 29,
3453 263, 31, 32, 33, 34, 35, 36, 37, 38, 39,
3454 40, 0, 41, 42, 43, 44, 45, 46, 47, 0,
3455 0, 0, 0, 0, 0, 0, 0, 0, 48, 49,
3456 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3457 0, 0, 0, 50, 51, 0, 0, 0, 0, 0,
3458 0, 52, 0, 0, 53, 54, 0, 55, 56, 0,
3459 57, 0, 0, 58, 59, 60, 61, 62, 63, 64,
3460 65, 66, 0, 0, 0, 0, 0, 0, 0, 0,
3461 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3462 0, 0, 67, 68, 69, 0, 0, 0, 0, 0,
3463 0, 0, 0, 0, -785, 262, -785, 5, 6, 7,
3464 8, 9, 0, 0, -785, 10, 11, 0, 0, -785,
3465 12, -785, 13, 14, 15, 16, 17, 18, 19, 0,
3466 0, 0, 0, 0, 20, 21, 22, 23, 24, 25,
3467 26, 0, 0, 27, 0, 0, 0, 0, 0, 28,
3468 29, 263, 31, 32, 33, 34, 35, 36, 37, 38,
3469 39, 40, 0, 41, 42, 43, 44, 45, 46, 47,
3470 0, 0, 0, 0, 0, 0, 0, 0, 0, 48,
3471 49, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3472 0, 0, 0, 0, 50, 51, 0, 0, 0, 0,
3473 0, 0, 52, 0, 0, 53, 54, 0, 55, 56,
3474 0, 57, 0, 0, 58, 59, 60, 61, 62, 63,
3475 64, 65, 66, 0, 0, 0, 0, 0, 0, 0,
3476 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3477 0, 0, 0, 67, 68, 69, 0, 0, 0, 0,
3478 0, 0, 0, 0, 0, -785, 262, -785, 5, 6,
3479 7, 8, 9, 0, 0, -785, 10, 11, 0, 0,
3480 -785, 12, 0, 13, 14, 15, 16, 17, 18, 19,
3481 -785, 0, 0, 0, 0, 20, 21, 22, 23, 24,
3482 25, 26, 0, 0, 27, 0, 0, 0, 0, 0,
3483 28, 29, 263, 31, 32, 33, 34, 35, 36, 37,
3484 38, 39, 40, 0, 41, 42, 43, 44, 45, 46,
3485 47, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3486 48, 49, 0, 0, 0, 0, 0, 0, 0, 0,
3487 0, 0, 0, 0, 0, 50, 51, 0, 0, 0,
3488 0, 0, 0, 52, 0, 0, 53, 54, 0, 55,
3489 56, 0, 57, 0, 0, 58, 59, 60, 61, 62,
3490 63, 64, 65, 66, 0, 0, 0, 0, 0, 0,
3491 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3492 0, 0, 0, 0, 67, 68, 69, 0, 0, 0,
3493 0, 0, 0, 0, 0, 0, -785, 262, -785, 5,
3494 6, 7, 8, 9, 0, 0, -785, 10, 11, 0,
3495 0, -785, 12, 0, 13, 14, 15, 16, 17, 18,
3496 19, 0, 0, 0, 0, 0, 20, 21, 22, 23,
3497 24, 25, 26, 0, 0, 27, 0, 0, 0, 0,
3498 0, 28, 29, 263, 31, 32, 33, 34, 35, 36,
3499 37, 38, 39, 40, 0, 41, 42, 43, 44, 45,
3500 46, 47, 0, 0, 0, 0, 0, 0, 0, 0,
3501 0, 48, 49, 0, 0, 0, 0, 0, 0, 0,
3502 0, 0, 0, 0, 0, 0, 50, 51, 0, 0,
3503 0, 0, 0, 0, 52, 0, 0, 53, 54, 0,
3504 55, 56, 0, 57, 0, 0, 58, 59, 60, 61,
3505 62, 63, 64, 65, 66, 0, 0, 0, 0, 0,
3506 0, 0, 0, 262, 0, 5, 6, 7, 8, 9,
3507 0, -785, -785, 10, 11, 67, 68, 69, 12, 0,
3508 13, 14, 15, 16, 17, 18, 19, -785, 0, -785,
3509 0, 0, 20, 21, 22, 23, 24, 25, 26, 0,
3510 0, 27, 0, 0, 0, 0, 0, 28, 29, 263,
3511 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
3512 0, 41, 42, 43, 44, 45, 46, 47, 0, 0,
3513 0, 0, 0, 0, 0, 0, 0, 48, 49, 0,
3514 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3515 0, 0, 50, 51, 0, 0, 0, 0, 0, 0,
3516 52, 0, 0, 53, 54, 0, 55, 56, 0, 57,
3517 0, 0, 58, 59, 60, 61, 62, 63, 64, 65,
3518 66, 0, 0, 0, 0, 0, 0, 0, 0, 262,
3519 0, 5, 6, 7, 8, 9, 0, 0, 0, 10,
3520 11, 67, 68, 69, 12, 0, 13, 14, 15, 16,
3521 17, 18, 19, -785, 0, -785, 0, 0, 20, 21,
3522 22, 23, 24, 25, 26, 0, 0, 27, 0, 0,
3523 0, 0, 0, 28, 29, 263, 31, 32, 33, 34,
3524 35, 36, 37, 38, 39, 40, 0, 41, 42, 43,
3525 44, 45, 46, 47, 0, 0, 0, 0, 0, 0,
3526 0, 0, 0, 48, 49, 0, 0, 0, 0, 0,
3527 0, 0, 0, 0, 0, 0, 0, 0, 50, 51,
3528 0, 0, 0, 0, 0, 0, 52, 0, 0, 264,
3529 54, 0, 55, 56, 0, 57, 0, 0, 58, 59,
3530 60, 61, 62, 63, 64, 65, 66, 0, 0, 0,
3531 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3532 0, 0, 0, 0, 0, 0, 0, 67, 68, 69,
3533 0, 0, 0, 0, 0, 0, 0, -785, 0, -785,
3534 262, -785, 5, 6, 7, 8, 9, 0, 0, 0,
3535 10, 11, 0, 0, 0, 12, 0, 13, 14, 15,
3536 16, 17, 18, 19, 0, 0, 0, 0, 0, 20,
3537 21, 22, 23, 24, 25, 26, 0, 0, 27, 0,
3538 0, 0, 0, 0, 28, 29, 263, 31, 32, 33,
3539 34, 35, 36, 37, 38, 39, 40, 0, 41, 42,
3540 43, 44, 45, 46, 47, 0, 0, 0, 0, 0,
3541 0, 0, 0, 0, 48, 49, 0, 0, 0, 0,
3542 0, 0, 0, 0, 0, 0, 0, 0, 0, 50,
3543 51, 0, 0, 0, 0, 0, 0, 52, 0, 0,
3544 53, 54, 0, 55, 56, 0, 57, 0, 0, 58,
3545 59, 60, 61, 62, 63, 64, 65, 66, 0, 0,
3546 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3547 0, 0, 0, 0, 0, 0, 0, 0, 67, 68,
3548 69, 0, 0, 0, 0, 0, 0, 0, -785, 0,
3549 -785, 4, -785, 5, 6, 7, 8, 9, 0, 0,
3550 0, 10, 11, 0, 0, 0, 12, 0, 13, 14,
3551 15, 16, 17, 18, 19, 0, 0, 0, 0, 0,
3552 20, 21, 22, 23, 24, 25, 26, 0, 0, 27,
3553 0, 0, 0, 0, 0, 28, 29, 30, 31, 32,
3554 33, 34, 35, 36, 37, 38, 39, 40, 0, 41,
3555 42, 43, 44, 45, 46, 47, 0, 0, 0, 0,
3556 0, 0, 0, 0, 0, 48, 49, 0, 0, 0,
3557 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3558 50, 51, 0, 0, 0, 0, 0, 0, 52, 0,
3559 0, 53, 54, 0, 55, 56, 0, 57, 0, 0,
3560 58, 59, 60, 61, 62, 63, 64, 65, 66, 0,
3561 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3562 0, 0, 0, 0, 0, 0, 0, 0, 0, 67,
3563 68, 69, 0, 0, -785, 0, 0, 0, 0, 0,
3564 0, -785, 262, -785, 5, 6, 7, 8, 9, 0,
3565 0, 0, 10, 11, 0, 0, 0, 12, 0, 13,
3566 14, 15, 16, 17, 18, 19, 0, 0, 0, 0,
3567 0, 20, 21, 22, 23, 24, 25, 26, 0, 0,
3568 27, 0, 0, 0, 0, 0, 28, 29, 263, 31,
3569 32, 33, 34, 35, 36, 37, 38, 39, 40, 0,
3570 41, 42, 43, 44, 45, 46, 47, 0, 0, 0,
3571 0, 0, 0, 0, 0, 0, 48, 49, 0, 0,
3572 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3573 0, 50, 51, 0, 0, 0, 0, 0, 0, 52,
3574 0, 0, 53, 54, 0, 55, 56, 0, 57, 0,
3575 0, 58, 59, 60, 61, 62, 63, 64, 65, 66,
3576 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3577 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3578 67, 68, 69, 0, 0, -785, 0, 0, 0, 0,
3579 0, 0, -785, 262, -785, 5, 6, 7, 8, 9,
3580 0, 0, -785, 10, 11, 0, 0, 0, 12, 0,
3581 13, 14, 15, 16, 17, 18, 19, 0, 0, 0,
3582 0, 0, 20, 21, 22, 23, 24, 25, 26, 0,
3583 0, 27, 0, 0, 0, 0, 0, 28, 29, 263,
3584 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
3585 0, 41, 42, 43, 44, 45, 46, 47, 0, 0,
3586 0, 0, 0, 0, 0, 0, 0, 48, 49, 0,
3587 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3588 0, 0, 50, 51, 0, 0, 0, 0, 0, 0,
3589 52, 0, 0, 53, 54, 0, 55, 56, 0, 57,
3590 0, 0, 58, 59, 60, 61, 62, 63, 64, 65,
3591 66, 0, 0, 0, 0, 0, 0, 0, 0, 262,
3592 0, 5, 6, 7, 8, 9, 0, 0, 0, 10,
3593 11, 67, 68, 69, 12, 0, 13, 14, 15, 16,
3594 17, 18, 19, -785, 0, -785, 0, 0, 20, 21,
3595 22, 23, 24, 25, 26, 0, 0, 27, 0, 0,
3596 0, 0, 0, 28, 29, 263, 31, 32, 33, 34,
3597 35, 36, 37, 38, 39, 40, 0, 41, 42, 43,
3598 44, 45, 46, 47, 0, 0, 0, 0, 0, 0,
3599 0, 0, 0, 48, 49, 0, 0, 0, 0, 0,
3600 0, 0, 0, 0, 0, 0, 0, 0, 50, 51,
3601 0, 0, 0, 0, 0, 0, 52, 0, 0, 53,
3602 54, 0, 55, 56, 0, 57, 0, 0, 58, 59,
3603 60, 61, 62, 63, 64, 65, 66, 0, -785, 0,
3604 0, 0, 0, 0, 0, 0, 0, 5, 6, 7,
3605 0, 9, 0, 0, 0, 10, 11, 67, 68, 69,
3606 12, 0, 13, 14, 15, 16, 17, 18, 19, -785,
3607 0, -785, 0, 0, 20, 21, 22, 23, 24, 25,
3608 26, 0, 0, 209, 0, 0, 0, 0, 0, 0,
3609 29, 0, 0, 32, 33, 34, 35, 36, 37, 38,
3610 39, 40, 210, 41, 42, 43, 44, 45, 46, 47,
3611 0, 0, 0, 0, 0, 0, 0, 0, 0, 48,
3612 49, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3613 0, 0, 0, 0, 50, 51, 0, 0, 0, 0,
3614 0, 0, 211, 0, 0, 212, 54, 0, 55, 56,
3615 0, 213, 214, 215, 58, 59, 216, 61, 62, 63,
3616 64, 65, 66, 0, 0, 0, 0, 0, 0, 0,
3617 0, 0, 0, 5, 6, 7, 0, 9, 0, 0,
3618 0, 10, 11, 67, 217, 69, 12, 0, 13, 14,
3619 15, 16, 17, 18, 19, 0, 0, 242, 0, 0,
3620 20, 21, 22, 23, 24, 25, 26, 0, 0, 27,
3621 0, 0, 0, 0, 0, 0, 29, 0, 0, 32,
3622 33, 34, 35, 36, 37, 38, 39, 40, 0, 41,
3623 42, 43, 44, 45, 46, 47, 0, 0, 0, 0,
3624 0, 0, 0, 0, 0, 48, 49, 0, 0, 0,
3625 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3626 50, 51, 0, 0, 0, 0, 0, 0, 211, 0,
3627 0, 212, 54, 0, 55, 56, 0, 0, 0, 0,
3628 58, 59, 60, 61, 62, 63, 64, 65, 66, 0,
3629 0, 0, 0, 0, 0, 0, 0, 0, 0, 5,
3630 6, 7, 0, 9, 0, 0, 0, 10, 11, 67,
3631 68, 69, 12, 0, 13, 14, 15, 16, 17, 18,
3632 19, 312, 0, 313, 0, 0, 20, 21, 22, 23,
3633 24, 25, 26, 0, 0, 27, 0, 0, 0, 0,
3634 0, 0, 29, 0, 0, 32, 33, 34, 35, 36,
3635 37, 38, 39, 40, 0, 41, 42, 43, 44, 45,
3636 46, 47, 0, 0, 0, 0, 0, 0, 0, 0,
3637 0, 48, 49, 0, 0, 0, 0, 0, 0, 0,
3638 0, 0, 0, 0, 0, 0, 50, 51, 0, 0,
3639 0, 0, 0, 0, 211, 0, 0, 212, 54, 0,
3640 55, 56, 0, 0, 0, 0, 58, 59, 60, 61,
3641 62, 63, 64, 65, 66, 0, 0, 0, 0, 0,
3642 0, 0, 0, 0, 0, 5, 6, 7, 8, 9,
3643 0, 0, 0, 10, 11, 67, 68, 69, 12, 0,
3644 13, 14, 15, 16, 17, 18, 19, 0, 0, 242,
3645 0, 0, 20, 21, 22, 23, 24, 25, 26, 0,
3646 0, 27, 0, 0, 0, 0, 0, 28, 29, 30,
3647 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
3648 0, 41, 42, 43, 44, 45, 46, 47, 0, 0,
3649 0, 0, 0, 0, 0, 0, 0, 48, 49, 0,
3650 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3651 0, 0, 50, 51, 0, 0, 0, 0, 0, 0,
3652 52, 0, 0, 53, 54, 0, 55, 56, 0, 57,
3653 0, 0, 58, 59, 60, 61, 62, 63, 64, 65,
3654 66, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3655 0, 5, 6, 7, 8, 9, 0, 0, 0, 10,
3656 11, 67, 68, 69, 12, 0, 13, 14, 15, 16,
3657 17, 18, 19, 522, 0, 0, 0, 0, 20, 21,
3658 22, 23, 24, 25, 26, 0, 0, 27, 0, 0,
3659 0, 0, 0, 28, 29, 263, 31, 32, 33, 34,
3660 35, 36, 37, 38, 39, 40, 0, 41, 42, 43,
3661 44, 45, 46, 47, 0, 0, 0, 0, 0, 0,
3662 0, 0, 0, 48, 49, 0, 0, 0, 0, 0,
3663 0, 0, 0, 0, 0, 0, 0, 0, 50, 51,
3664 0, 0, 0, 0, 0, 0, 52, 0, 0, 53,
3665 54, 0, 55, 56, 0, 57, 0, 0, 58, 59,
3666 60, 61, 62, 63, 64, 65, 66, 0, 0, 0,
3667 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3668 0, 0, 0, 0, 0, 0, 0, 67, 68, 69,
3669 0, 0, 0, 0, 0, 0, 0, 0, 0, 522,
3670 129, 130, 131, 132, 133, 134, 135, 136, 137, 138,
3671 139, 140, 141, 142, 143, 144, 145, 146, 147, 148,
3672 149, 150, 151, 152, 0, 0, 0, 153, 154, 155,
3673 411, 412, 413, 414, 160, 161, 162, 0, 0, 0,
3674 0, 0, 163, 164, 165, 166, 415, 416, 417, 418,
3675 171, 37, 38, 419, 40, 0, 0, 0, 0, 0,
3676 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3677 0, 0, 173, 174, 175, 176, 177, 178, 179, 180,
3678 181, 0, 0, 182, 183, 0, 0, 0, 0, 184,
3679 185, 186, 187, 0, 0, 0, 0, 0, 0, 0,
3680 0, 0, 0, 0, 188, 189, 0, 0, 0, 0,
3681 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3682 0, 0, 0, 0, 0, 0, 190, 191, 192, 193,
3683 194, 195, 196, 197, 198, 199, 0, 200, 201, 0,
3684 0, 0, 0, 0, 202, 420, 129, 130, 131, 132,
3685 133, 134, 135, 136, 137, 138, 139, 140, 141, 142,
3686 143, 144, 145, 146, 147, 148, 149, 150, 151, 152,
3687 0, 0, 0, 153, 154, 155, 156, 157, 158, 159,
3688 160, 161, 162, 0, 0, 0, 0, 0, 163, 164,
3689 165, 166, 167, 168, 169, 170, 171, 295, 296, 172,
3690 297, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3691 0, 0, 0, 0, 0, 0, 0, 0, 173, 174,
3692 175, 176, 177, 178, 179, 180, 181, 0, 0, 182,
3693 183, 0, 0, 0, 0, 184, 185, 186, 187, 0,
3694 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3695 188, 189, 0, 0, 0, 0, 0, 0, 0, 0,
3696 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3697 0, 0, 190, 191, 192, 193, 194, 195, 196, 197,
3698 198, 199, 0, 200, 201, 0, 0, 0, 0, 0,
3699 202, 129, 130, 131, 132, 133, 134, 135, 136, 137,
3700 138, 139, 140, 141, 142, 143, 144, 145, 146, 147,
3701 148, 149, 150, 151, 152, 0, 0, 0, 153, 154,
3702 155, 156, 157, 158, 159, 160, 161, 162, 0, 0,
3703 0, 0, 0, 163, 164, 165, 166, 167, 168, 169,
3704 170, 171, 244, 0, 172, 0, 0, 0, 0, 0,
3705 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3706 0, 0, 0, 173, 174, 175, 176, 177, 178, 179,
3707 180, 181, 0, 0, 182, 183, 0, 0, 0, 0,
3708 184, 185, 186, 187, 0, 0, 0, 0, 0, 0,
3709 0, 0, 0, 0, 0, 188, 189, 0, 0, 59,
3710 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3711 0, 0, 0, 0, 0, 0, 0, 190, 191, 192,
3712 193, 194, 195, 196, 197, 198, 199, 0, 200, 201,
3713 0, 0, 0, 0, 0, 202, 129, 130, 131, 132,
3714 133, 134, 135, 136, 137, 138, 139, 140, 141, 142,
3715 143, 144, 145, 146, 147, 148, 149, 150, 151, 152,
3716 0, 0, 0, 153, 154, 155, 156, 157, 158, 159,
3717 160, 161, 162, 0, 0, 0, 0, 0, 163, 164,
3718 165, 166, 167, 168, 169, 170, 171, 0, 0, 172,
3719 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3720 0, 0, 0, 0, 0, 0, 0, 0, 173, 174,
3721 175, 176, 177, 178, 179, 180, 181, 0, 0, 182,
3722 183, 0, 0, 0, 0, 184, 185, 186, 187, 0,
3723 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3724 188, 189, 0, 0, 59, 0, 0, 0, 0, 0,
3725 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3726 0, 0, 190, 191, 192, 193, 194, 195, 196, 197,
3727 198, 199, 0, 200, 201, 0, 0, 0, 0, 0,
3728 202, 129, 130, 131, 132, 133, 134, 135, 136, 137,
3729 138, 139, 140, 141, 142, 143, 144, 145, 146, 147,
3730 148, 149, 150, 151, 152, 0, 0, 0, 153, 154,
3731 155, 156, 157, 158, 159, 160, 161, 162, 0, 0,
3732 0, 0, 0, 163, 164, 165, 166, 167, 168, 169,
3733 170, 171, 0, 0, 172, 0, 0, 0, 0, 0,
3734 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3735 0, 0, 0, 173, 174, 175, 176, 177, 178, 179,
3736 180, 181, 0, 0, 182, 183, 0, 0, 0, 0,
3737 184, 185, 186, 187, 0, 0, 0, 0, 0, 0,
3738 0, 0, 0, 0, 0, 188, 189, 0, 0, 0,
3739 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3740 0, 0, 0, 0, 0, 0, 0, 190, 191, 192,
3741 193, 194, 195, 196, 197, 198, 199, 0, 200, 201,
3742 5, 6, 7, 0, 9, 202, 0, 0, 10, 11,
3743 0, 0, 0, 12, 0, 13, 14, 15, 250, 251,
3744 18, 19, 0, 0, 0, 0, 0, 20, 252, 253,
3745 23, 24, 25, 26, 0, 0, 209, 0, 0, 0,
3746 0, 0, 0, 282, 0, 0, 32, 33, 34, 35,
3747 36, 37, 38, 39, 40, 0, 41, 42, 43, 44,
3748 45, 46, 47, 0, 0, 0, 0, 0, 0, 0,
3749 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3750 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3751 0, 0, 0, 0, 0, 283, 0, 0, 212, 54,
3752 0, 55, 56, 0, 0, 0, 0, 58, 59, 60,
3753 61, 62, 63, 64, 65, 66, 0, 0, 0, 0,
3754 0, 0, 0, 0, 0, 0, 0, 0, 0, 5,
3755 6, 7, 0, 9, 0, 0, 284, 10, 11, 0,
3756 0, 0, 12, 285, 13, 14, 15, 250, 251, 18,
3757 19, 0, 0, 0, 0, 0, 20, 252, 253, 23,
3758 24, 25, 26, 0, 0, 209, 0, 0, 0, 0,
3759 0, 0, 282, 0, 0, 32, 33, 34, 35, 36,
3760 37, 38, 39, 40, 0, 41, 42, 43, 44, 45,
3761 46, 47, 0, 0, 0, 0, 0, 0, 0, 0,
3762 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3763 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3764 0, 0, 0, 0, 283, 0, 0, 212, 54, 0,
3765 55, 56, 0, 0, 0, 0, 58, 59, 60, 61,
3766 62, 63, 64, 65, 66, 0, 0, 0, 0, 0,
3767 0, 0, 0, 0, 0, 0, 0, 0, 5, 6,
3768 7, 8, 9, 0, 0, 284, 10, 11, 0, 0,
3769 0, 12, 583, 13, 14, 15, 16, 17, 18, 19,
3770 0, 0, 0, 0, 0, 20, 21, 22, 23, 24,
3771 25, 26, 0, 0, 27, 0, 0, 0, 0, 0,
3772 28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
3773 38, 39, 40, 0, 41, 42, 43, 44, 45, 46,
3774 47, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3775 48, 49, 0, 0, 0, 0, 0, 0, 0, 0,
3776 0, 0, 0, 0, 0, 50, 51, 0, 0, 0,
3777 0, 0, 0, 52, 0, 0, 53, 54, 0, 55,
3778 56, 0, 57, 0, 0, 58, 59, 60, 61, 62,
3779 63, 64, 65, 66, 0, 0, 0, 0, 0, 0,
3780 0, 0, 0, 0, 5, 6, 7, 0, 9, 0,
3781 0, 0, 10, 11, 67, 68, 69, 12, 0, 13,
3782 14, 15, 16, 17, 18, 19, 0, 0, 0, 0,
3783 0, 20, 21, 22, 23, 24, 25, 26, 0, 0,
3784 209, 0, 0, 0, 0, 0, 0, 29, 0, 0,
3785 32, 33, 34, 35, 36, 37, 38, 39, 40, 210,
3786 41, 42, 43, 44, 45, 46, 47, 0, 0, 0,
3787 0, 0, 0, 0, 0, 0, 48, 49, 0, 0,
3788 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3789 0, 50, 51, 0, 0, 0, 0, 0, 0, 211,
3790 0, 0, 212, 54, 0, 55, 56, 0, 213, 214,
3791 215, 58, 59, 216, 61, 62, 63, 64, 65, 66,
3792 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3793 5, 6, 7, 8, 9, 0, 0, 0, 10, 11,
3794 67, 217, 69, 12, 0, 13, 14, 15, 16, 17,
3795 18, 19, 0, 0, 0, 0, 0, 20, 21, 22,
3796 23, 24, 25, 26, 0, 0, 27, 0, 0, 0,
3797 0, 0, 28, 29, 0, 31, 32, 33, 34, 35,
3798 36, 37, 38, 39, 40, 0, 41, 42, 43, 44,
3799 45, 46, 47, 0, 0, 0, 0, 0, 0, 0,
3800 0, 0, 48, 49, 0, 0, 0, 0, 0, 0,
3801 0, 0, 0, 0, 0, 0, 0, 50, 51, 0,
3802 0, 0, 0, 0, 0, 52, 0, 0, 53, 54,
3803 0, 55, 56, 0, 57, 0, 0, 58, 59, 60,
3804 61, 62, 63, 64, 65, 66, 0, 0, 0, 0,
3805 0, 0, 0, 0, 0, 0, 5, 6, 7, 0,
3806 9, 0, 0, 0, 10, 11, 67, 68, 69, 12,
3807 0, 13, 14, 15, 16, 17, 18, 19, 0, 0,
3808 0, 0, 0, 20, 21, 22, 23, 24, 25, 26,
3809 0, 0, 209, 0, 0, 0, 0, 0, 0, 29,
3810 0, 0, 32, 33, 34, 35, 36, 37, 38, 39,
3811 40, 210, 41, 42, 43, 44, 45, 46, 47, 0,
3812 0, 0, 0, 0, 0, 0, 0, 0, 48, 49,
3813 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3814 0, 0, 0, 50, 458, 0, 0, 0, 0, 0,
3815 0, 211, 0, 0, 212, 54, 0, 55, 56, 0,
3816 213, 214, 215, 58, 59, 216, 61, 62, 63, 64,
3817 65, 66, 0, 0, 0, 0, 0, 0, 0, 0,
3818 0, 0, 5, 6, 7, 0, 9, 0, 0, 0,
3819 10, 11, 67, 217, 69, 12, 0, 13, 14, 15,
3820 250, 251, 18, 19, 0, 0, 0, 0, 0, 20,
3821 252, 253, 23, 24, 25, 26, 0, 0, 209, 0,
3822 0, 0, 0, 0, 0, 29, 0, 0, 32, 33,
3823 34, 35, 36, 37, 38, 39, 40, 210, 41, 42,
3824 43, 44, 45, 46, 47, 0, 0, 0, 0, 0,
3825 0, 0, 0, 0, 48, 49, 0, 0, 0, 0,
3826 0, 0, 0, 0, 0, 0, 0, 0, 0, 50,
3827 51, 0, 0, 0, 0, 0, 0, 211, 0, 0,
3828 212, 54, 0, 55, 56, 0, 668, 214, 215, 58,
3829 59, 216, 61, 62, 63, 64, 65, 66, 0, 0,
3830 0, 0, 0, 0, 0, 0, 0, 0, 5, 6,
3831 7, 0, 9, 0, 0, 0, 10, 11, 67, 217,
3832 69, 12, 0, 13, 14, 15, 250, 251, 18, 19,
3833 0, 0, 0, 0, 0, 20, 252, 253, 23, 24,
3834 25, 26, 0, 0, 209, 0, 0, 0, 0, 0,
3835 0, 29, 0, 0, 32, 33, 34, 35, 36, 37,
3836 38, 39, 40, 210, 41, 42, 43, 44, 45, 46,
3837 47, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3838 48, 49, 0, 0, 0, 0, 0, 0, 0, 0,
3839 0, 0, 0, 0, 0, 50, 458, 0, 0, 0,
3840 0, 0, 0, 211, 0, 0, 212, 54, 0, 55,
3841 56, 0, 668, 214, 215, 58, 59, 216, 61, 62,
3842 63, 64, 65, 66, 0, 0, 0, 0, 0, 0,
3843 0, 0, 0, 0, 5, 6, 7, 0, 9, 0,
3844 0, 0, 10, 11, 67, 217, 69, 12, 0, 13,
3845 14, 15, 250, 251, 18, 19, 0, 0, 0, 0,
3846 0, 20, 252, 253, 23, 24, 25, 26, 0, 0,
3847 209, 0, 0, 0, 0, 0, 0, 29, 0, 0,
3848 32, 33, 34, 35, 36, 37, 38, 39, 40, 210,
3849 41, 42, 43, 44, 45, 46, 47, 0, 0, 0,
3850 0, 0, 0, 0, 0, 0, 48, 49, 0, 0,
3851 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3852 0, 50, 51, 0, 0, 0, 0, 0, 0, 211,
3853 0, 0, 212, 54, 0, 55, 56, 0, 213, 214,
3854 0, 58, 59, 216, 61, 62, 63, 64, 65, 66,
3855 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3856 5, 6, 7, 0, 9, 0, 0, 0, 10, 11,
3857 67, 217, 69, 12, 0, 13, 14, 15, 250, 251,
3858 18, 19, 0, 0, 0, 0, 0, 20, 252, 253,
3859 23, 24, 25, 26, 0, 0, 209, 0, 0, 0,
3860 0, 0, 0, 29, 0, 0, 32, 33, 34, 35,
3861 36, 37, 38, 39, 40, 210, 41, 42, 43, 44,
3862 45, 46, 47, 0, 0, 0, 0, 0, 0, 0,
3863 0, 0, 48, 49, 0, 0, 0, 0, 0, 0,
3864 0, 0, 0, 0, 0, 0, 0, 50, 51, 0,
3865 0, 0, 0, 0, 0, 211, 0, 0, 212, 54,
3866 0, 55, 56, 0, 0, 214, 215, 58, 59, 216,
3867 61, 62, 63, 64, 65, 66, 0, 0, 0, 0,
3868 0, 0, 0, 0, 0, 0, 5, 6, 7, 0,
3869 9, 0, 0, 0, 10, 11, 67, 217, 69, 12,
3870 0, 13, 14, 15, 250, 251, 18, 19, 0, 0,
3871 0, 0, 0, 20, 252, 253, 23, 24, 25, 26,
3872 0, 0, 209, 0, 0, 0, 0, 0, 0, 29,
3873 0, 0, 32, 33, 34, 35, 36, 37, 38, 39,
3874 40, 210, 41, 42, 43, 44, 45, 46, 47, 0,
3875 0, 0, 0, 0, 0, 0, 0, 0, 48, 49,
3876 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3877 0, 0, 0, 50, 51, 0, 0, 0, 0, 0,
3878 0, 211, 0, 0, 212, 54, 0, 55, 56, 0,
3879 668, 214, 0, 58, 59, 216, 61, 62, 63, 64,
3880 65, 66, 0, 0, 0, 0, 0, 0, 0, 0,
3881 0, 0, 5, 6, 7, 0, 9, 0, 0, 0,
3882 10, 11, 67, 217, 69, 12, 0, 13, 14, 15,
3883 250, 251, 18, 19, 0, 0, 0, 0, 0, 20,
3884 252, 253, 23, 24, 25, 26, 0, 0, 209, 0,
3885 0, 0, 0, 0, 0, 29, 0, 0, 32, 33,
3886 34, 35, 36, 37, 38, 39, 40, 210, 41, 42,
3887 43, 44, 45, 46, 47, 0, 0, 0, 0, 0,
3888 0, 0, 0, 0, 48, 49, 0, 0, 0, 0,
3889 0, 0, 0, 0, 0, 0, 0, 0, 0, 50,
3890 51, 0, 0, 0, 0, 0, 0, 211, 0, 0,
3891 212, 54, 0, 55, 56, 0, 0, 214, 0, 58,
3892 59, 216, 61, 62, 63, 64, 65, 66, 0, 0,
3893 0, 0, 0, 0, 0, 0, 0, 0, 5, 6,
3894 7, 0, 9, 0, 0, 0, 10, 11, 67, 217,
3895 69, 12, 0, 13, 14, 15, 16, 17, 18, 19,
3896 0, 0, 0, 0, 0, 20, 21, 22, 23, 24,
3897 25, 26, 0, 0, 209, 0, 0, 0, 0, 0,
3898 0, 29, 0, 0, 32, 33, 34, 35, 36, 37,
3899 38, 39, 40, 0, 41, 42, 43, 44, 45, 46,
3900 47, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3901 48, 49, 0, 0, 0, 0, 0, 0, 0, 0,
3902 0, 0, 0, 0, 0, 50, 51, 0, 0, 0,
3903 0, 0, 0, 211, 0, 0, 212, 54, 0, 55,
3904 56, 0, 764, 0, 0, 58, 59, 60, 61, 62,
3905 63, 64, 65, 66, 0, 0, 0, 0, 0, 0,
3906 0, 0, 0, 0, 5, 6, 7, 0, 9, 0,
3907 0, 0, 10, 11, 67, 217, 69, 12, 0, 13,
3908 14, 15, 250, 251, 18, 19, 0, 0, 0, 0,
3909 0, 20, 252, 253, 23, 24, 25, 26, 0, 0,
3910 209, 0, 0, 0, 0, 0, 0, 29, 0, 0,
3911 32, 33, 34, 35, 36, 37, 38, 39, 40, 0,
3912 41, 42, 43, 44, 45, 46, 47, 0, 0, 0,
3913 0, 0, 0, 0, 0, 0, 48, 49, 0, 0,
3914 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3915 0, 50, 51, 0, 0, 0, 0, 0, 0, 211,
3916 0, 0, 212, 54, 0, 55, 56, 0, 764, 0,
3917 0, 58, 59, 60, 61, 62, 63, 64, 65, 66,
3918 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3919 5, 6, 7, 0, 9, 0, 0, 0, 10, 11,
3920 67, 217, 69, 12, 0, 13, 14, 15, 250, 251,
3921 18, 19, 0, 0, 0, 0, 0, 20, 252, 253,
3922 23, 24, 25, 26, 0, 0, 209, 0, 0, 0,
3923 0, 0, 0, 29, 0, 0, 32, 33, 34, 35,
3924 36, 37, 38, 39, 40, 0, 41, 42, 43, 44,
3925 45, 46, 47, 0, 0, 0, 0, 0, 0, 0,
3926 0, 0, 48, 49, 0, 0, 0, 0, 0, 0,
3927 0, 0, 0, 0, 0, 0, 0, 50, 51, 0,
3928 0, 0, 0, 0, 0, 211, 0, 0, 212, 54,
3929 0, 55, 56, 0, 979, 0, 0, 58, 59, 60,
3930 61, 62, 63, 64, 65, 66, 0, 0, 0, 0,
3931 0, 0, 0, 0, 0, 0, 5, 6, 7, 0,
3932 9, 0, 0, 0, 10, 11, 67, 217, 69, 12,
3933 0, 13, 14, 15, 250, 251, 18, 19, 0, 0,
3934 0, 0, 0, 20, 252, 253, 23, 24, 25, 26,
3935 0, 0, 209, 0, 0, 0, 0, 0, 0, 29,
3936 0, 0, 32, 33, 34, 35, 36, 37, 38, 39,
3937 40, 0, 41, 42, 43, 44, 45, 46, 47, 0,
3938 0, 0, 0, 0, 0, 0, 0, 0, 48, 49,
3939 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3940 0, 0, 0, 50, 51, 0, 0, 0, 0, 0,
3941 0, 211, 0, 0, 212, 54, 0, 55, 56, 0,
3942 1033, 0, 0, 58, 59, 60, 61, 62, 63, 64,
3943 65, 66, 0, 0, 0, 0, 0, 0, 0, 0,
3944 0, 0, 5, 6, 7, 0, 9, 0, 0, 0,
3945 10, 11, 67, 217, 69, 12, 0, 13, 14, 15,
3946 250, 251, 18, 19, 0, 0, 0, 0, 0, 20,
3947 252, 253, 23, 24, 25, 26, 0, 0, 209, 0,
3948 0, 0, 0, 0, 0, 29, 0, 0, 32, 33,
3949 34, 35, 36, 37, 38, 39, 40, 0, 41, 42,
3950 43, 44, 45, 46, 47, 0, 0, 0, 0, 0,
3951 0, 0, 0, 0, 48, 49, 0, 0, 0, 0,
3952 0, 0, 0, 0, 0, 0, 0, 0, 0, 50,
3953 51, 0, 0, 0, 0, 0, 0, 211, 0, 0,
3954 212, 54, 0, 55, 56, 0, 1179, 0, 0, 58,
3955 59, 60, 61, 62, 63, 64, 65, 66, 0, 0,
3956 0, 0, 0, 0, 0, 0, 0, 0, 5, 6,
3957 7, 0, 9, 0, 0, 0, 10, 11, 67, 217,
3958 69, 12, 0, 13, 14, 15, 250, 251, 18, 19,
3959 0, 0, 0, 0, 0, 20, 252, 253, 23, 24,
3960 25, 26, 0, 0, 209, 0, 0, 0, 0, 0,
3961 0, 29, 0, 0, 32, 33, 34, 35, 36, 37,
3962 38, 39, 40, 0, 41, 42, 43, 44, 45, 46,
3963 47, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3964 48, 49, 0, 0, 0, 0, 0, 0, 0, 0,
3965 0, 0, 0, 0, 0, 50, 51, 0, 0, 0,
3966 0, 0, 0, 211, 0, 0, 212, 54, 0, 55,
3967 56, 0, 0, 0, 0, 58, 59, 60, 61, 62,
3968 63, 64, 65, 66, 0, 0, 0, 0, 0, 0,
3969 0, 0, 0, 0, 5, 6, 7, 0, 9, 0,
3970 0, 0, 10, 11, 67, 217, 69, 12, 0, 13,
3971 14, 15, 16, 17, 18, 19, 0, 0, 0, 0,
3972 0, 20, 21, 22, 23, 24, 25, 26, 0, 0,
3973 209, 0, 0, 0, 0, 0, 0, 29, 0, 0,
3974 32, 33, 34, 35, 36, 37, 38, 39, 40, 0,
3975 41, 42, 43, 44, 45, 46, 47, 0, 0, 0,
3976 0, 0, 0, 0, 0, 0, 48, 49, 0, 0,
3977 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3978 0, 50, 51, 0, 0, 0, 0, 0, 0, 211,
3979 0, 0, 212, 54, 0, 55, 56, 0, 0, 0,
3980 0, 58, 59, 60, 61, 62, 63, 64, 65, 66,
3981 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3982 5, 6, 7, 0, 9, 0, 0, 0, 10, 11,
3983 67, 217, 69, 12, 0, 13, 14, 15, 16, 17,
3984 18, 19, 0, 0, 0, 0, 0, 20, 21, 22,
3985 23, 24, 25, 26, 0, 0, 27, 0, 0, 0,
3986 0, 0, 0, 29, 0, 0, 32, 33, 34, 35,
3987 36, 37, 38, 39, 40, 0, 41, 42, 43, 44,
3988 45, 46, 47, 0, 0, 0, 0, 0, 0, 0,
3989 0, 0, 48, 49, 0, 0, 0, 0, 0, 0,
3990 0, 0, 0, 0, 0, 0, 0, 50, 51, 0,
3991 0, 0, 0, 0, 0, 211, 0, 0, 212, 54,
3992 0, 55, 56, 0, 0, 0, 0, 58, 59, 60,
3993 61, 62, 63, 64, 65, 66, 0, 0, 0, 0,
3994 0, 0, 0, 0, 0, 0, 5, 6, 7, 0,
3995 9, 0, 0, 0, 10, 11, 67, 68, 69, 12,
3996 0, 13, 14, 15, 250, 251, 18, 19, 0, 0,
3997 0, 0, 0, 20, 252, 253, 23, 24, 25, 26,
3998 0, 0, 209, 0, 0, 0, 0, 0, 0, 282,
3999 0, 0, 32, 33, 34, 35, 36, 37, 38, 39,
4000 40, 0, 41, 42, 43, 44, 45, 46, 47, 0,
4001 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4002 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4003 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4004 0, 283, 0, 0, 343, 54, 0, 55, 56, 0,
4005 344, 0, 0, 58, 59, 60, 61, 62, 63, 64,
4006 65, 66, 0, 0, 0, 0, 0, 0, 5, 6,
4007 7, 0, 9, 0, 0, 0, 10, 11, 0, 0,
4008 0, 12, 284, 13, 14, 15, 250, 251, 18, 19,
4009 0, 0, 0, 0, 0, 20, 252, 253, 23, 24,
4010 25, 26, 0, 0, 209, 0, 0, 0, 0, 0,
4011 0, 282, 0, 0, 32, 33, 34, 35, 36, 37,
4012 38, 39, 40, 0, 41, 42, 43, 44, 45, 46,
4013 47, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4014 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4015 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4016 0, 0, 0, 392, 0, 0, 53, 54, 0, 55,
4017 56, 0, 57, 0, 0, 58, 59, 60, 61, 62,
4018 63, 64, 65, 66, 0, 0, 0, 0, 0, 0,
4019 5, 6, 7, 0, 9, 0, 0, 0, 10, 11,
4020 0, 0, 0, 12, 284, 13, 14, 15, 250, 251,
4021 18, 19, 0, 0, 0, 0, 0, 20, 252, 253,
4022 23, 24, 25, 26, 0, 0, 209, 0, 0, 0,
4023 0, 0, 0, 282, 0, 0, 32, 33, 34, 400,
4024 36, 37, 38, 401, 40, 0, 41, 42, 43, 44,
4025 45, 46, 47, 0, 0, 0, 0, 0, 0, 0,
4026 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4027 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4028 0, 402, 0, 0, 0, 403, 0, 0, 212, 54,
4029 0, 55, 56, 0, 0, 0, 0, 58, 59, 60,
4030 61, 62, 63, 64, 65, 66, 0, 0, 0, 0,
4031 0, 0, 5, 6, 7, 0, 9, 0, 0, 0,
4032 10, 11, 0, 0, 0, 12, 284, 13, 14, 15,
4033 250, 251, 18, 19, 0, 0, 0, 0, 0, 20,
4034 252, 253, 23, 24, 25, 26, 0, 0, 209, 0,
4035 0, 0, 0, 0, 0, 282, 0, 0, 32, 33,
4036 34, 400, 36, 37, 38, 401, 40, 0, 41, 42,
4037 43, 44, 45, 46, 47, 0, 0, 0, 0, 0,
4038 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4039 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4040 0, 0, 0, 0, 0, 0, 0, 403, 0, 0,
4041 212, 54, 0, 55, 56, 0, 0, 0, 0, 58,
4042 59, 60, 61, 62, 63, 64, 65, 66, 0, 0,
4043 0, 0, 0, 0, 5, 6, 7, 0, 9, 0,
4044 0, 0, 10, 11, 0, 0, 0, 12, 284, 13,
4045 14, 15, 250, 251, 18, 19, 0, 0, 0, 0,
4046 0, 20, 252, 253, 23, 24, 25, 26, 0, 0,
4047 209, 0, 0, 0, 0, 0, 0, 282, 0, 0,
4048 32, 33, 34, 35, 36, 37, 38, 39, 40, 0,
4049 41, 42, 43, 44, 45, 46, 47, 0, 0, 0,
4050 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4051 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4052 0, 0, 0, 0, 0, 0, 0, 0, 0, 283,
4053 0, 0, 343, 54, 0, 55, 56, 0, 0, 0,
4054 0, 58, 59, 60, 61, 62, 63, 64, 65, 66,
4055 0, 0, 0, 0, 0, 0, 5, 6, 7, 0,
4056 9, 0, 0, 0, 10, 11, 0, 0, 0, 12,
4057 284, 13, 14, 15, 250, 251, 18, 19, 0, 0,
4058 0, 0, 0, 20, 252, 253, 23, 24, 25, 26,
4059 0, 0, 209, 0, 0, 0, 0, 0, 0, 282,
4060 0, 0, 32, 33, 34, 35, 36, 37, 38, 39,
4061 40, 0, 41, 42, 43, 44, 45, 46, 47, 0,
4062 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4063 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4064 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4065 0, 1118, 0, 0, 212, 54, 0, 55, 56, 0,
4066 0, 0, 0, 58, 59, 60, 61, 62, 63, 64,
4067 65, 66, 0, 0, 0, 0, 0, 0, 5, 6,
4068 7, 0, 9, 0, 0, 0, 10, 11, 0, 0,
4069 0, 12, 284, 13, 14, 15, 250, 251, 18, 19,
4070 0, 0, 0, 0, 0, 20, 252, 253, 23, 24,
4071 25, 26, 0, 0, 209, 0, 0, 0, 0, 0,
4072 0, 282, 0, 0, 32, 33, 34, 35, 36, 37,
4073 38, 39, 40, 0, 41, 42, 43, 44, 45, 46,
4074 47, 23, 24, 25, 26, 0, 0, 0, 0, 0,
4075 0, 0, 0, 0, 0, 0, 0, 32, 33, 34,
4076 914, 0, 0, 0, 915, 0, 0, 41, 42, 43,
4077 44, 45, 0, 1207, 0, 0, 212, 54, 0, 55,
4078 56, 0, 0, 0, 0, 58, 59, 60, 61, 62,
4079 63, 64, 65, 66, 0, 0, 0, 0, 917, 918,
4080 0, 0, 0, 0, 0, 0, 919, 0, 0, 920,
4081 0, 0, 921, 922, 284, 1145, 0, 0, 58, 59,
4082 60, 61, 62, 63, 64, 65, 66, 23, 24, 25,
4083 26, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4084 925, 0, 0, 32, 33, 34, 914, 284, 0, 0,
4085 915, 0, 0, 41, 42, 43, 44, 45, 0, 0,
4086 23, 24, 25, 26, 0, 0, 0, 0, 0, 0,
4087 0, 0, 0, 0, 0, 0, 32, 33, 34, 914,
4088 0, 0, 0, 915, 917, 918, 41, 42, 43, 44,
4089 45, 0, 919, 0, 0, 920, 0, 0, 921, 922,
4090 0, 923, 0, 0, 58, 59, 60, 61, 62, 63,
4091 64, 65, 66, 0, 0, 0, 0, 917, 918, 0,
4092 0, 0, 0, 0, 0, 919, 925, 0, 920, 0,
4093 0, 921, 922, 284, 0, 0, 0, 58, 59, 60,
4094 61, 62, 63, 64, 65, 66, 613, 614, 0, 0,
4095 615, 0, 0, 0, 0, 0, 0, 0, 0, 925,
4096 0, 0, 0, 0, 0, 0, 284, 0, 0, 173,
4097 174, 175, 176, 177, 178, 179, 180, 181, 0, 0,
4098 182, 183, 0, 0, 0, 0, 184, 185, 186, 187,
4099 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4100 0, 188, 189, 0, 0, 0, 0, 0, 0, 0,
4101 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4102 0, 0, 0, 190, 191, 192, 193, 194, 195, 196,
4103 197, 198, 199, 0, 200, 201, 622, 623, 0, 0,
4104 624, 202, 238, 0, 0, 0, 0, 0, 0, 0,
4105 0, 0, 0, 0, 0, 0, 0, 0, 0, 173,
4106 174, 175, 176, 177, 178, 179, 180, 181, 0, 0,
4107 182, 183, 0, 0, 0, 0, 184, 185, 186, 187,
4108 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4109 0, 188, 189, 0, 0, 0, 0, 0, 0, 0,
4110 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4111 0, 0, 0, 190, 191, 192, 193, 194, 195, 196,
4112 197, 198, 199, 0, 200, 201, 672, 614, 0, 0,
4113 673, 202, 238, 0, 0, 0, 0, 0, 0, 0,
4114 0, 0, 0, 0, 0, 0, 0, 0, 0, 173,
4115 174, 175, 176, 177, 178, 179, 180, 181, 0, 0,
4116 182, 183, 0, 0, 0, 0, 184, 185, 186, 187,
4117 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4118 0, 188, 189, 0, 0, 0, 0, 0, 0, 0,
4119 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4120 0, 0, 0, 190, 191, 192, 193, 194, 195, 196,
4121 197, 198, 199, 0, 200, 201, 675, 623, 0, 0,
4122 676, 202, 238, 0, 0, 0, 0, 0, 0, 0,
4123 0, 0, 0, 0, 0, 0, 0, 0, 0, 173,
4124 174, 175, 176, 177, 178, 179, 180, 181, 0, 0,
4125 182, 183, 0, 0, 0, 0, 184, 185, 186, 187,
4126 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4127 0, 188, 189, 0, 0, 0, 0, 0, 0, 0,
4128 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4129 0, 0, 0, 190, 191, 192, 193, 194, 195, 196,
4130 197, 198, 199, 0, 200, 201, 702, 614, 0, 0,
4131 703, 202, 238, 0, 0, 0, 0, 0, 0, 0,
4132 0, 0, 0, 0, 0, 0, 0, 0, 0, 173,
4133 174, 175, 176, 177, 178, 179, 180, 181, 0, 0,
4134 182, 183, 0, 0, 0, 0, 184, 185, 186, 187,
4135 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4136 0, 188, 189, 0, 0, 0, 0, 0, 0, 0,
4137 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4138 0, 0, 0, 190, 191, 192, 193, 194, 195, 196,
4139 197, 198, 199, 0, 200, 201, 705, 623, 0, 0,
4140 706, 202, 238, 0, 0, 0, 0, 0, 0, 0,
4141 0, 0, 0, 0, 0, 0, 0, 0, 0, 173,
4142 174, 175, 176, 177, 178, 179, 180, 181, 0, 0,
4143 182, 183, 0, 0, 0, 0, 184, 185, 186, 187,
4144 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4145 0, 188, 189, 0, 0, 0, 0, 0, 0, 0,
4146 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4147 0, 0, 0, 190, 191, 192, 193, 194, 195, 196,
4148 197, 198, 199, 0, 200, 201, 814, 614, 0, 0,
4149 815, 202, 238, 0, 0, 0, 0, 0, 0, 0,
4150 0, 0, 0, 0, 0, 0, 0, 0, 0, 173,
4151 174, 175, 176, 177, 178, 179, 180, 181, 0, 0,
4152 182, 183, 0, 0, 0, 0, 184, 185, 186, 187,
4153 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4154 0, 188, 189, 0, 0, 0, 0, 0, 0, 0,
4155 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4156 0, 0, 0, 190, 191, 192, 193, 194, 195, 196,
4157 197, 198, 199, 0, 200, 201, 817, 623, 0, 0,
4158 818, 202, 238, 0, 0, 0, 0, 0, 0, 0,
4159 0, 0, 0, 0, 0, 0, 0, 0, 0, 173,
4160 174, 175, 176, 177, 178, 179, 180, 181, 0, 0,
4161 182, 183, 0, 0, 0, 0, 184, 185, 186, 187,
4162 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4163 0, 188, 189, 0, 0, 0, 0, 0, 0, 0,
4164 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4165 0, 0, 0, 190, 191, 192, 193, 194, 195, 196,
4166 197, 198, 199, 0, 200, 201, 823, 614, 0, 0,
4167 824, 202, 238, 0, 0, 0, 0, 0, 0, 0,
4168 0, 0, 0, 0, 0, 0, 0, 0, 0, 173,
4169 174, 175, 176, 177, 178, 179, 180, 181, 0, 0,
4170 182, 183, 0, 0, 0, 0, 184, 185, 186, 187,
4171 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4172 0, 188, 189, 0, 0, 0, 0, 0, 0, 0,
4173 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4174 0, 0, 0, 190, 191, 192, 193, 194, 195, 196,
4175 197, 198, 199, 0, 200, 201, 657, 623, 0, 0,
4176 658, 202, 238, 0, 0, 0, 0, 0, 0, 0,
4177 0, 0, 0, 0, 0, 0, 0, 0, 0, 173,
4178 174, 175, 176, 177, 178, 179, 180, 181, 0, 0,
4179 182, 183, 0, 0, 0, 0, 184, 185, 186, 187,
4180 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4181 0, 188, 189, 0, 0, 0, 0, 0, 0, 0,
4182 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4183 0, 0, 0, 190, 191, 192, 193, 194, 195, 196,
4184 197, 198, 199, 0, 200, 201, 1039, 614, 0, 0,
4185 1040, 202, 238, 0, 0, 0, 0, 0, 0, 0,
4186 0, 0, 0, 0, 0, 0, 0, 0, 0, 173,
4187 174, 175, 176, 177, 178, 179, 180, 181, 0, 0,
4188 182, 183, 0, 0, 0, 0, 184, 185, 186, 187,
4189 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4190 0, 188, 189, 0, 0, 0, 0, 0, 0, 0,
4191 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4192 0, 0, 0, 190, 191, 192, 193, 194, 195, 196,
4193 197, 198, 199, 0, 200, 201, 1042, 623, 0, 0,
4194 1043, 202, 238, 0, 0, 0, 0, 0, 0, 0,
4195 0, 0, 0, 0, 0, 0, 0, 0, 0, 173,
4196 174, 175, 176, 177, 178, 179, 180, 181, 0, 0,
4197 182, 183, 0, 0, 0, 0, 184, 185, 186, 187,
4198 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4199 0, 188, 189, 0, 0, 0, 0, 0, 0, 0,
4200 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4201 0, 0, 0, 190, 191, 192, 193, 194, 195, 196,
4202 197, 198, 199, 0, 200, 201, 1246, 614, 0, 0,
4203 1247, 202, 238, 0, 0, 0, 0, 0, 0, 0,
4204 0, 0, 0, 0, 0, 0, 0, 0, 0, 173,
4205 174, 175, 176, 177, 178, 179, 180, 181, 0, 0,
4206 182, 183, 0, 0, 0, 0, 184, 185, 186, 187,
4207 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4208 0, 188, 189, 0, 0, 0, 0, 0, 0, 0,
4209 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4210 0, 0, 0, 190, 191, 192, 193, 194, 195, 196,
4211 197, 198, 199, 0, 200, 201, 1249, 623, 0, 0,
4212 1250, 202, 238, 0, 0, 0, 0, 0, 0, 0,
4213 0, 0, 0, 0, 0, 0, 0, 0, 0, 173,
4214 174, 175, 176, 177, 178, 179, 180, 181, 0, 0,
4215 182, 183, 0, 0, 0, 0, 184, 185, 186, 187,
4216 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4217 0, 188, 189, 0, 0, 0, 0, 0, 0, 0,
4218 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4219 0, 0, 0, 190, 191, 192, 193, 194, 195, 196,
4220 197, 198, 199, 0, 200, 201, 1283, 614, 0, 0,
4221 1284, 202, 238, 0, 0, 0, 0, 0, 0, 0,
4222 0, 0, 0, 0, 0, 0, 0, 0, 0, 173,
4223 174, 175, 176, 177, 178, 179, 180, 181, 0, 0,
4224 182, 183, 0, 0, 0, 0, 184, 185, 186, 187,
4225 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4226 0, 188, 189, 0, 0, 0, 0, 0, 0, 0,
4227 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4228 0, 0, 0, 190, 191, 192, 193, 194, 195, 196,
4229 197, 198, 199, 0, 200, 201, 657, 623, 0, 0,
4230 658, 202, 238, 0, 0, 0, 0, 0, 0, 0,
4231 0, 0, 0, 0, 0, 0, 0, 0, 0, 173,
4232 174, 175, 176, 177, 178, 179, 180, 181, 0, 0,
4233 182, 183, 0, 0, 0, 0, 184, 185, 186, 187,
4234 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4235 0, 188, 189, 0, 0, 0, 0, 0, 0, 0,
4236 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4237 0, 0, 0, 190, 191, 192, 193, 194, 195, 196,
4238 197, 198, 199, 0, 200, 201, 0, 0, 0, 0,
4239 0, 202
4240};
4241
4242static const yytype_int16 yycheck[] =
4243{
4244 2, 8, 60, 380, 59, 91, 105, 16, 17, 385,
4245 71, 324, 2, 28, 4, 328, 324, 8, 104, 331,
4246 328, 28, 96, 328, 556, 802, 539, 736, 22, 53,
4247 22, 403, 238, 16, 17, 733, 97, 28, 57, 232,
4248 444, 302, 303, 85, 740, 276, 101, 809, 452, 280,
4249 452, 4, 59, 55, 56, 379, 784, 381, 68, 16,
4250 17, 93, 94, 53, 54, 97, 85, 57, 783, 784,
4251 382, 448, 55, 736, 76, 77, 2, 97, 4, 98,
4252 99, 100, 94, 871, 733, 97, 80, 53, 80, 57,
4253 492, 740, 921, 102, 101, 85, 502, 67, 55, 56,
4254 77, 869, 71, 586, 428, 1068, 77, 29, 98, 99,
4255 100, 101, 52, 16, 17, 27, 25, 660, 661, 102,
4256 783, 784, 66, 447, 1184, 449, 1211, 504, 54, 66,
4257 25, 13, 1028, 68, 66, 97, 100, 66, 68, 264,
4258 68, 227, 34, 917, 918, 102, 25, 66, 26, 789,
4259 27, 99, 29, 477, 25, 25, 144, 797, 216, 586,
4260 52, 96, 97, 25, 13, 153, 96, 97, 0, 97,
4261 256, 52, 25, 54, 55, 119, 57, 583, 126, 153,
4262 561, 505, 563, 145, 121, 122, 148, 119, 212, 153,
4263 25, 143, 121, 122, 1279, 13, 37, 38, 146, 102,
4264 119, 123, 121, 122, 290, 266, 146, 720, 721, 241,
4265 145, 243, 13, 148, 1274, 152, 218, 219, 343, 13,
4266 101, 26, 212, 152, 226, 249, 235, 13, 237, 238,
4267 232, 146, 1128, 660, 661, 143, 238, 146, 153, 151,
4268 264, 153, 219, 285, 13, 247, 266, 218, 219, 1078,
4269 1079, 146, 235, 148, 237, 238, 517, 247, 519, 249,
4270 1223, 253, 254, 640, 146, 143, 285, 146, 751, 151,
4271 463, 153, 262, 650, 264, 146, 146, 649, 235, 683,
4272 237, 685, 25, 685, 146, 317, 318, 319, 320, 740,
4273 322, 323, 743, 146, 727, 285, 13, 266, 264, 1073,
4274 1074, 1051, 151, 736, 153, 317, 318, 319, 320, 395,
4275 287, 146, 153, 1009, 284, 100, 1014, 641, 109, 343,
4276 1070, 247, 25, 25, 1112, 344, 316, 651, 389, 56,
4277 148, 321, 235, 151, 237, 153, 262, 327, 143, 341,
4278 652, 331, 133, 148, 346, 1113, 13, 148, 152, 881,
4279 151, 13, 153, 343, 344, 387, 869, 151, 871, 153,
4280 1009, 146, 386, 316, 388, 151, 772, 153, 1096, 389,
4281 402, 380, 68, 99, 381, 387, 344, 343, 380, 1028,
4282 13, 1096, 151, 126, 153, 68, 100, 126, 792, 381,
4283 316, 152, 382, 1056, 707, 321, 386, 68, 388, 707,
4284 126, 97, 707, 146, 1181, 282, 149, 146, 1071, 68,
4285 153, 152, 68, 96, 97, 1078, 1079, 960, 961, 1181,
4286 733, 428, 965, 966, 126, 96, 97, 740, 25, 431,
4287 432, 52, 146, 1096, 151, 56, 153, 68, 97, 448,
4288 442, 97, 449, 146, 146, 148, 448, 149, 450, 451,
4289 711, 153, 99, 68, 152, 716, 471, 449, 25, 461,
4290 502, 463, 145, 77, 471, 96, 97, 1217, 699, 28,
4291 477, 126, 1222, 1223, 145, 68, 478, 683, 671, 126,
4292 471, 96, 97, 502, 151, 477, 153, 444, 68, 151,
4293 126, 153, 68, 148, 484, 504, 877, 878, 505, 146,
4294 1209, 882, 504, 884, 97, 886, 1204, 52, 569, 34,
4295 822, 56, 502, 505, 145, 1265, 1293, 97, 151, 66,
4296 153, 97, 136, 137, 138, 783, 784, 52, 1028, 126,
4297 145, 126, 489, 960, 961, 912, 66, 67, 965, 966,
4298 853, 583, 1292, 545, 1087, 853, 1209, 919, 853, 146,
4299 146, 148, 149, 99, 556, 1204, 153, 566, 1009, 126,
4300 1011, 570, 1211, 99, 583, 1016, 568, 66, 642, 151,
4301 580, 153, 119, 634, 121, 122, 586, 1028, 68, 146,
4302 126, 66, 149, 112, 68, 68, 153, 911, 1286, 913,
4303 126, 121, 122, 583, 1126, 1028, 1000, 580, 1000, 1112,
4304 1113, 15, 1134, 586, 1217, 981, 630, 97, 632, 1222,
4305 1037, 25, 96, 97, 97, 150, 68, 99, 153, 621,
4306 119, 653, 121, 122, 618, 627, 618, 77, 82, 83,
4307 1279, 640, 146, 627, 641, 627, 121, 122, 640, 124,
4308 630, 650, 632, 99, 651, 97, 1022, 662, 650, 641,
4309 660, 661, 1265, 148, 847, 662, 688, 659, 700, 651,
4310 1087, 145, 652, 921, 68, 659, 56, 659, 9, 671,
4311 126, 662, 54, 985, 15, 129, 130, 68, 126, 68,
4312 938, 700, 64, 65, 134, 135, 136, 137, 138, 66,
4313 68, 693, 96, 97, 99, 781, 1009, 58, 1136, 1137,
4314 692, 693, 100, 1075, 1204, 96, 97, 96, 97, 1209,
4315 700, 1211, 15, 1213, 17, 1028, 77, 1093, 96, 97,
4316 1032, 126, 148, 241, 56, 602, 683, 153, 1260, 68,
4317 772, 830, 1028, 1114, 1115, 1116, 1117, 68, 146, 1190,
4318 99, 145, 119, 620, 121, 122, 99, 108, 109, 751,
4319 752, 269, 66, 772, 145, 273, 145, 96, 97, 820,
4320 1211, 146, 1213, 146, 148, 96, 97, 145, 751, 148,
4321 153, 1204, 133, 126, 829, 99, 1209, 99, 1211, 1279,
4322 1213, 1281, 772, 149, 786, 787, 1286, 153, 1288, 821,
4323 1048, 793, 794, 783, 784, 819, 1108, 674, 800, 148,
4324 802, 1177, 126, 1303, 126, 119, 145, 121, 122, 821,
4325 1068, 37, 38, 77, 145, 14, 15, 1255, 1256, 1196,
4326 1078, 1079, 829, 1261, 146, 1263, 1264, 704, 1279, 819,
4327 1281, 149, 822, 126, 68, 792, 144, 1288, 1096, 841,
4328 842, 99, 844, 845, 146, 847, 1279, 68, 1281, 150,
4329 99, 153, 1303, 1286, 56, 1288, 68, 1295, 1296, 1297,
4330 1298, 148, 96, 97, 1245, 146, 924, 99, 126, 1307,
4331 1303, 895, 77, 1197, 126, 96, 97, 126, 210, 881,
4332 126, 213, 214, 215, 96, 97, 99, 126, 146, 891,
4333 106, 1204, 99, 70, 126, 146, 99, 146, 1211, 901,
4334 56, 903, 99, 912, 151, 895, 913, 909, 1204, 25,
4335 912, 145, 130, 126, 146, 1211, 906, 1213, 908, 126,
4336 2, 913, 4, 126, 145, 986, 99, 917, 918, 126,
4337 126, 921, 126, 145, 16, 17, 454, 1056, 970, 816,
4338 149, 459, 146, 146, 462, 969, 146, 465, 938, 826,
4339 960, 961, 144, 126, 58, 965, 966, 144, 970, 1078,
4340 1079, 146, 964, 481, 88, 89, 1279, 146, 486, 126,
4341 66, 53, 54, 77, 146, 57, 146, 26, 146, 969,
4342 906, 146, 908, 1279, 52, 1281, 68, 146, 54, 55,
4343 1286, 57, 1288, 52, 996, 985, 66, 10, 64, 65,
4344 8, 1025, 1021, 85, 108, 1029, 144, 1303, 112, 40,
4345 41, 93, 94, 286, 287, 97, 98, 99, 100, 68,
4346 102, 146, 13, 119, 146, 121, 122, 1037, 124, 547,
4347 1068, 1021, 25, 1065, 1120, 1025, 146, 17, 152, 1029,
4348 1078, 1079, 1032, 152, 921, 922, 146, 96, 97, 119,
4349 126, 121, 122, 1065, 124, 44, 44, 144, 1048, 126,
4350 146, 1051, 146, 128, 582, 44, 26, 52, 44, 54,
4351 55, 56, 57, 150, 15, 146, 1100, 1087, 1068, 1069,
4352 1070, 52, 146, 1073, 1074, 1109, 146, 131, 1078, 1079,
4353 146, 146, 1150, 100, 143, 146, 145, 52, 131, 148,
4354 1124, 40, 41, 42, 43, 44, 1096, 26, 68, 146,
4355 1100, 443, 444, 1132, 674, 52, 101, 146, 1108, 1109,
4356 452, 146, 107, 1125, 1126, 1002, 59, 60, 61, 62,
4357 212, 146, 1134, 100, 1124, 146, 96, 97, 56, 144,
4358 146, 151, 1132, 52, 704, 54, 55, 56, 57, 68,
4359 149, 1028, 1176, 235, 146, 237, 238, 489, 9, 241,
4360 492, 243, 131, 1187, 1041, 247, 52, 249, 54, 55,
4361 56, 57, 146, 1050, 146, 131, 1053, 96, 97, 1181,
4362 262, 146, 264, 143, 1203, 145, 1176, 1196, 148, 146,
4363 1197, 149, 101, 146, 1196, 146, 1198, 1187, 146, 1076,
4364 1232, 1233, 146, 285, 144, 1197, 724, 52, 56, 54,
4365 55, 56, 57, 1203, 146, 120, 2, 146, 4, 146,
4366 1232, 1233, 554, 146, 143, 146, 145, 1217, 1230, 148,
4367 16, 17, 1222, 1223, 316, 317, 318, 319, 320, 321,
4368 322, 323, 146, 146, 247, 327, 148, 1271, 580, 331,
4369 148, 1128, 480, 484, 586, 829, 816, 98, 1260, 89,
4370 100, 343, 344, 659, 752, 1230, 826, 53, 54, 720,
4371 869, 1130, 1028, 346, 1151, 1265, 903, 1274, 831, 574,
4372 1293, 1271, 68, 1071, 52, 339, 54, 55, 56, 57,
4373 58, 1293, 1069, 1071, 1171, 1172, 1173, 1067, 380, 1198,
4374 382, 1125, 1292, 108, 386, 387, 388, 93, 94, 77,
4375 828, 97, 101, 519, 736, 1209, 102, 1204, 733, -1,
4376 402, 1151, -1, -1, -1, -1, -1, -1, 846, -1,
4377 848, 663, -1, 101, -1, -1, 668, 77, -1, 107,
4378 108, 109, -1, -1, -1, -1, -1, -1, -1, 867,
4379 -1, 683, -1, 685, 94, 95, -1, -1, 431, 432,
4380 -1, 921, 1239, -1, -1, 133, 448, -1, 136, 442,
4381 -1, 1248, -1, -1, 660, 661, -1, 450, 451, -1,
4382 -1, -1, 571, -1, -1, 153, -1, 576, -1, 578,
4383 -1, 677, 678, 133, 134, 135, 136, 137, 138, 731,
4384 -1, -1, 484, -1, -1, 478, -1, -1, 694, -1,
4385 52, -1, 54, 55, 56, 57, 58, -1, -1, 751,
4386 502, -1, 504, -1, -1, -1, 212, -1, -1, -1,
4387 -1, -1, 764, -1, -1, 77, -1, -1, -1, 628,
4388 -1, -1, -1, -1, 633, -1, 635, -1, -1, 235,
4389 -1, 237, 238, 77, -1, 241, -1, 243, -1, 101,
4390 792, 247, -1, 249, -1, 107, 108, 109, 77, -1,
4391 94, 95, -1, -1, -1, -1, 262, -1, 264, -1,
4392 812, 1041, -1, -1, 566, 94, 95, -1, 570, -1,
4393 1050, 133, -1, 1053, 136, -1, -1, -1, 580, -1,
4394 -1, 583, -1, -1, 586, -1, -1, 131, 132, 133,
4395 134, 135, 136, 137, 138, -1, 1076, -1, 52, -1,
4396 54, 55, 56, 57, 58, 134, 135, 136, 137, 138,
4397 316, 317, 318, 319, 320, 321, 322, 323, -1, -1,
4398 -1, 327, -1, 77, -1, 331, -1, -1, 630, -1,
4399 632, -1, -1, -1, -1, -1, -1, 343, 640, 1077,
4400 -1, -1, -1, -1, -1, -1, -1, 101, 650, -1,
4401 652, 653, -1, 905, 108, 109, -1, -1, 660, 661,
4402 52, -1, 54, 55, 56, 57, 58, -1, -1, -1,
4403 -1, -1, -1, -1, 380, -1, 382, -1, -1, 133,
4404 386, 387, 388, -1, -1, 77, 688, -1, -1, -1,
4405 -1, 1171, 1172, 1173, -1, -1, 402, -1, 700, 91,
4406 -1, 810, -1, -1, 813, 1143, -1, -1, -1, 101,
4407 -1, -1, -1, -1, -1, 107, 108, 109, 827, -1,
4408 -1, -1, -1, -1, -1, -1, -1, 979, -1, -1,
4409 1168, 1169, 1170, -1, -1, -1, -1, -1, -1, -1,
4410 -1, 133, 448, -1, 136, -1, -1, -1, 1000, -1,
4411 -1, -1, -1, -1, 960, 961, 148, -1, -1, 965,
4412 966, -1, -1, -1, -1, -1, -1, -1, 1248, -1,
4413 772, -1, -1, -1, -1, -1, -1, -1, 484, -1,
4414 -1, 1033, -1, -1, -1, -1, -1, -1, 994, 995,
4415 -1, 997, 998, 786, 787, -1, -1, -1, 504, -1,
4416 793, 794, -1, -1, 2, -1, 4, -1, -1, -1,
4417 -1, -1, -1, -1, -1, -1, -1, 819, -1, 821,
4418 822, -1, -1, -1, -1, -1, -1, -1, 52, -1,
4419 54, 55, 56, 57, 58, -1, -1, -1, -1, -1,
4420 -1, -1, -1, -1, -1, -1, -1, 1099, 841, 842,
4421 -1, 844, 845, 77, -1, 53, 54, -1, -1, 57,
4422 566, -1, 971, -1, 570, 974, -1, 91, 977, -1,
4423 -1, -1, -1, -1, 580, 984, -1, 101, 987, -1,
4424 586, 1087, 783, 784, 108, 109, -1, 85, -1, -1,
4425 -1, -1, -1, 895, -1, -1, -1, -1, -1, 1105,
4426 98, 99, 100, -1, 906, -1, 908, -1, -1, 133,
4427 912, -1, -1, -1, -1, -1, 909, 52, -1, 54,
4428 55, 56, 57, 58, 630, -1, 632, 1179, -1, -1,
4429 -1, -1, -1, -1, 640, -1, -1, -1, -1, -1,
4430 -1, -1, 77, -1, 650, -1, 652, 653, -1, -1,
4431 -1, -1, -1, -1, 660, 661, 91, -1, 960, 961,
4432 -1, -1, -1, 965, 966, -1, 101, 969, 970, -1,
4433 -1, 964, 107, 108, 109, -1, -1, 2, -1, 4,
4434 -1, -1, 688, 985, -1, -1, -1, -1, -1, -1,
4435 -1, 16, 17, 1102, -1, -1, -1, -1, 133, -1,
4436 -1, 136, -1, 996, -1, -1, -1, -1, -1, -1,
4437 -1, -1, -1, -1, 212, -1, 917, 918, -1, 1021,
4438 921, -1, -1, 1025, -1, -1, -1, 1029, 53, 54,
4439 1032, -1, -1, -1, -1, 1037, -1, 938, -1, -1,
4440 -1, -1, -1, 68, -1, -1, -1, -1, -1, 247,
4441 -1, 249, -1, -1, -1, -1, -1, -1, -1, -1,
4442 -1, -1, -1, 1065, 262, -1, 264, -1, 93, 94,
4443 -1, -1, 97, -1, -1, -1, 1185, 102, -1, -1,
4444 -1, -1, -1, -1, -1, 1087, -1, 285, -1, -1,
4445 -1, -1, -1, -1, -1, -1, -1, -1, 1100, -1,
4446 -1, -1, -1, -1, -1, -1, 1108, 1109, -1, -1,
4447 -1, -1, -1, 819, -1, 821, 822, -1, 316, -1,
4448 -1, -1, 1124, 321, -1, -1, -1, -1, -1, 327,
4449 1132, -1, -1, 331, -1, -1, -1, -1, -1, -1,
4450 -1, -1, -1, -1, -1, 343, 344, 1048, -1, -1,
4451 1051, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4452 -1, -1, -1, -1, -1, -1, -1, 1068, 1069, 1070,
4453 -1, -1, 1073, 1074, 1176, -1, -1, 1078, 1079, -1,
4454 -1, -1, -1, -1, 382, 1187, -1, 212, 386, 895,
4455 388, -1, -1, -1, 1196, 1096, -1, -1, -1, -1,
4456 906, 1203, 908, -1, -1, -1, 912, -1, -1, -1,
4457 235, -1, 237, 238, -1, -1, 241, -1, 243, -1,
4458 -1, -1, 247, -1, 249, -1, -1, -1, -1, -1,
4459 1232, 1233, -1, -1, -1, -1, -1, 262, -1, 264,
4460 -1, -1, -1, -1, 783, 784, -1, -1, -1, -1,
4461 -1, -1, -1, -1, 960, 961, -1, -1, -1, 965,
4462 966, -1, -1, 969, 970, -1, -1, -1, -1, 1271,
4463 -1, -1, -1, -1, -1, -1, -1, -1, -1, 985,
4464 -1, -1, -1, -1, -1, -1, 484, -1, -1, -1,
4465 -1, 316, 317, 318, 319, 320, 321, 322, 323, -1,
4466 -1, -1, 327, -1, 502, -1, 331, -1, -1, -1,
4467 -1, -1, -1, -1, -1, -1, 1217, -1, 343, 1025,
4468 -1, 1222, 1223, 1029, -1, -1, 1032, -1, -1, -1,
4469 -1, 1037, -1, -1, -1, -1, -1, -1, -1, -1,
4470 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4471 -1, -1, -1, -1, -1, 380, -1, 382, -1, 1065,
4472 -1, 386, 387, 388, 1265, -1, -1, -1, -1, -1,
4473 -1, -1, -1, -1, -1, -1, -1, 402, 917, 918,
4474 -1, 1087, 921, -1, -1, 583, -1, -1, 586, -1,
4475 -1, 1292, -1, -1, 1100, -1, -1, -1, -1, 938,
4476 -1, -1, 1108, 1109, -1, -1, -1, -1, -1, 2,
4477 -1, 4, -1, -1, -1, -1, -1, -1, 1124, -1,
4478 -1, -1, -1, 448, -1, -1, -1, -1, -1, -1,
4479 -1, -1, 630, -1, 632, -1, -1, -1, -1, -1,
4480 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4481 -1, -1, -1, -1, 652, -1, -1, -1, -1, 484,
4482 53, 54, 660, 661, 57, -1, -1, -1, -1, -1,
4483 1176, -1, -1, -1, -1, -1, -1, -1, -1, 504,
4484 -1, 1187, -1, -1, -1, -1, -1, -1, -1, -1,
4485 1196, -1, 85, -1, -1, -1, -1, -1, -1, -1,
4486 -1, -1, 700, -1, -1, 98, 99, 100, -1, 1048,
4487 -1, 709, 1051, -1, -1, 783, 784, -1, -1, -1,
4488 -1, -1, -1, -1, -1, -1, 1232, 1233, -1, 1068,
4489 1069, 1070, -1, -1, 1073, 1074, -1, -1, -1, 1078,
4490 1079, 566, -1, -1, -1, 570, -1, -1, -1, -1,
4491 -1, -1, -1, -1, -1, 580, -1, 1096, -1, -1,
4492 -1, 586, -1, -1, -1, 1271, -1, -1, -1, -1,
4493 -1, -1, -1, -1, 772, -1, -1, -1, -1, -1,
4494 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4495 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4496 -1, -1, -1, -1, -1, 630, -1, 632, -1, -1,
4497 -1, -1, -1, -1, -1, 640, -1, -1, -1, 212,
4498 -1, 819, -1, -1, 822, 650, -1, 652, 653, -1,
4499 -1, -1, -1, -1, -1, 660, 661, -1, -1, 2,
4500 -1, 4, -1, -1, -1, -1, -1, -1, -1, 917,
4501 918, -1, -1, 921, 247, -1, 249, -1, -1, -1,
4502 -1, -1, -1, 688, -1, -1, -1, -1, -1, 262,
4503 938, 264, -1, -1, -1, -1, -1, -1, 1217, -1,
4504 -1, -1, -1, 1222, 1223, -1, -1, -1, -1, -1,
4505 53, 54, 285, -1, 57, -1, -1, 895, -1, -1,
4506 -1, -1, -1, -1, -1, -1, -1, -1, 906, -1,
4507 908, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4508 -1, -1, 85, 316, -1, -1, 1265, -1, 321, -1,
4509 -1, -1, -1, -1, 327, 98, 99, 100, 331, -1,
4510 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4511 343, 344, -1, 1292, -1, -1, -1, -1, -1, -1,
4512 -1, -1, 960, 961, -1, -1, -1, 965, 966, -1,
4513 -1, 969, -1, -1, -1, -1, -1, -1, -1, -1,
4514 1048, -1, -1, 1051, -1, -1, -1, 985, -1, 382,
4515 -1, -1, -1, 386, 819, 388, 821, 822, -1, -1,
4516 1068, 1069, 1070, -1, -1, 1073, 1074, -1, -1, -1,
4517 1078, 1079, -1, -1, -1, -1, -1, -1, -1, -1,
4518 -1, -1, -1, 1021, -1, -1, -1, 1025, 1096, -1,
4519 -1, 1029, -1, -1, 1032, -1, -1, 783, 784, 1037,
4520 -1, -1, -1, -1, -1, -1, -1, -1, -1, 212,
4521 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4522 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4523 895, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4524 -1, 906, -1, 908, 247, -1, 249, 912, -1, 1087,
4525 -1, 484, -1, -1, -1, -1, -1, -1, -1, 262,
4526 -1, 264, 1100, -1, -1, -1, -1, -1, -1, 502,
4527 1108, 1109, -1, -1, -1, -1, -1, -1, -1, -1,
4528 -1, -1, 285, -1, -1, -1, 1124, -1, -1, -1,
4529 -1, -1, -1, -1, 1132, 960, 961, -1, -1, -1,
4530 965, 966, -1, -1, 969, 970, -1, -1, -1, 1217,
4531 -1, -1, -1, 316, 1222, 1223, -1, -1, 321, -1,
4532 985, -1, -1, -1, 327, -1, -1, -1, 331, -1,
4533 -1, 917, 918, -1, -1, 921, -1, -1, 1176, -1,
4534 343, 344, -1, -1, -1, -1, -1, -1, -1, 1187,
4535 583, -1, 938, 586, -1, -1, -1, 1265, -1, -1,
4536 1025, -1, -1, -1, 1029, 1203, -1, 1032, -1, -1,
4537 -1, -1, 1037, -1, 783, 784, -1, -1, -1, 382,
4538 -1, -1, -1, 386, 1292, 388, -1, -1, -1, -1,
4539 -1, -1, -1, -1, -1, -1, -1, 630, -1, 632,
4540 1065, -1, -1, 783, 784, -1, -1, -1, -1, -1,
4541 -1, -1, -1, -1, -1, -1, -1, -1, -1, 652,
4542 -1, -1, 1087, -1, -1, -1, -1, 660, 661, -1,
4543 -1, -1, -1, 1271, -1, 1100, -1, -1, -1, -1,
4544 -1, -1, -1, 1108, 1109, -1, -1, -1, -1, -1,
4545 -1, -1, -1, -1, -1, -1, -1, -1, -1, 1124,
4546 -1, -1, 1048, -1, 2, 1051, 4, 700, -1, -1,
4547 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4548 -1, 484, 1068, 1069, 1070, 783, 784, 1073, 1074, -1,
4549 -1, -1, 1078, 1079, -1, -1, -1, -1, 2, 502,
4550 4, -1, -1, -1, -1, -1, -1, -1, 917, 918,
4551 1096, 1176, 921, -1, -1, 53, 54, -1, -1, 57,
4552 -1, -1, 1187, -1, -1, -1, -1, -1, -1, 938,
4553 -1, 1196, -1, -1, -1, -1, -1, 917, 918, 772,
4554 -1, 921, -1, -1, -1, -1, -1, 85, -1, 53,
4555 54, -1, -1, -1, -1, -1, -1, -1, 938, -1,
4556 98, 99, 100, 101, -1, -1, -1, 1232, 1233, -1,
4557 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4558 583, -1, -1, 586, -1, -1, 819, -1, -1, 822,
4559 -1, -1, -1, -1, 98, -1, -1, -1, -1, -1,
4560 -1, -1, -1, -1, -1, -1, 1271, -1, -1, -1,
4561 -1, -1, -1, -1, -1, -1, -1, -1, -1, 917,
4562 918, -1, -1, 921, -1, -1, -1, 630, -1, 632,
4563 -1, 1217, -1, -1, -1, -1, 1222, 1223, -1, 1048,
4564 938, -1, 1051, -1, -1, -1, -1, -1, -1, 652,
4565 -1, -1, -1, -1, -1, -1, -1, 660, 661, 1068,
4566 1069, 1070, 895, -1, 1073, 1074, -1, -1, 1048, 1078,
4567 1079, 1051, -1, 906, 212, 908, -1, -1, -1, 1265,
4568 -1, -1, -1, -1, -1, -1, -1, 1096, 1068, 1069,
4569 1070, -1, -1, 1073, 1074, -1, -1, 700, 1078, 1079,
4570 -1, -1, -1, -1, -1, -1, 1292, -1, 212, 247,
4571 -1, 249, -1, -1, -1, -1, 1096, -1, -1, -1,
4572 -1, -1, -1, -1, 262, -1, 264, 960, 961, -1,
4573 -1, -1, 965, 966, -1, -1, 969, -1, -1, 2,
4574 -1, 4, -1, 247, -1, 249, -1, 285, -1, -1,
4575 1048, -1, 985, 1051, -1, -1, -1, -1, 262, -1,
4576 264, -1, -1, -1, -1, -1, -1, -1, -1, 772,
4577 1068, 1069, 1070, -1, -1, 1073, 1074, -1, 316, -1,
4578 1078, 1079, -1, 321, -1, -1, -1, -1, 1021, 327,
4579 53, 54, 1025, 331, -1, -1, 1029, -1, 1096, 1032,
4580 -1, -1, -1, -1, 1037, 343, 344, -1, 1217, -1,
4581 -1, -1, 316, 1222, 1223, -1, 819, 321, -1, 822,
4582 -1, -1, -1, 327, -1, -1, -1, 331, -1, -1,
4583 -1, -1, -1, -1, -1, -1, -1, 1217, -1, 343,
4584 -1, -1, 1222, 1223, 382, -1, -1, -1, 386, -1,
4585 388, -1, -1, -1, 1087, -1, 1265, -1, -1, -1,
4586 -1, -1, -1, -1, -1, -1, -1, 1100, 783, 784,
4587 -1, -1, -1, -1, -1, 1108, 1109, -1, 382, -1,
4588 -1, -1, 386, 1292, 388, 1265, -1, -1, -1, -1,
4589 -1, 1124, 895, -1, -1, -1, -1, -1, -1, 1132,
4590 -1, 783, 784, 906, -1, 908, -1, -1, -1, -1,
4591 -1, -1, 1292, -1, -1, -1, -1, -1, -1, 1217,
4592 -1, -1, -1, -1, 1222, 1223, -1, -1, -1, -1,
4593 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4594 -1, -1, -1, 1176, -1, -1, 484, -1, -1, 212,
4595 -1, -1, -1, -1, 1187, -1, -1, 960, 961, -1,
4596 -1, -1, 965, 966, 502, -1, 969, 1265, -1, -1,
4597 1203, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4598 484, -1, 985, -1, 247, -1, 249, -1, -1, -1,
4599 -1, -1, -1, -1, 1292, -1, -1, -1, -1, 262,
4600 -1, 264, 917, 918, -1, -1, 921, -1, -1, -1,
4601 -1, -1, -1, -1, -1, -1, -1, -1, 1021, -1,
4602 -1, -1, 1025, 938, -1, -1, 1029, -1, -1, 1032,
4603 -1, -1, -1, -1, 1037, 917, 918, -1, 1271, 921,
4604 -1, -1, -1, -1, -1, 583, -1, -1, -1, -1,
4605 -1, -1, -1, 316, -1, -1, 938, -1, 321, -1,
4606 -1, -1, -1, -1, 327, -1, -1, -1, 331, -1,
4607 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4608 343, -1, 586, -1, 1087, -1, -1, -1, -1, -1,
4609 -1, -1, 630, -1, 632, -1, -1, 1100, -1, -1,
4610 -1, -1, -1, -1, -1, 1108, 1109, -1, -1, -1,
4611 -1, -1, -1, -1, 652, -1, -1, -1, -1, 382,
4612 -1, 1124, -1, 386, -1, 388, 630, -1, 632, 1132,
4613 -1, -1, -1, 1048, -1, -1, 1051, -1, -1, -1,
4614 -1, -1, -1, -1, -1, -1, -1, -1, 652, -1,
4615 -1, -1, -1, 1068, 1069, 1070, 660, 661, 1073, 1074,
4616 -1, -1, 700, 1078, 1079, -1, 1048, -1, -1, 1051,
4617 -1, -1, -1, 1176, -1, -1, -1, -1, -1, -1,
4618 -1, 1096, -1, -1, 1187, -1, 1068, 1069, 1070, -1,
4619 -1, 1073, 1074, -1, -1, -1, 1078, 1079, -1, -1,
4620 1203, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4621 -1, -1, -1, -1, 1096, -1, -1, -1, -1, -1,
4622 -1, 484, -1, -1, -1, -1, -1, -1, -1, -1,
4623 -1, -1, -1, -1, 772, -1, -1, -1, -1, -1,
4624 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4625 -1, -1, 0, -1, -1, -1, -1, -1, -1, -1,
4626 8, 9, 10, -1, -1, 13, 14, 15, 1271, 17,
4627 -1, -1, -1, -1, -1, -1, -1, 25, 26, 27,
4628 -1, 819, -1, -1, 822, -1, -1, -1, -1, 37,
4629 38, -1, 40, 41, 42, 43, 44, -1, -1, -1,
4630 -1, -1, 1217, -1, -1, -1, -1, 1222, 1223, -1,
4631 -1, -1, -1, -1, -1, 819, -1, -1, 822, -1,
4632 68, -1, -1, 586, -1, -1, -1, -1, -1, -1,
4633 -1, -1, -1, -1, -1, 1217, -1, -1, -1, -1,
4634 1222, 1223, -1, -1, -1, -1, -1, -1, 96, 97,
4635 1265, -1, -1, -1, -1, -1, -1, 895, -1, -1,
4636 -1, -1, -1, -1, 25, -1, -1, 630, 906, 632,
4637 908, -1, 120, -1, -1, -1, -1, 1292, -1, -1,
4638 -1, -1, -1, 1265, -1, -1, -1, -1, -1, 652,
4639 -1, 895, -1, -1, -1, 143, 144, 660, 661, -1,
4640 148, 149, 906, 151, 908, 153, -1, -1, -1, -1,
4641 1292, -1, -1, -1, -1, -1, 77, 78, 79, 80,
4642 81, 82, 83, 84, 85, 86, 87, 88, 89, -1,
4643 -1, 969, -1, 94, 95, -1, -1, -1, -1, 100,
4644 -1, -1, -1, -1, -1, -1, -1, 985, -1, -1,
4645 -1, -1, -1, -1, -1, -1, 960, 961, -1, -1,
4646 -1, 965, 966, 16, 17, 969, 127, -1, 129, 130,
4647 131, 132, 133, 134, 135, 136, 137, 138, -1, -1,
4648 -1, 985, -1, 1021, -1, -1, -1, 1025, -1, -1,
4649 -1, 1029, -1, -1, 1032, 48, 49, 50, 51, -1,
4650 -1, -1, 55, 56, -1, -1, -1, -1, -1, -1,
4651 -1, -1, -1, -1, -1, 68, 69, 1021, -1, -1,
4652 -1, 1025, -1, -1, -1, 1029, -1, -1, 1032, -1,
4653 -1, -1, -1, 1037, -1, -1, -1, -1, -1, -1,
4654 -1, -1, -1, -1, -1, -1, -1, -1, -1, 102,
4655 -1, -1, -1, -1, -1, -1, 819, -1, -1, 822,
4656 -1, -1, 1100, -1, -1, -1, -1, -1, -1, -1,
4657 1108, 1109, -1, -1, -1, -1, -1, -1, -1, -1,
4658 -1, -1, -1, 1087, -1, -1, 1124, -1, -1, -1,
4659 -1, -1, -1, -1, 1132, -1, 1100, -1, -1, -1,
4660 -1, -1, -1, -1, 1108, 1109, -1, -1, -1, -1,
4661 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4662 1124, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4663 -1, -1, 895, -1, -1, -1, -1, -1, 1176, -1,
4664 -1, -1, -1, 906, -1, 908, -1, -1, -1, 1187,
4665 -1, -1, -1, -1, -1, -1, -1, 210, -1, -1,
4666 213, 214, 215, -1, 217, 1203, -1, -1, -1, -1,
4667 -1, -1, 1176, -1, -1, -1, -1, -1, -1, -1,
4668 -1, -1, 235, 1187, 237, 238, -1, -1, -1, -1,
4669 -1, -1, -1, -1, -1, -1, -1, 960, 961, -1,
4670 -1, -1, 965, 966, -1, -1, 969, -1, -1, -1,
4671 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4672 -1, -1, 985, -1, -1, 77, 78, 79, 80, 81,
4673 82, 83, 84, 1271, 86, 87, -1, -1, -1, -1,
4674 -1, -1, 94, 95, -1, -1, -1, -1, -1, -1,
4675 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4676 -1, -1, 1025, -1, -1, -1, 1029, 1271, -1, 1032,
4677 -1, -1, -1, -1, 1037, -1, -1, 129, 130, 131,
4678 132, 133, 134, 135, 136, 137, 138, -1, -1, -1,
4679 -1, -1, -1, -1, -1, 348, 349, 350, 351, 352,
4680 -1, -1, 355, 356, 357, 358, 359, 360, 361, 362,
4681 -1, 364, -1, -1, 367, 368, 369, 370, 371, 372,
4682 373, 374, 375, 376, 1087, -1, -1, 380, -1, -1,
4683 -1, -1, -1, -1, -1, -1, -1, 1100, -1, -1,
4684 -1, -1, -1, -1, -1, 1108, 1109, -1, -1, -1,
4685 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4686 -1, 1124, -1, -1, -1, -1, -1, -1, -1, -1,
4687 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4688 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4689 443, 444, -1, -1, -1, 448, -1, -1, -1, 452,
4690 -1, -1, -1, -1, -1, 458, -1, -1, -1, -1,
4691 -1, -1, -1, 1176, -1, 33, 34, 35, 36, -1,
4692 473, -1, -1, -1, 1187, -1, -1, -1, -1, -1,
4693 -1, 49, 50, 51, 52, -1, 489, -1, 56, 492,
4694 -1, 59, 60, 61, 62, 63, -1, -1, -1, -1,
4695 -1, 504, -1, -1, -1, -1, -1, -1, -1, -1,
4696 -1, -1, -1, -1, -1, -1, -1, -1, 521, -1,
4697 -1, -1, 90, 91, -1, -1, -1, -1, -1, -1,
4698 98, -1, -1, 101, -1, -1, 104, 105, -1, 107,
4699 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
4700 118, 554, -1, -1, -1, -1, -1, -1, 1271, -1,
4701 -1, -1, -1, 566, 132, -1, -1, 570, -1, -1,
4702 -1, 139, -1, -1, -1, -1, -1, 580, -1, -1,
4703 -1, -1, -1, 586, -1, 153, -1, -1, -1, -1,
4704 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4705 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4706 -1, -1, -1, -1, -1, -1, 33, 34, 35, 36,
4707 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4708 -1, -1, 49, 50, 51, -1, -1, 640, -1, -1,
4709 -1, -1, 59, 60, 61, 62, 63, 650, -1, -1,
4710 -1, -1, -1, -1, -1, -1, -1, 660, 661, -1,
4711 663, 664, 665, 666, -1, 668, -1, -1, -1, -1,
4712 -1, -1, -1, -1, 677, 678, -1, -1, -1, -1,
4713 683, -1, 685, -1, -1, -1, -1, -1, -1, -1,
4714 -1, 694, -1, 110, 111, 112, 113, 114, 115, 116,
4715 117, 118, -1, -1, -1, -1, -1, -1, -1, -1,
4716 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4717 0, 1, 139, 3, 4, 5, 6, 7, 731, -1,
4718 -1, 11, 12, -1, -1, -1, 16, -1, 18, 19,
4719 20, 21, 22, 23, 24, -1, -1, -1, 751, -1,
4720 30, 31, 32, 33, 34, 35, 36, -1, -1, 39,
4721 -1, 764, -1, -1, -1, 45, 46, 47, 48, 49,
4722 50, 51, 52, 53, 54, 55, 56, 57, -1, 59,
4723 60, 61, 62, 63, 64, 65, -1, -1, -1, 792,
4724 -1, -1, -1, -1, -1, 75, 76, -1, -1, -1,
4725 -1, -1, -1, -1, -1, -1, -1, -1, -1, 812,
4726 90, 91, -1, -1, -1, -1, -1, -1, 98, -1,
4727 -1, 101, 102, -1, 104, 105, -1, 107, -1, -1,
4728 110, 111, 112, 113, 114, 115, 116, 117, 118, -1,
4729 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4730 -1, -1, -1, -1, -1, -1, -1, -1, -1, 139,
4731 140, 141, -1, -1, -1, -1, -1, -1, -1, -1,
4732 -1, 151, -1, 153, -1, -1, -1, -1, -1, -1,
4733 -1, -1, -1, -1, 887, 888, -1, -1, -1, -1,
4734 -1, -1, -1, -1, -1, -1, 899, 900, -1, -1,
4735 -1, -1, 905, 33, 34, 35, 36, 910, -1, 912,
4736 -1, -1, -1, -1, -1, -1, -1, -1, -1, 49,
4737 50, 51, 52, -1, -1, -1, 56, -1, 58, 59,
4738 60, 61, 62, 63, -1, -1, -1, -1, -1, -1,
4739 -1, -1, -1, -1, -1, -1, -1, 77, -1, -1,
4740 -1, -1, -1, -1, -1, -1, 959, 960, 961, -1,
4741 90, 91, 965, 966, -1, -1, -1, -1, 98, -1,
4742 -1, 101, -1, -1, 104, 105, 979, 107, 108, -1,
4743 110, 111, 112, 113, 114, 115, 116, 117, 118, -1,
4744 -1, 994, 995, -1, 997, 998, -1, 1000, -1, -1,
4745 -1, -1, 132, -1, -1, -1, -1, -1, -1, 139,
4746 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4747 -1, -1, -1, -1, -1, -1, -1, -1, -1, 0,
4748 1033, -1, -1, -1, 1037, -1, -1, 8, 9, 10,
4749 -1, -1, 13, 14, 15, -1, 17, -1, -1, -1,
4750 -1, -1, -1, -1, 25, 26, 27, 28, 29, -1,
4751 -1, -1, -1, -1, -1, -1, 37, 38, -1, 40,
4752 41, 42, 43, 44, -1, -1, -1, -1, -1, -1,
4753 -1, -1, -1, -1, 1087, -1, -1, -1, -1, -1,
4754 -1, -1, -1, -1, -1, -1, 1099, 68, -1, -1,
4755 -1, -1, 1105, -1, -1, -1, 77, 78, 79, 80,
4756 81, 82, 83, 84, 85, 86, 87, 88, 89, -1,
4757 -1, -1, -1, 94, 95, 96, 97, -1, 99, 100,
4758 -1, -1, -1, -1, -1, 106, -1, -1, -1, -1,
4759 -1, -1, -1, -1, -1, -1, -1, -1, -1, 120,
4760 -1, -1, 123, -1, -1, 126, 127, 128, 129, 130,
4761 131, 132, 133, 134, 135, 136, 137, 138, -1, -1,
4762 -1, -1, 143, 144, 145, 146, 1179, 0, 149, 150,
4763 151, -1, 153, -1, -1, 8, 9, 10, -1, -1,
4764 13, 14, 15, 1196, 17, -1, -1, -1, -1, 44,
4765 -1, -1, 25, -1, 27, 28, 29, -1, -1, -1,
4766 -1, -1, -1, -1, 37, 38, -1, 40, 41, 42,
4767 43, 44, -1, -1, -1, -1, -1, -1, -1, -1,
4768 -1, -1, 77, 78, 79, 80, 81, 82, 83, 84,
4769 85, 86, 87, 88, 89, 68, -1, -1, -1, 94,
4770 95, -1, -1, -1, 77, 78, 79, 80, 81, 82,
4771 83, 84, 85, 86, 87, 88, 89, -1, -1, -1,
4772 -1, 94, 95, 96, 97, -1, 99, 100, -1, -1,
4773 -1, -1, 127, 106, 129, 130, 131, 132, 133, 134,
4774 135, 136, 137, 138, -1, -1, -1, 120, -1, -1,
4775 123, 146, -1, 126, 127, 128, 129, 130, 131, 132,
4776 133, 134, 135, 136, 137, 138, -1, -1, -1, -1,
4777 -1, 144, 145, 146, 0, -1, 149, 150, 151, -1,
4778 153, -1, 8, 9, 10, -1, -1, 13, 14, 15,
4779 -1, 17, -1, -1, -1, -1, 44, -1, -1, 25,
4780 -1, 27, 28, 29, -1, -1, -1, -1, -1, -1,
4781 -1, 37, 38, -1, 40, 41, 42, 43, 44, -1,
4782 -1, -1, -1, -1, -1, -1, -1, -1, -1, 77,
4783 78, 79, 80, 81, 82, 83, 84, 85, 86, 87,
4784 88, 89, 68, -1, -1, -1, 94, 95, -1, -1,
4785 -1, 77, 78, 79, 80, 81, 82, 83, 84, 85,
4786 86, 87, 88, 89, -1, -1, -1, -1, 94, 95,
4787 96, 97, -1, 99, 100, -1, -1, -1, -1, 127,
4788 106, 129, 130, 131, 132, 133, 134, 135, 136, 137,
4789 138, -1, -1, -1, 120, -1, -1, 123, -1, -1,
4790 126, 127, 128, 129, 130, 131, 132, 133, 134, 135,
4791 136, 137, 138, -1, -1, -1, -1, -1, 144, 145,
4792 146, 0, -1, 149, 150, 151, -1, 153, -1, 8,
4793 9, 10, -1, -1, 13, 14, 15, -1, 17, -1,
4794 -1, -1, -1, 44, -1, -1, 25, 26, 27, 28,
4795 29, -1, -1, -1, -1, -1, -1, -1, 37, 38,
4796 -1, 40, 41, 42, 43, 44, -1, -1, -1, -1,
4797 -1, -1, -1, -1, -1, -1, 77, 78, 79, 80,
4798 81, 82, 83, 84, 85, 86, 87, 88, 89, 68,
4799 -1, -1, -1, 94, 95, -1, -1, -1, 77, 78,
4800 79, 80, 81, 82, 83, 84, 85, 86, 87, 88,
4801 89, -1, -1, -1, -1, 94, 95, 96, 97, -1,
4802 -1, 100, -1, -1, -1, -1, 127, 106, 129, 130,
4803 131, 132, 133, 134, 135, 136, 137, 138, -1, -1,
4804 -1, 120, -1, -1, 123, -1, -1, -1, 127, 128,
4805 129, 130, 131, 132, 133, 134, 135, 136, 137, 138,
4806 -1, -1, -1, -1, 143, 144, 145, 146, 0, -1,
4807 149, 150, 151, -1, 153, -1, 8, 9, 10, -1,
4808 -1, 13, 14, 15, -1, 17, -1, -1, -1, -1,
4809 44, -1, -1, 25, 26, 27, 28, 29, -1, -1,
4810 -1, -1, -1, -1, -1, 37, 38, -1, 40, 41,
4811 42, 43, 44, -1, -1, -1, -1, -1, -1, -1,
4812 -1, -1, -1, 77, 78, 79, 80, 81, 82, 83,
4813 84, 85, 86, 87, 88, 89, 68, -1, -1, -1,
4814 94, 95, -1, -1, -1, 77, 78, 79, 80, 81,
4815 82, 83, 84, 85, 86, 87, 88, 89, -1, -1,
4816 -1, -1, 94, 95, 96, 97, -1, -1, 100, -1,
4817 -1, -1, -1, 127, 106, 129, 130, 131, 132, 133,
4818 134, 135, 136, 137, 138, -1, -1, -1, 120, -1,
4819 -1, 123, -1, -1, -1, 127, 128, 129, 130, 131,
4820 132, 133, 134, 135, 136, 137, 138, -1, -1, -1,
4821 -1, 143, 144, 145, 146, 0, -1, 149, 150, 151,
4822 -1, 153, -1, 8, 9, 10, -1, -1, 13, 14,
4823 15, -1, 17, -1, -1, -1, -1, -1, -1, -1,
4824 25, -1, 27, 28, 29, -1, -1, -1, -1, -1,
4825 -1, -1, 37, 38, -1, 40, 41, 42, 43, 44,
4826 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4827 77, 78, 79, 80, 81, 82, 83, 84, 85, 86,
4828 87, 88, 89, 68, -1, -1, -1, 94, 95, -1,
4829 -1, -1, 77, 78, 79, 80, 81, 82, 83, 84,
4830 85, 86, 87, 88, 89, -1, -1, -1, -1, 94,
4831 95, 96, 97, -1, 99, 100, -1, -1, -1, -1,
4832 127, 106, 129, 130, 131, 132, 133, 134, 135, 136,
4833 137, 138, -1, -1, -1, 120, -1, -1, 123, -1,
4834 -1, 126, 127, 128, 129, 130, 131, 132, 133, 134,
4835 135, 136, 137, 138, -1, -1, -1, -1, -1, 144,
4836 145, 146, 0, -1, 149, 150, 151, -1, 153, -1,
4837 8, 9, 10, -1, -1, 13, 14, 15, -1, 17,
4838 -1, -1, -1, -1, -1, -1, -1, 25, 26, 27,
4839 28, -1, -1, -1, -1, -1, -1, -1, -1, 37,
4840 38, -1, 40, 41, 42, 43, 44, -1, -1, -1,
4841 -1, -1, -1, -1, -1, -1, -1, 77, 78, 79,
4842 80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
4843 68, -1, -1, -1, 94, 95, -1, -1, -1, 77,
4844 78, 79, 80, 81, 82, 83, 84, 85, 86, 87,
4845 88, 89, -1, -1, -1, -1, 94, 95, 96, 97,
4846 -1, -1, 100, -1, -1, -1, -1, -1, 106, 129,
4847 130, 131, 132, 133, 134, 135, 136, 137, 138, -1,
4848 -1, -1, 120, -1, -1, -1, -1, -1, -1, 127,
4849 -1, 129, 130, 131, 132, 133, 134, 135, 136, 137,
4850 138, -1, -1, -1, -1, 143, 144, 145, 146, 0,
4851 148, 149, 150, 151, -1, 153, -1, 8, 9, 10,
4852 -1, -1, 13, 14, 15, -1, 17, -1, -1, -1,
4853 -1, -1, -1, -1, 25, -1, 27, 28, 29, -1,
4854 -1, -1, -1, -1, -1, -1, 37, 38, -1, 40,
4855 41, 42, 43, 44, -1, -1, -1, -1, -1, -1,
4856 -1, -1, -1, -1, 77, 78, 79, 80, 81, 82,
4857 83, -1, -1, 86, 87, -1, -1, 68, -1, -1,
4858 -1, 94, 95, -1, -1, -1, 77, 78, 79, 80,
4859 81, 82, 83, 84, 85, 86, 87, 88, 89, -1,
4860 -1, -1, -1, 94, 95, 96, 97, -1, -1, 100,
4861 -1, -1, -1, -1, -1, 106, 129, 130, 131, 132,
4862 133, 134, 135, 136, 137, 138, -1, -1, -1, 120,
4863 -1, -1, 123, -1, -1, -1, 127, 128, 129, 130,
4864 131, 132, 133, 134, 135, 136, 137, 138, -1, -1,
4865 -1, -1, -1, 144, 145, 146, 0, -1, 149, 150,
4866 151, -1, 153, -1, 8, 9, 10, -1, -1, 13,
4867 14, 15, -1, 17, -1, -1, -1, -1, -1, -1,
4868 -1, 25, 26, 27, 28, -1, -1, -1, -1, -1,
4869 -1, -1, -1, 37, 38, -1, 40, 41, 42, 43,
4870 44, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4871 -1, 77, 78, 79, 80, 81, 82, 83, -1, -1,
4872 86, 87, -1, -1, 68, -1, -1, -1, 94, 95,
4873 -1, -1, -1, 77, 78, 79, 80, 81, 82, 83,
4874 84, 85, 86, 87, 88, 89, -1, -1, -1, -1,
4875 94, 95, 96, 97, -1, -1, 100, -1, -1, -1,
4876 -1, -1, 106, 129, 130, 131, 132, 133, 134, 135,
4877 136, 137, 138, -1, -1, -1, 120, -1, -1, -1,
4878 -1, -1, -1, 127, -1, 129, 130, 131, 132, 133,
4879 134, 135, 136, 137, 138, -1, -1, -1, -1, 143,
4880 144, 145, 146, 0, 148, 149, 150, 151, -1, 153,
4881 -1, 8, 9, 10, -1, -1, 13, 14, 15, -1,
4882 17, -1, -1, -1, -1, -1, -1, -1, 25, -1,
4883 27, 28, -1, -1, -1, -1, -1, -1, -1, -1,
4884 37, 38, -1, 40, 41, 42, 43, 44, -1, -1,
4885 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4886 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4887 -1, 68, -1, -1, -1, -1, -1, -1, -1, -1,
4888 77, 78, 79, 80, 81, 82, 83, 84, 85, 86,
4889 87, 88, 89, -1, -1, -1, -1, 94, 95, 96,
4890 97, -1, -1, 100, -1, -1, -1, -1, -1, 106,
4891 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4892 -1, -1, -1, 120, -1, -1, -1, -1, -1, -1,
4893 127, -1, 129, 130, 131, 132, 133, 134, 135, 136,
4894 137, 138, -1, -1, -1, -1, -1, 144, 145, 146,
4895 0, 148, 149, 150, 151, -1, 153, -1, 8, 9,
4896 10, -1, -1, -1, 14, 15, -1, 17, -1, -1,
4897 -1, -1, -1, -1, -1, 25, 26, -1, -1, -1,
4898 -1, -1, -1, -1, -1, -1, -1, 37, 38, -1,
4899 40, 41, 42, 43, 44, -1, -1, -1, -1, -1,
4900 -1, -1, 77, 78, 79, 80, 81, 82, 83, 84,
4901 85, 86, 87, 88, 89, -1, -1, -1, 68, 94,
4902 95, -1, -1, -1, -1, -1, -1, 77, 78, 79,
4903 80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
4904 -1, -1, -1, -1, 94, 95, 96, 97, -1, 99,
4905 100, -1, 127, -1, 129, 130, 131, 132, 133, 134,
4906 135, 136, 137, 138, -1, -1, -1, -1, -1, -1,
4907 120, -1, -1, -1, -1, -1, 126, 127, 153, 129,
4908 130, 131, 132, 133, 134, 135, 136, 137, 138, -1,
4909 -1, -1, -1, 143, 144, 145, 146, 0, -1, 149,
4910 -1, 151, -1, 153, -1, 8, 9, 10, -1, -1,
4911 -1, 14, 15, -1, 17, -1, -1, -1, -1, -1,
4912 -1, -1, 25, 26, -1, -1, -1, -1, -1, -1,
4913 -1, -1, -1, -1, 37, 38, -1, 40, 41, 42,
4914 43, 44, -1, -1, -1, -1, -1, -1, -1, -1,
4915 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4916 -1, -1, -1, -1, -1, 68, -1, -1, -1, -1,
4917 -1, -1, -1, -1, 77, 78, 79, 80, 81, 82,
4918 83, 84, 85, 86, 87, 88, 89, -1, -1, -1,
4919 -1, 94, 95, 96, 97, -1, 99, 100, -1, -1,
4920 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4921 -1, -1, -1, -1, -1, -1, -1, 120, -1, -1,
4922 -1, -1, -1, 126, 127, -1, 129, 130, 131, 132,
4923 133, 134, 135, 136, 137, 138, -1, -1, -1, -1,
4924 143, 144, 145, 146, 0, -1, 149, -1, 151, -1,
4925 153, -1, 8, 9, 10, -1, -1, -1, 14, 15,
4926 -1, 17, -1, -1, -1, -1, -1, -1, -1, 25,
4927 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4928 -1, 37, 38, -1, 40, 41, 42, 43, 44, -1,
4929 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4930 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4931 -1, -1, 68, -1, -1, -1, -1, -1, -1, -1,
4932 -1, 77, 78, 79, 80, 81, 82, 83, 84, 85,
4933 86, 87, 88, 89, -1, -1, -1, -1, 94, 95,
4934 96, 97, -1, 99, 100, -1, -1, -1, -1, -1,
4935 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4936 -1, -1, -1, -1, 120, -1, -1, -1, -1, -1,
4937 126, 127, -1, 129, 130, 131, 132, 133, 134, 135,
4938 136, 137, 138, -1, -1, -1, -1, -1, 144, 145,
4939 146, 0, -1, 149, -1, 151, -1, 153, -1, 8,
4940 9, 10, -1, -1, -1, 14, 15, -1, 17, -1,
4941 -1, -1, -1, -1, -1, -1, 25, -1, -1, -1,
4942 -1, -1, -1, -1, -1, -1, -1, -1, 37, 38,
4943 -1, 40, 41, 42, 43, 44, -1, -1, -1, -1,
4944 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4945 -1, -1, -1, -1, -1, -1, -1, -1, -1, 68,
4946 -1, -1, -1, -1, -1, -1, -1, -1, 77, 78,
4947 79, 80, 81, 82, 83, 84, 85, 86, 87, 88,
4948 89, -1, -1, -1, -1, 94, 95, 96, 97, -1,
4949 99, 100, -1, -1, -1, -1, -1, -1, -1, -1,
4950 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4951 -1, 120, -1, -1, -1, -1, -1, 126, 127, -1,
4952 129, 130, 131, 132, 133, 134, 135, 136, 137, 138,
4953 -1, -1, -1, -1, -1, 144, 145, 146, -1, -1,
4954 149, -1, 151, 1, 153, 3, 4, 5, 6, 7,
4955 8, 9, 10, 11, 12, -1, -1, 15, 16, -1,
4956 18, 19, 20, 21, 22, 23, 24, -1, -1, -1,
4957 -1, -1, 30, 31, 32, 33, 34, 35, 36, -1,
4958 -1, 39, -1, -1, -1, -1, -1, 45, 46, 47,
4959 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
4960 -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
4961 -1, -1, -1, -1, -1, -1, -1, 75, 76, -1,
4962 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4963 -1, -1, 90, 91, -1, -1, -1, -1, -1, -1,
4964 98, -1, -1, 101, 102, -1, 104, 105, -1, 107,
4965 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
4966 118, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4967 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4968 -1, 139, 140, 141, -1, -1, -1, -1, -1, -1,
4969 -1, -1, -1, 151, 1, 153, 3, 4, 5, 6,
4970 7, -1, -1, 10, 11, 12, -1, 14, 15, 16,
4971 -1, 18, 19, 20, 21, 22, 23, 24, -1, -1,
4972 -1, -1, -1, 30, 31, 32, 33, 34, 35, 36,
4973 -1, -1, 39, -1, -1, -1, -1, -1, 45, 46,
4974 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
4975 57, -1, 59, 60, 61, 62, 63, 64, 65, -1,
4976 -1, -1, -1, -1, -1, -1, -1, -1, 75, 76,
4977 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4978 -1, -1, -1, 90, 91, -1, -1, -1, -1, -1,
4979 -1, 98, -1, -1, 101, 102, -1, 104, 105, -1,
4980 107, -1, -1, 110, 111, 112, 113, 114, 115, 116,
4981 117, 118, -1, -1, -1, -1, -1, -1, -1, -1,
4982 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4983 -1, -1, 139, 140, 141, -1, -1, -1, -1, -1,
4984 -1, -1, -1, -1, 151, 1, 153, 3, 4, 5,
4985 6, 7, -1, -1, 10, 11, 12, -1, -1, 15,
4986 16, 17, 18, 19, 20, 21, 22, 23, 24, -1,
4987 -1, -1, -1, -1, 30, 31, 32, 33, 34, 35,
4988 36, -1, -1, 39, -1, -1, -1, -1, -1, 45,
4989 46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
4990 56, 57, -1, 59, 60, 61, 62, 63, 64, 65,
4991 -1, -1, -1, -1, -1, -1, -1, -1, -1, 75,
4992 76, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4993 -1, -1, -1, -1, 90, 91, -1, -1, -1, -1,
4994 -1, -1, 98, -1, -1, 101, 102, -1, 104, 105,
4995 -1, 107, -1, -1, 110, 111, 112, 113, 114, 115,
4996 116, 117, 118, -1, -1, -1, -1, -1, -1, -1,
4997 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4998 -1, -1, -1, 139, 140, 141, -1, -1, -1, -1,
4999 -1, -1, -1, -1, -1, 151, 1, 153, 3, 4,
5000 5, 6, 7, -1, -1, 10, 11, 12, -1, -1,
5001 15, 16, -1, 18, 19, 20, 21, 22, 23, 24,
5002 25, -1, -1, -1, -1, 30, 31, 32, 33, 34,
5003 35, 36, -1, -1, 39, -1, -1, -1, -1, -1,
5004 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
5005 55, 56, 57, -1, 59, 60, 61, 62, 63, 64,
5006 65, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5007 75, 76, -1, -1, -1, -1, -1, -1, -1, -1,
5008 -1, -1, -1, -1, -1, 90, 91, -1, -1, -1,
5009 -1, -1, -1, 98, -1, -1, 101, 102, -1, 104,
5010 105, -1, 107, -1, -1, 110, 111, 112, 113, 114,
5011 115, 116, 117, 118, -1, -1, -1, -1, -1, -1,
5012 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5013 -1, -1, -1, -1, 139, 140, 141, -1, -1, -1,
5014 -1, -1, -1, -1, -1, -1, 151, 1, 153, 3,
5015 4, 5, 6, 7, -1, -1, 10, 11, 12, -1,
5016 -1, 15, 16, -1, 18, 19, 20, 21, 22, 23,
5017 24, -1, -1, -1, -1, -1, 30, 31, 32, 33,
5018 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
5019 -1, 45, 46, 47, 48, 49, 50, 51, 52, 53,
5020 54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
5021 64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
5022 -1, 75, 76, -1, -1, -1, -1, -1, -1, -1,
5023 -1, -1, -1, -1, -1, -1, 90, 91, -1, -1,
5024 -1, -1, -1, -1, 98, -1, -1, 101, 102, -1,
5025 104, 105, -1, 107, -1, -1, 110, 111, 112, 113,
5026 114, 115, 116, 117, 118, -1, -1, -1, -1, -1,
5027 -1, -1, -1, 1, -1, 3, 4, 5, 6, 7,
5028 -1, 9, 10, 11, 12, 139, 140, 141, 16, -1,
5029 18, 19, 20, 21, 22, 23, 24, 151, -1, 153,
5030 -1, -1, 30, 31, 32, 33, 34, 35, 36, -1,
5031 -1, 39, -1, -1, -1, -1, -1, 45, 46, 47,
5032 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
5033 -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
5034 -1, -1, -1, -1, -1, -1, -1, 75, 76, -1,
5035 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5036 -1, -1, 90, 91, -1, -1, -1, -1, -1, -1,
5037 98, -1, -1, 101, 102, -1, 104, 105, -1, 107,
5038 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
5039 118, -1, -1, -1, -1, -1, -1, -1, -1, 1,
5040 -1, 3, 4, 5, 6, 7, -1, -1, -1, 11,
5041 12, 139, 140, 141, 16, -1, 18, 19, 20, 21,
5042 22, 23, 24, 151, -1, 153, -1, -1, 30, 31,
5043 32, 33, 34, 35, 36, -1, -1, 39, -1, -1,
5044 -1, -1, -1, 45, 46, 47, 48, 49, 50, 51,
5045 52, 53, 54, 55, 56, 57, -1, 59, 60, 61,
5046 62, 63, 64, 65, -1, -1, -1, -1, -1, -1,
5047 -1, -1, -1, 75, 76, -1, -1, -1, -1, -1,
5048 -1, -1, -1, -1, -1, -1, -1, -1, 90, 91,
5049 -1, -1, -1, -1, -1, -1, 98, -1, -1, 101,
5050 102, -1, 104, 105, -1, 107, -1, -1, 110, 111,
5051 112, 113, 114, 115, 116, 117, 118, -1, -1, -1,
5052 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5053 -1, -1, -1, -1, -1, -1, -1, 139, 140, 141,
5054 -1, -1, -1, -1, -1, -1, -1, 149, -1, 151,
5055 1, 153, 3, 4, 5, 6, 7, -1, -1, -1,
5056 11, 12, -1, -1, -1, 16, -1, 18, 19, 20,
5057 21, 22, 23, 24, -1, -1, -1, -1, -1, 30,
5058 31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
5059 -1, -1, -1, -1, 45, 46, 47, 48, 49, 50,
5060 51, 52, 53, 54, 55, 56, 57, -1, 59, 60,
5061 61, 62, 63, 64, 65, -1, -1, -1, -1, -1,
5062 -1, -1, -1, -1, 75, 76, -1, -1, -1, -1,
5063 -1, -1, -1, -1, -1, -1, -1, -1, -1, 90,
5064 91, -1, -1, -1, -1, -1, -1, 98, -1, -1,
5065 101, 102, -1, 104, 105, -1, 107, -1, -1, 110,
5066 111, 112, 113, 114, 115, 116, 117, 118, -1, -1,
5067 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5068 -1, -1, -1, -1, -1, -1, -1, -1, 139, 140,
5069 141, -1, -1, -1, -1, -1, -1, -1, 149, -1,
5070 151, 1, 153, 3, 4, 5, 6, 7, -1, -1,
5071 -1, 11, 12, -1, -1, -1, 16, -1, 18, 19,
5072 20, 21, 22, 23, 24, -1, -1, -1, -1, -1,
5073 30, 31, 32, 33, 34, 35, 36, -1, -1, 39,
5074 -1, -1, -1, -1, -1, 45, 46, 47, 48, 49,
5075 50, 51, 52, 53, 54, 55, 56, 57, -1, 59,
5076 60, 61, 62, 63, 64, 65, -1, -1, -1, -1,
5077 -1, -1, -1, -1, -1, 75, 76, -1, -1, -1,
5078 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5079 90, 91, -1, -1, -1, -1, -1, -1, 98, -1,
5080 -1, 101, 102, -1, 104, 105, -1, 107, -1, -1,
5081 110, 111, 112, 113, 114, 115, 116, 117, 118, -1,
5082 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5083 -1, -1, -1, -1, -1, -1, -1, -1, -1, 139,
5084 140, 141, -1, -1, 144, -1, -1, -1, -1, -1,
5085 -1, 151, 1, 153, 3, 4, 5, 6, 7, -1,
5086 -1, -1, 11, 12, -1, -1, -1, 16, -1, 18,
5087 19, 20, 21, 22, 23, 24, -1, -1, -1, -1,
5088 -1, 30, 31, 32, 33, 34, 35, 36, -1, -1,
5089 39, -1, -1, -1, -1, -1, 45, 46, 47, 48,
5090 49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
5091 59, 60, 61, 62, 63, 64, 65, -1, -1, -1,
5092 -1, -1, -1, -1, -1, -1, 75, 76, -1, -1,
5093 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5094 -1, 90, 91, -1, -1, -1, -1, -1, -1, 98,
5095 -1, -1, 101, 102, -1, 104, 105, -1, 107, -1,
5096 -1, 110, 111, 112, 113, 114, 115, 116, 117, 118,
5097 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5098 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5099 139, 140, 141, -1, -1, 144, -1, -1, -1, -1,
5100 -1, -1, 151, 1, 153, 3, 4, 5, 6, 7,
5101 -1, -1, 10, 11, 12, -1, -1, -1, 16, -1,
5102 18, 19, 20, 21, 22, 23, 24, -1, -1, -1,
5103 -1, -1, 30, 31, 32, 33, 34, 35, 36, -1,
5104 -1, 39, -1, -1, -1, -1, -1, 45, 46, 47,
5105 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
5106 -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
5107 -1, -1, -1, -1, -1, -1, -1, 75, 76, -1,
5108 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5109 -1, -1, 90, 91, -1, -1, -1, -1, -1, -1,
5110 98, -1, -1, 101, 102, -1, 104, 105, -1, 107,
5111 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
5112 118, -1, -1, -1, -1, -1, -1, -1, -1, 1,
5113 -1, 3, 4, 5, 6, 7, -1, -1, -1, 11,
5114 12, 139, 140, 141, 16, -1, 18, 19, 20, 21,
5115 22, 23, 24, 151, -1, 153, -1, -1, 30, 31,
5116 32, 33, 34, 35, 36, -1, -1, 39, -1, -1,
5117 -1, -1, -1, 45, 46, 47, 48, 49, 50, 51,
5118 52, 53, 54, 55, 56, 57, -1, 59, 60, 61,
5119 62, 63, 64, 65, -1, -1, -1, -1, -1, -1,
5120 -1, -1, -1, 75, 76, -1, -1, -1, -1, -1,
5121 -1, -1, -1, -1, -1, -1, -1, -1, 90, 91,
5122 -1, -1, -1, -1, -1, -1, 98, -1, -1, 101,
5123 102, -1, 104, 105, -1, 107, -1, -1, 110, 111,
5124 112, 113, 114, 115, 116, 117, 118, -1, 120, -1,
5125 -1, -1, -1, -1, -1, -1, -1, 3, 4, 5,
5126 -1, 7, -1, -1, -1, 11, 12, 139, 140, 141,
5127 16, -1, 18, 19, 20, 21, 22, 23, 24, 151,
5128 -1, 153, -1, -1, 30, 31, 32, 33, 34, 35,
5129 36, -1, -1, 39, -1, -1, -1, -1, -1, -1,
5130 46, -1, -1, 49, 50, 51, 52, 53, 54, 55,
5131 56, 57, 58, 59, 60, 61, 62, 63, 64, 65,
5132 -1, -1, -1, -1, -1, -1, -1, -1, -1, 75,
5133 76, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5134 -1, -1, -1, -1, 90, 91, -1, -1, -1, -1,
5135 -1, -1, 98, -1, -1, 101, 102, -1, 104, 105,
5136 -1, 107, 108, 109, 110, 111, 112, 113, 114, 115,
5137 116, 117, 118, -1, -1, -1, -1, -1, -1, -1,
5138 -1, -1, -1, 3, 4, 5, -1, 7, -1, -1,
5139 -1, 11, 12, 139, 140, 141, 16, -1, 18, 19,
5140 20, 21, 22, 23, 24, -1, -1, 153, -1, -1,
5141 30, 31, 32, 33, 34, 35, 36, -1, -1, 39,
5142 -1, -1, -1, -1, -1, -1, 46, -1, -1, 49,
5143 50, 51, 52, 53, 54, 55, 56, 57, -1, 59,
5144 60, 61, 62, 63, 64, 65, -1, -1, -1, -1,
5145 -1, -1, -1, -1, -1, 75, 76, -1, -1, -1,
5146 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5147 90, 91, -1, -1, -1, -1, -1, -1, 98, -1,
5148 -1, 101, 102, -1, 104, 105, -1, -1, -1, -1,
5149 110, 111, 112, 113, 114, 115, 116, 117, 118, -1,
5150 -1, -1, -1, -1, -1, -1, -1, -1, -1, 3,
5151 4, 5, -1, 7, -1, -1, -1, 11, 12, 139,
5152 140, 141, 16, -1, 18, 19, 20, 21, 22, 23,
5153 24, 151, -1, 153, -1, -1, 30, 31, 32, 33,
5154 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
5155 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53,
5156 54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
5157 64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
5158 -1, 75, 76, -1, -1, -1, -1, -1, -1, -1,
5159 -1, -1, -1, -1, -1, -1, 90, 91, -1, -1,
5160 -1, -1, -1, -1, 98, -1, -1, 101, 102, -1,
5161 104, 105, -1, -1, -1, -1, 110, 111, 112, 113,
5162 114, 115, 116, 117, 118, -1, -1, -1, -1, -1,
5163 -1, -1, -1, -1, -1, 3, 4, 5, 6, 7,
5164 -1, -1, -1, 11, 12, 139, 140, 141, 16, -1,
5165 18, 19, 20, 21, 22, 23, 24, -1, -1, 153,
5166 -1, -1, 30, 31, 32, 33, 34, 35, 36, -1,
5167 -1, 39, -1, -1, -1, -1, -1, 45, 46, 47,
5168 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
5169 -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
5170 -1, -1, -1, -1, -1, -1, -1, 75, 76, -1,
5171 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5172 -1, -1, 90, 91, -1, -1, -1, -1, -1, -1,
5173 98, -1, -1, 101, 102, -1, 104, 105, -1, 107,
5174 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
5175 118, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5176 -1, 3, 4, 5, 6, 7, -1, -1, -1, 11,
5177 12, 139, 140, 141, 16, -1, 18, 19, 20, 21,
5178 22, 23, 24, 151, -1, -1, -1, -1, 30, 31,
5179 32, 33, 34, 35, 36, -1, -1, 39, -1, -1,
5180 -1, -1, -1, 45, 46, 47, 48, 49, 50, 51,
5181 52, 53, 54, 55, 56, 57, -1, 59, 60, 61,
5182 62, 63, 64, 65, -1, -1, -1, -1, -1, -1,
5183 -1, -1, -1, 75, 76, -1, -1, -1, -1, -1,
5184 -1, -1, -1, -1, -1, -1, -1, -1, 90, 91,
5185 -1, -1, -1, -1, -1, -1, 98, -1, -1, 101,
5186 102, -1, 104, 105, -1, 107, -1, -1, 110, 111,
5187 112, 113, 114, 115, 116, 117, 118, -1, -1, -1,
5188 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5189 -1, -1, -1, -1, -1, -1, -1, 139, 140, 141,
5190 -1, -1, -1, -1, -1, -1, -1, -1, -1, 151,
5191 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
5192 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
5193 23, 24, 25, 26, -1, -1, -1, 30, 31, 32,
5194 33, 34, 35, 36, 37, 38, 39, -1, -1, -1,
5195 -1, -1, 45, 46, 47, 48, 49, 50, 51, 52,
5196 53, 54, 55, 56, 57, -1, -1, -1, -1, -1,
5197 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5198 -1, -1, 75, 76, 77, 78, 79, 80, 81, 82,
5199 83, -1, -1, 86, 87, -1, -1, -1, -1, 92,
5200 93, 94, 95, -1, -1, -1, -1, -1, -1, -1,
5201 -1, -1, -1, -1, 107, 108, -1, -1, -1, -1,
5202 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5203 -1, -1, -1, -1, -1, -1, 129, 130, 131, 132,
5204 133, 134, 135, 136, 137, 138, -1, 140, 141, -1,
5205 -1, -1, -1, -1, 147, 148, 3, 4, 5, 6,
5206 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
5207 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
5208 -1, -1, -1, 30, 31, 32, 33, 34, 35, 36,
5209 37, 38, 39, -1, -1, -1, -1, -1, 45, 46,
5210 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
5211 57, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5212 -1, -1, -1, -1, -1, -1, -1, -1, 75, 76,
5213 77, 78, 79, 80, 81, 82, 83, -1, -1, 86,
5214 87, -1, -1, -1, -1, 92, 93, 94, 95, -1,
5215 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5216 107, 108, -1, -1, -1, -1, -1, -1, -1, -1,
5217 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5218 -1, -1, 129, 130, 131, 132, 133, 134, 135, 136,
5219 137, 138, -1, 140, 141, -1, -1, -1, -1, -1,
5220 147, 3, 4, 5, 6, 7, 8, 9, 10, 11,
5221 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
5222 22, 23, 24, 25, 26, -1, -1, -1, 30, 31,
5223 32, 33, 34, 35, 36, 37, 38, 39, -1, -1,
5224 -1, -1, -1, 45, 46, 47, 48, 49, 50, 51,
5225 52, 53, 54, -1, 56, -1, -1, -1, -1, -1,
5226 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5227 -1, -1, -1, 75, 76, 77, 78, 79, 80, 81,
5228 82, 83, -1, -1, 86, 87, -1, -1, -1, -1,
5229 92, 93, 94, 95, -1, -1, -1, -1, -1, -1,
5230 -1, -1, -1, -1, -1, 107, 108, -1, -1, 111,
5231 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5232 -1, -1, -1, -1, -1, -1, -1, 129, 130, 131,
5233 132, 133, 134, 135, 136, 137, 138, -1, 140, 141,
5234 -1, -1, -1, -1, -1, 147, 3, 4, 5, 6,
5235 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
5236 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
5237 -1, -1, -1, 30, 31, 32, 33, 34, 35, 36,
5238 37, 38, 39, -1, -1, -1, -1, -1, 45, 46,
5239 47, 48, 49, 50, 51, 52, 53, -1, -1, 56,
5240 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5241 -1, -1, -1, -1, -1, -1, -1, -1, 75, 76,
5242 77, 78, 79, 80, 81, 82, 83, -1, -1, 86,
5243 87, -1, -1, -1, -1, 92, 93, 94, 95, -1,
5244 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5245 107, 108, -1, -1, 111, -1, -1, -1, -1, -1,
5246 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5247 -1, -1, 129, 130, 131, 132, 133, 134, 135, 136,
5248 137, 138, -1, 140, 141, -1, -1, -1, -1, -1,
5249 147, 3, 4, 5, 6, 7, 8, 9, 10, 11,
5250 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
5251 22, 23, 24, 25, 26, -1, -1, -1, 30, 31,
5252 32, 33, 34, 35, 36, 37, 38, 39, -1, -1,
5253 -1, -1, -1, 45, 46, 47, 48, 49, 50, 51,
5254 52, 53, -1, -1, 56, -1, -1, -1, -1, -1,
5255 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5256 -1, -1, -1, 75, 76, 77, 78, 79, 80, 81,
5257 82, 83, -1, -1, 86, 87, -1, -1, -1, -1,
5258 92, 93, 94, 95, -1, -1, -1, -1, -1, -1,
5259 -1, -1, -1, -1, -1, 107, 108, -1, -1, -1,
5260 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5261 -1, -1, -1, -1, -1, -1, -1, 129, 130, 131,
5262 132, 133, 134, 135, 136, 137, 138, -1, 140, 141,
5263 3, 4, 5, -1, 7, 147, -1, -1, 11, 12,
5264 -1, -1, -1, 16, -1, 18, 19, 20, 21, 22,
5265 23, 24, -1, -1, -1, -1, -1, 30, 31, 32,
5266 33, 34, 35, 36, -1, -1, 39, -1, -1, -1,
5267 -1, -1, -1, 46, -1, -1, 49, 50, 51, 52,
5268 53, 54, 55, 56, 57, -1, 59, 60, 61, 62,
5269 63, 64, 65, -1, -1, -1, -1, -1, -1, -1,
5270 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5271 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5272 -1, -1, -1, -1, -1, 98, -1, -1, 101, 102,
5273 -1, 104, 105, -1, -1, -1, -1, 110, 111, 112,
5274 113, 114, 115, 116, 117, 118, -1, -1, -1, -1,
5275 -1, -1, -1, -1, -1, -1, -1, -1, -1, 3,
5276 4, 5, -1, 7, -1, -1, 139, 11, 12, -1,
5277 -1, -1, 16, 146, 18, 19, 20, 21, 22, 23,
5278 24, -1, -1, -1, -1, -1, 30, 31, 32, 33,
5279 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
5280 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53,
5281 54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
5282 64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
5283 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5284 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5285 -1, -1, -1, -1, 98, -1, -1, 101, 102, -1,
5286 104, 105, -1, -1, -1, -1, 110, 111, 112, 113,
5287 114, 115, 116, 117, 118, -1, -1, -1, -1, -1,
5288 -1, -1, -1, -1, -1, -1, -1, -1, 3, 4,
5289 5, 6, 7, -1, -1, 139, 11, 12, -1, -1,
5290 -1, 16, 146, 18, 19, 20, 21, 22, 23, 24,
5291 -1, -1, -1, -1, -1, 30, 31, 32, 33, 34,
5292 35, 36, -1, -1, 39, -1, -1, -1, -1, -1,
5293 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
5294 55, 56, 57, -1, 59, 60, 61, 62, 63, 64,
5295 65, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5296 75, 76, -1, -1, -1, -1, -1, -1, -1, -1,
5297 -1, -1, -1, -1, -1, 90, 91, -1, -1, -1,
5298 -1, -1, -1, 98, -1, -1, 101, 102, -1, 104,
5299 105, -1, 107, -1, -1, 110, 111, 112, 113, 114,
5300 115, 116, 117, 118, -1, -1, -1, -1, -1, -1,
5301 -1, -1, -1, -1, 3, 4, 5, -1, 7, -1,
5302 -1, -1, 11, 12, 139, 140, 141, 16, -1, 18,
5303 19, 20, 21, 22, 23, 24, -1, -1, -1, -1,
5304 -1, 30, 31, 32, 33, 34, 35, 36, -1, -1,
5305 39, -1, -1, -1, -1, -1, -1, 46, -1, -1,
5306 49, 50, 51, 52, 53, 54, 55, 56, 57, 58,
5307 59, 60, 61, 62, 63, 64, 65, -1, -1, -1,
5308 -1, -1, -1, -1, -1, -1, 75, 76, -1, -1,
5309 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5310 -1, 90, 91, -1, -1, -1, -1, -1, -1, 98,
5311 -1, -1, 101, 102, -1, 104, 105, -1, 107, 108,
5312 109, 110, 111, 112, 113, 114, 115, 116, 117, 118,
5313 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5314 3, 4, 5, 6, 7, -1, -1, -1, 11, 12,
5315 139, 140, 141, 16, -1, 18, 19, 20, 21, 22,
5316 23, 24, -1, -1, -1, -1, -1, 30, 31, 32,
5317 33, 34, 35, 36, -1, -1, 39, -1, -1, -1,
5318 -1, -1, 45, 46, -1, 48, 49, 50, 51, 52,
5319 53, 54, 55, 56, 57, -1, 59, 60, 61, 62,
5320 63, 64, 65, -1, -1, -1, -1, -1, -1, -1,
5321 -1, -1, 75, 76, -1, -1, -1, -1, -1, -1,
5322 -1, -1, -1, -1, -1, -1, -1, 90, 91, -1,
5323 -1, -1, -1, -1, -1, 98, -1, -1, 101, 102,
5324 -1, 104, 105, -1, 107, -1, -1, 110, 111, 112,
5325 113, 114, 115, 116, 117, 118, -1, -1, -1, -1,
5326 -1, -1, -1, -1, -1, -1, 3, 4, 5, -1,
5327 7, -1, -1, -1, 11, 12, 139, 140, 141, 16,
5328 -1, 18, 19, 20, 21, 22, 23, 24, -1, -1,
5329 -1, -1, -1, 30, 31, 32, 33, 34, 35, 36,
5330 -1, -1, 39, -1, -1, -1, -1, -1, -1, 46,
5331 -1, -1, 49, 50, 51, 52, 53, 54, 55, 56,
5332 57, 58, 59, 60, 61, 62, 63, 64, 65, -1,
5333 -1, -1, -1, -1, -1, -1, -1, -1, 75, 76,
5334 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5335 -1, -1, -1, 90, 91, -1, -1, -1, -1, -1,
5336 -1, 98, -1, -1, 101, 102, -1, 104, 105, -1,
5337 107, 108, 109, 110, 111, 112, 113, 114, 115, 116,
5338 117, 118, -1, -1, -1, -1, -1, -1, -1, -1,
5339 -1, -1, 3, 4, 5, -1, 7, -1, -1, -1,
5340 11, 12, 139, 140, 141, 16, -1, 18, 19, 20,
5341 21, 22, 23, 24, -1, -1, -1, -1, -1, 30,
5342 31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
5343 -1, -1, -1, -1, -1, 46, -1, -1, 49, 50,
5344 51, 52, 53, 54, 55, 56, 57, 58, 59, 60,
5345 61, 62, 63, 64, 65, -1, -1, -1, -1, -1,
5346 -1, -1, -1, -1, 75, 76, -1, -1, -1, -1,
5347 -1, -1, -1, -1, -1, -1, -1, -1, -1, 90,
5348 91, -1, -1, -1, -1, -1, -1, 98, -1, -1,
5349 101, 102, -1, 104, 105, -1, 107, 108, 109, 110,
5350 111, 112, 113, 114, 115, 116, 117, 118, -1, -1,
5351 -1, -1, -1, -1, -1, -1, -1, -1, 3, 4,
5352 5, -1, 7, -1, -1, -1, 11, 12, 139, 140,
5353 141, 16, -1, 18, 19, 20, 21, 22, 23, 24,
5354 -1, -1, -1, -1, -1, 30, 31, 32, 33, 34,
5355 35, 36, -1, -1, 39, -1, -1, -1, -1, -1,
5356 -1, 46, -1, -1, 49, 50, 51, 52, 53, 54,
5357 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
5358 65, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5359 75, 76, -1, -1, -1, -1, -1, -1, -1, -1,
5360 -1, -1, -1, -1, -1, 90, 91, -1, -1, -1,
5361 -1, -1, -1, 98, -1, -1, 101, 102, -1, 104,
5362 105, -1, 107, 108, 109, 110, 111, 112, 113, 114,
5363 115, 116, 117, 118, -1, -1, -1, -1, -1, -1,
5364 -1, -1, -1, -1, 3, 4, 5, -1, 7, -1,
5365 -1, -1, 11, 12, 139, 140, 141, 16, -1, 18,
5366 19, 20, 21, 22, 23, 24, -1, -1, -1, -1,
5367 -1, 30, 31, 32, 33, 34, 35, 36, -1, -1,
5368 39, -1, -1, -1, -1, -1, -1, 46, -1, -1,
5369 49, 50, 51, 52, 53, 54, 55, 56, 57, 58,
5370 59, 60, 61, 62, 63, 64, 65, -1, -1, -1,
5371 -1, -1, -1, -1, -1, -1, 75, 76, -1, -1,
5372 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5373 -1, 90, 91, -1, -1, -1, -1, -1, -1, 98,
5374 -1, -1, 101, 102, -1, 104, 105, -1, 107, 108,
5375 -1, 110, 111, 112, 113, 114, 115, 116, 117, 118,
5376 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5377 3, 4, 5, -1, 7, -1, -1, -1, 11, 12,
5378 139, 140, 141, 16, -1, 18, 19, 20, 21, 22,
5379 23, 24, -1, -1, -1, -1, -1, 30, 31, 32,
5380 33, 34, 35, 36, -1, -1, 39, -1, -1, -1,
5381 -1, -1, -1, 46, -1, -1, 49, 50, 51, 52,
5382 53, 54, 55, 56, 57, 58, 59, 60, 61, 62,
5383 63, 64, 65, -1, -1, -1, -1, -1, -1, -1,
5384 -1, -1, 75, 76, -1, -1, -1, -1, -1, -1,
5385 -1, -1, -1, -1, -1, -1, -1, 90, 91, -1,
5386 -1, -1, -1, -1, -1, 98, -1, -1, 101, 102,
5387 -1, 104, 105, -1, -1, 108, 109, 110, 111, 112,
5388 113, 114, 115, 116, 117, 118, -1, -1, -1, -1,
5389 -1, -1, -1, -1, -1, -1, 3, 4, 5, -1,
5390 7, -1, -1, -1, 11, 12, 139, 140, 141, 16,
5391 -1, 18, 19, 20, 21, 22, 23, 24, -1, -1,
5392 -1, -1, -1, 30, 31, 32, 33, 34, 35, 36,
5393 -1, -1, 39, -1, -1, -1, -1, -1, -1, 46,
5394 -1, -1, 49, 50, 51, 52, 53, 54, 55, 56,
5395 57, 58, 59, 60, 61, 62, 63, 64, 65, -1,
5396 -1, -1, -1, -1, -1, -1, -1, -1, 75, 76,
5397 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5398 -1, -1, -1, 90, 91, -1, -1, -1, -1, -1,
5399 -1, 98, -1, -1, 101, 102, -1, 104, 105, -1,
5400 107, 108, -1, 110, 111, 112, 113, 114, 115, 116,
5401 117, 118, -1, -1, -1, -1, -1, -1, -1, -1,
5402 -1, -1, 3, 4, 5, -1, 7, -1, -1, -1,
5403 11, 12, 139, 140, 141, 16, -1, 18, 19, 20,
5404 21, 22, 23, 24, -1, -1, -1, -1, -1, 30,
5405 31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
5406 -1, -1, -1, -1, -1, 46, -1, -1, 49, 50,
5407 51, 52, 53, 54, 55, 56, 57, 58, 59, 60,
5408 61, 62, 63, 64, 65, -1, -1, -1, -1, -1,
5409 -1, -1, -1, -1, 75, 76, -1, -1, -1, -1,
5410 -1, -1, -1, -1, -1, -1, -1, -1, -1, 90,
5411 91, -1, -1, -1, -1, -1, -1, 98, -1, -1,
5412 101, 102, -1, 104, 105, -1, -1, 108, -1, 110,
5413 111, 112, 113, 114, 115, 116, 117, 118, -1, -1,
5414 -1, -1, -1, -1, -1, -1, -1, -1, 3, 4,
5415 5, -1, 7, -1, -1, -1, 11, 12, 139, 140,
5416 141, 16, -1, 18, 19, 20, 21, 22, 23, 24,
5417 -1, -1, -1, -1, -1, 30, 31, 32, 33, 34,
5418 35, 36, -1, -1, 39, -1, -1, -1, -1, -1,
5419 -1, 46, -1, -1, 49, 50, 51, 52, 53, 54,
5420 55, 56, 57, -1, 59, 60, 61, 62, 63, 64,
5421 65, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5422 75, 76, -1, -1, -1, -1, -1, -1, -1, -1,
5423 -1, -1, -1, -1, -1, 90, 91, -1, -1, -1,
5424 -1, -1, -1, 98, -1, -1, 101, 102, -1, 104,
5425 105, -1, 107, -1, -1, 110, 111, 112, 113, 114,
5426 115, 116, 117, 118, -1, -1, -1, -1, -1, -1,
5427 -1, -1, -1, -1, 3, 4, 5, -1, 7, -1,
5428 -1, -1, 11, 12, 139, 140, 141, 16, -1, 18,
5429 19, 20, 21, 22, 23, 24, -1, -1, -1, -1,
5430 -1, 30, 31, 32, 33, 34, 35, 36, -1, -1,
5431 39, -1, -1, -1, -1, -1, -1, 46, -1, -1,
5432 49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
5433 59, 60, 61, 62, 63, 64, 65, -1, -1, -1,
5434 -1, -1, -1, -1, -1, -1, 75, 76, -1, -1,
5435 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5436 -1, 90, 91, -1, -1, -1, -1, -1, -1, 98,
5437 -1, -1, 101, 102, -1, 104, 105, -1, 107, -1,
5438 -1, 110, 111, 112, 113, 114, 115, 116, 117, 118,
5439 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5440 3, 4, 5, -1, 7, -1, -1, -1, 11, 12,
5441 139, 140, 141, 16, -1, 18, 19, 20, 21, 22,
5442 23, 24, -1, -1, -1, -1, -1, 30, 31, 32,
5443 33, 34, 35, 36, -1, -1, 39, -1, -1, -1,
5444 -1, -1, -1, 46, -1, -1, 49, 50, 51, 52,
5445 53, 54, 55, 56, 57, -1, 59, 60, 61, 62,
5446 63, 64, 65, -1, -1, -1, -1, -1, -1, -1,
5447 -1, -1, 75, 76, -1, -1, -1, -1, -1, -1,
5448 -1, -1, -1, -1, -1, -1, -1, 90, 91, -1,
5449 -1, -1, -1, -1, -1, 98, -1, -1, 101, 102,
5450 -1, 104, 105, -1, 107, -1, -1, 110, 111, 112,
5451 113, 114, 115, 116, 117, 118, -1, -1, -1, -1,
5452 -1, -1, -1, -1, -1, -1, 3, 4, 5, -1,
5453 7, -1, -1, -1, 11, 12, 139, 140, 141, 16,
5454 -1, 18, 19, 20, 21, 22, 23, 24, -1, -1,
5455 -1, -1, -1, 30, 31, 32, 33, 34, 35, 36,
5456 -1, -1, 39, -1, -1, -1, -1, -1, -1, 46,
5457 -1, -1, 49, 50, 51, 52, 53, 54, 55, 56,
5458 57, -1, 59, 60, 61, 62, 63, 64, 65, -1,
5459 -1, -1, -1, -1, -1, -1, -1, -1, 75, 76,
5460 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5461 -1, -1, -1, 90, 91, -1, -1, -1, -1, -1,
5462 -1, 98, -1, -1, 101, 102, -1, 104, 105, -1,
5463 107, -1, -1, 110, 111, 112, 113, 114, 115, 116,
5464 117, 118, -1, -1, -1, -1, -1, -1, -1, -1,
5465 -1, -1, 3, 4, 5, -1, 7, -1, -1, -1,
5466 11, 12, 139, 140, 141, 16, -1, 18, 19, 20,
5467 21, 22, 23, 24, -1, -1, -1, -1, -1, 30,
5468 31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
5469 -1, -1, -1, -1, -1, 46, -1, -1, 49, 50,
5470 51, 52, 53, 54, 55, 56, 57, -1, 59, 60,
5471 61, 62, 63, 64, 65, -1, -1, -1, -1, -1,
5472 -1, -1, -1, -1, 75, 76, -1, -1, -1, -1,
5473 -1, -1, -1, -1, -1, -1, -1, -1, -1, 90,
5474 91, -1, -1, -1, -1, -1, -1, 98, -1, -1,
5475 101, 102, -1, 104, 105, -1, 107, -1, -1, 110,
5476 111, 112, 113, 114, 115, 116, 117, 118, -1, -1,
5477 -1, -1, -1, -1, -1, -1, -1, -1, 3, 4,
5478 5, -1, 7, -1, -1, -1, 11, 12, 139, 140,
5479 141, 16, -1, 18, 19, 20, 21, 22, 23, 24,
5480 -1, -1, -1, -1, -1, 30, 31, 32, 33, 34,
5481 35, 36, -1, -1, 39, -1, -1, -1, -1, -1,
5482 -1, 46, -1, -1, 49, 50, 51, 52, 53, 54,
5483 55, 56, 57, -1, 59, 60, 61, 62, 63, 64,
5484 65, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5485 75, 76, -1, -1, -1, -1, -1, -1, -1, -1,
5486 -1, -1, -1, -1, -1, 90, 91, -1, -1, -1,
5487 -1, -1, -1, 98, -1, -1, 101, 102, -1, 104,
5488 105, -1, -1, -1, -1, 110, 111, 112, 113, 114,
5489 115, 116, 117, 118, -1, -1, -1, -1, -1, -1,
5490 -1, -1, -1, -1, 3, 4, 5, -1, 7, -1,
5491 -1, -1, 11, 12, 139, 140, 141, 16, -1, 18,
5492 19, 20, 21, 22, 23, 24, -1, -1, -1, -1,
5493 -1, 30, 31, 32, 33, 34, 35, 36, -1, -1,
5494 39, -1, -1, -1, -1, -1, -1, 46, -1, -1,
5495 49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
5496 59, 60, 61, 62, 63, 64, 65, -1, -1, -1,
5497 -1, -1, -1, -1, -1, -1, 75, 76, -1, -1,
5498 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5499 -1, 90, 91, -1, -1, -1, -1, -1, -1, 98,
5500 -1, -1, 101, 102, -1, 104, 105, -1, -1, -1,
5501 -1, 110, 111, 112, 113, 114, 115, 116, 117, 118,
5502 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5503 3, 4, 5, -1, 7, -1, -1, -1, 11, 12,
5504 139, 140, 141, 16, -1, 18, 19, 20, 21, 22,
5505 23, 24, -1, -1, -1, -1, -1, 30, 31, 32,
5506 33, 34, 35, 36, -1, -1, 39, -1, -1, -1,
5507 -1, -1, -1, 46, -1, -1, 49, 50, 51, 52,
5508 53, 54, 55, 56, 57, -1, 59, 60, 61, 62,
5509 63, 64, 65, -1, -1, -1, -1, -1, -1, -1,
5510 -1, -1, 75, 76, -1, -1, -1, -1, -1, -1,
5511 -1, -1, -1, -1, -1, -1, -1, 90, 91, -1,
5512 -1, -1, -1, -1, -1, 98, -1, -1, 101, 102,
5513 -1, 104, 105, -1, -1, -1, -1, 110, 111, 112,
5514 113, 114, 115, 116, 117, 118, -1, -1, -1, -1,
5515 -1, -1, -1, -1, -1, -1, 3, 4, 5, -1,
5516 7, -1, -1, -1, 11, 12, 139, 140, 141, 16,
5517 -1, 18, 19, 20, 21, 22, 23, 24, -1, -1,
5518 -1, -1, -1, 30, 31, 32, 33, 34, 35, 36,
5519 -1, -1, 39, -1, -1, -1, -1, -1, -1, 46,
5520 -1, -1, 49, 50, 51, 52, 53, 54, 55, 56,
5521 57, -1, 59, 60, 61, 62, 63, 64, 65, -1,
5522 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5523 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5524 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5525 -1, 98, -1, -1, 101, 102, -1, 104, 105, -1,
5526 107, -1, -1, 110, 111, 112, 113, 114, 115, 116,
5527 117, 118, -1, -1, -1, -1, -1, -1, 3, 4,
5528 5, -1, 7, -1, -1, -1, 11, 12, -1, -1,
5529 -1, 16, 139, 18, 19, 20, 21, 22, 23, 24,
5530 -1, -1, -1, -1, -1, 30, 31, 32, 33, 34,
5531 35, 36, -1, -1, 39, -1, -1, -1, -1, -1,
5532 -1, 46, -1, -1, 49, 50, 51, 52, 53, 54,
5533 55, 56, 57, -1, 59, 60, 61, 62, 63, 64,
5534 65, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5535 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5536 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5537 -1, -1, -1, 98, -1, -1, 101, 102, -1, 104,
5538 105, -1, 107, -1, -1, 110, 111, 112, 113, 114,
5539 115, 116, 117, 118, -1, -1, -1, -1, -1, -1,
5540 3, 4, 5, -1, 7, -1, -1, -1, 11, 12,
5541 -1, -1, -1, 16, 139, 18, 19, 20, 21, 22,
5542 23, 24, -1, -1, -1, -1, -1, 30, 31, 32,
5543 33, 34, 35, 36, -1, -1, 39, -1, -1, -1,
5544 -1, -1, -1, 46, -1, -1, 49, 50, 51, 52,
5545 53, 54, 55, 56, 57, -1, 59, 60, 61, 62,
5546 63, 64, 65, -1, -1, -1, -1, -1, -1, -1,
5547 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5548 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5549 -1, 94, -1, -1, -1, 98, -1, -1, 101, 102,
5550 -1, 104, 105, -1, -1, -1, -1, 110, 111, 112,
5551 113, 114, 115, 116, 117, 118, -1, -1, -1, -1,
5552 -1, -1, 3, 4, 5, -1, 7, -1, -1, -1,
5553 11, 12, -1, -1, -1, 16, 139, 18, 19, 20,
5554 21, 22, 23, 24, -1, -1, -1, -1, -1, 30,
5555 31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
5556 -1, -1, -1, -1, -1, 46, -1, -1, 49, 50,
5557 51, 52, 53, 54, 55, 56, 57, -1, 59, 60,
5558 61, 62, 63, 64, 65, -1, -1, -1, -1, -1,
5559 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5560 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5561 -1, -1, -1, -1, -1, -1, -1, 98, -1, -1,
5562 101, 102, -1, 104, 105, -1, -1, -1, -1, 110,
5563 111, 112, 113, 114, 115, 116, 117, 118, -1, -1,
5564 -1, -1, -1, -1, 3, 4, 5, -1, 7, -1,
5565 -1, -1, 11, 12, -1, -1, -1, 16, 139, 18,
5566 19, 20, 21, 22, 23, 24, -1, -1, -1, -1,
5567 -1, 30, 31, 32, 33, 34, 35, 36, -1, -1,
5568 39, -1, -1, -1, -1, -1, -1, 46, -1, -1,
5569 49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
5570 59, 60, 61, 62, 63, 64, 65, -1, -1, -1,
5571 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5572 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5573 -1, -1, -1, -1, -1, -1, -1, -1, -1, 98,
5574 -1, -1, 101, 102, -1, 104, 105, -1, -1, -1,
5575 -1, 110, 111, 112, 113, 114, 115, 116, 117, 118,
5576 -1, -1, -1, -1, -1, -1, 3, 4, 5, -1,
5577 7, -1, -1, -1, 11, 12, -1, -1, -1, 16,
5578 139, 18, 19, 20, 21, 22, 23, 24, -1, -1,
5579 -1, -1, -1, 30, 31, 32, 33, 34, 35, 36,
5580 -1, -1, 39, -1, -1, -1, -1, -1, -1, 46,
5581 -1, -1, 49, 50, 51, 52, 53, 54, 55, 56,
5582 57, -1, 59, 60, 61, 62, 63, 64, 65, -1,
5583 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5584 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5585 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5586 -1, 98, -1, -1, 101, 102, -1, 104, 105, -1,
5587 -1, -1, -1, 110, 111, 112, 113, 114, 115, 116,
5588 117, 118, -1, -1, -1, -1, -1, -1, 3, 4,
5589 5, -1, 7, -1, -1, -1, 11, 12, -1, -1,
5590 -1, 16, 139, 18, 19, 20, 21, 22, 23, 24,
5591 -1, -1, -1, -1, -1, 30, 31, 32, 33, 34,
5592 35, 36, -1, -1, 39, -1, -1, -1, -1, -1,
5593 -1, 46, -1, -1, 49, 50, 51, 52, 53, 54,
5594 55, 56, 57, -1, 59, 60, 61, 62, 63, 64,
5595 65, 33, 34, 35, 36, -1, -1, -1, -1, -1,
5596 -1, -1, -1, -1, -1, -1, -1, 49, 50, 51,
5597 52, -1, -1, -1, 56, -1, -1, 59, 60, 61,
5598 62, 63, -1, 98, -1, -1, 101, 102, -1, 104,
5599 105, -1, -1, -1, -1, 110, 111, 112, 113, 114,
5600 115, 116, 117, 118, -1, -1, -1, -1, 90, 91,
5601 -1, -1, -1, -1, -1, -1, 98, -1, -1, 101,
5602 -1, -1, 104, 105, 139, 107, -1, -1, 110, 111,
5603 112, 113, 114, 115, 116, 117, 118, 33, 34, 35,
5604 36, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5605 132, -1, -1, 49, 50, 51, 52, 139, -1, -1,
5606 56, -1, -1, 59, 60, 61, 62, 63, -1, -1,
5607 33, 34, 35, 36, -1, -1, -1, -1, -1, -1,
5608 -1, -1, -1, -1, -1, -1, 49, 50, 51, 52,
5609 -1, -1, -1, 56, 90, 91, 59, 60, 61, 62,
5610 63, -1, 98, -1, -1, 101, -1, -1, 104, 105,
5611 -1, 107, -1, -1, 110, 111, 112, 113, 114, 115,
5612 116, 117, 118, -1, -1, -1, -1, 90, 91, -1,
5613 -1, -1, -1, -1, -1, 98, 132, -1, 101, -1,
5614 -1, 104, 105, 139, -1, -1, -1, 110, 111, 112,
5615 113, 114, 115, 116, 117, 118, 52, 53, -1, -1,
5616 56, -1, -1, -1, -1, -1, -1, -1, -1, 132,
5617 -1, -1, -1, -1, -1, -1, 139, -1, -1, 75,
5618 76, 77, 78, 79, 80, 81, 82, 83, -1, -1,
5619 86, 87, -1, -1, -1, -1, 92, 93, 94, 95,
5620 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5621 -1, 107, 108, -1, -1, -1, -1, -1, -1, -1,
5622 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5623 -1, -1, -1, 129, 130, 131, 132, 133, 134, 135,
5624 136, 137, 138, -1, 140, 141, 52, 53, -1, -1,
5625 56, 147, 148, -1, -1, -1, -1, -1, -1, -1,
5626 -1, -1, -1, -1, -1, -1, -1, -1, -1, 75,
5627 76, 77, 78, 79, 80, 81, 82, 83, -1, -1,
5628 86, 87, -1, -1, -1, -1, 92, 93, 94, 95,
5629 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5630 -1, 107, 108, -1, -1, -1, -1, -1, -1, -1,
5631 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5632 -1, -1, -1, 129, 130, 131, 132, 133, 134, 135,
5633 136, 137, 138, -1, 140, 141, 52, 53, -1, -1,
5634 56, 147, 148, -1, -1, -1, -1, -1, -1, -1,
5635 -1, -1, -1, -1, -1, -1, -1, -1, -1, 75,
5636 76, 77, 78, 79, 80, 81, 82, 83, -1, -1,
5637 86, 87, -1, -1, -1, -1, 92, 93, 94, 95,
5638 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5639 -1, 107, 108, -1, -1, -1, -1, -1, -1, -1,
5640 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5641 -1, -1, -1, 129, 130, 131, 132, 133, 134, 135,
5642 136, 137, 138, -1, 140, 141, 52, 53, -1, -1,
5643 56, 147, 148, -1, -1, -1, -1, -1, -1, -1,
5644 -1, -1, -1, -1, -1, -1, -1, -1, -1, 75,
5645 76, 77, 78, 79, 80, 81, 82, 83, -1, -1,
5646 86, 87, -1, -1, -1, -1, 92, 93, 94, 95,
5647 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5648 -1, 107, 108, -1, -1, -1, -1, -1, -1, -1,
5649 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5650 -1, -1, -1, 129, 130, 131, 132, 133, 134, 135,
5651 136, 137, 138, -1, 140, 141, 52, 53, -1, -1,
5652 56, 147, 148, -1, -1, -1, -1, -1, -1, -1,
5653 -1, -1, -1, -1, -1, -1, -1, -1, -1, 75,
5654 76, 77, 78, 79, 80, 81, 82, 83, -1, -1,
5655 86, 87, -1, -1, -1, -1, 92, 93, 94, 95,
5656 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5657 -1, 107, 108, -1, -1, -1, -1, -1, -1, -1,
5658 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5659 -1, -1, -1, 129, 130, 131, 132, 133, 134, 135,
5660 136, 137, 138, -1, 140, 141, 52, 53, -1, -1,
5661 56, 147, 148, -1, -1, -1, -1, -1, -1, -1,
5662 -1, -1, -1, -1, -1, -1, -1, -1, -1, 75,
5663 76, 77, 78, 79, 80, 81, 82, 83, -1, -1,
5664 86, 87, -1, -1, -1, -1, 92, 93, 94, 95,
5665 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5666 -1, 107, 108, -1, -1, -1, -1, -1, -1, -1,
5667 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5668 -1, -1, -1, 129, 130, 131, 132, 133, 134, 135,
5669 136, 137, 138, -1, 140, 141, 52, 53, -1, -1,
5670 56, 147, 148, -1, -1, -1, -1, -1, -1, -1,
5671 -1, -1, -1, -1, -1, -1, -1, -1, -1, 75,
5672 76, 77, 78, 79, 80, 81, 82, 83, -1, -1,
5673 86, 87, -1, -1, -1, -1, 92, 93, 94, 95,
5674 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5675 -1, 107, 108, -1, -1, -1, -1, -1, -1, -1,
5676 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5677 -1, -1, -1, 129, 130, 131, 132, 133, 134, 135,
5678 136, 137, 138, -1, 140, 141, 52, 53, -1, -1,
5679 56, 147, 148, -1, -1, -1, -1, -1, -1, -1,
5680 -1, -1, -1, -1, -1, -1, -1, -1, -1, 75,
5681 76, 77, 78, 79, 80, 81, 82, 83, -1, -1,
5682 86, 87, -1, -1, -1, -1, 92, 93, 94, 95,
5683 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5684 -1, 107, 108, -1, -1, -1, -1, -1, -1, -1,
5685 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5686 -1, -1, -1, 129, 130, 131, 132, 133, 134, 135,
5687 136, 137, 138, -1, 140, 141, 52, 53, -1, -1,
5688 56, 147, 148, -1, -1, -1, -1, -1, -1, -1,
5689 -1, -1, -1, -1, -1, -1, -1, -1, -1, 75,
5690 76, 77, 78, 79, 80, 81, 82, 83, -1, -1,
5691 86, 87, -1, -1, -1, -1, 92, 93, 94, 95,
5692 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5693 -1, 107, 108, -1, -1, -1, -1, -1, -1, -1,
5694 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5695 -1, -1, -1, 129, 130, 131, 132, 133, 134, 135,
5696 136, 137, 138, -1, 140, 141, 52, 53, -1, -1,
5697 56, 147, 148, -1, -1, -1, -1, -1, -1, -1,
5698 -1, -1, -1, -1, -1, -1, -1, -1, -1, 75,
5699 76, 77, 78, 79, 80, 81, 82, 83, -1, -1,
5700 86, 87, -1, -1, -1, -1, 92, 93, 94, 95,
5701 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5702 -1, 107, 108, -1, -1, -1, -1, -1, -1, -1,
5703 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5704 -1, -1, -1, 129, 130, 131, 132, 133, 134, 135,
5705 136, 137, 138, -1, 140, 141, 52, 53, -1, -1,
5706 56, 147, 148, -1, -1, -1, -1, -1, -1, -1,
5707 -1, -1, -1, -1, -1, -1, -1, -1, -1, 75,
5708 76, 77, 78, 79, 80, 81, 82, 83, -1, -1,
5709 86, 87, -1, -1, -1, -1, 92, 93, 94, 95,
5710 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5711 -1, 107, 108, -1, -1, -1, -1, -1, -1, -1,
5712 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5713 -1, -1, -1, 129, 130, 131, 132, 133, 134, 135,
5714 136, 137, 138, -1, 140, 141, 52, 53, -1, -1,
5715 56, 147, 148, -1, -1, -1, -1, -1, -1, -1,
5716 -1, -1, -1, -1, -1, -1, -1, -1, -1, 75,
5717 76, 77, 78, 79, 80, 81, 82, 83, -1, -1,
5718 86, 87, -1, -1, -1, -1, 92, 93, 94, 95,
5719 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5720 -1, 107, 108, -1, -1, -1, -1, -1, -1, -1,
5721 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5722 -1, -1, -1, 129, 130, 131, 132, 133, 134, 135,
5723 136, 137, 138, -1, 140, 141, 52, 53, -1, -1,
5724 56, 147, 148, -1, -1, -1, -1, -1, -1, -1,
5725 -1, -1, -1, -1, -1, -1, -1, -1, -1, 75,
5726 76, 77, 78, 79, 80, 81, 82, 83, -1, -1,
5727 86, 87, -1, -1, -1, -1, 92, 93, 94, 95,
5728 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5729 -1, 107, 108, -1, -1, -1, -1, -1, -1, -1,
5730 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5731 -1, -1, -1, 129, 130, 131, 132, 133, 134, 135,
5732 136, 137, 138, -1, 140, 141, 52, 53, -1, -1,
5733 56, 147, 148, -1, -1, -1, -1, -1, -1, -1,
5734 -1, -1, -1, -1, -1, -1, -1, -1, -1, 75,
5735 76, 77, 78, 79, 80, 81, 82, 83, -1, -1,
5736 86, 87, -1, -1, -1, -1, 92, 93, 94, 95,
5737 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5738 -1, 107, 108, -1, -1, -1, -1, -1, -1, -1,
5739 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5740 -1, -1, -1, 129, 130, 131, 132, 133, 134, 135,
5741 136, 137, 138, -1, 140, 141, 52, 53, -1, -1,
5742 56, 147, 148, -1, -1, -1, -1, -1, -1, -1,
5743 -1, -1, -1, -1, -1, -1, -1, -1, -1, 75,
5744 76, 77, 78, 79, 80, 81, 82, 83, -1, -1,
5745 86, 87, -1, -1, -1, -1, 92, 93, 94, 95,
5746 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5747 -1, 107, 108, -1, -1, -1, -1, -1, -1, -1,
5748 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5749 -1, -1, -1, 129, 130, 131, 132, 133, 134, 135,
5750 136, 137, 138, -1, 140, 141, 52, 53, -1, -1,
5751 56, 147, 148, -1, -1, -1, -1, -1, -1, -1,
5752 -1, -1, -1, -1, -1, -1, -1, -1, -1, 75,
5753 76, 77, 78, 79, 80, 81, 82, 83, -1, -1,
5754 86, 87, -1, -1, -1, -1, 92, 93, 94, 95,
5755 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5756 -1, 107, 108, -1, -1, -1, -1, -1, -1, -1,
5757 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
5758 -1, -1, -1, 129, 130, 131, 132, 133, 134, 135,
5759 136, 137, 138, -1, 140, 141, -1, -1, -1, -1,
5760 -1, 147
5761};
5762
5763/* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of
5764 state STATE-NUM. */
5765static const yytype_int16 yystos[] =
5766{
5767 0, 155, 156, 0, 1, 3, 4, 5, 6, 7,
5768 11, 12, 16, 18, 19, 20, 21, 22, 23, 24,
5769 30, 31, 32, 33, 34, 35, 36, 39, 45, 46,
5770 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
5771 57, 59, 60, 61, 62, 63, 64, 65, 75, 76,
5772 90, 91, 98, 101, 102, 104, 105, 107, 110, 111,
5773 112, 113, 114, 115, 116, 117, 118, 139, 140, 141,
5774 157, 158, 159, 167, 169, 171, 177, 178, 184, 185,
5775 187, 188, 189, 191, 192, 193, 195, 196, 205, 208,
5776 224, 234, 235, 236, 237, 238, 239, 240, 241, 242,
5777 243, 244, 253, 275, 283, 284, 336, 337, 338, 339,
5778 340, 341, 342, 345, 347, 348, 362, 363, 365, 366,
5779 367, 369, 370, 371, 372, 373, 411, 425, 159, 3,
5780 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
5781 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
5782 24, 25, 26, 30, 31, 32, 33, 34, 35, 36,
5783 37, 38, 39, 45, 46, 47, 48, 49, 50, 51,
5784 52, 53, 56, 75, 76, 77, 78, 79, 80, 81,
5785 82, 83, 86, 87, 92, 93, 94, 95, 107, 108,
5786 129, 130, 131, 132, 133, 134, 135, 136, 137, 138,
5787 140, 141, 147, 199, 200, 201, 203, 204, 362, 39,
5788 58, 98, 101, 107, 108, 109, 112, 140, 177, 178,
5789 188, 196, 205, 210, 216, 219, 221, 234, 369, 370,
5790 372, 373, 409, 410, 216, 148, 217, 218, 148, 213,
5791 217, 148, 153, 418, 54, 200, 418, 143, 160, 143,
5792 21, 22, 31, 32, 187, 205, 234, 253, 205, 205,
5793 205, 56, 1, 47, 101, 163, 164, 165, 167, 190,
5794 191, 425, 167, 226, 211, 221, 409, 425, 210, 408,
5795 409, 425, 46, 98, 139, 146, 177, 178, 195, 224,
5796 234, 369, 370, 373, 276, 54, 55, 57, 199, 351,
5797 364, 351, 352, 353, 152, 152, 152, 152, 367, 184,
5798 205, 205, 151, 153, 417, 423, 424, 40, 41, 42,
5799 43, 44, 37, 38, 148, 376, 377, 378, 379, 425,
5800 376, 378, 26, 143, 213, 217, 245, 285, 28, 246,
5801 282, 126, 146, 101, 107, 192, 126, 25, 77, 78,
5802 79, 80, 81, 82, 83, 84, 85, 86, 87, 88,
5803 89, 94, 95, 100, 127, 129, 130, 131, 132, 133,
5804 134, 135, 136, 137, 138, 207, 207, 68, 96, 97,
5805 145, 415, 225, 171, 180, 180, 181, 182, 181, 180,
5806 417, 424, 98, 189, 196, 234, 258, 369, 370, 373,
5807 52, 56, 94, 98, 197, 198, 234, 369, 370, 373,
5808 198, 33, 34, 35, 36, 49, 50, 51, 52, 56,
5809 148, 176, 199, 371, 406, 216, 97, 415, 416, 285,
5810 339, 99, 99, 146, 210, 56, 210, 210, 210, 351,
5811 376, 376, 126, 100, 146, 220, 425, 97, 145, 415,
5812 99, 99, 146, 220, 216, 418, 419, 216, 91, 215,
5813 216, 221, 383, 409, 425, 171, 419, 171, 54, 64,
5814 65, 168, 148, 206, 157, 163, 97, 415, 99, 167,
5815 166, 190, 149, 417, 424, 419, 227, 419, 150, 146,
5816 153, 422, 146, 422, 144, 422, 418, 56, 367, 192,
5817 194, 377, 146, 97, 145, 415, 277, 66, 119, 121,
5818 122, 354, 119, 119, 354, 67, 354, 343, 349, 346,
5819 350, 77, 151, 159, 180, 180, 180, 180, 167, 171,
5820 171, 52, 54, 55, 56, 57, 58, 77, 91, 101,
5821 107, 108, 109, 133, 136, 263, 380, 382, 383, 384,
5822 385, 386, 387, 388, 389, 390, 393, 394, 395, 396,
5823 397, 400, 401, 402, 403, 404, 126, 161, 163, 382,
5824 126, 161, 286, 287, 106, 186, 290, 291, 290, 70,
5825 209, 425, 190, 146, 195, 146, 209, 174, 205, 205,
5826 205, 205, 205, 205, 205, 205, 205, 205, 205, 205,
5827 205, 172, 205, 205, 205, 205, 205, 205, 205, 205,
5828 205, 205, 205, 52, 53, 56, 203, 213, 412, 413,
5829 215, 221, 52, 53, 56, 203, 213, 412, 161, 13,
5830 254, 423, 254, 163, 180, 163, 417, 230, 56, 97,
5831 145, 415, 25, 171, 52, 56, 197, 130, 374, 97,
5832 145, 415, 233, 407, 68, 97, 414, 52, 56, 412,
5833 209, 209, 202, 124, 126, 126, 209, 210, 107, 210,
5834 219, 409, 52, 56, 215, 52, 56, 209, 209, 410,
5835 419, 149, 419, 146, 419, 146, 419, 200, 228, 205,
5836 144, 144, 412, 412, 209, 160, 419, 165, 419, 409,
5837 146, 194, 52, 56, 215, 52, 56, 278, 356, 355,
5838 119, 344, 354, 66, 119, 119, 344, 66, 119, 205,
5839 101, 107, 259, 260, 261, 262, 385, 146, 405, 425,
5840 419, 264, 265, 146, 381, 210, 146, 405, 34, 52,
5841 146, 381, 52, 146, 381, 52, 188, 205, 10, 252,
5842 8, 247, 332, 425, 423, 188, 205, 252, 144, 288,
5843 286, 252, 292, 252, 107, 184, 210, 221, 222, 223,
5844 419, 194, 146, 169, 170, 184, 196, 205, 210, 212,
5845 223, 234, 373, 175, 173, 418, 99, 99, 213, 217,
5846 418, 420, 146, 99, 99, 213, 214, 217, 425, 252,
5847 163, 13, 163, 252, 27, 255, 423, 252, 25, 229,
5848 297, 17, 249, 295, 52, 56, 215, 52, 56, 181,
5849 232, 375, 231, 52, 56, 197, 215, 161, 171, 179,
5850 214, 217, 170, 205, 212, 170, 212, 200, 210, 210,
5851 220, 99, 99, 420, 99, 99, 383, 409, 171, 212,
5852 422, 192, 420, 148, 280, 382, 357, 54, 55, 57,
5853 361, 373, 152, 354, 152, 152, 152, 261, 385, 146,
5854 419, 146, 404, 210, 126, 380, 387, 400, 402, 390,
5855 394, 396, 388, 397, 402, 386, 388, 44, 44, 210,
5856 223, 333, 425, 9, 15, 248, 250, 335, 425, 44,
5857 44, 289, 144, 293, 210, 146, 44, 194, 44, 126,
5858 44, 97, 145, 415, 52, 56, 58, 90, 91, 98,
5859 101, 104, 105, 107, 112, 132, 275, 303, 304, 305,
5860 306, 309, 314, 315, 316, 319, 320, 321, 322, 323,
5861 324, 325, 326, 327, 328, 329, 330, 331, 336, 337,
5862 340, 341, 342, 345, 347, 348, 370, 394, 303, 128,
5863 209, 209, 186, 150, 99, 209, 209, 186, 14, 250,
5864 251, 256, 257, 425, 257, 183, 298, 295, 252, 107,
5865 210, 294, 252, 420, 163, 423, 180, 161, 420, 252,
5866 419, 176, 285, 282, 209, 209, 99, 209, 209, 419,
5867 146, 419, 382, 279, 358, 419, 259, 262, 260, 146,
5868 381, 146, 381, 405, 146, 381, 146, 381, 381, 205,
5869 205, 100, 334, 425, 163, 162, 205, 205, 131, 270,
5870 271, 425, 270, 107, 210, 167, 167, 209, 205, 52,
5871 56, 215, 52, 56, 327, 327, 56, 197, 311, 304,
5872 312, 313, 314, 315, 318, 420, 310, 418, 421, 52,
5873 351, 52, 54, 55, 57, 101, 368, 100, 146, 131,
5874 146, 146, 304, 88, 89, 97, 145, 148, 307, 308,
5875 34, 52, 205, 170, 212, 170, 212, 209, 170, 212,
5876 170, 212, 163, 180, 252, 252, 299, 252, 210, 146,
5877 254, 252, 161, 423, 252, 209, 272, 418, 29, 123,
5878 281, 359, 146, 146, 388, 402, 388, 388, 98, 196,
5879 234, 369, 370, 373, 254, 163, 263, 266, 269, 272,
5880 386, 388, 389, 391, 392, 398, 399, 402, 404, 163,
5881 161, 210, 420, 304, 420, 107, 304, 318, 420, 146,
5882 112, 319, 144, 124, 180, 328, 312, 316, 309, 317,
5883 318, 321, 325, 327, 327, 197, 420, 419, 312, 315,
5884 319, 312, 315, 319, 170, 212, 254, 302, 303, 107,
5885 210, 163, 252, 149, 151, 161, 163, 360, 260, 381,
5886 146, 381, 381, 381, 56, 97, 145, 415, 163, 335,
5887 405, 272, 131, 264, 146, 267, 268, 98, 234, 146,
5888 405, 146, 267, 146, 267, 419, 52, 146, 146, 351,
5889 421, 149, 146, 146, 419, 419, 419, 420, 420, 420,
5890 163, 254, 40, 41, 210, 257, 295, 296, 52, 273,
5891 274, 384, 252, 144, 163, 388, 52, 56, 215, 52,
5892 56, 332, 131, 234, 266, 399, 402, 56, 97, 391,
5893 396, 388, 398, 402, 388, 146, 317, 317, 316, 318,
5894 256, 300, 180, 180, 146, 418, 120, 381, 420, 146,
5895 267, 146, 267, 52, 56, 405, 146, 267, 146, 267,
5896 267, 317, 146, 163, 274, 388, 402, 388, 388, 257,
5897 297, 301, 267, 146, 267, 267, 267, 388, 267
5898};
5899
5900/* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */
5901static const yytype_int16 yyr1[] =
5902{
5903 0, 154, 156, 155, 157, 158, 158, 158, 158, 159,
5904 159, 160, 162, 161, 161, 163, 164, 164, 164, 164,
5905 165, 166, 165, 168, 167, 167, 167, 167, 167, 167,
5906 167, 167, 167, 167, 167, 167, 167, 167, 167, 167,
5907 167, 169, 169, 169, 169, 169, 169, 169, 169, 169,
5908 169, 169, 169, 170, 170, 170, 171, 171, 171, 171,
5909 171, 172, 173, 171, 174, 175, 171, 171, 176, 177,
5910 179, 178, 180, 182, 183, 181, 184, 184, 185, 185,
5911 186, 187, 188, 188, 188, 188, 188, 188, 188, 188,
5912 188, 188, 188, 189, 189, 190, 190, 191, 191, 191,
5913 191, 191, 191, 191, 191, 191, 191, 192, 192, 193,
5914 193, 194, 194, 195, 195, 195, 195, 195, 195, 195,
5915 195, 195, 196, 196, 196, 196, 196, 196, 196, 196,
5916 196, 197, 197, 198, 198, 198, 199, 199, 199, 199,
5917 199, 200, 200, 201, 202, 201, 203, 203, 203, 203,
5918 203, 203, 203, 203, 203, 203, 203, 203, 203, 203,
5919 203, 203, 203, 203, 203, 203, 203, 203, 203, 203,
5920 203, 203, 203, 203, 203, 203, 204, 204, 204, 204,
5921 204, 204, 204, 204, 204, 204, 204, 204, 204, 204,
5922 204, 204, 204, 204, 204, 204, 204, 204, 204, 204,
5923 204, 204, 204, 204, 204, 204, 204, 204, 204, 204,
5924 204, 204, 204, 204, 204, 204, 204, 205, 205, 205,
5925 205, 205, 205, 205, 205, 205, 205, 205, 205, 205,
5926 205, 205, 205, 205, 205, 205, 205, 205, 205, 205,
5927 205, 205, 205, 205, 205, 205, 205, 205, 205, 205,
5928 205, 205, 205, 205, 205, 205, 205, 206, 205, 205,
5929 205, 205, 205, 205, 205, 207, 207, 207, 207, 208,
5930 208, 209, 209, 210, 211, 211, 211, 211, 212, 212,
5931 213, 213, 213, 214, 214, 215, 215, 215, 215, 215,
5932 216, 216, 216, 216, 216, 218, 217, 219, 219, 220,
5933 220, 221, 221, 221, 221, 222, 222, 223, 223, 223,
5934 224, 224, 224, 224, 224, 224, 224, 224, 224, 224,
5935 224, 225, 224, 226, 224, 227, 224, 224, 224, 224,
5936 224, 224, 224, 224, 224, 224, 228, 224, 224, 224,
5937 224, 224, 224, 224, 224, 224, 224, 224, 229, 224,
5938 230, 224, 224, 224, 231, 224, 232, 224, 233, 224,
5939 224, 224, 224, 224, 224, 224, 234, 235, 236, 237,
5940 238, 239, 240, 241, 242, 243, 244, 245, 246, 247,
5941 248, 249, 250, 251, 252, 253, 254, 254, 254, 255,
5942 255, 256, 256, 257, 257, 258, 258, 259, 259, 260,
5943 260, 261, 261, 261, 261, 261, 262, 262, 263, 263,
5944 265, 264, 266, 266, 266, 266, 267, 267, 268, 269,
5945 269, 269, 269, 269, 269, 269, 269, 269, 269, 269,
5946 269, 269, 269, 269, 270, 270, 271, 271, 272, 272,
5947 273, 273, 274, 274, 276, 277, 278, 279, 275, 280,
5948 280, 281, 281, 282, 283, 283, 283, 283, 284, 284,
5949 284, 284, 284, 284, 284, 284, 284, 285, 285, 287,
5950 288, 289, 286, 291, 292, 293, 290, 294, 294, 294,
5951 294, 295, 296, 296, 298, 299, 300, 297, 301, 301,
5952 302, 302, 302, 303, 303, 303, 303, 303, 303, 304,
5953 305, 305, 306, 306, 307, 308, 309, 309, 309, 309,
5954 309, 309, 309, 309, 309, 309, 309, 309, 309, 310,
5955 309, 309, 311, 309, 312, 312, 312, 312, 312, 312,
5956 312, 312, 313, 313, 314, 314, 315, 316, 316, 317,
5957 317, 318, 319, 319, 319, 319, 320, 320, 321, 321,
5958 322, 322, 323, 323, 324, 325, 325, 326, 326, 326,
5959 326, 326, 326, 326, 326, 326, 326, 327, 327, 327,
5960 327, 327, 327, 327, 327, 327, 327, 328, 329, 329,
5961 330, 331, 331, 331, 332, 332, 333, 333, 333, 334,
5962 334, 335, 335, 336, 336, 337, 338, 338, 338, 339,
5963 340, 341, 342, 343, 343, 344, 344, 345, 346, 346,
5964 347, 348, 349, 349, 350, 350, 351, 351, 352, 352,
5965 353, 353, 354, 355, 354, 356, 357, 358, 359, 360,
5966 354, 361, 361, 361, 361, 362, 362, 363, 364, 364,
5967 364, 364, 365, 366, 366, 367, 367, 367, 367, 368,
5968 368, 368, 369, 369, 369, 369, 369, 370, 370, 370,
5969 370, 370, 370, 370, 371, 371, 372, 372, 373, 373,
5970 375, 374, 374, 376, 376, 377, 378, 379, 378, 380,
5971 380, 380, 380, 380, 381, 381, 382, 382, 382, 382,
5972 382, 382, 382, 382, 382, 382, 382, 382, 382, 382,
5973 382, 383, 384, 384, 384, 384, 385, 385, 386, 387,
5974 387, 388, 388, 389, 390, 390, 391, 391, 392, 392,
5975 393, 393, 394, 394, 395, 396, 396, 397, 398, 399,
5976 399, 400, 400, 401, 401, 402, 402, 403, 403, 404,
5977 404, 405, 405, 406, 407, 406, 408, 408, 409, 409,
5978 410, 410, 410, 410, 410, 411, 411, 411, 412, 412,
5979 412, 412, 413, 413, 413, 414, 414, 415, 415, 416,
5980 416, 417, 417, 418, 418, 419, 420, 421, 422, 422,
5981 422, 423, 423, 424, 424, 425
5982};
5983
5984/* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. */
5985static const yytype_int8 yyr2[] =
5986{
5987 0, 2, 0, 2, 2, 1, 1, 3, 2, 1,
5988 2, 3, 0, 6, 3, 2, 1, 1, 3, 2,
5989 1, 0, 3, 0, 4, 3, 3, 3, 2, 3,
5990 3, 3, 3, 3, 4, 1, 4, 4, 6, 4,
5991 1, 4, 4, 7, 6, 6, 6, 6, 4, 6,
5992 4, 6, 4, 1, 3, 1, 1, 3, 3, 3,
5993 2, 0, 0, 5, 0, 0, 5, 1, 1, 2,
5994 0, 5, 1, 0, 0, 4, 1, 1, 1, 4,
5995 3, 1, 2, 3, 4, 5, 4, 5, 2, 2,
5996 2, 2, 2, 1, 3, 1, 3, 1, 2, 3,
5997 5, 2, 4, 2, 4, 1, 3, 1, 3, 2,
5998 3, 1, 3, 1, 1, 4, 3, 3, 3, 3,
5999 2, 1, 1, 1, 4, 3, 3, 3, 3, 2,
6000 1, 1, 1, 2, 1, 3, 1, 1, 1, 1,
6001 1, 1, 1, 1, 0, 4, 1, 1, 1, 1,
6002 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
6003 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
6004 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
6005 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
6006 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
6007 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
6008 1, 1, 1, 1, 1, 1, 1, 4, 4, 7,
6009 6, 6, 6, 6, 5, 4, 3, 3, 2, 2,
6010 2, 2, 3, 3, 3, 3, 3, 3, 4, 2,
6011 2, 3, 3, 3, 3, 1, 3, 3, 3, 3,
6012 3, 2, 2, 3, 3, 3, 3, 0, 4, 6,
6013 4, 6, 4, 6, 1, 1, 1, 1, 1, 3,
6014 3, 1, 1, 1, 1, 2, 4, 2, 1, 3,
6015 3, 5, 3, 1, 1, 1, 1, 2, 4, 2,
6016 1, 2, 2, 4, 1, 0, 2, 2, 1, 2,
6017 1, 1, 2, 3, 4, 1, 1, 3, 4, 2,
6018 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
6019 1, 0, 4, 0, 3, 0, 4, 3, 3, 2,
6020 3, 3, 1, 4, 3, 1, 0, 6, 4, 3,
6021 2, 1, 2, 1, 6, 6, 4, 4, 0, 6,
6022 0, 5, 5, 6, 0, 6, 0, 7, 0, 5,
6023 4, 4, 1, 1, 1, 1, 1, 1, 1, 1,
6024 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
6025 1, 1, 1, 1, 1, 1, 1, 1, 2, 1,
6026 1, 1, 5, 1, 2, 1, 1, 1, 3, 1,
6027 3, 1, 3, 5, 1, 3, 2, 1, 1, 1,
6028 0, 2, 4, 2, 2, 1, 2, 0, 1, 6,
6029 8, 4, 6, 4, 2, 6, 2, 4, 6, 2,
6030 4, 2, 4, 1, 1, 1, 3, 4, 1, 4,
6031 1, 3, 1, 1, 0, 0, 0, 0, 7, 4,
6032 1, 3, 3, 3, 2, 4, 5, 5, 2, 4,
6033 4, 3, 3, 3, 2, 1, 4, 3, 3, 0,
6034 0, 0, 5, 0, 0, 0, 5, 1, 2, 3,
6035 4, 5, 1, 1, 0, 0, 0, 8, 1, 1,
6036 1, 3, 3, 1, 2, 3, 1, 1, 1, 1,
6037 3, 1, 3, 1, 1, 1, 1, 1, 4, 4,
6038 4, 3, 4, 4, 4, 3, 3, 3, 2, 0,
6039 4, 2, 0, 4, 1, 1, 2, 3, 5, 2,
6040 4, 1, 2, 3, 1, 3, 5, 2, 1, 1,
6041 3, 1, 3, 1, 2, 1, 1, 3, 2, 1,
6042 1, 3, 2, 1, 2, 1, 1, 1, 3, 3,
6043 2, 2, 1, 1, 1, 2, 2, 1, 1, 1,
6044 1, 1, 1, 1, 1, 1, 1, 1, 2, 2,
6045 4, 2, 3, 1, 6, 1, 1, 1, 1, 2,
6046 1, 2, 1, 1, 1, 1, 1, 1, 2, 3,
6047 3, 3, 4, 0, 3, 1, 2, 4, 0, 3,
6048 4, 4, 0, 3, 0, 3, 0, 2, 0, 2,
6049 0, 2, 1, 0, 3, 0, 0, 0, 0, 0,
6050 8, 1, 1, 1, 1, 1, 1, 2, 1, 1,
6051 1, 1, 3, 1, 2, 1, 1, 1, 1, 1,
6052 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
6053 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
6054 0, 4, 0, 1, 1, 3, 1, 0, 3, 4,
6055 2, 2, 1, 1, 2, 0, 6, 8, 4, 6,
6056 4, 6, 2, 4, 6, 2, 4, 2, 4, 1,
6057 0, 1, 1, 1, 1, 1, 1, 1, 1, 1,
6058 3, 1, 3, 1, 2, 1, 2, 1, 1, 3,
6059 1, 3, 1, 1, 2, 2, 1, 3, 3, 1,
6060 3, 1, 3, 1, 1, 2, 1, 1, 1, 2,
6061 1, 2, 1, 1, 0, 4, 1, 2, 1, 3,
6062 3, 2, 1, 4, 2, 1, 1, 1, 1, 1,
6063 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
6064 1, 0, 1, 0, 1, 2, 2, 2, 0, 1,
6065 1, 1, 1, 1, 2, 0
6066};
6067
6068
6069enum { YYENOMEM = -2 };
6070
6071#define yyerrok (yyerrstatus = 0)
6072#define yyclearin (yychar = YYEMPTY)
6073
6074#define YYACCEPT goto yyacceptlab
6075#define YYABORT goto yyabortlab
6076#define YYERROR goto yyerrorlab
6077#define YYNOMEM goto yyexhaustedlab
6078
6079
6080#define YYRECOVERING() (!!yyerrstatus)
6081
6082#define YYBACKUP(Token, Value) \
6083 do \
6084 if (yychar == YYEMPTY) \
6085 { \
6086 yychar = (Token); \
6087 yylval = (Value); \
6088 YYPOPSTACK (yylen); \
6089 yystate = *yyssp; \
6090 goto yybackup; \
6091 } \
6092 else \
6093 { \
6094 yyerror (&yylloc, p, YY_("syntax error: cannot back up")); \
6095 YYERROR; \
6096 } \
6097 while (0)
6098
6099/* Backward compatibility with an undocumented macro.
6100 Use YYerror or YYUNDEF. */
6101#define YYERRCODE YYUNDEF
6102
6103/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
6104 If N is 0, then set CURRENT to the empty location which ends
6105 the previous symbol: RHS[0] (always defined). */
6106
6107#ifndef YYLLOC_DEFAULT
6108# define YYLLOC_DEFAULT(Current, Rhs, N) \
6109 do \
6110 if (N) \
6111 { \
6112 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
6113 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
6114 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
6115 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
6116 } \
6117 else \
6118 { \
6119 (Current).first_line = (Current).last_line = \
6120 YYRHSLOC (Rhs, 0).last_line; \
6121 (Current).first_column = (Current).last_column = \
6122 YYRHSLOC (Rhs, 0).last_column; \
6123 } \
6124 while (0)
6125#endif
6126
6127#define YYRHSLOC(Rhs, K) ((Rhs)[K])
6128
6129
6130/* Enable debugging if requested. */
6131#if YYDEBUG
6132
6133# ifndef YYFPRINTF
6134# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
6135# define YYFPRINTF fprintf
6136# endif
6137
6138# define YYDPRINTF(Args) \
6139do { \
6140 if (yydebug) \
6141 YYFPRINTF Args; \
6142} while (0)
6143
6144
6145/* YYLOCATION_PRINT -- Print the location on the stream.
6146 This macro was not mandated originally: define only if we know
6147 we won't break user code: when these are the locations we know. */
6148
6149# ifndef YYLOCATION_PRINT
6150
6151# if defined YY_LOCATION_PRINT
6152
6153 /* Temporary convenience wrapper in case some people defined the
6154 undocumented and private YY_LOCATION_PRINT macros. */
6155# define YYLOCATION_PRINT(File, Loc) YY_LOCATION_PRINT(File, *(Loc))
6156
6157# elif defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
6158
6159/* Print *YYLOCP on YYO. Private, do not rely on its existence. */
6160
6161YY_ATTRIBUTE_UNUSED
6162static int
6163yy_location_print_ (FILE *yyo, YYLTYPE const * const yylocp)
6164{
6165 int res = 0;
6166 int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0;
6167 if (0 <= yylocp->first_line)
6168 {
6169 res += YYFPRINTF (p, "%d", yylocp->first_line);
6170 if (0 <= yylocp->first_column)
6171 res += YYFPRINTF (p, ".%d", yylocp->first_column);
6172 }
6173 if (0 <= yylocp->last_line)
6174 {
6175 if (yylocp->first_line < yylocp->last_line)
6176 {
6177 res += YYFPRINTF (p, "-%d", yylocp->last_line);
6178 if (0 <= end_col)
6179 res += YYFPRINTF (p, ".%d", end_col);
6180 }
6181 else if (0 <= end_col && yylocp->first_column < end_col)
6182 res += YYFPRINTF (p, "-%d", end_col);
6183 }
6184 return res;
6185}
6186
6187# define YYLOCATION_PRINT yy_location_print_
6188
6189 /* Temporary convenience wrapper in case some people defined the
6190 undocumented and private YY_LOCATION_PRINT macros. */
6191# define YY_LOCATION_PRINT(File, Loc) YYLOCATION_PRINT(File, &(Loc))
6192
6193# else
6194
6195# define YYLOCATION_PRINT(File, Loc) ((void) 0)
6196 /* Temporary convenience wrapper in case some people defined the
6197 undocumented and private YY_LOCATION_PRINT macros. */
6198# define YY_LOCATION_PRINT YYLOCATION_PRINT
6199
6200# endif
6201# endif /* !defined YYLOCATION_PRINT */
6202
6203
6204# define YY_SYMBOL_PRINT(Title, Kind, Value, Location) \
6205do { \
6206 if (yydebug) \
6207 { \
6208 YYFPRINTF (p, "%s ", Title); \
6209 yy_symbol_print (stderr, \
6210 Kind, Value, Location, p); \
6211 YYFPRINTF (p, "\n"); \
6212 } \
6213} while (0)
6214
6215
6216/*-----------------------------------.
6217| Print this symbol's value on YYO. |
6218`-----------------------------------*/
6219
6220static void
6221yy_symbol_value_print (FILE *yyo,
6222 yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, struct parser_params *p)
6223{
6224 FILE *yyoutput = yyo;
6225 YY_USE (yyoutput);
6226 YY_USE (yylocationp);
6227 YY_USE (p);
6228 if (!yyvaluep)
6229 return;
6230 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
6231 switch (yykind)
6232 {
6233 case YYSYMBOL_tIDENTIFIER: /* "local variable or method" */
6234#line 1090 "ripper.y"
6235 {
6236#ifndef RIPPER
6237 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).val)));
6238#else
6239 rb_parser_printf(p, "%"PRIsVALUE, RNODE(((*yyvaluep).val))->nd_rval);
6240#endif
6241}
6242#line 6241 "ripper.c"
6243 break;
6244
6245 case YYSYMBOL_tFID: /* "method" */
6246#line 1090 "ripper.y"
6247 {
6248#ifndef RIPPER
6249 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).val)));
6250#else
6251 rb_parser_printf(p, "%"PRIsVALUE, RNODE(((*yyvaluep).val))->nd_rval);
6252#endif
6253}
6254#line 6253 "ripper.c"
6255 break;
6256
6257 case YYSYMBOL_tGVAR: /* "global variable" */
6258#line 1090 "ripper.y"
6259 {
6260#ifndef RIPPER
6261 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).val)));
6262#else
6263 rb_parser_printf(p, "%"PRIsVALUE, RNODE(((*yyvaluep).val))->nd_rval);
6264#endif
6265}
6266#line 6265 "ripper.c"
6267 break;
6268
6269 case YYSYMBOL_tIVAR: /* "instance variable" */
6270#line 1090 "ripper.y"
6271 {
6272#ifndef RIPPER
6273 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).val)));
6274#else
6275 rb_parser_printf(p, "%"PRIsVALUE, RNODE(((*yyvaluep).val))->nd_rval);
6276#endif
6277}
6278#line 6277 "ripper.c"
6279 break;
6280
6281 case YYSYMBOL_tCONSTANT: /* "constant" */
6282#line 1090 "ripper.y"
6283 {
6284#ifndef RIPPER
6285 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).val)));
6286#else
6287 rb_parser_printf(p, "%"PRIsVALUE, RNODE(((*yyvaluep).val))->nd_rval);
6288#endif
6289}
6290#line 6289 "ripper.c"
6291 break;
6292
6293 case YYSYMBOL_tCVAR: /* "class variable" */
6294#line 1090 "ripper.y"
6295 {
6296#ifndef RIPPER
6297 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).val)));
6298#else
6299 rb_parser_printf(p, "%"PRIsVALUE, RNODE(((*yyvaluep).val))->nd_rval);
6300#endif
6301}
6302#line 6301 "ripper.c"
6303 break;
6304
6305 case YYSYMBOL_tLABEL: /* "label" */
6306#line 1090 "ripper.y"
6307 {
6308#ifndef RIPPER
6309 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).val)));
6310#else
6311 rb_parser_printf(p, "%"PRIsVALUE, RNODE(((*yyvaluep).val))->nd_rval);
6312#endif
6313}
6314#line 6313 "ripper.c"
6315 break;
6316
6317 case YYSYMBOL_tINTEGER: /* "integer literal" */
6318#line 1097 "ripper.y"
6319 {
6320#ifndef RIPPER
6321 rb_parser_printf(p, "%+"PRIsVALUE, ((*yyvaluep).val)->nd_lit);
6322#else
6323 rb_parser_printf(p, "%+"PRIsVALUE, get_value(((*yyvaluep).val)));
6324#endif
6325}
6326#line 6325 "ripper.c"
6327 break;
6328
6329 case YYSYMBOL_tFLOAT: /* "float literal" */
6330#line 1097 "ripper.y"
6331 {
6332#ifndef RIPPER
6333 rb_parser_printf(p, "%+"PRIsVALUE, ((*yyvaluep).val)->nd_lit);
6334#else
6335 rb_parser_printf(p, "%+"PRIsVALUE, get_value(((*yyvaluep).val)));
6336#endif
6337}
6338#line 6337 "ripper.c"
6339 break;
6340
6341 case YYSYMBOL_tRATIONAL: /* "rational literal" */
6342#line 1097 "ripper.y"
6343 {
6344#ifndef RIPPER
6345 rb_parser_printf(p, "%+"PRIsVALUE, ((*yyvaluep).val)->nd_lit);
6346#else
6347 rb_parser_printf(p, "%+"PRIsVALUE, get_value(((*yyvaluep).val)));
6348#endif
6349}
6350#line 6349 "ripper.c"
6351 break;
6352
6353 case YYSYMBOL_tIMAGINARY: /* "imaginary literal" */
6354#line 1097 "ripper.y"
6355 {
6356#ifndef RIPPER
6357 rb_parser_printf(p, "%+"PRIsVALUE, ((*yyvaluep).val)->nd_lit);
6358#else
6359 rb_parser_printf(p, "%+"PRIsVALUE, get_value(((*yyvaluep).val)));
6360#endif
6361}
6362#line 6361 "ripper.c"
6363 break;
6364
6365 case YYSYMBOL_tCHAR: /* "char literal" */
6366#line 1097 "ripper.y"
6367 {
6368#ifndef RIPPER
6369 rb_parser_printf(p, "%+"PRIsVALUE, ((*yyvaluep).val)->nd_lit);
6370#else
6371 rb_parser_printf(p, "%+"PRIsVALUE, get_value(((*yyvaluep).val)));
6372#endif
6373}
6374#line 6373 "ripper.c"
6375 break;
6376
6377 case YYSYMBOL_tNTH_REF: /* "numbered reference" */
6378#line 1104 "ripper.y"
6379 {
6380#ifndef RIPPER
6381 rb_parser_printf(p, "$%ld", ((*yyvaluep).val)->nd_nth);
6382#else
6383 rb_parser_printf(p, "%"PRIsVALUE, ((*yyvaluep).val));
6384#endif
6385}
6386#line 6385 "ripper.c"
6387 break;
6388
6389 case YYSYMBOL_tBACK_REF: /* "back reference" */
6390#line 1111 "ripper.y"
6391 {
6392#ifndef RIPPER
6393 rb_parser_printf(p, "$%c", (int)((*yyvaluep).val)->nd_nth);
6394#else
6395 rb_parser_printf(p, "%"PRIsVALUE, ((*yyvaluep).val));
6396#endif
6397}
6398#line 6397 "ripper.c"
6399 break;
6400
6401 case YYSYMBOL_tSTRING_CONTENT: /* "literal content" */
6402#line 1097 "ripper.y"
6403 {
6404#ifndef RIPPER
6405 rb_parser_printf(p, "%+"PRIsVALUE, ((*yyvaluep).val)->nd_lit);
6406#else
6407 rb_parser_printf(p, "%+"PRIsVALUE, get_value(((*yyvaluep).val)));
6408#endif
6409}
6410#line 6409 "ripper.c"
6411 break;
6412
6413 case YYSYMBOL_tOP_ASGN: /* "operator-assignment" */
6414#line 1090 "ripper.y"
6415 {
6416#ifndef RIPPER
6417 rb_parser_printf(p, "%"PRIsVALUE, rb_id2str(((*yyvaluep).val)));
6418#else
6419 rb_parser_printf(p, "%"PRIsVALUE, RNODE(((*yyvaluep).val))->nd_rval);
6420#endif
6421}
6422#line 6421 "ripper.c"
6423 break;
6424
6425 default:
6426 break;
6427 }
6428 YY_IGNORE_MAYBE_UNINITIALIZED_END
6429}
6430
6431
6432/*---------------------------.
6433| Print this symbol on YYO. |
6434`---------------------------*/
6435
6436static void
6437yy_symbol_print (FILE *yyo,
6438 yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, struct parser_params *p)
6439{
6440 YYFPRINTF (p, "%s %s (",
6441 yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name (yykind));
6442
6443 YYLOCATION_PRINT (yyo, yylocationp);
6444 YYFPRINTF (p, ": ");
6445 yy_symbol_value_print (yyo, yykind, yyvaluep, yylocationp, p);
6446 YYFPRINTF (p, ")");
6447}
6448
6449/*------------------------------------------------------------------.
6450| yy_stack_print -- Print the state stack from its BOTTOM up to its |
6451| TOP (included). |
6452`------------------------------------------------------------------*/
6453
6454static void
6455ruby_parser_yy_stack_print (yy_state_t *yybottom, yy_state_t *yytop, struct parser_params *p)
6456#define yy_stack_print(b, t) ruby_parser_yy_stack_print(b, t, p)
6457{
6458 YYFPRINTF (p, "Stack now");
6459 for (; yybottom <= yytop; yybottom++)
6460 {
6461 int yybot = *yybottom;
6462 YYFPRINTF (p, " %d", yybot);
6463 }
6464 YYFPRINTF (p, "\n");
6465}
6466
6467# define YY_STACK_PRINT(Bottom, Top) \
6468do { \
6469 if (yydebug) \
6470 yy_stack_print ((Bottom), (Top)); \
6471} while (0)
6472
6473
6474/*------------------------------------------------.
6475| Report that the YYRULE is going to be reduced. |
6476`------------------------------------------------*/
6477
6478static void
6479yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp,
6480 int yyrule, struct parser_params *p)
6481{
6482 int yylno = yyrline[yyrule];
6483 int yynrhs = yyr2[yyrule];
6484 int yyi;
6485 YYFPRINTF (p, "Reducing stack by rule %d (line %d):\n",
6486 yyrule - 1, yylno);
6487 /* The symbols being reduced. */
6488 for (yyi = 0; yyi < yynrhs; yyi++)
6489 {
6490 YYFPRINTF (p, " $%d = ", yyi + 1);
6491 yy_symbol_print (stderr,
6492 YY_ACCESSING_SYMBOL (+yyssp[yyi + 1 - yynrhs]),
6493 &yyvsp[(yyi + 1) - (yynrhs)],
6494 &(yylsp[(yyi + 1) - (yynrhs)]), p);
6495 YYFPRINTF (p, "\n");
6496 }
6497}
6498
6499# define YY_REDUCE_PRINT(Rule) \
6500do { \
6501 if (yydebug) \
6502 yy_reduce_print (yyssp, yyvsp, yylsp, Rule, p); \
6503} while (0)
6504
6505/* Nonzero means print parse trace. It is left uninitialized so that
6506 multiple parsers can coexist. */
6507#ifndef yydebug
6508int yydebug;
6509#endif
6510#else /* !YYDEBUG */
6511# define YYDPRINTF(Args) ((void) 0)
6512# define YY_SYMBOL_PRINT(Title, Kind, Value, Location)
6513# define YY_STACK_PRINT(Bottom, Top)
6514# define YY_REDUCE_PRINT(Rule)
6515#endif /* !YYDEBUG */
6516
6517
6518/* YYINITDEPTH -- initial size of the parser's stacks. */
6519#ifndef YYINITDEPTH
6520# define YYINITDEPTH 200
6521#endif
6522
6523/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
6524 if the built-in stack extension method is used).
6525
6526 Do not make this value too large; the results are undefined if
6527 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
6528 evaluated with infinite-precision integer arithmetic. */
6529
6530#ifndef YYMAXDEPTH
6531# define YYMAXDEPTH 10000
6532#endif
6533
6534
6535/* Context of a parse error. */
6536typedef struct
6537{
6538 yy_state_t *yyssp;
6539 yysymbol_kind_t yytoken;
6540 YYLTYPE *yylloc;
6541} yypcontext_t;
6542
6543/* Put in YYARG at most YYARGN of the expected tokens given the
6544 current YYCTX, and return the number of tokens stored in YYARG. If
6545 YYARG is null, return the number of expected tokens (guaranteed to
6546 be less than YYNTOKENS). Return YYENOMEM on memory exhaustion.
6547 Return 0 if there are more than YYARGN expected tokens, yet fill
6548 YYARG up to YYARGN. */
6549static int
6550yypcontext_expected_tokens (const yypcontext_t *yyctx,
6551 yysymbol_kind_t yyarg[], int yyargn)
6552{
6553 /* Actual size of YYARG. */
6554 int yycount = 0;
6555 int yyn = yypact[+*yyctx->yyssp];
6556 if (!yypact_value_is_default (yyn))
6557 {
6558 /* Start YYX at -YYN if negative to avoid negative indexes in
6559 YYCHECK. In other words, skip the first -YYN actions for
6560 this state because they are default actions. */
6561 int yyxbegin = yyn < 0 ? -yyn : 0;
6562 /* Stay within bounds of both yycheck and yytname. */
6563 int yychecklim = YYLAST - yyn + 1;
6564 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
6565 int yyx;
6566 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
6567 if (yycheck[yyx + yyn] == yyx && yyx != YYSYMBOL_YYerror
6568 && !yytable_value_is_error (yytable[yyx + yyn]))
6569 {
6570 if (!yyarg)
6571 ++yycount;
6572 else if (yycount == yyargn)
6573 return 0;
6574 else
6575 yyarg[yycount++] = YY_CAST (yysymbol_kind_t, yyx);
6576 }
6577 }
6578 if (yyarg && yycount == 0 && 0 < yyargn)
6579 yyarg[0] = YYSYMBOL_YYEMPTY;
6580 return yycount;
6581}
6582
6583
6584
6585
6586#ifndef yystrlen
6587# if defined __GLIBC__ && defined _STRING_H
6588# define yystrlen(S) (YY_CAST (YYPTRDIFF_T, strlen (S)))
6589# else
6590/* Return the length of YYSTR. */
6591static YYPTRDIFF_T
6592yystrlen (const char *yystr)
6593{
6594 YYPTRDIFF_T yylen;
6595 for (yylen = 0; yystr[yylen]; yylen++)
6596 continue;
6597 return yylen;
6598}
6599# endif
6600#endif
6601
6602#ifndef yystpcpy
6603# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
6604# define yystpcpy stpcpy
6605# else
6606/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
6607 YYDEST. */
6608static char *
6609yystpcpy (char *yydest, const char *yysrc)
6610{
6611 char *yyd = yydest;
6612 const char *yys = yysrc;
6613
6614 while ((*yyd++ = *yys++) != '\0')
6615 continue;
6616
6617 return yyd - 1;
6618}
6619# endif
6620#endif
6621
6622#ifndef yytnamerr
6623/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
6624 quotes and backslashes, so that it's suitable for yyerror. The
6625 heuristic is that double-quoting is unnecessary unless the string
6626 contains an apostrophe, a comma, or backslash (other than
6627 backslash-backslash). YYSTR is taken from yytname. If YYRES is
6628 null, do not copy; instead, return the length of what the result
6629 would have been. */
6630static YYPTRDIFF_T
6631yytnamerr (char *yyres, const char *yystr)
6632{
6633 if (*yystr == '"')
6634 {
6635 YYPTRDIFF_T yyn = 0;
6636 char const *yyp = yystr;
6637 for (;;)
6638 switch (*++yyp)
6639 {
6640 case '\'':
6641 case ',':
6642 goto do_not_strip_quotes;
6643
6644 case '\\':
6645 if (*++yyp != '\\')
6646 goto do_not_strip_quotes;
6647 else
6648 goto append;
6649
6650 append:
6651 default:
6652 if (yyres)
6653 yyres[yyn] = *yyp;
6654 yyn++;
6655 break;
6656
6657 case '"':
6658 if (yyres)
6659 yyres[yyn] = '\0';
6660 return yyn;
6661 }
6662 do_not_strip_quotes: ;
6663 }
6664
6665 if (yyres)
6666 return yystpcpy (yyres, yystr) - yyres;
6667 else
6668 return yystrlen (yystr);
6669}
6670#endif
6671
6672
6673static int
6674yy_syntax_error_arguments (const yypcontext_t *yyctx,
6675 yysymbol_kind_t yyarg[], int yyargn)
6676{
6677 /* Actual size of YYARG. */
6678 int yycount = 0;
6679 /* There are many possibilities here to consider:
6680 - If this state is a consistent state with a default action, then
6681 the only way this function was invoked is if the default action
6682 is an error action. In that case, don't check for expected
6683 tokens because there are none.
6684 - The only way there can be no lookahead present (in yychar) is if
6685 this state is a consistent state with a default action. Thus,
6686 detecting the absence of a lookahead is sufficient to determine
6687 that there is no unexpected or expected token to report. In that
6688 case, just report a simple "syntax error".
6689 - Don't assume there isn't a lookahead just because this state is a
6690 consistent state with a default action. There might have been a
6691 previous inconsistent state, consistent state with a non-default
6692 action, or user semantic action that manipulated yychar.
6693 - Of course, the expected token list depends on states to have
6694 correct lookahead information, and it depends on the parser not
6695 to perform extra reductions after fetching a lookahead from the
6696 scanner and before detecting a syntax error. Thus, state merging
6697 (from LALR or IELR) and default reductions corrupt the expected
6698 token list. However, the list is correct for canonical LR with
6699 one exception: it will still contain any token that will not be
6700 accepted due to an error action in a later state.
6701 */
6702 if (yyctx->yytoken != YYSYMBOL_YYEMPTY)
6703 {
6704 int yyn;
6705 if (yyarg)
6706 yyarg[yycount] = yyctx->yytoken;
6707 ++yycount;
6708 yyn = yypcontext_expected_tokens (yyctx,
6709 yyarg ? yyarg + 1 : yyarg, yyargn - 1);
6710 if (yyn == YYENOMEM)
6711 return YYENOMEM;
6712 else
6713 yycount += yyn;
6714 }
6715 return yycount;
6716}
6717
6718/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
6719 about the unexpected token YYTOKEN for the state stack whose top is
6720 YYSSP.
6721
6722 Return 0 if *YYMSG was successfully written. Return -1 if *YYMSG is
6723 not large enough to hold the message. In that case, also set
6724 *YYMSG_ALLOC to the required number of bytes. Return YYENOMEM if the
6725 required number of bytes is too large to store. */
6726static int
6727yysyntax_error (struct parser_params *p, YYPTRDIFF_T *yymsg_alloc, char **yymsg,
6728 const yypcontext_t *yyctx)
6729{
6730 enum { YYARGS_MAX = 5 };
6731 /* Internationalized format string. */
6732 const char *yyformat = YY_NULLPTR;
6733 /* Arguments of yyformat: reported tokens (one for the "unexpected",
6734 one per "expected"). */
6735 yysymbol_kind_t yyarg[YYARGS_MAX];
6736 /* Cumulated lengths of YYARG. */
6737 YYPTRDIFF_T yysize = 0;
6738
6739 /* Actual size of YYARG. */
6740 int yycount = yy_syntax_error_arguments (yyctx, yyarg, YYARGS_MAX);
6741 if (yycount == YYENOMEM)
6742 return YYENOMEM;
6743
6744 switch (yycount)
6745 {
6746#define YYCASE_(N, S) \
6747 case N: \
6748 yyformat = S; \
6749 break
6750 default: /* Avoid compiler warnings. */
6751 YYCASE_(0, YY_("syntax error"));
6752 YYCASE_(1, YY_("syntax error, unexpected %s"));
6753 YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
6754 YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
6755 YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
6756 YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
6757#undef YYCASE_
6758 }
6759
6760 /* Compute error message size. Don't count the "%s"s, but reserve
6761 room for the terminator. */
6762 yysize = yystrlen (yyformat) - 2 * yycount + 1;
6763 {
6764 int yyi;
6765 for (yyi = 0; yyi < yycount; ++yyi)
6766 {
6767 YYPTRDIFF_T yysize1
6768 = yysize + yytnamerr (YY_NULLPTR, yytname[yyarg[yyi]]);
6769 if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)
6770 yysize = yysize1;
6771 else
6772 return YYENOMEM;
6773 }
6774 }
6775
6776 if (*yymsg_alloc < yysize)
6777 {
6778 *yymsg_alloc = 2 * yysize;
6779 if (! (yysize <= *yymsg_alloc
6780 && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
6781 *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
6782 return -1;
6783 }
6784
6785 /* Avoid sprintf, as that infringes on the user's name space.
6786 Don't have undefined behavior even if the translation
6787 produced a string with the wrong number of "%s"s. */
6788 {
6789 char *yyp = *yymsg;
6790 int yyi = 0;
6791 while ((*yyp = *yyformat) != '\0')
6792 if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
6793 {
6794 yyp += yytnamerr (yyp, yytname[yyarg[yyi++]]);
6795 yyformat += 2;
6796 }
6797 else
6798 {
6799 ++yyp;
6800 ++yyformat;
6801 }
6802 }
6803 return 0;
6804}
6805
6806
6807/*-----------------------------------------------.
6808| Release the memory associated to this symbol. |
6809`-----------------------------------------------*/
6810
6811static void
6812yydestruct (const char *yymsg,
6813 yysymbol_kind_t yykind, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, struct parser_params *p)
6814{
6815 YY_USE (yyvaluep);
6816 YY_USE (yylocationp);
6817 YY_USE (p);
6818 if (!yymsg)
6819 yymsg = "Deleting";
6820 YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp);
6821
6822 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
6823 YY_USE (yykind);
6824 YY_IGNORE_MAYBE_UNINITIALIZED_END
6825}
6826
6827
6828
6829
6830
6831
6832/*----------.
6833| yyparse. |
6834`----------*/
6835
6836int
6837yyparse (struct parser_params *p)
6838{
6839/* Lookahead token kind. */
6840int yychar;
6841
6842
6843/* The semantic value of the lookahead symbol. */
6844/* Default value used for initialization, for pacifying older GCCs
6845 or non-GCC compilers. */
6846YY_INITIAL_VALUE (static YYSTYPE yyval_default;)
6847YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
6848
6849/* Location data for the lookahead symbol. */
6850static YYLTYPE yyloc_default
6851# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
6852 = { 1, 1, 1, 1 }
6853# endif
6854;
6855YYLTYPE yylloc = yyloc_default;
6856
6857 /* Number of syntax errors so far. */
6858 int yynerrs = 0;
6859
6860 yy_state_fast_t yystate = 0;
6861 /* Number of tokens to shift before error messages enabled. */
6862 int yyerrstatus = 0;
6863
6864 /* Refer to the stacks through separate pointers, to allow yyoverflow
6865 to reallocate them elsewhere. */
6866
6867 /* Their size. */
6868 YYPTRDIFF_T yystacksize = YYINITDEPTH;
6869
6870 /* The state stack: array, bottom, top. */
6871 yy_state_t yyssa[YYINITDEPTH];
6872 yy_state_t *yyss = yyssa;
6873 yy_state_t *yyssp = yyss;
6874
6875 /* The semantic value stack: array, bottom, top. */
6876 YYSTYPE yyvsa[YYINITDEPTH];
6877 YYSTYPE *yyvs = yyvsa;
6878 YYSTYPE *yyvsp = yyvs;
6879
6880 /* The location stack: array, bottom, top. */
6881 YYLTYPE yylsa[YYINITDEPTH];
6882 YYLTYPE *yyls = yylsa;
6883 YYLTYPE *yylsp = yyls;
6884
6885 int yyn;
6886 /* The return value of yyparse. */
6887 int yyresult;
6888 /* Lookahead symbol kind. */
6889 yysymbol_kind_t yytoken = YYSYMBOL_YYEMPTY;
6890 /* The variables used to return semantic value and location from the
6891 action routines. */
6892 YYSTYPE yyval;
6893 YYLTYPE yyloc;
6894
6895 /* The locations where the error started and ended. */
6896 YYLTYPE yyerror_range[3];
6897
6898 /* Buffer for error messages, and its allocated size. */
6899 char yymsgbuf[128];
6900 char *yymsg = yymsgbuf;
6901 YYPTRDIFF_T yymsg_alloc = sizeof yymsgbuf;
6902
6903#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N))
6904
6905 /* The number of symbols on the RHS of the reduced rule.
6906 Keep to zero when no symbol should be popped. */
6907 int yylen = 0;
6908
6909 YYDPRINTF ((p, "Starting parse\n"));
6910
6911 yychar = YYEMPTY; /* Cause a token to be read. */
6912
6913
6914/* User initialization code. */
6915#line 1122 "ripper.y"
6916{
6917 RUBY_SET_YYLLOC_OF_NONE(yylloc);
6918}
6919
6920#line 6916 "ripper.c"
6921
6922 yylsp[0] = yylloc;
6923 goto yysetstate;
6924
6925
6926/*------------------------------------------------------------.
6927| yynewstate -- push a new state, which is found in yystate. |
6928`------------------------------------------------------------*/
6929yynewstate:
6930 /* In all cases, when you get here, the value and location stacks
6931 have just been pushed. So pushing a state here evens the stacks. */
6932 yyssp++;
6933
6934
6935/*--------------------------------------------------------------------.
6936| yysetstate -- set current state (the top of the stack) to yystate. |
6937`--------------------------------------------------------------------*/
6938yysetstate:
6939 YYDPRINTF ((p, "Entering state %d\n", yystate));
6940 YY_ASSERT (0 <= yystate && yystate < YYNSTATES);
6941 YY_IGNORE_USELESS_CAST_BEGIN
6942 *yyssp = YY_CAST (yy_state_t, yystate);
6943 YY_IGNORE_USELESS_CAST_END
6944 YY_STACK_PRINT (yyss, yyssp);
6945
6946 if (yyss + yystacksize - 1 <= yyssp)
6947#if !defined yyoverflow && !defined YYSTACK_RELOCATE
6948 YYNOMEM;
6949#else
6950 {
6951 /* Get the current used size of the three stacks, in elements. */
6952 YYPTRDIFF_T yysize = yyssp - yyss + 1;
6953
6954# if defined yyoverflow
6955 {
6956 /* Give user a chance to reallocate the stack. Use copies of
6957 these so that the &'s don't force the real ones into
6958 memory. */
6959 yy_state_t *yyss1 = yyss;
6960 YYSTYPE *yyvs1 = yyvs;
6961 YYLTYPE *yyls1 = yyls;
6962
6963 /* Each stack pointer address is followed by the size of the
6964 data in use in that stack, in bytes. This used to be a
6965 conditional around just the two extra args, but that might
6966 be undefined if yyoverflow is a macro. */
6967 yyoverflow (YY_("memory exhausted"),
6968 &yyss1, yysize * YYSIZEOF (*yyssp),
6969 &yyvs1, yysize * YYSIZEOF (*yyvsp),
6970 &yyls1, yysize * YYSIZEOF (*yylsp),
6971 &yystacksize);
6972 yyss = yyss1;
6973 yyvs = yyvs1;
6974 yyls = yyls1;
6975 }
6976# else /* defined YYSTACK_RELOCATE */
6977 /* Extend the stack our own way. */
6978 if (YYMAXDEPTH <= yystacksize)
6979 YYNOMEM;
6980 yystacksize *= 2;
6981 if (YYMAXDEPTH < yystacksize)
6982 yystacksize = YYMAXDEPTH;
6983
6984 {
6985 yy_state_t *yyss1 = yyss;
6986 union yyalloc *yyptr =
6987 YY_CAST (union yyalloc *,
6988 YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize))));
6989 if (! yyptr)
6990 YYNOMEM;
6991 YYSTACK_RELOCATE (yyss_alloc, yyss);
6992 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
6993 YYSTACK_RELOCATE (yyls_alloc, yyls);
6994# undef YYSTACK_RELOCATE
6995 if (yyss1 != yyssa)
6996 YYSTACK_FREE (yyss1);
6997 }
6998# endif
6999
7000 yyssp = yyss + yysize - 1;
7001 yyvsp = yyvs + yysize - 1;
7002 yylsp = yyls + yysize - 1;
7003
7004 YY_IGNORE_USELESS_CAST_BEGIN
7005 YYDPRINTF ((p, "Stack size increased to %ld\n",
7006 YY_CAST (long, yystacksize)));
7007 YY_IGNORE_USELESS_CAST_END
7008
7009 if (yyss + yystacksize - 1 <= yyssp)
7010 YYABORT;
7011 }
7012#endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */
7013
7014
7015 if (yystate == YYFINAL)
7016 YYACCEPT;
7017
7018 goto yybackup;
7019
7020
7021/*-----------.
7022| yybackup. |
7023`-----------*/
7024yybackup:
7025 /* Do appropriate processing given the current state. Read a
7026 lookahead token if we need one and don't already have one. */
7027
7028 /* First try to decide what to do without reference to lookahead token. */
7029 yyn = yypact[yystate];
7030 if (yypact_value_is_default (yyn))
7031 goto yydefault;
7032
7033 /* Not known => get a lookahead token if don't already have one. */
7034
7035 /* YYCHAR is either empty, or end-of-input, or a valid lookahead. */
7036 if (yychar == YYEMPTY)
7037 {
7038 YYDPRINTF ((p, "Reading a token\n"));
7039 yychar = yylex (&yylval, &yylloc, p);
7040 }
7041
7042 if (yychar <= END_OF_INPUT)
7043 {
7044 yychar = END_OF_INPUT;
7045 yytoken = YYSYMBOL_YYEOF;
7046 YYDPRINTF ((p, "Now at end of input.\n"));
7047 }
7048 else if (yychar == YYerror)
7049 {
7050 /* The scanner already issued an error message, process directly
7051 to error recovery. But do not keep the error token as
7052 lookahead, it is too special and may lead us to an endless
7053 loop in error recovery. */
7054 yychar = YYUNDEF;
7055 yytoken = YYSYMBOL_YYerror;
7056 yyerror_range[1] = yylloc;
7057 goto yyerrlab1;
7058 }
7059 else
7060 {
7061 yytoken = YYTRANSLATE (yychar);
7062 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
7063 }
7064
7065 /* If the proper action on seeing token YYTOKEN is to reduce or to
7066 detect an error, take that action. */
7067 yyn += yytoken;
7068 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
7069 goto yydefault;
7070 yyn = yytable[yyn];
7071 if (yyn <= 0)
7072 {
7073 if (yytable_value_is_error (yyn))
7074 goto yyerrlab;
7075 yyn = -yyn;
7076 goto yyreduce;
7077 }
7078
7079 /* Count tokens shifted since error; after three, turn off error
7080 status. */
7081 if (yyerrstatus)
7082 yyerrstatus--;
7083
7084 /* Shift the lookahead token. */
7085 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
7086 yystate = yyn;
7087 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
7088 *++yyvsp = yylval;
7089 YY_IGNORE_MAYBE_UNINITIALIZED_END
7090 *++yylsp = yylloc;
7091
7092 /* Discard the shifted token. */
7093 yychar = YYEMPTY;
7094 goto yynewstate;
7095
7096
7097/*-----------------------------------------------------------.
7098| yydefault -- do the default action for the current state. |
7099`-----------------------------------------------------------*/
7100yydefault:
7101 yyn = yydefact[yystate];
7102 if (yyn == 0)
7103 goto yyerrlab;
7104 goto yyreduce;
7105
7106
7107/*-----------------------------.
7108| yyreduce -- do a reduction. |
7109`-----------------------------*/
7110yyreduce:
7111 /* yyn is the number of a rule to reduce with. */
7112 yylen = yyr2[yyn];
7113
7114 /* If YYLEN is nonzero, implement the default value of the action:
7115 '$$ = $1'.
7116
7117 Otherwise, the following line sets YYVAL to garbage.
7118 This behavior is undocumented and Bison
7119 users should not rely upon it. Assigning to YYVAL
7120 unconditionally makes the parser a bit smaller, and it avoids a
7121 GCC warning that YYVAL may be used uninitialized. */
7122 yyval = yyvsp[1-yylen];
7123
7124 /* Default location. */
7125 YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
7126 yyerror_range[1] = yyloc;
7127 YY_REDUCE_PRINT (yyn);
7128 switch (yyn)
7129 {
7130 case 2: /* $@1: %empty */
7131#line 1327 "ripper.y"
7132 {
7133 SET_LEX_STATE(EXPR_BEG);
7134 local_push(p, ifndef_ripper(1)+0);
7135 }
7136#line 7132 "ripper.c"
7137 break;
7138
7139 case 3: /* program: $@1 top_compstmt */
7140#line 1332 "ripper.y"
7141 {
7142#if 0
7143 if ((yyvsp[0].val) && !compile_for_eval) {
7144 NODE *node = (yyvsp[0].val);
7145 /* last expression should not be void */
7146 if (nd_type_p(node, NODE_BLOCK)) {
7147 while (node->nd_next) {
7148 node = node->nd_next;
7149 }
7150 node = node->nd_head;
7151 }
7152 node = remove_begin(node);
7153 void_expr(p, node);
7154 }
7155 p->eval_tree = NEW_SCOPE(0, block_append(p, p->eval_tree, (yyvsp[0].val)), &(yyloc));
7156#endif
7157 {VALUE v1,v2;v1=(yyvsp[0].val);v2=dispatch1(program,v1);p->result=v2;}
7158 local_pop(p);
7159 }
7160#line 7156 "ripper.c"
7161 break;
7162
7163 case 4: /* top_compstmt: top_stmts opt_terms */
7164#line 1354 "ripper.y"
7165 {
7166 (yyval.val) = void_stmts(p, (yyvsp[-1].val));
7167 }
7168#line 7164 "ripper.c"
7169 break;
7170
7171 case 5: /* top_stmts: none */
7172#line 1360 "ripper.y"
7173 {
7174#if 0
7175 (yyval.val) = NEW_BEGIN(0, &(yyloc));
7176#endif
7177 {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;}
7178 }
7179#line 7175 "ripper.c"
7180 break;
7181
7182 case 6: /* top_stmts: top_stmt */
7183#line 1367 "ripper.y"
7184 {
7185#if 0
7186 (yyval.val) = newline_node((yyvsp[0].val));
7187#endif
7188 {VALUE v1,v2,v3,v4;v1=dispatch0(stmts_new);v2=v1;v3=(yyvsp[0].val);v4=dispatch2(stmts_add,v2,v3);(yyval.val)=v4;}
7189 }
7190#line 7186 "ripper.c"
7191 break;
7192
7193 case 7: /* top_stmts: top_stmts terms top_stmt */
7194#line 1374 "ripper.y"
7195 {
7196#if 0
7197 (yyval.val) = block_append(p, (yyvsp[-2].val), newline_node((yyvsp[0].val)));
7198#endif
7199 {VALUE v1,v2,v3;v1=(yyvsp[-2].val);v2=(yyvsp[0].val);v3=dispatch2(stmts_add,v1,v2);(yyval.val)=v3;}
7200 }
7201#line 7197 "ripper.c"
7202 break;
7203
7204 case 8: /* top_stmts: error top_stmt */
7205#line 1381 "ripper.y"
7206 {
7207 (yyval.val) = remove_begin((yyvsp[0].val));
7208 }
7209#line 7205 "ripper.c"
7210 break;
7211
7212 case 10: /* top_stmt: "`BEGIN'" begin_block */
7213#line 1388 "ripper.y"
7214 {
7215 (yyval.val) = (yyvsp[0].val);
7216 }
7217#line 7213 "ripper.c"
7218 break;
7219
7220 case 11: /* begin_block: '{' top_compstmt '}' */
7221#line 1394 "ripper.y"
7222 {
7223#if 0
7224 p->eval_tree_begin = block_append(p, p->eval_tree_begin,
7225 NEW_BEGIN((yyvsp[-1].val), &(yyloc)));
7226 (yyval.val) = NEW_BEGIN(0, &(yyloc));
7227#endif
7228 {VALUE v1,v2;v1=(yyvsp[-1].val);v2=dispatch1(BEGIN,v1);(yyval.val)=v2;}
7229 }
7230#line 7226 "ripper.c"
7231 break;
7232
7233 case 12: /* $@2: %empty */
7234#line 1406 "ripper.y"
7235 {if (!(yyvsp[-1].val)) {yyerror1(&(yylsp[0]), "else without rescue is useless");}}
7236#line 7232 "ripper.c"
7237 break;
7238
7239 case 13: /* bodystmt: compstmt opt_rescue k_else $@2 compstmt opt_ensure */
7240#line 1409 "ripper.y"
7241 {
7242#if 0
7243 (yyval.val) = new_bodystmt(p, (yyvsp[-5].val), (yyvsp[-4].val), (yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
7244#endif
7245 {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;}
7246 }
7247#line 7243 "ripper.c"
7248 break;
7249
7250 case 14: /* bodystmt: compstmt opt_rescue opt_ensure */
7251#line 1418 "ripper.y"
7252 {
7253#if 0
7254 (yyval.val) = new_bodystmt(p, (yyvsp[-2].val), (yyvsp[-1].val), 0, (yyvsp[0].val), &(yyloc));
7255#endif
7256 {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;}
7257 }
7258#line 7254 "ripper.c"
7259 break;
7260
7261 case 15: /* compstmt: stmts opt_terms */
7262#line 1427 "ripper.y"
7263 {
7264 (yyval.val) = void_stmts(p, (yyvsp[-1].val));
7265 }
7266#line 7262 "ripper.c"
7267 break;
7268
7269 case 16: /* stmts: none */
7270#line 1433 "ripper.y"
7271 {
7272#if 0
7273 (yyval.val) = NEW_BEGIN(0, &(yyloc));
7274#endif
7275 {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;}
7276 }
7277#line 7273 "ripper.c"
7278 break;
7279
7280 case 17: /* stmts: stmt_or_begin */
7281#line 1440 "ripper.y"
7282 {
7283#if 0
7284 (yyval.val) = newline_node((yyvsp[0].val));
7285#endif
7286 {VALUE v1,v2,v3,v4;v1=dispatch0(stmts_new);v2=v1;v3=(yyvsp[0].val);v4=dispatch2(stmts_add,v2,v3);(yyval.val)=v4;}
7287 }
7288#line 7284 "ripper.c"
7289 break;
7290
7291 case 18: /* stmts: stmts terms stmt_or_begin */
7292#line 1447 "ripper.y"
7293 {
7294#if 0
7295 (yyval.val) = block_append(p, (yyvsp[-2].val), newline_node((yyvsp[0].val)));
7296#endif
7297 {VALUE v1,v2,v3;v1=(yyvsp[-2].val);v2=(yyvsp[0].val);v3=dispatch2(stmts_add,v1,v2);(yyval.val)=v3;}
7298 }
7299#line 7295 "ripper.c"
7300 break;
7301
7302 case 19: /* stmts: error stmt */
7303#line 1454 "ripper.y"
7304 {
7305 (yyval.val) = remove_begin((yyvsp[0].val));
7306 }
7307#line 7303 "ripper.c"
7308 break;
7309
7310 case 20: /* stmt_or_begin: stmt */
7311#line 1460 "ripper.y"
7312 {
7313 (yyval.val) = (yyvsp[0].val);
7314 }
7315#line 7311 "ripper.c"
7316 break;
7317
7318 case 21: /* $@3: %empty */
7319#line 1464 "ripper.y"
7320 {
7321 yyerror1(&(yylsp[0]), "BEGIN is permitted only at toplevel");
7322 }
7323#line 7319 "ripper.c"
7324 break;
7325
7326 case 22: /* stmt_or_begin: "`BEGIN'" $@3 begin_block */
7327#line 1468 "ripper.y"
7328 {
7329 (yyval.val) = (yyvsp[0].val);
7330 }
7331#line 7327 "ripper.c"
7332 break;
7333
7334 case 23: /* $@4: %empty */
7335#line 1473 "ripper.y"
7336 {SET_LEX_STATE(EXPR_FNAME|EXPR_FITEM);}
7337#line 7333 "ripper.c"
7338 break;
7339
7340 case 24: /* stmt: "`alias'" fitem $@4 fitem */
7341#line 1474 "ripper.y"
7342 {
7343#if 0
7344 (yyval.val) = NEW_ALIAS((yyvsp[-2].val), (yyvsp[0].val), &(yyloc));
7345#endif
7346 {VALUE v1,v2,v3;v1=(yyvsp[-2].val);v2=(yyvsp[0].val);v3=dispatch2(alias,v1,v2);(yyval.val)=v3;}
7347 }
7348#line 7344 "ripper.c"
7349 break;
7350
7351 case 25: /* stmt: "`alias'" "global variable" "global variable" */
7352#line 1481 "ripper.y"
7353 {
7354#if 0
7355 (yyval.val) = NEW_VALIAS((yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
7356#endif
7357 {VALUE v1,v2,v3;v1=(yyvsp[-1].val);v2=(yyvsp[0].val);v3=dispatch2(var_alias,v1,v2);(yyval.val)=v3;}
7358 }
7359#line 7355 "ripper.c"
7360 break;
7361
7362 case 26: /* stmt: "`alias'" "global variable" "back reference" */
7363#line 1488 "ripper.y"
7364 {
7365#if 0
7366 char buf[2];
7367 buf[0] = '$';
7368 buf[1] = (char)(yyvsp[0].val)->nd_nth;
7369 (yyval.val) = NEW_VALIAS((yyvsp[-1].val), rb_intern2(buf, 2), &(yyloc));
7370#endif
7371 {VALUE v1,v2,v3;v1=(yyvsp[-1].val);v2=(yyvsp[0].val);v3=dispatch2(var_alias,v1,v2);(yyval.val)=v3;}
7372 }
7373#line 7369 "ripper.c"
7374 break;
7375
7376 case 27: /* stmt: "`alias'" "global variable" "numbered reference" */
7377#line 1498 "ripper.y"
7378 {
7379 static const char mesg[] = "can't make alias for the number variables";
7380#if 0
7381 yyerror1(&(yylsp[0]), mesg);
7382 (yyval.val) = NEW_BEGIN(0, &(yyloc));
7383#endif
7384 {VALUE v1,v2,v3;v1=ERR_MESG();v2=(yyvsp[0].val);v3=dispatch2(alias_error,v1,v2);(yyval.val)=v3;}ripper_error(p);
7385 }
7386#line 7382 "ripper.c"
7387 break;
7388
7389 case 28: /* stmt: "`undef'" undef_list */
7390#line 1507 "ripper.y"
7391 {
7392#if 0
7393 (yyval.val) = (yyvsp[0].val);
7394#endif
7395 {VALUE v1,v2;v1=(yyvsp[0].val);v2=dispatch1(undef,v1);(yyval.val)=v2;}
7396 }
7397#line 7393 "ripper.c"
7398 break;
7399
7400 case 29: /* stmt: stmt "`if' modifier" expr_value */
7401#line 1514 "ripper.y"
7402 {
7403#if 0
7404 (yyval.val) = new_if(p, (yyvsp[0].val), remove_begin((yyvsp[-2].val)), 0, &(yyloc));
7405 fixpos((yyval.val), (yyvsp[0].val));
7406#endif
7407 {VALUE v1,v2,v3;v1=(yyvsp[0].val);v2=(yyvsp[-2].val);v3=dispatch2(if_mod,v1,v2);(yyval.val)=v3;}
7408 }
7409#line 7405 "ripper.c"
7410 break;
7411
7412 case 30: /* stmt: stmt "`unless' modifier" expr_value */
7413#line 1522 "ripper.y"
7414 {
7415#if 0
7416 (yyval.val) = new_unless(p, (yyvsp[0].val), remove_begin((yyvsp[-2].val)), 0, &(yyloc));
7417 fixpos((yyval.val), (yyvsp[0].val));
7418#endif
7419 {VALUE v1,v2,v3;v1=(yyvsp[0].val);v2=(yyvsp[-2].val);v3=dispatch2(unless_mod,v1,v2);(yyval.val)=v3;}
7420 }
7421#line 7417 "ripper.c"
7422 break;
7423
7424 case 31: /* stmt: stmt "`while' modifier" expr_value */
7425#line 1530 "ripper.y"
7426 {
7427#if 0
7428 if ((yyvsp[-2].val) && nd_type_p((yyvsp[-2].val), NODE_BEGIN)) {
7429 (yyval.val) = NEW_WHILE(cond(p, (yyvsp[0].val), &(yylsp[0])), (yyvsp[-2].val)->nd_body, 0, &(yyloc));
7430 }
7431 else {
7432 (yyval.val) = NEW_WHILE(cond(p, (yyvsp[0].val), &(yylsp[0])), (yyvsp[-2].val), 1, &(yyloc));
7433 }
7434#endif
7435 {VALUE v1,v2,v3;v1=(yyvsp[0].val);v2=(yyvsp[-2].val);v3=dispatch2(while_mod,v1,v2);(yyval.val)=v3;}
7436 }
7437#line 7433 "ripper.c"
7438 break;
7439
7440 case 32: /* stmt: stmt "`until' modifier" expr_value */
7441#line 1542 "ripper.y"
7442 {
7443#if 0
7444 if ((yyvsp[-2].val) && nd_type_p((yyvsp[-2].val), NODE_BEGIN)) {
7445 (yyval.val) = NEW_UNTIL(cond(p, (yyvsp[0].val), &(yylsp[0])), (yyvsp[-2].val)->nd_body, 0, &(yyloc));
7446 }
7447 else {
7448 (yyval.val) = NEW_UNTIL(cond(p, (yyvsp[0].val), &(yylsp[0])), (yyvsp[-2].val), 1, &(yyloc));
7449 }
7450#endif
7451 {VALUE v1,v2,v3;v1=(yyvsp[0].val);v2=(yyvsp[-2].val);v3=dispatch2(until_mod,v1,v2);(yyval.val)=v3;}
7452 }
7453#line 7449 "ripper.c"
7454 break;
7455
7456 case 33: /* stmt: stmt "`rescue' modifier" stmt */
7457#line 1554 "ripper.y"
7458 {
7459#if 0
7460 NODE *resq;
7461 YYLTYPE loc = code_loc_gen(&(yylsp[-1]), &(yylsp[0]));
7462 resq = NEW_RESBODY(0, remove_begin((yyvsp[0].val)), 0, &loc);
7463 (yyval.val) = NEW_RESCUE(remove_begin((yyvsp[-2].val)), resq, 0, &(yyloc));
7464#endif
7465 {VALUE v1,v2,v3;v1=(yyvsp[-2].val);v2=(yyvsp[0].val);v3=dispatch2(rescue_mod,v1,v2);(yyval.val)=v3;}
7466 }
7467#line 7463 "ripper.c"
7468 break;
7469
7470 case 34: /* stmt: "`END'" '{' compstmt '}' */
7471#line 1564 "ripper.y"
7472 {
7473 if (p->ctxt.in_def) {
7474 rb_warn0("END in method; use at_exit");
7475 }
7476#if 0
7477 {
7478 NODE *scope = NEW_NODE(
7479 NODE_SCOPE, 0 /* tbl */, (yyvsp[-1].val) /* body */, 0 /* args */, &(yyloc));
7480 (yyval.val) = NEW_POSTEXE(scope, &(yyloc));
7481 }
7482#endif
7483 {VALUE v1,v2;v1=(yyvsp[-1].val);v2=dispatch1(END,v1);(yyval.val)=v2;}
7484 }
7485#line 7481 "ripper.c"
7486 break;
7487
7488 case 36: /* stmt: mlhs '=' lex_ctxt command_call */
7489#line 1579 "ripper.y"
7490 {
7491#if 0
7492 value_expr((yyvsp[0].val));
7493 (yyval.val) = node_assign(p, (yyvsp[-3].val), (yyvsp[0].val), (yyvsp[-1].ctxt), &(yyloc));
7494#endif
7495 {VALUE v1,v2,v3;v1=(yyvsp[-3].val);v2=(yyvsp[0].val);v3=dispatch2(massign,v1,v2);(yyval.val)=v3;}
7496 }
7497#line 7493 "ripper.c"
7498 break;
7499
7500 case 37: /* stmt: lhs '=' lex_ctxt mrhs */
7501#line 1587 "ripper.y"
7502 {
7503#if 0
7504 (yyval.val) = node_assign(p, (yyvsp[-3].val), (yyvsp[0].val), (yyvsp[-1].ctxt), &(yyloc));
7505#endif
7506 {VALUE v1,v2,v3;v1=(yyvsp[-3].val);v2=(yyvsp[0].val);v3=dispatch2(assign,v1,v2);(yyval.val)=v3;}
7507 }
7508#line 7504 "ripper.c"
7509 break;
7510
7511 case 38: /* stmt: mlhs '=' lex_ctxt mrhs_arg "`rescue' modifier" stmt */
7512#line 1594 "ripper.y"
7513 {
7514#if 0
7515 YYLTYPE loc = code_loc_gen(&(yylsp[-1]), &(yylsp[0]));
7516 (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));
7517#endif
7518 {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;}
7519 }
7520#line 7516 "ripper.c"
7521 break;
7522
7523 case 39: /* stmt: mlhs '=' lex_ctxt mrhs_arg */
7524#line 1602 "ripper.y"
7525 {
7526#if 0
7527 (yyval.val) = node_assign(p, (yyvsp[-3].val), (yyvsp[0].val), (yyvsp[-1].ctxt), &(yyloc));
7528#endif
7529 {VALUE v1,v2,v3;v1=(yyvsp[-3].val);v2=(yyvsp[0].val);v3=dispatch2(massign,v1,v2);(yyval.val)=v3;}
7530 }
7531#line 7527 "ripper.c"
7532 break;
7533
7534 case 41: /* command_asgn: lhs '=' lex_ctxt command_rhs */
7535#line 1612 "ripper.y"
7536 {
7537#if 0
7538 (yyval.val) = node_assign(p, (yyvsp[-3].val), (yyvsp[0].val), (yyvsp[-1].ctxt), &(yyloc));
7539#endif
7540 {VALUE v1,v2,v3;v1=(yyvsp[-3].val);v2=(yyvsp[0].val);v3=dispatch2(assign,v1,v2);(yyval.val)=v3;}
7541 }
7542#line 7538 "ripper.c"
7543 break;
7544
7545 case 42: /* command_asgn: var_lhs "operator-assignment" lex_ctxt command_rhs */
7546#line 1619 "ripper.y"
7547 {
7548#if 0
7549 (yyval.val) = new_op_assign(p, (yyvsp[-3].val), (yyvsp[-2].val), (yyvsp[0].val), (yyvsp[-1].ctxt), &(yyloc));
7550#endif
7551 {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;}
7552 }
7553#line 7549 "ripper.c"
7554 break;
7555
7556 case 43: /* command_asgn: primary_value '[' opt_call_args rbracket "operator-assignment" lex_ctxt command_rhs */
7557#line 1626 "ripper.y"
7558 {
7559#if 0
7560 (yyval.val) = new_ary_op_assign(p, (yyvsp[-6].val), (yyvsp[-4].val), (yyvsp[-2].val), (yyvsp[0].val), &(yylsp[-4]), &(yyloc));
7561#endif
7562 {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;}
7563
7564 }
7565#line 7561 "ripper.c"
7566 break;
7567
7568 case 44: /* command_asgn: primary_value call_op "local variable or method" "operator-assignment" lex_ctxt command_rhs */
7569#line 1634 "ripper.y"
7570 {
7571#if 0
7572 (yyval.val) = new_attr_op_assign(p, (yyvsp[-5].val), (yyvsp[-4].val), (yyvsp[-3].val), (yyvsp[-2].val), (yyvsp[0].val), &(yyloc));
7573#endif
7574 {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;}
7575 }
7576#line 7572 "ripper.c"
7577 break;
7578
7579 case 45: /* command_asgn: primary_value call_op "constant" "operator-assignment" lex_ctxt command_rhs */
7580#line 1641 "ripper.y"
7581 {
7582#if 0
7583 (yyval.val) = new_attr_op_assign(p, (yyvsp[-5].val), (yyvsp[-4].val), (yyvsp[-3].val), (yyvsp[-2].val), (yyvsp[0].val), &(yyloc));
7584#endif
7585 {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;}
7586 }
7587#line 7583 "ripper.c"
7588 break;
7589
7590 case 46: /* command_asgn: primary_value "::" "constant" "operator-assignment" lex_ctxt command_rhs */
7591#line 1648 "ripper.y"
7592 {
7593#if 0
7594 YYLTYPE loc = code_loc_gen(&(yylsp[-5]), &(yylsp[-3]));
7595 (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));
7596#endif
7597 {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;}
7598 }
7599#line 7595 "ripper.c"
7600 break;
7601
7602 case 47: /* command_asgn: primary_value "::" "local variable or method" "operator-assignment" lex_ctxt command_rhs */
7603#line 1656 "ripper.y"
7604 {
7605#if 0
7606 (yyval.val) = new_attr_op_assign(p, (yyvsp[-5].val), ID2VAL(idCOLON2), (yyvsp[-3].val), (yyvsp[-2].val), (yyvsp[0].val), &(yyloc));
7607#endif
7608 {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;}
7609 }
7610#line 7606 "ripper.c"
7611 break;
7612
7613 case 48: /* command_asgn: defn_head f_opt_paren_args '=' command */
7614#line 1663 "ripper.y"
7615 {
7616 endless_method_name(p, (yyvsp[-3].node), &(yylsp[-3]));
7617 restore_defun(p, (yyvsp[-3].node)->nd_defn);
7618#if 0
7619 (yyval.val) = set_defun_body(p, (yyvsp[-3].val), (yyvsp[-2].val), (yyvsp[0].val), &(yyloc));
7620#endif
7621 {VALUE v1,v2,v3,v4,v5;v1=(yyvsp[0].val);v2=Qnil;v3=Qnil;v4=Qnil;v5=dispatch4(bodystmt,v1,v2,v3,v4);(yyvsp[0].val)=v5;}
7622 {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;}
7623 local_pop(p);
7624 }
7625#line 7621 "ripper.c"
7626 break;
7627
7628 case 49: /* command_asgn: defn_head f_opt_paren_args '=' command "`rescue' modifier" arg */
7629#line 1674 "ripper.y"
7630 {
7631 endless_method_name(p, (yyvsp[-5].node), &(yylsp[-5]));
7632 restore_defun(p, (yyvsp[-5].node)->nd_defn);
7633#if 0
7634 (yyvsp[-2].val) = rescued_expr(p, (yyvsp[-2].val), (yyvsp[0].val), &(yylsp[-2]), &(yylsp[-1]), &(yylsp[0]));
7635 (yyval.val) = set_defun_body(p, (yyvsp[-5].val), (yyvsp[-4].val), (yyvsp[-2].val), &(yyloc));
7636#endif
7637 {VALUE v1,v2,v3,v4,v5,v6,v7,v8;v1=(yyvsp[-2].val);v2=(yyvsp[0].val);v3=dispatch2(rescue_mod,v1,v2);v4=v3;v5=Qnil;v6=Qnil;v7=Qnil;v8=dispatch4(bodystmt,v4,v5,v6,v7);(yyvsp[-2].val)=v8;}
7638 {VALUE v1,v2,v3,v4;v1=get_value((yyvsp[-5].val));v2=(yyvsp[-4].val);v3=(yyvsp[-2].val);v4=dispatch3(def,v1,v2,v3);(yyval.val)=v4;}
7639 local_pop(p);
7640 }
7641#line 7637 "ripper.c"
7642 break;
7643
7644 case 50: /* command_asgn: defs_head f_opt_paren_args '=' command */
7645#line 1686 "ripper.y"
7646 {
7647 endless_method_name(p, (yyvsp[-3].node), &(yylsp[-3]));
7648 restore_defun(p, (yyvsp[-3].node)->nd_defn);
7649#if 0
7650 (yyval.val) = set_defun_body(p, (yyvsp[-3].val), (yyvsp[-2].val), (yyvsp[0].val), &(yyloc));
7651#endif
7652 (yyvsp[-3].val) = get_value((yyvsp[-3].val));
7653
7654 {VALUE v1,v2,v3,v4,v5;v1=(yyvsp[0].val);v2=Qnil;v3=Qnil;v4=Qnil;v5=dispatch4(bodystmt,v1,v2,v3,v4);(yyvsp[0].val)=v5;}
7655 {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;}
7656 local_pop(p);
7657 }
7658#line 7654 "ripper.c"
7659 break;
7660
7661 case 51: /* command_asgn: defs_head f_opt_paren_args '=' command "`rescue' modifier" arg */
7662#line 1699 "ripper.y"
7663 {
7664 endless_method_name(p, (yyvsp[-5].node), &(yylsp[-5]));
7665 restore_defun(p, (yyvsp[-5].node)->nd_defn);
7666#if 0
7667 (yyvsp[-2].val) = rescued_expr(p, (yyvsp[-2].val), (yyvsp[0].val), &(yylsp[-2]), &(yylsp[-1]), &(yylsp[0]));
7668 (yyval.val) = set_defun_body(p, (yyvsp[-5].val), (yyvsp[-4].val), (yyvsp[-2].val), &(yyloc));
7669#endif
7670 (yyvsp[-5].val) = get_value((yyvsp[-5].val));
7671
7672 {VALUE v1,v2,v3,v4,v5,v6,v7,v8;v1=(yyvsp[-2].val);v2=(yyvsp[0].val);v3=dispatch2(rescue_mod,v1,v2);v4=v3;v5=Qnil;v6=Qnil;v7=Qnil;v8=dispatch4(bodystmt,v4,v5,v6,v7);(yyvsp[-2].val)=v8;}
7673 {VALUE v1,v2,v3,v4,v5,v6;v1=AREF((yyvsp[-5].val), 0);v2=AREF((yyvsp[-5].val), 1);v3=AREF((yyvsp[-5].val), 2);v4=(yyvsp[-4].val);v5=(yyvsp[-2].val);v6=dispatch5(defs,v1,v2,v3,v4,v5);(yyval.val)=v6;}
7674 local_pop(p);
7675 }
7676#line 7672 "ripper.c"
7677 break;
7678
7679 case 52: /* command_asgn: backref "operator-assignment" lex_ctxt command_rhs */
7680#line 1713 "ripper.y"
7681 {
7682#if 0
7683 rb_backref_error(p, (yyvsp[-3].val));
7684 (yyval.val) = NEW_BEGIN(0, &(yyloc));
7685#endif
7686 {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);
7687 }
7688#line 7684 "ripper.c"
7689 break;
7690
7691 case 53: /* command_rhs: command_call */
7692#line 1723 "ripper.y"
7693 {
7694 value_expr((yyvsp[0].val));
7695 (yyval.val) = (yyvsp[0].val);
7696 }
7697#line 7693 "ripper.c"
7698 break;
7699
7700 case 54: /* command_rhs: command_call "`rescue' modifier" stmt */
7701#line 1728 "ripper.y"
7702 {
7703#if 0
7704 YYLTYPE loc = code_loc_gen(&(yylsp[-1]), &(yylsp[0]));
7705 value_expr((yyvsp[-2].val));
7706 (yyval.val) = NEW_RESCUE((yyvsp[-2].val), NEW_RESBODY(0, remove_begin((yyvsp[0].val)), 0, &loc), 0, &(yyloc));
7707#endif
7708 {VALUE v1,v2,v3;v1=(yyvsp[-2].val);v2=(yyvsp[0].val);v3=dispatch2(rescue_mod,v1,v2);(yyval.val)=v3;}
7709 }
7710#line 7706 "ripper.c"
7711 break;
7712
7713 case 57: /* expr: expr "`and'" expr */
7714#line 1741 "ripper.y"
7715 {
7716 (yyval.val) = logop(p, idAND, (yyvsp[-2].val), (yyvsp[0].val), &(yylsp[-1]), &(yyloc));
7717 }
7718#line 7714 "ripper.c"
7719 break;
7720
7721 case 58: /* expr: expr "`or'" expr */
7722#line 1745 "ripper.y"
7723 {
7724 (yyval.val) = logop(p, idOR, (yyvsp[-2].val), (yyvsp[0].val), &(yylsp[-1]), &(yyloc));
7725 }
7726#line 7722 "ripper.c"
7727 break;
7728
7729 case 59: /* expr: "`not'" opt_nl expr */
7730#line 1749 "ripper.y"
7731 {
7732 (yyval.val) = call_uni_op(p, method_cond(p, (yyvsp[0].val), &(yylsp[0])), METHOD_NOT, &(yylsp[-2]), &(yyloc));
7733 }
7734#line 7730 "ripper.c"
7735 break;
7736
7737 case 60: /* expr: '!' command_call */
7738#line 1753 "ripper.y"
7739 {
7740 (yyval.val) = call_uni_op(p, method_cond(p, (yyvsp[0].val), &(yylsp[0])), '!', &(yylsp[-1]), &(yyloc));
7741 }
7742#line 7738 "ripper.c"
7743 break;
7744
7745 case 61: /* @5: %empty */
7746#line 1757 "ripper.y"
7747 {
7748 value_expr((yyvsp[-1].val));
7749 SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
7750 p->command_start = FALSE;
7751 (yyvsp[0].ctxt) = p->ctxt;
7752 p->ctxt.in_kwarg = 1;
7753 (yyval.tbl) = push_pvtbl(p);
7754 }
7755#line 7751 "ripper.c"
7756 break;
7757
7758 case 62: /* @6: %empty */
7759#line 1765 "ripper.y"
7760 {
7761 (yyval.tbl) = push_pktbl(p);
7762 }
7763#line 7759 "ripper.c"
7764 break;
7765
7766 case 63: /* expr: arg "=>" @5 @6 p_top_expr_body */
7767#line 1769 "ripper.y"
7768 {
7769 pop_pktbl(p, (yyvsp[-1].tbl));
7770 pop_pvtbl(p, (yyvsp[-2].tbl));
7771 p->ctxt.in_kwarg = (yyvsp[-3].ctxt).in_kwarg;
7772#if 0
7773 (yyval.val) = NEW_CASE3((yyvsp[-4].val), NEW_IN((yyvsp[0].val), 0, 0, &(yylsp[0])), &(yyloc));
7774#endif
7775 {VALUE v1,v2,v3,v4,v5,v6,v7;v1=(yyvsp[0].val);v2=Qnil;v3=Qnil;v4=dispatch3(in,v1,v2,v3);v5=(yyvsp[-4].val);v6=v4;v7=dispatch2(case,v5,v6);(yyval.val)=v7;}
7776 }
7777#line 7773 "ripper.c"
7778 break;
7779
7780 case 64: /* @7: %empty */
7781#line 1779 "ripper.y"
7782 {
7783 value_expr((yyvsp[-1].val));
7784 SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
7785 p->command_start = FALSE;
7786 (yyvsp[0].ctxt) = p->ctxt;
7787 p->ctxt.in_kwarg = 1;
7788 (yyval.tbl) = push_pvtbl(p);
7789 }
7790#line 7786 "ripper.c"
7791 break;
7792
7793 case 65: /* @8: %empty */
7794#line 1787 "ripper.y"
7795 {
7796 (yyval.tbl) = push_pktbl(p);
7797 }
7798#line 7794 "ripper.c"
7799 break;
7800
7801 case 66: /* expr: arg "`in'" @7 @8 p_top_expr_body */
7802#line 1791 "ripper.y"
7803 {
7804 pop_pktbl(p, (yyvsp[-1].tbl));
7805 pop_pvtbl(p, (yyvsp[-2].tbl));
7806 p->ctxt.in_kwarg = (yyvsp[-3].ctxt).in_kwarg;
7807#if 0
7808 (yyval.val) = NEW_CASE3((yyvsp[-4].val), NEW_IN((yyvsp[0].val), NEW_TRUE(&(yylsp[0])), NEW_FALSE(&(yylsp[0])), &(yylsp[0])), &(yyloc));
7809#endif
7810 {VALUE v1,v2,v3,v4,v5,v6,v7;v1=(yyvsp[0].val);v2=Qnil;v3=Qnil;v4=dispatch3(in,v1,v2,v3);v5=(yyvsp[-4].val);v6=v4;v7=dispatch2(case,v5,v6);(yyval.val)=v7;}
7811 }
7812#line 7808 "ripper.c"
7813 break;
7814
7815 case 68: /* def_name: fname */
7816#line 1804 "ripper.y"
7817 {
7818 ID fname = get_id((yyvsp[0].val));
7819 ID cur_arg = p->cur_arg;
7820 YYSTYPE c = {.ctxt = p->ctxt};
7821 numparam_name(p, fname);
7822 local_push(p, 0);
7823 p->cur_arg = 0;
7824 p->ctxt.in_def = 1;
7825 (yyval.node) = NEW_NODE(NODE_SELF, /*vid*/cur_arg, /*mid*/fname, /*cval*/c.val, &(yyloc));
7826#if 0
7827#endif
7828 (yyval.val) = NEW_RIPPER(fname, get_value((yyvsp[0].val)), (yyval.val), &NULL_LOC);
7829
7830 }
7831#line 7827 "ripper.c"
7832 break;
7833
7834 case 69: /* defn_head: k_def def_name */
7835#line 1821 "ripper.y"
7836 {
7837 (yyval.val) = (yyvsp[0].val);
7838#if 0
7839 (yyval.val) = NEW_NODE(NODE_DEFN, 0, (yyval.val)->nd_mid, (yyval.val), &(yyloc));
7840#endif
7841 }
7842#line 7838 "ripper.c"
7843 break;
7844
7845 case 70: /* $@9: %empty */
7846#line 1830 "ripper.y"
7847 {
7848 SET_LEX_STATE(EXPR_FNAME);
7849 p->ctxt.in_argdef = 1;
7850 }
7851#line 7847 "ripper.c"
7852 break;
7853
7854 case 71: /* defs_head: k_def singleton dot_or_colon $@9 def_name */
7855#line 1835 "ripper.y"
7856 {
7857 SET_LEX_STATE(EXPR_ENDFN|EXPR_LABEL); /* force for args */
7858 (yyval.val) = (yyvsp[0].val);
7859#if 0
7860 (yyval.val) = NEW_NODE(NODE_DEFS, (yyvsp[-3].val), (yyval.val)->nd_mid, (yyval.val), &(yyloc));
7861#endif
7862 VALUE ary = rb_ary_new_from_args(3, (yyvsp[-3].val), (yyvsp[-2].val), get_value((yyval.val)));
7863 add_mark_object(p, ary);
7864 (yyval.node)->nd_rval = ary;
7865
7866 }
7867#line 7863 "ripper.c"
7868 break;
7869
7870 case 72: /* expr_value: expr */
7871#line 1849 "ripper.y"
7872 {
7873 value_expr((yyvsp[0].val));
7874 (yyval.val) = (yyvsp[0].val);
7875 }
7876#line 7872 "ripper.c"
7877 break;
7878
7879 case 73: /* $@10: %empty */
7880#line 1855 "ripper.y"
7881 {COND_PUSH(1);}
7882#line 7878 "ripper.c"
7883 break;
7884
7885 case 74: /* $@11: %empty */
7886#line 1855 "ripper.y"
7887 {COND_POP();}
7888#line 7884 "ripper.c"
7889 break;
7890
7891 case 75: /* expr_value_do: $@10 expr_value do $@11 */
7892#line 1856 "ripper.y"
7893 {
7894 (yyval.val) = (yyvsp[-2].val);
7895 }
7896#line 7892 "ripper.c"
7897 break;
7898
7899 case 79: /* block_command: block_call call_op2 operation2 command_args */
7900#line 1867 "ripper.y"
7901 {
7902#if 0
7903 (yyval.val) = new_qcall(p, (yyvsp[-2].val), (yyvsp[-3].val), (yyvsp[-1].val), (yyvsp[0].val), &(yylsp[-1]), &(yyloc));
7904#endif
7905 {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;}
7906 }
7907#line 7903 "ripper.c"
7908 break;
7909
7910 case 80: /* cmd_brace_block: "{ arg" brace_body '}' */
7911#line 1876 "ripper.y"
7912 {
7913 (yyval.val) = (yyvsp[-1].val);
7914#if 0
7915 (yyval.val)->nd_body->nd_loc = code_loc_gen(&(yylsp[-2]), &(yylsp[0]));
7916 nd_set_line((yyval.val), (yylsp[-2]).end_pos.lineno);
7917#endif
7918 }
7919#line 7915 "ripper.c"
7920 break;
7921
7922 case 81: /* fcall: operation */
7923#line 1886 "ripper.y"
7924 {
7925#if 0
7926 (yyval.val) = NEW_FCALL((yyvsp[0].val), 0, &(yyloc));
7927 nd_set_line((yyval.val), p->tokline);
7928#endif
7929 (yyval.val)=(yyvsp[0].val);
7930 }
7931#line 7927 "ripper.c"
7932 break;
7933
7934 case 82: /* command: fcall command_args */
7935#line 1896 "ripper.y"
7936 {
7937#if 0
7938 (yyvsp[-1].val)->nd_args = (yyvsp[0].val);
7939 nd_set_last_loc((yyvsp[-1].val), (yylsp[0]).end_pos);
7940 (yyval.val) = (yyvsp[-1].val);
7941#endif
7942 {VALUE v1,v2,v3;v1=(yyvsp[-1].val);v2=(yyvsp[0].val);v3=dispatch2(command,v1,v2);(yyval.val)=v3;}
7943 }
7944#line 7940 "ripper.c"
7945 break;
7946
7947 case 83: /* command: fcall command_args cmd_brace_block */
7948#line 1905 "ripper.y"
7949 {
7950#if 0
7951 block_dup_check(p, (yyvsp[-1].val), (yyvsp[0].val));
7952 (yyvsp[-2].val)->nd_args = (yyvsp[-1].val);
7953 (yyval.val) = method_add_block(p, (yyvsp[-2].val), (yyvsp[0].val), &(yyloc));
7954 fixpos((yyval.val), (yyvsp[-2].val));
7955 nd_set_last_loc((yyvsp[-2].val), (yylsp[-1]).end_pos);
7956#endif
7957 {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;}
7958 }
7959#line 7955 "ripper.c"
7960 break;
7961
7962 case 84: /* command: primary_value call_op operation2 command_args */
7963#line 1916 "ripper.y"
7964 {
7965#if 0
7966 (yyval.val) = new_command_qcall(p, (yyvsp[-2].val), (yyvsp[-3].val), (yyvsp[-1].val), (yyvsp[0].val), Qnull, &(yylsp[-1]), &(yyloc));
7967#endif
7968 {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;}
7969 }
7970#line 7966 "ripper.c"
7971 break;
7972
7973 case 85: /* command: primary_value call_op operation2 command_args cmd_brace_block */
7974#line 1923 "ripper.y"
7975 {
7976#if 0
7977 (yyval.val) = new_command_qcall(p, (yyvsp[-3].val), (yyvsp[-4].val), (yyvsp[-2].val), (yyvsp[-1].val), (yyvsp[0].val), &(yylsp[-2]), &(yyloc));
7978#endif
7979 {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;}
7980 }
7981#line 7977 "ripper.c"
7982 break;
7983
7984 case 86: /* command: primary_value "::" operation2 command_args */
7985#line 1930 "ripper.y"
7986 {
7987#if 0
7988 (yyval.val) = new_command_qcall(p, ID2VAL(idCOLON2), (yyvsp[-3].val), (yyvsp[-1].val), (yyvsp[0].val), Qnull, &(yylsp[-1]), &(yyloc));
7989#endif
7990 {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;}
7991 }
7992#line 7988 "ripper.c"
7993 break;
7994
7995 case 87: /* command: primary_value "::" operation2 command_args cmd_brace_block */
7996#line 1937 "ripper.y"
7997 {
7998#if 0
7999 (yyval.val) = new_command_qcall(p, ID2VAL(idCOLON2), (yyvsp[-4].val), (yyvsp[-2].val), (yyvsp[-1].val), (yyvsp[0].val), &(yylsp[-2]), &(yyloc));
8000#endif
8001 {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;}
8002 }
8003#line 7999 "ripper.c"
8004 break;
8005
8006 case 88: /* command: "`super'" command_args */
8007#line 1944 "ripper.y"
8008 {
8009#if 0
8010 (yyval.val) = NEW_SUPER((yyvsp[0].val), &(yyloc));
8011 fixpos((yyval.val), (yyvsp[0].val));
8012#endif
8013 {VALUE v1,v2;v1=(yyvsp[0].val);v2=dispatch1(super,v1);(yyval.val)=v2;}
8014 }
8015#line 8011 "ripper.c"
8016 break;
8017
8018 case 89: /* command: "`yield'" command_args */
8019#line 1952 "ripper.y"
8020 {
8021#if 0
8022 (yyval.val) = new_yield(p, (yyvsp[0].val), &(yyloc));
8023 fixpos((yyval.val), (yyvsp[0].val));
8024#endif
8025 {VALUE v1,v2;v1=(yyvsp[0].val);v2=dispatch1(yield,v1);(yyval.val)=v2;}
8026 }
8027#line 8023 "ripper.c"
8028 break;
8029
8030 case 90: /* command: k_return call_args */
8031#line 1960 "ripper.y"
8032 {
8033#if 0
8034 (yyval.val) = NEW_RETURN(ret_args(p, (yyvsp[0].val)), &(yyloc));
8035#endif
8036 {VALUE v1,v2;v1=(yyvsp[0].val);v2=dispatch1(return,v1);(yyval.val)=v2;}
8037 }
8038#line 8034 "ripper.c"
8039 break;
8040
8041 case 91: /* command: "`break'" call_args */
8042#line 1967 "ripper.y"
8043 {
8044#if 0
8045 (yyval.val) = NEW_BREAK(ret_args(p, (yyvsp[0].val)), &(yyloc));
8046#endif
8047 {VALUE v1,v2;v1=(yyvsp[0].val);v2=dispatch1(break,v1);(yyval.val)=v2;}
8048 }
8049#line 8045 "ripper.c"
8050 break;
8051
8052 case 92: /* command: "`next'" call_args */
8053#line 1974 "ripper.y"
8054 {
8055#if 0
8056 (yyval.val) = NEW_NEXT(ret_args(p, (yyvsp[0].val)), &(yyloc));
8057#endif
8058 {VALUE v1,v2;v1=(yyvsp[0].val);v2=dispatch1(next,v1);(yyval.val)=v2;}
8059 }
8060#line 8056 "ripper.c"
8061 break;
8062
8063 case 94: /* mlhs: "(" mlhs_inner rparen */
8064#line 1984 "ripper.y"
8065 {
8066#if 0
8067 (yyval.val) = (yyvsp[-1].val);
8068#endif
8069 {VALUE v1,v2;v1=(yyvsp[-1].val);v2=dispatch1(mlhs_paren,v1);(yyval.val)=v2;}
8070 }
8071#line 8067 "ripper.c"
8072 break;
8073
8074 case 96: /* mlhs_inner: "(" mlhs_inner rparen */
8075#line 1994 "ripper.y"
8076 {
8077#if 0
8078 (yyval.val) = NEW_MASGN(NEW_LIST((yyvsp[-1].val), &(yyloc)), 0, &(yyloc));
8079#endif
8080 {VALUE v1,v2;v1=(yyvsp[-1].val);v2=dispatch1(mlhs_paren,v1);(yyval.val)=v2;}
8081 }
8082#line 8078 "ripper.c"
8083 break;
8084
8085 case 97: /* mlhs_basic: mlhs_head */
8086#line 2003 "ripper.y"
8087 {
8088#if 0
8089 (yyval.val) = NEW_MASGN((yyvsp[0].val), 0, &(yyloc));
8090#endif
8091 (yyval.val)=(yyvsp[0].val);
8092 }
8093#line 8089 "ripper.c"
8094 break;
8095
8096 case 98: /* mlhs_basic: mlhs_head mlhs_item */
8097#line 2010 "ripper.y"
8098 {
8099#if 0
8100 (yyval.val) = NEW_MASGN(list_append(p, (yyvsp[-1].val),(yyvsp[0].val)), 0, &(yyloc));
8101#endif
8102 {VALUE v1,v2,v3;v1=(yyvsp[-1].val);v2=(yyvsp[0].val);v3=dispatch2(mlhs_add,v1,v2);(yyval.val)=v3;}
8103 }
8104#line 8100 "ripper.c"
8105 break;
8106
8107 case 99: /* mlhs_basic: mlhs_head "*" mlhs_node */
8108#line 2017 "ripper.y"
8109 {
8110#if 0
8111 (yyval.val) = NEW_MASGN((yyvsp[-2].val), (yyvsp[0].val), &(yyloc));
8112#endif
8113 {VALUE v1,v2,v3;v1=(yyvsp[-2].val);v2=(yyvsp[0].val);v3=dispatch2(mlhs_add_star,v1,v2);(yyval.val)=v3;}
8114 }
8115#line 8111 "ripper.c"
8116 break;
8117
8118 case 100: /* mlhs_basic: mlhs_head "*" mlhs_node ',' mlhs_post */
8119#line 2024 "ripper.y"
8120 {
8121#if 0
8122 (yyval.val) = NEW_MASGN((yyvsp[-4].val), NEW_POSTARG((yyvsp[-2].val),(yyvsp[0].val),&(yyloc)), &(yyloc));
8123#endif
8124 {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;}
8125 }
8126#line 8122 "ripper.c"
8127 break;
8128
8129 case 101: /* mlhs_basic: mlhs_head "*" */
8130#line 2031 "ripper.y"
8131 {
8132#if 0
8133 (yyval.val) = NEW_MASGN((yyvsp[-1].val), NODE_SPECIAL_NO_NAME_REST, &(yyloc));
8134#endif
8135 {VALUE v1,v2,v3;v1=(yyvsp[-1].val);v2=Qnil;v3=dispatch2(mlhs_add_star,v1,v2);(yyval.val)=v3;}
8136 }
8137#line 8133 "ripper.c"
8138 break;
8139
8140 case 102: /* mlhs_basic: mlhs_head "*" ',' mlhs_post */
8141#line 2038 "ripper.y"
8142 {
8143#if 0
8144 (yyval.val) = NEW_MASGN((yyvsp[-3].val), NEW_POSTARG(NODE_SPECIAL_NO_NAME_REST, (yyvsp[0].val), &(yyloc)), &(yyloc));
8145#endif
8146 {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;}
8147 }
8148#line 8144 "ripper.c"
8149 break;
8150
8151 case 103: /* mlhs_basic: "*" mlhs_node */
8152#line 2045 "ripper.y"
8153 {
8154#if 0
8155 (yyval.val) = NEW_MASGN(0, (yyvsp[0].val), &(yyloc));
8156#endif
8157 {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;}
8158 }
8159#line 8155 "ripper.c"
8160 break;
8161
8162 case 104: /* mlhs_basic: "*" mlhs_node ',' mlhs_post */
8163#line 2052 "ripper.y"
8164 {
8165#if 0
8166 (yyval.val) = NEW_MASGN(0, NEW_POSTARG((yyvsp[-2].val),(yyvsp[0].val),&(yyloc)), &(yyloc));
8167#endif
8168 {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;}
8169 }
8170#line 8166 "ripper.c"
8171 break;
8172
8173 case 105: /* mlhs_basic: "*" */
8174#line 2059 "ripper.y"
8175 {
8176#if 0
8177 (yyval.val) = NEW_MASGN(0, NODE_SPECIAL_NO_NAME_REST, &(yyloc));
8178#endif
8179 {VALUE v1,v2,v3,v4;v1=dispatch0(mlhs_new);v2=v1;v3=Qnil;v4=dispatch2(mlhs_add_star,v2,v3);(yyval.val)=v4;}
8180 }
8181#line 8177 "ripper.c"
8182 break;
8183
8184 case 106: /* mlhs_basic: "*" ',' mlhs_post */
8185#line 2066 "ripper.y"
8186 {
8187#if 0
8188 (yyval.val) = NEW_MASGN(0, NEW_POSTARG(NODE_SPECIAL_NO_NAME_REST, (yyvsp[0].val), &(yyloc)), &(yyloc));
8189#endif
8190 {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;}
8191 }
8192#line 8188 "ripper.c"
8193 break;
8194
8195 case 108: /* mlhs_item: "(" mlhs_inner rparen */
8196#line 2076 "ripper.y"
8197 {
8198#if 0
8199 (yyval.val) = (yyvsp[-1].val);
8200#endif
8201 {VALUE v1,v2;v1=(yyvsp[-1].val);v2=dispatch1(mlhs_paren,v1);(yyval.val)=v2;}
8202 }
8203#line 8199 "ripper.c"
8204 break;
8205
8206 case 109: /* mlhs_head: mlhs_item ',' */
8207#line 2085 "ripper.y"
8208 {
8209#if 0
8210 (yyval.val) = NEW_LIST((yyvsp[-1].val), &(yylsp[-1]));
8211#endif
8212 {VALUE v1,v2,v3,v4;v1=dispatch0(mlhs_new);v2=v1;v3=(yyvsp[-1].val);v4=dispatch2(mlhs_add,v2,v3);(yyval.val)=v4;}
8213 }
8214#line 8210 "ripper.c"
8215 break;
8216
8217 case 110: /* mlhs_head: mlhs_head mlhs_item ',' */
8218#line 2092 "ripper.y"
8219 {
8220#if 0
8221 (yyval.val) = list_append(p, (yyvsp[-2].val), (yyvsp[-1].val));
8222#endif
8223 {VALUE v1,v2,v3;v1=(yyvsp[-2].val);v2=(yyvsp[-1].val);v3=dispatch2(mlhs_add,v1,v2);(yyval.val)=v3;}
8224 }
8225#line 8221 "ripper.c"
8226 break;
8227
8228 case 111: /* mlhs_post: mlhs_item */
8229#line 2101 "ripper.y"
8230 {
8231#if 0
8232 (yyval.val) = NEW_LIST((yyvsp[0].val), &(yyloc));
8233#endif
8234 {VALUE v1,v2,v3,v4;v1=dispatch0(mlhs_new);v2=v1;v3=(yyvsp[0].val);v4=dispatch2(mlhs_add,v2,v3);(yyval.val)=v4;}
8235 }
8236#line 8232 "ripper.c"
8237 break;
8238
8239 case 112: /* mlhs_post: mlhs_post ',' mlhs_item */
8240#line 2108 "ripper.y"
8241 {
8242#if 0
8243 (yyval.val) = list_append(p, (yyvsp[-2].val), (yyvsp[0].val));
8244#endif
8245 {VALUE v1,v2,v3;v1=(yyvsp[-2].val);v2=(yyvsp[0].val);v3=dispatch2(mlhs_add,v1,v2);(yyval.val)=v3;}
8246 }
8247#line 8243 "ripper.c"
8248 break;
8249
8250 case 113: /* mlhs_node: user_variable */
8251#line 2117 "ripper.y"
8252 {
8253#if 0
8254 (yyval.val) = assignable(p, (yyvsp[0].val), 0, &(yyloc));
8255#endif
8256 (yyval.val)=assignable(p, var_field(p, (yyvsp[0].val)));
8257 }
8258#line 8254 "ripper.c"
8259 break;
8260
8261 case 114: /* mlhs_node: keyword_variable */
8262#line 2124 "ripper.y"
8263 {
8264#if 0
8265 (yyval.val) = assignable(p, (yyvsp[0].val), 0, &(yyloc));
8266#endif
8267 (yyval.val)=assignable(p, var_field(p, (yyvsp[0].val)));
8268 }
8269#line 8265 "ripper.c"
8270 break;
8271
8272 case 115: /* mlhs_node: primary_value '[' opt_call_args rbracket */
8273#line 2131 "ripper.y"
8274 {
8275#if 0
8276 (yyval.val) = aryset(p, (yyvsp[-3].val), (yyvsp[-1].val), &(yyloc));
8277#endif
8278 {VALUE v1,v2,v3;v1=(yyvsp[-3].val);v2=escape_Qundef((yyvsp[-1].val));v3=dispatch2(aref_field,v1,v2);(yyval.val)=v3;}
8279 }
8280#line 8276 "ripper.c"
8281 break;
8282
8283 case 116: /* mlhs_node: primary_value call_op "local variable or method" */
8284#line 2138 "ripper.y"
8285 {
8286 if ((yyvsp[-1].val) == tANDDOT) {
8287 yyerror1(&(yylsp[-1]), "&. inside multiple assignment destination");
8288 }
8289#if 0
8290 (yyval.val) = attrset(p, (yyvsp[-2].val), (yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
8291#endif
8292 {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;}
8293 }
8294#line 8290 "ripper.c"
8295 break;
8296
8297 case 117: /* mlhs_node: primary_value "::" "local variable or method" */
8298#line 2148 "ripper.y"
8299 {
8300#if 0
8301 (yyval.val) = attrset(p, (yyvsp[-2].val), idCOLON2, (yyvsp[0].val), &(yyloc));
8302#endif
8303 {VALUE v1,v2,v3;v1=(yyvsp[-2].val);v2=(yyvsp[0].val);v3=dispatch2(const_path_field,v1,v2);(yyval.val)=v3;}
8304 }
8305#line 8301 "ripper.c"
8306 break;
8307
8308 case 118: /* mlhs_node: primary_value call_op "constant" */
8309#line 2155 "ripper.y"
8310 {
8311 if ((yyvsp[-1].val) == tANDDOT) {
8312 yyerror1(&(yylsp[-1]), "&. inside multiple assignment destination");
8313 }
8314#if 0
8315 (yyval.val) = attrset(p, (yyvsp[-2].val), (yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
8316#endif
8317 {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;}
8318 }
8319#line 8315 "ripper.c"
8320 break;
8321
8322 case 119: /* mlhs_node: primary_value "::" "constant" */
8323#line 2165 "ripper.y"
8324 {
8325#if 0
8326 (yyval.val) = const_decl(p, NEW_COLON2((yyvsp[-2].val), (yyvsp[0].val), &(yyloc)), &(yyloc));
8327#endif
8328 {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);}
8329 }
8330#line 8326 "ripper.c"
8331 break;
8332
8333 case 120: /* mlhs_node: ":: at EXPR_BEG" "constant" */
8334#line 2172 "ripper.y"
8335 {
8336#if 0
8337 (yyval.val) = const_decl(p, NEW_COLON3((yyvsp[0].val), &(yyloc)), &(yyloc));
8338#endif
8339 {VALUE v1,v2;v1=(yyvsp[0].val);v2=dispatch1(top_const_field,v1);(yyval.val)=const_decl(p, v2);}
8340 }
8341#line 8337 "ripper.c"
8342 break;
8343
8344 case 121: /* mlhs_node: backref */
8345#line 2179 "ripper.y"
8346 {
8347#if 0
8348 rb_backref_error(p, (yyvsp[0].val));
8349 (yyval.val) = NEW_BEGIN(0, &(yyloc));
8350#endif
8351 (yyval.val)=backref_error(p, RNODE((yyvsp[0].val)), var_field(p, (yyvsp[0].val)));ripper_error(p);
8352 }
8353#line 8349 "ripper.c"
8354 break;
8355
8356 case 122: /* lhs: user_variable */
8357#line 2189 "ripper.y"
8358 {
8359#if 0
8360 (yyval.val) = assignable(p, (yyvsp[0].val), 0, &(yyloc));
8361#endif
8362 (yyval.val)=assignable(p, var_field(p, (yyvsp[0].val)));
8363 }
8364#line 8360 "ripper.c"
8365 break;
8366
8367 case 123: /* lhs: keyword_variable */
8368#line 2196 "ripper.y"
8369 {
8370#if 0
8371 (yyval.val) = assignable(p, (yyvsp[0].val), 0, &(yyloc));
8372#endif
8373 (yyval.val)=assignable(p, var_field(p, (yyvsp[0].val)));
8374 }
8375#line 8371 "ripper.c"
8376 break;
8377
8378 case 124: /* lhs: primary_value '[' opt_call_args rbracket */
8379#line 2203 "ripper.y"
8380 {
8381#if 0
8382 (yyval.val) = aryset(p, (yyvsp[-3].val), (yyvsp[-1].val), &(yyloc));
8383#endif
8384 {VALUE v1,v2,v3;v1=(yyvsp[-3].val);v2=escape_Qundef((yyvsp[-1].val));v3=dispatch2(aref_field,v1,v2);(yyval.val)=v3;}
8385 }
8386#line 8382 "ripper.c"
8387 break;
8388
8389 case 125: /* lhs: primary_value call_op "local variable or method" */
8390#line 2210 "ripper.y"
8391 {
8392#if 0
8393 (yyval.val) = attrset(p, (yyvsp[-2].val), (yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
8394#endif
8395 {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;}
8396 }
8397#line 8393 "ripper.c"
8398 break;
8399
8400 case 126: /* lhs: primary_value "::" "local variable or method" */
8401#line 2217 "ripper.y"
8402 {
8403#if 0
8404 (yyval.val) = attrset(p, (yyvsp[-2].val), idCOLON2, (yyvsp[0].val), &(yyloc));
8405#endif
8406 {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;}
8407 }
8408#line 8404 "ripper.c"
8409 break;
8410
8411 case 127: /* lhs: primary_value call_op "constant" */
8412#line 2224 "ripper.y"
8413 {
8414#if 0
8415 (yyval.val) = attrset(p, (yyvsp[-2].val), (yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
8416#endif
8417 {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;}
8418 }
8419#line 8415 "ripper.c"
8420 break;
8421
8422 case 128: /* lhs: primary_value "::" "constant" */
8423#line 2231 "ripper.y"
8424 {
8425#if 0
8426 (yyval.val) = const_decl(p, NEW_COLON2((yyvsp[-2].val), (yyvsp[0].val), &(yyloc)), &(yyloc));
8427#endif
8428 {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);}
8429 }
8430#line 8426 "ripper.c"
8431 break;
8432
8433 case 129: /* lhs: ":: at EXPR_BEG" "constant" */
8434#line 2238 "ripper.y"
8435 {
8436#if 0
8437 (yyval.val) = const_decl(p, NEW_COLON3((yyvsp[0].val), &(yyloc)), &(yyloc));
8438#endif
8439 {VALUE v1,v2;v1=(yyvsp[0].val);v2=dispatch1(top_const_field,v1);(yyval.val)=const_decl(p, v2);}
8440 }
8441#line 8437 "ripper.c"
8442 break;
8443
8444 case 130: /* lhs: backref */
8445#line 2245 "ripper.y"
8446 {
8447#if 0
8448 rb_backref_error(p, (yyvsp[0].val));
8449 (yyval.val) = NEW_BEGIN(0, &(yyloc));
8450#endif
8451 (yyval.val)=backref_error(p, RNODE((yyvsp[0].val)), var_field(p, (yyvsp[0].val)));ripper_error(p);
8452 }
8453#line 8449 "ripper.c"
8454 break;
8455
8456 case 131: /* cname: "local variable or method" */
8457#line 2255 "ripper.y"
8458 {
8459 static const char mesg[] = "class/module name must be CONSTANT";
8460#if 0
8461 yyerror1(&(yylsp[0]), mesg);
8462#endif
8463 {VALUE v1,v2,v3;v1=ERR_MESG();v2=(yyvsp[0].val);v3=dispatch2(class_name_error,v1,v2);(yyval.val)=v3;}ripper_error(p);
8464 }
8465#line 8461 "ripper.c"
8466 break;
8467
8468 case 133: /* cpath: ":: at EXPR_BEG" cname */
8469#line 2266 "ripper.y"
8470 {
8471#if 0
8472 (yyval.val) = NEW_COLON3((yyvsp[0].val), &(yyloc));
8473#endif
8474 {VALUE v1,v2;v1=(yyvsp[0].val);v2=dispatch1(top_const_ref,v1);(yyval.val)=v2;}
8475 }
8476#line 8472 "ripper.c"
8477 break;
8478
8479 case 134: /* cpath: cname */
8480#line 2273 "ripper.y"
8481 {
8482#if 0
8483 (yyval.val) = NEW_COLON2(0, (yyval.val), &(yyloc));
8484#endif
8485 {VALUE v1,v2;v1=(yyvsp[0].val);v2=dispatch1(const_ref,v1);(yyval.val)=v2;}
8486 }
8487#line 8483 "ripper.c"
8488 break;
8489
8490 case 135: /* cpath: primary_value "::" cname */
8491#line 2280 "ripper.y"
8492 {
8493#if 0
8494 (yyval.val) = NEW_COLON2((yyvsp[-2].val), (yyvsp[0].val), &(yyloc));
8495#endif
8496 {VALUE v1,v2,v3;v1=(yyvsp[-2].val);v2=(yyvsp[0].val);v3=dispatch2(const_path_ref,v1,v2);(yyval.val)=v3;}
8497 }
8498#line 8494 "ripper.c"
8499 break;
8500
8501 case 139: /* fname: op */
8502#line 2292 "ripper.y"
8503 {
8504 SET_LEX_STATE(EXPR_ENDFN);
8505 (yyval.val) = (yyvsp[0].val);
8506 }
8507#line 8503 "ripper.c"
8508 break;
8509
8510 case 141: /* fitem: fname */
8511#line 2300 "ripper.y"
8512 {
8513#if 0
8514 (yyval.val) = NEW_LIT(ID2SYM((yyvsp[0].val)), &(yyloc));
8515#endif
8516 {VALUE v1,v2;v1=(yyvsp[0].val);v2=dispatch1(symbol_literal,v1);(yyval.val)=v2;}
8517 }
8518#line 8514 "ripper.c"
8519 break;
8520
8521 case 143: /* undef_list: fitem */
8522#line 2310 "ripper.y"
8523 {
8524#if 0
8525 (yyval.val) = NEW_UNDEF((yyvsp[0].val), &(yyloc));
8526#endif
8527 (yyval.val)=rb_ary_new3(1, get_value((yyvsp[0].val)));
8528 }
8529#line 8525 "ripper.c"
8530 break;
8531
8532 case 144: /* $@12: %empty */
8533#line 2316 "ripper.y"
8534 {SET_LEX_STATE(EXPR_FNAME|EXPR_FITEM);}
8535#line 8531 "ripper.c"
8536 break;
8537
8538 case 145: /* undef_list: undef_list ',' $@12 fitem */
8539#line 2317 "ripper.y"
8540 {
8541#if 0
8542 NODE *undef = NEW_UNDEF((yyvsp[0].val), &(yylsp[0]));
8543 (yyval.val) = block_append(p, (yyvsp[-3].val), undef);
8544#endif
8545 (yyval.val)=rb_ary_push((yyvsp[-3].val), get_value((yyvsp[0].val)));
8546 }
8547#line 8543 "ripper.c"
8548 break;
8549
8550 case 146: /* op: '|' */
8551#line 2326 "ripper.y"
8552 { ifndef_ripper((yyval.val) = '|'); }
8553#line 8549 "ripper.c"
8554 break;
8555
8556 case 147: /* op: '^' */
8557#line 2327 "ripper.y"
8558 { ifndef_ripper((yyval.val) = '^'); }
8559#line 8555 "ripper.c"
8560 break;
8561
8562 case 148: /* op: '&' */
8563#line 2328 "ripper.y"
8564 { ifndef_ripper((yyval.val) = '&'); }
8565#line 8561 "ripper.c"
8566 break;
8567
8568 case 149: /* op: "<=>" */
8569#line 2329 "ripper.y"
8570 { ifndef_ripper((yyval.val) = tCMP); }
8571#line 8567 "ripper.c"
8572 break;
8573
8574 case 150: /* op: "==" */
8575#line 2330 "ripper.y"
8576 { ifndef_ripper((yyval.val) = tEQ); }
8577#line 8573 "ripper.c"
8578 break;
8579
8580 case 151: /* op: "===" */
8581#line 2331 "ripper.y"
8582 { ifndef_ripper((yyval.val) = tEQQ); }
8583#line 8579 "ripper.c"
8584 break;
8585
8586 case 152: /* op: "=~" */
8587#line 2332 "ripper.y"
8588 { ifndef_ripper((yyval.val) = tMATCH); }
8589#line 8585 "ripper.c"
8590 break;
8591
8592 case 153: /* op: "!~" */
8593#line 2333 "ripper.y"
8594 { ifndef_ripper((yyval.val) = tNMATCH); }
8595#line 8591 "ripper.c"
8596 break;
8597
8598 case 154: /* op: '>' */
8599#line 2334 "ripper.y"
8600 { ifndef_ripper((yyval.val) = '>'); }
8601#line 8597 "ripper.c"
8602 break;
8603
8604 case 155: /* op: ">=" */
8605#line 2335 "ripper.y"
8606 { ifndef_ripper((yyval.val) = tGEQ); }
8607#line 8603 "ripper.c"
8608 break;
8609
8610 case 156: /* op: '<' */
8611#line 2336 "ripper.y"
8612 { ifndef_ripper((yyval.val) = '<'); }
8613#line 8609 "ripper.c"
8614 break;
8615
8616 case 157: /* op: "<=" */
8617#line 2337 "ripper.y"
8618 { ifndef_ripper((yyval.val) = tLEQ); }
8619#line 8615 "ripper.c"
8620 break;
8621
8622 case 158: /* op: "!=" */
8623#line 2338 "ripper.y"
8624 { ifndef_ripper((yyval.val) = tNEQ); }
8625#line 8621 "ripper.c"
8626 break;
8627
8628 case 159: /* op: "<<" */
8629#line 2339 "ripper.y"
8630 { ifndef_ripper((yyval.val) = tLSHFT); }
8631#line 8627 "ripper.c"
8632 break;
8633
8634 case 160: /* op: ">>" */
8635#line 2340 "ripper.y"
8636 { ifndef_ripper((yyval.val) = tRSHFT); }
8637#line 8633 "ripper.c"
8638 break;
8639
8640 case 161: /* op: '+' */
8641#line 2341 "ripper.y"
8642 { ifndef_ripper((yyval.val) = '+'); }
8643#line 8639 "ripper.c"
8644 break;
8645
8646 case 162: /* op: '-' */
8647#line 2342 "ripper.y"
8648 { ifndef_ripper((yyval.val) = '-'); }
8649#line 8645 "ripper.c"
8650 break;
8651
8652 case 163: /* op: '*' */
8653#line 2343 "ripper.y"
8654 { ifndef_ripper((yyval.val) = '*'); }
8655#line 8651 "ripper.c"
8656 break;
8657
8658 case 164: /* op: "*" */
8659#line 2344 "ripper.y"
8660 { ifndef_ripper((yyval.val) = '*'); }
8661#line 8657 "ripper.c"
8662 break;
8663
8664 case 165: /* op: '/' */
8665#line 2345 "ripper.y"
8666 { ifndef_ripper((yyval.val) = '/'); }
8667#line 8663 "ripper.c"
8668 break;
8669
8670 case 166: /* op: '%' */
8671#line 2346 "ripper.y"
8672 { ifndef_ripper((yyval.val) = '%'); }
8673#line 8669 "ripper.c"
8674 break;
8675
8676 case 167: /* op: "**" */
8677#line 2347 "ripper.y"
8678 { ifndef_ripper((yyval.val) = tPOW); }
8679#line 8675 "ripper.c"
8680 break;
8681
8682 case 168: /* op: "**arg" */
8683#line 2348 "ripper.y"
8684 { ifndef_ripper((yyval.val) = tDSTAR); }
8685#line 8681 "ripper.c"
8686 break;
8687
8688 case 169: /* op: '!' */
8689#line 2349 "ripper.y"
8690 { ifndef_ripper((yyval.val) = '!'); }
8691#line 8687 "ripper.c"
8692 break;
8693
8694 case 170: /* op: '~' */
8695#line 2350 "ripper.y"
8696 { ifndef_ripper((yyval.val) = '~'); }
8697#line 8693 "ripper.c"
8698 break;
8699
8700 case 171: /* op: "unary+" */
8701#line 2351 "ripper.y"
8702 { ifndef_ripper((yyval.val) = tUPLUS); }
8703#line 8699 "ripper.c"
8704 break;
8705
8706 case 172: /* op: "unary-" */
8707#line 2352 "ripper.y"
8708 { ifndef_ripper((yyval.val) = tUMINUS); }
8709#line 8705 "ripper.c"
8710 break;
8711
8712 case 173: /* op: "[]" */
8713#line 2353 "ripper.y"
8714 { ifndef_ripper((yyval.val) = tAREF); }
8715#line 8711 "ripper.c"
8716 break;
8717
8718 case 174: /* op: "[]=" */
8719#line 2354 "ripper.y"
8720 { ifndef_ripper((yyval.val) = tASET); }
8721#line 8717 "ripper.c"
8722 break;
8723
8724 case 175: /* op: '`' */
8725#line 2355 "ripper.y"
8726 { ifndef_ripper((yyval.val) = '`'); }
8727#line 8723 "ripper.c"
8728 break;
8729
8730 case 217: /* arg: lhs '=' lex_ctxt arg_rhs */
8731#line 2373 "ripper.y"
8732 {
8733#if 0
8734 (yyval.val) = node_assign(p, (yyvsp[-3].val), (yyvsp[0].val), (yyvsp[-1].ctxt), &(yyloc));
8735#endif
8736 {VALUE v1,v2,v3;v1=(yyvsp[-3].val);v2=(yyvsp[0].val);v3=dispatch2(assign,v1,v2);(yyval.val)=v3;}
8737 }
8738#line 8734 "ripper.c"
8739 break;
8740
8741 case 218: /* arg: var_lhs "operator-assignment" lex_ctxt arg_rhs */
8742#line 2380 "ripper.y"
8743 {
8744#if 0
8745 (yyval.val) = new_op_assign(p, (yyvsp[-3].val), (yyvsp[-2].val), (yyvsp[0].val), (yyvsp[-1].ctxt), &(yyloc));
8746#endif
8747 {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;}
8748 }
8749#line 8745 "ripper.c"
8750 break;
8751
8752 case 219: /* arg: primary_value '[' opt_call_args rbracket "operator-assignment" lex_ctxt arg_rhs */
8753#line 2387 "ripper.y"
8754 {
8755#if 0
8756 (yyval.val) = new_ary_op_assign(p, (yyvsp[-6].val), (yyvsp[-4].val), (yyvsp[-2].val), (yyvsp[0].val), &(yylsp[-4]), &(yyloc));
8757#endif
8758 {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;}
8759 }
8760#line 8756 "ripper.c"
8761 break;
8762
8763 case 220: /* arg: primary_value call_op "local variable or method" "operator-assignment" lex_ctxt arg_rhs */
8764#line 2394 "ripper.y"
8765 {
8766#if 0
8767 (yyval.val) = new_attr_op_assign(p, (yyvsp[-5].val), (yyvsp[-4].val), (yyvsp[-3].val), (yyvsp[-2].val), (yyvsp[0].val), &(yyloc));
8768#endif
8769 {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;}
8770 }
8771#line 8767 "ripper.c"
8772 break;
8773
8774 case 221: /* arg: primary_value call_op "constant" "operator-assignment" lex_ctxt arg_rhs */
8775#line 2401 "ripper.y"
8776 {
8777#if 0
8778 (yyval.val) = new_attr_op_assign(p, (yyvsp[-5].val), (yyvsp[-4].val), (yyvsp[-3].val), (yyvsp[-2].val), (yyvsp[0].val), &(yyloc));
8779#endif
8780 {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;}
8781 }
8782#line 8778 "ripper.c"
8783 break;
8784
8785 case 222: /* arg: primary_value "::" "local variable or method" "operator-assignment" lex_ctxt arg_rhs */
8786#line 2408 "ripper.y"
8787 {
8788#if 0
8789 (yyval.val) = new_attr_op_assign(p, (yyvsp[-5].val), ID2VAL(idCOLON2), (yyvsp[-3].val), (yyvsp[-2].val), (yyvsp[0].val), &(yyloc));
8790#endif
8791 {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;}
8792 }
8793#line 8789 "ripper.c"
8794 break;
8795
8796 case 223: /* arg: primary_value "::" "constant" "operator-assignment" lex_ctxt arg_rhs */
8797#line 2415 "ripper.y"
8798 {
8799#if 0
8800 YYLTYPE loc = code_loc_gen(&(yylsp[-5]), &(yylsp[-3]));
8801 (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));
8802#endif
8803 {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;}
8804 }
8805#line 8801 "ripper.c"
8806 break;
8807
8808 case 224: /* arg: ":: at EXPR_BEG" "constant" "operator-assignment" lex_ctxt arg_rhs */
8809#line 2423 "ripper.y"
8810 {
8811#if 0
8812 YYLTYPE loc = code_loc_gen(&(yylsp[-4]), &(yylsp[-3]));
8813 (yyval.val) = new_const_op_assign(p, NEW_COLON3((yyvsp[-3].val), &loc), (yyvsp[-2].val), (yyvsp[0].val), (yyvsp[-1].ctxt), &(yyloc));
8814#endif
8815 {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;}
8816 }
8817#line 8813 "ripper.c"
8818 break;
8819
8820 case 225: /* arg: backref "operator-assignment" lex_ctxt arg_rhs */
8821#line 2431 "ripper.y"
8822 {
8823#if 0
8824 rb_backref_error(p, (yyvsp[-3].val));
8825 (yyval.val) = NEW_BEGIN(0, &(yyloc));
8826#endif
8827 {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);
8828 }
8829#line 8825 "ripper.c"
8830 break;
8831
8832 case 226: /* arg: arg ".." arg */
8833#line 2439 "ripper.y"
8834 {
8835#if 0
8836 value_expr((yyvsp[-2].val));
8837 value_expr((yyvsp[0].val));
8838 (yyval.val) = NEW_DOT2((yyvsp[-2].val), (yyvsp[0].val), &(yyloc));
8839#endif
8840 {VALUE v1,v2,v3;v1=(yyvsp[-2].val);v2=(yyvsp[0].val);v3=dispatch2(dot2,v1,v2);(yyval.val)=v3;}
8841 }
8842#line 8838 "ripper.c"
8843 break;
8844
8845 case 227: /* arg: arg "..." arg */
8846#line 2448 "ripper.y"
8847 {
8848#if 0
8849 value_expr((yyvsp[-2].val));
8850 value_expr((yyvsp[0].val));
8851 (yyval.val) = NEW_DOT3((yyvsp[-2].val), (yyvsp[0].val), &(yyloc));
8852#endif
8853 {VALUE v1,v2,v3;v1=(yyvsp[-2].val);v2=(yyvsp[0].val);v3=dispatch2(dot3,v1,v2);(yyval.val)=v3;}
8854 }
8855#line 8851 "ripper.c"
8856 break;
8857
8858 case 228: /* arg: arg ".." */
8859#line 2457 "ripper.y"
8860 {
8861#if 0
8862 value_expr((yyvsp[-1].val));
8863 (yyval.val) = NEW_DOT2((yyvsp[-1].val), new_nil_at(p, &(yylsp[0]).end_pos), &(yyloc));
8864#endif
8865 {VALUE v1,v2,v3;v1=(yyvsp[-1].val);v2=Qnil;v3=dispatch2(dot2,v1,v2);(yyval.val)=v3;}
8866 }
8867#line 8863 "ripper.c"
8868 break;
8869
8870 case 229: /* arg: arg "..." */
8871#line 2465 "ripper.y"
8872 {
8873#if 0
8874 value_expr((yyvsp[-1].val));
8875 (yyval.val) = NEW_DOT3((yyvsp[-1].val), new_nil_at(p, &(yylsp[0]).end_pos), &(yyloc));
8876#endif
8877 {VALUE v1,v2,v3;v1=(yyvsp[-1].val);v2=Qnil;v3=dispatch2(dot3,v1,v2);(yyval.val)=v3;}
8878 }
8879#line 8875 "ripper.c"
8880 break;
8881
8882 case 230: /* arg: "(.." arg */
8883#line 2473 "ripper.y"
8884 {
8885#if 0
8886 value_expr((yyvsp[0].val));
8887 (yyval.val) = NEW_DOT2(new_nil_at(p, &(yylsp[-1]).beg_pos), (yyvsp[0].val), &(yyloc));
8888#endif
8889 {VALUE v1,v2,v3;v1=Qnil;v2=(yyvsp[0].val);v3=dispatch2(dot2,v1,v2);(yyval.val)=v3;}
8890 }
8891#line 8887 "ripper.c"
8892 break;
8893
8894 case 231: /* arg: "(..." arg */
8895#line 2481 "ripper.y"
8896 {
8897#if 0
8898 value_expr((yyvsp[0].val));
8899 (yyval.val) = NEW_DOT3(new_nil_at(p, &(yylsp[-1]).beg_pos), (yyvsp[0].val), &(yyloc));
8900#endif
8901 {VALUE v1,v2,v3;v1=Qnil;v2=(yyvsp[0].val);v3=dispatch2(dot3,v1,v2);(yyval.val)=v3;}
8902 }
8903#line 8899 "ripper.c"
8904 break;
8905
8906 case 232: /* arg: arg '+' arg */
8907#line 2489 "ripper.y"
8908 {
8909 (yyval.val) = call_bin_op(p, (yyvsp[-2].val), '+', (yyvsp[0].val), &(yylsp[-1]), &(yyloc));
8910 }
8911#line 8907 "ripper.c"
8912 break;
8913
8914 case 233: /* arg: arg '-' arg */
8915#line 2493 "ripper.y"
8916 {
8917 (yyval.val) = call_bin_op(p, (yyvsp[-2].val), '-', (yyvsp[0].val), &(yylsp[-1]), &(yyloc));
8918 }
8919#line 8915 "ripper.c"
8920 break;
8921
8922 case 234: /* arg: arg '*' arg */
8923#line 2497 "ripper.y"
8924 {
8925 (yyval.val) = call_bin_op(p, (yyvsp[-2].val), '*', (yyvsp[0].val), &(yylsp[-1]), &(yyloc));
8926 }
8927#line 8923 "ripper.c"
8928 break;
8929
8930 case 235: /* arg: arg '/' arg */
8931#line 2501 "ripper.y"
8932 {
8933 (yyval.val) = call_bin_op(p, (yyvsp[-2].val), '/', (yyvsp[0].val), &(yylsp[-1]), &(yyloc));
8934 }
8935#line 8931 "ripper.c"
8936 break;
8937
8938 case 236: /* arg: arg '%' arg */
8939#line 2505 "ripper.y"
8940 {
8941 (yyval.val) = call_bin_op(p, (yyvsp[-2].val), '%', (yyvsp[0].val), &(yylsp[-1]), &(yyloc));
8942 }
8943#line 8939 "ripper.c"
8944 break;
8945
8946 case 237: /* arg: arg "**" arg */
8947#line 2509 "ripper.y"
8948 {
8949 (yyval.val) = call_bin_op(p, (yyvsp[-2].val), idPow, (yyvsp[0].val), &(yylsp[-1]), &(yyloc));
8950 }
8951#line 8947 "ripper.c"
8952 break;
8953
8954 case 238: /* arg: tUMINUS_NUM simple_numeric "**" arg */
8955#line 2513 "ripper.y"
8956 {
8957 (yyval.val) = call_uni_op(p, call_bin_op(p, (yyvsp[-2].val), idPow, (yyvsp[0].val), &(yylsp[-2]), &(yyloc)), idUMinus, &(yylsp[-3]), &(yyloc));
8958 }
8959#line 8955 "ripper.c"
8960 break;
8961
8962 case 239: /* arg: "unary+" arg */
8963#line 2517 "ripper.y"
8964 {
8965 (yyval.val) = call_uni_op(p, (yyvsp[0].val), idUPlus, &(yylsp[-1]), &(yyloc));
8966 }
8967#line 8963 "ripper.c"
8968 break;
8969
8970 case 240: /* arg: "unary-" arg */
8971#line 2521 "ripper.y"
8972 {
8973 (yyval.val) = call_uni_op(p, (yyvsp[0].val), idUMinus, &(yylsp[-1]), &(yyloc));
8974 }
8975#line 8971 "ripper.c"
8976 break;
8977
8978 case 241: /* arg: arg '|' arg */
8979#line 2525 "ripper.y"
8980 {
8981 (yyval.val) = call_bin_op(p, (yyvsp[-2].val), '|', (yyvsp[0].val), &(yylsp[-1]), &(yyloc));
8982 }
8983#line 8979 "ripper.c"
8984 break;
8985
8986 case 242: /* arg: arg '^' arg */
8987#line 2529 "ripper.y"
8988 {
8989 (yyval.val) = call_bin_op(p, (yyvsp[-2].val), '^', (yyvsp[0].val), &(yylsp[-1]), &(yyloc));
8990 }
8991#line 8987 "ripper.c"
8992 break;
8993
8994 case 243: /* arg: arg '&' arg */
8995#line 2533 "ripper.y"
8996 {
8997 (yyval.val) = call_bin_op(p, (yyvsp[-2].val), '&', (yyvsp[0].val), &(yylsp[-1]), &(yyloc));
8998 }
8999#line 8995 "ripper.c"
9000 break;
9001
9002 case 244: /* arg: arg "<=>" arg */
9003#line 2537 "ripper.y"
9004 {
9005 (yyval.val) = call_bin_op(p, (yyvsp[-2].val), idCmp, (yyvsp[0].val), &(yylsp[-1]), &(yyloc));
9006 }
9007#line 9003 "ripper.c"
9008 break;
9009
9010 case 246: /* arg: arg "==" arg */
9011#line 2542 "ripper.y"
9012 {
9013 (yyval.val) = call_bin_op(p, (yyvsp[-2].val), idEq, (yyvsp[0].val), &(yylsp[-1]), &(yyloc));
9014 }
9015#line 9011 "ripper.c"
9016 break;
9017
9018 case 247: /* arg: arg "===" arg */
9019#line 2546 "ripper.y"
9020 {
9021 (yyval.val) = call_bin_op(p, (yyvsp[-2].val), idEqq, (yyvsp[0].val), &(yylsp[-1]), &(yyloc));
9022 }
9023#line 9019 "ripper.c"
9024 break;
9025
9026 case 248: /* arg: arg "!=" arg */
9027#line 2550 "ripper.y"
9028 {
9029 (yyval.val) = call_bin_op(p, (yyvsp[-2].val), idNeq, (yyvsp[0].val), &(yylsp[-1]), &(yyloc));
9030 }
9031#line 9027 "ripper.c"
9032 break;
9033
9034 case 249: /* arg: arg "=~" arg */
9035#line 2554 "ripper.y"
9036 {
9037 (yyval.val) = match_op(p, (yyvsp[-2].val), (yyvsp[0].val), &(yylsp[-1]), &(yyloc));
9038 }
9039#line 9035 "ripper.c"
9040 break;
9041
9042 case 250: /* arg: arg "!~" arg */
9043#line 2558 "ripper.y"
9044 {
9045 (yyval.val) = call_bin_op(p, (yyvsp[-2].val), idNeqTilde, (yyvsp[0].val), &(yylsp[-1]), &(yyloc));
9046 }
9047#line 9043 "ripper.c"
9048 break;
9049
9050 case 251: /* arg: '!' arg */
9051#line 2562 "ripper.y"
9052 {
9053 (yyval.val) = call_uni_op(p, method_cond(p, (yyvsp[0].val), &(yylsp[0])), '!', &(yylsp[-1]), &(yyloc));
9054 }
9055#line 9051 "ripper.c"
9056 break;
9057
9058 case 252: /* arg: '~' arg */
9059#line 2566 "ripper.y"
9060 {
9061 (yyval.val) = call_uni_op(p, (yyvsp[0].val), '~', &(yylsp[-1]), &(yyloc));
9062 }
9063#line 9059 "ripper.c"
9064 break;
9065
9066 case 253: /* arg: arg "<<" arg */
9067#line 2570 "ripper.y"
9068 {
9069 (yyval.val) = call_bin_op(p, (yyvsp[-2].val), idLTLT, (yyvsp[0].val), &(yylsp[-1]), &(yyloc));
9070 }
9071#line 9067 "ripper.c"
9072 break;
9073
9074 case 254: /* arg: arg ">>" arg */
9075#line 2574 "ripper.y"
9076 {
9077 (yyval.val) = call_bin_op(p, (yyvsp[-2].val), idGTGT, (yyvsp[0].val), &(yylsp[-1]), &(yyloc));
9078 }
9079#line 9075 "ripper.c"
9080 break;
9081
9082 case 255: /* arg: arg "&&" arg */
9083#line 2578 "ripper.y"
9084 {
9085 (yyval.val) = logop(p, idANDOP, (yyvsp[-2].val), (yyvsp[0].val), &(yylsp[-1]), &(yyloc));
9086 }
9087#line 9083 "ripper.c"
9088 break;
9089
9090 case 256: /* arg: arg "||" arg */
9091#line 2582 "ripper.y"
9092 {
9093 (yyval.val) = logop(p, idOROP, (yyvsp[-2].val), (yyvsp[0].val), &(yylsp[-1]), &(yyloc));
9094 }
9095#line 9091 "ripper.c"
9096 break;
9097
9098 case 257: /* $@13: %empty */
9099#line 2585 "ripper.y"
9100 {p->ctxt.in_defined = 1;}
9101#line 9097 "ripper.c"
9102 break;
9103
9104 case 258: /* arg: "`defined?'" opt_nl $@13 arg */
9105#line 2586 "ripper.y"
9106 {
9107 p->ctxt.in_defined = 0;
9108 (yyval.val) = new_defined(p, (yyvsp[0].val), &(yyloc));
9109 }
9110#line 9106 "ripper.c"
9111 break;
9112
9113 case 259: /* arg: arg '?' arg opt_nl ':' arg */
9114#line 2591 "ripper.y"
9115 {
9116#if 0
9117 value_expr((yyvsp[-5].val));
9118 (yyval.val) = new_if(p, (yyvsp[-5].val), (yyvsp[-3].val), (yyvsp[0].val), &(yyloc));
9119 fixpos((yyval.val), (yyvsp[-5].val));
9120#endif
9121 {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;}
9122 }
9123#line 9119 "ripper.c"
9124 break;
9125
9126 case 260: /* arg: defn_head f_opt_paren_args '=' arg */
9127#line 2600 "ripper.y"
9128 {
9129 endless_method_name(p, (yyvsp[-3].node), &(yylsp[-3]));
9130 restore_defun(p, (yyvsp[-3].node)->nd_defn);
9131#if 0
9132 (yyval.val) = set_defun_body(p, (yyvsp[-3].val), (yyvsp[-2].val), (yyvsp[0].val), &(yyloc));
9133#endif
9134 {VALUE v1,v2,v3,v4,v5;v1=(yyvsp[0].val);v2=Qnil;v3=Qnil;v4=Qnil;v5=dispatch4(bodystmt,v1,v2,v3,v4);(yyvsp[0].val)=v5;}
9135 {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;}
9136 local_pop(p);
9137 }
9138#line 9134 "ripper.c"
9139 break;
9140
9141 case 261: /* arg: defn_head f_opt_paren_args '=' arg "`rescue' modifier" arg */
9142#line 2611 "ripper.y"
9143 {
9144 endless_method_name(p, (yyvsp[-5].node), &(yylsp[-5]));
9145 restore_defun(p, (yyvsp[-5].node)->nd_defn);
9146#if 0
9147 (yyvsp[-2].val) = rescued_expr(p, (yyvsp[-2].val), (yyvsp[0].val), &(yylsp[-2]), &(yylsp[-1]), &(yylsp[0]));
9148 (yyval.val) = set_defun_body(p, (yyvsp[-5].val), (yyvsp[-4].val), (yyvsp[-2].val), &(yyloc));
9149#endif
9150 {VALUE v1,v2,v3,v4,v5,v6,v7,v8;v1=(yyvsp[-2].val);v2=(yyvsp[0].val);v3=dispatch2(rescue_mod,v1,v2);v4=v3;v5=Qnil;v6=Qnil;v7=Qnil;v8=dispatch4(bodystmt,v4,v5,v6,v7);(yyvsp[-2].val)=v8;}
9151 {VALUE v1,v2,v3,v4;v1=get_value((yyvsp[-5].val));v2=(yyvsp[-4].val);v3=(yyvsp[-2].val);v4=dispatch3(def,v1,v2,v3);(yyval.val)=v4;}
9152 local_pop(p);
9153 }
9154#line 9150 "ripper.c"
9155 break;
9156
9157 case 262: /* arg: defs_head f_opt_paren_args '=' arg */
9158#line 2623 "ripper.y"
9159 {
9160 endless_method_name(p, (yyvsp[-3].node), &(yylsp[-3]));
9161 restore_defun(p, (yyvsp[-3].node)->nd_defn);
9162#if 0
9163 (yyval.val) = set_defun_body(p, (yyvsp[-3].val), (yyvsp[-2].val), (yyvsp[0].val), &(yyloc));
9164#endif
9165 (yyvsp[-3].val) = get_value((yyvsp[-3].val));
9166
9167 {VALUE v1,v2,v3,v4,v5;v1=(yyvsp[0].val);v2=Qnil;v3=Qnil;v4=Qnil;v5=dispatch4(bodystmt,v1,v2,v3,v4);(yyvsp[0].val)=v5;}
9168 {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;}
9169 local_pop(p);
9170 }
9171#line 9167 "ripper.c"
9172 break;
9173
9174 case 263: /* arg: defs_head f_opt_paren_args '=' arg "`rescue' modifier" arg */
9175#line 2636 "ripper.y"
9176 {
9177 endless_method_name(p, (yyvsp[-5].node), &(yylsp[-5]));
9178 restore_defun(p, (yyvsp[-5].node)->nd_defn);
9179#if 0
9180 (yyvsp[-2].val) = rescued_expr(p, (yyvsp[-2].val), (yyvsp[0].val), &(yylsp[-2]), &(yylsp[-1]), &(yylsp[0]));
9181 (yyval.val) = set_defun_body(p, (yyvsp[-5].val), (yyvsp[-4].val), (yyvsp[-2].val), &(yyloc));
9182#endif
9183 (yyvsp[-5].val) = get_value((yyvsp[-5].val));
9184
9185 {VALUE v1,v2,v3,v4,v5,v6,v7,v8;v1=(yyvsp[-2].val);v2=(yyvsp[0].val);v3=dispatch2(rescue_mod,v1,v2);v4=v3;v5=Qnil;v6=Qnil;v7=Qnil;v8=dispatch4(bodystmt,v4,v5,v6,v7);(yyvsp[-2].val)=v8;}
9186 {VALUE v1,v2,v3,v4,v5,v6;v1=AREF((yyvsp[-5].val), 0);v2=AREF((yyvsp[-5].val), 1);v3=AREF((yyvsp[-5].val), 2);v4=(yyvsp[-4].val);v5=(yyvsp[-2].val);v6=dispatch5(defs,v1,v2,v3,v4,v5);(yyval.val)=v6;}
9187 local_pop(p);
9188 }
9189#line 9185 "ripper.c"
9190 break;
9191
9192 case 264: /* arg: primary */
9193#line 2650 "ripper.y"
9194 {
9195 (yyval.val) = (yyvsp[0].val);
9196 }
9197#line 9193 "ripper.c"
9198 break;
9199
9200 case 265: /* relop: '>' */
9201#line 2655 "ripper.y"
9202 {(yyval.val) = '>';}
9203#line 9199 "ripper.c"
9204 break;
9205
9206 case 266: /* relop: '<' */
9207#line 2656 "ripper.y"
9208 {(yyval.val) = '<';}
9209#line 9205 "ripper.c"
9210 break;
9211
9212 case 267: /* relop: ">=" */
9213#line 2657 "ripper.y"
9214 {(yyval.val) = idGE;}
9215#line 9211 "ripper.c"
9216 break;
9217
9218 case 268: /* relop: "<=" */
9219#line 2658 "ripper.y"
9220 {(yyval.val) = idLE;}
9221#line 9217 "ripper.c"
9222 break;
9223
9224 case 269: /* rel_expr: arg relop arg */
9225#line 2662 "ripper.y"
9226 {
9227 (yyval.val) = call_bin_op(p, (yyvsp[-2].val), (yyvsp[-1].val), (yyvsp[0].val), &(yylsp[-1]), &(yyloc));
9228 }
9229#line 9225 "ripper.c"
9230 break;
9231
9232 case 270: /* rel_expr: rel_expr relop arg */
9233#line 2666 "ripper.y"
9234 {
9235 rb_warning1("comparison '%s' after comparison", WARN_ID((yyvsp[-1].val)));
9236 (yyval.val) = call_bin_op(p, (yyvsp[-2].val), (yyvsp[-1].val), (yyvsp[0].val), &(yylsp[-1]), &(yyloc));
9237 }
9238#line 9234 "ripper.c"
9239 break;
9240
9241 case 271: /* lex_ctxt: "escaped space" */
9242#line 2673 "ripper.y"
9243 {
9244 (yyval.ctxt) = p->ctxt;
9245 }
9246#line 9242 "ripper.c"
9247 break;
9248
9249 case 272: /* lex_ctxt: none */
9250#line 2677 "ripper.y"
9251 {
9252 (yyval.ctxt) = p->ctxt;
9253 }
9254#line 9250 "ripper.c"
9255 break;
9256
9257 case 273: /* arg_value: arg */
9258#line 2683 "ripper.y"
9259 {
9260 value_expr((yyvsp[0].val));
9261 (yyval.val) = (yyvsp[0].val);
9262 }
9263#line 9259 "ripper.c"
9264 break;
9265
9266 case 275: /* aref_args: args trailer */
9267#line 2691 "ripper.y"
9268 {
9269 (yyval.val) = (yyvsp[-1].val);
9270 }
9271#line 9267 "ripper.c"
9272 break;
9273
9274 case 276: /* aref_args: args ',' assocs trailer */
9275#line 2695 "ripper.y"
9276 {
9277#if 0
9278 (yyval.val) = (yyvsp[-1].val) ? arg_append(p, (yyvsp[-3].val), new_hash(p, (yyvsp[-1].val), &(yylsp[-1])), &(yyloc)) : (yyvsp[-3].val);
9279#endif
9280 {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;}
9281 }
9282#line 9278 "ripper.c"
9283 break;
9284
9285 case 277: /* aref_args: assocs trailer */
9286#line 2702 "ripper.y"
9287 {
9288#if 0
9289 (yyval.val) = (yyvsp[-1].val) ? NEW_LIST(new_hash(p, (yyvsp[-1].val), &(yylsp[-1])), &(yyloc)) : 0;
9290#endif
9291 {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;}
9292 }
9293#line 9289 "ripper.c"
9294 break;
9295
9296 case 278: /* arg_rhs: arg */
9297#line 2711 "ripper.y"
9298 {
9299 value_expr((yyvsp[0].val));
9300 (yyval.val) = (yyvsp[0].val);
9301 }
9302#line 9298 "ripper.c"
9303 break;
9304
9305 case 279: /* arg_rhs: arg "`rescue' modifier" arg */
9306#line 2716 "ripper.y"
9307 {
9308#if 0
9309 value_expr((yyvsp[-2].val));
9310 (yyval.val) = rescued_expr(p, (yyvsp[-2].val), (yyvsp[0].val), &(yylsp[-2]), &(yylsp[-1]), &(yylsp[0]));
9311#endif
9312 {VALUE v1,v2,v3;v1=(yyvsp[-2].val);v2=(yyvsp[0].val);v3=dispatch2(rescue_mod,v1,v2);(yyval.val)=v3;}
9313 }
9314#line 9310 "ripper.c"
9315 break;
9316
9317 case 280: /* paren_args: '(' opt_call_args rparen */
9318#line 2726 "ripper.y"
9319 {
9320#if 0
9321 (yyval.val) = (yyvsp[-1].val);
9322#endif
9323 {VALUE v1,v2;v1=escape_Qundef((yyvsp[-1].val));v2=dispatch1(arg_paren,v1);(yyval.val)=v2;}
9324 }
9325#line 9321 "ripper.c"
9326 break;
9327
9328 case 281: /* paren_args: '(' args ',' args_forward rparen */
9329#line 2733 "ripper.y"
9330 {
9331 if (!check_forwarding_args(p)) {
9332 (yyval.val) = Qnone;
9333 }
9334 else {
9335#if 0
9336 (yyval.val) = new_args_forward_call(p, (yyvsp[-3].val), &(yylsp[-1]), &(yyloc));
9337#endif
9338 {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;}
9339 }
9340 }
9341#line 9337 "ripper.c"
9342 break;
9343
9344 case 282: /* paren_args: '(' args_forward rparen */
9345#line 2745 "ripper.y"
9346 {
9347 if (!check_forwarding_args(p)) {
9348 (yyval.val) = Qnone;
9349 }
9350 else {
9351#if 0
9352 (yyval.val) = new_args_forward_call(p, 0, &(yylsp[-1]), &(yyloc));
9353#endif
9354 {VALUE v1,v2;v1=(yyvsp[-1].val);v2=dispatch1(arg_paren,v1);(yyval.val)=v2;}
9355 }
9356 }
9357#line 9353 "ripper.c"
9358 break;
9359
9360 case 287: /* opt_call_args: args ',' */
9361#line 2765 "ripper.y"
9362 {
9363 (yyval.val) = (yyvsp[-1].val);
9364 }
9365#line 9361 "ripper.c"
9366 break;
9367
9368 case 288: /* opt_call_args: args ',' assocs ',' */
9369#line 2769 "ripper.y"
9370 {
9371#if 0
9372 (yyval.val) = (yyvsp[-1].val) ? arg_append(p, (yyvsp[-3].val), new_hash(p, (yyvsp[-1].val), &(yylsp[-1])), &(yyloc)) : (yyvsp[-3].val);
9373#endif
9374 {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;}
9375 }
9376#line 9372 "ripper.c"
9377 break;
9378
9379 case 289: /* opt_call_args: assocs ',' */
9380#line 2776 "ripper.y"
9381 {
9382#if 0
9383 (yyval.val) = (yyvsp[-1].val) ? NEW_LIST(new_hash(p, (yyvsp[-1].val), &(yylsp[-1])), &(yylsp[-1])) : 0;
9384#endif
9385 {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;}
9386 }
9387#line 9383 "ripper.c"
9388 break;
9389
9390 case 290: /* call_args: command */
9391#line 2785 "ripper.y"
9392 {
9393#if 0
9394 value_expr((yyvsp[0].val));
9395 (yyval.val) = NEW_LIST((yyvsp[0].val), &(yyloc));
9396#endif
9397 {VALUE v1,v2,v3,v4;v1=dispatch0(args_new);v2=v1;v3=(yyvsp[0].val);v4=dispatch2(args_add,v2,v3);(yyval.val)=v4;}
9398 }
9399#line 9395 "ripper.c"
9400 break;
9401
9402 case 291: /* call_args: args opt_block_arg */
9403#line 2793 "ripper.y"
9404 {
9405#if 0
9406 (yyval.val) = arg_blk_pass((yyvsp[-1].val), (yyvsp[0].val));
9407#endif
9408 {VALUE v1,v2,v3;v1=(yyvsp[-1].val);v2=(yyvsp[0].val);v3=dispatch2(args_add_block,v1,v2);(yyval.val)=v3;}
9409 }
9410#line 9406 "ripper.c"
9411 break;
9412
9413 case 292: /* call_args: assocs opt_block_arg */
9414#line 2800 "ripper.y"
9415 {
9416#if 0
9417 (yyval.val) = (yyvsp[-1].val) ? NEW_LIST(new_hash(p, (yyvsp[-1].val), &(yylsp[-1])), &(yylsp[-1])) : 0;
9418 (yyval.val) = arg_blk_pass((yyval.val), (yyvsp[0].val));
9419#endif
9420 {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;}
9421 }
9422#line 9418 "ripper.c"
9423 break;
9424
9425 case 293: /* call_args: args ',' assocs opt_block_arg */
9426#line 2808 "ripper.y"
9427 {
9428#if 0
9429 (yyval.val) = (yyvsp[-1].val) ? arg_append(p, (yyvsp[-3].val), new_hash(p, (yyvsp[-1].val), &(yylsp[-1])), &(yyloc)) : (yyvsp[-3].val);
9430 (yyval.val) = arg_blk_pass((yyval.val), (yyvsp[0].val));
9431#endif
9432 {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;}
9433 }
9434#line 9430 "ripper.c"
9435 break;
9436
9437 case 294: /* call_args: block_arg */
9438#line 2816 "ripper.y"
9439 {{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;}}
9440#line 9436 "ripper.c"
9441 break;
9442
9443 case 295: /* $@14: %empty */
9444#line 2819 "ripper.y"
9445 {
9446 /* If call_args starts with a open paren '(' or '[',
9447 * look-ahead reading of the letters calls CMDARG_PUSH(0),
9448 * but the push must be done after CMDARG_PUSH(1).
9449 * So this code makes them consistent by first cancelling
9450 * the premature CMDARG_PUSH(0), doing CMDARG_PUSH(1),
9451 * and finally redoing CMDARG_PUSH(0).
9452 */
9453 int lookahead = 0;
9454 switch (yychar) {
9455 case '(': case tLPAREN: case tLPAREN_ARG: case '[': case tLBRACK:
9456 lookahead = 1;
9457 }
9458 if (lookahead) CMDARG_POP();
9459 CMDARG_PUSH(1);
9460 if (lookahead) CMDARG_PUSH(0);
9461 }
9462#line 9458 "ripper.c"
9463 break;
9464
9465 case 296: /* command_args: $@14 call_args */
9466#line 2837 "ripper.y"
9467 {
9468 /* call_args can be followed by tLBRACE_ARG (that does CMDARG_PUSH(0) in the lexer)
9469 * but the push must be done after CMDARG_POP() in the parser.
9470 * So this code does CMDARG_POP() to pop 0 pushed by tLBRACE_ARG,
9471 * CMDARG_POP() to pop 1 pushed by command_args,
9472 * and CMDARG_PUSH(0) to restore back the flag set by tLBRACE_ARG.
9473 */
9474 int lookahead = 0;
9475 switch (yychar) {
9476 case tLBRACE_ARG:
9477 lookahead = 1;
9478 }
9479 if (lookahead) CMDARG_POP();
9480 CMDARG_POP();
9481 if (lookahead) CMDARG_PUSH(0);
9482 (yyval.val) = (yyvsp[0].val);
9483 }
9484#line 9480 "ripper.c"
9485 break;
9486
9487 case 297: /* block_arg: "&" arg_value */
9488#line 2857 "ripper.y"
9489 {
9490#if 0
9491 (yyval.val) = NEW_BLOCK_PASS((yyvsp[0].val), &(yyloc));
9492#endif
9493 (yyval.val)=(yyvsp[0].val);
9494 }
9495#line 9491 "ripper.c"
9496 break;
9497
9498 case 298: /* block_arg: "&" */
9499#line 2864 "ripper.y"
9500 {
9501#if 0
9502 if (!local_id(p, ANON_BLOCK_ID)) {
9503 compile_error(p, "no anonymous block parameter");
9504 }
9505 (yyval.val) = NEW_BLOCK_PASS(NEW_LVAR(ANON_BLOCK_ID, &(yylsp[0])), &(yyloc));
9506#endif
9507 (yyval.val) = Qnil;
9508
9509 }
9510#line 9506 "ripper.c"
9511 break;
9512
9513 case 299: /* opt_block_arg: ',' block_arg */
9514#line 2877 "ripper.y"
9515 {
9516 (yyval.val) = (yyvsp[0].val);
9517 }
9518#line 9514 "ripper.c"
9519 break;
9520
9521 case 300: /* opt_block_arg: none */
9522#line 2881 "ripper.y"
9523 {
9524 (yyval.val) = 0;
9525 }
9526#line 9522 "ripper.c"
9527 break;
9528
9529 case 301: /* args: arg_value */
9530#line 2888 "ripper.y"
9531 {
9532#if 0
9533 (yyval.val) = NEW_LIST((yyvsp[0].val), &(yyloc));
9534#endif
9535 {VALUE v1,v2,v3,v4;v1=dispatch0(args_new);v2=v1;v3=(yyvsp[0].val);v4=dispatch2(args_add,v2,v3);(yyval.val)=v4;}
9536 }
9537#line 9533 "ripper.c"
9538 break;
9539
9540 case 302: /* args: "*" arg_value */
9541#line 2895 "ripper.y"
9542 {
9543#if 0
9544 (yyval.val) = NEW_SPLAT((yyvsp[0].val), &(yyloc));
9545#endif
9546 {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;}
9547 }
9548#line 9544 "ripper.c"
9549 break;
9550
9551 case 303: /* args: args ',' arg_value */
9552#line 2902 "ripper.y"
9553 {
9554#if 0
9555 (yyval.val) = last_arg_append(p, (yyvsp[-2].val), (yyvsp[0].val), &(yyloc));
9556#endif
9557 {VALUE v1,v2,v3;v1=(yyvsp[-2].val);v2=(yyvsp[0].val);v3=dispatch2(args_add,v1,v2);(yyval.val)=v3;}
9558 }
9559#line 9555 "ripper.c"
9560 break;
9561
9562 case 304: /* args: args ',' "*" arg_value */
9563#line 2909 "ripper.y"
9564 {
9565#if 0
9566 (yyval.val) = rest_arg_append(p, (yyvsp[-3].val), (yyvsp[0].val), &(yyloc));
9567#endif
9568 {VALUE v1,v2,v3;v1=(yyvsp[-3].val);v2=(yyvsp[0].val);v3=dispatch2(args_add_star,v1,v2);(yyval.val)=v3;}
9569 }
9570#line 9566 "ripper.c"
9571 break;
9572
9573 case 307: /* mrhs: args ',' arg_value */
9574#line 2924 "ripper.y"
9575 {
9576#if 0
9577 (yyval.val) = last_arg_append(p, (yyvsp[-2].val), (yyvsp[0].val), &(yyloc));
9578#endif
9579 {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;}
9580 }
9581#line 9577 "ripper.c"
9582 break;
9583
9584 case 308: /* mrhs: args ',' "*" arg_value */
9585#line 2931 "ripper.y"
9586 {
9587#if 0
9588 (yyval.val) = rest_arg_append(p, (yyvsp[-3].val), (yyvsp[0].val), &(yyloc));
9589#endif
9590 {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;}
9591 }
9592#line 9588 "ripper.c"
9593 break;
9594
9595 case 309: /* mrhs: "*" arg_value */
9596#line 2938 "ripper.y"
9597 {
9598#if 0
9599 (yyval.val) = NEW_SPLAT((yyvsp[0].val), &(yyloc));
9600#endif
9601 {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;}
9602 }
9603#line 9599 "ripper.c"
9604 break;
9605
9606 case 320: /* primary: "method" */
9607#line 2957 "ripper.y"
9608 {
9609#if 0
9610 (yyval.val) = NEW_FCALL((yyvsp[0].val), 0, &(yyloc));
9611#endif
9612 {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;}
9613 }
9614#line 9610 "ripper.c"
9615 break;
9616
9617 case 321: /* $@15: %empty */
9618#line 2964 "ripper.y"
9619 {
9620 CMDARG_PUSH(0);
9621 }
9622#line 9618 "ripper.c"
9623 break;
9624
9625 case 322: /* primary: k_begin $@15 bodystmt k_end */
9626#line 2969 "ripper.y"
9627 {
9628 CMDARG_POP();
9629#if 0
9630 set_line_body((yyvsp[-1].val), (yylsp[-3]).end_pos.lineno);
9631 (yyval.val) = NEW_BEGIN((yyvsp[-1].val), &(yyloc));
9632 nd_set_line((yyval.val), (yylsp[-3]).end_pos.lineno);
9633#endif
9634 {VALUE v1,v2;v1=(yyvsp[-1].val);v2=dispatch1(begin,v1);(yyval.val)=v2;}
9635 }
9636#line 9632 "ripper.c"
9637 break;
9638
9639 case 323: /* $@16: %empty */
9640#line 2978 "ripper.y"
9641 {SET_LEX_STATE(EXPR_ENDARG);}
9642#line 9638 "ripper.c"
9643 break;
9644
9645 case 324: /* primary: "( arg" $@16 rparen */
9646#line 2979 "ripper.y"
9647 {
9648#if 0
9649 (yyval.val) = NEW_BEGIN(0, &(yyloc));
9650#endif
9651 {VALUE v1,v2;v1=0;v2=dispatch1(paren,v1);(yyval.val)=v2;}
9652 }
9653#line 9649 "ripper.c"
9654 break;
9655
9656 case 325: /* $@17: %empty */
9657#line 2985 "ripper.y"
9658 {SET_LEX_STATE(EXPR_ENDARG);}
9659#line 9655 "ripper.c"
9660 break;
9661
9662 case 326: /* primary: "( arg" stmt $@17 rparen */
9663#line 2986 "ripper.y"
9664 {
9665#if 0
9666 if (nd_type_p((yyvsp[-2].val), NODE_SELF)) (yyvsp[-2].val)->nd_state = 0;
9667 (yyval.val) = (yyvsp[-2].val);
9668#endif
9669 {VALUE v1,v2;v1=(yyvsp[-2].val);v2=dispatch1(paren,v1);(yyval.val)=v2;}
9670 }
9671#line 9667 "ripper.c"
9672 break;
9673
9674 case 327: /* primary: "(" compstmt ')' */
9675#line 2994 "ripper.y"
9676 {
9677#if 0
9678 if (nd_type_p((yyvsp[-1].val), NODE_SELF)) (yyvsp[-1].val)->nd_state = 0;
9679 (yyval.val) = (yyvsp[-1].val);
9680#endif
9681 {VALUE v1,v2;v1=(yyvsp[-1].val);v2=dispatch1(paren,v1);(yyval.val)=v2;}
9682 }
9683#line 9679 "ripper.c"
9684 break;
9685
9686 case 328: /* primary: primary_value "::" "constant" */
9687#line 3002 "ripper.y"
9688 {
9689#if 0
9690 (yyval.val) = NEW_COLON2((yyvsp[-2].val), (yyvsp[0].val), &(yyloc));
9691#endif
9692 {VALUE v1,v2,v3;v1=(yyvsp[-2].val);v2=(yyvsp[0].val);v3=dispatch2(const_path_ref,v1,v2);(yyval.val)=v3;}
9693 }
9694#line 9690 "ripper.c"
9695 break;
9696
9697 case 329: /* primary: ":: at EXPR_BEG" "constant" */
9698#line 3009 "ripper.y"
9699 {
9700#if 0
9701 (yyval.val) = NEW_COLON3((yyvsp[0].val), &(yyloc));
9702#endif
9703 {VALUE v1,v2;v1=(yyvsp[0].val);v2=dispatch1(top_const_ref,v1);(yyval.val)=v2;}
9704 }
9705#line 9701 "ripper.c"
9706 break;
9707
9708 case 330: /* primary: "[" aref_args ']' */
9709#line 3016 "ripper.y"
9710 {
9711#if 0
9712 (yyval.val) = make_list((yyvsp[-1].val), &(yyloc));
9713#endif
9714 {VALUE v1,v2;v1=escape_Qundef((yyvsp[-1].val));v2=dispatch1(array,v1);(yyval.val)=v2;}
9715 }
9716#line 9712 "ripper.c"
9717 break;
9718
9719 case 331: /* primary: "{" assoc_list '}' */
9720#line 3023 "ripper.y"
9721 {
9722#if 0
9723 (yyval.val) = new_hash(p, (yyvsp[-1].val), &(yyloc));
9724 (yyval.val)->nd_brace = TRUE;
9725#endif
9726 {VALUE v1,v2;v1=escape_Qundef((yyvsp[-1].val));v2=dispatch1(hash,v1);(yyval.val)=v2;}
9727 }
9728#line 9724 "ripper.c"
9729 break;
9730
9731 case 332: /* primary: k_return */
9732#line 3031 "ripper.y"
9733 {
9734#if 0
9735 (yyval.val) = NEW_RETURN(0, &(yyloc));
9736#endif
9737 {VALUE v1;v1=dispatch0(return0);(yyval.val)=v1;}
9738 }
9739#line 9735 "ripper.c"
9740 break;
9741
9742 case 333: /* primary: "`yield'" '(' call_args rparen */
9743#line 3038 "ripper.y"
9744 {
9745#if 0
9746 (yyval.val) = new_yield(p, (yyvsp[-1].val), &(yyloc));
9747#endif
9748 {VALUE v1,v2,v3,v4;v1=(yyvsp[-1].val);v2=dispatch1(paren,v1);v3=v2;v4=dispatch1(yield,v3);(yyval.val)=v4;}
9749 }
9750#line 9746 "ripper.c"
9751 break;
9752
9753 case 334: /* primary: "`yield'" '(' rparen */
9754#line 3045 "ripper.y"
9755 {
9756#if 0
9757 (yyval.val) = NEW_YIELD(0, &(yyloc));
9758#endif
9759 {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;}
9760 }
9761#line 9757 "ripper.c"
9762 break;
9763
9764 case 335: /* primary: "`yield'" */
9765#line 3052 "ripper.y"
9766 {
9767#if 0
9768 (yyval.val) = NEW_YIELD(0, &(yyloc));
9769#endif
9770 {VALUE v1;v1=dispatch0(yield0);(yyval.val)=v1;}
9771 }
9772#line 9768 "ripper.c"
9773 break;
9774
9775 case 336: /* $@18: %empty */
9776#line 3058 "ripper.y"
9777 {p->ctxt.in_defined = 1;}
9778#line 9774 "ripper.c"
9779 break;
9780
9781 case 337: /* primary: "`defined?'" opt_nl '(' $@18 expr rparen */
9782#line 3059 "ripper.y"
9783 {
9784 p->ctxt.in_defined = 0;
9785 (yyval.val) = new_defined(p, (yyvsp[-1].val), &(yyloc));
9786 }
9787#line 9783 "ripper.c"
9788 break;
9789
9790 case 338: /* primary: "`not'" '(' expr rparen */
9791#line 3064 "ripper.y"
9792 {
9793 (yyval.val) = call_uni_op(p, method_cond(p, (yyvsp[-1].val), &(yylsp[-1])), METHOD_NOT, &(yylsp[-3]), &(yyloc));
9794 }
9795#line 9791 "ripper.c"
9796 break;
9797
9798 case 339: /* primary: "`not'" '(' rparen */
9799#line 3068 "ripper.y"
9800 {
9801 (yyval.val) = call_uni_op(p, method_cond(p, new_nil(&(yylsp[-1])), &(yylsp[-1])), METHOD_NOT, &(yylsp[-2]), &(yyloc));
9802 }
9803#line 9799 "ripper.c"
9804 break;
9805
9806 case 340: /* primary: fcall brace_block */
9807#line 3072 "ripper.y"
9808 {
9809#if 0
9810 (yyval.val) = method_add_block(p, (yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
9811#endif
9812 {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;}
9813 }
9814#line 9810 "ripper.c"
9815 break;
9816
9817 case 342: /* primary: method_call brace_block */
9818#line 3080 "ripper.y"
9819 {
9820#if 0
9821 block_dup_check(p, (yyvsp[-1].val)->nd_args, (yyvsp[0].val));
9822 (yyval.val) = method_add_block(p, (yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
9823#endif
9824 {VALUE v1,v2,v3;v1=(yyvsp[-1].val);v2=(yyvsp[0].val);v3=dispatch2(method_add_block,v1,v2);(yyval.val)=v3;}
9825 }
9826#line 9822 "ripper.c"
9827 break;
9828
9829 case 344: /* primary: k_if expr_value then compstmt if_tail k_end */
9830#line 3092 "ripper.y"
9831 {
9832#if 0
9833 (yyval.val) = new_if(p, (yyvsp[-4].val), (yyvsp[-2].val), (yyvsp[-1].val), &(yyloc));
9834 fixpos((yyval.val), (yyvsp[-4].val));
9835#endif
9836 {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;}
9837 }
9838#line 9834 "ripper.c"
9839 break;
9840
9841 case 345: /* primary: k_unless expr_value then compstmt opt_else k_end */
9842#line 3103 "ripper.y"
9843 {
9844#if 0
9845 (yyval.val) = new_unless(p, (yyvsp[-4].val), (yyvsp[-2].val), (yyvsp[-1].val), &(yyloc));
9846 fixpos((yyval.val), (yyvsp[-4].val));
9847#endif
9848 {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;}
9849 }
9850#line 9846 "ripper.c"
9851 break;
9852
9853 case 346: /* primary: k_while expr_value_do compstmt k_end */
9854#line 3113 "ripper.y"
9855 {
9856#if 0
9857 (yyval.val) = NEW_WHILE(cond(p, (yyvsp[-2].val), &(yylsp[-2])), (yyvsp[-1].val), 1, &(yyloc));
9858 fixpos((yyval.val), (yyvsp[-2].val));
9859#endif
9860 {VALUE v1,v2,v3;v1=(yyvsp[-2].val);v2=(yyvsp[-1].val);v3=dispatch2(while,v1,v2);(yyval.val)=v3;}
9861 }
9862#line 9858 "ripper.c"
9863 break;
9864
9865 case 347: /* primary: k_until expr_value_do compstmt k_end */
9866#line 3123 "ripper.y"
9867 {
9868#if 0
9869 (yyval.val) = NEW_UNTIL(cond(p, (yyvsp[-2].val), &(yylsp[-2])), (yyvsp[-1].val), 1, &(yyloc));
9870 fixpos((yyval.val), (yyvsp[-2].val));
9871#endif
9872 {VALUE v1,v2,v3;v1=(yyvsp[-2].val);v2=(yyvsp[-1].val);v3=dispatch2(until,v1,v2);(yyval.val)=v3;}
9873 }
9874#line 9870 "ripper.c"
9875 break;
9876
9877 case 348: /* @19: %empty */
9878#line 3131 "ripper.y"
9879 {
9880 (yyval.val) = p->case_labels;
9881 p->case_labels = Qnil;
9882 }
9883#line 9879 "ripper.c"
9884 break;
9885
9886 case 349: /* primary: k_case expr_value opt_terms @19 case_body k_end */
9887#line 3137 "ripper.y"
9888 {
9889 if (RTEST(p->case_labels)) rb_hash_clear(p->case_labels);
9890 p->case_labels = (yyvsp[-2].val);
9891#if 0
9892 (yyval.val) = NEW_CASE((yyvsp[-4].val), (yyvsp[-1].val), &(yyloc));
9893 fixpos((yyval.val), (yyvsp[-4].val));
9894#endif
9895 {VALUE v1,v2,v3;v1=(yyvsp[-4].val);v2=(yyvsp[-1].val);v3=dispatch2(case,v1,v2);(yyval.val)=v3;}
9896 }
9897#line 9893 "ripper.c"
9898 break;
9899
9900 case 350: /* @20: %empty */
9901#line 3147 "ripper.y"
9902 {
9903 (yyval.val) = p->case_labels;
9904 p->case_labels = 0;
9905 }
9906#line 9902 "ripper.c"
9907 break;
9908
9909 case 351: /* primary: k_case opt_terms @20 case_body k_end */
9910#line 3153 "ripper.y"
9911 {
9912 if (RTEST(p->case_labels)) rb_hash_clear(p->case_labels);
9913 p->case_labels = (yyvsp[-2].val);
9914#if 0
9915 (yyval.val) = NEW_CASE2((yyvsp[-1].val), &(yyloc));
9916#endif
9917 {VALUE v1,v2,v3;v1=Qnil;v2=(yyvsp[-1].val);v3=dispatch2(case,v1,v2);(yyval.val)=v3;}
9918 }
9919#line 9915 "ripper.c"
9920 break;
9921
9922 case 352: /* primary: k_case expr_value opt_terms p_case_body k_end */
9923#line 3164 "ripper.y"
9924 {
9925#if 0
9926 (yyval.val) = NEW_CASE3((yyvsp[-3].val), (yyvsp[-1].val), &(yyloc));
9927#endif
9928 {VALUE v1,v2,v3;v1=(yyvsp[-3].val);v2=(yyvsp[-1].val);v3=dispatch2(case,v1,v2);(yyval.val)=v3;}
9929 }
9930#line 9926 "ripper.c"
9931 break;
9932
9933 case 353: /* primary: k_for for_var "`in'" expr_value_do compstmt k_end */
9934#line 3173 "ripper.y"
9935 {
9936#if 0
9937 /*
9938 * for a, b, c in e
9939 * #=>
9940 * e.each{|*x| a, b, c = x}
9941 *
9942 * for a in e
9943 * #=>
9944 * e.each{|x| a, = x}
9945 */
9946 ID id = internal_id(p);
9947 NODE *m = NEW_ARGS_AUX(0, 0, &NULL_LOC);
9948 NODE *args, *scope, *internal_var = NEW_DVAR(id, &(yylsp[-4]));
9949 rb_ast_id_table_t *tbl = rb_ast_new_local_table(p->ast, 1);
9950 tbl->ids[0] = id; /* internal id */
9951
9952 switch (nd_type((yyvsp[-4].val))) {
9953 case NODE_LASGN:
9954 case NODE_DASGN: /* e.each {|internal_var| a = internal_var; ... } */
9955 (yyvsp[-4].val)->nd_value = internal_var;
9956 id = 0;
9957 m->nd_plen = 1;
9958 m->nd_next = (yyvsp[-4].val);
9959 break;
9960 case NODE_MASGN: /* e.each {|*internal_var| a, b, c = (internal_var.length == 1 && Array === (tmp = internal_var[0]) ? tmp : internal_var); ... } */
9961 m->nd_next = node_assign(p, (yyvsp[-4].val), NEW_FOR_MASGN(internal_var, &(yylsp[-4])), NO_LEX_CTXT, &(yylsp[-4]));
9962 break;
9963 default: /* e.each {|*internal_var| @a, B, c[1], d.attr = internal_val; ... } */
9964 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]));
9965 }
9966 /* {|*internal_id| <m> = internal_id; ... } */
9967 args = new_args(p, m, 0, id, 0, new_args_tail(p, 0, 0, 0, &(yylsp[-4])), &(yylsp[-4]));
9968 scope = NEW_NODE(NODE_SCOPE, tbl, (yyvsp[-1].val), args, &(yyloc));
9969 (yyval.val) = NEW_FOR((yyvsp[-2].val), scope, &(yyloc));
9970 fixpos((yyval.val), (yyvsp[-4].val));
9971#endif
9972 {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;}
9973 }
9974#line 9970 "ripper.c"
9975 break;
9976
9977 case 354: /* $@21: %empty */
9978#line 3213 "ripper.y"
9979 {
9980 if (p->ctxt.in_def) {
9981 YYLTYPE loc = code_loc_gen(&(yylsp[-2]), &(yylsp[-1]));
9982 yyerror1(&loc, "class definition in method body");
9983 }
9984 p->ctxt.in_class = 1;
9985 local_push(p, 0);
9986 }
9987#line 9983 "ripper.c"
9988 break;
9989
9990 case 355: /* primary: k_class cpath superclass $@21 bodystmt k_end */
9991#line 3223 "ripper.y"
9992 {
9993#if 0
9994 (yyval.val) = NEW_CLASS((yyvsp[-4].val), (yyvsp[-1].val), (yyvsp[-3].val), &(yyloc));
9995 nd_set_line((yyval.val)->nd_body, (yylsp[0]).end_pos.lineno);
9996 set_line_body((yyvsp[-1].val), (yylsp[-3]).end_pos.lineno);
9997 nd_set_line((yyval.val), (yylsp[-3]).end_pos.lineno);
9998#endif
9999 {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;}
10000 local_pop(p);
10001 p->ctxt.in_class = (yyvsp[-5].ctxt).in_class;
10002 p->ctxt.shareable_constant_value = (yyvsp[-5].ctxt).shareable_constant_value;
10003 }
10004#line 10000 "ripper.c"
10005 break;
10006
10007 case 356: /* $@22: %empty */
10008#line 3236 "ripper.y"
10009 {
10010 p->ctxt.in_def = 0;
10011 p->ctxt.in_class = 0;
10012 local_push(p, 0);
10013 }
10014#line 10010 "ripper.c"
10015 break;
10016
10017 case 357: /* primary: k_class "<<" expr $@22 term bodystmt k_end */
10018#line 3244 "ripper.y"
10019 {
10020#if 0
10021 (yyval.val) = NEW_SCLASS((yyvsp[-4].val), (yyvsp[-1].val), &(yyloc));
10022 nd_set_line((yyval.val)->nd_body, (yylsp[0]).end_pos.lineno);
10023 set_line_body((yyvsp[-1].val), nd_line((yyvsp[-4].val)));
10024 fixpos((yyval.val), (yyvsp[-4].val));
10025#endif
10026 {VALUE v1,v2,v3;v1=(yyvsp[-4].val);v2=(yyvsp[-1].val);v3=dispatch2(sclass,v1,v2);(yyval.val)=v3;}
10027 local_pop(p);
10028 p->ctxt.in_def = (yyvsp[-6].ctxt).in_def;
10029 p->ctxt.in_class = (yyvsp[-6].ctxt).in_class;
10030 p->ctxt.shareable_constant_value = (yyvsp[-6].ctxt).shareable_constant_value;
10031 }
10032#line 10028 "ripper.c"
10033 break;
10034
10035 case 358: /* $@23: %empty */
10036#line 3258 "ripper.y"
10037 {
10038 if (p->ctxt.in_def) {
10039 YYLTYPE loc = code_loc_gen(&(yylsp[-1]), &(yylsp[0]));
10040 yyerror1(&loc, "module definition in method body");
10041 }
10042 p->ctxt.in_class = 1;
10043 local_push(p, 0);
10044 }
10045#line 10041 "ripper.c"
10046 break;
10047
10048 case 359: /* primary: k_module cpath $@23 bodystmt k_end */
10049#line 3268 "ripper.y"
10050 {
10051#if 0
10052 (yyval.val) = NEW_MODULE((yyvsp[-3].val), (yyvsp[-1].val), &(yyloc));
10053 nd_set_line((yyval.val)->nd_body, (yylsp[0]).end_pos.lineno);
10054 set_line_body((yyvsp[-1].val), (yylsp[-3]).end_pos.lineno);
10055 nd_set_line((yyval.val), (yylsp[-3]).end_pos.lineno);
10056#endif
10057 {VALUE v1,v2,v3;v1=(yyvsp[-3].val);v2=(yyvsp[-1].val);v3=dispatch2(module,v1,v2);(yyval.val)=v3;}
10058 local_pop(p);
10059 p->ctxt.in_class = (yyvsp[-4].ctxt).in_class;
10060 p->ctxt.shareable_constant_value = (yyvsp[-4].ctxt).shareable_constant_value;
10061 }
10062#line 10058 "ripper.c"
10063 break;
10064
10065 case 360: /* primary: defn_head f_arglist bodystmt k_end */
10066#line 3284 "ripper.y"
10067 {
10068 restore_defun(p, (yyvsp[-3].node)->nd_defn);
10069#if 0
10070 (yyval.val) = set_defun_body(p, (yyvsp[-3].val), (yyvsp[-2].val), (yyvsp[-1].val), &(yyloc));
10071#endif
10072 {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;}
10073 local_pop(p);
10074 }
10075#line 10071 "ripper.c"
10076 break;
10077
10078 case 361: /* primary: defs_head f_arglist bodystmt k_end */
10079#line 3296 "ripper.y"
10080 {
10081 restore_defun(p, (yyvsp[-3].node)->nd_defn);
10082#if 0
10083 (yyval.val) = set_defun_body(p, (yyvsp[-3].val), (yyvsp[-2].val), (yyvsp[-1].val), &(yyloc));
10084#endif
10085 (yyvsp[-3].val) = get_value((yyvsp[-3].val));
10086
10087 {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;}
10088 local_pop(p);
10089 }
10090#line 10086 "ripper.c"
10091 break;
10092
10093 case 362: /* primary: "`break'" */
10094#line 3307 "ripper.y"
10095 {
10096#if 0
10097 (yyval.val) = NEW_BREAK(0, &(yyloc));
10098#endif
10099 {VALUE v1,v2,v3;v1=dispatch0(args_new);v2=v1;v3=dispatch1(break,v2);(yyval.val)=v3;}
10100 }
10101#line 10097 "ripper.c"
10102 break;
10103
10104 case 363: /* primary: "`next'" */
10105#line 3314 "ripper.y"
10106 {
10107#if 0
10108 (yyval.val) = NEW_NEXT(0, &(yyloc));
10109#endif
10110 {VALUE v1,v2,v3;v1=dispatch0(args_new);v2=v1;v3=dispatch1(next,v2);(yyval.val)=v3;}
10111 }
10112#line 10108 "ripper.c"
10113 break;
10114
10115 case 364: /* primary: "`redo'" */
10116#line 3321 "ripper.y"
10117 {
10118#if 0
10119 (yyval.val) = NEW_REDO(&(yyloc));
10120#endif
10121 {VALUE v1;v1=dispatch0(redo);(yyval.val)=v1;}
10122 }
10123#line 10119 "ripper.c"
10124 break;
10125
10126 case 365: /* primary: "`retry'" */
10127#line 3328 "ripper.y"
10128 {
10129#if 0
10130 (yyval.val) = NEW_RETRY(&(yyloc));
10131#endif
10132 {VALUE v1;v1=dispatch0(retry);(yyval.val)=v1;}
10133 }
10134#line 10130 "ripper.c"
10135 break;
10136
10137 case 366: /* primary_value: primary */
10138#line 3337 "ripper.y"
10139 {
10140 value_expr((yyvsp[0].val));
10141 (yyval.val) = (yyvsp[0].val);
10142 }
10143#line 10139 "ripper.c"
10144 break;
10145
10146 case 367: /* k_begin: "`begin'" */
10147#line 3344 "ripper.y"
10148 {
10149 token_info_push(p, "begin", &(yyloc));
10150 }
10151#line 10147 "ripper.c"
10152 break;
10153
10154 case 368: /* k_if: "`if'" */
10155#line 3350 "ripper.y"
10156 {
10157 WARN_EOL("if");
10158 token_info_push(p, "if", &(yyloc));
10159 if (p->token_info && p->token_info->nonspc &&
10160 p->token_info->next && !strcmp(p->token_info->next->token, "else")) {
10161 const char *tok = p->lex.ptok;
10162 const char *beg = p->lex.pbeg + p->token_info->next->beg.column;
10163 beg += rb_strlen_lit("else");
10164 while (beg < tok && ISSPACE(*beg)) beg++;
10165 if (beg == tok) {
10166 p->token_info->nonspc = 0;
10167 }
10168 }
10169 }
10170#line 10166 "ripper.c"
10171 break;
10172
10173 case 369: /* k_unless: "`unless'" */
10174#line 3367 "ripper.y"
10175 {
10176 token_info_push(p, "unless", &(yyloc));
10177 }
10178#line 10174 "ripper.c"
10179 break;
10180
10181 case 370: /* k_while: "`while'" */
10182#line 3373 "ripper.y"
10183 {
10184 token_info_push(p, "while", &(yyloc));
10185 }
10186#line 10182 "ripper.c"
10187 break;
10188
10189 case 371: /* k_until: "`until'" */
10190#line 3379 "ripper.y"
10191 {
10192 token_info_push(p, "until", &(yyloc));
10193 }
10194#line 10190 "ripper.c"
10195 break;
10196
10197 case 372: /* k_case: "`case'" */
10198#line 3385 "ripper.y"
10199 {
10200 token_info_push(p, "case", &(yyloc));
10201 }
10202#line 10198 "ripper.c"
10203 break;
10204
10205 case 373: /* k_for: "`for'" */
10206#line 3391 "ripper.y"
10207 {
10208 token_info_push(p, "for", &(yyloc));
10209 }
10210#line 10206 "ripper.c"
10211 break;
10212
10213 case 374: /* k_class: "`class'" */
10214#line 3397 "ripper.y"
10215 {
10216 token_info_push(p, "class", &(yyloc));
10217 (yyval.ctxt) = p->ctxt;
10218 }
10219#line 10215 "ripper.c"
10220 break;
10221
10222 case 375: /* k_module: "`module'" */
10223#line 3404 "ripper.y"
10224 {
10225 token_info_push(p, "module", &(yyloc));
10226 (yyval.ctxt) = p->ctxt;
10227 }
10228#line 10224 "ripper.c"
10229 break;
10230
10231 case 376: /* k_def: "`def'" */
10232#line 3411 "ripper.y"
10233 {
10234 token_info_push(p, "def", &(yyloc));
10235 p->ctxt.in_argdef = 1;
10236 }
10237#line 10233 "ripper.c"
10238 break;
10239
10240 case 377: /* k_do: "`do'" */
10241#line 3418 "ripper.y"
10242 {
10243 token_info_push(p, "do", &(yyloc));
10244 }
10245#line 10241 "ripper.c"
10246 break;
10247
10248 case 378: /* k_do_block: "`do' for block" */
10249#line 3424 "ripper.y"
10250 {
10251 token_info_push(p, "do", &(yyloc));
10252 }
10253#line 10249 "ripper.c"
10254 break;
10255
10256 case 379: /* k_rescue: "`rescue'" */
10257#line 3430 "ripper.y"
10258 {
10259 token_info_warn(p, "rescue", p->token_info, 1, &(yyloc));
10260 }
10261#line 10257 "ripper.c"
10262 break;
10263
10264 case 380: /* k_ensure: "`ensure'" */
10265#line 3436 "ripper.y"
10266 {
10267 token_info_warn(p, "ensure", p->token_info, 1, &(yyloc));
10268 }
10269#line 10265 "ripper.c"
10270 break;
10271
10272 case 381: /* k_when: "`when'" */
10273#line 3442 "ripper.y"
10274 {
10275 token_info_warn(p, "when", p->token_info, 0, &(yyloc));
10276 }
10277#line 10273 "ripper.c"
10278 break;
10279
10280 case 382: /* k_else: "`else'" */
10281#line 3448 "ripper.y"
10282 {
10283 token_info *ptinfo_beg = p->token_info;
10284 int same = ptinfo_beg && strcmp(ptinfo_beg->token, "case") != 0;
10285 token_info_warn(p, "else", p->token_info, same, &(yyloc));
10286 if (same) {
10287 token_info e;
10288 e.next = ptinfo_beg->next;
10289 e.token = "else";
10290 token_info_setup(&e, p->lex.pbeg, &(yyloc));
10291 if (!e.nonspc) *ptinfo_beg = e;
10292 }
10293 }
10294#line 10290 "ripper.c"
10295 break;
10296
10297 case 383: /* k_elsif: "`elsif'" */
10298#line 3463 "ripper.y"
10299 {
10300 WARN_EOL("elsif");
10301 token_info_warn(p, "elsif", p->token_info, 1, &(yyloc));
10302 }
10303#line 10299 "ripper.c"
10304 break;
10305
10306 case 384: /* k_end: "`end'" */
10307#line 3470 "ripper.y"
10308 {
10309 token_info_pop(p, "end", &(yyloc));
10310 }
10311#line 10307 "ripper.c"
10312 break;
10313
10314 case 385: /* k_return: "`return'" */
10315#line 3476 "ripper.y"
10316 {
10317 if (p->ctxt.in_class && !p->ctxt.in_def && !dyna_in_block(p))
10318 yyerror1(&(yylsp[0]), "Invalid return in class/module body");
10319 }
10320#line 10316 "ripper.c"
10321 break;
10322
10323 case 392: /* if_tail: k_elsif expr_value then compstmt if_tail */
10324#line 3495 "ripper.y"
10325 {
10326#if 0
10327 (yyval.val) = new_if(p, (yyvsp[-3].val), (yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
10328 fixpos((yyval.val), (yyvsp[-3].val));
10329#endif
10330 {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;}
10331 }
10332#line 10328 "ripper.c"
10333 break;
10334
10335 case 394: /* opt_else: k_else compstmt */
10336#line 3506 "ripper.y"
10337 {
10338#if 0
10339 (yyval.val) = (yyvsp[0].val);
10340#endif
10341 {VALUE v1,v2;v1=(yyvsp[0].val);v2=dispatch1(else,v1);(yyval.val)=v2;}
10342 }
10343#line 10339 "ripper.c"
10344 break;
10345
10346 case 397: /* f_marg: f_norm_arg */
10347#line 3519 "ripper.y"
10348 {
10349#if 0
10350 (yyval.val) = assignable(p, (yyvsp[0].val), 0, &(yyloc));
10351 mark_lvar_used(p, (yyval.val));
10352#endif
10353 (yyval.val)=assignable(p, (yyvsp[0].val));
10354 }
10355#line 10351 "ripper.c"
10356 break;
10357
10358 case 398: /* f_marg: "(" f_margs rparen */
10359#line 3527 "ripper.y"
10360 {
10361#if 0
10362 (yyval.val) = (yyvsp[-1].val);
10363#endif
10364 {VALUE v1,v2;v1=(yyvsp[-1].val);v2=dispatch1(mlhs_paren,v1);(yyval.val)=v2;}
10365 }
10366#line 10362 "ripper.c"
10367 break;
10368
10369 case 399: /* f_marg_list: f_marg */
10370#line 3536 "ripper.y"
10371 {
10372#if 0
10373 (yyval.val) = NEW_LIST((yyvsp[0].val), &(yyloc));
10374#endif
10375 {VALUE v1,v2,v3,v4;v1=dispatch0(mlhs_new);v2=v1;v3=(yyvsp[0].val);v4=dispatch2(mlhs_add,v2,v3);(yyval.val)=v4;}
10376 }
10377#line 10373 "ripper.c"
10378 break;
10379
10380 case 400: /* f_marg_list: f_marg_list ',' f_marg */
10381#line 3543 "ripper.y"
10382 {
10383#if 0
10384 (yyval.val) = list_append(p, (yyvsp[-2].val), (yyvsp[0].val));
10385#endif
10386 {VALUE v1,v2,v3;v1=(yyvsp[-2].val);v2=(yyvsp[0].val);v3=dispatch2(mlhs_add,v1,v2);(yyval.val)=v3;}
10387 }
10388#line 10384 "ripper.c"
10389 break;
10390
10391 case 401: /* f_margs: f_marg_list */
10392#line 3552 "ripper.y"
10393 {
10394#if 0
10395 (yyval.val) = NEW_MASGN((yyvsp[0].val), 0, &(yyloc));
10396#endif
10397 (yyval.val)=(yyvsp[0].val);
10398 }
10399#line 10395 "ripper.c"
10400 break;
10401
10402 case 402: /* f_margs: f_marg_list ',' f_rest_marg */
10403#line 3559 "ripper.y"
10404 {
10405#if 0
10406 (yyval.val) = NEW_MASGN((yyvsp[-2].val), (yyvsp[0].val), &(yyloc));
10407#endif
10408 {VALUE v1,v2,v3;v1=(yyvsp[-2].val);v2=(yyvsp[0].val);v3=dispatch2(mlhs_add_star,v1,v2);(yyval.val)=v3;}
10409 }
10410#line 10406 "ripper.c"
10411 break;
10412
10413 case 403: /* f_margs: f_marg_list ',' f_rest_marg ',' f_marg_list */
10414#line 3566 "ripper.y"
10415 {
10416#if 0
10417 (yyval.val) = NEW_MASGN((yyvsp[-4].val), NEW_POSTARG((yyvsp[-2].val), (yyvsp[0].val), &(yyloc)), &(yyloc));
10418#endif
10419 {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;}
10420 }
10421#line 10417 "ripper.c"
10422 break;
10423
10424 case 404: /* f_margs: f_rest_marg */
10425#line 3573 "ripper.y"
10426 {
10427#if 0
10428 (yyval.val) = NEW_MASGN(0, (yyvsp[0].val), &(yyloc));
10429#endif
10430 {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;}
10431 }
10432#line 10428 "ripper.c"
10433 break;
10434
10435 case 405: /* f_margs: f_rest_marg ',' f_marg_list */
10436#line 3580 "ripper.y"
10437 {
10438#if 0
10439 (yyval.val) = NEW_MASGN(0, NEW_POSTARG((yyvsp[-2].val), (yyvsp[0].val), &(yyloc)), &(yyloc));
10440#endif
10441 {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;}
10442 }
10443#line 10439 "ripper.c"
10444 break;
10445
10446 case 406: /* f_rest_marg: "*" f_norm_arg */
10447#line 3589 "ripper.y"
10448 {
10449#if 0
10450 (yyval.val) = assignable(p, (yyvsp[0].val), 0, &(yyloc));
10451 mark_lvar_used(p, (yyval.val));
10452#endif
10453 (yyval.val)=assignable(p, (yyvsp[0].val));
10454 }
10455#line 10451 "ripper.c"
10456 break;
10457
10458 case 407: /* f_rest_marg: "*" */
10459#line 3597 "ripper.y"
10460 {
10461#if 0
10462 (yyval.val) = NODE_SPECIAL_NO_NAME_REST;
10463#endif
10464 (yyval.val)=Qnil;
10465 }
10466#line 10462 "ripper.c"
10467 break;
10468
10469 case 409: /* f_any_kwrest: f_no_kwarg */
10470#line 3606 "ripper.y"
10471 {(yyval.val) = ID2VAL(idNil);}
10472#line 10468 "ripper.c"
10473 break;
10474
10475 case 410: /* $@24: %empty */
10476#line 3609 "ripper.y"
10477 {p->ctxt.in_argdef = 0;}
10478#line 10474 "ripper.c"
10479 break;
10480
10481 case 412: /* block_args_tail: f_block_kwarg ',' f_kwrest opt_f_block_arg */
10482#line 3612 "ripper.y"
10483 {
10484 (yyval.val) = new_args_tail(p, (yyvsp[-3].val), (yyvsp[-1].val), (yyvsp[0].val), &(yylsp[-1]));
10485 }
10486#line 10482 "ripper.c"
10487 break;
10488
10489 case 413: /* block_args_tail: f_block_kwarg opt_f_block_arg */
10490#line 3616 "ripper.y"
10491 {
10492 (yyval.val) = new_args_tail(p, (yyvsp[-1].val), Qnone, (yyvsp[0].val), &(yylsp[-1]));
10493 }
10494#line 10490 "ripper.c"
10495 break;
10496
10497 case 414: /* block_args_tail: f_any_kwrest opt_f_block_arg */
10498#line 3620 "ripper.y"
10499 {
10500 (yyval.val) = new_args_tail(p, Qnone, (yyvsp[-1].val), (yyvsp[0].val), &(yylsp[-1]));
10501 }
10502#line 10498 "ripper.c"
10503 break;
10504
10505 case 415: /* block_args_tail: f_block_arg */
10506#line 3624 "ripper.y"
10507 {
10508 (yyval.val) = new_args_tail(p, Qnone, Qnone, (yyvsp[0].val), &(yylsp[0]));
10509 }
10510#line 10506 "ripper.c"
10511 break;
10512
10513 case 416: /* opt_block_args_tail: ',' block_args_tail */
10514#line 3630 "ripper.y"
10515 {
10516 (yyval.val) = (yyvsp[0].val);
10517 }
10518#line 10514 "ripper.c"
10519 break;
10520
10521 case 417: /* opt_block_args_tail: %empty */
10522#line 3634 "ripper.y"
10523 {
10524 (yyval.val) = new_args_tail(p, Qnone, Qnone, Qnone, &(yylsp[0]));
10525 }
10526#line 10522 "ripper.c"
10527 break;
10528
10529 case 418: /* excessed_comma: ',' */
10530#line 3640 "ripper.y"
10531 {
10532 /* magic number for rest_id in iseq_set_arguments() */
10533#if 0
10534 (yyval.val) = NODE_SPECIAL_EXCESSIVE_COMMA;
10535#endif
10536 {VALUE v1;v1=dispatch0(excessed_comma);(yyval.val)=v1;}
10537 }
10538#line 10534 "ripper.c"
10539 break;
10540
10541 case 419: /* block_param: f_arg ',' f_block_optarg ',' f_rest_arg opt_block_args_tail */
10542#line 3650 "ripper.y"
10543 {
10544 (yyval.val) = new_args(p, (yyvsp[-5].val), (yyvsp[-3].val), (yyvsp[-1].val), Qnone, (yyvsp[0].val), &(yyloc));
10545 }
10546#line 10542 "ripper.c"
10547 break;
10548
10549 case 420: /* block_param: f_arg ',' f_block_optarg ',' f_rest_arg ',' f_arg opt_block_args_tail */
10550#line 3654 "ripper.y"
10551 {
10552 (yyval.val) = new_args(p, (yyvsp[-7].val), (yyvsp[-5].val), (yyvsp[-3].val), (yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
10553 }
10554#line 10550 "ripper.c"
10555 break;
10556
10557 case 421: /* block_param: f_arg ',' f_block_optarg opt_block_args_tail */
10558#line 3658 "ripper.y"
10559 {
10560 (yyval.val) = new_args(p, (yyvsp[-3].val), (yyvsp[-1].val), Qnone, Qnone, (yyvsp[0].val), &(yyloc));
10561 }
10562#line 10558 "ripper.c"
10563 break;
10564
10565 case 422: /* block_param: f_arg ',' f_block_optarg ',' f_arg opt_block_args_tail */
10566#line 3662 "ripper.y"
10567 {
10568 (yyval.val) = new_args(p, (yyvsp[-5].val), (yyvsp[-3].val), Qnone, (yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
10569 }
10570#line 10566 "ripper.c"
10571 break;
10572
10573 case 423: /* block_param: f_arg ',' f_rest_arg opt_block_args_tail */
10574#line 3666 "ripper.y"
10575 {
10576 (yyval.val) = new_args(p, (yyvsp[-3].val), Qnone, (yyvsp[-1].val), Qnone, (yyvsp[0].val), &(yyloc));
10577 }
10578#line 10574 "ripper.c"
10579 break;
10580
10581 case 424: /* block_param: f_arg excessed_comma */
10582#line 3670 "ripper.y"
10583 {
10584 (yyval.val) = new_args_tail(p, Qnone, Qnone, Qnone, &(yylsp[0]));
10585 (yyval.val) = new_args(p, (yyvsp[-1].val), Qnone, (yyvsp[0].val), Qnone, (yyval.val), &(yyloc));
10586 }
10587#line 10583 "ripper.c"
10588 break;
10589
10590 case 425: /* block_param: f_arg ',' f_rest_arg ',' f_arg opt_block_args_tail */
10591#line 3675 "ripper.y"
10592 {
10593 (yyval.val) = new_args(p, (yyvsp[-5].val), Qnone, (yyvsp[-3].val), (yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
10594 }
10595#line 10591 "ripper.c"
10596 break;
10597
10598 case 426: /* block_param: f_arg opt_block_args_tail */
10599#line 3679 "ripper.y"
10600 {
10601 (yyval.val) = new_args(p, (yyvsp[-1].val), Qnone, Qnone, Qnone, (yyvsp[0].val), &(yyloc));
10602 }
10603#line 10599 "ripper.c"
10604 break;
10605
10606 case 427: /* block_param: f_block_optarg ',' f_rest_arg opt_block_args_tail */
10607#line 3683 "ripper.y"
10608 {
10609 (yyval.val) = new_args(p, Qnone, (yyvsp[-3].val), (yyvsp[-1].val), Qnone, (yyvsp[0].val), &(yyloc));
10610 }
10611#line 10607 "ripper.c"
10612 break;
10613
10614 case 428: /* block_param: f_block_optarg ',' f_rest_arg ',' f_arg opt_block_args_tail */
10615#line 3687 "ripper.y"
10616 {
10617 (yyval.val) = new_args(p, Qnone, (yyvsp[-5].val), (yyvsp[-3].val), (yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
10618 }
10619#line 10615 "ripper.c"
10620 break;
10621
10622 case 429: /* block_param: f_block_optarg opt_block_args_tail */
10623#line 3691 "ripper.y"
10624 {
10625 (yyval.val) = new_args(p, Qnone, (yyvsp[-1].val), Qnone, Qnone, (yyvsp[0].val), &(yyloc));
10626 }
10627#line 10623 "ripper.c"
10628 break;
10629
10630 case 430: /* block_param: f_block_optarg ',' f_arg opt_block_args_tail */
10631#line 3695 "ripper.y"
10632 {
10633 (yyval.val) = new_args(p, Qnone, (yyvsp[-3].val), Qnone, (yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
10634 }
10635#line 10631 "ripper.c"
10636 break;
10637
10638 case 431: /* block_param: f_rest_arg opt_block_args_tail */
10639#line 3699 "ripper.y"
10640 {
10641 (yyval.val) = new_args(p, Qnone, Qnone, (yyvsp[-1].val), Qnone, (yyvsp[0].val), &(yyloc));
10642 }
10643#line 10639 "ripper.c"
10644 break;
10645
10646 case 432: /* block_param: f_rest_arg ',' f_arg opt_block_args_tail */
10647#line 3703 "ripper.y"
10648 {
10649 (yyval.val) = new_args(p, Qnone, Qnone, (yyvsp[-3].val), (yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
10650 }
10651#line 10647 "ripper.c"
10652 break;
10653
10654 case 433: /* block_param: block_args_tail */
10655#line 3707 "ripper.y"
10656 {
10657 (yyval.val) = new_args(p, Qnone, Qnone, Qnone, Qnone, (yyvsp[0].val), &(yyloc));
10658 }
10659#line 10655 "ripper.c"
10660 break;
10661
10662 case 435: /* opt_block_param: block_param_def */
10663#line 3714 "ripper.y"
10664 {
10665 p->command_start = TRUE;
10666 }
10667#line 10663 "ripper.c"
10668 break;
10669
10670 case 436: /* block_param_def: '|' opt_bv_decl '|' */
10671#line 3720 "ripper.y"
10672 {
10673 p->cur_arg = 0;
10674 p->max_numparam = ORDINAL_PARAM;
10675 p->ctxt.in_argdef = 0;
10676#if 0
10677 (yyval.val) = 0;
10678#endif
10679 {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;}
10680 }
10681#line 10677 "ripper.c"
10682 break;
10683
10684 case 437: /* block_param_def: '|' block_param opt_bv_decl '|' */
10685#line 3730 "ripper.y"
10686 {
10687 p->cur_arg = 0;
10688 p->max_numparam = ORDINAL_PARAM;
10689 p->ctxt.in_argdef = 0;
10690#if 0
10691 (yyval.val) = (yyvsp[-2].val);
10692#endif
10693 {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;}
10694 }
10695#line 10691 "ripper.c"
10696 break;
10697
10698 case 438: /* opt_bv_decl: opt_nl */
10699#line 3743 "ripper.y"
10700 {
10701 (yyval.val) = 0;
10702 }
10703#line 10699 "ripper.c"
10704 break;
10705
10706 case 439: /* opt_bv_decl: opt_nl ';' bv_decls opt_nl */
10707#line 3747 "ripper.y"
10708 {
10709#if 0
10710 (yyval.val) = 0;
10711#endif
10712 (yyval.val)=(yyvsp[-1].val);
10713 }
10714#line 10710 "ripper.c"
10715 break;
10716
10717 case 440: /* bv_decls: bvar */
10718#line 3756 "ripper.y"
10719 {(yyval.val)=rb_ary_new3(1, get_value((yyvsp[0].val)));}
10720#line 10716 "ripper.c"
10721 break;
10722
10723 case 441: /* bv_decls: bv_decls ',' bvar */
10724#line 3758 "ripper.y"
10725 {(yyval.val)=rb_ary_push((yyvsp[-2].val), get_value((yyvsp[0].val)));}
10726#line 10722 "ripper.c"
10727 break;
10728
10729 case 442: /* bvar: "local variable or method" */
10730#line 3762 "ripper.y"
10731 {
10732 new_bv(p, get_id((yyvsp[0].val)));
10733 (yyval.val)=get_value((yyvsp[0].val));
10734 }
10735#line 10731 "ripper.c"
10736 break;
10737
10738 case 443: /* bvar: f_bad_arg */
10739#line 3767 "ripper.y"
10740 {
10741 (yyval.val) = 0;
10742 }
10743#line 10739 "ripper.c"
10744 break;
10745
10746 case 444: /* @25: %empty */
10747#line 3773 "ripper.y"
10748 {
10749 token_info_push(p, "->", &(yylsp[0]));
10750 (yyvsp[0].vars) = dyna_push(p);
10751 (yyval.num) = p->lex.lpar_beg;
10752 p->lex.lpar_beg = p->lex.paren_nest;
10753 }
10754#line 10750 "ripper.c"
10755 break;
10756
10757 case 445: /* @26: %empty */
10758#line 3779 "ripper.y"
10759 {
10760 (yyval.num) = p->max_numparam;
10761 p->max_numparam = 0;
10762 }
10763#line 10759 "ripper.c"
10764 break;
10765
10766 case 446: /* @27: %empty */
10767#line 3783 "ripper.y"
10768 {
10769 (yyval.node) = numparam_push(p);
10770 }
10771#line 10767 "ripper.c"
10772 break;
10773
10774 case 447: /* $@28: %empty */
10775#line 3787 "ripper.y"
10776 {
10777 CMDARG_PUSH(0);
10778 }
10779#line 10775 "ripper.c"
10780 break;
10781
10782 case 448: /* lambda: "->" @25 @26 @27 f_larglist $@28 lambda_body */
10783#line 3791 "ripper.y"
10784 {
10785 int max_numparam = p->max_numparam;
10786 p->lex.lpar_beg = (yyvsp[-5].num);
10787 p->max_numparam = (yyvsp[-4].num);
10788 CMDARG_POP();
10789 (yyvsp[-2].val) = args_with_numbered(p, (yyvsp[-2].val), max_numparam);
10790#if 0
10791 {
10792 YYLTYPE loc = code_loc_gen(&(yylsp[-2]), &(yylsp[0]));
10793 (yyval.val) = NEW_LAMBDA((yyvsp[-2].val), (yyvsp[0].val), &loc);
10794 nd_set_line((yyval.val)->nd_body, (yylsp[0]).end_pos.lineno);
10795 nd_set_line((yyval.val), (yylsp[-2]).end_pos.lineno);
10796 nd_set_first_loc((yyval.val), (yylsp[-6]).beg_pos);
10797 }
10798#endif
10799 {VALUE v1,v2,v3;v1=(yyvsp[-2].val);v2=(yyvsp[0].val);v3=dispatch2(lambda,v1,v2);(yyval.val)=v3;}
10800 numparam_pop(p, (yyvsp[-3].node));
10801 dyna_pop(p, (yyvsp[-6].vars));
10802 }
10803#line 10799 "ripper.c"
10804 break;
10805
10806 case 449: /* f_larglist: '(' f_args opt_bv_decl ')' */
10807#line 3813 "ripper.y"
10808 {
10809 p->ctxt.in_argdef = 0;
10810#if 0
10811 (yyval.val) = (yyvsp[-2].val);
10812 p->max_numparam = ORDINAL_PARAM;
10813#endif
10814 {VALUE v1,v2;v1=(yyvsp[-2].val);v2=dispatch1(paren,v1);(yyval.val)=v2;}
10815 }
10816#line 10812 "ripper.c"
10817 break;
10818
10819 case 450: /* f_larglist: f_args */
10820#line 3822 "ripper.y"
10821 {
10822 p->ctxt.in_argdef = 0;
10823#if 0
10824 if (!args_info_empty_p((yyvsp[0].val)->nd_ainfo))
10825 p->max_numparam = ORDINAL_PARAM;
10826#endif
10827 (yyval.val) = (yyvsp[0].val);
10828 }
10829#line 10825 "ripper.c"
10830 break;
10831
10832 case 451: /* lambda_body: tLAMBEG compstmt '}' */
10833#line 3833 "ripper.y"
10834 {
10835 token_info_pop(p, "}", &(yylsp[0]));
10836 (yyval.val) = (yyvsp[-1].val);
10837 }
10838#line 10834 "ripper.c"
10839 break;
10840
10841 case 452: /* lambda_body: "`do' for lambda" bodystmt k_end */
10842#line 3838 "ripper.y"
10843 {
10844 (yyval.val) = (yyvsp[-1].val);
10845 }
10846#line 10842 "ripper.c"
10847 break;
10848
10849 case 453: /* do_block: k_do_block do_body k_end */
10850#line 3844 "ripper.y"
10851 {
10852 (yyval.val) = (yyvsp[-1].val);
10853#if 0
10854 (yyval.val)->nd_body->nd_loc = code_loc_gen(&(yylsp[-2]), &(yylsp[0]));
10855 nd_set_line((yyval.val), (yylsp[-2]).end_pos.lineno);
10856#endif
10857 }
10858#line 10854 "ripper.c"
10859 break;
10860
10861 case 454: /* block_call: command do_block */
10862#line 3854 "ripper.y"
10863 {
10864#if 0
10865 if (nd_type_p((yyvsp[-1].val), NODE_YIELD)) {
10866 compile_error(p, "block given to yield");
10867 }
10868 else {
10869 block_dup_check(p, (yyvsp[-1].val)->nd_args, (yyvsp[0].val));
10870 }
10871 (yyval.val) = method_add_block(p, (yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
10872 fixpos((yyval.val), (yyvsp[-1].val));
10873#endif
10874 {VALUE v1,v2,v3;v1=(yyvsp[-1].val);v2=(yyvsp[0].val);v3=dispatch2(method_add_block,v1,v2);(yyval.val)=v3;}
10875 }
10876#line 10872 "ripper.c"
10877 break;
10878
10879 case 455: /* block_call: block_call call_op2 operation2 opt_paren_args */
10880#line 3868 "ripper.y"
10881 {
10882#if 0
10883 (yyval.val) = new_qcall(p, (yyvsp[-2].val), (yyvsp[-3].val), (yyvsp[-1].val), (yyvsp[0].val), &(yylsp[-1]), &(yyloc));
10884#endif
10885 {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;}
10886 }
10887#line 10883 "ripper.c"
10888 break;
10889
10890 case 456: /* block_call: block_call call_op2 operation2 opt_paren_args brace_block */
10891#line 3875 "ripper.y"
10892 {
10893#if 0
10894 (yyval.val) = new_command_qcall(p, (yyvsp[-3].val), (yyvsp[-4].val), (yyvsp[-2].val), (yyvsp[-1].val), (yyvsp[0].val), &(yylsp[-2]), &(yyloc));
10895#endif
10896 {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;}
10897 }
10898#line 10894 "ripper.c"
10899 break;
10900
10901 case 457: /* block_call: block_call call_op2 operation2 command_args do_block */
10902#line 3882 "ripper.y"
10903 {
10904#if 0
10905 (yyval.val) = new_command_qcall(p, (yyvsp[-3].val), (yyvsp[-4].val), (yyvsp[-2].val), (yyvsp[-1].val), (yyvsp[0].val), &(yylsp[-2]), &(yyloc));
10906#endif
10907 {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;}
10908 }
10909#line 10905 "ripper.c"
10910 break;
10911
10912 case 458: /* method_call: fcall paren_args */
10913#line 3891 "ripper.y"
10914 {
10915#if 0
10916 (yyval.val) = (yyvsp[-1].val);
10917 (yyval.val)->nd_args = (yyvsp[0].val);
10918 nd_set_last_loc((yyvsp[-1].val), (yylsp[0]).end_pos);
10919#endif
10920 {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;}
10921 }
10922#line 10918 "ripper.c"
10923 break;
10924
10925 case 459: /* method_call: primary_value call_op operation2 opt_paren_args */
10926#line 3900 "ripper.y"
10927 {
10928#if 0
10929 (yyval.val) = new_qcall(p, (yyvsp[-2].val), (yyvsp[-3].val), (yyvsp[-1].val), (yyvsp[0].val), &(yylsp[-1]), &(yyloc));
10930 nd_set_line((yyval.val), (yylsp[-1]).end_pos.lineno);
10931#endif
10932 {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;}
10933 }
10934#line 10930 "ripper.c"
10935 break;
10936
10937 case 460: /* method_call: primary_value "::" operation2 paren_args */
10938#line 3908 "ripper.y"
10939 {
10940#if 0
10941 (yyval.val) = new_qcall(p, ID2VAL(idCOLON2), (yyvsp[-3].val), (yyvsp[-1].val), (yyvsp[0].val), &(yylsp[-1]), &(yyloc));
10942 nd_set_line((yyval.val), (yylsp[-1]).end_pos.lineno);
10943#endif
10944 {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;}
10945 }
10946#line 10942 "ripper.c"
10947 break;
10948
10949 case 461: /* method_call: primary_value "::" operation3 */
10950#line 3916 "ripper.y"
10951 {
10952#if 0
10953 (yyval.val) = new_qcall(p, ID2VAL(idCOLON2), (yyvsp[-2].val), (yyvsp[0].val), Qnull, &(yylsp[0]), &(yyloc));
10954#endif
10955 {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;}
10956 }
10957#line 10953 "ripper.c"
10958 break;
10959
10960 case 462: /* method_call: primary_value call_op paren_args */
10961#line 3923 "ripper.y"
10962 {
10963#if 0
10964 (yyval.val) = new_qcall(p, (yyvsp[-1].val), (yyvsp[-2].val), ID2VAL(idCall), (yyvsp[0].val), &(yylsp[-1]), &(yyloc));
10965 nd_set_line((yyval.val), (yylsp[-1]).end_pos.lineno);
10966#endif
10967 {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;}
10968 }
10969#line 10965 "ripper.c"
10970 break;
10971
10972 case 463: /* method_call: primary_value "::" paren_args */
10973#line 3931 "ripper.y"
10974 {
10975#if 0
10976 (yyval.val) = new_qcall(p, ID2VAL(idCOLON2), (yyvsp[-2].val), ID2VAL(idCall), (yyvsp[0].val), &(yylsp[-1]), &(yyloc));
10977 nd_set_line((yyval.val), (yylsp[-1]).end_pos.lineno);
10978#endif
10979 {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;}
10980 }
10981#line 10977 "ripper.c"
10982 break;
10983
10984 case 464: /* method_call: "`super'" paren_args */
10985#line 3939 "ripper.y"
10986 {
10987#if 0
10988 (yyval.val) = NEW_SUPER((yyvsp[0].val), &(yyloc));
10989#endif
10990 {VALUE v1,v2;v1=(yyvsp[0].val);v2=dispatch1(super,v1);(yyval.val)=v2;}
10991 }
10992#line 10988 "ripper.c"
10993 break;
10994
10995 case 465: /* method_call: "`super'" */
10996#line 3946 "ripper.y"
10997 {
10998#if 0
10999 (yyval.val) = NEW_ZSUPER(&(yyloc));
11000#endif
11001 {VALUE v1;v1=dispatch0(zsuper);(yyval.val)=v1;}
11002 }
11003#line 10999 "ripper.c"
11004 break;
11005
11006 case 466: /* method_call: primary_value '[' opt_call_args rbracket */
11007#line 3953 "ripper.y"
11008 {
11009#if 0
11010 if ((yyvsp[-3].val) && nd_type_p((yyvsp[-3].val), NODE_SELF))
11011 (yyval.val) = NEW_FCALL(tAREF, (yyvsp[-1].val), &(yyloc));
11012 else
11013 (yyval.val) = NEW_CALL((yyvsp[-3].val), tAREF, (yyvsp[-1].val), &(yyloc));
11014 fixpos((yyval.val), (yyvsp[-3].val));
11015#endif
11016 {VALUE v1,v2,v3;v1=(yyvsp[-3].val);v2=escape_Qundef((yyvsp[-1].val));v3=dispatch2(aref,v1,v2);(yyval.val)=v3;}
11017 }
11018#line 11014 "ripper.c"
11019 break;
11020
11021 case 467: /* brace_block: '{' brace_body '}' */
11022#line 3966 "ripper.y"
11023 {
11024 (yyval.val) = (yyvsp[-1].val);
11025#if 0
11026 (yyval.val)->nd_body->nd_loc = code_loc_gen(&(yylsp[-2]), &(yylsp[0]));
11027 nd_set_line((yyval.val), (yylsp[-2]).end_pos.lineno);
11028#endif
11029 }
11030#line 11026 "ripper.c"
11031 break;
11032
11033 case 468: /* brace_block: k_do do_body k_end */
11034#line 3974 "ripper.y"
11035 {
11036 (yyval.val) = (yyvsp[-1].val);
11037#if 0
11038 (yyval.val)->nd_body->nd_loc = code_loc_gen(&(yylsp[-2]), &(yylsp[0]));
11039 nd_set_line((yyval.val), (yylsp[-2]).end_pos.lineno);
11040#endif
11041 }
11042#line 11038 "ripper.c"
11043 break;
11044
11045 case 469: /* @29: %empty */
11046#line 3983 "ripper.y"
11047 {(yyval.vars) = dyna_push(p);}
11048#line 11044 "ripper.c"
11049 break;
11050
11051 case 470: /* @30: %empty */
11052#line 3984 "ripper.y"
11053 {
11054 (yyval.num) = p->max_numparam;
11055 p->max_numparam = 0;
11056 }
11057#line 11053 "ripper.c"
11058 break;
11059
11060 case 471: /* @31: %empty */
11061#line 3988 "ripper.y"
11062 {
11063 (yyval.node) = numparam_push(p);
11064 }
11065#line 11061 "ripper.c"
11066 break;
11067
11068 case 472: /* brace_body: @29 @30 @31 opt_block_param compstmt */
11069#line 3992 "ripper.y"
11070 {
11071 int max_numparam = p->max_numparam;
11072 p->max_numparam = (yyvsp[-3].num);
11073 (yyvsp[-1].val) = args_with_numbered(p, (yyvsp[-1].val), max_numparam);
11074#if 0
11075 (yyval.val) = NEW_ITER((yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
11076#endif
11077 {VALUE v1,v2,v3;v1=escape_Qundef((yyvsp[-1].val));v2=(yyvsp[0].val);v3=dispatch2(brace_block,v1,v2);(yyval.val)=v3;}
11078 numparam_pop(p, (yyvsp[-2].node));
11079 dyna_pop(p, (yyvsp[-4].vars));
11080 }
11081#line 11077 "ripper.c"
11082 break;
11083
11084 case 473: /* @32: %empty */
11085#line 4005 "ripper.y"
11086 {(yyval.vars) = dyna_push(p);}
11087#line 11083 "ripper.c"
11088 break;
11089
11090 case 474: /* @33: %empty */
11091#line 4006 "ripper.y"
11092 {
11093 (yyval.num) = p->max_numparam;
11094 p->max_numparam = 0;
11095 }
11096#line 11092 "ripper.c"
11097 break;
11098
11099 case 475: /* @34: %empty */
11100#line 4010 "ripper.y"
11101 {
11102 (yyval.node) = numparam_push(p);
11103 CMDARG_PUSH(0);
11104 }
11105#line 11101 "ripper.c"
11106 break;
11107
11108 case 476: /* do_body: @32 @33 @34 opt_block_param bodystmt */
11109#line 4015 "ripper.y"
11110 {
11111 int max_numparam = p->max_numparam;
11112 p->max_numparam = (yyvsp[-3].num);
11113 (yyvsp[-1].val) = args_with_numbered(p, (yyvsp[-1].val), max_numparam);
11114#if 0
11115 (yyval.val) = NEW_ITER((yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
11116#endif
11117 {VALUE v1,v2,v3;v1=escape_Qundef((yyvsp[-1].val));v2=(yyvsp[0].val);v3=dispatch2(do_block,v1,v2);(yyval.val)=v3;}
11118 CMDARG_POP();
11119 numparam_pop(p, (yyvsp[-2].node));
11120 dyna_pop(p, (yyvsp[-4].vars));
11121 }
11122#line 11118 "ripper.c"
11123 break;
11124
11125 case 477: /* case_args: arg_value */
11126#line 4030 "ripper.y"
11127 {
11128#if 0
11129 check_literal_when(p, (yyvsp[0].val), &(yylsp[0]));
11130 (yyval.val) = NEW_LIST((yyvsp[0].val), &(yyloc));
11131#endif
11132 {VALUE v1,v2,v3,v4;v1=dispatch0(args_new);v2=v1;v3=(yyvsp[0].val);v4=dispatch2(args_add,v2,v3);(yyval.val)=v4;}
11133 }
11134#line 11130 "ripper.c"
11135 break;
11136
11137 case 478: /* case_args: "*" arg_value */
11138#line 4038 "ripper.y"
11139 {
11140#if 0
11141 (yyval.val) = NEW_SPLAT((yyvsp[0].val), &(yyloc));
11142#endif
11143 {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;}
11144 }
11145#line 11141 "ripper.c"
11146 break;
11147
11148 case 479: /* case_args: case_args ',' arg_value */
11149#line 4045 "ripper.y"
11150 {
11151#if 0
11152 check_literal_when(p, (yyvsp[0].val), &(yylsp[0]));
11153 (yyval.val) = last_arg_append(p, (yyvsp[-2].val), (yyvsp[0].val), &(yyloc));
11154#endif
11155 {VALUE v1,v2,v3;v1=(yyvsp[-2].val);v2=(yyvsp[0].val);v3=dispatch2(args_add,v1,v2);(yyval.val)=v3;}
11156 }
11157#line 11153 "ripper.c"
11158 break;
11159
11160 case 480: /* case_args: case_args ',' "*" arg_value */
11161#line 4053 "ripper.y"
11162 {
11163#if 0
11164 (yyval.val) = rest_arg_append(p, (yyvsp[-3].val), (yyvsp[0].val), &(yyloc));
11165#endif
11166 {VALUE v1,v2,v3;v1=(yyvsp[-3].val);v2=(yyvsp[0].val);v3=dispatch2(args_add_star,v1,v2);(yyval.val)=v3;}
11167 }
11168#line 11164 "ripper.c"
11169 break;
11170
11171 case 481: /* case_body: k_when case_args then compstmt cases */
11172#line 4064 "ripper.y"
11173 {
11174#if 0
11175 (yyval.val) = NEW_WHEN((yyvsp[-3].val), (yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
11176 fixpos((yyval.val), (yyvsp[-3].val));
11177#endif
11178 {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;}
11179 }
11180#line 11176 "ripper.c"
11181 break;
11182
11183 case 484: /* @35: %empty */
11184#line 4078 "ripper.y"
11185 {
11186 SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
11187 p->command_start = FALSE;
11188 (yyvsp[0].ctxt) = p->ctxt;
11189 p->ctxt.in_kwarg = 1;
11190 (yyval.tbl) = push_pvtbl(p);
11191 }
11192#line 11188 "ripper.c"
11193 break;
11194
11195 case 485: /* @36: %empty */
11196#line 4085 "ripper.y"
11197 {
11198 (yyval.tbl) = push_pktbl(p);
11199 }
11200#line 11196 "ripper.c"
11201 break;
11202
11203 case 486: /* $@37: %empty */
11204#line 4089 "ripper.y"
11205 {
11206 pop_pktbl(p, (yyvsp[-2].tbl));
11207 pop_pvtbl(p, (yyvsp[-3].tbl));
11208 p->ctxt.in_kwarg = (yyvsp[-4].ctxt).in_kwarg;
11209 }
11210#line 11206 "ripper.c"
11211 break;
11212
11213 case 487: /* p_case_body: "`in'" @35 @36 p_top_expr then $@37 compstmt p_cases */
11214#line 4096 "ripper.y"
11215 {
11216#if 0
11217 (yyval.val) = NEW_IN((yyvsp[-4].val), (yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
11218#endif
11219 {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;}
11220 }
11221#line 11217 "ripper.c"
11222 break;
11223
11224 case 491: /* p_top_expr: p_top_expr_body "`if' modifier" expr_value */
11225#line 4110 "ripper.y"
11226 {
11227#if 0
11228 (yyval.val) = new_if(p, (yyvsp[0].val), (yyvsp[-2].val), 0, &(yyloc));
11229 fixpos((yyval.val), (yyvsp[0].val));
11230#endif
11231 {VALUE v1,v2,v3;v1=(yyvsp[0].val);v2=(yyvsp[-2].val);v3=dispatch2(if_mod,v1,v2);(yyval.val)=v3;}
11232 }
11233#line 11229 "ripper.c"
11234 break;
11235
11236 case 492: /* p_top_expr: p_top_expr_body "`unless' modifier" expr_value */
11237#line 4118 "ripper.y"
11238 {
11239#if 0
11240 (yyval.val) = new_unless(p, (yyvsp[0].val), (yyvsp[-2].val), 0, &(yyloc));
11241 fixpos((yyval.val), (yyvsp[0].val));
11242#endif
11243 {VALUE v1,v2,v3;v1=(yyvsp[0].val);v2=(yyvsp[-2].val);v3=dispatch2(unless_mod,v1,v2);(yyval.val)=v3;}
11244 }
11245#line 11241 "ripper.c"
11246 break;
11247
11248 case 494: /* p_top_expr_body: p_expr ',' */
11249#line 4129 "ripper.y"
11250 {
11251 (yyval.val) = new_array_pattern_tail(p, Qnone, 1, 0, Qnone, &(yyloc));
11252 (yyval.val) = new_array_pattern(p, Qnone, get_value((yyvsp[-1].val)), (yyval.val), &(yyloc));
11253 }
11254#line 11250 "ripper.c"
11255 break;
11256
11257 case 495: /* p_top_expr_body: p_expr ',' p_args */
11258#line 4134 "ripper.y"
11259 {
11260 (yyval.val) = new_array_pattern(p, Qnone, get_value((yyvsp[-2].val)), (yyvsp[0].val), &(yyloc));
11261#if 0
11262 nd_set_first_loc((yyval.val), (yylsp[-2]).beg_pos);
11263#endif
11264
11265 }
11266#line 11262 "ripper.c"
11267 break;
11268
11269 case 496: /* p_top_expr_body: p_find */
11270#line 4142 "ripper.y"
11271 {
11272 (yyval.val) = new_find_pattern(p, Qnone, (yyvsp[0].val), &(yyloc));
11273 }
11274#line 11270 "ripper.c"
11275 break;
11276
11277 case 497: /* p_top_expr_body: p_args_tail */
11278#line 4146 "ripper.y"
11279 {
11280 (yyval.val) = new_array_pattern(p, Qnone, Qnone, (yyvsp[0].val), &(yyloc));
11281 }
11282#line 11278 "ripper.c"
11283 break;
11284
11285 case 498: /* p_top_expr_body: p_kwargs */
11286#line 4150 "ripper.y"
11287 {
11288 (yyval.val) = new_hash_pattern(p, Qnone, (yyvsp[0].val), &(yyloc));
11289 }
11290#line 11286 "ripper.c"
11291 break;
11292
11293 case 500: /* p_as: p_expr "=>" p_variable */
11294#line 4159 "ripper.y"
11295 {
11296#if 0
11297 NODE *n = NEW_LIST((yyvsp[-2].val), &(yyloc));
11298 n = list_append(p, n, (yyvsp[0].val));
11299 (yyval.val) = new_hash(p, n, &(yyloc));
11300#endif
11301 {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;}
11302 }
11303#line 11299 "ripper.c"
11304 break;
11305
11306 case 502: /* p_alt: p_alt '|' p_expr_basic */
11307#line 4171 "ripper.y"
11308 {
11309#if 0
11310 (yyval.val) = NEW_NODE(NODE_OR, (yyvsp[-2].val), (yyvsp[0].val), 0, &(yyloc));
11311#endif
11312 {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;}
11313 }
11314#line 11310 "ripper.c"
11315 break;
11316
11317 case 504: /* p_lparen: '(' */
11318#line 4180 "ripper.y"
11319 {(yyval.tbl) = push_pktbl(p);}
11320#line 11316 "ripper.c"
11321 break;
11322
11323 case 505: /* p_lbracket: '[' */
11324#line 4181 "ripper.y"
11325 {(yyval.tbl) = push_pktbl(p);}
11326#line 11322 "ripper.c"
11327 break;
11328
11329 case 508: /* p_expr_basic: p_const p_lparen p_args rparen */
11330#line 4186 "ripper.y"
11331 {
11332 pop_pktbl(p, (yyvsp[-2].tbl));
11333 (yyval.val) = new_array_pattern(p, (yyvsp[-3].val), Qnone, (yyvsp[-1].val), &(yyloc));
11334#if 0
11335 nd_set_first_loc((yyval.val), (yylsp[-3]).beg_pos);
11336#endif
11337
11338 }
11339#line 11335 "ripper.c"
11340 break;
11341
11342 case 509: /* p_expr_basic: p_const p_lparen p_find rparen */
11343#line 4195 "ripper.y"
11344 {
11345 pop_pktbl(p, (yyvsp[-2].tbl));
11346 (yyval.val) = new_find_pattern(p, (yyvsp[-3].val), (yyvsp[-1].val), &(yyloc));
11347#if 0
11348 nd_set_first_loc((yyval.val), (yylsp[-3]).beg_pos);
11349#endif
11350
11351 }
11352#line 11348 "ripper.c"
11353 break;
11354
11355 case 510: /* p_expr_basic: p_const p_lparen p_kwargs rparen */
11356#line 4204 "ripper.y"
11357 {
11358 pop_pktbl(p, (yyvsp[-2].tbl));
11359 (yyval.val) = new_hash_pattern(p, (yyvsp[-3].val), (yyvsp[-1].val), &(yyloc));
11360#if 0
11361 nd_set_first_loc((yyval.val), (yylsp[-3]).beg_pos);
11362#endif
11363
11364 }
11365#line 11361 "ripper.c"
11366 break;
11367
11368 case 511: /* p_expr_basic: p_const '(' rparen */
11369#line 4213 "ripper.y"
11370 {
11371 (yyval.val) = new_array_pattern_tail(p, Qnone, 0, 0, Qnone, &(yyloc));
11372 (yyval.val) = new_array_pattern(p, (yyvsp[-2].val), Qnone, (yyval.val), &(yyloc));
11373 }
11374#line 11370 "ripper.c"
11375 break;
11376
11377 case 512: /* p_expr_basic: p_const p_lbracket p_args rbracket */
11378#line 4218 "ripper.y"
11379 {
11380 pop_pktbl(p, (yyvsp[-2].tbl));
11381 (yyval.val) = new_array_pattern(p, (yyvsp[-3].val), Qnone, (yyvsp[-1].val), &(yyloc));
11382#if 0
11383 nd_set_first_loc((yyval.val), (yylsp[-3]).beg_pos);
11384#endif
11385
11386 }
11387#line 11383 "ripper.c"
11388 break;
11389
11390 case 513: /* p_expr_basic: p_const p_lbracket p_find rbracket */
11391#line 4227 "ripper.y"
11392 {
11393 pop_pktbl(p, (yyvsp[-2].tbl));
11394 (yyval.val) = new_find_pattern(p, (yyvsp[-3].val), (yyvsp[-1].val), &(yyloc));
11395#if 0
11396 nd_set_first_loc((yyval.val), (yylsp[-3]).beg_pos);
11397#endif
11398
11399 }
11400#line 11396 "ripper.c"
11401 break;
11402
11403 case 514: /* p_expr_basic: p_const p_lbracket p_kwargs rbracket */
11404#line 4236 "ripper.y"
11405 {
11406 pop_pktbl(p, (yyvsp[-2].tbl));
11407 (yyval.val) = new_hash_pattern(p, (yyvsp[-3].val), (yyvsp[-1].val), &(yyloc));
11408#if 0
11409 nd_set_first_loc((yyval.val), (yylsp[-3]).beg_pos);
11410#endif
11411
11412 }
11413#line 11409 "ripper.c"
11414 break;
11415
11416 case 515: /* p_expr_basic: p_const '[' rbracket */
11417#line 4245 "ripper.y"
11418 {
11419 (yyval.val) = new_array_pattern_tail(p, Qnone, 0, 0, Qnone, &(yyloc));
11420 (yyval.val) = new_array_pattern(p, (yyvsp[-2].val), Qnone, (yyval.val), &(yyloc));
11421 }
11422#line 11418 "ripper.c"
11423 break;
11424
11425 case 516: /* p_expr_basic: "[" p_args rbracket */
11426#line 4250 "ripper.y"
11427 {
11428 (yyval.val) = new_array_pattern(p, Qnone, Qnone, (yyvsp[-1].val), &(yyloc));
11429 }
11430#line 11426 "ripper.c"
11431 break;
11432
11433 case 517: /* p_expr_basic: "[" p_find rbracket */
11434#line 4254 "ripper.y"
11435 {
11436 (yyval.val) = new_find_pattern(p, Qnone, (yyvsp[-1].val), &(yyloc));
11437 }
11438#line 11434 "ripper.c"
11439 break;
11440
11441 case 518: /* p_expr_basic: "[" rbracket */
11442#line 4258 "ripper.y"
11443 {
11444 (yyval.val) = new_array_pattern_tail(p, Qnone, 0, 0, Qnone, &(yyloc));
11445 (yyval.val) = new_array_pattern(p, Qnone, Qnone, (yyval.val), &(yyloc));
11446 }
11447#line 11443 "ripper.c"
11448 break;
11449
11450 case 519: /* @38: %empty */
11451#line 4263 "ripper.y"
11452 {
11453 (yyval.tbl) = push_pktbl(p);
11454 (yyvsp[0].ctxt) = p->ctxt;
11455 p->ctxt.in_kwarg = 0;
11456 }
11457#line 11453 "ripper.c"
11458 break;
11459
11460 case 520: /* p_expr_basic: "{" @38 p_kwargs rbrace */
11461#line 4269 "ripper.y"
11462 {
11463 pop_pktbl(p, (yyvsp[-2].tbl));
11464 p->ctxt.in_kwarg = (yyvsp[-3].ctxt).in_kwarg;
11465 (yyval.val) = new_hash_pattern(p, Qnone, (yyvsp[-1].val), &(yyloc));
11466 }
11467#line 11463 "ripper.c"
11468 break;
11469
11470 case 521: /* p_expr_basic: "{" rbrace */
11471#line 4275 "ripper.y"
11472 {
11473 (yyval.val) = new_hash_pattern_tail(p, Qnone, 0, &(yyloc));
11474 (yyval.val) = new_hash_pattern(p, Qnone, (yyval.val), &(yyloc));
11475 }
11476#line 11472 "ripper.c"
11477 break;
11478
11479 case 522: /* @39: %empty */
11480#line 4279 "ripper.y"
11481 {(yyval.tbl) = push_pktbl(p);}
11482#line 11478 "ripper.c"
11483 break;
11484
11485 case 523: /* p_expr_basic: "(" @39 p_expr rparen */
11486#line 4280 "ripper.y"
11487 {
11488 pop_pktbl(p, (yyvsp[-2].tbl));
11489 (yyval.val) = (yyvsp[-1].val);
11490 }
11491#line 11487 "ripper.c"
11492 break;
11493
11494 case 524: /* p_args: p_expr */
11495#line 4287 "ripper.y"
11496 {
11497#if 0
11498 NODE *pre_args = NEW_LIST((yyvsp[0].val), &(yyloc));
11499 (yyval.val) = new_array_pattern_tail(p, pre_args, 0, 0, Qnone, &(yyloc));
11500#endif
11501 (yyval.val) = new_array_pattern_tail(p, rb_ary_new_from_args(1, get_value((yyvsp[0].val))), 0, 0, Qnone, &(yyloc));
11502
11503 }
11504#line 11500 "ripper.c"
11505 break;
11506
11507 case 525: /* p_args: p_args_head */
11508#line 4296 "ripper.y"
11509 {
11510 (yyval.val) = new_array_pattern_tail(p, (yyvsp[0].val), 1, 0, Qnone, &(yyloc));
11511 }
11512#line 11508 "ripper.c"
11513 break;
11514
11515 case 526: /* p_args: p_args_head p_arg */
11516#line 4300 "ripper.y"
11517 {
11518#if 0
11519 (yyval.val) = new_array_pattern_tail(p, list_concat((yyvsp[-1].val), (yyvsp[0].val)), 0, 0, Qnone, &(yyloc));
11520#endif
11521 VALUE pre_args = rb_ary_concat((yyvsp[-1].val), get_value((yyvsp[0].val)));
11522 (yyval.val) = new_array_pattern_tail(p, pre_args, 0, 0, Qnone, &(yyloc));
11523
11524 }
11525#line 11521 "ripper.c"
11526 break;
11527
11528 case 527: /* p_args: p_args_head "*" "local variable or method" */
11529#line 4309 "ripper.y"
11530 {
11531 (yyval.val) = new_array_pattern_tail(p, (yyvsp[-2].val), 1, (yyvsp[0].val), Qnone, &(yyloc));
11532 }
11533#line 11529 "ripper.c"
11534 break;
11535
11536 case 528: /* p_args: p_args_head "*" "local variable or method" ',' p_args_post */
11537#line 4313 "ripper.y"
11538 {
11539 (yyval.val) = new_array_pattern_tail(p, (yyvsp[-4].val), 1, (yyvsp[-2].val), (yyvsp[0].val), &(yyloc));
11540 }
11541#line 11537 "ripper.c"
11542 break;
11543
11544 case 529: /* p_args: p_args_head "*" */
11545#line 4317 "ripper.y"
11546 {
11547 (yyval.val) = new_array_pattern_tail(p, (yyvsp[-1].val), 1, 0, Qnone, &(yyloc));
11548 }
11549#line 11545 "ripper.c"
11550 break;
11551
11552 case 530: /* p_args: p_args_head "*" ',' p_args_post */
11553#line 4321 "ripper.y"
11554 {
11555 (yyval.val) = new_array_pattern_tail(p, (yyvsp[-3].val), 1, 0, (yyvsp[0].val), &(yyloc));
11556 }
11557#line 11553 "ripper.c"
11558 break;
11559
11560 case 532: /* p_args_head: p_arg ',' */
11561#line 4328 "ripper.y"
11562 {
11563 (yyval.val) = (yyvsp[-1].val);
11564 }
11565#line 11561 "ripper.c"
11566 break;
11567
11568 case 533: /* p_args_head: p_args_head p_arg ',' */
11569#line 4332 "ripper.y"
11570 {
11571#if 0
11572 (yyval.val) = list_concat((yyvsp[-2].val), (yyvsp[-1].val));
11573#endif
11574 (yyval.val)=rb_ary_concat((yyvsp[-2].val), get_value((yyvsp[-1].val)));
11575 }
11576#line 11572 "ripper.c"
11577 break;
11578
11579 case 534: /* p_args_tail: p_rest */
11580#line 4341 "ripper.y"
11581 {
11582 (yyval.val) = new_array_pattern_tail(p, Qnone, 1, (yyvsp[0].val), Qnone, &(yyloc));
11583 }
11584#line 11580 "ripper.c"
11585 break;
11586
11587 case 535: /* p_args_tail: p_rest ',' p_args_post */
11588#line 4345 "ripper.y"
11589 {
11590 (yyval.val) = new_array_pattern_tail(p, Qnone, 1, (yyvsp[-2].val), (yyvsp[0].val), &(yyloc));
11591 }
11592#line 11588 "ripper.c"
11593 break;
11594
11595 case 536: /* p_find: p_rest ',' p_args_post ',' p_rest */
11596#line 4351 "ripper.y"
11597 {
11598 (yyval.val) = new_find_pattern_tail(p, (yyvsp[-4].val), (yyvsp[-2].val), (yyvsp[0].val), &(yyloc));
11599
11600 if (rb_warning_category_enabled_p(RB_WARN_CATEGORY_EXPERIMENTAL))
11601 rb_warn0L_experimental(nd_line((yyval.val)), "Find pattern is experimental, and the behavior may change in future versions of Ruby!");
11602 }
11603#line 11599 "ripper.c"
11604 break;
11605
11606 case 537: /* p_rest: "*" "local variable or method" */
11607#line 4361 "ripper.y"
11608 {
11609 (yyval.val) = (yyvsp[0].val);
11610 }
11611#line 11607 "ripper.c"
11612 break;
11613
11614 case 538: /* p_rest: "*" */
11615#line 4365 "ripper.y"
11616 {
11617 (yyval.val) = 0;
11618 }
11619#line 11615 "ripper.c"
11620 break;
11621
11622 case 540: /* p_args_post: p_args_post ',' p_arg */
11623#line 4372 "ripper.y"
11624 {
11625#if 0
11626 (yyval.val) = list_concat((yyvsp[-2].val), (yyvsp[0].val));
11627#endif
11628 (yyval.val)=rb_ary_concat((yyvsp[-2].val), get_value((yyvsp[0].val)));
11629 }
11630#line 11626 "ripper.c"
11631 break;
11632
11633 case 541: /* p_arg: p_expr */
11634#line 4381 "ripper.y"
11635 {
11636#if 0
11637 (yyval.val) = NEW_LIST((yyvsp[0].val), &(yyloc));
11638#endif
11639 (yyval.val)=rb_ary_new_from_args(1, get_value((yyvsp[0].val)));
11640 }
11641#line 11637 "ripper.c"
11642 break;
11643
11644 case 542: /* p_kwargs: p_kwarg ',' p_any_kwrest */
11645#line 4390 "ripper.y"
11646 {
11647 (yyval.val) = new_hash_pattern_tail(p, new_unique_key_hash(p, (yyvsp[-2].val), &(yyloc)), (yyvsp[0].val), &(yyloc));
11648 }
11649#line 11645 "ripper.c"
11650 break;
11651
11652 case 543: /* p_kwargs: p_kwarg */
11653#line 4394 "ripper.y"
11654 {
11655 (yyval.val) = new_hash_pattern_tail(p, new_unique_key_hash(p, (yyvsp[0].val), &(yyloc)), 0, &(yyloc));
11656 }
11657#line 11653 "ripper.c"
11658 break;
11659
11660 case 544: /* p_kwargs: p_kwarg ',' */
11661#line 4398 "ripper.y"
11662 {
11663 (yyval.val) = new_hash_pattern_tail(p, new_unique_key_hash(p, (yyvsp[-1].val), &(yyloc)), 0, &(yyloc));
11664 }
11665#line 11661 "ripper.c"
11666 break;
11667
11668 case 545: /* p_kwargs: p_any_kwrest */
11669#line 4402 "ripper.y"
11670 {
11671 (yyval.val) = new_hash_pattern_tail(p, new_hash(p, Qnone, &(yyloc)), (yyvsp[0].val), &(yyloc));
11672 }
11673#line 11669 "ripper.c"
11674 break;
11675
11676 case 546: /* p_kwarg: p_kw */
11677#line 4408 "ripper.y"
11678 {(yyval.val)=rb_ary_new_from_args(1, (yyvsp[0].val));}
11679#line 11675 "ripper.c"
11680 break;
11681
11682 case 547: /* p_kwarg: p_kwarg ',' p_kw */
11683#line 4410 "ripper.y"
11684 {
11685#if 0
11686 (yyval.val) = list_concat((yyvsp[-2].val), (yyvsp[0].val));
11687#endif
11688 (yyval.val)=rb_ary_push((yyvsp[-2].val), (yyvsp[0].val));
11689 }
11690#line 11686 "ripper.c"
11691 break;
11692
11693 case 548: /* p_kw: p_kw_label p_expr */
11694#line 4419 "ripper.y"
11695 {
11696 error_duplicate_pattern_key(p, get_id((yyvsp[-1].val)), &(yylsp[-1]));
11697#if 0
11698 (yyval.val) = list_append(p, NEW_LIST(NEW_LIT(ID2SYM((yyvsp[-1].val)), &(yyloc)), &(yyloc)), (yyvsp[0].val));
11699#endif
11700 (yyval.val)=rb_ary_new_from_args(2, get_value((yyvsp[-1].val)), get_value((yyvsp[0].val)));
11701 }
11702#line 11698 "ripper.c"
11703 break;
11704
11705 case 549: /* p_kw: p_kw_label */
11706#line 4427 "ripper.y"
11707 {
11708 error_duplicate_pattern_key(p, get_id((yyvsp[0].val)), &(yylsp[0]));
11709 if ((yyvsp[0].val) && !is_local_id(get_id((yyvsp[0].val)))) {
11710 yyerror1(&(yylsp[0]), "key must be valid as local variables");
11711 }
11712 error_duplicate_pattern_variable(p, get_id((yyvsp[0].val)), &(yylsp[0]));
11713#if 0
11714 (yyval.val) = list_append(p, NEW_LIST(NEW_LIT(ID2SYM((yyvsp[0].val)), &(yyloc)), &(yyloc)), assignable(p, (yyvsp[0].val), 0, &(yyloc)));
11715#endif
11716 (yyval.val)=rb_ary_new_from_args(2, get_value((yyvsp[0].val)), Qnil);
11717 }
11718#line 11714 "ripper.c"
11719 break;
11720
11721 case 551: /* p_kw_label: "string literal" string_contents tLABEL_END */
11722#line 4442 "ripper.y"
11723 {
11724 YYLTYPE loc = code_loc_gen(&(yylsp[-2]), &(yylsp[0]));
11725#if 0
11726 if (!(yyvsp[-1].val) || nd_type_p((yyvsp[-1].val), NODE_STR)) {
11727 NODE *node = dsym_node(p, (yyvsp[-1].val), &loc);
11728 (yyval.val) = SYM2ID(node->nd_lit);
11729 }
11730#endif
11731 if (ripper_is_node_yylval((yyvsp[-1].val)) && RNODE((yyvsp[-1].val))->nd_cval) {
11732 VALUE label = RNODE((yyvsp[-1].val))->nd_cval;
11733 VALUE rval = RNODE((yyvsp[-1].val))->nd_rval;
11734 (yyval.val) = ripper_new_yylval(p, rb_intern_str(label), rval, label);
11735 RNODE((yyval.val))->nd_loc = loc;
11736 }
11737
11738 else {
11739 yyerror1(&loc, "symbol literal with interpolation is not allowed");
11740 (yyval.val) = 0;
11741 }
11742 }
11743#line 11739 "ripper.c"
11744 break;
11745
11746 case 552: /* p_kwrest: kwrest_mark "local variable or method" */
11747#line 4465 "ripper.y"
11748 {
11749 (yyval.val) = (yyvsp[0].val);
11750 }
11751#line 11747 "ripper.c"
11752 break;
11753
11754 case 553: /* p_kwrest: kwrest_mark */
11755#line 4469 "ripper.y"
11756 {
11757 (yyval.val) = 0;
11758 }
11759#line 11755 "ripper.c"
11760 break;
11761
11762 case 554: /* p_kwnorest: kwrest_mark "`nil'" */
11763#line 4475 "ripper.y"
11764 {
11765 (yyval.val) = 0;
11766 }
11767#line 11763 "ripper.c"
11768 break;
11769
11770 case 556: /* p_any_kwrest: p_kwnorest */
11771#line 4481 "ripper.y"
11772 {(yyval.val) = ID2VAL(idNil);}
11773#line 11769 "ripper.c"
11774 break;
11775
11776 case 558: /* p_value: p_primitive ".." p_primitive */
11777#line 4486 "ripper.y"
11778 {
11779#if 0
11780 value_expr((yyvsp[-2].val));
11781 value_expr((yyvsp[0].val));
11782 (yyval.val) = NEW_DOT2((yyvsp[-2].val), (yyvsp[0].val), &(yyloc));
11783#endif
11784 {VALUE v1,v2,v3;v1=(yyvsp[-2].val);v2=(yyvsp[0].val);v3=dispatch2(dot2,v1,v2);(yyval.val)=v3;}
11785 }
11786#line 11782 "ripper.c"
11787 break;
11788
11789 case 559: /* p_value: p_primitive "..." p_primitive */
11790#line 4495 "ripper.y"
11791 {
11792#if 0
11793 value_expr((yyvsp[-2].val));
11794 value_expr((yyvsp[0].val));
11795 (yyval.val) = NEW_DOT3((yyvsp[-2].val), (yyvsp[0].val), &(yyloc));
11796#endif
11797 {VALUE v1,v2,v3;v1=(yyvsp[-2].val);v2=(yyvsp[0].val);v3=dispatch2(dot3,v1,v2);(yyval.val)=v3;}
11798 }
11799#line 11795 "ripper.c"
11800 break;
11801
11802 case 560: /* p_value: p_primitive ".." */
11803#line 4504 "ripper.y"
11804 {
11805#if 0
11806 value_expr((yyvsp[-1].val));
11807 (yyval.val) = NEW_DOT2((yyvsp[-1].val), new_nil_at(p, &(yylsp[0]).end_pos), &(yyloc));
11808#endif
11809 {VALUE v1,v2,v3;v1=(yyvsp[-1].val);v2=Qnil;v3=dispatch2(dot2,v1,v2);(yyval.val)=v3;}
11810 }
11811#line 11807 "ripper.c"
11812 break;
11813
11814 case 561: /* p_value: p_primitive "..." */
11815#line 4512 "ripper.y"
11816 {
11817#if 0
11818 value_expr((yyvsp[-1].val));
11819 (yyval.val) = NEW_DOT3((yyvsp[-1].val), new_nil_at(p, &(yylsp[0]).end_pos), &(yyloc));
11820#endif
11821 {VALUE v1,v2,v3;v1=(yyvsp[-1].val);v2=Qnil;v3=dispatch2(dot3,v1,v2);(yyval.val)=v3;}
11822 }
11823#line 11819 "ripper.c"
11824 break;
11825
11826 case 565: /* p_value: "(.." p_primitive */
11827#line 4523 "ripper.y"
11828 {
11829#if 0
11830 value_expr((yyvsp[0].val));
11831 (yyval.val) = NEW_DOT2(new_nil_at(p, &(yylsp[-1]).beg_pos), (yyvsp[0].val), &(yyloc));
11832#endif
11833 {VALUE v1,v2,v3;v1=Qnil;v2=(yyvsp[0].val);v3=dispatch2(dot2,v1,v2);(yyval.val)=v3;}
11834 }
11835#line 11831 "ripper.c"
11836 break;
11837
11838 case 566: /* p_value: "(..." p_primitive */
11839#line 4531 "ripper.y"
11840 {
11841#if 0
11842 value_expr((yyvsp[0].val));
11843 (yyval.val) = NEW_DOT3(new_nil_at(p, &(yylsp[-1]).beg_pos), (yyvsp[0].val), &(yyloc));
11844#endif
11845 {VALUE v1,v2,v3;v1=Qnil;v2=(yyvsp[0].val);v3=dispatch2(dot3,v1,v2);(yyval.val)=v3;}
11846 }
11847#line 11843 "ripper.c"
11848 break;
11849
11850 case 575: /* p_primitive: keyword_variable */
11851#line 4549 "ripper.y"
11852 {
11853#if 0
11854 if (!((yyval.val) = gettable(p, (yyvsp[0].val), &(yyloc)))) (yyval.val) = NEW_BEGIN(0, &(yyloc));
11855#endif
11856 {VALUE v1,v2;v1=(yyvsp[0].val);v2=dispatch1(var_ref,v1);(yyval.val)=v2;}
11857 }
11858#line 11854 "ripper.c"
11859 break;
11860
11861 case 577: /* p_variable: "local variable or method" */
11862#line 4559 "ripper.y"
11863 {
11864#if 0
11865 error_duplicate_pattern_variable(p, (yyvsp[0].val), &(yylsp[0]));
11866 (yyval.val) = assignable(p, (yyvsp[0].val), 0, &(yyloc));
11867#endif
11868 (yyval.val)=assignable(p, var_field(p, (yyvsp[0].val)));
11869 }
11870#line 11866 "ripper.c"
11871 break;
11872
11873 case 578: /* p_var_ref: '^' "local variable or method" */
11874#line 4569 "ripper.y"
11875 {
11876#if 0
11877 NODE *n = gettable(p, (yyvsp[0].val), &(yyloc));
11878 if (!(nd_type_p(n, NODE_LVAR) || nd_type_p(n, NODE_DVAR))) {
11879 compile_error(p, "%"PRIsVALUE": no such local variable", rb_id2str((yyvsp[0].val)));
11880 }
11881 (yyval.val) = n;
11882#endif
11883 {VALUE v1,v2;v1=(yyvsp[0].val);v2=dispatch1(var_ref,v1);(yyval.val)=v2;}
11884 }
11885#line 11881 "ripper.c"
11886 break;
11887
11888 case 579: /* p_var_ref: '^' nonlocal_var */
11889#line 4580 "ripper.y"
11890 {
11891#if 0
11892 if (!((yyval.val) = gettable(p, (yyvsp[0].val), &(yyloc)))) (yyval.val) = NEW_BEGIN(0, &(yyloc));
11893#endif
11894 {VALUE v1,v2;v1=(yyvsp[0].val);v2=dispatch1(var_ref,v1);(yyval.val)=v2;}
11895 }
11896#line 11892 "ripper.c"
11897 break;
11898
11899 case 580: /* p_expr_ref: '^' "(" expr_value ')' */
11900#line 4589 "ripper.y"
11901 {
11902#if 0
11903 (yyval.val) = NEW_BEGIN((yyvsp[-1].val), &(yyloc));
11904#endif
11905 {VALUE v1,v2;v1=(yyvsp[-1].val);v2=dispatch1(begin,v1);(yyval.val)=v2;}
11906 }
11907#line 11903 "ripper.c"
11908 break;
11909
11910 case 581: /* p_const: ":: at EXPR_BEG" cname */
11911#line 4598 "ripper.y"
11912 {
11913#if 0
11914 (yyval.val) = NEW_COLON3((yyvsp[0].val), &(yyloc));
11915#endif
11916 {VALUE v1,v2;v1=(yyvsp[0].val);v2=dispatch1(top_const_ref,v1);(yyval.val)=v2;}
11917 }
11918#line 11914 "ripper.c"
11919 break;
11920
11921 case 582: /* p_const: p_const "::" cname */
11922#line 4605 "ripper.y"
11923 {
11924#if 0
11925 (yyval.val) = NEW_COLON2((yyvsp[-2].val), (yyvsp[0].val), &(yyloc));
11926#endif
11927 {VALUE v1,v2,v3;v1=(yyvsp[-2].val);v2=(yyvsp[0].val);v3=dispatch2(const_path_ref,v1,v2);(yyval.val)=v3;}
11928 }
11929#line 11925 "ripper.c"
11930 break;
11931
11932 case 583: /* p_const: "constant" */
11933#line 4612 "ripper.y"
11934 {
11935#if 0
11936 (yyval.val) = gettable(p, (yyvsp[0].val), &(yyloc));
11937#endif
11938 {VALUE v1,v2;v1=(yyvsp[0].val);v2=dispatch1(var_ref,v1);(yyval.val)=v2;}
11939 }
11940#line 11936 "ripper.c"
11941 break;
11942
11943 case 584: /* opt_rescue: k_rescue exc_list exc_var then compstmt opt_rescue */
11944#line 4623 "ripper.y"
11945 {
11946#if 0
11947 (yyval.val) = NEW_RESBODY((yyvsp[-4].val),
11948 (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),
11949 (yyvsp[0].val), &(yyloc));
11950 fixpos((yyval.val), (yyvsp[-4].val)?(yyvsp[-4].val):(yyvsp[-1].val));
11951#endif
11952 {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;}
11953 }
11954#line 11950 "ripper.c"
11955 break;
11956
11957 case 586: /* exc_list: arg_value */
11958#line 4636 "ripper.y"
11959 {
11960#if 0
11961 (yyval.val) = NEW_LIST((yyvsp[0].val), &(yyloc));
11962#endif
11963 (yyval.val)=rb_ary_new3(1, get_value((yyvsp[0].val)));
11964 }
11965#line 11961 "ripper.c"
11966 break;
11967
11968 case 587: /* exc_list: mrhs */
11969#line 4643 "ripper.y"
11970 {
11971#if 0
11972 if (!((yyval.val) = splat_array((yyvsp[0].val)))) (yyval.val) = (yyvsp[0].val);
11973#endif
11974 (yyval.val)=(yyvsp[0].val);
11975 }
11976#line 11972 "ripper.c"
11977 break;
11978
11979 case 589: /* exc_var: "=>" lhs */
11980#line 4653 "ripper.y"
11981 {
11982 (yyval.val) = (yyvsp[0].val);
11983 }
11984#line 11980 "ripper.c"
11985 break;
11986
11987 case 591: /* opt_ensure: k_ensure compstmt */
11988#line 4660 "ripper.y"
11989 {
11990#if 0
11991 (yyval.val) = (yyvsp[0].val);
11992#endif
11993 {VALUE v1,v2;v1=(yyvsp[0].val);v2=dispatch1(ensure,v1);(yyval.val)=v2;}
11994 }
11995#line 11991 "ripper.c"
11996 break;
11997
11998 case 595: /* strings: string */
11999#line 4674 "ripper.y"
12000 {
12001#if 0
12002 NODE *node = (yyvsp[0].val);
12003 if (!node) {
12004 node = NEW_STR(STR_NEW0(), &(yyloc));
12005 RB_OBJ_WRITTEN(p->ast, Qnil, node->nd_lit);
12006 }
12007 else {
12008 node = evstr2dstr(p, node);
12009 }
12010 (yyval.val) = node;
12011#endif
12012 (yyval.val)=(yyvsp[0].val);
12013 }
12014#line 12010 "ripper.c"
12015 break;
12016
12017 case 598: /* string: string string1 */
12018#line 4693 "ripper.y"
12019 {
12020#if 0
12021 (yyval.val) = literal_concat(p, (yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
12022#endif
12023 {VALUE v1,v2,v3;v1=(yyvsp[-1].val);v2=(yyvsp[0].val);v3=dispatch2(string_concat,v1,v2);(yyval.val)=v3;}
12024 }
12025#line 12021 "ripper.c"
12026 break;
12027
12028 case 599: /* string1: "string literal" string_contents "terminator" */
12029#line 4702 "ripper.y"
12030 {
12031#if 0
12032 (yyval.val) = heredoc_dedent(p, (yyvsp[-1].val));
12033 if ((yyval.val)) nd_set_loc((yyval.val), &(yyloc));
12034#endif
12035 {VALUE v1,v2;v1=heredoc_dedent(p, (yyvsp[-1].val));v2=dispatch1(string_literal,v1);(yyval.val)=v2;}
12036 }
12037#line 12033 "ripper.c"
12038 break;
12039
12040 case 600: /* xstring: "backtick literal" xstring_contents "terminator" */
12041#line 4712 "ripper.y"
12042 {
12043#if 0
12044 (yyval.val) = new_xstring(p, heredoc_dedent(p, (yyvsp[-1].val)), &(yyloc));
12045#endif
12046 {VALUE v1,v2;v1=heredoc_dedent(p, (yyvsp[-1].val));v2=dispatch1(xstring_literal,v1);(yyval.val)=v2;}
12047 }
12048#line 12044 "ripper.c"
12049 break;
12050
12051 case 601: /* regexp: "regexp literal" regexp_contents tREGEXP_END */
12052#line 4721 "ripper.y"
12053 {
12054 (yyval.val) = new_regexp(p, (yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
12055 }
12056#line 12052 "ripper.c"
12057 break;
12058
12059 case 602: /* words: "word list" ' ' word_list "terminator" */
12060#line 4727 "ripper.y"
12061 {
12062#if 0
12063 (yyval.val) = make_list((yyvsp[-1].val), &(yyloc));
12064#endif
12065 {VALUE v1,v2;v1=(yyvsp[-1].val);v2=dispatch1(array,v1);(yyval.val)=v2;}
12066 }
12067#line 12063 "ripper.c"
12068 break;
12069
12070 case 603: /* word_list: %empty */
12071#line 4736 "ripper.y"
12072 {
12073#if 0
12074 (yyval.val) = 0;
12075#endif
12076 {VALUE v1;v1=dispatch0(words_new);(yyval.val)=v1;}
12077 }
12078#line 12074 "ripper.c"
12079 break;
12080
12081 case 604: /* word_list: word_list word ' ' */
12082#line 4743 "ripper.y"
12083 {
12084#if 0
12085 (yyval.val) = list_append(p, (yyvsp[-2].val), evstr2dstr(p, (yyvsp[-1].val)));
12086#endif
12087 {VALUE v1,v2,v3;v1=(yyvsp[-2].val);v2=(yyvsp[-1].val);v3=dispatch2(words_add,v1,v2);(yyval.val)=v3;}
12088 }
12089#line 12085 "ripper.c"
12090 break;
12091
12092 case 605: /* word: string_content */
12093#line 4752 "ripper.y"
12094 {{VALUE v1,v2,v3,v4;v1=dispatch0(word_new);v2=v1;v3=(yyvsp[0].val);v4=dispatch2(word_add,v2,v3);(yyval.val)=v4;}}
12095#line 12091 "ripper.c"
12096 break;
12097
12098 case 606: /* word: word string_content */
12099#line 4754 "ripper.y"
12100 {
12101#if 0
12102 (yyval.val) = literal_concat(p, (yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
12103#endif
12104 {VALUE v1,v2,v3;v1=(yyvsp[-1].val);v2=(yyvsp[0].val);v3=dispatch2(word_add,v1,v2);(yyval.val)=v3;}
12105 }
12106#line 12102 "ripper.c"
12107 break;
12108
12109 case 607: /* symbols: "symbol list" ' ' symbol_list "terminator" */
12110#line 4763 "ripper.y"
12111 {
12112#if 0
12113 (yyval.val) = make_list((yyvsp[-1].val), &(yyloc));
12114#endif
12115 {VALUE v1,v2;v1=(yyvsp[-1].val);v2=dispatch1(array,v1);(yyval.val)=v2;}
12116 }
12117#line 12113 "ripper.c"
12118 break;
12119
12120 case 608: /* symbol_list: %empty */
12121#line 4772 "ripper.y"
12122 {
12123#if 0
12124 (yyval.val) = 0;
12125#endif
12126 {VALUE v1;v1=dispatch0(symbols_new);(yyval.val)=v1;}
12127 }
12128#line 12124 "ripper.c"
12129 break;
12130
12131 case 609: /* symbol_list: symbol_list word ' ' */
12132#line 4779 "ripper.y"
12133 {
12134#if 0
12135 (yyval.val) = symbol_append(p, (yyvsp[-2].val), evstr2dstr(p, (yyvsp[-1].val)));
12136#endif
12137 {VALUE v1,v2,v3;v1=(yyvsp[-2].val);v2=(yyvsp[-1].val);v3=dispatch2(symbols_add,v1,v2);(yyval.val)=v3;}
12138 }
12139#line 12135 "ripper.c"
12140 break;
12141
12142 case 610: /* qwords: "verbatim word list" ' ' qword_list "terminator" */
12143#line 4788 "ripper.y"
12144 {
12145#if 0
12146 (yyval.val) = make_list((yyvsp[-1].val), &(yyloc));
12147#endif
12148 {VALUE v1,v2;v1=(yyvsp[-1].val);v2=dispatch1(array,v1);(yyval.val)=v2;}
12149 }
12150#line 12146 "ripper.c"
12151 break;
12152
12153 case 611: /* qsymbols: "verbatim symbol list" ' ' qsym_list "terminator" */
12154#line 4797 "ripper.y"
12155 {
12156#if 0
12157 (yyval.val) = make_list((yyvsp[-1].val), &(yyloc));
12158#endif
12159 {VALUE v1,v2;v1=(yyvsp[-1].val);v2=dispatch1(array,v1);(yyval.val)=v2;}
12160 }
12161#line 12157 "ripper.c"
12162 break;
12163
12164 case 612: /* qword_list: %empty */
12165#line 4806 "ripper.y"
12166 {
12167#if 0
12168 (yyval.val) = 0;
12169#endif
12170 {VALUE v1;v1=dispatch0(qwords_new);(yyval.val)=v1;}
12171 }
12172#line 12168 "ripper.c"
12173 break;
12174
12175 case 613: /* qword_list: qword_list "literal content" ' ' */
12176#line 4813 "ripper.y"
12177 {
12178#if 0
12179 (yyval.val) = list_append(p, (yyvsp[-2].val), (yyvsp[-1].val));
12180#endif
12181 {VALUE v1,v2,v3;v1=(yyvsp[-2].val);v2=(yyvsp[-1].val);v3=dispatch2(qwords_add,v1,v2);(yyval.val)=v3;}
12182 }
12183#line 12179 "ripper.c"
12184 break;
12185
12186 case 614: /* qsym_list: %empty */
12187#line 4822 "ripper.y"
12188 {
12189#if 0
12190 (yyval.val) = 0;
12191#endif
12192 {VALUE v1;v1=dispatch0(qsymbols_new);(yyval.val)=v1;}
12193 }
12194#line 12190 "ripper.c"
12195 break;
12196
12197 case 615: /* qsym_list: qsym_list "literal content" ' ' */
12198#line 4829 "ripper.y"
12199 {
12200#if 0
12201 (yyval.val) = symbol_append(p, (yyvsp[-2].val), (yyvsp[-1].val));
12202#endif
12203 {VALUE v1,v2,v3;v1=(yyvsp[-2].val);v2=(yyvsp[-1].val);v3=dispatch2(qsymbols_add,v1,v2);(yyval.val)=v3;}
12204 }
12205#line 12201 "ripper.c"
12206 break;
12207
12208 case 616: /* string_contents: %empty */
12209#line 4838 "ripper.y"
12210 {
12211#if 0
12212 (yyval.val) = 0;
12213#endif
12214 {VALUE v1;v1=dispatch0(string_content);(yyval.val)=v1;}
12215#if 0
12216#endif
12217 (yyval.val) = ripper_new_yylval(p, 0, (yyval.val), 0);
12218
12219 }
12220#line 12216 "ripper.c"
12221 break;
12222
12223 case 617: /* string_contents: string_contents string_content */
12224#line 4849 "ripper.y"
12225 {
12226#if 0
12227 (yyval.val) = literal_concat(p, (yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
12228#endif
12229 {VALUE v1,v2,v3;v1=(yyvsp[-1].val);v2=(yyvsp[0].val);v3=dispatch2(string_add,v1,v2);(yyval.val)=v3;}
12230#if 0
12231#endif
12232 if (ripper_is_node_yylval((yyvsp[-1].val)) && ripper_is_node_yylval((yyvsp[0].val)) &&
12233 !RNODE((yyvsp[-1].val))->nd_cval) {
12234 RNODE((yyvsp[-1].val))->nd_cval = RNODE((yyvsp[0].val))->nd_cval;
12235 RNODE((yyvsp[-1].val))->nd_rval = add_mark_object(p, (yyval.val));
12236 (yyval.val) = (yyvsp[-1].val);
12237 }
12238
12239 }
12240#line 12236 "ripper.c"
12241 break;
12242
12243 case 618: /* xstring_contents: %empty */
12244#line 4867 "ripper.y"
12245 {
12246#if 0
12247 (yyval.val) = 0;
12248#endif
12249 {VALUE v1;v1=dispatch0(xstring_new);(yyval.val)=v1;}
12250 }
12251#line 12247 "ripper.c"
12252 break;
12253
12254 case 619: /* xstring_contents: xstring_contents string_content */
12255#line 4874 "ripper.y"
12256 {
12257#if 0
12258 (yyval.val) = literal_concat(p, (yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
12259#endif
12260 {VALUE v1,v2,v3;v1=(yyvsp[-1].val);v2=(yyvsp[0].val);v3=dispatch2(xstring_add,v1,v2);(yyval.val)=v3;}
12261 }
12262#line 12258 "ripper.c"
12263 break;
12264
12265 case 620: /* regexp_contents: %empty */
12266#line 4883 "ripper.y"
12267 {
12268#if 0
12269 (yyval.val) = 0;
12270#endif
12271 {VALUE v1;v1=dispatch0(regexp_new);(yyval.val)=v1;}
12272#if 0
12273#endif
12274 (yyval.val) = ripper_new_yylval(p, 0, (yyval.val), 0);
12275
12276 }
12277#line 12273 "ripper.c"
12278 break;
12279
12280 case 621: /* regexp_contents: regexp_contents string_content */
12281#line 4894 "ripper.y"
12282 {
12283#if 0
12284 NODE *head = (yyvsp[-1].val), *tail = (yyvsp[0].val);
12285 if (!head) {
12286 (yyval.val) = tail;
12287 }
12288 else if (!tail) {
12289 (yyval.val) = head;
12290 }
12291 else {
12292 switch (nd_type(head)) {
12293 case NODE_STR:
12294 nd_set_type(head, NODE_DSTR);
12295 break;
12296 case NODE_DSTR:
12297 break;
12298 default:
12299 head = list_append(p, NEW_DSTR(Qnil, &(yyloc)), head);
12300 break;
12301 }
12302 (yyval.val) = list_append(p, head, tail);
12303 }
12304#endif
12305 VALUE s1 = 1, s2 = 0, n1 = (yyvsp[-1].val), n2 = (yyvsp[0].val);
12306 if (ripper_is_node_yylval(n1)) {
12307 s1 = RNODE(n1)->nd_cval;
12308 n1 = RNODE(n1)->nd_rval;
12309 }
12310 if (ripper_is_node_yylval(n2)) {
12311 s2 = RNODE(n2)->nd_cval;
12312 n2 = RNODE(n2)->nd_rval;
12313 }
12314 (yyval.val) = dispatch2(regexp_add, n1, n2);
12315 if (!s1 && s2) {
12316 (yyval.val) = ripper_new_yylval(p, 0, (yyval.val), s2);
12317 }
12318
12319 }
12320#line 12316 "ripper.c"
12321 break;
12322
12323 case 622: /* string_content: "literal content" */
12324#line 4935 "ripper.y"
12325 {(yyval.val)=ripper_new_yylval(p, 0, get_value((yyvsp[0].val)), (yyvsp[0].val));}
12326#line 12322 "ripper.c"
12327 break;
12328
12329 case 623: /* @40: %empty */
12330#line 4937 "ripper.y"
12331 {
12332 /* need to backup p->lex.strterm so that a string literal `%&foo,#$&,bar&` can be parsed */
12333 (yyval.strterm) = p->lex.strterm;
12334 p->lex.strterm = 0;
12335 SET_LEX_STATE(EXPR_BEG);
12336 }
12337#line 12333 "ripper.c"
12338 break;
12339
12340 case 624: /* string_content: tSTRING_DVAR @40 string_dvar */
12341#line 4944 "ripper.y"
12342 {
12343 p->lex.strterm = (yyvsp[-1].strterm);
12344#if 0
12345 (yyval.val) = NEW_EVSTR((yyvsp[0].val), &(yyloc));
12346 nd_set_line((yyval.val), (yylsp[0]).end_pos.lineno);
12347#endif
12348 {VALUE v1,v2;v1=(yyvsp[0].val);v2=dispatch1(string_dvar,v1);(yyval.val)=v2;}
12349 }
12350#line 12346 "ripper.c"
12351 break;
12352
12353 case 625: /* $@41: %empty */
12354#line 4953 "ripper.y"
12355 {
12356 CMDARG_PUSH(0);
12357 COND_PUSH(0);
12358 }
12359#line 12355 "ripper.c"
12360 break;
12361
12362 case 626: /* @42: %empty */
12363#line 4957 "ripper.y"
12364 {
12365 /* need to backup p->lex.strterm so that a string literal `%!foo,#{ !0 },bar!` can be parsed */
12366 (yyval.strterm) = p->lex.strterm;
12367 p->lex.strterm = 0;
12368 }
12369#line 12365 "ripper.c"
12370 break;
12371
12372 case 627: /* @43: %empty */
12373#line 4962 "ripper.y"
12374 {
12375 (yyval.num) = p->lex.state;
12376 SET_LEX_STATE(EXPR_BEG);
12377 }
12378#line 12374 "ripper.c"
12379 break;
12380
12381 case 628: /* @44: %empty */
12382#line 4966 "ripper.y"
12383 {
12384 (yyval.num) = p->lex.brace_nest;
12385 p->lex.brace_nest = 0;
12386 }
12387#line 12383 "ripper.c"
12388 break;
12389
12390 case 629: /* @45: %empty */
12391#line 4970 "ripper.y"
12392 {
12393 (yyval.num) = p->heredoc_indent;
12394 p->heredoc_indent = 0;
12395 }
12396#line 12392 "ripper.c"
12397 break;
12398
12399 case 630: /* string_content: tSTRING_DBEG $@41 @42 @43 @44 @45 compstmt "'}'" */
12400#line 4975 "ripper.y"
12401 {
12402 COND_POP();
12403 CMDARG_POP();
12404 p->lex.strterm = (yyvsp[-5].strterm);
12405 SET_LEX_STATE((yyvsp[-4].num));
12406 p->lex.brace_nest = (yyvsp[-3].num);
12407 p->heredoc_indent = (yyvsp[-2].num);
12408 p->heredoc_line_indent = -1;
12409#if 0
12410 if ((yyvsp[-1].val)) (yyvsp[-1].val)->flags &= ~NODE_FL_NEWLINE;
12411 (yyval.val) = new_evstr(p, (yyvsp[-1].val), &(yyloc));
12412#endif
12413 {VALUE v1,v2;v1=(yyvsp[-1].val);v2=dispatch1(string_embexpr,v1);(yyval.val)=v2;}
12414 }
12415#line 12411 "ripper.c"
12416 break;
12417
12418 case 631: /* string_dvar: "global variable" */
12419#line 4992 "ripper.y"
12420 {
12421#if 0
12422 (yyval.val) = NEW_GVAR((yyvsp[0].val), &(yyloc));
12423#endif
12424 {VALUE v1,v2;v1=(yyvsp[0].val);v2=dispatch1(var_ref,v1);(yyval.val)=v2;}
12425 }
12426#line 12422 "ripper.c"
12427 break;
12428
12429 case 632: /* string_dvar: "instance variable" */
12430#line 4999 "ripper.y"
12431 {
12432#if 0
12433 (yyval.val) = NEW_IVAR((yyvsp[0].val), &(yyloc));
12434#endif
12435 {VALUE v1,v2;v1=(yyvsp[0].val);v2=dispatch1(var_ref,v1);(yyval.val)=v2;}
12436 }
12437#line 12433 "ripper.c"
12438 break;
12439
12440 case 633: /* string_dvar: "class variable" */
12441#line 5006 "ripper.y"
12442 {
12443#if 0
12444 (yyval.val) = NEW_CVAR((yyvsp[0].val), &(yyloc));
12445#endif
12446 {VALUE v1,v2;v1=(yyvsp[0].val);v2=dispatch1(var_ref,v1);(yyval.val)=v2;}
12447 }
12448#line 12444 "ripper.c"
12449 break;
12450
12451 case 637: /* ssym: "symbol literal" sym */
12452#line 5020 "ripper.y"
12453 {
12454 SET_LEX_STATE(EXPR_END);
12455#if 0
12456 (yyval.val) = NEW_LIT(ID2SYM((yyvsp[0].val)), &(yyloc));
12457#endif
12458 {VALUE v1,v2,v3,v4;v1=(yyvsp[0].val);v2=dispatch1(symbol,v1);v3=v2;v4=dispatch1(symbol_literal,v3);(yyval.val)=v4;}
12459 }
12460#line 12456 "ripper.c"
12461 break;
12462
12463 case 642: /* dsym: "symbol literal" string_contents "terminator" */
12464#line 5036 "ripper.y"
12465 {
12466 SET_LEX_STATE(EXPR_END);
12467#if 0
12468 (yyval.val) = dsym_node(p, (yyvsp[-1].val), &(yyloc));
12469#endif
12470 {VALUE v1,v2;v1=(yyvsp[-1].val);v2=dispatch1(dyna_symbol,v1);(yyval.val)=v2;}
12471 }
12472#line 12468 "ripper.c"
12473 break;
12474
12475 case 644: /* numeric: tUMINUS_NUM simple_numeric */
12476#line 5047 "ripper.y"
12477 {
12478#if 0
12479 (yyval.val) = (yyvsp[0].val);
12480 RB_OBJ_WRITE(p->ast, &(yyval.val)->nd_lit, negate_lit(p, (yyval.val)->nd_lit));
12481#endif
12482 {VALUE v1,v2,v3;v1=ID2VAL(idUMinus);v2=(yyvsp[0].val);v3=dispatch2(unary,v1,v2);(yyval.val)=v3;}
12483 }
12484#line 12480 "ripper.c"
12485 break;
12486
12487 case 657: /* keyword_variable: "`nil'" */
12488#line 5074 "ripper.y"
12489 {(yyval.val) = KWD2EID(nil, (yyvsp[0].val));}
12490#line 12486 "ripper.c"
12491 break;
12492
12493 case 658: /* keyword_variable: "`self'" */
12494#line 5075 "ripper.y"
12495 {(yyval.val) = KWD2EID(self, (yyvsp[0].val));}
12496#line 12492 "ripper.c"
12497 break;
12498
12499 case 659: /* keyword_variable: "`true'" */
12500#line 5076 "ripper.y"
12501 {(yyval.val) = KWD2EID(true, (yyvsp[0].val));}
12502#line 12498 "ripper.c"
12503 break;
12504
12505 case 660: /* keyword_variable: "`false'" */
12506#line 5077 "ripper.y"
12507 {(yyval.val) = KWD2EID(false, (yyvsp[0].val));}
12508#line 12504 "ripper.c"
12509 break;
12510
12511 case 661: /* keyword_variable: "`__FILE__'" */
12512#line 5078 "ripper.y"
12513 {(yyval.val) = KWD2EID(_FILE__, (yyvsp[0].val));}
12514#line 12510 "ripper.c"
12515 break;
12516
12517 case 662: /* keyword_variable: "`__LINE__'" */
12518#line 5079 "ripper.y"
12519 {(yyval.val) = KWD2EID(_LINE__, (yyvsp[0].val));}
12520#line 12516 "ripper.c"
12521 break;
12522
12523 case 663: /* keyword_variable: "`__ENCODING__'" */
12524#line 5080 "ripper.y"
12525 {(yyval.val) = KWD2EID(_ENCODING__, (yyvsp[0].val));}
12526#line 12522 "ripper.c"
12527 break;
12528
12529 case 664: /* var_ref: user_variable */
12530#line 5084 "ripper.y"
12531 {
12532#if 0
12533 if (!((yyval.val) = gettable(p, (yyvsp[0].val), &(yyloc)))) (yyval.val) = NEW_BEGIN(0, &(yyloc));
12534#endif
12535 if (id_is_var(p, get_id((yyvsp[0].val)))) {
12536 (yyval.val) = dispatch1(var_ref, (yyvsp[0].val));
12537 }
12538 else {
12539 (yyval.val) = dispatch1(vcall, (yyvsp[0].val));
12540 }
12541
12542 }
12543#line 12539 "ripper.c"
12544 break;
12545
12546 case 665: /* var_ref: keyword_variable */
12547#line 5097 "ripper.y"
12548 {
12549#if 0
12550 if (!((yyval.val) = gettable(p, (yyvsp[0].val), &(yyloc)))) (yyval.val) = NEW_BEGIN(0, &(yyloc));
12551#endif
12552 {VALUE v1,v2;v1=(yyvsp[0].val);v2=dispatch1(var_ref,v1);(yyval.val)=v2;}
12553 }
12554#line 12550 "ripper.c"
12555 break;
12556
12557 case 666: /* var_lhs: user_variable */
12558#line 5106 "ripper.y"
12559 {
12560#if 0
12561 (yyval.val) = assignable(p, (yyvsp[0].val), 0, &(yyloc));
12562#endif
12563 (yyval.val)=assignable(p, var_field(p, (yyvsp[0].val)));
12564 }
12565#line 12561 "ripper.c"
12566 break;
12567
12568 case 667: /* var_lhs: keyword_variable */
12569#line 5113 "ripper.y"
12570 {
12571#if 0
12572 (yyval.val) = assignable(p, (yyvsp[0].val), 0, &(yyloc));
12573#endif
12574 (yyval.val)=assignable(p, var_field(p, (yyvsp[0].val)));
12575 }
12576#line 12572 "ripper.c"
12577 break;
12578
12579 case 670: /* $@46: %empty */
12580#line 5126 "ripper.y"
12581 {
12582 SET_LEX_STATE(EXPR_BEG);
12583 p->command_start = TRUE;
12584 }
12585#line 12581 "ripper.c"
12586 break;
12587
12588 case 671: /* superclass: '<' $@46 expr_value term */
12589#line 5131 "ripper.y"
12590 {
12591 (yyval.val) = (yyvsp[-1].val);
12592 }
12593#line 12589 "ripper.c"
12594 break;
12595
12596 case 672: /* superclass: %empty */
12597#line 5135 "ripper.y"
12598 {
12599#if 0
12600 (yyval.val) = 0;
12601#endif
12602 (yyval.val)=Qnil;
12603 }
12604#line 12600 "ripper.c"
12605 break;
12606
12607 case 674: /* f_opt_paren_args: none */
12608#line 5145 "ripper.y"
12609 {
12610 p->ctxt.in_argdef = 0;
12611 (yyval.val) = new_args_tail(p, Qnone, Qnone, Qnone, &(yylsp[-1]));
12612 (yyval.val) = new_args(p, Qnone, Qnone, Qnone, Qnone, (yyval.val), &(yylsp[-1]));
12613 }
12614#line 12610 "ripper.c"
12615 break;
12616
12617 case 675: /* f_paren_args: '(' f_args rparen */
12618#line 5153 "ripper.y"
12619 {
12620#if 0
12621 (yyval.val) = (yyvsp[-1].val);
12622#endif
12623 {VALUE v1,v2;v1=(yyvsp[-1].val);v2=dispatch1(paren,v1);(yyval.val)=v2;}
12624 SET_LEX_STATE(EXPR_BEG);
12625 p->command_start = TRUE;
12626 p->ctxt.in_argdef = 0;
12627 }
12628#line 12624 "ripper.c"
12629 break;
12630
12631 case 677: /* @47: %empty */
12632#line 5165 "ripper.y"
12633 {
12634 (yyval.ctxt) = p->ctxt;
12635 p->ctxt.in_kwarg = 1;
12636 p->ctxt.in_argdef = 1;
12637 SET_LEX_STATE(p->lex.state|EXPR_LABEL); /* force for args */
12638 }
12639#line 12635 "ripper.c"
12640 break;
12641
12642 case 678: /* f_arglist: @47 f_args term */
12643#line 5172 "ripper.y"
12644 {
12645 p->ctxt.in_kwarg = (yyvsp[-2].ctxt).in_kwarg;
12646 p->ctxt.in_argdef = 0;
12647 (yyval.val) = (yyvsp[-1].val);
12648 SET_LEX_STATE(EXPR_BEG);
12649 p->command_start = TRUE;
12650 }
12651#line 12647 "ripper.c"
12652 break;
12653
12654 case 679: /* args_tail: f_kwarg ',' f_kwrest opt_f_block_arg */
12655#line 5182 "ripper.y"
12656 {
12657 (yyval.val) = new_args_tail(p, (yyvsp[-3].val), (yyvsp[-1].val), (yyvsp[0].val), &(yylsp[-1]));
12658 }
12659#line 12655 "ripper.c"
12660 break;
12661
12662 case 680: /* args_tail: f_kwarg opt_f_block_arg */
12663#line 5186 "ripper.y"
12664 {
12665 (yyval.val) = new_args_tail(p, (yyvsp[-1].val), Qnone, (yyvsp[0].val), &(yylsp[-1]));
12666 }
12667#line 12663 "ripper.c"
12668 break;
12669
12670 case 681: /* args_tail: f_any_kwrest opt_f_block_arg */
12671#line 5190 "ripper.y"
12672 {
12673 (yyval.val) = new_args_tail(p, Qnone, (yyvsp[-1].val), (yyvsp[0].val), &(yylsp[-1]));
12674 }
12675#line 12671 "ripper.c"
12676 break;
12677
12678 case 682: /* args_tail: f_block_arg */
12679#line 5194 "ripper.y"
12680 {
12681 (yyval.val) = new_args_tail(p, Qnone, Qnone, (yyvsp[0].val), &(yylsp[0]));
12682 }
12683#line 12679 "ripper.c"
12684 break;
12685
12686 case 683: /* args_tail: args_forward */
12687#line 5198 "ripper.y"
12688 {
12689 add_forwarding_args(p);
12690 (yyval.val) = new_args_tail(p, Qnone, (yyvsp[0].val), ID2VAL(idFWD_BLOCK), &(yylsp[0]));
12691 }
12692#line 12688 "ripper.c"
12693 break;
12694
12695 case 684: /* opt_args_tail: ',' args_tail */
12696#line 5205 "ripper.y"
12697 {
12698 (yyval.val) = (yyvsp[0].val);
12699 }
12700#line 12696 "ripper.c"
12701 break;
12702
12703 case 685: /* opt_args_tail: %empty */
12704#line 5209 "ripper.y"
12705 {
12706 (yyval.val) = new_args_tail(p, Qnone, Qnone, Qnone, &(yylsp[0]));
12707 }
12708#line 12704 "ripper.c"
12709 break;
12710
12711 case 686: /* f_args: f_arg ',' f_optarg ',' f_rest_arg opt_args_tail */
12712#line 5215 "ripper.y"
12713 {
12714 (yyval.val) = new_args(p, (yyvsp[-5].val), (yyvsp[-3].val), (yyvsp[-1].val), Qnone, (yyvsp[0].val), &(yyloc));
12715 }
12716#line 12712 "ripper.c"
12717 break;
12718
12719 case 687: /* f_args: f_arg ',' f_optarg ',' f_rest_arg ',' f_arg opt_args_tail */
12720#line 5219 "ripper.y"
12721 {
12722 (yyval.val) = new_args(p, (yyvsp[-7].val), (yyvsp[-5].val), (yyvsp[-3].val), (yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
12723 }
12724#line 12720 "ripper.c"
12725 break;
12726
12727 case 688: /* f_args: f_arg ',' f_optarg opt_args_tail */
12728#line 5223 "ripper.y"
12729 {
12730 (yyval.val) = new_args(p, (yyvsp[-3].val), (yyvsp[-1].val), Qnone, Qnone, (yyvsp[0].val), &(yyloc));
12731 }
12732#line 12728 "ripper.c"
12733 break;
12734
12735 case 689: /* f_args: f_arg ',' f_optarg ',' f_arg opt_args_tail */
12736#line 5227 "ripper.y"
12737 {
12738 (yyval.val) = new_args(p, (yyvsp[-5].val), (yyvsp[-3].val), Qnone, (yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
12739 }
12740#line 12736 "ripper.c"
12741 break;
12742
12743 case 690: /* f_args: f_arg ',' f_rest_arg opt_args_tail */
12744#line 5231 "ripper.y"
12745 {
12746 (yyval.val) = new_args(p, (yyvsp[-3].val), Qnone, (yyvsp[-1].val), Qnone, (yyvsp[0].val), &(yyloc));
12747 }
12748#line 12744 "ripper.c"
12749 break;
12750
12751 case 691: /* f_args: f_arg ',' f_rest_arg ',' f_arg opt_args_tail */
12752#line 5235 "ripper.y"
12753 {
12754 (yyval.val) = new_args(p, (yyvsp[-5].val), Qnone, (yyvsp[-3].val), (yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
12755 }
12756#line 12752 "ripper.c"
12757 break;
12758
12759 case 692: /* f_args: f_arg opt_args_tail */
12760#line 5239 "ripper.y"
12761 {
12762 (yyval.val) = new_args(p, (yyvsp[-1].val), Qnone, Qnone, Qnone, (yyvsp[0].val), &(yyloc));
12763 }
12764#line 12760 "ripper.c"
12765 break;
12766
12767 case 693: /* f_args: f_optarg ',' f_rest_arg opt_args_tail */
12768#line 5243 "ripper.y"
12769 {
12770 (yyval.val) = new_args(p, Qnone, (yyvsp[-3].val), (yyvsp[-1].val), Qnone, (yyvsp[0].val), &(yyloc));
12771 }
12772#line 12768 "ripper.c"
12773 break;
12774
12775 case 694: /* f_args: f_optarg ',' f_rest_arg ',' f_arg opt_args_tail */
12776#line 5247 "ripper.y"
12777 {
12778 (yyval.val) = new_args(p, Qnone, (yyvsp[-5].val), (yyvsp[-3].val), (yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
12779 }
12780#line 12776 "ripper.c"
12781 break;
12782
12783 case 695: /* f_args: f_optarg opt_args_tail */
12784#line 5251 "ripper.y"
12785 {
12786 (yyval.val) = new_args(p, Qnone, (yyvsp[-1].val), Qnone, Qnone, (yyvsp[0].val), &(yyloc));
12787 }
12788#line 12784 "ripper.c"
12789 break;
12790
12791 case 696: /* f_args: f_optarg ',' f_arg opt_args_tail */
12792#line 5255 "ripper.y"
12793 {
12794 (yyval.val) = new_args(p, Qnone, (yyvsp[-3].val), Qnone, (yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
12795 }
12796#line 12792 "ripper.c"
12797 break;
12798
12799 case 697: /* f_args: f_rest_arg opt_args_tail */
12800#line 5259 "ripper.y"
12801 {
12802 (yyval.val) = new_args(p, Qnone, Qnone, (yyvsp[-1].val), Qnone, (yyvsp[0].val), &(yyloc));
12803 }
12804#line 12800 "ripper.c"
12805 break;
12806
12807 case 698: /* f_args: f_rest_arg ',' f_arg opt_args_tail */
12808#line 5263 "ripper.y"
12809 {
12810 (yyval.val) = new_args(p, Qnone, Qnone, (yyvsp[-3].val), (yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
12811 }
12812#line 12808 "ripper.c"
12813 break;
12814
12815 case 699: /* f_args: args_tail */
12816#line 5267 "ripper.y"
12817 {
12818 (yyval.val) = new_args(p, Qnone, Qnone, Qnone, Qnone, (yyvsp[0].val), &(yyloc));
12819 }
12820#line 12816 "ripper.c"
12821 break;
12822
12823 case 700: /* f_args: %empty */
12824#line 5271 "ripper.y"
12825 {
12826 (yyval.val) = new_args_tail(p, Qnone, Qnone, Qnone, &(yylsp[0]));
12827 (yyval.val) = new_args(p, Qnone, Qnone, Qnone, Qnone, (yyval.val), &(yylsp[0]));
12828 }
12829#line 12825 "ripper.c"
12830 break;
12831
12832 case 701: /* args_forward: "(..." */
12833#line 5278 "ripper.y"
12834 {
12835#if 0
12836 (yyval.val) = idFWD_KWREST;
12837#endif
12838 {VALUE v1;v1=dispatch0(args_forward);(yyval.val)=v1;}
12839 }
12840#line 12836 "ripper.c"
12841 break;
12842
12843 case 702: /* f_bad_arg: "constant" */
12844#line 5287 "ripper.y"
12845 {
12846 static const char mesg[] = "formal argument cannot be a constant";
12847#if 0
12848 yyerror1(&(yylsp[0]), mesg);
12849 (yyval.val) = 0;
12850#endif
12851 {VALUE v1,v2,v3;v1=ERR_MESG();v2=(yyvsp[0].val);v3=dispatch2(param_error,v1,v2);(yyval.val)=v3;}ripper_error(p);
12852 }
12853#line 12849 "ripper.c"
12854 break;
12855
12856 case 703: /* f_bad_arg: "instance variable" */
12857#line 5296 "ripper.y"
12858 {
12859 static const char mesg[] = "formal argument cannot be an instance variable";
12860#if 0
12861 yyerror1(&(yylsp[0]), mesg);
12862 (yyval.val) = 0;
12863#endif
12864 {VALUE v1,v2,v3;v1=ERR_MESG();v2=(yyvsp[0].val);v3=dispatch2(param_error,v1,v2);(yyval.val)=v3;}ripper_error(p);
12865 }
12866#line 12862 "ripper.c"
12867 break;
12868
12869 case 704: /* f_bad_arg: "global variable" */
12870#line 5305 "ripper.y"
12871 {
12872 static const char mesg[] = "formal argument cannot be a global variable";
12873#if 0
12874 yyerror1(&(yylsp[0]), mesg);
12875 (yyval.val) = 0;
12876#endif
12877 {VALUE v1,v2,v3;v1=ERR_MESG();v2=(yyvsp[0].val);v3=dispatch2(param_error,v1,v2);(yyval.val)=v3;}ripper_error(p);
12878 }
12879#line 12875 "ripper.c"
12880 break;
12881
12882 case 705: /* f_bad_arg: "class variable" */
12883#line 5314 "ripper.y"
12884 {
12885 static const char mesg[] = "formal argument cannot be a class variable";
12886#if 0
12887 yyerror1(&(yylsp[0]), mesg);
12888 (yyval.val) = 0;
12889#endif
12890 {VALUE v1,v2,v3;v1=ERR_MESG();v2=(yyvsp[0].val);v3=dispatch2(param_error,v1,v2);(yyval.val)=v3;}ripper_error(p);
12891 }
12892#line 12888 "ripper.c"
12893 break;
12894
12895 case 707: /* f_norm_arg: "local variable or method" */
12896#line 5326 "ripper.y"
12897 {
12898 formal_argument(p, (yyvsp[0].val));
12899 p->max_numparam = ORDINAL_PARAM;
12900 (yyval.val) = (yyvsp[0].val);
12901 }
12902#line 12898 "ripper.c"
12903 break;
12904
12905 case 708: /* f_arg_asgn: f_norm_arg */
12906#line 5334 "ripper.y"
12907 {
12908 ID id = get_id((yyvsp[0].val));
12909 arg_var(p, id);
12910 p->cur_arg = id;
12911 (yyval.val) = (yyvsp[0].val);
12912 }
12913#line 12909 "ripper.c"
12914 break;
12915
12916 case 709: /* f_arg_item: f_arg_asgn */
12917#line 5343 "ripper.y"
12918 {
12919 p->cur_arg = 0;
12920#if 0
12921 (yyval.val) = NEW_ARGS_AUX((yyvsp[0].val), 1, &NULL_LOC);
12922#endif
12923 (yyval.val)=get_value((yyvsp[0].val));
12924 }
12925#line 12921 "ripper.c"
12926 break;
12927
12928 case 710: /* f_arg_item: "(" f_margs rparen */
12929#line 5351 "ripper.y"
12930 {
12931#if 0
12932 ID tid = internal_id(p);
12933 YYLTYPE loc;
12934 loc.beg_pos = (yylsp[-1]).beg_pos;
12935 loc.end_pos = (yylsp[-1]).beg_pos;
12936 arg_var(p, tid);
12937 if (dyna_in_block(p)) {
12938 (yyvsp[-1].val)->nd_value = NEW_DVAR(tid, &loc);
12939 }
12940 else {
12941 (yyvsp[-1].val)->nd_value = NEW_LVAR(tid, &loc);
12942 }
12943 (yyval.val) = NEW_ARGS_AUX(tid, 1, &NULL_LOC);
12944 (yyval.val)->nd_next = (yyvsp[-1].val);
12945#endif
12946 {VALUE v1,v2;v1=(yyvsp[-1].val);v2=dispatch1(mlhs_paren,v1);(yyval.val)=v2;}
12947 }
12948#line 12944 "ripper.c"
12949 break;
12950
12951 case 711: /* f_arg: f_arg_item */
12952#line 5372 "ripper.y"
12953 {(yyval.val)=rb_ary_new3(1, get_value((yyvsp[0].val)));}
12954#line 12950 "ripper.c"
12955 break;
12956
12957 case 712: /* f_arg: f_arg ',' f_arg_item */
12958#line 5374 "ripper.y"
12959 {
12960#if 0
12961 (yyval.val) = (yyvsp[-2].val);
12962 (yyval.val)->nd_plen++;
12963 (yyval.val)->nd_next = block_append(p, (yyval.val)->nd_next, (yyvsp[0].val)->nd_next);
12964 rb_discard_node(p, (yyvsp[0].val));
12965#endif
12966 (yyval.val)=rb_ary_push((yyvsp[-2].val), get_value((yyvsp[0].val)));
12967 }
12968#line 12964 "ripper.c"
12969 break;
12970
12971 case 713: /* f_label: "label" */
12972#line 5387 "ripper.y"
12973 {
12974 arg_var(p, formal_argument(p, (yyvsp[0].val)));
12975 p->cur_arg = get_id((yyvsp[0].val));
12976 p->max_numparam = ORDINAL_PARAM;
12977 p->ctxt.in_argdef = 0;
12978 (yyval.val) = (yyvsp[0].val);
12979 }
12980#line 12976 "ripper.c"
12981 break;
12982
12983 case 714: /* f_kw: f_label arg_value */
12984#line 5397 "ripper.y"
12985 {
12986 p->cur_arg = 0;
12987 p->ctxt.in_argdef = 1;
12988#if 0
12989 (yyval.val) = new_kw_arg(p, assignable(p, (yyvsp[-1].val), (yyvsp[0].val), &(yyloc)), &(yyloc));
12990#endif
12991 (yyval.val)=rb_assoc_new(get_value(assignable(p, (yyvsp[-1].val))), get_value((yyvsp[0].val)));
12992 }
12993#line 12989 "ripper.c"
12994 break;
12995
12996 case 715: /* f_kw: f_label */
12997#line 5406 "ripper.y"
12998 {
12999 p->cur_arg = 0;
13000 p->ctxt.in_argdef = 1;
13001#if 0
13002 (yyval.val) = new_kw_arg(p, assignable(p, (yyvsp[0].val), NODE_SPECIAL_REQUIRED_KEYWORD, &(yyloc)), &(yyloc));
13003#endif
13004 (yyval.val)=rb_assoc_new(get_value(assignable(p, (yyvsp[0].val))), 0);
13005 }
13006#line 13002 "ripper.c"
13007 break;
13008
13009 case 716: /* f_block_kw: f_label primary_value */
13010#line 5417 "ripper.y"
13011 {
13012 p->ctxt.in_argdef = 1;
13013#if 0
13014 (yyval.val) = new_kw_arg(p, assignable(p, (yyvsp[-1].val), (yyvsp[0].val), &(yyloc)), &(yyloc));
13015#endif
13016 (yyval.val)=rb_assoc_new(get_value(assignable(p, (yyvsp[-1].val))), get_value((yyvsp[0].val)));
13017 }
13018#line 13014 "ripper.c"
13019 break;
13020
13021 case 717: /* f_block_kw: f_label */
13022#line 5425 "ripper.y"
13023 {
13024 p->ctxt.in_argdef = 1;
13025#if 0
13026 (yyval.val) = new_kw_arg(p, assignable(p, (yyvsp[0].val), NODE_SPECIAL_REQUIRED_KEYWORD, &(yyloc)), &(yyloc));
13027#endif
13028 (yyval.val)=rb_assoc_new(get_value(assignable(p, (yyvsp[0].val))), 0);
13029 }
13030#line 13026 "ripper.c"
13031 break;
13032
13033 case 718: /* f_block_kwarg: f_block_kw */
13034#line 5435 "ripper.y"
13035 {
13036#if 0
13037 (yyval.val) = (yyvsp[0].val);
13038#endif
13039 (yyval.val)=rb_ary_new3(1, get_value((yyvsp[0].val)));
13040 }
13041#line 13037 "ripper.c"
13042 break;
13043
13044 case 719: /* f_block_kwarg: f_block_kwarg ',' f_block_kw */
13045#line 5442 "ripper.y"
13046 {
13047#if 0
13048 (yyval.val) = kwd_append((yyvsp[-2].val), (yyvsp[0].val));
13049#endif
13050 (yyval.val)=rb_ary_push((yyvsp[-2].val), get_value((yyvsp[0].val)));
13051 }
13052#line 13048 "ripper.c"
13053 break;
13054
13055 case 720: /* f_kwarg: f_kw */
13056#line 5452 "ripper.y"
13057 {
13058#if 0
13059 (yyval.val) = (yyvsp[0].val);
13060#endif
13061 (yyval.val)=rb_ary_new3(1, get_value((yyvsp[0].val)));
13062 }
13063#line 13059 "ripper.c"
13064 break;
13065
13066 case 721: /* f_kwarg: f_kwarg ',' f_kw */
13067#line 5459 "ripper.y"
13068 {
13069#if 0
13070 (yyval.val) = kwd_append((yyvsp[-2].val), (yyvsp[0].val));
13071#endif
13072 (yyval.val)=rb_ary_push((yyvsp[-2].val), get_value((yyvsp[0].val)));
13073 }
13074#line 13070 "ripper.c"
13075 break;
13076
13077 case 724: /* f_no_kwarg: kwrest_mark "`nil'" */
13078#line 5472 "ripper.y"
13079 {
13080#if 0
13081#endif
13082 {VALUE v1,v2;v1=Qnil;v2=dispatch1(nokw_param,v1);(yyval.val)=v2;}
13083 }
13084#line 13080 "ripper.c"
13085 break;
13086
13087 case 725: /* f_kwrest: kwrest_mark "local variable or method" */
13088#line 5480 "ripper.y"
13089 {
13090 arg_var(p, shadowing_lvar(p, get_id((yyvsp[0].val))));
13091#if 0
13092 (yyval.val) = (yyvsp[0].val);
13093#endif
13094 {VALUE v1,v2;v1=(yyvsp[0].val);v2=dispatch1(kwrest_param,v1);(yyval.val)=v2;}
13095 }
13096#line 13092 "ripper.c"
13097 break;
13098
13099 case 726: /* f_kwrest: kwrest_mark */
13100#line 5488 "ripper.y"
13101 {
13102#if 0
13103 (yyval.val) = internal_id(p);
13104 arg_var(p, (yyval.val));
13105#endif
13106 {VALUE v1,v2;v1=Qnil;v2=dispatch1(kwrest_param,v1);(yyval.val)=v2;}
13107 }
13108#line 13104 "ripper.c"
13109 break;
13110
13111 case 727: /* f_opt: f_arg_asgn f_eq arg_value */
13112#line 5498 "ripper.y"
13113 {
13114 p->cur_arg = 0;
13115 p->ctxt.in_argdef = 1;
13116#if 0
13117 (yyval.val) = NEW_OPT_ARG(0, assignable(p, (yyvsp[-2].val), (yyvsp[0].val), &(yyloc)), &(yyloc));
13118#endif
13119 (yyval.val)=rb_assoc_new(get_value(assignable(p, (yyvsp[-2].val))), get_value((yyvsp[0].val)));
13120 }
13121#line 13117 "ripper.c"
13122 break;
13123
13124 case 728: /* f_block_opt: f_arg_asgn f_eq primary_value */
13125#line 5509 "ripper.y"
13126 {
13127 p->cur_arg = 0;
13128 p->ctxt.in_argdef = 1;
13129#if 0
13130 (yyval.val) = NEW_OPT_ARG(0, assignable(p, (yyvsp[-2].val), (yyvsp[0].val), &(yyloc)), &(yyloc));
13131#endif
13132 (yyval.val)=rb_assoc_new(get_value(assignable(p, (yyvsp[-2].val))), get_value((yyvsp[0].val)));
13133 }
13134#line 13130 "ripper.c"
13135 break;
13136
13137 case 729: /* f_block_optarg: f_block_opt */
13138#line 5520 "ripper.y"
13139 {
13140#if 0
13141 (yyval.val) = (yyvsp[0].val);
13142#endif
13143 (yyval.val)=rb_ary_new3(1, get_value((yyvsp[0].val)));
13144 }
13145#line 13141 "ripper.c"
13146 break;
13147
13148 case 730: /* f_block_optarg: f_block_optarg ',' f_block_opt */
13149#line 5527 "ripper.y"
13150 {
13151#if 0
13152 (yyval.val) = opt_arg_append((yyvsp[-2].val), (yyvsp[0].val));
13153#endif
13154 (yyval.val)=rb_ary_push((yyvsp[-2].val), get_value((yyvsp[0].val)));
13155 }
13156#line 13152 "ripper.c"
13157 break;
13158
13159 case 731: /* f_optarg: f_opt */
13160#line 5536 "ripper.y"
13161 {
13162#if 0
13163 (yyval.val) = (yyvsp[0].val);
13164#endif
13165 (yyval.val)=rb_ary_new3(1, get_value((yyvsp[0].val)));
13166 }
13167#line 13163 "ripper.c"
13168 break;
13169
13170 case 732: /* f_optarg: f_optarg ',' f_opt */
13171#line 5543 "ripper.y"
13172 {
13173#if 0
13174 (yyval.val) = opt_arg_append((yyvsp[-2].val), (yyvsp[0].val));
13175#endif
13176 (yyval.val)=rb_ary_push((yyvsp[-2].val), get_value((yyvsp[0].val)));
13177 }
13178#line 13174 "ripper.c"
13179 break;
13180
13181 case 735: /* f_rest_arg: restarg_mark "local variable or method" */
13182#line 5556 "ripper.y"
13183 {
13184 arg_var(p, shadowing_lvar(p, get_id((yyvsp[0].val))));
13185#if 0
13186 (yyval.val) = (yyvsp[0].val);
13187#endif
13188 {VALUE v1,v2;v1=(yyvsp[0].val);v2=dispatch1(rest_param,v1);(yyval.val)=v2;}
13189 }
13190#line 13186 "ripper.c"
13191 break;
13192
13193 case 736: /* f_rest_arg: restarg_mark */
13194#line 5564 "ripper.y"
13195 {
13196#if 0
13197 (yyval.val) = internal_id(p);
13198 arg_var(p, (yyval.val));
13199#endif
13200 {VALUE v1,v2;v1=Qnil;v2=dispatch1(rest_param,v1);(yyval.val)=v2;}
13201 }
13202#line 13198 "ripper.c"
13203 break;
13204
13205 case 739: /* f_block_arg: blkarg_mark "local variable or method" */
13206#line 5578 "ripper.y"
13207 {
13208 arg_var(p, shadowing_lvar(p, get_id((yyvsp[0].val))));
13209#if 0
13210 (yyval.val) = (yyvsp[0].val);
13211#endif
13212 {VALUE v1,v2;v1=(yyvsp[0].val);v2=dispatch1(blockarg,v1);(yyval.val)=v2;}
13213 }
13214#line 13210 "ripper.c"
13215 break;
13216
13217 case 740: /* f_block_arg: blkarg_mark */
13218#line 5586 "ripper.y"
13219 {
13220#if 0
13221 arg_var(p, shadowing_lvar(p, get_id(ANON_BLOCK_ID)));
13222#endif
13223 (yyval.val) = dispatch1(blockarg, Qnil);
13224
13225 }
13226#line 13222 "ripper.c"
13227 break;
13228
13229 case 741: /* opt_f_block_arg: ',' f_block_arg */
13230#line 5596 "ripper.y"
13231 {
13232 (yyval.val) = (yyvsp[0].val);
13233 }
13234#line 13230 "ripper.c"
13235 break;
13236
13237 case 742: /* opt_f_block_arg: none */
13238#line 5600 "ripper.y"
13239 {
13240 (yyval.val) = Qnull;
13241 }
13242#line 13238 "ripper.c"
13243 break;
13244
13245 case 743: /* singleton: var_ref */
13246#line 5606 "ripper.y"
13247 {
13248 value_expr((yyvsp[0].val));
13249 (yyval.val) = (yyvsp[0].val);
13250 }
13251#line 13247 "ripper.c"
13252 break;
13253
13254 case 744: /* $@48: %empty */
13255#line 5610 "ripper.y"
13256 {SET_LEX_STATE(EXPR_BEG);}
13257#line 13253 "ripper.c"
13258 break;
13259
13260 case 745: /* singleton: '(' $@48 expr rparen */
13261#line 5611 "ripper.y"
13262 {
13263#if 0
13264 switch (nd_type((yyvsp[-1].val))) {
13265 case NODE_STR:
13266 case NODE_DSTR:
13267 case NODE_XSTR:
13268 case NODE_DXSTR:
13269 case NODE_DREGX:
13270 case NODE_LIT:
13271 case NODE_LIST:
13272 case NODE_ZLIST:
13273 yyerror1(&(yylsp[-1]), "can't define singleton method for literals");
13274 break;
13275 default:
13276 value_expr((yyvsp[-1].val));
13277 break;
13278 }
13279 (yyval.val) = (yyvsp[-1].val);
13280#endif
13281 {VALUE v1,v2;v1=(yyvsp[-1].val);v2=dispatch1(paren,v1);(yyval.val)=v2;}
13282 }
13283#line 13279 "ripper.c"
13284 break;
13285
13286 case 747: /* assoc_list: assocs trailer */
13287#line 5636 "ripper.y"
13288 {
13289#if 0
13290 (yyval.val) = (yyvsp[-1].val);
13291#endif
13292 {VALUE v1,v2;v1=(yyvsp[-1].val);v2=dispatch1(assoclist_from_args,v1);(yyval.val)=v2;}
13293 }
13294#line 13290 "ripper.c"
13295 break;
13296
13297 case 748: /* assocs: assoc */
13298#line 5645 "ripper.y"
13299 {(yyval.val)=rb_ary_new3(1, get_value((yyvsp[0].val)));}
13300#line 13296 "ripper.c"
13301 break;
13302
13303 case 749: /* assocs: assocs ',' assoc */
13304#line 5647 "ripper.y"
13305 {
13306#if 0
13307 NODE *assocs = (yyvsp[-2].val);
13308 NODE *tail = (yyvsp[0].val);
13309 if (!assocs) {
13310 assocs = tail;
13311 }
13312 else if (tail) {
13313 if (assocs->nd_head &&
13314 !tail->nd_head && nd_type_p(tail->nd_next, NODE_LIST) &&
13315 nd_type_p(tail->nd_next->nd_head, NODE_HASH)) {
13316 /* DSTAR */
13317 tail = tail->nd_next->nd_head->nd_head;
13318 }
13319 assocs = list_concat(assocs, tail);
13320 }
13321 (yyval.val) = assocs;
13322#endif
13323 (yyval.val)=rb_ary_push((yyvsp[-2].val), get_value((yyvsp[0].val)));
13324 }
13325#line 13321 "ripper.c"
13326 break;
13327
13328 case 750: /* assoc: arg_value "=>" arg_value */
13329#line 5670 "ripper.y"
13330 {
13331#if 0
13332 if (nd_type_p((yyvsp[-2].val), NODE_STR)) {
13333 nd_set_type((yyvsp[-2].val), NODE_LIT);
13334 RB_OBJ_WRITE(p->ast, &(yyvsp[-2].val)->nd_lit, rb_fstring((yyvsp[-2].val)->nd_lit));
13335 }
13336 (yyval.val) = list_append(p, NEW_LIST((yyvsp[-2].val), &(yyloc)), (yyvsp[0].val));
13337#endif
13338 {VALUE v1,v2,v3;v1=(yyvsp[-2].val);v2=(yyvsp[0].val);v3=dispatch2(assoc_new,v1,v2);(yyval.val)=v3;}
13339 }
13340#line 13336 "ripper.c"
13341 break;
13342
13343 case 751: /* assoc: "label" arg_value */
13344#line 5681 "ripper.y"
13345 {
13346#if 0
13347 (yyval.val) = list_append(p, NEW_LIST(NEW_LIT(ID2SYM((yyvsp[-1].val)), &(yylsp[-1])), &(yyloc)), (yyvsp[0].val));
13348#endif
13349 {VALUE v1,v2,v3;v1=(yyvsp[-1].val);v2=(yyvsp[0].val);v3=dispatch2(assoc_new,v1,v2);(yyval.val)=v3;}
13350 }
13351#line 13347 "ripper.c"
13352 break;
13353
13354 case 752: /* assoc: "label" */
13355#line 5688 "ripper.y"
13356 {
13357#if 0
13358 NODE *val = gettable(p, (yyvsp[0].val), &(yyloc));
13359 if (!val) val = NEW_BEGIN(0, &(yyloc));
13360 (yyval.val) = list_append(p, NEW_LIST(NEW_LIT(ID2SYM((yyvsp[0].val)), &(yylsp[0])), &(yyloc)), val);
13361#endif
13362 {VALUE v1,v2,v3;v1=(yyvsp[0].val);v2=Qnil;v3=dispatch2(assoc_new,v1,v2);(yyval.val)=v3;}
13363 }
13364#line 13360 "ripper.c"
13365 break;
13366
13367 case 753: /* assoc: "string literal" string_contents tLABEL_END arg_value */
13368#line 5697 "ripper.y"
13369 {
13370#if 0
13371 YYLTYPE loc = code_loc_gen(&(yylsp[-3]), &(yylsp[-1]));
13372 (yyval.val) = list_append(p, NEW_LIST(dsym_node(p, (yyvsp[-2].val), &loc), &loc), (yyvsp[0].val));
13373#endif
13374 {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;}
13375 }
13376#line 13372 "ripper.c"
13377 break;
13378
13379 case 754: /* assoc: "**arg" arg_value */
13380#line 5705 "ripper.y"
13381 {
13382#if 0
13383 if (nd_type_p((yyvsp[0].val), NODE_HASH) &&
13384 !((yyvsp[0].val)->nd_head && (yyvsp[0].val)->nd_head->nd_alen)) {
13385 static VALUE empty_hash;
13386 if (!empty_hash) {
13387 empty_hash = rb_obj_freeze(rb_hash_new());
13388 rb_gc_register_mark_object(empty_hash);
13389 }
13390 (yyval.val) = list_append(p, NEW_LIST(0, &(yyloc)), NEW_LIT(empty_hash, &(yyloc)));
13391 }
13392 else
13393 (yyval.val) = list_append(p, NEW_LIST(0, &(yyloc)), (yyvsp[0].val));
13394#endif
13395 {VALUE v1,v2;v1=(yyvsp[0].val);v2=dispatch1(assoc_splat,v1);(yyval.val)=v2;}
13396 }
13397#line 13393 "ripper.c"
13398 break;
13399
13400 case 781: /* term: ';' */
13401#line 5773 "ripper.y"
13402 {yyerrok;token_flush(p);}
13403#line 13399 "ripper.c"
13404 break;
13405
13406 case 782: /* term: '\n' */
13407#line 5774 "ripper.y"
13408 {token_flush(p);}
13409#line 13405 "ripper.c"
13410 break;
13411
13412 case 784: /* terms: terms ';' */
13413#line 5778 "ripper.y"
13414 {yyerrok;}
13415#line 13411 "ripper.c"
13416 break;
13417
13418 case 785: /* none: %empty */
13419#line 5782 "ripper.y"
13420 {
13421 (yyval.val) = Qnull;
13422 }
13423#line 13419 "ripper.c"
13424 break;
13425
13426
13427#line 13423 "ripper.c"
13428
13429 default: break;
13430 }
13431 /* User semantic actions sometimes alter yychar, and that requires
13432 that yytoken be updated with the new translation. We take the
13433 approach of translating immediately before every use of yytoken.
13434 One alternative is translating here after every semantic action,
13435 but that translation would be missed if the semantic action invokes
13436 YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
13437 if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
13438 incorrect destructor might then be invoked immediately. In the
13439 case of YYERROR or YYBACKUP, subsequent parser actions might lead
13440 to an incorrect destructor call or verbose syntax error message
13441 before the lookahead is translated. */
13442 YY_SYMBOL_PRINT ("-> $$ =", YY_CAST (yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc);
13443
13444 YYPOPSTACK (yylen);
13445 yylen = 0;
13446
13447 *++yyvsp = yyval;
13448 *++yylsp = yyloc;
13449
13450 /* Now 'shift' the result of the reduction. Determine what state
13451 that goes to, based on the state we popped back to and the rule
13452 number reduced by. */
13453 {
13454 const int yylhs = yyr1[yyn] - YYNTOKENS;
13455 const int yyi = yypgoto[yylhs] + *yyssp;
13456 yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp
13457 ? yytable[yyi]
13458 : yydefgoto[yylhs]);
13459 }
13460
13461 goto yynewstate;
13462
13463
13464/*--------------------------------------.
13465| yyerrlab -- here on detecting error. |
13466`--------------------------------------*/
13467yyerrlab:
13468 /* Make sure we have latest lookahead translation. See comments at
13469 user semantic actions for why this is necessary. */
13470 yytoken = yychar == YYEMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE (yychar);
13471 /* If not already recovering from an error, report this error. */
13472 if (!yyerrstatus)
13473 {
13474 ++yynerrs;
13475 {
13476 yypcontext_t yyctx
13477 = {yyssp, yytoken, &yylloc};
13478 char const *yymsgp = YY_("syntax error");
13479 int yysyntax_error_status;
13480 yysyntax_error_status = yysyntax_error (p, &yymsg_alloc, &yymsg, &yyctx);
13481 if (yysyntax_error_status == 0)
13482 yymsgp = yymsg;
13483 else if (yysyntax_error_status == -1)
13484 {
13485 if (yymsg != yymsgbuf)
13486 YYSTACK_FREE (yymsg);
13487 yymsg = YY_CAST (char *,
13488 YYSTACK_ALLOC (YY_CAST (YYSIZE_T, yymsg_alloc)));
13489 if (yymsg)
13490 {
13491 yysyntax_error_status
13492 = yysyntax_error (p, &yymsg_alloc, &yymsg, &yyctx);
13493 yymsgp = yymsg;
13494 }
13495 else
13496 {
13497 yymsg = yymsgbuf;
13498 yymsg_alloc = sizeof yymsgbuf;
13499 yysyntax_error_status = YYENOMEM;
13500 }
13501 }
13502 yyerror (&yylloc, p, yymsgp);
13503 if (yysyntax_error_status == YYENOMEM)
13504 YYNOMEM;
13505 }
13506 }
13507
13508 yyerror_range[1] = yylloc;
13509 if (yyerrstatus == 3)
13510 {
13511 /* If just tried and failed to reuse lookahead token after an
13512 error, discard it. */
13513
13514 if (yychar <= END_OF_INPUT)
13515 {
13516 /* Return failure if at end of input. */
13517 if (yychar == END_OF_INPUT)
13518 YYABORT;
13519 }
13520 else
13521 {
13522 yydestruct ("Error: discarding",
13523 yytoken, &yylval, &yylloc, p);
13524 yychar = YYEMPTY;
13525 }
13526 }
13527
13528 /* Else will try to reuse lookahead token after shifting the error
13529 token. */
13530 goto yyerrlab1;
13531
13532
13533/*---------------------------------------------------.
13534| yyerrorlab -- error raised explicitly by YYERROR. |
13535`---------------------------------------------------*/
13536yyerrorlab:
13537 /* Pacify compilers when the user code never invokes YYERROR and the
13538 label yyerrorlab therefore never appears in user code. */
13539 if (0)
13540 YYERROR;
13541 ++yynerrs;
13542
13543 /* Do not reclaim the symbols of the rule whose action triggered
13544 this YYERROR. */
13545 YYPOPSTACK (yylen);
13546 yylen = 0;
13547 YY_STACK_PRINT (yyss, yyssp);
13548 yystate = *yyssp;
13549 goto yyerrlab1;
13550
13551
13552/*-------------------------------------------------------------.
13553| yyerrlab1 -- common code for both syntax error and YYERROR. |
13554`-------------------------------------------------------------*/
13555yyerrlab1:
13556 yyerrstatus = 3; /* Each real token shifted decrements this. */
13557
13558 /* Pop stack until we find a state that shifts the error token. */
13559 for (;;)
13560 {
13561 yyn = yypact[yystate];
13562 if (!yypact_value_is_default (yyn))
13563 {
13564 yyn += YYSYMBOL_YYerror;
13565 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror)
13566 {
13567 yyn = yytable[yyn];
13568 if (0 < yyn)
13569 break;
13570 }
13571 }
13572
13573 /* Pop the current state because it cannot handle the error token. */
13574 if (yyssp == yyss)
13575 YYABORT;
13576
13577 yyerror_range[1] = *yylsp;
13578 yydestruct ("Error: popping",
13579 YY_ACCESSING_SYMBOL (yystate), yyvsp, yylsp, p);
13580 YYPOPSTACK (1);
13581 yystate = *yyssp;
13582 YY_STACK_PRINT (yyss, yyssp);
13583 }
13584
13585 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
13586 *++yyvsp = yylval;
13587 YY_IGNORE_MAYBE_UNINITIALIZED_END
13588
13589 yyerror_range[2] = yylloc;
13590 ++yylsp;
13591 YYLLOC_DEFAULT (*yylsp, yyerror_range, 2);
13592
13593 /* Shift the error token. */
13594 YY_SYMBOL_PRINT ("Shifting", YY_ACCESSING_SYMBOL (yyn), yyvsp, yylsp);
13595
13596 yystate = yyn;
13597 goto yynewstate;
13598
13599
13600/*-------------------------------------.
13601| yyacceptlab -- YYACCEPT comes here. |
13602`-------------------------------------*/
13603yyacceptlab:
13604 yyresult = 0;
13605 goto yyreturnlab;
13606
13607
13608/*-----------------------------------.
13609| yyabortlab -- YYABORT comes here. |
13610`-----------------------------------*/
13611yyabortlab:
13612 yyresult = 1;
13613 goto yyreturnlab;
13614
13615
13616/*-----------------------------------------------------------.
13617| yyexhaustedlab -- YYNOMEM (memory exhaustion) comes here. |
13618`-----------------------------------------------------------*/
13619yyexhaustedlab:
13620 yyerror (&yylloc, p, YY_("memory exhausted"));
13621 yyresult = 2;
13622 goto yyreturnlab;
13623
13624
13625/*----------------------------------------------------------.
13626| yyreturnlab -- parsing is finished, clean up and return. |
13627`----------------------------------------------------------*/
13628yyreturnlab:
13629 if (yychar != YYEMPTY)
13630 {
13631 /* Make sure we have latest lookahead translation. See comments at
13632 user semantic actions for why this is necessary. */
13633 yytoken = YYTRANSLATE (yychar);
13634 yydestruct ("Cleanup: discarding lookahead",
13635 yytoken, &yylval, &yylloc, p);
13636 }
13637 /* Do not reclaim the symbols of the rule whose action triggered
13638 this YYABORT or YYACCEPT. */
13639 YYPOPSTACK (yylen);
13640 YY_STACK_PRINT (yyss, yyssp);
13641 while (yyssp != yyss)
13642 {
13643 yydestruct ("Cleanup: popping",
13644 YY_ACCESSING_SYMBOL (+*yyssp), yyvsp, yylsp, p);
13645 YYPOPSTACK (1);
13646 }
13647#ifndef yyoverflow
13648 if (yyss != yyssa)
13649 YYSTACK_FREE (yyss);
13650#endif
13651 if (yymsg != yymsgbuf)
13652 YYSTACK_FREE (yymsg);
13653 return yyresult;
13654}
13655
13656#line 5786 "ripper.y"
13657
13658# undef p
13659# undef yylex
13660# undef yylval
13661# define yylval (*p->lval)
13662
13663static int regx_options(struct parser_params*);
13664static int tokadd_string(struct parser_params*,int,int,int,long*,rb_encoding**,rb_encoding**);
13665static void tokaddmbc(struct parser_params *p, int c, rb_encoding *enc);
13666static enum yytokentype parse_string(struct parser_params*,rb_strterm_literal_t*);
13667static enum yytokentype here_document(struct parser_params*,rb_strterm_heredoc_t*);
13668
13669#ifndef RIPPER
13670# define set_yylval_node(x) { \
13671 YYLTYPE _cur_loc; \
13672 rb_parser_set_location(p, &_cur_loc); \
13673 yylval.node = (x); \
13674}
13675# define set_yylval_str(x) \
13676do { \
13677 set_yylval_node(NEW_STR(x, &_cur_loc)); \
13678 RB_OBJ_WRITTEN(p->ast, Qnil, x); \
13679} while(0)
13680# define set_yylval_literal(x) \
13681do { \
13682 set_yylval_node(NEW_LIT(x, &_cur_loc)); \
13683 RB_OBJ_WRITTEN(p->ast, Qnil, x); \
13684} while(0)
13685# define set_yylval_num(x) (yylval.num = (x))
13686# define set_yylval_id(x) (yylval.id = (x))
13687# define set_yylval_name(x) (yylval.id = (x))
13688# define yylval_id() (yylval.id)
13689#else
13690static inline VALUE
13691ripper_yylval_id(struct parser_params *p, ID x)
13692{
13693 return ripper_new_yylval(p, x, ID2SYM(x), 0);
13694}
13695# define set_yylval_str(x) (yylval.val = add_mark_object(p, (x)))
13696# define set_yylval_num(x) (yylval.val = ripper_new_yylval(p, (x), 0, 0))
13697# define set_yylval_id(x) (void)(x)
13698# define set_yylval_name(x) (void)(yylval.val = ripper_yylval_id(p, x))
13699# define set_yylval_literal(x) add_mark_object(p, (x))
13700# define set_yylval_node(x) (yylval.val = ripper_new_yylval(p, 0, 0, STR_NEW(p->lex.ptok, p->lex.pcur-p->lex.ptok)))
13701# define yylval_id() yylval.id
13702# define _cur_loc NULL_LOC /* dummy */
13703#endif
13704
13705#define set_yylval_noname() set_yylval_id(keyword_nil)
13706
13707#ifndef RIPPER
13708#define literal_flush(p, ptr) ((p)->lex.ptok = (ptr))
13709#define dispatch_scan_event(p, t) ((void)0)
13710#define dispatch_delayed_token(p, t) ((void)0)
13711#define has_delayed_token(p) (0)
13712#else
13713#define literal_flush(p, ptr) ((void)(ptr))
13714
13715#define yylval_rval (*(RB_TYPE_P(yylval.val, T_NODE) ? &yylval.node->nd_rval : &yylval.val))
13716
13717static inline VALUE
13718intern_sym(const char *name)
13719{
13720 ID id = rb_intern_const(name);
13721 return ID2SYM(id);
13722}
13723
13724static int
13725ripper_has_scan_event(struct parser_params *p)
13726{
13727 if (p->lex.pcur < p->lex.ptok) rb_raise(rb_eRuntimeError, "lex.pcur < lex.ptok");
13728 return p->lex.pcur > p->lex.ptok;
13729}
13730
13731static VALUE
13732ripper_scan_event_val(struct parser_params *p, enum yytokentype t)
13733{
13734 VALUE str = STR_NEW(p->lex.ptok, p->lex.pcur - p->lex.ptok);
13735 VALUE rval = ripper_dispatch1(p, ripper_token2eventid(t), str);
13736 token_flush(p);
13737 return rval;
13738}
13739
13740static void
13741ripper_dispatch_scan_event(struct parser_params *p, enum yytokentype t)
13742{
13743 if (!ripper_has_scan_event(p)) return;
13744 add_mark_object(p, yylval_rval = ripper_scan_event_val(p, t));
13745}
13746#define dispatch_scan_event(p, t) ripper_dispatch_scan_event(p, t)
13747
13748static void
13749ripper_dispatch_delayed_token(struct parser_params *p, enum yytokentype t)
13750{
13751 int saved_line = p->ruby_sourceline;
13752 const char *saved_tokp = p->lex.ptok;
13753
13754 if (NIL_P(p->delayed.token)) return;
13755 p->ruby_sourceline = p->delayed.line;
13756 p->lex.ptok = p->lex.pbeg + p->delayed.col;
13757 add_mark_object(p, yylval_rval = ripper_dispatch1(p, ripper_token2eventid(t), p->delayed.token));
13758 p->delayed.token = Qnil;
13759 p->ruby_sourceline = saved_line;
13760 p->lex.ptok = saved_tokp;
13761}
13762#define dispatch_delayed_token(p, t) ripper_dispatch_delayed_token(p, t)
13763#define has_delayed_token(p) (!NIL_P(p->delayed.token))
13764#endif /* RIPPER */
13765
13766static inline int
13767is_identchar(const char *ptr, const char *MAYBE_UNUSED(ptr_end), rb_encoding *enc)
13768{
13769 return rb_enc_isalnum((unsigned char)*ptr, enc) || *ptr == '_' || !ISASCII(*ptr);
13770}
13771
13772static inline int
13773parser_is_identchar(struct parser_params *p)
13774{
13775 return !(p)->eofp && is_identchar(p->lex.pcur-1, p->lex.pend, p->enc);
13776}
13777
13778static inline int
13779parser_isascii(struct parser_params *p)
13780{
13781 return ISASCII(*(p->lex.pcur-1));
13782}
13783
13784static void
13785token_info_setup(token_info *ptinfo, const char *ptr, const rb_code_location_t *loc)
13786{
13787 int column = 1, nonspc = 0, i;
13788 for (i = 0; i < loc->beg_pos.column; i++, ptr++) {
13789 if (*ptr == '\t') {
13790 column = (((column - 1) / TAB_WIDTH) + 1) * TAB_WIDTH;
13791 }
13792 column++;
13793 if (*ptr != ' ' && *ptr != '\t') {
13794 nonspc = 1;
13795 }
13796 }
13797
13798 ptinfo->beg = loc->beg_pos;
13799 ptinfo->indent = column;
13800 ptinfo->nonspc = nonspc;
13801}
13802
13803static void
13804token_info_push(struct parser_params *p, const char *token, const rb_code_location_t *loc)
13805{
13806 token_info *ptinfo;
13807
13808 if (!p->token_info_enabled) return;
13809 ptinfo = ALLOC(token_info);
13810 ptinfo->token = token;
13811 ptinfo->next = p->token_info;
13812 token_info_setup(ptinfo, p->lex.pbeg, loc);
13813
13814 p->token_info = ptinfo;
13815}
13816
13817static void
13818token_info_pop(struct parser_params *p, const char *token, const rb_code_location_t *loc)
13819{
13820 token_info *ptinfo_beg = p->token_info;
13821
13822 if (!ptinfo_beg) return;
13823 p->token_info = ptinfo_beg->next;
13824
13825 /* indentation check of matched keywords (begin..end, if..end, etc.) */
13826 token_info_warn(p, token, ptinfo_beg, 1, loc);
13827 ruby_sized_xfree(ptinfo_beg, sizeof(*ptinfo_beg));
13828}
13829
13830static void
13831token_info_drop(struct parser_params *p, const char *token, rb_code_position_t beg_pos)
13832{
13833 token_info *ptinfo_beg = p->token_info;
13834
13835 if (!ptinfo_beg) return;
13836 p->token_info = ptinfo_beg->next;
13837
13838 if (ptinfo_beg->beg.lineno != beg_pos.lineno ||
13839 ptinfo_beg->beg.column != beg_pos.column ||
13840 strcmp(ptinfo_beg->token, token)) {
13841 compile_error(p, "token position mismatch: %d:%d:%s expected but %d:%d:%s",
13842 beg_pos.lineno, beg_pos.column, token,
13843 ptinfo_beg->beg.lineno, ptinfo_beg->beg.column,
13844 ptinfo_beg->token);
13845 }
13846
13847 ruby_sized_xfree(ptinfo_beg, sizeof(*ptinfo_beg));
13848}
13849
13850static void
13851token_info_warn(struct parser_params *p, const char *token, token_info *ptinfo_beg, int same, const rb_code_location_t *loc)
13852{
13853 token_info ptinfo_end_body, *ptinfo_end = &ptinfo_end_body;
13854 if (!p->token_info_enabled) return;
13855 if (!ptinfo_beg) return;
13856 token_info_setup(ptinfo_end, p->lex.pbeg, loc);
13857 if (ptinfo_beg->beg.lineno == ptinfo_end->beg.lineno) return; /* ignore one-line block */
13858 if (ptinfo_beg->nonspc || ptinfo_end->nonspc) return; /* ignore keyword in the middle of a line */
13859 if (ptinfo_beg->indent == ptinfo_end->indent) return; /* the indents are matched */
13860 if (!same && ptinfo_beg->indent < ptinfo_end->indent) return;
13861 rb_warn3L(ptinfo_end->beg.lineno,
13862 "mismatched indentations at '%s' with '%s' at %d",
13863 WARN_S(token), WARN_S(ptinfo_beg->token), WARN_I(ptinfo_beg->beg.lineno));
13864}
13865
13866static int
13867parser_precise_mbclen(struct parser_params *p, const char *ptr)
13868{
13869 int len = rb_enc_precise_mbclen(ptr, p->lex.pend, p->enc);
13870 if (!MBCLEN_CHARFOUND_P(len)) {
13871 compile_error(p, "invalid multibyte char (%s)", rb_enc_name(p->enc));
13872 return -1;
13873 }
13874 return len;
13875}
13876
13877#ifndef RIPPER
13878static void ruby_show_error_line(VALUE errbuf, const YYLTYPE *yylloc, int lineno, VALUE str);
13879
13880static inline void
13881parser_show_error_line(struct parser_params *p, const YYLTYPE *yylloc)
13882{
13883 VALUE str;
13884 int lineno = p->ruby_sourceline;
13885 if (!yylloc) {
13886 return;
13887 }
13888 else if (yylloc->beg_pos.lineno == lineno) {
13889 str = p->lex.lastline;
13890 }
13891 else {
13892 return;
13893 }
13894 ruby_show_error_line(p->error_buffer, yylloc, lineno, str);
13895}
13896
13897static int
13898parser_yyerror(struct parser_params *p, const YYLTYPE *yylloc, const char *msg)
13899{
13900#if 0
13901 YYLTYPE current;
13902
13903 if (!yylloc) {
13904 yylloc = RUBY_SET_YYLLOC(current);
13905 }
13906 else if ((p->ruby_sourceline != yylloc->beg_pos.lineno &&
13907 p->ruby_sourceline != yylloc->end_pos.lineno)) {
13908 yylloc = 0;
13909 }
13910#endif
13911 compile_error(p, "%s", msg);
13912 parser_show_error_line(p, yylloc);
13913 return 0;
13914}
13915
13916static int
13917parser_yyerror0(struct parser_params *p, const char *msg)
13918{
13919 YYLTYPE current;
13920 return parser_yyerror(p, RUBY_SET_YYLLOC(current), msg);
13921}
13922
13923static void
13924ruby_show_error_line(VALUE errbuf, const YYLTYPE *yylloc, int lineno, VALUE str)
13925{
13926 VALUE mesg;
13927 const int max_line_margin = 30;
13928 const char *ptr, *ptr_end, *pt, *pb;
13929 const char *pre = "", *post = "", *pend;
13930 const char *code = "", *caret = "";
13931 const char *lim;
13932 const char *const pbeg = RSTRING_PTR(str);
13933 char *buf;
13934 long len;
13935 int i;
13936
13937 if (!yylloc) return;
13938 pend = RSTRING_END(str);
13939 if (pend > pbeg && pend[-1] == '\n') {
13940 if (--pend > pbeg && pend[-1] == '\r') --pend;
13941 }
13942
13943 pt = pend;
13944 if (lineno == yylloc->end_pos.lineno &&
13945 (pend - pbeg) > yylloc->end_pos.column) {
13946 pt = pbeg + yylloc->end_pos.column;
13947 }
13948
13949 ptr = ptr_end = pt;
13950 lim = ptr - pbeg > max_line_margin ? ptr - max_line_margin : pbeg;
13951 while ((lim < ptr) && (*(ptr-1) != '\n')) ptr--;
13952
13953 lim = pend - ptr_end > max_line_margin ? ptr_end + max_line_margin : pend;
13954 while ((ptr_end < lim) && (*ptr_end != '\n') && (*ptr_end != '\r')) ptr_end++;
13955
13956 len = ptr_end - ptr;
13957 if (len > 4) {
13958 if (ptr > pbeg) {
13959 ptr = rb_enc_prev_char(pbeg, ptr, pt, rb_enc_get(str));
13960 if (ptr > pbeg) pre = "...";
13961 }
13962 if (ptr_end < pend) {
13963 ptr_end = rb_enc_prev_char(pt, ptr_end, pend, rb_enc_get(str));
13964 if (ptr_end < pend) post = "...";
13965 }
13966 }
13967 pb = pbeg;
13968 if (lineno == yylloc->beg_pos.lineno) {
13969 pb += yylloc->beg_pos.column;
13970 if (pb > pt) pb = pt;
13971 }
13972 if (pb < ptr) pb = ptr;
13973 if (len <= 4 && yylloc->beg_pos.lineno == yylloc->end_pos.lineno) {
13974 return;
13975 }
13976 if (RTEST(errbuf)) {
13977 mesg = rb_attr_get(errbuf, idMesg);
13978 if (RSTRING_LEN(mesg) > 0 && *(RSTRING_END(mesg)-1) != '\n')
13979 rb_str_cat_cstr(mesg, "\n");
13980 }
13981 else {
13982 mesg = rb_enc_str_new(0, 0, rb_enc_get(str));
13983 }
13984 if (!errbuf && rb_stderr_tty_p()) {
13985#define CSI_BEGIN "\033["
13986#define CSI_SGR "m"
13987 rb_str_catf(mesg,
13988 CSI_BEGIN""CSI_SGR"%s" /* pre */
13989 CSI_BEGIN"1"CSI_SGR"%.*s"
13990 CSI_BEGIN"1;4"CSI_SGR"%.*s"
13991 CSI_BEGIN";1"CSI_SGR"%.*s"
13992 CSI_BEGIN""CSI_SGR"%s" /* post */
13993 "\n",
13994 pre,
13995 (int)(pb - ptr), ptr,
13996 (int)(pt - pb), pb,
13997 (int)(ptr_end - pt), pt,
13998 post);
13999 }
14000 else {
14001 char *p2;
14002
14003 len = ptr_end - ptr;
14004 lim = pt < pend ? pt : pend;
14005 i = (int)(lim - ptr);
14006 buf = ALLOCA_N(char, i+2);
14007 code = ptr;
14008 caret = p2 = buf;
14009 if (ptr <= pb) {
14010 while (ptr < pb) {
14011 *p2++ = *ptr++ == '\t' ? '\t' : ' ';
14012 }
14013 *p2++ = '^';
14014 ptr++;
14015 }
14016 if (lim > ptr) {
14017 memset(p2, '~', (lim - ptr));
14018 p2 += (lim - ptr);
14019 }
14020 *p2 = '\0';
14021 rb_str_catf(mesg, "%s%.*s%s\n""%s%s\n",
14022 pre, (int)len, code, post,
14023 pre, caret);
14024 }
14025 if (!errbuf) rb_write_error_str(mesg);
14026}
14027#else
14028static int
14029parser_yyerror(struct parser_params *p, const YYLTYPE *yylloc, const char *msg)
14030{
14031 const char *pcur = 0, *ptok = 0;
14032 if (p->ruby_sourceline == yylloc->beg_pos.lineno &&
14033 p->ruby_sourceline == yylloc->end_pos.lineno) {
14034 pcur = p->lex.pcur;
14035 ptok = p->lex.ptok;
14036 p->lex.ptok = p->lex.pbeg + yylloc->beg_pos.column;
14037 p->lex.pcur = p->lex.pbeg + yylloc->end_pos.column;
14038 }
14039 parser_yyerror0(p, msg);
14040 if (pcur) {
14041 p->lex.ptok = ptok;
14042 p->lex.pcur = pcur;
14043 }
14044 return 0;
14045}
14046
14047static int
14048parser_yyerror0(struct parser_params *p, const char *msg)
14049{
14050 dispatch1(parse_error, STR_NEW2(msg));
14051 ripper_error(p);
14052 return 0;
14053}
14054
14055static inline void
14056parser_show_error_line(struct parser_params *p, const YYLTYPE *yylloc)
14057{
14058}
14059#endif /* !RIPPER */
14060
14061#ifndef RIPPER
14062static int
14063vtable_size(const struct vtable *tbl)
14064{
14065 if (!DVARS_TERMINAL_P(tbl)) {
14066 return tbl->pos;
14067 }
14068 else {
14069 return 0;
14070 }
14071}
14072#endif
14073
14074static struct vtable *
14075vtable_alloc_gen(struct parser_params *p, int line, struct vtable *prev)
14076{
14077 struct vtable *tbl = ALLOC(struct vtable);
14078 tbl->pos = 0;
14079 tbl->capa = 8;
14080 tbl->tbl = ALLOC_N(ID, tbl->capa);
14081 tbl->prev = prev;
14082#ifndef RIPPER
14083 if (p->debug) {
14084 rb_parser_printf(p, "vtable_alloc:%d: %p\n", line, (void *)tbl);
14085 }
14086#endif
14087 return tbl;
14088}
14089#define vtable_alloc(prev) vtable_alloc_gen(p, __LINE__, prev)
14090
14091static void
14092vtable_free_gen(struct parser_params *p, int line, const char *name,
14093 struct vtable *tbl)
14094{
14095#ifndef RIPPER
14096 if (p->debug) {
14097 rb_parser_printf(p, "vtable_free:%d: %s(%p)\n", line, name, (void *)tbl);
14098 }
14099#endif
14100 if (!DVARS_TERMINAL_P(tbl)) {
14101 if (tbl->tbl) {
14102 ruby_sized_xfree(tbl->tbl, tbl->capa * sizeof(ID));
14103 }
14104 ruby_sized_xfree(tbl, sizeof(*tbl));
14105 }
14106}
14107#define vtable_free(tbl) vtable_free_gen(p, __LINE__, #tbl, tbl)
14108
14109static void
14110vtable_add_gen(struct parser_params *p, int line, const char *name,
14111 struct vtable *tbl, ID id)
14112{
14113#ifndef RIPPER
14114 if (p->debug) {
14115 rb_parser_printf(p, "vtable_add:%d: %s(%p), %s\n",
14116 line, name, (void *)tbl, rb_id2name(id));
14117 }
14118#endif
14119 if (DVARS_TERMINAL_P(tbl)) {
14120 rb_parser_fatal(p, "vtable_add: vtable is not allocated (%p)", (void *)tbl);
14121 return;
14122 }
14123 if (tbl->pos == tbl->capa) {
14124 tbl->capa = tbl->capa * 2;
14125 SIZED_REALLOC_N(tbl->tbl, ID, tbl->capa, tbl->pos);
14126 }
14127 tbl->tbl[tbl->pos++] = id;
14128}
14129#define vtable_add(tbl, id) vtable_add_gen(p, __LINE__, #tbl, tbl, id)
14130
14131#ifndef RIPPER
14132static void
14133vtable_pop_gen(struct parser_params *p, int line, const char *name,
14134 struct vtable *tbl, int n)
14135{
14136 if (p->debug) {
14137 rb_parser_printf(p, "vtable_pop:%d: %s(%p), %d\n",
14138 line, name, (void *)tbl, n);
14139 }
14140 if (tbl->pos < n) {
14141 rb_parser_fatal(p, "vtable_pop: unreachable (%d < %d)", tbl->pos, n);
14142 return;
14143 }
14144 tbl->pos -= n;
14145}
14146#define vtable_pop(tbl, n) vtable_pop_gen(p, __LINE__, #tbl, tbl, n)
14147#endif
14148
14149static int
14150vtable_included(const struct vtable * tbl, ID id)
14151{
14152 int i;
14153
14154 if (!DVARS_TERMINAL_P(tbl)) {
14155 for (i = 0; i < tbl->pos; i++) {
14156 if (tbl->tbl[i] == id) {
14157 return i+1;
14158 }
14159 }
14160 }
14161 return 0;
14162}
14163
14164static void parser_prepare(struct parser_params *p);
14165
14166#ifndef RIPPER
14167static NODE *parser_append_options(struct parser_params *p, NODE *node);
14168
14169static VALUE
14170debug_lines(VALUE fname)
14171{
14172 ID script_lines;
14173 CONST_ID(script_lines, "SCRIPT_LINES__");
14174 if (rb_const_defined_at(rb_cObject, script_lines)) {
14175 VALUE hash = rb_const_get_at(rb_cObject, script_lines);
14176 if (RB_TYPE_P(hash, T_HASH)) {
14177 VALUE lines = rb_ary_new();
14178 rb_hash_aset(hash, fname, lines);
14179 return lines;
14180 }
14181 }
14182 return 0;
14183}
14184
14185static int
14186e_option_supplied(struct parser_params *p)
14187{
14188 return strcmp(p->ruby_sourcefile, "-e") == 0;
14189}
14190
14191static VALUE
14192yycompile0(VALUE arg)
14193{
14194 int n;
14195 NODE *tree;
14196 struct parser_params *p = (struct parser_params *)arg;
14197 VALUE cov = Qfalse;
14198
14199 if (!compile_for_eval && !NIL_P(p->ruby_sourcefile_string)) {
14200 p->debug_lines = debug_lines(p->ruby_sourcefile_string);
14201 if (p->debug_lines && p->ruby_sourceline > 0) {
14202 VALUE str = rb_default_rs;
14203 n = p->ruby_sourceline;
14204 do {
14205 rb_ary_push(p->debug_lines, str);
14206 } while (--n);
14207 }
14208
14209 if (!e_option_supplied(p)) {
14210 cov = Qtrue;
14211 }
14212 }
14213
14214 if (p->keep_script_lines || ruby_vm_keep_script_lines) {
14215 if (!p->debug_lines) {
14216 p->debug_lines = rb_ary_new();
14217 }
14218
14219 RB_OBJ_WRITE(p->ast, &p->ast->body.script_lines, p->debug_lines);
14220 }
14221
14222 parser_prepare(p);
14223#define RUBY_DTRACE_PARSE_HOOK(name) \
14224 if (RUBY_DTRACE_PARSE_##name##_ENABLED()) { \
14225 RUBY_DTRACE_PARSE_##name(p->ruby_sourcefile, p->ruby_sourceline); \
14226 }
14227 RUBY_DTRACE_PARSE_HOOK(BEGIN);
14228 n = yyparse(p);
14229 RUBY_DTRACE_PARSE_HOOK(END);
14230 p->debug_lines = 0;
14231
14232 p->lex.strterm = 0;
14233 p->lex.pcur = p->lex.pbeg = p->lex.pend = 0;
14234 p->lex.prevline = p->lex.lastline = p->lex.nextline = 0;
14235 if (n || p->error_p) {
14236 VALUE mesg = p->error_buffer;
14237 if (!mesg) {
14239 }
14240 rb_set_errinfo(mesg);
14241 return FALSE;
14242 }
14243 tree = p->eval_tree;
14244 if (!tree) {
14245 tree = NEW_NIL(&NULL_LOC);
14246 }
14247 else {
14248 VALUE opt = p->compile_option;
14249 NODE *prelude;
14250 NODE *body = parser_append_options(p, tree->nd_body);
14251 if (!opt) opt = rb_obj_hide(rb_ident_hash_new());
14252 rb_hash_aset(opt, rb_sym_intern_ascii_cstr("coverage_enabled"), cov);
14253 prelude = block_append(p, p->eval_tree_begin, body);
14254 tree->nd_body = prelude;
14255 RB_OBJ_WRITE(p->ast, &p->ast->body.compile_option, opt);
14256 }
14257 p->ast->body.root = tree;
14258 if (!p->ast->body.script_lines) p->ast->body.script_lines = INT2FIX(p->line_count);
14259 return TRUE;
14260}
14261
14262static rb_ast_t *
14263yycompile(VALUE vparser, struct parser_params *p, VALUE fname, int line)
14264{
14265 rb_ast_t *ast;
14266 if (NIL_P(fname)) {
14267 p->ruby_sourcefile_string = Qnil;
14268 p->ruby_sourcefile = "(none)";
14269 }
14270 else {
14271 p->ruby_sourcefile_string = rb_fstring(fname);
14272 p->ruby_sourcefile = StringValueCStr(fname);
14273 }
14274 p->ruby_sourceline = line - 1;
14275
14276 p->lvtbl = NULL;
14277
14278 p->ast = ast = rb_ast_new();
14279 rb_suppress_tracing(yycompile0, (VALUE)p);
14280 p->ast = 0;
14281 RB_GC_GUARD(vparser); /* prohibit tail call optimization */
14282
14283 while (p->lvtbl) {
14284 local_pop(p);
14285 }
14286
14287 return ast;
14288}
14289#endif /* !RIPPER */
14290
14291static rb_encoding *
14292must_be_ascii_compatible(VALUE s)
14293{
14294 rb_encoding *enc = rb_enc_get(s);
14295 if (!rb_enc_asciicompat(enc)) {
14296 rb_raise(rb_eArgError, "invalid source encoding");
14297 }
14298 return enc;
14299}
14300
14301static VALUE
14302lex_get_str(struct parser_params *p, VALUE s)
14303{
14304 char *beg, *end, *start;
14305 long len;
14306
14307 beg = RSTRING_PTR(s);
14308 len = RSTRING_LEN(s);
14309 start = beg;
14310 if (p->lex.gets_.ptr) {
14311 if (len == p->lex.gets_.ptr) return Qnil;
14312 beg += p->lex.gets_.ptr;
14313 len -= p->lex.gets_.ptr;
14314 }
14315 end = memchr(beg, '\n', len);
14316 if (end) len = ++end - beg;
14317 p->lex.gets_.ptr += len;
14318 return rb_str_subseq(s, beg - start, len);
14319}
14320
14321static VALUE
14322lex_getline(struct parser_params *p)
14323{
14324 VALUE line = (*p->lex.gets)(p, p->lex.input);
14325 if (NIL_P(line)) return line;
14326 must_be_ascii_compatible(line);
14327 if (RB_OBJ_FROZEN(line)) line = rb_str_dup(line); // needed for RubyVM::AST.of because script_lines in iseq is deep-frozen
14328 p->line_count++;
14329 return line;
14330}
14331
14332static const rb_data_type_t parser_data_type;
14333
14334#ifndef RIPPER
14335static rb_ast_t*
14336parser_compile_string(VALUE vparser, VALUE fname, VALUE s, int line)
14337{
14338 struct parser_params *p;
14339
14340 TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, p);
14341
14342 p->lex.gets = lex_get_str;
14343 p->lex.gets_.ptr = 0;
14344 p->lex.input = rb_str_new_frozen(s);
14345 p->lex.pbeg = p->lex.pcur = p->lex.pend = 0;
14346
14347 return yycompile(vparser, p, fname, line);
14348}
14349
14350rb_ast_t*
14351rb_parser_compile_string(VALUE vparser, const char *f, VALUE s, int line)
14352{
14353 return rb_parser_compile_string_path(vparser, rb_filesystem_str_new_cstr(f), s, line);
14354}
14355
14356rb_ast_t*
14357rb_parser_compile_string_path(VALUE vparser, VALUE f, VALUE s, int line)
14358{
14359 must_be_ascii_compatible(s);
14360 return parser_compile_string(vparser, f, s, line);
14361}
14362
14363VALUE rb_io_gets_internal(VALUE io);
14364
14365static VALUE
14366lex_io_gets(struct parser_params *p, VALUE io)
14367{
14368 return rb_io_gets_internal(io);
14369}
14370
14371rb_ast_t*
14372rb_parser_compile_file_path(VALUE vparser, VALUE fname, VALUE file, int start)
14373{
14374 struct parser_params *p;
14375
14376 TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, p);
14377
14378 p->lex.gets = lex_io_gets;
14379 p->lex.input = file;
14380 p->lex.pbeg = p->lex.pcur = p->lex.pend = 0;
14381
14382 return yycompile(vparser, p, fname, start);
14383}
14384
14385static VALUE
14386lex_generic_gets(struct parser_params *p, VALUE input)
14387{
14388 return (*p->lex.gets_.call)(input, p->line_count);
14389}
14390
14391rb_ast_t*
14392rb_parser_compile_generic(VALUE vparser, VALUE (*lex_gets)(VALUE, int), VALUE fname, VALUE input, int start)
14393{
14394 struct parser_params *p;
14395
14396 TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, p);
14397
14398 p->lex.gets = lex_generic_gets;
14399 p->lex.gets_.call = lex_gets;
14400 p->lex.input = input;
14401 p->lex.pbeg = p->lex.pcur = p->lex.pend = 0;
14402
14403 return yycompile(vparser, p, fname, start);
14404}
14405#endif /* !RIPPER */
14406
14407#define STR_FUNC_ESCAPE 0x01
14408#define STR_FUNC_EXPAND 0x02
14409#define STR_FUNC_REGEXP 0x04
14410#define STR_FUNC_QWORDS 0x08
14411#define STR_FUNC_SYMBOL 0x10
14412#define STR_FUNC_INDENT 0x20
14413#define STR_FUNC_LABEL 0x40
14414#define STR_FUNC_LIST 0x4000
14415#define STR_FUNC_TERM 0x8000
14416
14417enum string_type {
14418 str_label = STR_FUNC_LABEL,
14419 str_squote = (0),
14420 str_dquote = (STR_FUNC_EXPAND),
14421 str_xquote = (STR_FUNC_EXPAND),
14422 str_regexp = (STR_FUNC_REGEXP|STR_FUNC_ESCAPE|STR_FUNC_EXPAND),
14423 str_sword = (STR_FUNC_QWORDS|STR_FUNC_LIST),
14424 str_dword = (STR_FUNC_QWORDS|STR_FUNC_EXPAND|STR_FUNC_LIST),
14425 str_ssym = (STR_FUNC_SYMBOL),
14426 str_dsym = (STR_FUNC_SYMBOL|STR_FUNC_EXPAND)
14427};
14428
14429static VALUE
14430parser_str_new(const char *ptr, long len, rb_encoding *enc, int func, rb_encoding *enc0)
14431{
14432 VALUE str;
14433
14434 str = rb_enc_str_new(ptr, len, enc);
14435 if (!(func & STR_FUNC_REGEXP) && rb_enc_asciicompat(enc)) {
14437 }
14438 else if (enc0 == rb_usascii_encoding() && enc != rb_utf8_encoding()) {
14439 rb_enc_associate(str, rb_ascii8bit_encoding());
14440 }
14441 }
14442
14443 return str;
14444}
14445
14446#define lex_goto_eol(p) ((p)->lex.pcur = (p)->lex.pend)
14447#define lex_eol_p(p) ((p)->lex.pcur >= (p)->lex.pend)
14448#define lex_eol_n_p(p,n) ((p)->lex.pcur+(n) >= (p)->lex.pend)
14449#define peek(p,c) peek_n(p, (c), 0)
14450#define peek_n(p,c,n) (!lex_eol_n_p(p, n) && (c) == (unsigned char)(p)->lex.pcur[n])
14451#define peekc(p) peekc_n(p, 0)
14452#define peekc_n(p,n) (lex_eol_n_p(p, n) ? -1 : (unsigned char)(p)->lex.pcur[n])
14453
14454#ifdef RIPPER
14455static void
14456add_delayed_token(struct parser_params *p, const char *tok, const char *end)
14457{
14458 if (tok < end) {
14459 if (!has_delayed_token(p)) {
14460 p->delayed.token = rb_str_buf_new(end - tok);
14461 rb_enc_associate(p->delayed.token, p->enc);
14462 p->delayed.line = p->ruby_sourceline;
14463 p->delayed.col = rb_long2int(tok - p->lex.pbeg);
14464 }
14465 rb_str_buf_cat(p->delayed.token, tok, end - tok);
14466 p->lex.ptok = end;
14467 }
14468}
14469#else
14470#define add_delayed_token(p, tok, end) ((void)(tok), (void)(end))
14471#endif
14472
14473static int
14474nextline(struct parser_params *p, int set_encoding)
14475{
14476 VALUE v = p->lex.nextline;
14477 p->lex.nextline = 0;
14478 if (!v) {
14479 if (p->eofp)
14480 return -1;
14481
14482 if (p->lex.pend > p->lex.pbeg && *(p->lex.pend-1) != '\n') {
14483 goto end_of_input;
14484 }
14485
14486 if (!p->lex.input || NIL_P(v = lex_getline(p))) {
14487 end_of_input:
14488 p->eofp = 1;
14489 lex_goto_eol(p);
14490 return -1;
14491 }
14492#ifndef RIPPER
14493 if (p->debug_lines) {
14494 if (set_encoding) rb_enc_associate(v, p->enc);
14495 rb_ary_push(p->debug_lines, v);
14496 }
14497#endif
14498 p->cr_seen = FALSE;
14499 }
14500 else if (NIL_P(v)) {
14501 /* after here-document without terminator */
14502 goto end_of_input;
14503 }
14504 add_delayed_token(p, p->lex.ptok, p->lex.pend);
14505 if (p->heredoc_end > 0) {
14506 p->ruby_sourceline = p->heredoc_end;
14507 p->heredoc_end = 0;
14508 }
14509 p->ruby_sourceline++;
14510 p->lex.pbeg = p->lex.pcur = RSTRING_PTR(v);
14511 p->lex.pend = p->lex.pcur + RSTRING_LEN(v);
14512 token_flush(p);
14513 p->lex.prevline = p->lex.lastline;
14514 p->lex.lastline = v;
14515 return 0;
14516}
14517
14518static int
14519parser_cr(struct parser_params *p, int c)
14520{
14521 if (peek(p, '\n')) {
14522 p->lex.pcur++;
14523 c = '\n';
14524 }
14525 return c;
14526}
14527
14528static inline int
14529nextc0(struct parser_params *p, int set_encoding)
14530{
14531 int c;
14532
14533 if (UNLIKELY((p->lex.pcur == p->lex.pend) || p->eofp || RTEST(p->lex.nextline))) {
14534 if (nextline(p, set_encoding)) return -1;
14535 }
14536 c = (unsigned char)*p->lex.pcur++;
14537 if (UNLIKELY(c == '\r')) {
14538 c = parser_cr(p, c);
14539 }
14540
14541 return c;
14542}
14543#define nextc(p) nextc0(p, TRUE)
14544
14545static void
14546pushback(struct parser_params *p, int c)
14547{
14548 if (c == -1) return;
14549 p->lex.pcur--;
14550 if (p->lex.pcur > p->lex.pbeg && p->lex.pcur[0] == '\n' && p->lex.pcur[-1] == '\r') {
14551 p->lex.pcur--;
14552 }
14553}
14554
14555#define was_bol(p) ((p)->lex.pcur == (p)->lex.pbeg + 1)
14556
14557#define tokfix(p) ((p)->tokenbuf[(p)->tokidx]='\0')
14558#define tok(p) (p)->tokenbuf
14559#define toklen(p) (p)->tokidx
14560
14561static int
14562looking_at_eol_p(struct parser_params *p)
14563{
14564 const char *ptr = p->lex.pcur;
14565 while (ptr < p->lex.pend) {
14566 int c = (unsigned char)*ptr++;
14567 int eol = (c == '\n' || c == '#');
14568 if (eol || !ISSPACE(c)) {
14569 return eol;
14570 }
14571 }
14572 return TRUE;
14573}
14574
14575static char*
14576newtok(struct parser_params *p)
14577{
14578 p->tokidx = 0;
14579 p->tokline = p->ruby_sourceline;
14580 if (!p->tokenbuf) {
14581 p->toksiz = 60;
14582 p->tokenbuf = ALLOC_N(char, 60);
14583 }
14584 if (p->toksiz > 4096) {
14585 p->toksiz = 60;
14586 REALLOC_N(p->tokenbuf, char, 60);
14587 }
14588 return p->tokenbuf;
14589}
14590
14591static char *
14592tokspace(struct parser_params *p, int n)
14593{
14594 p->tokidx += n;
14595
14596 if (p->tokidx >= p->toksiz) {
14597 do {p->toksiz *= 2;} while (p->toksiz < p->tokidx);
14598 REALLOC_N(p->tokenbuf, char, p->toksiz);
14599 }
14600 return &p->tokenbuf[p->tokidx-n];
14601}
14602
14603static void
14604tokadd(struct parser_params *p, int c)
14605{
14606 p->tokenbuf[p->tokidx++] = (char)c;
14607 if (p->tokidx >= p->toksiz) {
14608 p->toksiz *= 2;
14609 REALLOC_N(p->tokenbuf, char, p->toksiz);
14610 }
14611}
14612
14613static int
14614tok_hex(struct parser_params *p, size_t *numlen)
14615{
14616 int c;
14617
14618 c = scan_hex(p->lex.pcur, 2, numlen);
14619 if (!*numlen) {
14620 yyerror0("invalid hex escape");
14621 token_flush(p);
14622 return 0;
14623 }
14624 p->lex.pcur += *numlen;
14625 return c;
14626}
14627
14628#define tokcopy(p, n) memcpy(tokspace(p, n), (p)->lex.pcur - (n), (n))
14629
14630static int
14631escaped_control_code(int c)
14632{
14633 int c2 = 0;
14634 switch (c) {
14635 case ' ':
14636 c2 = 's';
14637 break;
14638 case '\n':
14639 c2 = 'n';
14640 break;
14641 case '\t':
14642 c2 = 't';
14643 break;
14644 case '\v':
14645 c2 = 'v';
14646 break;
14647 case '\r':
14648 c2 = 'r';
14649 break;
14650 case '\f':
14651 c2 = 'f';
14652 break;
14653 }
14654 return c2;
14655}
14656
14657#define WARN_SPACE_CHAR(c, prefix) \
14658 rb_warn1("invalid character syntax; use "prefix"\\%c", WARN_I(c2))
14659
14660static int
14661tokadd_codepoint(struct parser_params *p, rb_encoding **encp,
14662 int regexp_literal, int wide)
14663{
14664 size_t numlen;
14665 int codepoint = scan_hex(p->lex.pcur, wide ? p->lex.pend - p->lex.pcur : 4, &numlen);
14666 literal_flush(p, p->lex.pcur);
14667 p->lex.pcur += numlen;
14668 if (wide ? (numlen == 0 || numlen > 6) : (numlen < 4)) {
14669 yyerror0("invalid Unicode escape");
14670 return wide && numlen > 0;
14671 }
14672 if (codepoint > 0x10ffff) {
14673 yyerror0("invalid Unicode codepoint (too large)");
14674 return wide;
14675 }
14676 if ((codepoint & 0xfffff800) == 0xd800) {
14677 yyerror0("invalid Unicode codepoint");
14678 return wide;
14679 }
14680 if (regexp_literal) {
14681 tokcopy(p, (int)numlen);
14682 }
14683 else if (codepoint >= 0x80) {
14684 rb_encoding *utf8 = rb_utf8_encoding();
14685 if (*encp && utf8 != *encp) {
14686 YYLTYPE loc = RUBY_INIT_YYLLOC();
14687 compile_error(p, "UTF-8 mixed within %s source", rb_enc_name(*encp));
14688 parser_show_error_line(p, &loc);
14689 return wide;
14690 }
14691 *encp = utf8;
14692 tokaddmbc(p, codepoint, *encp);
14693 }
14694 else {
14695 tokadd(p, codepoint);
14696 }
14697 return TRUE;
14698}
14699
14700/* return value is for ?\u3042 */
14701static void
14702tokadd_utf8(struct parser_params *p, rb_encoding **encp,
14703 int term, int symbol_literal, int regexp_literal)
14704{
14705 /*
14706 * If `term` is not -1, then we allow multiple codepoints in \u{}
14707 * upto `term` byte, otherwise we're parsing a character literal.
14708 * And then add the codepoints to the current token.
14709 */
14710 static const char multiple_codepoints[] = "Multiple codepoints at single character literal";
14711
14712 const int open_brace = '{', close_brace = '}';
14713
14714 if (regexp_literal) { tokadd(p, '\\'); tokadd(p, 'u'); }
14715
14716 if (peek(p, open_brace)) { /* handle \u{...} form */
14717 const char *second = NULL;
14718 int c, last = nextc(p);
14719 if (p->lex.pcur >= p->lex.pend) goto unterminated;
14720 while (ISSPACE(c = *p->lex.pcur) && ++p->lex.pcur < p->lex.pend);
14721 while (c != close_brace) {
14722 if (c == term) goto unterminated;
14723 if (second == multiple_codepoints)
14724 second = p->lex.pcur;
14725 if (regexp_literal) tokadd(p, last);
14726 if (!tokadd_codepoint(p, encp, regexp_literal, TRUE)) {
14727 break;
14728 }
14729 while (ISSPACE(c = *p->lex.pcur)) {
14730 if (++p->lex.pcur >= p->lex.pend) goto unterminated;
14731 last = c;
14732 }
14733 if (term == -1 && !second)
14734 second = multiple_codepoints;
14735 }
14736
14737 if (c != close_brace) {
14738 unterminated:
14739 token_flush(p);
14740 yyerror0("unterminated Unicode escape");
14741 return;
14742 }
14743 if (second && second != multiple_codepoints) {
14744 const char *pcur = p->lex.pcur;
14745 p->lex.pcur = second;
14746 dispatch_scan_event(p, tSTRING_CONTENT);
14747 token_flush(p);
14748 p->lex.pcur = pcur;
14749 yyerror0(multiple_codepoints);
14750 token_flush(p);
14751 }
14752
14753 if (regexp_literal) tokadd(p, close_brace);
14754 nextc(p);
14755 }
14756 else { /* handle \uxxxx form */
14757 if (!tokadd_codepoint(p, encp, regexp_literal, FALSE)) {
14758 token_flush(p);
14759 return;
14760 }
14761 }
14762}
14763
14764#define ESCAPE_CONTROL 1
14765#define ESCAPE_META 2
14766
14767static int
14768read_escape(struct parser_params *p, int flags, rb_encoding **encp)
14769{
14770 int c;
14771 size_t numlen;
14772
14773 switch (c = nextc(p)) {
14774 case '\\': /* Backslash */
14775 return c;
14776
14777 case 'n': /* newline */
14778 return '\n';
14779
14780 case 't': /* horizontal tab */
14781 return '\t';
14782
14783 case 'r': /* carriage-return */
14784 return '\r';
14785
14786 case 'f': /* form-feed */
14787 return '\f';
14788
14789 case 'v': /* vertical tab */
14790 return '\13';
14791
14792 case 'a': /* alarm(bell) */
14793 return '\007';
14794
14795 case 'e': /* escape */
14796 return 033;
14797
14798 case '0': case '1': case '2': case '3': /* octal constant */
14799 case '4': case '5': case '6': case '7':
14800 pushback(p, c);
14801 c = scan_oct(p->lex.pcur, 3, &numlen);
14802 p->lex.pcur += numlen;
14803 return c;
14804
14805 case 'x': /* hex constant */
14806 c = tok_hex(p, &numlen);
14807 if (numlen == 0) return 0;
14808 return c;
14809
14810 case 'b': /* backspace */
14811 return '\010';
14812
14813 case 's': /* space */
14814 return ' ';
14815
14816 case 'M':
14817 if (flags & ESCAPE_META) goto eof;
14818 if ((c = nextc(p)) != '-') {
14819 goto eof;
14820 }
14821 if ((c = nextc(p)) == '\\') {
14822 switch (peekc(p)) {
14823 case 'u': case 'U':
14824 nextc(p);
14825 goto eof;
14826 }
14827 return read_escape(p, flags|ESCAPE_META, encp) | 0x80;
14828 }
14829 else if (c == -1 || !ISASCII(c)) goto eof;
14830 else {
14831 int c2 = escaped_control_code(c);
14832 if (c2) {
14833 if (ISCNTRL(c) || !(flags & ESCAPE_CONTROL)) {
14834 WARN_SPACE_CHAR(c2, "\\M-");
14835 }
14836 else {
14837 WARN_SPACE_CHAR(c2, "\\C-\\M-");
14838 }
14839 }
14840 else if (ISCNTRL(c)) goto eof;
14841 return ((c & 0xff) | 0x80);
14842 }
14843
14844 case 'C':
14845 if ((c = nextc(p)) != '-') {
14846 goto eof;
14847 }
14848 case 'c':
14849 if (flags & ESCAPE_CONTROL) goto eof;
14850 if ((c = nextc(p))== '\\') {
14851 switch (peekc(p)) {
14852 case 'u': case 'U':
14853 nextc(p);
14854 goto eof;
14855 }
14856 c = read_escape(p, flags|ESCAPE_CONTROL, encp);
14857 }
14858 else if (c == '?')
14859 return 0177;
14860 else if (c == -1 || !ISASCII(c)) goto eof;
14861 else {
14862 int c2 = escaped_control_code(c);
14863 if (c2) {
14864 if (ISCNTRL(c)) {
14865 if (flags & ESCAPE_META) {
14866 WARN_SPACE_CHAR(c2, "\\M-");
14867 }
14868 else {
14869 WARN_SPACE_CHAR(c2, "");
14870 }
14871 }
14872 else {
14873 if (flags & ESCAPE_META) {
14874 WARN_SPACE_CHAR(c2, "\\M-\\C-");
14875 }
14876 else {
14877 WARN_SPACE_CHAR(c2, "\\C-");
14878 }
14879 }
14880 }
14881 else if (ISCNTRL(c)) goto eof;
14882 }
14883 return c & 0x9f;
14884
14885 eof:
14886 case -1:
14887 yyerror0("Invalid escape character syntax");
14888 token_flush(p);
14889 return '\0';
14890
14891 default:
14892 return c;
14893 }
14894}
14895
14896static void
14897tokaddmbc(struct parser_params *p, int c, rb_encoding *enc)
14898{
14899 int len = rb_enc_codelen(c, enc);
14900 rb_enc_mbcput(c, tokspace(p, len), enc);
14901}
14902
14903static int
14904tokadd_escape(struct parser_params *p, rb_encoding **encp)
14905{
14906 int c;
14907 size_t numlen;
14908
14909 switch (c = nextc(p)) {
14910 case '\n':
14911 return 0; /* just ignore */
14912
14913 case '0': case '1': case '2': case '3': /* octal constant */
14914 case '4': case '5': case '6': case '7':
14915 {
14916 ruby_scan_oct(--p->lex.pcur, 3, &numlen);
14917 if (numlen == 0) goto eof;
14918 p->lex.pcur += numlen;
14919 tokcopy(p, (int)numlen + 1);
14920 }
14921 return 0;
14922
14923 case 'x': /* hex constant */
14924 {
14925 tok_hex(p, &numlen);
14926 if (numlen == 0) return -1;
14927 tokcopy(p, (int)numlen + 2);
14928 }
14929 return 0;
14930
14931 eof:
14932 case -1:
14933 yyerror0("Invalid escape character syntax");
14934 token_flush(p);
14935 return -1;
14936
14937 default:
14938 tokadd(p, '\\');
14939 tokadd(p, c);
14940 }
14941 return 0;
14942}
14943
14944static int
14945regx_options(struct parser_params *p)
14946{
14947 int kcode = 0;
14948 int kopt = 0;
14949 int options = 0;
14950 int c, opt, kc;
14951
14952 newtok(p);
14953 while (c = nextc(p), ISALPHA(c)) {
14954 if (c == 'o') {
14955 options |= RE_OPTION_ONCE;
14956 }
14957 else if (rb_char_to_option_kcode(c, &opt, &kc)) {
14958 if (kc >= 0) {
14959 if (kc != rb_ascii8bit_encindex()) kcode = c;
14960 kopt = opt;
14961 }
14962 else {
14963 options |= opt;
14964 }
14965 }
14966 else {
14967 tokadd(p, c);
14968 }
14969 }
14970 options |= kopt;
14971 pushback(p, c);
14972 if (toklen(p)) {
14973 YYLTYPE loc = RUBY_INIT_YYLLOC();
14974 tokfix(p);
14975 compile_error(p, "unknown regexp option%s - %*s",
14976 toklen(p) > 1 ? "s" : "", toklen(p), tok(p));
14977 parser_show_error_line(p, &loc);
14978 }
14979 return options | RE_OPTION_ENCODING(kcode);
14980}
14981
14982static int
14983tokadd_mbchar(struct parser_params *p, int c)
14984{
14985 int len = parser_precise_mbclen(p, p->lex.pcur-1);
14986 if (len < 0) return -1;
14987 tokadd(p, c);
14988 p->lex.pcur += --len;
14989 if (len > 0) tokcopy(p, len);
14990 return c;
14991}
14992
14993static inline int
14994simple_re_meta(int c)
14995{
14996 switch (c) {
14997 case '$': case '*': case '+': case '.':
14998 case '?': case '^': case '|':
14999 case ')': case ']': case '}': case '>':
15000 return TRUE;
15001 default:
15002 return FALSE;
15003 }
15004}
15005
15006static int
15007parser_update_heredoc_indent(struct parser_params *p, int c)
15008{
15009 if (p->heredoc_line_indent == -1) {
15010 if (c == '\n') p->heredoc_line_indent = 0;
15011 }
15012 else {
15013 if (c == ' ') {
15014 p->heredoc_line_indent++;
15015 return TRUE;
15016 }
15017 else if (c == '\t') {
15018 int w = (p->heredoc_line_indent / TAB_WIDTH) + 1;
15019 p->heredoc_line_indent = w * TAB_WIDTH;
15020 return TRUE;
15021 }
15022 else if (c != '\n') {
15023 if (p->heredoc_indent > p->heredoc_line_indent) {
15024 p->heredoc_indent = p->heredoc_line_indent;
15025 }
15026 p->heredoc_line_indent = -1;
15027 }
15028 }
15029 return FALSE;
15030}
15031
15032static void
15033parser_mixed_error(struct parser_params *p, rb_encoding *enc1, rb_encoding *enc2)
15034{
15035 YYLTYPE loc = RUBY_INIT_YYLLOC();
15036 const char *n1 = rb_enc_name(enc1), *n2 = rb_enc_name(enc2);
15037 compile_error(p, "%s mixed within %s source", n1, n2);
15038 parser_show_error_line(p, &loc);
15039}
15040
15041static void
15042parser_mixed_escape(struct parser_params *p, const char *beg, rb_encoding *enc1, rb_encoding *enc2)
15043{
15044 const char *pos = p->lex.pcur;
15045 p->lex.pcur = beg;
15046 parser_mixed_error(p, enc1, enc2);
15047 p->lex.pcur = pos;
15048}
15049
15050static int
15051tokadd_string(struct parser_params *p,
15052 int func, int term, int paren, long *nest,
15053 rb_encoding **encp, rb_encoding **enc)
15054{
15055 int c;
15056 bool erred = false;
15057
15058#define mixed_error(enc1, enc2) \
15059 (void)(erred || (parser_mixed_error(p, enc1, enc2), erred = true))
15060#define mixed_escape(beg, enc1, enc2) \
15061 (void)(erred || (parser_mixed_escape(p, beg, enc1, enc2), erred = true))
15062
15063 while ((c = nextc(p)) != -1) {
15064 if (p->heredoc_indent > 0) {
15065 parser_update_heredoc_indent(p, c);
15066 }
15067
15068 if (paren && c == paren) {
15069 ++*nest;
15070 }
15071 else if (c == term) {
15072 if (!nest || !*nest) {
15073 pushback(p, c);
15074 break;
15075 }
15076 --*nest;
15077 }
15078 else if ((func & STR_FUNC_EXPAND) && c == '#' && p->lex.pcur < p->lex.pend) {
15079 int c2 = *p->lex.pcur;
15080 if (c2 == '$' || c2 == '@' || c2 == '{') {
15081 pushback(p, c);
15082 break;
15083 }
15084 }
15085 else if (c == '\\') {
15086 literal_flush(p, p->lex.pcur - 1);
15087 c = nextc(p);
15088 switch (c) {
15089 case '\n':
15090 if (func & STR_FUNC_QWORDS) break;
15091 if (func & STR_FUNC_EXPAND) {
15092 if (!(func & STR_FUNC_INDENT) || (p->heredoc_indent < 0))
15093 continue;
15094 if (c == term) {
15095 c = '\\';
15096 goto terminate;
15097 }
15098 }
15099 tokadd(p, '\\');
15100 break;
15101
15102 case '\\':
15103 if (func & STR_FUNC_ESCAPE) tokadd(p, c);
15104 break;
15105
15106 case 'u':
15107 if ((func & STR_FUNC_EXPAND) == 0) {
15108 tokadd(p, '\\');
15109 break;
15110 }
15111 tokadd_utf8(p, enc, term,
15112 func & STR_FUNC_SYMBOL,
15113 func & STR_FUNC_REGEXP);
15114 continue;
15115
15116 default:
15117 if (c == -1) return -1;
15118 if (!ISASCII(c)) {
15119 if ((func & STR_FUNC_EXPAND) == 0) tokadd(p, '\\');
15120 goto non_ascii;
15121 }
15122 if (func & STR_FUNC_REGEXP) {
15123 switch (c) {
15124 case 'c':
15125 case 'C':
15126 case 'M': {
15127 pushback(p, c);
15128 c = read_escape(p, 0, enc);
15129
15130 int i;
15131 char escbuf[5];
15132 snprintf(escbuf, sizeof(escbuf), "\\x%02X", c);
15133 for (i = 0; i < 4; i++) {
15134 tokadd(p, escbuf[i]);
15135 }
15136 continue;
15137 }
15138 }
15139
15140 if (c == term && !simple_re_meta(c)) {
15141 tokadd(p, c);
15142 continue;
15143 }
15144 pushback(p, c);
15145 if ((c = tokadd_escape(p, enc)) < 0)
15146 return -1;
15147 if (*enc && *enc != *encp) {
15148 mixed_escape(p->lex.ptok+2, *enc, *encp);
15149 }
15150 continue;
15151 }
15152 else if (func & STR_FUNC_EXPAND) {
15153 pushback(p, c);
15154 if (func & STR_FUNC_ESCAPE) tokadd(p, '\\');
15155 c = read_escape(p, 0, enc);
15156 }
15157 else if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) {
15158 /* ignore backslashed spaces in %w */
15159 }
15160 else if (c != term && !(paren && c == paren)) {
15161 tokadd(p, '\\');
15162 pushback(p, c);
15163 continue;
15164 }
15165 }
15166 }
15167 else if (!parser_isascii(p)) {
15168 non_ascii:
15169 if (!*enc) {
15170 *enc = *encp;
15171 }
15172 else if (*enc != *encp) {
15173 mixed_error(*enc, *encp);
15174 continue;
15175 }
15176 if (tokadd_mbchar(p, c) == -1) return -1;
15177 continue;
15178 }
15179 else if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) {
15180 pushback(p, c);
15181 break;
15182 }
15183 if (c & 0x80) {
15184 if (!*enc) {
15185 *enc = *encp;
15186 }
15187 else if (*enc != *encp) {
15188 mixed_error(*enc, *encp);
15189 continue;
15190 }
15191 }
15192 tokadd(p, c);
15193 }
15194 terminate:
15195 if (*enc) *encp = *enc;
15196 return c;
15197}
15198
15199static inline rb_strterm_t *
15200new_strterm(VALUE v1, VALUE v2, VALUE v3, VALUE v0)
15201{
15202 return (rb_strterm_t*)rb_imemo_new(imemo_parser_strterm, v1, v2, v3, v0);
15203}
15204
15205/* imemo_parser_strterm for literal */
15206#define NEW_STRTERM(func, term, paren) \
15207 new_strterm((VALUE)(func), (VALUE)(paren), (VALUE)(term), 0)
15208
15209#ifdef RIPPER
15210static void
15211flush_string_content(struct parser_params *p, rb_encoding *enc)
15212{
15213 VALUE content = yylval.val;
15214 if (!ripper_is_node_yylval(content))
15215 content = ripper_new_yylval(p, 0, 0, content);
15216 if (has_delayed_token(p)) {
15217 ptrdiff_t len = p->lex.pcur - p->lex.ptok;
15218 if (len > 0) {
15219 rb_enc_str_buf_cat(p->delayed.token, p->lex.ptok, len, enc);
15220 }
15221 dispatch_delayed_token(p, tSTRING_CONTENT);
15222 p->lex.ptok = p->lex.pcur;
15223 RNODE(content)->nd_rval = yylval.val;
15224 }
15225 dispatch_scan_event(p, tSTRING_CONTENT);
15226 if (yylval.val != content)
15227 RNODE(content)->nd_rval = yylval.val;
15228 yylval.val = content;
15229}
15230#else
15231#define flush_string_content(p, enc) ((void)(enc))
15232#endif
15233
15234RUBY_FUNC_EXPORTED const unsigned int ruby_global_name_punct_bits[(0x7e - 0x20 + 31) / 32];
15235/* this can be shared with ripper, since it's independent from struct
15236 * parser_params. */
15237#ifndef RIPPER
15238#define BIT(c, idx) (((c) / 32 - 1 == idx) ? (1U << ((c) % 32)) : 0)
15239#define SPECIAL_PUNCT(idx) ( \
15240 BIT('~', idx) | BIT('*', idx) | BIT('$', idx) | BIT('?', idx) | \
15241 BIT('!', idx) | BIT('@', idx) | BIT('/', idx) | BIT('\\', idx) | \
15242 BIT(';', idx) | BIT(',', idx) | BIT('.', idx) | BIT('=', idx) | \
15243 BIT(':', idx) | BIT('<', idx) | BIT('>', idx) | BIT('\"', idx) | \
15244 BIT('&', idx) | BIT('`', idx) | BIT('\'', idx) | BIT('+', idx) | \
15245 BIT('0', idx))
15246const unsigned int ruby_global_name_punct_bits[] = {
15247 SPECIAL_PUNCT(0),
15248 SPECIAL_PUNCT(1),
15249 SPECIAL_PUNCT(2),
15250};
15251#undef BIT
15252#undef SPECIAL_PUNCT
15253#endif
15254
15255static enum yytokentype
15256parser_peek_variable_name(struct parser_params *p)
15257{
15258 int c;
15259 const char *ptr = p->lex.pcur;
15260
15261 if (ptr + 1 >= p->lex.pend) return 0;
15262 c = *ptr++;
15263 switch (c) {
15264 case '$':
15265 if ((c = *ptr) == '-') {
15266 if (++ptr >= p->lex.pend) return 0;
15267 c = *ptr;
15268 }
15269 else if (is_global_name_punct(c) || ISDIGIT(c)) {
15270 return tSTRING_DVAR;
15271 }
15272 break;
15273 case '@':
15274 if ((c = *ptr) == '@') {
15275 if (++ptr >= p->lex.pend) return 0;
15276 c = *ptr;
15277 }
15278 break;
15279 case '{':
15280 p->lex.pcur = ptr;
15281 p->command_start = TRUE;
15282 return tSTRING_DBEG;
15283 default:
15284 return 0;
15285 }
15286 if (!ISASCII(c) || c == '_' || ISALPHA(c))
15287 return tSTRING_DVAR;
15288 return 0;
15289}
15290
15291#define IS_ARG() IS_lex_state(EXPR_ARG_ANY)
15292#define IS_END() IS_lex_state(EXPR_END_ANY)
15293#define IS_BEG() (IS_lex_state(EXPR_BEG_ANY) || IS_lex_state_all(EXPR_ARG|EXPR_LABELED))
15294#define IS_SPCARG(c) (IS_ARG() && space_seen && !ISSPACE(c))
15295#define IS_LABEL_POSSIBLE() (\
15296 (IS_lex_state(EXPR_LABEL|EXPR_ENDFN) && !cmd_state) || \
15297 IS_ARG())
15298#define IS_LABEL_SUFFIX(n) (peek_n(p, ':',(n)) && !peek_n(p, ':', (n)+1))
15299#define IS_AFTER_OPERATOR() IS_lex_state(EXPR_FNAME | EXPR_DOT)
15300
15301static inline enum yytokentype
15302parser_string_term(struct parser_params *p, int func)
15303{
15304 p->lex.strterm = 0;
15305 if (func & STR_FUNC_REGEXP) {
15306 set_yylval_num(regx_options(p));
15307 dispatch_scan_event(p, tREGEXP_END);
15308 SET_LEX_STATE(EXPR_END);
15309 return tREGEXP_END;
15310 }
15311 if ((func & STR_FUNC_LABEL) && IS_LABEL_SUFFIX(0)) {
15312 nextc(p);
15313 SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
15314 return tLABEL_END;
15315 }
15316 SET_LEX_STATE(EXPR_END);
15317 return tSTRING_END;
15318}
15319
15320static enum yytokentype
15321parse_string(struct parser_params *p, rb_strterm_literal_t *quote)
15322{
15323 int func = (int)quote->u1.func;
15324 int term = (int)quote->u3.term;
15325 int paren = (int)quote->u2.paren;
15326 int c, space = 0;
15327 rb_encoding *enc = p->enc;
15328 rb_encoding *base_enc = 0;
15329 VALUE lit;
15330
15331 if (func & STR_FUNC_TERM) {
15332 if (func & STR_FUNC_QWORDS) nextc(p); /* delayed term */
15333 SET_LEX_STATE(EXPR_END);
15334 p->lex.strterm = 0;
15335 return func & STR_FUNC_REGEXP ? tREGEXP_END : tSTRING_END;
15336 }
15337 c = nextc(p);
15338 if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) {
15339 do {c = nextc(p);} while (ISSPACE(c));
15340 space = 1;
15341 }
15342 if (func & STR_FUNC_LIST) {
15343 quote->u1.func &= ~STR_FUNC_LIST;
15344 space = 1;
15345 }
15346 if (c == term && !quote->u0.nest) {
15347 if (func & STR_FUNC_QWORDS) {
15348 quote->u1.func |= STR_FUNC_TERM;
15349 pushback(p, c); /* dispatch the term at tSTRING_END */
15350 add_delayed_token(p, p->lex.ptok, p->lex.pcur);
15351 return ' ';
15352 }
15353 return parser_string_term(p, func);
15354 }
15355 if (space) {
15356 pushback(p, c);
15357 add_delayed_token(p, p->lex.ptok, p->lex.pcur);
15358 return ' ';
15359 }
15360 newtok(p);
15361 if ((func & STR_FUNC_EXPAND) && c == '#') {
15362 int t = parser_peek_variable_name(p);
15363 if (t) return t;
15364 tokadd(p, '#');
15365 c = nextc(p);
15366 }
15367 pushback(p, c);
15368 if (tokadd_string(p, func, term, paren, &quote->u0.nest,
15369 &enc, &base_enc) == -1) {
15370 if (p->eofp) {
15371#ifndef RIPPER
15372# define unterminated_literal(mesg) yyerror0(mesg)
15373#else
15374# define unterminated_literal(mesg) compile_error(p, mesg)
15375#endif
15376 literal_flush(p, p->lex.pcur);
15377 if (func & STR_FUNC_QWORDS) {
15378 /* no content to add, bailing out here */
15379 unterminated_literal("unterminated list meets end of file");
15380 p->lex.strterm = 0;
15381 return tSTRING_END;
15382 }
15383 if (func & STR_FUNC_REGEXP) {
15384 unterminated_literal("unterminated regexp meets end of file");
15385 }
15386 else {
15387 unterminated_literal("unterminated string meets end of file");
15388 }
15389 quote->u1.func |= STR_FUNC_TERM;
15390 }
15391 }
15392
15393 tokfix(p);
15394 lit = STR_NEW3(tok(p), toklen(p), enc, func);
15395 set_yylval_str(lit);
15396 flush_string_content(p, enc);
15397
15398 return tSTRING_CONTENT;
15399}
15400
15401static enum yytokentype
15402heredoc_identifier(struct parser_params *p)
15403{
15404 /*
15405 * term_len is length of `<<"END"` except `END`,
15406 * in this case term_len is 4 (<, <, " and ").
15407 */
15408 long len, offset = p->lex.pcur - p->lex.pbeg;
15409 int c = nextc(p), term, func = 0, quote = 0;
15410 enum yytokentype token = tSTRING_BEG;
15411 int indent = 0;
15412
15413 if (c == '-') {
15414 c = nextc(p);
15415 func = STR_FUNC_INDENT;
15416 offset++;
15417 }
15418 else if (c == '~') {
15419 c = nextc(p);
15420 func = STR_FUNC_INDENT;
15421 offset++;
15422 indent = INT_MAX;
15423 }
15424 switch (c) {
15425 case '\'':
15426 func |= str_squote; goto quoted;
15427 case '"':
15428 func |= str_dquote; goto quoted;
15429 case '`':
15430 token = tXSTRING_BEG;
15431 func |= str_xquote; goto quoted;
15432
15433 quoted:
15434 quote++;
15435 offset++;
15436 term = c;
15437 len = 0;
15438 while ((c = nextc(p)) != term) {
15439 if (c == -1 || c == '\r' || c == '\n') {
15440 yyerror0("unterminated here document identifier");
15441 return -1;
15442 }
15443 }
15444 break;
15445
15446 default:
15447 if (!parser_is_identchar(p)) {
15448 pushback(p, c);
15449 if (func & STR_FUNC_INDENT) {
15450 pushback(p, indent > 0 ? '~' : '-');
15451 }
15452 return 0;
15453 }
15454 func |= str_dquote;
15455 do {
15456 int n = parser_precise_mbclen(p, p->lex.pcur-1);
15457 if (n < 0) return 0;
15458 p->lex.pcur += --n;
15459 } while ((c = nextc(p)) != -1 && parser_is_identchar(p));
15460 pushback(p, c);
15461 break;
15462 }
15463
15464 len = p->lex.pcur - (p->lex.pbeg + offset) - quote;
15465 if ((unsigned long)len >= HERETERM_LENGTH_MAX)
15466 yyerror0("too long here document identifier");
15467 dispatch_scan_event(p, tHEREDOC_BEG);
15468 lex_goto_eol(p);
15469
15470 p->lex.strterm = new_strterm(0, 0, 0, p->lex.lastline);
15471 p->lex.strterm->flags |= STRTERM_HEREDOC;
15472 rb_strterm_heredoc_t *here = &p->lex.strterm->u.heredoc;
15473 here->offset = offset;
15474 here->sourceline = p->ruby_sourceline;
15475 here->length = (int)len;
15476 here->quote = quote;
15477 here->func = func;
15478
15479 token_flush(p);
15480 p->heredoc_indent = indent;
15481 p->heredoc_line_indent = 0;
15482 return token;
15483}
15484
15485static void
15486heredoc_restore(struct parser_params *p, rb_strterm_heredoc_t *here)
15487{
15488 VALUE line;
15489
15490 p->lex.strterm = 0;
15491 line = here->lastline;
15492 p->lex.lastline = line;
15493 p->lex.pbeg = RSTRING_PTR(line);
15494 p->lex.pend = p->lex.pbeg + RSTRING_LEN(line);
15495 p->lex.pcur = p->lex.pbeg + here->offset + here->length + here->quote;
15496 p->lex.ptok = p->lex.pbeg + here->offset - here->quote;
15497 p->heredoc_end = p->ruby_sourceline;
15498 p->ruby_sourceline = (int)here->sourceline;
15499 if (p->eofp) p->lex.nextline = Qnil;
15500 p->eofp = 0;
15501}
15502
15503static int
15504dedent_string(VALUE string, int width)
15505{
15506 char *str;
15507 long len;
15508 int i, col = 0;
15509
15510 RSTRING_GETMEM(string, str, len);
15511 for (i = 0; i < len && col < width; i++) {
15512 if (str[i] == ' ') {
15513 col++;
15514 }
15515 else if (str[i] == '\t') {
15516 int n = TAB_WIDTH * (col / TAB_WIDTH + 1);
15517 if (n > width) break;
15518 col = n;
15519 }
15520 else {
15521 break;
15522 }
15523 }
15524 if (!i) return 0;
15525 rb_str_modify(string);
15526 str = RSTRING_PTR(string);
15527 if (RSTRING_LEN(string) != len)
15528 rb_fatal("literal string changed: %+"PRIsVALUE, string);
15529 MEMMOVE(str, str + i, char, len - i);
15530 rb_str_set_len(string, len - i);
15531 return i;
15532}
15533
15534#ifndef RIPPER
15535static NODE *
15536heredoc_dedent(struct parser_params *p, NODE *root)
15537{
15538 NODE *node, *str_node, *prev_node;
15539 int indent = p->heredoc_indent;
15540 VALUE prev_lit = 0;
15541
15542 if (indent <= 0) return root;
15543 p->heredoc_indent = 0;
15544 if (!root) return root;
15545
15546 prev_node = node = str_node = root;
15547 if (nd_type_p(root, NODE_LIST)) str_node = root->nd_head;
15548
15549 while (str_node) {
15550 VALUE lit = str_node->nd_lit;
15551 if (str_node->flags & NODE_FL_NEWLINE) {
15552 dedent_string(lit, indent);
15553 }
15554 if (!prev_lit) {
15555 prev_lit = lit;
15556 }
15557 else if (!literal_concat0(p, prev_lit, lit)) {
15558 return 0;
15559 }
15560 else {
15561 NODE *end = node->nd_end;
15562 node = prev_node->nd_next = node->nd_next;
15563 if (!node) {
15564 if (nd_type_p(prev_node, NODE_DSTR))
15565 nd_set_type(prev_node, NODE_STR);
15566 break;
15567 }
15568 node->nd_end = end;
15569 goto next_str;
15570 }
15571
15572 str_node = 0;
15573 while ((node = (prev_node = node)->nd_next) != 0) {
15574 next_str:
15575 if (!nd_type_p(node, NODE_LIST)) break;
15576 if ((str_node = node->nd_head) != 0) {
15577 enum node_type type = nd_type(str_node);
15578 if (type == NODE_STR || type == NODE_DSTR) break;
15579 prev_lit = 0;
15580 str_node = 0;
15581 }
15582 }
15583 }
15584 return root;
15585}
15586#else /* RIPPER */
15587static VALUE
15588heredoc_dedent(struct parser_params *p, VALUE array)
15589{
15590 int indent = p->heredoc_indent;
15591
15592 if (indent <= 0) return array;
15593 p->heredoc_indent = 0;
15594 dispatch2(heredoc_dedent, array, INT2NUM(indent));
15595 return array;
15596}
15597
15598/*
15599 * call-seq:
15600 * Ripper.dedent_string(input, width) -> Integer
15601 *
15602 * USE OF RIPPER LIBRARY ONLY.
15603 *
15604 * Strips up to +width+ leading whitespaces from +input+,
15605 * and returns the stripped column width.
15606 */
15607static VALUE
15608parser_dedent_string(VALUE self, VALUE input, VALUE width)
15609{
15610 int wid, col;
15611
15612 StringValue(input);
15613 wid = NUM2UINT(width);
15614 col = dedent_string(input, wid);
15615 return INT2NUM(col);
15616}
15617#endif
15618
15619static int
15620whole_match_p(struct parser_params *p, const char *eos, long len, int indent)
15621{
15622 const char *ptr = p->lex.pbeg;
15623 long n;
15624
15625 if (indent) {
15626 while (*ptr && ISSPACE(*ptr)) ptr++;
15627 }
15628 n = p->lex.pend - (ptr + len);
15629 if (n < 0) return FALSE;
15630 if (n > 0 && ptr[len] != '\n') {
15631 if (ptr[len] != '\r') return FALSE;
15632 if (n <= 1 || ptr[len+1] != '\n') return FALSE;
15633 }
15634 return strncmp(eos, ptr, len) == 0;
15635}
15636
15637static int
15638word_match_p(struct parser_params *p, const char *word, long len)
15639{
15640 if (strncmp(p->lex.pcur, word, len)) return 0;
15641 if (p->lex.pcur + len == p->lex.pend) return 1;
15642 int c = (unsigned char)p->lex.pcur[len];
15643 if (ISSPACE(c)) return 1;
15644 switch (c) {
15645 case '\0': case '\004': case '\032': return 1;
15646 }
15647 return 0;
15648}
15649
15650#define NUM_SUFFIX_R (1<<0)
15651#define NUM_SUFFIX_I (1<<1)
15652#define NUM_SUFFIX_ALL 3
15653
15654static int
15655number_literal_suffix(struct parser_params *p, int mask)
15656{
15657 int c, result = 0;
15658 const char *lastp = p->lex.pcur;
15659
15660 while ((c = nextc(p)) != -1) {
15661 if ((mask & NUM_SUFFIX_I) && c == 'i') {
15662 result |= (mask & NUM_SUFFIX_I);
15663 mask &= ~NUM_SUFFIX_I;
15664 /* r after i, rational of complex is disallowed */
15665 mask &= ~NUM_SUFFIX_R;
15666 continue;
15667 }
15668 if ((mask & NUM_SUFFIX_R) && c == 'r') {
15669 result |= (mask & NUM_SUFFIX_R);
15670 mask &= ~NUM_SUFFIX_R;
15671 continue;
15672 }
15673 if (!ISASCII(c) || ISALPHA(c) || c == '_') {
15674 p->lex.pcur = lastp;
15675 literal_flush(p, p->lex.pcur);
15676 return 0;
15677 }
15678 pushback(p, c);
15679 break;
15680 }
15681 return result;
15682}
15683
15684static enum yytokentype
15685set_number_literal(struct parser_params *p, VALUE v,
15686 enum yytokentype type, int suffix)
15687{
15688 if (suffix & NUM_SUFFIX_I) {
15689 v = rb_complex_raw(INT2FIX(0), v);
15690 type = tIMAGINARY;
15691 }
15692 set_yylval_literal(v);
15693 SET_LEX_STATE(EXPR_END);
15694 return type;
15695}
15696
15697static enum yytokentype
15698set_integer_literal(struct parser_params *p, VALUE v, int suffix)
15699{
15700 enum yytokentype type = tINTEGER;
15701 if (suffix & NUM_SUFFIX_R) {
15702 v = rb_rational_raw1(v);
15703 type = tRATIONAL;
15704 }
15705 return set_number_literal(p, v, type, suffix);
15706}
15707
15708#ifdef RIPPER
15709static void
15710dispatch_heredoc_end(struct parser_params *p)
15711{
15712 VALUE str;
15713 if (has_delayed_token(p))
15714 dispatch_delayed_token(p, tSTRING_CONTENT);
15715 str = STR_NEW(p->lex.ptok, p->lex.pend - p->lex.ptok);
15716 ripper_dispatch1(p, ripper_token2eventid(tHEREDOC_END), str);
15717 lex_goto_eol(p);
15718 token_flush(p);
15719}
15720
15721#else
15722#define dispatch_heredoc_end(p) ((void)0)
15723#endif
15724
15725static enum yytokentype
15726here_document(struct parser_params *p, rb_strterm_heredoc_t *here)
15727{
15728 int c, func, indent = 0;
15729 const char *eos, *ptr, *ptr_end;
15730 long len;
15731 VALUE str = 0;
15732 rb_encoding *enc = p->enc;
15733 rb_encoding *base_enc = 0;
15734 int bol;
15735
15736 eos = RSTRING_PTR(here->lastline) + here->offset;
15737 len = here->length;
15738 indent = (func = here->func) & STR_FUNC_INDENT;
15739
15740 if ((c = nextc(p)) == -1) {
15741 error:
15742#ifdef RIPPER
15743 if (!has_delayed_token(p)) {
15744 dispatch_scan_event(p, tSTRING_CONTENT);
15745 }
15746 else {
15747 if ((len = p->lex.pcur - p->lex.ptok) > 0) {
15748 if (!(func & STR_FUNC_REGEXP) && rb_enc_asciicompat(enc)) {
15749 int cr = ENC_CODERANGE_UNKNOWN;
15750 rb_str_coderange_scan_restartable(p->lex.ptok, p->lex.pcur, enc, &cr);
15751 if (cr != ENC_CODERANGE_7BIT &&
15752 p->enc == rb_usascii_encoding() &&
15753 enc != rb_utf8_encoding()) {
15754 enc = rb_ascii8bit_encoding();
15755 }
15756 }
15757 rb_enc_str_buf_cat(p->delayed.token, p->lex.ptok, len, enc);
15758 }
15759 dispatch_delayed_token(p, tSTRING_CONTENT);
15760 }
15761 lex_goto_eol(p);
15762#endif
15763 heredoc_restore(p, &p->lex.strterm->u.heredoc);
15764 compile_error(p, "can't find string \"%.*s\" anywhere before EOF",
15765 (int)len, eos);
15766 token_flush(p);
15767 p->lex.strterm = 0;
15768 SET_LEX_STATE(EXPR_END);
15769 return tSTRING_END;
15770 }
15771 bol = was_bol(p);
15772 if (!bol) {
15773 /* not beginning of line, cannot be the terminator */
15774 }
15775 else if (p->heredoc_line_indent == -1) {
15776 /* `heredoc_line_indent == -1` means
15777 * - "after an interpolation in the same line", or
15778 * - "in a continuing line"
15779 */
15780 p->heredoc_line_indent = 0;
15781 }
15782 else if (whole_match_p(p, eos, len, indent)) {
15783 dispatch_heredoc_end(p);
15784 restore:
15785 heredoc_restore(p, &p->lex.strterm->u.heredoc);
15786 token_flush(p);
15787 p->lex.strterm = 0;
15788 SET_LEX_STATE(EXPR_END);
15789 return tSTRING_END;
15790 }
15791
15792 if (!(func & STR_FUNC_EXPAND)) {
15793 do {
15794 ptr = RSTRING_PTR(p->lex.lastline);
15795 ptr_end = p->lex.pend;
15796 if (ptr_end > ptr) {
15797 switch (ptr_end[-1]) {
15798 case '\n':
15799 if (--ptr_end == ptr || ptr_end[-1] != '\r') {
15800 ptr_end++;
15801 break;
15802 }
15803 case '\r':
15804 --ptr_end;
15805 }
15806 }
15807
15808 if (p->heredoc_indent > 0) {
15809 long i = 0;
15810 while (ptr + i < ptr_end && parser_update_heredoc_indent(p, ptr[i]))
15811 i++;
15812 p->heredoc_line_indent = 0;
15813 }
15814
15815 if (str)
15816 rb_str_cat(str, ptr, ptr_end - ptr);
15817 else
15818 str = STR_NEW(ptr, ptr_end - ptr);
15819 if (ptr_end < p->lex.pend) rb_str_cat(str, "\n", 1);
15820 lex_goto_eol(p);
15821 if (p->heredoc_indent > 0) {
15822 goto flush_str;
15823 }
15824 if (nextc(p) == -1) {
15825 if (str) {
15826 str = 0;
15827 }
15828 goto error;
15829 }
15830 } while (!whole_match_p(p, eos, len, indent));
15831 }
15832 else {
15833 /* int mb = ENC_CODERANGE_7BIT, *mbp = &mb;*/
15834 newtok(p);
15835 if (c == '#') {
15836 int t = parser_peek_variable_name(p);
15837 if (p->heredoc_line_indent != -1) {
15838 if (p->heredoc_indent > p->heredoc_line_indent) {
15839 p->heredoc_indent = p->heredoc_line_indent;
15840 }
15841 p->heredoc_line_indent = -1;
15842 }
15843 if (t) return t;
15844 tokadd(p, '#');
15845 c = nextc(p);
15846 }
15847 do {
15848 pushback(p, c);
15849 enc = p->enc;
15850 if ((c = tokadd_string(p, func, '\n', 0, NULL, &enc, &base_enc)) == -1) {
15851 if (p->eofp) goto error;
15852 goto restore;
15853 }
15854 if (c != '\n') {
15855 if (c == '\\') p->heredoc_line_indent = -1;
15856 flush:
15857 str = STR_NEW3(tok(p), toklen(p), enc, func);
15858 flush_str:
15859 set_yylval_str(str);
15860#ifndef RIPPER
15861 if (bol) yylval.node->flags |= NODE_FL_NEWLINE;
15862#endif
15863 flush_string_content(p, enc);
15864 return tSTRING_CONTENT;
15865 }
15866 tokadd(p, nextc(p));
15867 if (p->heredoc_indent > 0) {
15868 lex_goto_eol(p);
15869 goto flush;
15870 }
15871 /* if (mbp && mb == ENC_CODERANGE_UNKNOWN) mbp = 0;*/
15872 if ((c = nextc(p)) == -1) goto error;
15873 } while (!whole_match_p(p, eos, len, indent));
15874 str = STR_NEW3(tok(p), toklen(p), enc, func);
15875 }
15876 dispatch_heredoc_end(p);
15877#ifdef RIPPER
15878 str = ripper_new_yylval(p, ripper_token2eventid(tSTRING_CONTENT),
15879 yylval.val, str);
15880#endif
15881 heredoc_restore(p, &p->lex.strterm->u.heredoc);
15882 token_flush(p);
15883 p->lex.strterm = NEW_STRTERM(func | STR_FUNC_TERM, 0, 0);
15884 set_yylval_str(str);
15885#ifndef RIPPER
15886 if (bol) yylval.node->flags |= NODE_FL_NEWLINE;
15887#endif
15888 return tSTRING_CONTENT;
15889}
15890
15891#include "lex.c"
15892
15893static int
15894arg_ambiguous(struct parser_params *p, char c)
15895{
15896#ifndef RIPPER
15897 if (c == '/') {
15898 rb_warning1("ambiguity between regexp and two divisions: wrap regexp in parentheses or add a space after `%c' operator", WARN_I(c));
15899 }
15900 else {
15901 rb_warning1("ambiguous first argument; put parentheses or a space even after `%c' operator", WARN_I(c));
15902 }
15903#else
15904 dispatch1(arg_ambiguous, rb_usascii_str_new(&c, 1));
15905#endif
15906 return TRUE;
15907}
15908
15909static ID
15910#ifndef RIPPER
15911formal_argument(struct parser_params *p, ID lhs)
15912#else
15913formal_argument(struct parser_params *p, VALUE lhs)
15914#endif
15915{
15916 ID id = get_id(lhs);
15917
15918 switch (id_type(id)) {
15919 case ID_LOCAL:
15920 break;
15921#ifndef RIPPER
15922# define ERR(mesg) yyerror0(mesg)
15923#else
15924# define ERR(mesg) (dispatch2(param_error, WARN_S(mesg), lhs), ripper_error(p))
15925#endif
15926 case ID_CONST:
15927 ERR("formal argument cannot be a constant");
15928 return 0;
15929 case ID_INSTANCE:
15930 ERR("formal argument cannot be an instance variable");
15931 return 0;
15932 case ID_GLOBAL:
15933 ERR("formal argument cannot be a global variable");
15934 return 0;
15935 case ID_CLASS:
15936 ERR("formal argument cannot be a class variable");
15937 return 0;
15938 default:
15939 ERR("formal argument must be local variable");
15940 return 0;
15941#undef ERR
15942 }
15943 shadowing_lvar(p, id);
15944 return lhs;
15945}
15946
15947static int
15948lvar_defined(struct parser_params *p, ID id)
15949{
15950 return (dyna_in_block(p) && dvar_defined(p, id)) || local_id(p, id);
15951}
15952
15953/* emacsen -*- hack */
15954static long
15955parser_encode_length(struct parser_params *p, const char *name, long len)
15956{
15957 long nlen;
15958
15959 if (len > 5 && name[nlen = len - 5] == '-') {
15960 if (rb_memcicmp(name + nlen + 1, "unix", 4) == 0)
15961 return nlen;
15962 }
15963 if (len > 4 && name[nlen = len - 4] == '-') {
15964 if (rb_memcicmp(name + nlen + 1, "dos", 3) == 0)
15965 return nlen;
15966 if (rb_memcicmp(name + nlen + 1, "mac", 3) == 0 &&
15967 !(len == 8 && rb_memcicmp(name, "utf8-mac", len) == 0))
15968 /* exclude UTF8-MAC because the encoding named "UTF8" doesn't exist in Ruby */
15969 return nlen;
15970 }
15971 return len;
15972}
15973
15974static void
15975parser_set_encode(struct parser_params *p, const char *name)
15976{
15977 int idx = rb_enc_find_index(name);
15978 rb_encoding *enc;
15979 VALUE excargs[3];
15980
15981 if (idx < 0) {
15982 excargs[1] = rb_sprintf("unknown encoding name: %s", name);
15983 error:
15984 excargs[0] = rb_eArgError;
15985 excargs[2] = rb_make_backtrace();
15986 rb_ary_unshift(excargs[2], rb_sprintf("%"PRIsVALUE":%d", p->ruby_sourcefile_string, p->ruby_sourceline));
15987 rb_exc_raise(rb_make_exception(3, excargs));
15988 }
15989 enc = rb_enc_from_index(idx);
15990 if (!rb_enc_asciicompat(enc)) {
15991 excargs[1] = rb_sprintf("%s is not ASCII compatible", rb_enc_name(enc));
15992 goto error;
15993 }
15994 p->enc = enc;
15995#ifndef RIPPER
15996 if (p->debug_lines) {
15997 VALUE lines = p->debug_lines;
15998 long i, n = RARRAY_LEN(lines);
15999 for (i = 0; i < n; ++i) {
16000 rb_enc_associate_index(RARRAY_AREF(lines, i), idx);
16001 }
16002 }
16003#endif
16004}
16005
16006static int
16007comment_at_top(struct parser_params *p)
16008{
16009 const char *ptr = p->lex.pbeg, *ptr_end = p->lex.pcur - 1;
16010 if (p->line_count != (p->has_shebang ? 2 : 1)) return 0;
16011 while (ptr < ptr_end) {
16012 if (!ISSPACE(*ptr)) return 0;
16013 ptr++;
16014 }
16015 return 1;
16016}
16017
16018typedef long (*rb_magic_comment_length_t)(struct parser_params *p, const char *name, long len);
16019typedef void (*rb_magic_comment_setter_t)(struct parser_params *p, const char *name, const char *val);
16020
16021static int parser_invalid_pragma_value(struct parser_params *p, const char *name, const char *val);
16022
16023static void
16024magic_comment_encoding(struct parser_params *p, const char *name, const char *val)
16025{
16026 if (!comment_at_top(p)) {
16027 return;
16028 }
16029 parser_set_encode(p, val);
16030}
16031
16032static int
16033parser_get_bool(struct parser_params *p, const char *name, const char *val)
16034{
16035 switch (*val) {
16036 case 't': case 'T':
16037 if (STRCASECMP(val, "true") == 0) {
16038 return TRUE;
16039 }
16040 break;
16041 case 'f': case 'F':
16042 if (STRCASECMP(val, "false") == 0) {
16043 return FALSE;
16044 }
16045 break;
16046 }
16047 return parser_invalid_pragma_value(p, name, val);
16048}
16049
16050static int
16051parser_invalid_pragma_value(struct parser_params *p, const char *name, const char *val)
16052{
16053 rb_warning2("invalid value for %s: %s", WARN_S(name), WARN_S(val));
16054 return -1;
16055}
16056
16057static void
16058parser_set_token_info(struct parser_params *p, const char *name, const char *val)
16059{
16060 int b = parser_get_bool(p, name, val);
16061 if (b >= 0) p->token_info_enabled = b;
16062}
16063
16064static void
16065parser_set_compile_option_flag(struct parser_params *p, const char *name, const char *val)
16066{
16067 int b;
16068
16069 if (p->token_seen) {
16070 rb_warning1("`%s' is ignored after any tokens", WARN_S(name));
16071 return;
16072 }
16073
16074 b = parser_get_bool(p, name, val);
16075 if (b < 0) return;
16076
16077 if (!p->compile_option)
16078 p->compile_option = rb_obj_hide(rb_ident_hash_new());
16079 rb_hash_aset(p->compile_option, ID2SYM(rb_intern(name)),
16080 RBOOL(b));
16081}
16082
16083static void
16084parser_set_shareable_constant_value(struct parser_params *p, const char *name, const char *val)
16085{
16086 for (const char *s = p->lex.pbeg, *e = p->lex.pcur; s < e; ++s) {
16087 if (*s == ' ' || *s == '\t') continue;
16088 if (*s == '#') break;
16089 rb_warning1("`%s' is ignored unless in comment-only line", WARN_S(name));
16090 return;
16091 }
16092
16093 switch (*val) {
16094 case 'n': case 'N':
16095 if (STRCASECMP(val, "none") == 0) {
16096 p->ctxt.shareable_constant_value = shareable_none;
16097 return;
16098 }
16099 break;
16100 case 'l': case 'L':
16101 if (STRCASECMP(val, "literal") == 0) {
16102 p->ctxt.shareable_constant_value = shareable_literal;
16103 return;
16104 }
16105 break;
16106 case 'e': case 'E':
16107 if (STRCASECMP(val, "experimental_copy") == 0) {
16108 p->ctxt.shareable_constant_value = shareable_copy;
16109 return;
16110 }
16111 if (STRCASECMP(val, "experimental_everything") == 0) {
16112 p->ctxt.shareable_constant_value = shareable_everything;
16113 return;
16114 }
16115 break;
16116 }
16117 parser_invalid_pragma_value(p, name, val);
16118}
16119
16120# if WARN_PAST_SCOPE
16121static void
16122parser_set_past_scope(struct parser_params *p, const char *name, const char *val)
16123{
16124 int b = parser_get_bool(p, name, val);
16125 if (b >= 0) p->past_scope_enabled = b;
16126}
16127# endif
16128
16129struct magic_comment {
16130 const char *name;
16131 rb_magic_comment_setter_t func;
16132 rb_magic_comment_length_t length;
16133};
16134
16135static const struct magic_comment magic_comments[] = {
16136 {"coding", magic_comment_encoding, parser_encode_length},
16137 {"encoding", magic_comment_encoding, parser_encode_length},
16138 {"frozen_string_literal", parser_set_compile_option_flag},
16139 {"shareable_constant_value", parser_set_shareable_constant_value},
16140 {"warn_indent", parser_set_token_info},
16141# if WARN_PAST_SCOPE
16142 {"warn_past_scope", parser_set_past_scope},
16143# endif
16144};
16145
16146static const char *
16147magic_comment_marker(const char *str, long len)
16148{
16149 long i = 2;
16150
16151 while (i < len) {
16152 switch (str[i]) {
16153 case '-':
16154 if (str[i-1] == '*' && str[i-2] == '-') {
16155 return str + i + 1;
16156 }
16157 i += 2;
16158 break;
16159 case '*':
16160 if (i + 1 >= len) return 0;
16161 if (str[i+1] != '-') {
16162 i += 4;
16163 }
16164 else if (str[i-1] != '-') {
16165 i += 2;
16166 }
16167 else {
16168 return str + i + 2;
16169 }
16170 break;
16171 default:
16172 i += 3;
16173 break;
16174 }
16175 }
16176 return 0;
16177}
16178
16179static int
16180parser_magic_comment(struct parser_params *p, const char *str, long len)
16181{
16182 int indicator = 0;
16183 VALUE name = 0, val = 0;
16184 const char *beg, *end, *vbeg, *vend;
16185#define str_copy(_s, _p, _n) ((_s) \
16186 ? (void)(rb_str_resize((_s), (_n)), \
16187 MEMCPY(RSTRING_PTR(_s), (_p), char, (_n)), (_s)) \
16188 : (void)((_s) = STR_NEW((_p), (_n))))
16189
16190 if (len <= 7) return FALSE;
16191 if (!!(beg = magic_comment_marker(str, len))) {
16192 if (!(end = magic_comment_marker(beg, str + len - beg)))
16193 return FALSE;
16194 indicator = TRUE;
16195 str = beg;
16196 len = end - beg - 3;
16197 }
16198
16199 /* %r"([^\\s\'\":;]+)\\s*:\\s*(\"(?:\\\\.|[^\"])*\"|[^\"\\s;]+)[\\s;]*" */
16200 while (len > 0) {
16201 const struct magic_comment *mc = magic_comments;
16202 char *s;
16203 int i;
16204 long n = 0;
16205
16206 for (; len > 0 && *str; str++, --len) {
16207 switch (*str) {
16208 case '\'': case '"': case ':': case ';':
16209 continue;
16210 }
16211 if (!ISSPACE(*str)) break;
16212 }
16213 for (beg = str; len > 0; str++, --len) {
16214 switch (*str) {
16215 case '\'': case '"': case ':': case ';':
16216 break;
16217 default:
16218 if (ISSPACE(*str)) break;
16219 continue;
16220 }
16221 break;
16222 }
16223 for (end = str; len > 0 && ISSPACE(*str); str++, --len);
16224 if (!len) break;
16225 if (*str != ':') {
16226 if (!indicator) return FALSE;
16227 continue;
16228 }
16229
16230 do str++; while (--len > 0 && ISSPACE(*str));
16231 if (!len) break;
16232 if (*str == '"') {
16233 for (vbeg = ++str; --len > 0 && *str != '"'; str++) {
16234 if (*str == '\\') {
16235 --len;
16236 ++str;
16237 }
16238 }
16239 vend = str;
16240 if (len) {
16241 --len;
16242 ++str;
16243 }
16244 }
16245 else {
16246 for (vbeg = str; len > 0 && *str != '"' && *str != ';' && !ISSPACE(*str); --len, str++);
16247 vend = str;
16248 }
16249 if (indicator) {
16250 while (len > 0 && (*str == ';' || ISSPACE(*str))) --len, str++;
16251 }
16252 else {
16253 while (len > 0 && (ISSPACE(*str))) --len, str++;
16254 if (len) return FALSE;
16255 }
16256
16257 n = end - beg;
16258 str_copy(name, beg, n);
16259 s = RSTRING_PTR(name);
16260 for (i = 0; i < n; ++i) {
16261 if (s[i] == '-') s[i] = '_';
16262 }
16263 do {
16264 if (STRNCASECMP(mc->name, s, n) == 0 && !mc->name[n]) {
16265 n = vend - vbeg;
16266 if (mc->length) {
16267 n = (*mc->length)(p, vbeg, n);
16268 }
16269 str_copy(val, vbeg, n);
16270 (*mc->func)(p, mc->name, RSTRING_PTR(val));
16271 break;
16272 }
16273 } while (++mc < magic_comments + numberof(magic_comments));
16274#ifdef RIPPER
16275 str_copy(val, vbeg, vend - vbeg);
16276 dispatch2(magic_comment, name, val);
16277#endif
16278 }
16279
16280 return TRUE;
16281}
16282
16283static void
16284set_file_encoding(struct parser_params *p, const char *str, const char *send)
16285{
16286 int sep = 0;
16287 const char *beg = str;
16288 VALUE s;
16289
16290 for (;;) {
16291 if (send - str <= 6) return;
16292 switch (str[6]) {
16293 case 'C': case 'c': str += 6; continue;
16294 case 'O': case 'o': str += 5; continue;
16295 case 'D': case 'd': str += 4; continue;
16296 case 'I': case 'i': str += 3; continue;
16297 case 'N': case 'n': str += 2; continue;
16298 case 'G': case 'g': str += 1; continue;
16299 case '=': case ':':
16300 sep = 1;
16301 str += 6;
16302 break;
16303 default:
16304 str += 6;
16305 if (ISSPACE(*str)) break;
16306 continue;
16307 }
16308 if (STRNCASECMP(str-6, "coding", 6) == 0) break;
16309 sep = 0;
16310 }
16311 for (;;) {
16312 do {
16313 if (++str >= send) return;
16314 } while (ISSPACE(*str));
16315 if (sep) break;
16316 if (*str != '=' && *str != ':') return;
16317 sep = 1;
16318 str++;
16319 }
16320 beg = str;
16321 while ((*str == '-' || *str == '_' || ISALNUM(*str)) && ++str < send);
16322 s = rb_str_new(beg, parser_encode_length(p, beg, str - beg));
16323 parser_set_encode(p, RSTRING_PTR(s));
16324 rb_str_resize(s, 0);
16325}
16326
16327static void
16328parser_prepare(struct parser_params *p)
16329{
16330 int c = nextc0(p, FALSE);
16331 p->token_info_enabled = !compile_for_eval && RTEST(ruby_verbose);
16332 switch (c) {
16333 case '#':
16334 if (peek(p, '!')) p->has_shebang = 1;
16335 break;
16336 case 0xef: /* UTF-8 BOM marker */
16337 if (p->lex.pend - p->lex.pcur >= 2 &&
16338 (unsigned char)p->lex.pcur[0] == 0xbb &&
16339 (unsigned char)p->lex.pcur[1] == 0xbf) {
16340 p->enc = rb_utf8_encoding();
16341 p->lex.pcur += 2;
16342#ifndef RIPPER
16343 if (p->debug_lines) {
16344 rb_enc_associate(p->lex.lastline, p->enc);
16345 }
16346#endif
16347 p->lex.pbeg = p->lex.pcur;
16348 return;
16349 }
16350 break;
16351 case EOF:
16352 return;
16353 }
16354 pushback(p, c);
16355 p->enc = rb_enc_get(p->lex.lastline);
16356}
16357
16358#ifndef RIPPER
16359#define ambiguous_operator(tok, op, syn) ( \
16360 rb_warning0("`"op"' after local variable or literal is interpreted as binary operator"), \
16361 rb_warning0("even though it seems like "syn""))
16362#else
16363#define ambiguous_operator(tok, op, syn) \
16364 dispatch2(operator_ambiguous, TOKEN2VAL(tok), rb_str_new_cstr(syn))
16365#endif
16366#define warn_balanced(tok, op, syn) ((void) \
16367 (!IS_lex_state_for(last_state, EXPR_CLASS|EXPR_DOT|EXPR_FNAME|EXPR_ENDFN) && \
16368 space_seen && !ISSPACE(c) && \
16369 (ambiguous_operator(tok, op, syn), 0)), \
16370 (enum yytokentype)(tok))
16371
16372static VALUE
16373parse_rational(struct parser_params *p, char *str, int len, int seen_point)
16374{
16375 VALUE v;
16376 char *point = &str[seen_point];
16377 size_t fraclen = len-seen_point-1;
16378 memmove(point, point+1, fraclen+1);
16379 v = rb_cstr_to_inum(str, 10, FALSE);
16380 return rb_rational_new(v, rb_int_positive_pow(10, fraclen));
16381}
16382
16383static enum yytokentype
16384no_digits(struct parser_params *p)
16385{
16386 yyerror0("numeric literal without digits");
16387 if (peek(p, '_')) nextc(p);
16388 /* dummy 0, for tUMINUS_NUM at numeric */
16389 return set_integer_literal(p, INT2FIX(0), 0);
16390}
16391
16392static enum yytokentype
16393parse_numeric(struct parser_params *p, int c)
16394{
16395 int is_float, seen_point, seen_e, nondigit;
16396 int suffix;
16397
16398 is_float = seen_point = seen_e = nondigit = 0;
16399 SET_LEX_STATE(EXPR_END);
16400 newtok(p);
16401 if (c == '-' || c == '+') {
16402 tokadd(p, c);
16403 c = nextc(p);
16404 }
16405 if (c == '0') {
16406 int start = toklen(p);
16407 c = nextc(p);
16408 if (c == 'x' || c == 'X') {
16409 /* hexadecimal */
16410 c = nextc(p);
16411 if (c != -1 && ISXDIGIT(c)) {
16412 do {
16413 if (c == '_') {
16414 if (nondigit) break;
16415 nondigit = c;
16416 continue;
16417 }
16418 if (!ISXDIGIT(c)) break;
16419 nondigit = 0;
16420 tokadd(p, c);
16421 } while ((c = nextc(p)) != -1);
16422 }
16423 pushback(p, c);
16424 tokfix(p);
16425 if (toklen(p) == start) {
16426 return no_digits(p);
16427 }
16428 else if (nondigit) goto trailing_uc;
16429 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
16430 return set_integer_literal(p, rb_cstr_to_inum(tok(p), 16, FALSE), suffix);
16431 }
16432 if (c == 'b' || c == 'B') {
16433 /* binary */
16434 c = nextc(p);
16435 if (c == '0' || c == '1') {
16436 do {
16437 if (c == '_') {
16438 if (nondigit) break;
16439 nondigit = c;
16440 continue;
16441 }
16442 if (c != '0' && c != '1') break;
16443 nondigit = 0;
16444 tokadd(p, c);
16445 } while ((c = nextc(p)) != -1);
16446 }
16447 pushback(p, c);
16448 tokfix(p);
16449 if (toklen(p) == start) {
16450 return no_digits(p);
16451 }
16452 else if (nondigit) goto trailing_uc;
16453 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
16454 return set_integer_literal(p, rb_cstr_to_inum(tok(p), 2, FALSE), suffix);
16455 }
16456 if (c == 'd' || c == 'D') {
16457 /* decimal */
16458 c = nextc(p);
16459 if (c != -1 && ISDIGIT(c)) {
16460 do {
16461 if (c == '_') {
16462 if (nondigit) break;
16463 nondigit = c;
16464 continue;
16465 }
16466 if (!ISDIGIT(c)) break;
16467 nondigit = 0;
16468 tokadd(p, c);
16469 } while ((c = nextc(p)) != -1);
16470 }
16471 pushback(p, c);
16472 tokfix(p);
16473 if (toklen(p) == start) {
16474 return no_digits(p);
16475 }
16476 else if (nondigit) goto trailing_uc;
16477 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
16478 return set_integer_literal(p, rb_cstr_to_inum(tok(p), 10, FALSE), suffix);
16479 }
16480 if (c == '_') {
16481 /* 0_0 */
16482 goto octal_number;
16483 }
16484 if (c == 'o' || c == 'O') {
16485 /* prefixed octal */
16486 c = nextc(p);
16487 if (c == -1 || c == '_' || !ISDIGIT(c)) {
16488 return no_digits(p);
16489 }
16490 }
16491 if (c >= '0' && c <= '7') {
16492 /* octal */
16493 octal_number:
16494 do {
16495 if (c == '_') {
16496 if (nondigit) break;
16497 nondigit = c;
16498 continue;
16499 }
16500 if (c < '0' || c > '9') break;
16501 if (c > '7') goto invalid_octal;
16502 nondigit = 0;
16503 tokadd(p, c);
16504 } while ((c = nextc(p)) != -1);
16505 if (toklen(p) > start) {
16506 pushback(p, c);
16507 tokfix(p);
16508 if (nondigit) goto trailing_uc;
16509 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
16510 return set_integer_literal(p, rb_cstr_to_inum(tok(p), 8, FALSE), suffix);
16511 }
16512 if (nondigit) {
16513 pushback(p, c);
16514 goto trailing_uc;
16515 }
16516 }
16517 if (c > '7' && c <= '9') {
16518 invalid_octal:
16519 yyerror0("Invalid octal digit");
16520 }
16521 else if (c == '.' || c == 'e' || c == 'E') {
16522 tokadd(p, '0');
16523 }
16524 else {
16525 pushback(p, c);
16526 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
16527 return set_integer_literal(p, INT2FIX(0), suffix);
16528 }
16529 }
16530
16531 for (;;) {
16532 switch (c) {
16533 case '0': case '1': case '2': case '3': case '4':
16534 case '5': case '6': case '7': case '8': case '9':
16535 nondigit = 0;
16536 tokadd(p, c);
16537 break;
16538
16539 case '.':
16540 if (nondigit) goto trailing_uc;
16541 if (seen_point || seen_e) {
16542 goto decode_num;
16543 }
16544 else {
16545 int c0 = nextc(p);
16546 if (c0 == -1 || !ISDIGIT(c0)) {
16547 pushback(p, c0);
16548 goto decode_num;
16549 }
16550 c = c0;
16551 }
16552 seen_point = toklen(p);
16553 tokadd(p, '.');
16554 tokadd(p, c);
16555 is_float++;
16556 nondigit = 0;
16557 break;
16558
16559 case 'e':
16560 case 'E':
16561 if (nondigit) {
16562 pushback(p, c);
16563 c = nondigit;
16564 goto decode_num;
16565 }
16566 if (seen_e) {
16567 goto decode_num;
16568 }
16569 nondigit = c;
16570 c = nextc(p);
16571 if (c != '-' && c != '+' && !ISDIGIT(c)) {
16572 pushback(p, c);
16573 nondigit = 0;
16574 goto decode_num;
16575 }
16576 tokadd(p, nondigit);
16577 seen_e++;
16578 is_float++;
16579 tokadd(p, c);
16580 nondigit = (c == '-' || c == '+') ? c : 0;
16581 break;
16582
16583 case '_': /* `_' in number just ignored */
16584 if (nondigit) goto decode_num;
16585 nondigit = c;
16586 break;
16587
16588 default:
16589 goto decode_num;
16590 }
16591 c = nextc(p);
16592 }
16593
16594 decode_num:
16595 pushback(p, c);
16596 if (nondigit) {
16597 trailing_uc:
16598 literal_flush(p, p->lex.pcur - 1);
16599 YYLTYPE loc = RUBY_INIT_YYLLOC();
16600 compile_error(p, "trailing `%c' in number", nondigit);
16601 parser_show_error_line(p, &loc);
16602 }
16603 tokfix(p);
16604 if (is_float) {
16605 enum yytokentype type = tFLOAT;
16606 VALUE v;
16607
16608 suffix = number_literal_suffix(p, seen_e ? NUM_SUFFIX_I : NUM_SUFFIX_ALL);
16609 if (suffix & NUM_SUFFIX_R) {
16610 type = tRATIONAL;
16611 v = parse_rational(p, tok(p), toklen(p), seen_point);
16612 }
16613 else {
16614 double d = strtod(tok(p), 0);
16615 if (errno == ERANGE) {
16616 rb_warning1("Float %s out of range", WARN_S(tok(p)));
16617 errno = 0;
16618 }
16619 v = DBL2NUM(d);
16620 }
16621 return set_number_literal(p, v, type, suffix);
16622 }
16623 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
16624 return set_integer_literal(p, rb_cstr_to_inum(tok(p), 10, FALSE), suffix);
16625}
16626
16627static enum yytokentype
16628parse_qmark(struct parser_params *p, int space_seen)
16629{
16630 rb_encoding *enc;
16631 register int c;
16632 VALUE lit;
16633
16634 if (IS_END()) {
16635 SET_LEX_STATE(EXPR_VALUE);
16636 return '?';
16637 }
16638 c = nextc(p);
16639 if (c == -1) {
16640 compile_error(p, "incomplete character syntax");
16641 return 0;
16642 }
16643 if (rb_enc_isspace(c, p->enc)) {
16644 if (!IS_ARG()) {
16645 int c2 = escaped_control_code(c);
16646 if (c2) {
16647 WARN_SPACE_CHAR(c2, "?");
16648 }
16649 }
16650 ternary:
16651 pushback(p, c);
16652 SET_LEX_STATE(EXPR_VALUE);
16653 return '?';
16654 }
16655 newtok(p);
16656 enc = p->enc;
16657 if (!parser_isascii(p)) {
16658 if (tokadd_mbchar(p, c) == -1) return 0;
16659 }
16660 else if ((rb_enc_isalnum(c, p->enc) || c == '_') &&
16661 p->lex.pcur < p->lex.pend && is_identchar(p->lex.pcur, p->lex.pend, p->enc)) {
16662 if (space_seen) {
16663 const char *start = p->lex.pcur - 1, *ptr = start;
16664 do {
16665 int n = parser_precise_mbclen(p, ptr);
16666 if (n < 0) return -1;
16667 ptr += n;
16668 } while (ptr < p->lex.pend && is_identchar(ptr, p->lex.pend, p->enc));
16669 rb_warn2("`?' just followed by `%.*s' is interpreted as" \
16670 " a conditional operator, put a space after `?'",
16671 WARN_I((int)(ptr - start)), WARN_S_L(start, (ptr - start)));
16672 }
16673 goto ternary;
16674 }
16675 else if (c == '\\') {
16676 if (peek(p, 'u')) {
16677 nextc(p);
16678 enc = rb_utf8_encoding();
16679 tokadd_utf8(p, &enc, -1, 0, 0);
16680 }
16681 else if (!lex_eol_p(p) && !(c = *p->lex.pcur, ISASCII(c))) {
16682 nextc(p);
16683 if (tokadd_mbchar(p, c) == -1) return 0;
16684 }
16685 else {
16686 c = read_escape(p, 0, &enc);
16687 tokadd(p, c);
16688 }
16689 }
16690 else {
16691 tokadd(p, c);
16692 }
16693 tokfix(p);
16694 lit = STR_NEW3(tok(p), toklen(p), enc, 0);
16695 set_yylval_str(lit);
16696 SET_LEX_STATE(EXPR_END);
16697 return tCHAR;
16698}
16699
16700static enum yytokentype
16701parse_percent(struct parser_params *p, const int space_seen, const enum lex_state_e last_state)
16702{
16703 register int c;
16704 const char *ptok = p->lex.pcur;
16705
16706 if (IS_BEG()) {
16707 int term;
16708 int paren;
16709
16710 c = nextc(p);
16711 quotation:
16712 if (c == -1) goto unterminated;
16713 if (!ISALNUM(c)) {
16714 term = c;
16715 if (!ISASCII(c)) goto unknown;
16716 c = 'Q';
16717 }
16718 else {
16719 term = nextc(p);
16720 if (rb_enc_isalnum(term, p->enc) || !parser_isascii(p)) {
16721 unknown:
16722 pushback(p, term);
16723 c = parser_precise_mbclen(p, p->lex.pcur);
16724 if (c < 0) return 0;
16725 p->lex.pcur += c;
16726 yyerror0("unknown type of %string");
16727 return 0;
16728 }
16729 }
16730 if (term == -1) {
16731 unterminated:
16732 compile_error(p, "unterminated quoted string meets end of file");
16733 return 0;
16734 }
16735 paren = term;
16736 if (term == '(') term = ')';
16737 else if (term == '[') term = ']';
16738 else if (term == '{') term = '}';
16739 else if (term == '<') term = '>';
16740 else paren = 0;
16741
16742 p->lex.ptok = ptok-1;
16743 switch (c) {
16744 case 'Q':
16745 p->lex.strterm = NEW_STRTERM(str_dquote, term, paren);
16746 return tSTRING_BEG;
16747
16748 case 'q':
16749 p->lex.strterm = NEW_STRTERM(str_squote, term, paren);
16750 return tSTRING_BEG;
16751
16752 case 'W':
16753 p->lex.strterm = NEW_STRTERM(str_dword, term, paren);
16754 return tWORDS_BEG;
16755
16756 case 'w':
16757 p->lex.strterm = NEW_STRTERM(str_sword, term, paren);
16758 return tQWORDS_BEG;
16759
16760 case 'I':
16761 p->lex.strterm = NEW_STRTERM(str_dword, term, paren);
16762 return tSYMBOLS_BEG;
16763
16764 case 'i':
16765 p->lex.strterm = NEW_STRTERM(str_sword, term, paren);
16766 return tQSYMBOLS_BEG;
16767
16768 case 'x':
16769 p->lex.strterm = NEW_STRTERM(str_xquote, term, paren);
16770 return tXSTRING_BEG;
16771
16772 case 'r':
16773 p->lex.strterm = NEW_STRTERM(str_regexp, term, paren);
16774 return tREGEXP_BEG;
16775
16776 case 's':
16777 p->lex.strterm = NEW_STRTERM(str_ssym, term, paren);
16778 SET_LEX_STATE(EXPR_FNAME|EXPR_FITEM);
16779 return tSYMBEG;
16780
16781 default:
16782 yyerror0("unknown type of %string");
16783 return 0;
16784 }
16785 }
16786 if ((c = nextc(p)) == '=') {
16787 set_yylval_id('%');
16788 SET_LEX_STATE(EXPR_BEG);
16789 return tOP_ASGN;
16790 }
16791 if (IS_SPCARG(c) || (IS_lex_state(EXPR_FITEM) && c == 's')) {
16792 goto quotation;
16793 }
16794 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
16795 pushback(p, c);
16796 return warn_balanced('%', "%%", "string literal");
16797}
16798
16799static int
16800tokadd_ident(struct parser_params *p, int c)
16801{
16802 do {
16803 if (tokadd_mbchar(p, c) == -1) return -1;
16804 c = nextc(p);
16805 } while (parser_is_identchar(p));
16806 pushback(p, c);
16807 return 0;
16808}
16809
16810static ID
16811tokenize_ident(struct parser_params *p, const enum lex_state_e last_state)
16812{
16813 ID ident = TOK_INTERN();
16814
16815 set_yylval_name(ident);
16816
16817 return ident;
16818}
16819
16820static int
16821parse_numvar(struct parser_params *p)
16822{
16823 size_t len;
16824 int overflow;
16825 unsigned long n = ruby_scan_digits(tok(p)+1, toklen(p)-1, 10, &len, &overflow);
16826 const unsigned long nth_ref_max =
16827 ((FIXNUM_MAX < INT_MAX) ? FIXNUM_MAX : INT_MAX) >> 1;
16828 /* NTH_REF is left-shifted to be ORed with back-ref flag and
16829 * turned into a Fixnum, in compile.c */
16830
16831 if (overflow || n > nth_ref_max) {
16832 /* compile_error()? */
16833 rb_warn1("`%s' is too big for a number variable, always nil", WARN_S(tok(p)));
16834 return 0; /* $0 is $PROGRAM_NAME, not NTH_REF */
16835 }
16836 else {
16837 return (int)n;
16838 }
16839}
16840
16841static enum yytokentype
16842parse_gvar(struct parser_params *p, const enum lex_state_e last_state)
16843{
16844 const char *ptr = p->lex.pcur;
16845 register int c;
16846
16847 SET_LEX_STATE(EXPR_END);
16848 p->lex.ptok = ptr - 1; /* from '$' */
16849 newtok(p);
16850 c = nextc(p);
16851 switch (c) {
16852 case '_': /* $_: last read line string */
16853 c = nextc(p);
16854 if (parser_is_identchar(p)) {
16855 tokadd(p, '$');
16856 tokadd(p, '_');
16857 break;
16858 }
16859 pushback(p, c);
16860 c = '_';
16861 /* fall through */
16862 case '~': /* $~: match-data */
16863 case '*': /* $*: argv */
16864 case '$': /* $$: pid */
16865 case '?': /* $?: last status */
16866 case '!': /* $!: error string */
16867 case '@': /* $@: error position */
16868 case '/': /* $/: input record separator */
16869 case '\\': /* $\: output record separator */
16870 case ';': /* $;: field separator */
16871 case ',': /* $,: output field separator */
16872 case '.': /* $.: last read line number */
16873 case '=': /* $=: ignorecase */
16874 case ':': /* $:: load path */
16875 case '<': /* $<: reading filename */
16876 case '>': /* $>: default output handle */
16877 case '\"': /* $": already loaded files */
16878 tokadd(p, '$');
16879 tokadd(p, c);
16880 goto gvar;
16881
16882 case '-':
16883 tokadd(p, '$');
16884 tokadd(p, c);
16885 c = nextc(p);
16886 if (parser_is_identchar(p)) {
16887 if (tokadd_mbchar(p, c) == -1) return 0;
16888 }
16889 else {
16890 pushback(p, c);
16891 pushback(p, '-');
16892 return '$';
16893 }
16894 gvar:
16895 set_yylval_name(TOK_INTERN());
16896 return tGVAR;
16897
16898 case '&': /* $&: last match */
16899 case '`': /* $`: string before last match */
16900 case '\'': /* $': string after last match */
16901 case '+': /* $+: string matches last paren. */
16902 if (IS_lex_state_for(last_state, EXPR_FNAME)) {
16903 tokadd(p, '$');
16904 tokadd(p, c);
16905 goto gvar;
16906 }
16907 set_yylval_node(NEW_BACK_REF(c, &_cur_loc));
16908 return tBACK_REF;
16909
16910 case '1': case '2': case '3':
16911 case '4': case '5': case '6':
16912 case '7': case '8': case '9':
16913 tokadd(p, '$');
16914 do {
16915 tokadd(p, c);
16916 c = nextc(p);
16917 } while (c != -1 && ISDIGIT(c));
16918 pushback(p, c);
16919 if (IS_lex_state_for(last_state, EXPR_FNAME)) goto gvar;
16920 tokfix(p);
16921 c = parse_numvar(p);
16922 set_yylval_node(NEW_NTH_REF(c, &_cur_loc));
16923 return tNTH_REF;
16924
16925 default:
16926 if (!parser_is_identchar(p)) {
16927 YYLTYPE loc = RUBY_INIT_YYLLOC();
16928 if (c == -1 || ISSPACE(c)) {
16929 compile_error(p, "`$' without identifiers is not allowed as a global variable name");
16930 }
16931 else {
16932 pushback(p, c);
16933 compile_error(p, "`$%c' is not allowed as a global variable name", c);
16934 }
16935 parser_show_error_line(p, &loc);
16936 set_yylval_noname();
16937 return tGVAR;
16938 }
16939 /* fall through */
16940 case '0':
16941 tokadd(p, '$');
16942 }
16943
16944 if (tokadd_ident(p, c)) return 0;
16945 SET_LEX_STATE(EXPR_END);
16946 tokenize_ident(p, last_state);
16947 return tGVAR;
16948}
16949
16950#ifndef RIPPER
16951static bool
16952parser_numbered_param(struct parser_params *p, int n)
16953{
16954 if (n < 0) return false;
16955
16956 if (DVARS_TERMINAL_P(p->lvtbl->args) || DVARS_TERMINAL_P(p->lvtbl->args->prev)) {
16957 return false;
16958 }
16959 if (p->max_numparam == ORDINAL_PARAM) {
16960 compile_error(p, "ordinary parameter is defined");
16961 return false;
16962 }
16963 struct vtable *args = p->lvtbl->args;
16964 if (p->max_numparam < n) {
16965 p->max_numparam = n;
16966 }
16967 while (n > args->pos) {
16968 vtable_add(args, NUMPARAM_IDX_TO_ID(args->pos+1));
16969 }
16970 return true;
16971}
16972#endif
16973
16974static enum yytokentype
16975parse_atmark(struct parser_params *p, const enum lex_state_e last_state)
16976{
16977 const char *ptr = p->lex.pcur;
16978 enum yytokentype result = tIVAR;
16979 register int c = nextc(p);
16980 YYLTYPE loc;
16981
16982 p->lex.ptok = ptr - 1; /* from '@' */
16983 newtok(p);
16984 tokadd(p, '@');
16985 if (c == '@') {
16986 result = tCVAR;
16987 tokadd(p, '@');
16988 c = nextc(p);
16989 }
16990 SET_LEX_STATE(IS_lex_state_for(last_state, EXPR_FNAME) ? EXPR_ENDFN : EXPR_END);
16991 if (c == -1 || !parser_is_identchar(p)) {
16992 pushback(p, c);
16993 RUBY_SET_YYLLOC(loc);
16994 if (result == tIVAR) {
16995 compile_error(p, "`@' without identifiers is not allowed as an instance variable name");
16996 }
16997 else {
16998 compile_error(p, "`@@' without identifiers is not allowed as a class variable name");
16999 }
17000 parser_show_error_line(p, &loc);
17001 set_yylval_noname();
17002 SET_LEX_STATE(EXPR_END);
17003 return result;
17004 }
17005 else if (ISDIGIT(c)) {
17006 pushback(p, c);
17007 RUBY_SET_YYLLOC(loc);
17008 if (result == tIVAR) {
17009 compile_error(p, "`@%c' is not allowed as an instance variable name", c);
17010 }
17011 else {
17012 compile_error(p, "`@@%c' is not allowed as a class variable name", c);
17013 }
17014 parser_show_error_line(p, &loc);
17015 set_yylval_noname();
17016 SET_LEX_STATE(EXPR_END);
17017 return result;
17018 }
17019
17020 if (tokadd_ident(p, c)) return 0;
17021 tokenize_ident(p, last_state);
17022 return result;
17023}
17024
17025static enum yytokentype
17026parse_ident(struct parser_params *p, int c, int cmd_state)
17027{
17028 enum yytokentype result;
17029 int mb = ENC_CODERANGE_7BIT;
17030 const enum lex_state_e last_state = p->lex.state;
17031 ID ident;
17032
17033 do {
17034 if (!ISASCII(c)) mb = ENC_CODERANGE_UNKNOWN;
17035 if (tokadd_mbchar(p, c) == -1) return 0;
17036 c = nextc(p);
17037 } while (parser_is_identchar(p));
17038 if ((c == '!' || c == '?') && !peek(p, '=')) {
17039 result = tFID;
17040 tokadd(p, c);
17041 }
17042 else if (c == '=' && IS_lex_state(EXPR_FNAME) &&
17043 (!peek(p, '~') && !peek(p, '>') && (!peek(p, '=') || (peek_n(p, '>', 1))))) {
17044 result = tIDENTIFIER;
17045 tokadd(p, c);
17046 }
17047 else {
17048 result = tCONSTANT; /* assume provisionally */
17049 pushback(p, c);
17050 }
17051 tokfix(p);
17052
17053 if (IS_LABEL_POSSIBLE()) {
17054 if (IS_LABEL_SUFFIX(0)) {
17055 SET_LEX_STATE(EXPR_ARG|EXPR_LABELED);
17056 nextc(p);
17057 set_yylval_name(TOK_INTERN());
17058 return tLABEL;
17059 }
17060 }
17061 if (mb == ENC_CODERANGE_7BIT && !IS_lex_state(EXPR_DOT)) {
17062 const struct kwtable *kw;
17063
17064 /* See if it is a reserved word. */
17065 kw = rb_reserved_word(tok(p), toklen(p));
17066 if (kw) {
17067 enum lex_state_e state = p->lex.state;
17068 if (IS_lex_state_for(state, EXPR_FNAME)) {
17069 SET_LEX_STATE(EXPR_ENDFN);
17070 set_yylval_name(rb_intern2(tok(p), toklen(p)));
17071 return kw->id[0];
17072 }
17073 SET_LEX_STATE(kw->state);
17074 if (IS_lex_state(EXPR_BEG)) {
17075 p->command_start = TRUE;
17076 }
17077 if (kw->id[0] == keyword_do) {
17078 if (lambda_beginning_p()) {
17079 p->lex.lpar_beg = -1; /* make lambda_beginning_p() == FALSE in the body of "-> do ... end" */
17080 return keyword_do_LAMBDA;
17081 }
17082 if (COND_P()) return keyword_do_cond;
17083 if (CMDARG_P() && !IS_lex_state_for(state, EXPR_CMDARG))
17084 return keyword_do_block;
17085 return keyword_do;
17086 }
17087 if (IS_lex_state_for(state, (EXPR_BEG | EXPR_LABELED)))
17088 return kw->id[0];
17089 else {
17090 if (kw->id[0] != kw->id[1])
17091 SET_LEX_STATE(EXPR_BEG | EXPR_LABEL);
17092 return kw->id[1];
17093 }
17094 }
17095 }
17096
17097 if (IS_lex_state(EXPR_BEG_ANY | EXPR_ARG_ANY | EXPR_DOT)) {
17098 if (cmd_state) {
17099 SET_LEX_STATE(EXPR_CMDARG);
17100 }
17101 else {
17102 SET_LEX_STATE(EXPR_ARG);
17103 }
17104 }
17105 else if (p->lex.state == EXPR_FNAME) {
17106 SET_LEX_STATE(EXPR_ENDFN);
17107 }
17108 else {
17109 SET_LEX_STATE(EXPR_END);
17110 }
17111
17112 ident = tokenize_ident(p, last_state);
17113 if (result == tCONSTANT && is_local_id(ident)) result = tIDENTIFIER;
17114 if (!IS_lex_state_for(last_state, EXPR_DOT|EXPR_FNAME) &&
17115 (result == tIDENTIFIER) && /* not EXPR_FNAME, not attrasgn */
17116 lvar_defined(p, ident)) {
17117 SET_LEX_STATE(EXPR_END|EXPR_LABEL);
17118 }
17119 return result;
17120}
17121
17122static enum yytokentype
17123parser_yylex(struct parser_params *p)
17124{
17125 register int c;
17126 int space_seen = 0;
17127 int cmd_state;
17128 int label;
17129 enum lex_state_e last_state;
17130 int fallthru = FALSE;
17131 int token_seen = p->token_seen;
17132
17133 if (p->lex.strterm) {
17134 if (p->lex.strterm->flags & STRTERM_HEREDOC) {
17135 return here_document(p, &p->lex.strterm->u.heredoc);
17136 }
17137 else {
17138 token_flush(p);
17139 return parse_string(p, &p->lex.strterm->u.literal);
17140 }
17141 }
17142 cmd_state = p->command_start;
17143 p->command_start = FALSE;
17144 p->token_seen = TRUE;
17145 retry:
17146 last_state = p->lex.state;
17147#ifndef RIPPER
17148 token_flush(p);
17149#endif
17150 switch (c = nextc(p)) {
17151 case '\0': /* NUL */
17152 case '\004': /* ^D */
17153 case '\032': /* ^Z */
17154 case -1: /* end of script. */
17155 return 0;
17156
17157 /* white spaces */
17158 case '\r':
17159 if (!p->cr_seen) {
17160 p->cr_seen = TRUE;
17161 /* carried over with p->lex.nextline for nextc() */
17162 rb_warn0("encountered \\r in middle of line, treated as a mere space");
17163 }
17164 /* fall through */
17165 case ' ': case '\t': case '\f':
17166 case '\13': /* '\v' */
17167 space_seen = 1;
17168#ifdef RIPPER
17169 while ((c = nextc(p))) {
17170 switch (c) {
17171 case ' ': case '\t': case '\f': case '\r':
17172 case '\13': /* '\v' */
17173 break;
17174 default:
17175 goto outofloop;
17176 }
17177 }
17178 outofloop:
17179 pushback(p, c);
17180 dispatch_scan_event(p, tSP);
17181#endif
17182 goto retry;
17183
17184 case '#': /* it's a comment */
17185 p->token_seen = token_seen;
17186 /* no magic_comment in shebang line */
17187 if (!parser_magic_comment(p, p->lex.pcur, p->lex.pend - p->lex.pcur)) {
17188 if (comment_at_top(p)) {
17189 set_file_encoding(p, p->lex.pcur, p->lex.pend);
17190 }
17191 }
17192 lex_goto_eol(p);
17193 dispatch_scan_event(p, tCOMMENT);
17194 fallthru = TRUE;
17195 /* fall through */
17196 case '\n':
17197 p->token_seen = token_seen;
17198 c = (IS_lex_state(EXPR_BEG|EXPR_CLASS|EXPR_FNAME|EXPR_DOT) &&
17199 !IS_lex_state(EXPR_LABELED));
17200 if (c || IS_lex_state_all(EXPR_ARG|EXPR_LABELED)) {
17201 if (!fallthru) {
17202 dispatch_scan_event(p, tIGNORED_NL);
17203 }
17204 fallthru = FALSE;
17205 if (!c && p->ctxt.in_kwarg) {
17206 goto normal_newline;
17207 }
17208 goto retry;
17209 }
17210 while (1) {
17211 switch (c = nextc(p)) {
17212 case ' ': case '\t': case '\f': case '\r':
17213 case '\13': /* '\v' */
17214 space_seen = 1;
17215 break;
17216 case '#':
17217 pushback(p, c);
17218 if (space_seen) dispatch_scan_event(p, tSP);
17219 goto retry;
17220 case '&':
17221 case '.': {
17222 dispatch_delayed_token(p, tIGNORED_NL);
17223 if (peek(p, '.') == (c == '&')) {
17224 pushback(p, c);
17225 dispatch_scan_event(p, tSP);
17226 goto retry;
17227 }
17228 }
17229 default:
17230 p->ruby_sourceline--;
17231 p->lex.nextline = p->lex.lastline;
17232 case -1: /* EOF no decrement*/
17233#ifndef RIPPER
17234 if (p->lex.prevline && !p->eofp) p->lex.lastline = p->lex.prevline;
17235 p->lex.pbeg = RSTRING_PTR(p->lex.lastline);
17236 p->lex.pend = p->lex.pcur = p->lex.pbeg + RSTRING_LEN(p->lex.lastline);
17237 pushback(p, 1); /* always pushback */
17238 p->lex.ptok = p->lex.pcur;
17239#else
17240 lex_goto_eol(p);
17241 if (c != -1) {
17242 p->lex.ptok = p->lex.pcur;
17243 }
17244#endif
17245 goto normal_newline;
17246 }
17247 }
17248 normal_newline:
17249 p->command_start = TRUE;
17250 SET_LEX_STATE(EXPR_BEG);
17251 return '\n';
17252
17253 case '*':
17254 if ((c = nextc(p)) == '*') {
17255 if ((c = nextc(p)) == '=') {
17256 set_yylval_id(idPow);
17257 SET_LEX_STATE(EXPR_BEG);
17258 return tOP_ASGN;
17259 }
17260 pushback(p, c);
17261 if (IS_SPCARG(c)) {
17262 rb_warning0("`**' interpreted as argument prefix");
17263 c = tDSTAR;
17264 }
17265 else if (IS_BEG()) {
17266 c = tDSTAR;
17267 }
17268 else {
17269 c = warn_balanced((enum ruby_method_ids)tPOW, "**", "argument prefix");
17270 }
17271 }
17272 else {
17273 if (c == '=') {
17274 set_yylval_id('*');
17275 SET_LEX_STATE(EXPR_BEG);
17276 return tOP_ASGN;
17277 }
17278 pushback(p, c);
17279 if (IS_SPCARG(c)) {
17280 rb_warning0("`*' interpreted as argument prefix");
17281 c = tSTAR;
17282 }
17283 else if (IS_BEG()) {
17284 c = tSTAR;
17285 }
17286 else {
17287 c = warn_balanced('*', "*", "argument prefix");
17288 }
17289 }
17290 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
17291 return c;
17292
17293 case '!':
17294 c = nextc(p);
17295 if (IS_AFTER_OPERATOR()) {
17296 SET_LEX_STATE(EXPR_ARG);
17297 if (c == '@') {
17298 return '!';
17299 }
17300 }
17301 else {
17302 SET_LEX_STATE(EXPR_BEG);
17303 }
17304 if (c == '=') {
17305 return tNEQ;
17306 }
17307 if (c == '~') {
17308 return tNMATCH;
17309 }
17310 pushback(p, c);
17311 return '!';
17312
17313 case '=':
17314 if (was_bol(p)) {
17315 /* skip embedded rd document */
17316 if (word_match_p(p, "begin", 5)) {
17317 int first_p = TRUE;
17318
17319 lex_goto_eol(p);
17320 dispatch_scan_event(p, tEMBDOC_BEG);
17321 for (;;) {
17322 lex_goto_eol(p);
17323 if (!first_p) {
17324 dispatch_scan_event(p, tEMBDOC);
17325 }
17326 first_p = FALSE;
17327 c = nextc(p);
17328 if (c == -1) {
17329 compile_error(p, "embedded document meets end of file");
17330 return 0;
17331 }
17332 if (c == '=' && word_match_p(p, "end", 3)) {
17333 break;
17334 }
17335 pushback(p, c);
17336 }
17337 lex_goto_eol(p);
17338 dispatch_scan_event(p, tEMBDOC_END);
17339 goto retry;
17340 }
17341 }
17342
17343 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
17344 if ((c = nextc(p)) == '=') {
17345 if ((c = nextc(p)) == '=') {
17346 return tEQQ;
17347 }
17348 pushback(p, c);
17349 return tEQ;
17350 }
17351 if (c == '~') {
17352 return tMATCH;
17353 }
17354 else if (c == '>') {
17355 return tASSOC;
17356 }
17357 pushback(p, c);
17358 return '=';
17359
17360 case '<':
17361 c = nextc(p);
17362 if (c == '<' &&
17363 !IS_lex_state(EXPR_DOT | EXPR_CLASS) &&
17364 !IS_END() &&
17365 (!IS_ARG() || IS_lex_state(EXPR_LABELED) || space_seen)) {
17366 int token = heredoc_identifier(p);
17367 if (token) return token < 0 ? 0 : token;
17368 }
17369 if (IS_AFTER_OPERATOR()) {
17370 SET_LEX_STATE(EXPR_ARG);
17371 }
17372 else {
17373 if (IS_lex_state(EXPR_CLASS))
17374 p->command_start = TRUE;
17375 SET_LEX_STATE(EXPR_BEG);
17376 }
17377 if (c == '=') {
17378 if ((c = nextc(p)) == '>') {
17379 return tCMP;
17380 }
17381 pushback(p, c);
17382 return tLEQ;
17383 }
17384 if (c == '<') {
17385 if ((c = nextc(p)) == '=') {
17386 set_yylval_id(idLTLT);
17387 SET_LEX_STATE(EXPR_BEG);
17388 return tOP_ASGN;
17389 }
17390 pushback(p, c);
17391 return warn_balanced((enum ruby_method_ids)tLSHFT, "<<", "here document");
17392 }
17393 pushback(p, c);
17394 return '<';
17395
17396 case '>':
17397 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
17398 if ((c = nextc(p)) == '=') {
17399 return tGEQ;
17400 }
17401 if (c == '>') {
17402 if ((c = nextc(p)) == '=') {
17403 set_yylval_id(idGTGT);
17404 SET_LEX_STATE(EXPR_BEG);
17405 return tOP_ASGN;
17406 }
17407 pushback(p, c);
17408 return tRSHFT;
17409 }
17410 pushback(p, c);
17411 return '>';
17412
17413 case '"':
17414 label = (IS_LABEL_POSSIBLE() ? str_label : 0);
17415 p->lex.strterm = NEW_STRTERM(str_dquote | label, '"', 0);
17416 p->lex.ptok = p->lex.pcur-1;
17417 return tSTRING_BEG;
17418
17419 case '`':
17420 if (IS_lex_state(EXPR_FNAME)) {
17421 SET_LEX_STATE(EXPR_ENDFN);
17422 return c;
17423 }
17424 if (IS_lex_state(EXPR_DOT)) {
17425 if (cmd_state)
17426 SET_LEX_STATE(EXPR_CMDARG);
17427 else
17428 SET_LEX_STATE(EXPR_ARG);
17429 return c;
17430 }
17431 p->lex.strterm = NEW_STRTERM(str_xquote, '`', 0);
17432 return tXSTRING_BEG;
17433
17434 case '\'':
17435 label = (IS_LABEL_POSSIBLE() ? str_label : 0);
17436 p->lex.strterm = NEW_STRTERM(str_squote | label, '\'', 0);
17437 p->lex.ptok = p->lex.pcur-1;
17438 return tSTRING_BEG;
17439
17440 case '?':
17441 return parse_qmark(p, space_seen);
17442
17443 case '&':
17444 if ((c = nextc(p)) == '&') {
17445 SET_LEX_STATE(EXPR_BEG);
17446 if ((c = nextc(p)) == '=') {
17447 set_yylval_id(idANDOP);
17448 SET_LEX_STATE(EXPR_BEG);
17449 return tOP_ASGN;
17450 }
17451 pushback(p, c);
17452 return tANDOP;
17453 }
17454 else if (c == '=') {
17455 set_yylval_id('&');
17456 SET_LEX_STATE(EXPR_BEG);
17457 return tOP_ASGN;
17458 }
17459 else if (c == '.') {
17460 set_yylval_id(idANDDOT);
17461 SET_LEX_STATE(EXPR_DOT);
17462 return tANDDOT;
17463 }
17464 pushback(p, c);
17465 if (IS_SPCARG(c)) {
17466 if ((c != ':') ||
17467 (c = peekc_n(p, 1)) == -1 ||
17468 !(c == '\'' || c == '"' ||
17469 is_identchar((p->lex.pcur+1), p->lex.pend, p->enc))) {
17470 rb_warning0("`&' interpreted as argument prefix");
17471 }
17472 c = tAMPER;
17473 }
17474 else if (IS_BEG()) {
17475 c = tAMPER;
17476 }
17477 else {
17478 c = warn_balanced('&', "&", "argument prefix");
17479 }
17480 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
17481 return c;
17482
17483 case '|':
17484 if ((c = nextc(p)) == '|') {
17485 SET_LEX_STATE(EXPR_BEG);
17486 if ((c = nextc(p)) == '=') {
17487 set_yylval_id(idOROP);
17488 SET_LEX_STATE(EXPR_BEG);
17489 return tOP_ASGN;
17490 }
17491 pushback(p, c);
17492 if (IS_lex_state_for(last_state, EXPR_BEG)) {
17493 c = '|';
17494 pushback(p, '|');
17495 return c;
17496 }
17497 return tOROP;
17498 }
17499 if (c == '=') {
17500 set_yylval_id('|');
17501 SET_LEX_STATE(EXPR_BEG);
17502 return tOP_ASGN;
17503 }
17504 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG|EXPR_LABEL);
17505 pushback(p, c);
17506 return '|';
17507
17508 case '+':
17509 c = nextc(p);
17510 if (IS_AFTER_OPERATOR()) {
17511 SET_LEX_STATE(EXPR_ARG);
17512 if (c == '@') {
17513 return tUPLUS;
17514 }
17515 pushback(p, c);
17516 return '+';
17517 }
17518 if (c == '=') {
17519 set_yylval_id('+');
17520 SET_LEX_STATE(EXPR_BEG);
17521 return tOP_ASGN;
17522 }
17523 if (IS_BEG() || (IS_SPCARG(c) && arg_ambiguous(p, '+'))) {
17524 SET_LEX_STATE(EXPR_BEG);
17525 pushback(p, c);
17526 if (c != -1 && ISDIGIT(c)) {
17527 return parse_numeric(p, '+');
17528 }
17529 return tUPLUS;
17530 }
17531 SET_LEX_STATE(EXPR_BEG);
17532 pushback(p, c);
17533 return warn_balanced('+', "+", "unary operator");
17534
17535 case '-':
17536 c = nextc(p);
17537 if (IS_AFTER_OPERATOR()) {
17538 SET_LEX_STATE(EXPR_ARG);
17539 if (c == '@') {
17540 return tUMINUS;
17541 }
17542 pushback(p, c);
17543 return '-';
17544 }
17545 if (c == '=') {
17546 set_yylval_id('-');
17547 SET_LEX_STATE(EXPR_BEG);
17548 return tOP_ASGN;
17549 }
17550 if (c == '>') {
17551 SET_LEX_STATE(EXPR_ENDFN);
17552 return tLAMBDA;
17553 }
17554 if (IS_BEG() || (IS_SPCARG(c) && arg_ambiguous(p, '-'))) {
17555 SET_LEX_STATE(EXPR_BEG);
17556 pushback(p, c);
17557 if (c != -1 && ISDIGIT(c)) {
17558 return tUMINUS_NUM;
17559 }
17560 return tUMINUS;
17561 }
17562 SET_LEX_STATE(EXPR_BEG);
17563 pushback(p, c);
17564 return warn_balanced('-', "-", "unary operator");
17565
17566 case '.': {
17567 int is_beg = IS_BEG();
17568 SET_LEX_STATE(EXPR_BEG);
17569 if ((c = nextc(p)) == '.') {
17570 if ((c = nextc(p)) == '.') {
17571 if (p->ctxt.in_argdef) {
17572 SET_LEX_STATE(EXPR_ENDARG);
17573 return tBDOT3;
17574 }
17575 if (p->lex.paren_nest == 0 && looking_at_eol_p(p)) {
17576 rb_warn0("... at EOL, should be parenthesized?");
17577 }
17578 else if (p->lex.lpar_beg >= 0 && p->lex.lpar_beg+1 == p->lex.paren_nest) {
17579 if (IS_lex_state_for(last_state, EXPR_LABEL))
17580 return tDOT3;
17581 }
17582 return is_beg ? tBDOT3 : tDOT3;
17583 }
17584 pushback(p, c);
17585 return is_beg ? tBDOT2 : tDOT2;
17586 }
17587 pushback(p, c);
17588 if (c != -1 && ISDIGIT(c)) {
17589 char prev = p->lex.pcur-1 > p->lex.pbeg ? *(p->lex.pcur-2) : 0;
17590 parse_numeric(p, '.');
17591 if (ISDIGIT(prev)) {
17592 yyerror0("unexpected fraction part after numeric literal");
17593 }
17594 else {
17595 yyerror0("no .<digit> floating literal anymore; put 0 before dot");
17596 }
17597 SET_LEX_STATE(EXPR_END);
17598 p->lex.ptok = p->lex.pcur;
17599 goto retry;
17600 }
17601 set_yylval_id('.');
17602 SET_LEX_STATE(EXPR_DOT);
17603 return '.';
17604 }
17605
17606 case '0': case '1': case '2': case '3': case '4':
17607 case '5': case '6': case '7': case '8': case '9':
17608 return parse_numeric(p, c);
17609
17610 case ')':
17611 COND_POP();
17612 CMDARG_POP();
17613 SET_LEX_STATE(EXPR_ENDFN);
17614 p->lex.paren_nest--;
17615 return c;
17616
17617 case ']':
17618 COND_POP();
17619 CMDARG_POP();
17620 SET_LEX_STATE(EXPR_END);
17621 p->lex.paren_nest--;
17622 return c;
17623
17624 case '}':
17625 /* tSTRING_DEND does COND_POP and CMDARG_POP in the yacc's rule */
17626 if (!p->lex.brace_nest--) return tSTRING_DEND;
17627 COND_POP();
17628 CMDARG_POP();
17629 SET_LEX_STATE(EXPR_END);
17630 p->lex.paren_nest--;
17631 return c;
17632
17633 case ':':
17634 c = nextc(p);
17635 if (c == ':') {
17636 if (IS_BEG() || IS_lex_state(EXPR_CLASS) || IS_SPCARG(-1)) {
17637 SET_LEX_STATE(EXPR_BEG);
17638 return tCOLON3;
17639 }
17640 set_yylval_id(idCOLON2);
17641 SET_LEX_STATE(EXPR_DOT);
17642 return tCOLON2;
17643 }
17644 if (IS_END() || ISSPACE(c) || c == '#') {
17645 pushback(p, c);
17646 c = warn_balanced(':', ":", "symbol literal");
17647 SET_LEX_STATE(EXPR_BEG);
17648 return c;
17649 }
17650 switch (c) {
17651 case '\'':
17652 p->lex.strterm = NEW_STRTERM(str_ssym, c, 0);
17653 break;
17654 case '"':
17655 p->lex.strterm = NEW_STRTERM(str_dsym, c, 0);
17656 break;
17657 default:
17658 pushback(p, c);
17659 break;
17660 }
17661 SET_LEX_STATE(EXPR_FNAME);
17662 return tSYMBEG;
17663
17664 case '/':
17665 if (IS_BEG()) {
17666 p->lex.strterm = NEW_STRTERM(str_regexp, '/', 0);
17667 return tREGEXP_BEG;
17668 }
17669 if ((c = nextc(p)) == '=') {
17670 set_yylval_id('/');
17671 SET_LEX_STATE(EXPR_BEG);
17672 return tOP_ASGN;
17673 }
17674 pushback(p, c);
17675 if (IS_SPCARG(c)) {
17676 arg_ambiguous(p, '/');
17677 p->lex.strterm = NEW_STRTERM(str_regexp, '/', 0);
17678 return tREGEXP_BEG;
17679 }
17680 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
17681 return warn_balanced('/', "/", "regexp literal");
17682
17683 case '^':
17684 if ((c = nextc(p)) == '=') {
17685 set_yylval_id('^');
17686 SET_LEX_STATE(EXPR_BEG);
17687 return tOP_ASGN;
17688 }
17689 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
17690 pushback(p, c);
17691 return '^';
17692
17693 case ';':
17694 SET_LEX_STATE(EXPR_BEG);
17695 p->command_start = TRUE;
17696 return ';';
17697
17698 case ',':
17699 SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
17700 return ',';
17701
17702 case '~':
17703 if (IS_AFTER_OPERATOR()) {
17704 if ((c = nextc(p)) != '@') {
17705 pushback(p, c);
17706 }
17707 SET_LEX_STATE(EXPR_ARG);
17708 }
17709 else {
17710 SET_LEX_STATE(EXPR_BEG);
17711 }
17712 return '~';
17713
17714 case '(':
17715 if (IS_BEG()) {
17716 c = tLPAREN;
17717 }
17718 else if (!space_seen) {
17719 /* foo( ... ) => method call, no ambiguity */
17720 }
17721 else if (IS_ARG() || IS_lex_state_all(EXPR_END|EXPR_LABEL)) {
17722 c = tLPAREN_ARG;
17723 }
17724 else if (IS_lex_state(EXPR_ENDFN) && !lambda_beginning_p()) {
17725 rb_warning0("parentheses after method name is interpreted as "
17726 "an argument list, not a decomposed argument");
17727 }
17728 p->lex.paren_nest++;
17729 COND_PUSH(0);
17730 CMDARG_PUSH(0);
17731 SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
17732 return c;
17733
17734 case '[':
17735 p->lex.paren_nest++;
17736 if (IS_AFTER_OPERATOR()) {
17737 if ((c = nextc(p)) == ']') {
17738 p->lex.paren_nest--;
17739 SET_LEX_STATE(EXPR_ARG);
17740 if ((c = nextc(p)) == '=') {
17741 return tASET;
17742 }
17743 pushback(p, c);
17744 return tAREF;
17745 }
17746 pushback(p, c);
17747 SET_LEX_STATE(EXPR_ARG|EXPR_LABEL);
17748 return '[';
17749 }
17750 else if (IS_BEG()) {
17751 c = tLBRACK;
17752 }
17753 else if (IS_ARG() && (space_seen || IS_lex_state(EXPR_LABELED))) {
17754 c = tLBRACK;
17755 }
17756 SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
17757 COND_PUSH(0);
17758 CMDARG_PUSH(0);
17759 return c;
17760
17761 case '{':
17762 ++p->lex.brace_nest;
17763 if (lambda_beginning_p())
17764 c = tLAMBEG;
17765 else if (IS_lex_state(EXPR_LABELED))
17766 c = tLBRACE; /* hash */
17767 else if (IS_lex_state(EXPR_ARG_ANY | EXPR_END | EXPR_ENDFN))
17768 c = '{'; /* block (primary) */
17769 else if (IS_lex_state(EXPR_ENDARG))
17770 c = tLBRACE_ARG; /* block (expr) */
17771 else
17772 c = tLBRACE; /* hash */
17773 if (c != tLBRACE) {
17774 p->command_start = TRUE;
17775 SET_LEX_STATE(EXPR_BEG);
17776 }
17777 else {
17778 SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
17779 }
17780 ++p->lex.paren_nest; /* after lambda_beginning_p() */
17781 COND_PUSH(0);
17782 CMDARG_PUSH(0);
17783 return c;
17784
17785 case '\\':
17786 c = nextc(p);
17787 if (c == '\n') {
17788 space_seen = 1;
17789 dispatch_scan_event(p, tSP);
17790 goto retry; /* skip \\n */
17791 }
17792 if (c == ' ') return tSP;
17793 if (ISSPACE(c)) return c;
17794 pushback(p, c);
17795 return '\\';
17796
17797 case '%':
17798 return parse_percent(p, space_seen, last_state);
17799
17800 case '$':
17801 return parse_gvar(p, last_state);
17802
17803 case '@':
17804 return parse_atmark(p, last_state);
17805
17806 case '_':
17807 if (was_bol(p) && whole_match_p(p, "__END__", 7, 0)) {
17808 p->ruby__end__seen = 1;
17809 p->eofp = 1;
17810#ifndef RIPPER
17811 return -1;
17812#else
17813 lex_goto_eol(p);
17814 dispatch_scan_event(p, k__END__);
17815 return 0;
17816#endif
17817 }
17818 newtok(p);
17819 break;
17820
17821 default:
17822 if (!parser_is_identchar(p)) {
17823 compile_error(p, "Invalid char `\\x%02X' in expression", c);
17824 token_flush(p);
17825 goto retry;
17826 }
17827
17828 newtok(p);
17829 break;
17830 }
17831
17832 return parse_ident(p, c, cmd_state);
17833}
17834
17835static enum yytokentype
17836yylex(YYSTYPE *lval, YYLTYPE *yylloc, struct parser_params *p)
17837{
17838 enum yytokentype t;
17839
17840 p->lval = lval;
17841 lval->val = Qundef;
17842 t = parser_yylex(p);
17843
17844 if (p->lex.strterm && (p->lex.strterm->flags & STRTERM_HEREDOC))
17845 RUBY_SET_YYLLOC_FROM_STRTERM_HEREDOC(*yylloc);
17846 else
17847 RUBY_SET_YYLLOC(*yylloc);
17848
17849 if (has_delayed_token(p))
17850 dispatch_delayed_token(p, t);
17851 else if (t != 0)
17852 dispatch_scan_event(p, t);
17853
17854 return t;
17855}
17856
17857#define LVAR_USED ((ID)1 << (sizeof(ID) * CHAR_BIT - 1))
17858
17859static NODE*
17860node_newnode(struct parser_params *p, enum node_type type, VALUE a0, VALUE a1, VALUE a2, const rb_code_location_t *loc)
17861{
17862 NODE *n = rb_ast_newnode(p->ast, type);
17863
17864 rb_node_init(n, type, a0, a1, a2);
17865
17866 nd_set_loc(n, loc);
17867 nd_set_node_id(n, parser_get_node_id(p));
17868 return n;
17869}
17870
17871static NODE *
17872nd_set_loc(NODE *nd, const YYLTYPE *loc)
17873{
17874 nd->nd_loc = *loc;
17875 nd_set_line(nd, loc->beg_pos.lineno);
17876 return nd;
17877}
17878
17879#ifndef RIPPER
17880static enum node_type
17881nodetype(NODE *node) /* for debug */
17882{
17883 return (enum node_type)nd_type(node);
17884}
17885
17886static int
17887nodeline(NODE *node)
17888{
17889 return nd_line(node);
17890}
17891
17892static NODE*
17893newline_node(NODE *node)
17894{
17895 if (node) {
17896 node = remove_begin(node);
17897 node->flags |= NODE_FL_NEWLINE;
17898 }
17899 return node;
17900}
17901
17902static void
17903fixpos(NODE *node, NODE *orig)
17904{
17905 if (!node) return;
17906 if (!orig) return;
17907 nd_set_line(node, nd_line(orig));
17908}
17909
17910static void
17911parser_warning(struct parser_params *p, NODE *node, const char *mesg)
17912{
17913 rb_compile_warning(p->ruby_sourcefile, nd_line(node), "%s", mesg);
17914}
17915
17916static void
17917parser_warn(struct parser_params *p, NODE *node, const char *mesg)
17918{
17919 rb_compile_warn(p->ruby_sourcefile, nd_line(node), "%s", mesg);
17920}
17921
17922static NODE*
17923block_append(struct parser_params *p, NODE *head, NODE *tail)
17924{
17925 NODE *end, *h = head, *nd;
17926
17927 if (tail == 0) return head;
17928
17929 if (h == 0) return tail;
17930 switch (nd_type(h)) {
17931 case NODE_LIT:
17932 case NODE_STR:
17933 case NODE_SELF:
17934 case NODE_TRUE:
17935 case NODE_FALSE:
17936 case NODE_NIL:
17937 parser_warning(p, h, "unused literal ignored");
17938 return tail;
17939 default:
17940 h = end = NEW_BLOCK(head, &head->nd_loc);
17941 end->nd_end = end;
17942 head = end;
17943 break;
17944 case NODE_BLOCK:
17945 end = h->nd_end;
17946 break;
17947 }
17948
17949 nd = end->nd_head;
17950 switch (nd_type(nd)) {
17951 case NODE_RETURN:
17952 case NODE_BREAK:
17953 case NODE_NEXT:
17954 case NODE_REDO:
17955 case NODE_RETRY:
17956 if (RTEST(ruby_verbose)) {
17957 parser_warning(p, tail, "statement not reached");
17958 }
17959 break;
17960
17961 default:
17962 break;
17963 }
17964
17965 if (!nd_type_p(tail, NODE_BLOCK)) {
17966 tail = NEW_BLOCK(tail, &tail->nd_loc);
17967 tail->nd_end = tail;
17968 }
17969 end->nd_next = tail;
17970 h->nd_end = tail->nd_end;
17971 nd_set_last_loc(head, nd_last_loc(tail));
17972 return head;
17973}
17974
17975/* append item to the list */
17976static NODE*
17977list_append(struct parser_params *p, NODE *list, NODE *item)
17978{
17979 NODE *last;
17980
17981 if (list == 0) return NEW_LIST(item, &item->nd_loc);
17982 if (list->nd_next) {
17983 last = list->nd_next->nd_end;
17984 }
17985 else {
17986 last = list;
17987 }
17988
17989 list->nd_alen += 1;
17990 last->nd_next = NEW_LIST(item, &item->nd_loc);
17991 list->nd_next->nd_end = last->nd_next;
17992
17993 nd_set_last_loc(list, nd_last_loc(item));
17994
17995 return list;
17996}
17997
17998/* concat two lists */
17999static NODE*
18000list_concat(NODE *head, NODE *tail)
18001{
18002 NODE *last;
18003
18004 if (head->nd_next) {
18005 last = head->nd_next->nd_end;
18006 }
18007 else {
18008 last = head;
18009 }
18010
18011 head->nd_alen += tail->nd_alen;
18012 last->nd_next = tail;
18013 if (tail->nd_next) {
18014 head->nd_next->nd_end = tail->nd_next->nd_end;
18015 }
18016 else {
18017 head->nd_next->nd_end = tail;
18018 }
18019
18020 nd_set_last_loc(head, nd_last_loc(tail));
18021
18022 return head;
18023}
18024
18025static int
18026literal_concat0(struct parser_params *p, VALUE head, VALUE tail)
18027{
18028 if (NIL_P(tail)) return 1;
18029 if (!rb_enc_compatible(head, tail)) {
18030 compile_error(p, "string literal encodings differ (%s / %s)",
18031 rb_enc_name(rb_enc_get(head)),
18032 rb_enc_name(rb_enc_get(tail)));
18033 rb_str_resize(head, 0);
18034 rb_str_resize(tail, 0);
18035 return 0;
18036 }
18037 rb_str_buf_append(head, tail);
18038 return 1;
18039}
18040
18041static VALUE
18042string_literal_head(enum node_type htype, NODE *head)
18043{
18044 if (htype != NODE_DSTR) return Qfalse;
18045 if (head->nd_next) {
18046 head = head->nd_next->nd_end->nd_head;
18047 if (!head || !nd_type_p(head, NODE_STR)) return Qfalse;
18048 }
18049 const VALUE lit = head->nd_lit;
18050 ASSUME(lit != Qfalse);
18051 return lit;
18052}
18053
18054/* concat two string literals */
18055static NODE *
18056literal_concat(struct parser_params *p, NODE *head, NODE *tail, const YYLTYPE *loc)
18057{
18058 enum node_type htype;
18059 VALUE lit;
18060
18061 if (!head) return tail;
18062 if (!tail) return head;
18063
18064 htype = nd_type(head);
18065 if (htype == NODE_EVSTR) {
18066 head = new_dstr(p, head, loc);
18067 htype = NODE_DSTR;
18068 }
18069 if (p->heredoc_indent > 0) {
18070 switch (htype) {
18071 case NODE_STR:
18072 nd_set_type(head, NODE_DSTR);
18073 case NODE_DSTR:
18074 return list_append(p, head, tail);
18075 default:
18076 break;
18077 }
18078 }
18079 switch (nd_type(tail)) {
18080 case NODE_STR:
18081 if ((lit = string_literal_head(htype, head)) != Qfalse) {
18082 htype = NODE_STR;
18083 }
18084 else {
18085 lit = head->nd_lit;
18086 }
18087 if (htype == NODE_STR) {
18088 if (!literal_concat0(p, lit, tail->nd_lit)) {
18089 error:
18090 rb_discard_node(p, head);
18091 rb_discard_node(p, tail);
18092 return 0;
18093 }
18094 rb_discard_node(p, tail);
18095 }
18096 else {
18097 list_append(p, head, tail);
18098 }
18099 break;
18100
18101 case NODE_DSTR:
18102 if (htype == NODE_STR) {
18103 if (!literal_concat0(p, head->nd_lit, tail->nd_lit))
18104 goto error;
18105 tail->nd_lit = head->nd_lit;
18106 rb_discard_node(p, head);
18107 head = tail;
18108 }
18109 else if (NIL_P(tail->nd_lit)) {
18110 append:
18111 head->nd_alen += tail->nd_alen - 1;
18112 if (!head->nd_next) {
18113 head->nd_next = tail->nd_next;
18114 }
18115 else if (tail->nd_next) {
18116 head->nd_next->nd_end->nd_next = tail->nd_next;
18117 head->nd_next->nd_end = tail->nd_next->nd_end;
18118 }
18119 rb_discard_node(p, tail);
18120 }
18121 else if ((lit = string_literal_head(htype, head)) != Qfalse) {
18122 if (!literal_concat0(p, lit, tail->nd_lit))
18123 goto error;
18124 tail->nd_lit = Qnil;
18125 goto append;
18126 }
18127 else {
18128 list_concat(head, NEW_NODE(NODE_LIST, NEW_STR(tail->nd_lit, loc), tail->nd_alen, tail->nd_next, loc));
18129 }
18130 break;
18131
18132 case NODE_EVSTR:
18133 if (htype == NODE_STR) {
18134 nd_set_type(head, NODE_DSTR);
18135 head->nd_alen = 1;
18136 }
18137 list_append(p, head, tail);
18138 break;
18139 }
18140 return head;
18141}
18142
18143static NODE *
18144evstr2dstr(struct parser_params *p, NODE *node)
18145{
18146 if (nd_type_p(node, NODE_EVSTR)) {
18147 node = new_dstr(p, node, &node->nd_loc);
18148 }
18149 return node;
18150}
18151
18152static NODE *
18153new_evstr(struct parser_params *p, NODE *node, const YYLTYPE *loc)
18154{
18155 NODE *head = node;
18156
18157 if (node) {
18158 switch (nd_type(node)) {
18159 case NODE_STR:
18160 nd_set_type(node, NODE_DSTR);
18161 return node;
18162 case NODE_DSTR:
18163 break;
18164 case NODE_EVSTR:
18165 return node;
18166 }
18167 }
18168 return NEW_EVSTR(head, loc);
18169}
18170
18171static NODE *
18172new_dstr(struct parser_params *p, NODE *node, const YYLTYPE *loc)
18173{
18174 VALUE lit = STR_NEW0();
18175 NODE *dstr = NEW_DSTR(lit, loc);
18176 RB_OBJ_WRITTEN(p->ast, Qnil, lit);
18177 return list_append(p, dstr, node);
18178}
18179
18180static NODE *
18181call_bin_op(struct parser_params *p, NODE *recv, ID id, NODE *arg1,
18182 const YYLTYPE *op_loc, const YYLTYPE *loc)
18183{
18184 NODE *expr;
18185 value_expr(recv);
18186 value_expr(arg1);
18187 expr = NEW_OPCALL(recv, id, NEW_LIST(arg1, &arg1->nd_loc), loc);
18188 nd_set_line(expr, op_loc->beg_pos.lineno);
18189 return expr;
18190}
18191
18192static NODE *
18193call_uni_op(struct parser_params *p, NODE *recv, ID id, const YYLTYPE *op_loc, const YYLTYPE *loc)
18194{
18195 NODE *opcall;
18196 value_expr(recv);
18197 opcall = NEW_OPCALL(recv, id, 0, loc);
18198 nd_set_line(opcall, op_loc->beg_pos.lineno);
18199 return opcall;
18200}
18201
18202static NODE *
18203new_qcall(struct parser_params* p, ID atype, NODE *recv, ID mid, NODE *args, const YYLTYPE *op_loc, const YYLTYPE *loc)
18204{
18205 NODE *qcall = NEW_QCALL(atype, recv, mid, args, loc);
18206 nd_set_line(qcall, op_loc->beg_pos.lineno);
18207 return qcall;
18208}
18209
18210static NODE*
18211new_command_qcall(struct parser_params* p, ID atype, NODE *recv, ID mid, NODE *args, NODE *block, const YYLTYPE *op_loc, const YYLTYPE *loc)
18212{
18213 NODE *ret;
18214 if (block) block_dup_check(p, args, block);
18215 ret = new_qcall(p, atype, recv, mid, args, op_loc, loc);
18216 if (block) ret = method_add_block(p, ret, block, loc);
18217 fixpos(ret, recv);
18218 return ret;
18219}
18220
18221#define nd_once_body(node) (nd_type_p((node), NODE_ONCE) ? (node)->nd_body : node)
18222static NODE*
18223match_op(struct parser_params *p, NODE *node1, NODE *node2, const YYLTYPE *op_loc, const YYLTYPE *loc)
18224{
18225 NODE *n;
18226 int line = op_loc->beg_pos.lineno;
18227
18228 value_expr(node1);
18229 value_expr(node2);
18230 if (node1 && (n = nd_once_body(node1)) != 0) {
18231 switch (nd_type(n)) {
18232 case NODE_DREGX:
18233 {
18234 NODE *match = NEW_MATCH2(node1, node2, loc);
18235 nd_set_line(match, line);
18236 return match;
18237 }
18238
18239 case NODE_LIT:
18240 if (RB_TYPE_P(n->nd_lit, T_REGEXP)) {
18241 const VALUE lit = n->nd_lit;
18242 NODE *match = NEW_MATCH2(node1, node2, loc);
18243 match->nd_args = reg_named_capture_assign(p, lit, loc);
18244 nd_set_line(match, line);
18245 return match;
18246 }
18247 }
18248 }
18249
18250 if (node2 && (n = nd_once_body(node2)) != 0) {
18251 NODE *match3;
18252
18253 switch (nd_type(n)) {
18254 case NODE_LIT:
18255 if (!RB_TYPE_P(n->nd_lit, T_REGEXP)) break;
18256 /* fallthru */
18257 case NODE_DREGX:
18258 match3 = NEW_MATCH3(node2, node1, loc);
18259 return match3;
18260 }
18261 }
18262
18263 n = NEW_CALL(node1, tMATCH, NEW_LIST(node2, &node2->nd_loc), loc);
18264 nd_set_line(n, line);
18265 return n;
18266}
18267
18268# if WARN_PAST_SCOPE
18269static int
18270past_dvar_p(struct parser_params *p, ID id)
18271{
18272 struct vtable *past = p->lvtbl->past;
18273 while (past) {
18274 if (vtable_included(past, id)) return 1;
18275 past = past->prev;
18276 }
18277 return 0;
18278}
18279# endif
18280
18281static int
18282numparam_nested_p(struct parser_params *p)
18283{
18284 struct local_vars *local = p->lvtbl;
18285 NODE *outer = local->numparam.outer;
18286 NODE *inner = local->numparam.inner;
18287 if (outer || inner) {
18288 NODE *used = outer ? outer : inner;
18289 compile_error(p, "numbered parameter is already used in\n"
18290 "%s:%d: %s block here",
18291 p->ruby_sourcefile, nd_line(used),
18292 outer ? "outer" : "inner");
18293 parser_show_error_line(p, &used->nd_loc);
18294 return 1;
18295 }
18296 return 0;
18297}
18298
18299static NODE*
18300gettable(struct parser_params *p, ID id, const YYLTYPE *loc)
18301{
18302 ID *vidp = NULL;
18303 NODE *node;
18304 switch (id) {
18305 case keyword_self:
18306 return NEW_SELF(loc);
18307 case keyword_nil:
18308 return NEW_NIL(loc);
18309 case keyword_true:
18310 return NEW_TRUE(loc);
18311 case keyword_false:
18312 return NEW_FALSE(loc);
18313 case keyword__FILE__:
18314 {
18315 VALUE file = p->ruby_sourcefile_string;
18316 if (NIL_P(file))
18317 file = rb_str_new(0, 0);
18318 else
18319 file = rb_str_dup(file);
18320 node = NEW_STR(file, loc);
18321 RB_OBJ_WRITTEN(p->ast, Qnil, file);
18322 }
18323 return node;
18324 case keyword__LINE__:
18325 return NEW_LIT(INT2FIX(p->tokline), loc);
18326 case keyword__ENCODING__:
18327 node = NEW_LIT(rb_enc_from_encoding(p->enc), loc);
18328 RB_OBJ_WRITTEN(p->ast, Qnil, node->nd_lit);
18329 return node;
18330
18331 }
18332 switch (id_type(id)) {
18333 case ID_LOCAL:
18334 if (dyna_in_block(p) && dvar_defined_ref(p, id, &vidp)) {
18335 if (NUMPARAM_ID_P(id) && numparam_nested_p(p)) return 0;
18336 if (id == p->cur_arg) {
18337 compile_error(p, "circular argument reference - %"PRIsWARN, rb_id2str(id));
18338 return 0;
18339 }
18340 if (vidp) *vidp |= LVAR_USED;
18341 node = NEW_DVAR(id, loc);
18342 return node;
18343 }
18344 if (local_id_ref(p, id, &vidp)) {
18345 if (id == p->cur_arg) {
18346 compile_error(p, "circular argument reference - %"PRIsWARN, rb_id2str(id));
18347 return 0;
18348 }
18349 if (vidp) *vidp |= LVAR_USED;
18350 node = NEW_LVAR(id, loc);
18351 return node;
18352 }
18353 if (dyna_in_block(p) && NUMPARAM_ID_P(id) &&
18354 parser_numbered_param(p, NUMPARAM_ID_TO_IDX(id))) {
18355 if (numparam_nested_p(p)) return 0;
18356 node = NEW_DVAR(id, loc);
18357 struct local_vars *local = p->lvtbl;
18358 if (!local->numparam.current) local->numparam.current = node;
18359 return node;
18360 }
18361# if WARN_PAST_SCOPE
18362 if (!p->ctxt.in_defined && RTEST(ruby_verbose) && past_dvar_p(p, id)) {
18363 rb_warning1("possible reference to past scope - %"PRIsWARN, rb_id2str(id));
18364 }
18365# endif
18366 /* method call without arguments */
18367 return NEW_VCALL(id, loc);
18368 case ID_GLOBAL:
18369 return NEW_GVAR(id, loc);
18370 case ID_INSTANCE:
18371 return NEW_IVAR(id, loc);
18372 case ID_CONST:
18373 return NEW_CONST(id, loc);
18374 case ID_CLASS:
18375 return NEW_CVAR(id, loc);
18376 }
18377 compile_error(p, "identifier %"PRIsVALUE" is not valid to get", rb_id2str(id));
18378 return 0;
18379}
18380
18381static NODE *
18382opt_arg_append(NODE *opt_list, NODE *opt)
18383{
18384 NODE *opts = opt_list;
18385 opts->nd_loc.end_pos = opt->nd_loc.end_pos;
18386
18387 while (opts->nd_next) {
18388 opts = opts->nd_next;
18389 opts->nd_loc.end_pos = opt->nd_loc.end_pos;
18390 }
18391 opts->nd_next = opt;
18392
18393 return opt_list;
18394}
18395
18396static NODE *
18397kwd_append(NODE *kwlist, NODE *kw)
18398{
18399 if (kwlist) {
18400 NODE *kws = kwlist;
18401 kws->nd_loc.end_pos = kw->nd_loc.end_pos;
18402 while (kws->nd_next) {
18403 kws = kws->nd_next;
18404 kws->nd_loc.end_pos = kw->nd_loc.end_pos;
18405 }
18406 kws->nd_next = kw;
18407 }
18408 return kwlist;
18409}
18410
18411static NODE *
18412new_defined(struct parser_params *p, NODE *expr, const YYLTYPE *loc)
18413{
18414 return NEW_DEFINED(remove_begin_all(expr), loc);
18415}
18416
18417static NODE*
18418symbol_append(struct parser_params *p, NODE *symbols, NODE *symbol)
18419{
18420 enum node_type type = nd_type(symbol);
18421 switch (type) {
18422 case NODE_DSTR:
18423 nd_set_type(symbol, NODE_DSYM);
18424 break;
18425 case NODE_STR:
18426 nd_set_type(symbol, NODE_LIT);
18427 RB_OBJ_WRITTEN(p->ast, Qnil, symbol->nd_lit = rb_str_intern(symbol->nd_lit));
18428 break;
18429 default:
18430 compile_error(p, "unexpected node as symbol: %s", ruby_node_name(type));
18431 }
18432 return list_append(p, symbols, symbol);
18433}
18434
18435static NODE *
18436new_regexp(struct parser_params *p, NODE *node, int options, const YYLTYPE *loc)
18437{
18438 NODE *list, *prev;
18439 VALUE lit;
18440
18441 if (!node) {
18442 node = NEW_LIT(reg_compile(p, STR_NEW0(), options), loc);
18443 RB_OBJ_WRITTEN(p->ast, Qnil, node->nd_lit);
18444 return node;
18445 }
18446 switch (nd_type(node)) {
18447 case NODE_STR:
18448 {
18449 VALUE src = node->nd_lit;
18450 nd_set_type(node, NODE_LIT);
18451 nd_set_loc(node, loc);
18452 RB_OBJ_WRITTEN(p->ast, Qnil, node->nd_lit = reg_compile(p, src, options));
18453 }
18454 break;
18455 default:
18456 lit = STR_NEW0();
18457 node = NEW_NODE(NODE_DSTR, lit, 1, NEW_LIST(node, loc), loc);
18458 RB_OBJ_WRITTEN(p->ast, Qnil, lit);
18459 /* fall through */
18460 case NODE_DSTR:
18461 nd_set_type(node, NODE_DREGX);
18462 nd_set_loc(node, loc);
18463 node->nd_cflag = options & RE_OPTION_MASK;
18464 if (!NIL_P(node->nd_lit)) reg_fragment_check(p, node->nd_lit, options);
18465 for (list = (prev = node)->nd_next; list; list = list->nd_next) {
18466 NODE *frag = list->nd_head;
18467 enum node_type type = nd_type(frag);
18468 if (type == NODE_STR || (type == NODE_DSTR && !frag->nd_next)) {
18469 VALUE tail = frag->nd_lit;
18470 if (reg_fragment_check(p, tail, options) && prev && !NIL_P(prev->nd_lit)) {
18471 VALUE lit = prev == node ? prev->nd_lit : prev->nd_head->nd_lit;
18472 if (!literal_concat0(p, lit, tail)) {
18473 return NEW_NIL(loc); /* dummy node on error */
18474 }
18475 rb_str_resize(tail, 0);
18476 prev->nd_next = list->nd_next;
18477 rb_discard_node(p, list->nd_head);
18478 rb_discard_node(p, list);
18479 list = prev;
18480 }
18481 else {
18482 prev = list;
18483 }
18484 }
18485 else {
18486 prev = 0;
18487 }
18488 }
18489 if (!node->nd_next) {
18490 VALUE src = node->nd_lit;
18491 nd_set_type(node, NODE_LIT);
18492 RB_OBJ_WRITTEN(p->ast, Qnil, node->nd_lit = reg_compile(p, src, options));
18493 }
18494 if (options & RE_OPTION_ONCE) {
18495 node = NEW_NODE(NODE_ONCE, 0, node, 0, loc);
18496 }
18497 break;
18498 }
18499 return node;
18500}
18501
18502static NODE *
18503new_kw_arg(struct parser_params *p, NODE *k, const YYLTYPE *loc)
18504{
18505 if (!k) return 0;
18506 return NEW_KW_ARG(0, (k), loc);
18507}
18508
18509static NODE *
18510new_xstring(struct parser_params *p, NODE *node, const YYLTYPE *loc)
18511{
18512 if (!node) {
18513 VALUE lit = STR_NEW0();
18514 NODE *xstr = NEW_XSTR(lit, loc);
18515 RB_OBJ_WRITTEN(p->ast, Qnil, lit);
18516 return xstr;
18517 }
18518 switch (nd_type(node)) {
18519 case NODE_STR:
18520 nd_set_type(node, NODE_XSTR);
18521 nd_set_loc(node, loc);
18522 break;
18523 case NODE_DSTR:
18524 nd_set_type(node, NODE_DXSTR);
18525 nd_set_loc(node, loc);
18526 break;
18527 default:
18528 node = NEW_NODE(NODE_DXSTR, Qnil, 1, NEW_LIST(node, loc), loc);
18529 break;
18530 }
18531 return node;
18532}
18533
18534static void
18535check_literal_when(struct parser_params *p, NODE *arg, const YYLTYPE *loc)
18536{
18537 VALUE lit;
18538
18539 if (!arg || !p->case_labels) return;
18540
18541 lit = rb_node_case_when_optimizable_literal(arg);
18542 if (lit == Qundef) return;
18543 if (nd_type_p(arg, NODE_STR)) {
18544 RB_OBJ_WRITTEN(p->ast, Qnil, arg->nd_lit = lit);
18545 }
18546
18547 if (NIL_P(p->case_labels)) {
18548 p->case_labels = rb_obj_hide(rb_hash_new());
18549 }
18550 else {
18551 VALUE line = rb_hash_lookup(p->case_labels, lit);
18552 if (!NIL_P(line)) {
18553 rb_warning1("duplicated `when' clause with line %d is ignored",
18554 WARN_IVAL(line));
18555 return;
18556 }
18557 }
18558 rb_hash_aset(p->case_labels, lit, INT2NUM(p->ruby_sourceline));
18559}
18560
18561#else /* !RIPPER */
18562static int
18563id_is_var(struct parser_params *p, ID id)
18564{
18565 if (is_notop_id(id)) {
18566 switch (id & ID_SCOPE_MASK) {
18567 case ID_GLOBAL: case ID_INSTANCE: case ID_CONST: case ID_CLASS:
18568 return 1;
18569 case ID_LOCAL:
18570 if (dyna_in_block(p)) {
18571 if (NUMPARAM_ID_P(id) || dvar_defined(p, id)) return 1;
18572 }
18573 if (local_id(p, id)) return 1;
18574 /* method call without arguments */
18575 return 0;
18576 }
18577 }
18578 compile_error(p, "identifier %"PRIsVALUE" is not valid to get", rb_id2str(id));
18579 return 0;
18580}
18581
18582static VALUE
18583new_regexp(struct parser_params *p, VALUE re, VALUE opt, const YYLTYPE *loc)
18584{
18585 VALUE src = 0, err;
18586 int options = 0;
18587 if (ripper_is_node_yylval(re)) {
18588 src = RNODE(re)->nd_cval;
18589 re = RNODE(re)->nd_rval;
18590 }
18591 if (ripper_is_node_yylval(opt)) {
18592 options = (int)RNODE(opt)->nd_tag;
18593 opt = RNODE(opt)->nd_rval;
18594 }
18595 if (src && NIL_P(parser_reg_compile(p, src, options, &err))) {
18596 compile_error(p, "%"PRIsVALUE, err);
18597 }
18598 return dispatch2(regexp_literal, re, opt);
18599}
18600#endif /* !RIPPER */
18601
18602static inline enum lex_state_e
18603parser_set_lex_state(struct parser_params *p, enum lex_state_e ls, int line)
18604{
18605 if (p->debug) {
18606 ls = rb_parser_trace_lex_state(p, p->lex.state, ls, line);
18607 }
18608 return p->lex.state = ls;
18609}
18610
18611#ifndef RIPPER
18612static const char rb_parser_lex_state_names[][8] = {
18613 "BEG", "END", "ENDARG", "ENDFN", "ARG",
18614 "CMDARG", "MID", "FNAME", "DOT", "CLASS",
18615 "LABEL", "LABELED","FITEM",
18616};
18617
18618static VALUE
18619append_lex_state_name(enum lex_state_e state, VALUE buf)
18620{
18621 int i, sep = 0;
18622 unsigned int mask = 1;
18623 static const char none[] = "NONE";
18624
18625 for (i = 0; i < EXPR_MAX_STATE; ++i, mask <<= 1) {
18626 if ((unsigned)state & mask) {
18627 if (sep) {
18628 rb_str_cat(buf, "|", 1);
18629 }
18630 sep = 1;
18631 rb_str_cat_cstr(buf, rb_parser_lex_state_names[i]);
18632 }
18633 }
18634 if (!sep) {
18635 rb_str_cat(buf, none, sizeof(none)-1);
18636 }
18637 return buf;
18638}
18639
18640static void
18641flush_debug_buffer(struct parser_params *p, VALUE out, VALUE str)
18642{
18643 VALUE mesg = p->debug_buffer;
18644
18645 if (!NIL_P(mesg) && RSTRING_LEN(mesg)) {
18646 p->debug_buffer = Qnil;
18647 rb_io_puts(1, &mesg, out);
18648 }
18649 if (!NIL_P(str) && RSTRING_LEN(str)) {
18650 rb_io_write(p->debug_output, str);
18651 }
18652}
18653
18654enum lex_state_e
18655rb_parser_trace_lex_state(struct parser_params *p, enum lex_state_e from,
18656 enum lex_state_e to, int line)
18657{
18658 VALUE mesg;
18659 mesg = rb_str_new_cstr("lex_state: ");
18660 append_lex_state_name(from, mesg);
18661 rb_str_cat_cstr(mesg, " -> ");
18662 append_lex_state_name(to, mesg);
18663 rb_str_catf(mesg, " at line %d\n", line);
18664 flush_debug_buffer(p, p->debug_output, mesg);
18665 return to;
18666}
18667
18668VALUE
18669rb_parser_lex_state_name(enum lex_state_e state)
18670{
18671 return rb_fstring(append_lex_state_name(state, rb_str_new(0, 0)));
18672}
18673
18674static void
18675append_bitstack_value(stack_type stack, VALUE mesg)
18676{
18677 if (stack == 0) {
18678 rb_str_cat_cstr(mesg, "0");
18679 }
18680 else {
18681 stack_type mask = (stack_type)1U << (CHAR_BIT * sizeof(stack_type) - 1);
18682 for (; mask && !(stack & mask); mask >>= 1) continue;
18683 for (; mask; mask >>= 1) rb_str_cat(mesg, stack & mask ? "1" : "0", 1);
18684 }
18685}
18686
18687void
18688rb_parser_show_bitstack(struct parser_params *p, stack_type stack,
18689 const char *name, int line)
18690{
18691 VALUE mesg = rb_sprintf("%s: ", name);
18692 append_bitstack_value(stack, mesg);
18693 rb_str_catf(mesg, " at line %d\n", line);
18694 flush_debug_buffer(p, p->debug_output, mesg);
18695}
18696
18697void
18698rb_parser_fatal(struct parser_params *p, const char *fmt, ...)
18699{
18700 va_list ap;
18701 VALUE mesg = rb_str_new_cstr("internal parser error: ");
18702
18703 va_start(ap, fmt);
18704 rb_str_vcatf(mesg, fmt, ap);
18705 va_end(ap);
18706 yyerror0(RSTRING_PTR(mesg));
18707 RB_GC_GUARD(mesg);
18708
18709 mesg = rb_str_new(0, 0);
18710 append_lex_state_name(p->lex.state, mesg);
18711 compile_error(p, "lex.state: %"PRIsVALUE, mesg);
18712 rb_str_resize(mesg, 0);
18713 append_bitstack_value(p->cond_stack, mesg);
18714 compile_error(p, "cond_stack: %"PRIsVALUE, mesg);
18715 rb_str_resize(mesg, 0);
18716 append_bitstack_value(p->cmdarg_stack, mesg);
18717 compile_error(p, "cmdarg_stack: %"PRIsVALUE, mesg);
18718 if (p->debug_output == rb_ractor_stdout())
18719 p->debug_output = rb_ractor_stderr();
18720 p->debug = TRUE;
18721}
18722
18723static YYLTYPE *
18724rb_parser_set_pos(YYLTYPE *yylloc, int sourceline, int beg_pos, int end_pos)
18725{
18726 yylloc->beg_pos.lineno = sourceline;
18727 yylloc->beg_pos.column = beg_pos;
18728 yylloc->end_pos.lineno = sourceline;
18729 yylloc->end_pos.column = end_pos;
18730 return yylloc;
18731}
18732
18733YYLTYPE *
18734rb_parser_set_location_from_strterm_heredoc(struct parser_params *p, rb_strterm_heredoc_t *here, YYLTYPE *yylloc)
18735{
18736 int sourceline = here->sourceline;
18737 int beg_pos = (int)here->offset - here->quote
18738 - (rb_strlen_lit("<<-") - !(here->func & STR_FUNC_INDENT));
18739 int end_pos = (int)here->offset + here->length + here->quote;
18740
18741 return rb_parser_set_pos(yylloc, sourceline, beg_pos, end_pos);
18742}
18743
18744YYLTYPE *
18745rb_parser_set_location_of_none(struct parser_params *p, YYLTYPE *yylloc)
18746{
18747 int sourceline = p->ruby_sourceline;
18748 int beg_pos = (int)(p->lex.ptok - p->lex.pbeg);
18749 int end_pos = (int)(p->lex.ptok - p->lex.pbeg);
18750 return rb_parser_set_pos(yylloc, sourceline, beg_pos, end_pos);
18751}
18752
18753YYLTYPE *
18754rb_parser_set_location(struct parser_params *p, YYLTYPE *yylloc)
18755{
18756 int sourceline = p->ruby_sourceline;
18757 int beg_pos = (int)(p->lex.ptok - p->lex.pbeg);
18758 int end_pos = (int)(p->lex.pcur - p->lex.pbeg);
18759 return rb_parser_set_pos(yylloc, sourceline, beg_pos, end_pos);
18760}
18761#endif /* !RIPPER */
18762
18763static int
18764assignable0(struct parser_params *p, ID id, const char **err)
18765{
18766 if (!id) return -1;
18767 switch (id) {
18768 case keyword_self:
18769 *err = "Can't change the value of self";
18770 return -1;
18771 case keyword_nil:
18772 *err = "Can't assign to nil";
18773 return -1;
18774 case keyword_true:
18775 *err = "Can't assign to true";
18776 return -1;
18777 case keyword_false:
18778 *err = "Can't assign to false";
18779 return -1;
18780 case keyword__FILE__:
18781 *err = "Can't assign to __FILE__";
18782 return -1;
18783 case keyword__LINE__:
18784 *err = "Can't assign to __LINE__";
18785 return -1;
18786 case keyword__ENCODING__:
18787 *err = "Can't assign to __ENCODING__";
18788 return -1;
18789 }
18790 switch (id_type(id)) {
18791 case ID_LOCAL:
18792 if (dyna_in_block(p)) {
18793 if (p->max_numparam > NO_PARAM && NUMPARAM_ID_P(id)) {
18794 compile_error(p, "Can't assign to numbered parameter _%d",
18795 NUMPARAM_ID_TO_IDX(id));
18796 return -1;
18797 }
18798 if (dvar_curr(p, id)) return NODE_DASGN;
18799 if (dvar_defined(p, id)) return NODE_DASGN;
18800 if (local_id(p, id)) return NODE_LASGN;
18801 dyna_var(p, id);
18802 return NODE_DASGN;
18803 }
18804 else {
18805 if (!local_id(p, id)) local_var(p, id);
18806 return NODE_LASGN;
18807 }
18808 break;
18809 case ID_GLOBAL: return NODE_GASGN;
18810 case ID_INSTANCE: return NODE_IASGN;
18811 case ID_CONST:
18812 if (!p->ctxt.in_def) return NODE_CDECL;
18813 *err = "dynamic constant assignment";
18814 return -1;
18815 case ID_CLASS: return NODE_CVASGN;
18816 default:
18817 compile_error(p, "identifier %"PRIsVALUE" is not valid to set", rb_id2str(id));
18818 }
18819 return -1;
18820}
18821
18822#ifndef RIPPER
18823static NODE*
18824assignable(struct parser_params *p, ID id, NODE *val, const YYLTYPE *loc)
18825{
18826 const char *err = 0;
18827 int node_type = assignable0(p, id, &err);
18828 switch (node_type) {
18829 case NODE_DASGN: return NEW_DASGN(id, val, loc);
18830 case NODE_LASGN: return NEW_LASGN(id, val, loc);
18831 case NODE_GASGN: return NEW_GASGN(id, val, loc);
18832 case NODE_IASGN: return NEW_IASGN(id, val, loc);
18833 case NODE_CDECL: return NEW_CDECL(id, val, 0, loc);
18834 case NODE_CVASGN: return NEW_CVASGN(id, val, loc);
18835 }
18836 if (err) yyerror1(loc, err);
18837 return NEW_BEGIN(0, loc);
18838}
18839#else
18840static VALUE
18841assignable(struct parser_params *p, VALUE lhs)
18842{
18843 const char *err = 0;
18844 assignable0(p, get_id(lhs), &err);
18845 if (err) lhs = assign_error(p, err, lhs);
18846 return lhs;
18847}
18848#endif
18849
18850static int
18851is_private_local_id(ID name)
18852{
18853 VALUE s;
18854 if (name == idUScore) return 1;
18855 if (!is_local_id(name)) return 0;
18856 s = rb_id2str(name);
18857 if (!s) return 0;
18858 return RSTRING_PTR(s)[0] == '_';
18859}
18860
18861static int
18862shadowing_lvar_0(struct parser_params *p, ID name)
18863{
18864 if (dyna_in_block(p)) {
18865 if (dvar_curr(p, name)) {
18866 if (is_private_local_id(name)) return 1;
18867 yyerror0("duplicated argument name");
18868 }
18869 else if (dvar_defined(p, name) || local_id(p, name)) {
18870 vtable_add(p->lvtbl->vars, name);
18871 if (p->lvtbl->used) {
18872 vtable_add(p->lvtbl->used, (ID)p->ruby_sourceline | LVAR_USED);
18873 }
18874 return 0;
18875 }
18876 }
18877 else {
18878 if (local_id(p, name)) {
18879 if (is_private_local_id(name)) return 1;
18880 yyerror0("duplicated argument name");
18881 }
18882 }
18883 return 1;
18884}
18885
18886static ID
18887shadowing_lvar(struct parser_params *p, ID name)
18888{
18889 shadowing_lvar_0(p, name);
18890 return name;
18891}
18892
18893static void
18894new_bv(struct parser_params *p, ID name)
18895{
18896 if (!name) return;
18897 if (!is_local_id(name)) {
18898 compile_error(p, "invalid local variable - %"PRIsVALUE,
18899 rb_id2str(name));
18900 return;
18901 }
18902 if (!shadowing_lvar_0(p, name)) return;
18903 dyna_var(p, name);
18904}
18905
18906#ifndef RIPPER
18907static NODE *
18908aryset(struct parser_params *p, NODE *recv, NODE *idx, const YYLTYPE *loc)
18909{
18910 return NEW_ATTRASGN(recv, tASET, idx, loc);
18911}
18912
18913static void
18914block_dup_check(struct parser_params *p, NODE *node1, NODE *node2)
18915{
18916 if (node2 && node1 && nd_type_p(node1, NODE_BLOCK_PASS)) {
18917 compile_error(p, "both block arg and actual block given");
18918 }
18919}
18920
18921static NODE *
18922attrset(struct parser_params *p, NODE *recv, ID atype, ID id, const YYLTYPE *loc)
18923{
18924 if (!CALL_Q_P(atype)) id = rb_id_attrset(id);
18925 return NEW_ATTRASGN(recv, id, 0, loc);
18926}
18927
18928static void
18929rb_backref_error(struct parser_params *p, NODE *node)
18930{
18931 switch (nd_type(node)) {
18932 case NODE_NTH_REF:
18933 compile_error(p, "Can't set variable $%ld", node->nd_nth);
18934 break;
18935 case NODE_BACK_REF:
18936 compile_error(p, "Can't set variable $%c", (int)node->nd_nth);
18937 break;
18938 }
18939}
18940#else
18941static VALUE
18942backref_error(struct parser_params *p, NODE *ref, VALUE expr)
18943{
18944 VALUE mesg = rb_str_new_cstr("Can't set variable ");
18945 rb_str_append(mesg, ref->nd_cval);
18946 return dispatch2(assign_error, mesg, expr);
18947}
18948#endif
18949
18950#ifndef RIPPER
18951static NODE *
18952arg_append(struct parser_params *p, NODE *node1, NODE *node2, const YYLTYPE *loc)
18953{
18954 if (!node1) return NEW_LIST(node2, &node2->nd_loc);
18955 switch (nd_type(node1)) {
18956 case NODE_LIST:
18957 return list_append(p, node1, node2);
18958 case NODE_BLOCK_PASS:
18959 node1->nd_head = arg_append(p, node1->nd_head, node2, loc);
18960 node1->nd_loc.end_pos = node1->nd_head->nd_loc.end_pos;
18961 return node1;
18962 case NODE_ARGSPUSH:
18963 node1->nd_body = list_append(p, NEW_LIST(node1->nd_body, &node1->nd_body->nd_loc), node2);
18964 node1->nd_loc.end_pos = node1->nd_body->nd_loc.end_pos;
18965 nd_set_type(node1, NODE_ARGSCAT);
18966 return node1;
18967 case NODE_ARGSCAT:
18968 if (!nd_type_p(node1->nd_body, NODE_LIST)) break;
18969 node1->nd_body = list_append(p, node1->nd_body, node2);
18970 node1->nd_loc.end_pos = node1->nd_body->nd_loc.end_pos;
18971 return node1;
18972 }
18973 return NEW_ARGSPUSH(node1, node2, loc);
18974}
18975
18976static NODE *
18977arg_concat(struct parser_params *p, NODE *node1, NODE *node2, const YYLTYPE *loc)
18978{
18979 if (!node2) return node1;
18980 switch (nd_type(node1)) {
18981 case NODE_BLOCK_PASS:
18982 if (node1->nd_head)
18983 node1->nd_head = arg_concat(p, node1->nd_head, node2, loc);
18984 else
18985 node1->nd_head = NEW_LIST(node2, loc);
18986 return node1;
18987 case NODE_ARGSPUSH:
18988 if (!nd_type_p(node2, NODE_LIST)) break;
18989 node1->nd_body = list_concat(NEW_LIST(node1->nd_body, loc), node2);
18990 nd_set_type(node1, NODE_ARGSCAT);
18991 return node1;
18992 case NODE_ARGSCAT:
18993 if (!nd_type_p(node2, NODE_LIST) ||
18994 !nd_type_p(node1->nd_body, NODE_LIST)) break;
18995 node1->nd_body = list_concat(node1->nd_body, node2);
18996 return node1;
18997 }
18998 return NEW_ARGSCAT(node1, node2, loc);
18999}
19000
19001static NODE *
19002last_arg_append(struct parser_params *p, NODE *args, NODE *last_arg, const YYLTYPE *loc)
19003{
19004 NODE *n1;
19005 if ((n1 = splat_array(args)) != 0) {
19006 return list_append(p, n1, last_arg);
19007 }
19008 return arg_append(p, args, last_arg, loc);
19009}
19010
19011static NODE *
19012rest_arg_append(struct parser_params *p, NODE *args, NODE *rest_arg, const YYLTYPE *loc)
19013{
19014 NODE *n1;
19015 if ((nd_type_p(rest_arg, NODE_LIST)) && (n1 = splat_array(args)) != 0) {
19016 return list_concat(n1, rest_arg);
19017 }
19018 return arg_concat(p, args, rest_arg, loc);
19019}
19020
19021static NODE *
19022splat_array(NODE* node)
19023{
19024 if (nd_type_p(node, NODE_SPLAT)) node = node->nd_head;
19025 if (nd_type_p(node, NODE_LIST)) return node;
19026 return 0;
19027}
19028
19029static void
19030mark_lvar_used(struct parser_params *p, NODE *rhs)
19031{
19032 ID *vidp = NULL;
19033 if (!rhs) return;
19034 switch (nd_type(rhs)) {
19035 case NODE_LASGN:
19036 if (local_id_ref(p, rhs->nd_vid, &vidp)) {
19037 if (vidp) *vidp |= LVAR_USED;
19038 }
19039 break;
19040 case NODE_DASGN:
19041 if (dvar_defined_ref(p, rhs->nd_vid, &vidp)) {
19042 if (vidp) *vidp |= LVAR_USED;
19043 }
19044 break;
19045#if 0
19046 case NODE_MASGN:
19047 for (rhs = rhs->nd_head; rhs; rhs = rhs->nd_next) {
19048 mark_lvar_used(p, rhs->nd_head);
19049 }
19050 break;
19051#endif
19052 }
19053}
19054
19055static NODE *
19056const_decl_path(struct parser_params *p, NODE **dest)
19057{
19058 NODE *n = *dest;
19059 if (!nd_type_p(n, NODE_CALL)) {
19060 const YYLTYPE *loc = &n->nd_loc;
19061 VALUE path;
19062 if (n->nd_vid) {
19063 path = rb_id2str(n->nd_vid);
19064 }
19065 else {
19066 n = n->nd_else;
19067 path = rb_ary_new();
19068 for (; n && nd_type_p(n, NODE_COLON2); n = n->nd_head) {
19069 rb_ary_push(path, rb_id2str(n->nd_mid));
19070 }
19071 if (n && nd_type_p(n, NODE_CONST)) {
19072 // Const::Name
19073 rb_ary_push(path, rb_id2str(n->nd_vid));
19074 }
19075 else if (n && nd_type_p(n, NODE_COLON3)) {
19076 // ::Const::Name
19077 rb_ary_push(path, rb_str_new(0, 0));
19078 }
19079 else {
19080 // expression::Name
19081 rb_ary_push(path, rb_str_new_cstr("..."));
19082 }
19083 path = rb_ary_join(rb_ary_reverse(path), rb_str_new_cstr("::"));
19084 path = rb_fstring(path);
19085 }
19086 *dest = n = NEW_LIT(path, loc);
19087 RB_OBJ_WRITTEN(p->ast, Qnil, n->nd_lit);
19088 }
19089 return n;
19090}
19091
19092extern VALUE rb_mRubyVMFrozenCore;
19093
19094static NODE *
19095make_shareable_node(struct parser_params *p, NODE *value, bool copy, const YYLTYPE *loc)
19096{
19097 NODE *fcore = NEW_LIT(rb_mRubyVMFrozenCore, loc);
19098
19099 if (copy) {
19100 return NEW_CALL(fcore, rb_intern("make_shareable_copy"),
19101 NEW_LIST(value, loc), loc);
19102 }
19103 else {
19104 return NEW_CALL(fcore, rb_intern("make_shareable"),
19105 NEW_LIST(value, loc), loc);
19106 }
19107}
19108
19109static NODE *
19110ensure_shareable_node(struct parser_params *p, NODE **dest, NODE *value, const YYLTYPE *loc)
19111{
19112 NODE *fcore = NEW_LIT(rb_mRubyVMFrozenCore, loc);
19113 NODE *args = NEW_LIST(value, loc);
19114 args = list_append(p, args, const_decl_path(p, dest));
19115 return NEW_CALL(fcore, rb_intern("ensure_shareable"), args, loc);
19116}
19117
19118static int is_static_content(NODE *node);
19119
19120static VALUE
19121shareable_literal_value(NODE *node)
19122{
19123 if (!node) return Qnil;
19124 enum node_type type = nd_type(node);
19125 switch (type) {
19126 case NODE_TRUE:
19127 return Qtrue;
19128 case NODE_FALSE:
19129 return Qfalse;
19130 case NODE_NIL:
19131 return Qnil;
19132 case NODE_LIT:
19133 return node->nd_lit;
19134 default:
19135 return Qundef;
19136 }
19137}
19138
19139#ifndef SHAREABLE_BARE_EXPRESSION
19140#define SHAREABLE_BARE_EXPRESSION 1
19141#endif
19142
19143static NODE *
19144shareable_literal_constant(struct parser_params *p, enum shareability shareable,
19145 NODE **dest, NODE *value, const YYLTYPE *loc, size_t level)
19146{
19147# define shareable_literal_constant_next(n) \
19148 shareable_literal_constant(p, shareable, dest, (n), &(n)->nd_loc, level+1)
19149 VALUE lit = Qnil;
19150
19151 if (!value) return 0;
19152 enum node_type type = nd_type(value);
19153 switch (type) {
19154 case NODE_TRUE:
19155 case NODE_FALSE:
19156 case NODE_NIL:
19157 case NODE_LIT:
19158 return value;
19159
19160 case NODE_DSTR:
19161 if (shareable == shareable_literal) {
19162 value = NEW_CALL(value, idUMinus, 0, loc);
19163 }
19164 return value;
19165
19166 case NODE_STR:
19167 lit = rb_fstring(value->nd_lit);
19168 nd_set_type(value, NODE_LIT);
19169 RB_OBJ_WRITE(p->ast, &value->nd_lit, lit);
19170 return value;
19171
19172 case NODE_ZLIST:
19173 lit = rb_ary_new();
19174 OBJ_FREEZE_RAW(lit);
19175 NODE *n = NEW_LIT(lit, loc);
19176 RB_OBJ_WRITTEN(p->ast, Qnil, n->nd_lit);
19177 return n;
19178
19179 case NODE_LIST:
19180 lit = rb_ary_new();
19181 for (NODE *n = value; n; n = n->nd_next) {
19182 NODE *elt = n->nd_head;
19183 if (elt) {
19184 elt = shareable_literal_constant_next(elt);
19185 if (elt) {
19186 n->nd_head = elt;
19187 }
19188 else if (RTEST(lit)) {
19189 rb_ary_clear(lit);
19190 lit = Qfalse;
19191 }
19192 }
19193 if (RTEST(lit)) {
19194 VALUE e = shareable_literal_value(elt);
19195 if (e != Qundef) {
19196 rb_ary_push(lit, e);
19197 }
19198 else {
19199 rb_ary_clear(lit);
19200 lit = Qnil; /* make shareable at runtime */
19201 }
19202 }
19203 }
19204 break;
19205
19206 case NODE_HASH:
19207 if (!value->nd_brace) return 0;
19208 lit = rb_hash_new();
19209 for (NODE *n = value->nd_head; n; n = n->nd_next->nd_next) {
19210 NODE *key = n->nd_head;
19211 NODE *val = n->nd_next->nd_head;
19212 if (key) {
19213 key = shareable_literal_constant_next(key);
19214 if (key) {
19215 n->nd_head = key;
19216 }
19217 else if (RTEST(lit)) {
19218 rb_hash_clear(lit);
19219 lit = Qfalse;
19220 }
19221 }
19222 if (val) {
19223 val = shareable_literal_constant_next(val);
19224 if (val) {
19225 n->nd_next->nd_head = val;
19226 }
19227 else if (RTEST(lit)) {
19228 rb_hash_clear(lit);
19229 lit = Qfalse;
19230 }
19231 }
19232 if (RTEST(lit)) {
19233 VALUE k = shareable_literal_value(key);
19234 VALUE v = shareable_literal_value(val);
19235 if (k != Qundef && v != Qundef) {
19236 rb_hash_aset(lit, k, v);
19237 }
19238 else {
19239 rb_hash_clear(lit);
19240 lit = Qnil; /* make shareable at runtime */
19241 }
19242 }
19243 }
19244 break;
19245
19246 default:
19247 if (shareable == shareable_literal &&
19248 (SHAREABLE_BARE_EXPRESSION || level > 0)) {
19249 return ensure_shareable_node(p, dest, value, loc);
19250 }
19251 return 0;
19252 }
19253
19254 /* Array or Hash */
19255 if (!lit) return 0;
19256 if (NIL_P(lit)) {
19257 // if shareable_literal, all elements should have been ensured
19258 // as shareable
19259 value = make_shareable_node(p, value, false, loc);
19260 }
19261 else {
19262 value = NEW_LIT(rb_ractor_make_shareable(lit), loc);
19263 RB_OBJ_WRITTEN(p->ast, Qnil, value->nd_lit);
19264 }
19265
19266 return value;
19267# undef shareable_literal_constant_next
19268}
19269
19270static NODE *
19271shareable_constant_value(struct parser_params *p, enum shareability shareable,
19272 NODE *lhs, NODE *value, const YYLTYPE *loc)
19273{
19274 if (!value) return 0;
19275 switch (shareable) {
19276 case shareable_none:
19277 return value;
19278
19279 case shareable_literal:
19280 {
19281 NODE *lit = shareable_literal_constant(p, shareable, &lhs, value, loc, 0);
19282 if (lit) return lit;
19283 return value;
19284 }
19285 break;
19286
19287 case shareable_copy:
19288 case shareable_everything:
19289 {
19290 NODE *lit = shareable_literal_constant(p, shareable, &lhs, value, loc, 0);
19291 if (lit) return lit;
19292 return make_shareable_node(p, value, shareable == shareable_copy, loc);
19293 }
19294 break;
19295
19296 default:
19298 }
19299}
19300
19301static NODE *
19302node_assign(struct parser_params *p, NODE *lhs, NODE *rhs, struct lex_context ctxt, const YYLTYPE *loc)
19303{
19304 if (!lhs) return 0;
19305
19306 switch (nd_type(lhs)) {
19307 case NODE_CDECL:
19308 rhs = shareable_constant_value(p, ctxt.shareable_constant_value, lhs, rhs, loc);
19309 /* fallthru */
19310
19311 case NODE_GASGN:
19312 case NODE_IASGN:
19313 case NODE_LASGN:
19314 case NODE_DASGN:
19315 case NODE_MASGN:
19316 case NODE_CVASGN:
19317 lhs->nd_value = rhs;
19318 nd_set_loc(lhs, loc);
19319 break;
19320
19321 case NODE_ATTRASGN:
19322 lhs->nd_args = arg_append(p, lhs->nd_args, rhs, loc);
19323 nd_set_loc(lhs, loc);
19324 break;
19325
19326 default:
19327 /* should not happen */
19328 break;
19329 }
19330
19331 return lhs;
19332}
19333
19334static NODE *
19335value_expr_check(struct parser_params *p, NODE *node)
19336{
19337 NODE *void_node = 0, *vn;
19338
19339 if (!node) {
19340 rb_warning0("empty expression");
19341 }
19342 while (node) {
19343 switch (nd_type(node)) {
19344 case NODE_RETURN:
19345 case NODE_BREAK:
19346 case NODE_NEXT:
19347 case NODE_REDO:
19348 case NODE_RETRY:
19349 return void_node ? void_node : node;
19350
19351 case NODE_CASE3:
19352 if (!node->nd_body || !nd_type_p(node->nd_body, NODE_IN)) {
19353 compile_error(p, "unexpected node");
19354 return NULL;
19355 }
19356 if (node->nd_body->nd_body) {
19357 return NULL;
19358 }
19359 /* single line pattern matching */
19360 return void_node ? void_node : node;
19361
19362 case NODE_BLOCK:
19363 while (node->nd_next) {
19364 node = node->nd_next;
19365 }
19366 node = node->nd_head;
19367 break;
19368
19369 case NODE_BEGIN:
19370 node = node->nd_body;
19371 break;
19372
19373 case NODE_IF:
19374 case NODE_UNLESS:
19375 if (!node->nd_body) {
19376 return NULL;
19377 }
19378 else if (!node->nd_else) {
19379 return NULL;
19380 }
19381 vn = value_expr_check(p, node->nd_body);
19382 if (!vn) return NULL;
19383 if (!void_node) void_node = vn;
19384 node = node->nd_else;
19385 break;
19386
19387 case NODE_AND:
19388 case NODE_OR:
19389 node = node->nd_1st;
19390 break;
19391
19392 case NODE_LASGN:
19393 case NODE_DASGN:
19394 case NODE_MASGN:
19395 mark_lvar_used(p, node);
19396 return NULL;
19397
19398 default:
19399 return NULL;
19400 }
19401 }
19402
19403 return NULL;
19404}
19405
19406static int
19407value_expr_gen(struct parser_params *p, NODE *node)
19408{
19409 NODE *void_node = value_expr_check(p, node);
19410 if (void_node) {
19411 yyerror1(&void_node->nd_loc, "void value expression");
19412 /* or "control never reach"? */
19413 return FALSE;
19414 }
19415 return TRUE;
19416}
19417static void
19418void_expr(struct parser_params *p, NODE *node)
19419{
19420 const char *useless = 0;
19421
19422 if (!RTEST(ruby_verbose)) return;
19423
19424 if (!node || !(node = nd_once_body(node))) return;
19425 switch (nd_type(node)) {
19426 case NODE_OPCALL:
19427 switch (node->nd_mid) {
19428 case '+':
19429 case '-':
19430 case '*':
19431 case '/':
19432 case '%':
19433 case tPOW:
19434 case tUPLUS:
19435 case tUMINUS:
19436 case '|':
19437 case '^':
19438 case '&':
19439 case tCMP:
19440 case '>':
19441 case tGEQ:
19442 case '<':
19443 case tLEQ:
19444 case tEQ:
19445 case tNEQ:
19446 useless = rb_id2name(node->nd_mid);
19447 break;
19448 }
19449 break;
19450
19451 case NODE_LVAR:
19452 case NODE_DVAR:
19453 case NODE_GVAR:
19454 case NODE_IVAR:
19455 case NODE_CVAR:
19456 case NODE_NTH_REF:
19457 case NODE_BACK_REF:
19458 useless = "a variable";
19459 break;
19460 case NODE_CONST:
19461 useless = "a constant";
19462 break;
19463 case NODE_LIT:
19464 case NODE_STR:
19465 case NODE_DSTR:
19466 case NODE_DREGX:
19467 useless = "a literal";
19468 break;
19469 case NODE_COLON2:
19470 case NODE_COLON3:
19471 useless = "::";
19472 break;
19473 case NODE_DOT2:
19474 useless = "..";
19475 break;
19476 case NODE_DOT3:
19477 useless = "...";
19478 break;
19479 case NODE_SELF:
19480 useless = "self";
19481 break;
19482 case NODE_NIL:
19483 useless = "nil";
19484 break;
19485 case NODE_TRUE:
19486 useless = "true";
19487 break;
19488 case NODE_FALSE:
19489 useless = "false";
19490 break;
19491 case NODE_DEFINED:
19492 useless = "defined?";
19493 break;
19494 }
19495
19496 if (useless) {
19497 rb_warn1L(nd_line(node), "possibly useless use of %s in void context", WARN_S(useless));
19498 }
19499}
19500
19501static NODE *
19502void_stmts(struct parser_params *p, NODE *node)
19503{
19504 NODE *const n = node;
19505 if (!RTEST(ruby_verbose)) return n;
19506 if (!node) return n;
19507 if (!nd_type_p(node, NODE_BLOCK)) return n;
19508
19509 while (node->nd_next) {
19510 void_expr(p, node->nd_head);
19511 node = node->nd_next;
19512 }
19513 return n;
19514}
19515
19516static NODE *
19517remove_begin(NODE *node)
19518{
19519 NODE **n = &node, *n1 = node;
19520 while (n1 && nd_type_p(n1, NODE_BEGIN) && n1->nd_body) {
19521 *n = n1 = n1->nd_body;
19522 }
19523 return node;
19524}
19525
19526static NODE *
19527remove_begin_all(NODE *node)
19528{
19529 NODE **n = &node, *n1 = node;
19530 while (n1 && nd_type_p(n1, NODE_BEGIN)) {
19531 *n = n1 = n1->nd_body;
19532 }
19533 return node;
19534}
19535
19536static void
19537reduce_nodes(struct parser_params *p, NODE **body)
19538{
19539 NODE *node = *body;
19540
19541 if (!node) {
19542 *body = NEW_NIL(&NULL_LOC);
19543 return;
19544 }
19545#define subnodes(n1, n2) \
19546 ((!node->n1) ? (node->n2 ? (body = &node->n2, 1) : 0) : \
19547 (!node->n2) ? (body = &node->n1, 1) : \
19548 (reduce_nodes(p, &node->n1), body = &node->n2, 1))
19549
19550 while (node) {
19551 int newline = (int)(node->flags & NODE_FL_NEWLINE);
19552 switch (nd_type(node)) {
19553 end:
19554 case NODE_NIL:
19555 *body = 0;
19556 return;
19557 case NODE_RETURN:
19558 *body = node = node->nd_stts;
19559 if (newline && node) node->flags |= NODE_FL_NEWLINE;
19560 continue;
19561 case NODE_BEGIN:
19562 *body = node = node->nd_body;
19563 if (newline && node) node->flags |= NODE_FL_NEWLINE;
19564 continue;
19565 case NODE_BLOCK:
19566 body = &node->nd_end->nd_head;
19567 break;
19568 case NODE_IF:
19569 case NODE_UNLESS:
19570 if (subnodes(nd_body, nd_else)) break;
19571 return;
19572 case NODE_CASE:
19573 body = &node->nd_body;
19574 break;
19575 case NODE_WHEN:
19576 if (!subnodes(nd_body, nd_next)) goto end;
19577 break;
19578 case NODE_ENSURE:
19579 if (!subnodes(nd_head, nd_resq)) goto end;
19580 break;
19581 case NODE_RESCUE:
19582 if (node->nd_else) {
19583 body = &node->nd_resq;
19584 break;
19585 }
19586 if (!subnodes(nd_head, nd_resq)) goto end;
19587 break;
19588 default:
19589 return;
19590 }
19591 node = *body;
19592 if (newline && node) node->flags |= NODE_FL_NEWLINE;
19593 }
19594
19595#undef subnodes
19596}
19597
19598static int
19599is_static_content(NODE *node)
19600{
19601 if (!node) return 1;
19602 switch (nd_type(node)) {
19603 case NODE_HASH:
19604 if (!(node = node->nd_head)) break;
19605 case NODE_LIST:
19606 do {
19607 if (!is_static_content(node->nd_head)) return 0;
19608 } while ((node = node->nd_next) != 0);
19609 case NODE_LIT:
19610 case NODE_STR:
19611 case NODE_NIL:
19612 case NODE_TRUE:
19613 case NODE_FALSE:
19614 case NODE_ZLIST:
19615 break;
19616 default:
19617 return 0;
19618 }
19619 return 1;
19620}
19621
19622static int
19623assign_in_cond(struct parser_params *p, NODE *node)
19624{
19625 switch (nd_type(node)) {
19626 case NODE_MASGN:
19627 case NODE_LASGN:
19628 case NODE_DASGN:
19629 case NODE_GASGN:
19630 case NODE_IASGN:
19631 break;
19632
19633 default:
19634 return 0;
19635 }
19636
19637 if (!node->nd_value) return 1;
19638 if (is_static_content(node->nd_value)) {
19639 /* reports always */
19640 parser_warn(p, node->nd_value, "found `= literal' in conditional, should be ==");
19641 }
19642 return 1;
19643}
19644
19645enum cond_type {
19646 COND_IN_OP,
19647 COND_IN_COND,
19648 COND_IN_FF
19649};
19650
19651#define SWITCH_BY_COND_TYPE(t, w, arg) \
19652 switch (t) { \
19653 case COND_IN_OP: break; \
19654 case COND_IN_COND: rb_##w##0(arg "literal in condition"); break; \
19655 case COND_IN_FF: rb_##w##0(arg "literal in flip-flop"); break; \
19656 }
19657
19658static NODE *cond0(struct parser_params*,NODE*,enum cond_type,const YYLTYPE*);
19659
19660static NODE*
19661range_op(struct parser_params *p, NODE *node, const YYLTYPE *loc)
19662{
19663 enum node_type type;
19664
19665 if (node == 0) return 0;
19666
19667 type = nd_type(node);
19668 value_expr(node);
19669 if (type == NODE_LIT && FIXNUM_P(node->nd_lit)) {
19670 if (!e_option_supplied(p)) parser_warn(p, node, "integer literal in flip-flop");
19671 ID lineno = rb_intern("$.");
19672 return NEW_CALL(node, tEQ, NEW_LIST(NEW_GVAR(lineno, loc), loc), loc);
19673 }
19674 return cond0(p, node, COND_IN_FF, loc);
19675}
19676
19677static NODE*
19678cond0(struct parser_params *p, NODE *node, enum cond_type type, const YYLTYPE *loc)
19679{
19680 if (node == 0) return 0;
19681 if (!(node = nd_once_body(node))) return 0;
19682 assign_in_cond(p, node);
19683
19684 switch (nd_type(node)) {
19685 case NODE_DSTR:
19686 case NODE_EVSTR:
19687 case NODE_STR:
19688 SWITCH_BY_COND_TYPE(type, warn, "string ")
19689 break;
19690
19691 case NODE_DREGX:
19692 if (!e_option_supplied(p)) SWITCH_BY_COND_TYPE(type, warning, "regex ")
19693
19694 return NEW_MATCH2(node, NEW_GVAR(idLASTLINE, loc), loc);
19695
19696 case NODE_AND:
19697 case NODE_OR:
19698 node->nd_1st = cond0(p, node->nd_1st, COND_IN_COND, loc);
19699 node->nd_2nd = cond0(p, node->nd_2nd, COND_IN_COND, loc);
19700 break;
19701
19702 case NODE_DOT2:
19703 case NODE_DOT3:
19704 node->nd_beg = range_op(p, node->nd_beg, loc);
19705 node->nd_end = range_op(p, node->nd_end, loc);
19706 if (nd_type_p(node, NODE_DOT2)) nd_set_type(node,NODE_FLIP2);
19707 else if (nd_type_p(node, NODE_DOT3)) nd_set_type(node, NODE_FLIP3);
19708 break;
19709
19710 case NODE_DSYM:
19711 warn_symbol:
19712 SWITCH_BY_COND_TYPE(type, warning, "symbol ")
19713 break;
19714
19715 case NODE_LIT:
19716 if (RB_TYPE_P(node->nd_lit, T_REGEXP)) {
19717 if (!e_option_supplied(p)) SWITCH_BY_COND_TYPE(type, warn, "regex ")
19718 nd_set_type(node, NODE_MATCH);
19719 }
19720 else if (node->nd_lit == Qtrue ||
19721 node->nd_lit == Qfalse) {
19722 /* booleans are OK, e.g., while true */
19723 }
19724 else if (SYMBOL_P(node->nd_lit)) {
19725 goto warn_symbol;
19726 }
19727 else {
19728 SWITCH_BY_COND_TYPE(type, warning, "")
19729 }
19730 default:
19731 break;
19732 }
19733 return node;
19734}
19735
19736static NODE*
19737cond(struct parser_params *p, NODE *node, const YYLTYPE *loc)
19738{
19739 if (node == 0) return 0;
19740 return cond0(p, node, COND_IN_COND, loc);
19741}
19742
19743static NODE*
19744method_cond(struct parser_params *p, NODE *node, const YYLTYPE *loc)
19745{
19746 if (node == 0) return 0;
19747 return cond0(p, node, COND_IN_OP, loc);
19748}
19749
19750static NODE*
19751new_nil_at(struct parser_params *p, const rb_code_position_t *pos)
19752{
19753 YYLTYPE loc = {*pos, *pos};
19754 return NEW_NIL(&loc);
19755}
19756
19757static NODE*
19758new_if(struct parser_params *p, NODE *cc, NODE *left, NODE *right, const YYLTYPE *loc)
19759{
19760 if (!cc) return right;
19761 cc = cond0(p, cc, COND_IN_COND, loc);
19762 return newline_node(NEW_IF(cc, left, right, loc));
19763}
19764
19765static NODE*
19766new_unless(struct parser_params *p, NODE *cc, NODE *left, NODE *right, const YYLTYPE *loc)
19767{
19768 if (!cc) return right;
19769 cc = cond0(p, cc, COND_IN_COND, loc);
19770 return newline_node(NEW_UNLESS(cc, left, right, loc));
19771}
19772
19773static NODE*
19774logop(struct parser_params *p, ID id, NODE *left, NODE *right,
19775 const YYLTYPE *op_loc, const YYLTYPE *loc)
19776{
19777 enum node_type type = id == idAND || id == idANDOP ? NODE_AND : NODE_OR;
19778 NODE *op;
19779 value_expr(left);
19780 if (left && nd_type_p(left, type)) {
19781 NODE *node = left, *second;
19782 while ((second = node->nd_2nd) != 0 && nd_type_p(second, type)) {
19783 node = second;
19784 }
19785 node->nd_2nd = NEW_NODE(type, second, right, 0, loc);
19786 nd_set_line(node->nd_2nd, op_loc->beg_pos.lineno);
19787 left->nd_loc.end_pos = loc->end_pos;
19788 return left;
19789 }
19790 op = NEW_NODE(type, left, right, 0, loc);
19791 nd_set_line(op, op_loc->beg_pos.lineno);
19792 return op;
19793}
19794
19795static void
19796no_blockarg(struct parser_params *p, NODE *node)
19797{
19798 if (node && nd_type_p(node, NODE_BLOCK_PASS)) {
19799 compile_error(p, "block argument should not be given");
19800 }
19801}
19802
19803static NODE *
19804ret_args(struct parser_params *p, NODE *node)
19805{
19806 if (node) {
19807 no_blockarg(p, node);
19808 if (nd_type_p(node, NODE_LIST)) {
19809 if (node->nd_next == 0) {
19810 node = node->nd_head;
19811 }
19812 else {
19813 nd_set_type(node, NODE_VALUES);
19814 }
19815 }
19816 }
19817 return node;
19818}
19819
19820static NODE *
19821new_yield(struct parser_params *p, NODE *node, const YYLTYPE *loc)
19822{
19823 if (node) no_blockarg(p, node);
19824
19825 return NEW_YIELD(node, loc);
19826}
19827
19828static VALUE
19829negate_lit(struct parser_params *p, VALUE lit)
19830{
19831 if (FIXNUM_P(lit)) {
19832 return LONG2FIX(-FIX2LONG(lit));
19833 }
19834 if (SPECIAL_CONST_P(lit)) {
19835#if USE_FLONUM
19836 if (FLONUM_P(lit)) {
19837 return DBL2NUM(-RFLOAT_VALUE(lit));
19838 }
19839#endif
19840 goto unknown;
19841 }
19842 switch (BUILTIN_TYPE(lit)) {
19843 case T_BIGNUM:
19844 BIGNUM_NEGATE(lit);
19845 lit = rb_big_norm(lit);
19846 break;
19847 case T_RATIONAL:
19848 RATIONAL_SET_NUM(lit, negate_lit(p, RRATIONAL(lit)->num));
19849 break;
19850 case T_COMPLEX:
19851 RCOMPLEX_SET_REAL(lit, negate_lit(p, RCOMPLEX(lit)->real));
19852 RCOMPLEX_SET_IMAG(lit, negate_lit(p, RCOMPLEX(lit)->imag));
19853 break;
19854 case T_FLOAT:
19855 lit = DBL2NUM(-RFLOAT_VALUE(lit));
19856 break;
19857 unknown:
19858 default:
19859 rb_parser_fatal(p, "unknown literal type (%s) passed to negate_lit",
19860 rb_builtin_class_name(lit));
19861 break;
19862 }
19863 return lit;
19864}
19865
19866static NODE *
19867arg_blk_pass(NODE *node1, NODE *node2)
19868{
19869 if (node2) {
19870 if (!node1) return node2;
19871 node2->nd_head = node1;
19872 nd_set_first_lineno(node2, nd_first_lineno(node1));
19873 nd_set_first_column(node2, nd_first_column(node1));
19874 return node2;
19875 }
19876 return node1;
19877}
19878
19879static bool
19880args_info_empty_p(struct rb_args_info *args)
19881{
19882 if (args->pre_args_num) return false;
19883 if (args->post_args_num) return false;
19884 if (args->rest_arg) return false;
19885 if (args->opt_args) return false;
19886 if (args->block_arg) return false;
19887 if (args->kw_args) return false;
19888 if (args->kw_rest_arg) return false;
19889 return true;
19890}
19891
19892static NODE*
19893new_args(struct parser_params *p, NODE *pre_args, NODE *opt_args, ID rest_arg, NODE *post_args, NODE *tail, const YYLTYPE *loc)
19894{
19895 int saved_line = p->ruby_sourceline;
19896 struct rb_args_info *args = tail->nd_ainfo;
19897
19898 if (args->block_arg == idFWD_BLOCK) {
19899 if (rest_arg) {
19900 yyerror1(&tail->nd_loc, "... after rest argument");
19901 return tail;
19902 }
19903 rest_arg = idFWD_REST;
19904 }
19905
19906 args->pre_args_num = pre_args ? rb_long2int(pre_args->nd_plen) : 0;
19907 args->pre_init = pre_args ? pre_args->nd_next : 0;
19908
19909 args->post_args_num = post_args ? rb_long2int(post_args->nd_plen) : 0;
19910 args->post_init = post_args ? post_args->nd_next : 0;
19911 args->first_post_arg = post_args ? post_args->nd_pid : 0;
19912
19913 args->rest_arg = rest_arg;
19914
19915 args->opt_args = opt_args;
19916
19917 args->ruby2_keywords = rest_arg == idFWD_REST;
19918
19919 p->ruby_sourceline = saved_line;
19920 nd_set_loc(tail, loc);
19921
19922 return tail;
19923}
19924
19925static NODE*
19926new_args_tail(struct parser_params *p, NODE *kw_args, ID kw_rest_arg, ID block, const YYLTYPE *kw_rest_loc)
19927{
19928 int saved_line = p->ruby_sourceline;
19929 NODE *node;
19930 VALUE tmpbuf = rb_imemo_tmpbuf_auto_free_pointer();
19931 struct rb_args_info *args = ZALLOC(struct rb_args_info);
19932 rb_imemo_tmpbuf_set_ptr(tmpbuf, args);
19933 args->imemo = tmpbuf;
19934 node = NEW_NODE(NODE_ARGS, 0, 0, args, &NULL_LOC);
19935 RB_OBJ_WRITTEN(p->ast, Qnil, tmpbuf);
19936 if (p->error_p) return node;
19937
19938 args->block_arg = block;
19939 args->kw_args = kw_args;
19940
19941 if (kw_args) {
19942 /*
19943 * def foo(k1: 1, kr1:, k2: 2, **krest, &b)
19944 * variable order: k1, kr1, k2, &b, internal_id, krest
19945 * #=> <reorder>
19946 * variable order: kr1, k1, k2, internal_id, krest, &b
19947 */
19948 ID kw_bits = internal_id(p), *required_kw_vars, *kw_vars;
19949 struct vtable *vtargs = p->lvtbl->args;
19950 NODE *kwn = kw_args;
19951
19952 if (block) block = vtargs->tbl[vtargs->pos-1];
19953 vtable_pop(vtargs, !!block + !!kw_rest_arg);
19954 required_kw_vars = kw_vars = &vtargs->tbl[vtargs->pos];
19955 while (kwn) {
19956 if (!NODE_REQUIRED_KEYWORD_P(kwn->nd_body))
19957 --kw_vars;
19958 --required_kw_vars;
19959 kwn = kwn->nd_next;
19960 }
19961
19962 for (kwn = kw_args; kwn; kwn = kwn->nd_next) {
19963 ID vid = kwn->nd_body->nd_vid;
19964 if (NODE_REQUIRED_KEYWORD_P(kwn->nd_body)) {
19965 *required_kw_vars++ = vid;
19966 }
19967 else {
19968 *kw_vars++ = vid;
19969 }
19970 }
19971
19972 arg_var(p, kw_bits);
19973 if (kw_rest_arg) arg_var(p, kw_rest_arg);
19974 if (block) arg_var(p, block);
19975
19976 args->kw_rest_arg = NEW_DVAR(kw_rest_arg, kw_rest_loc);
19977 args->kw_rest_arg->nd_cflag = kw_bits;
19978 }
19979 else if (kw_rest_arg == idNil) {
19980 args->no_kwarg = 1;
19981 }
19982 else if (kw_rest_arg) {
19983 args->kw_rest_arg = NEW_DVAR(kw_rest_arg, kw_rest_loc);
19984 }
19985
19986 p->ruby_sourceline = saved_line;
19987 return node;
19988}
19989
19990static NODE *
19991args_with_numbered(struct parser_params *p, NODE *args, int max_numparam)
19992{
19993 if (max_numparam > NO_PARAM) {
19994 if (!args) {
19995 YYLTYPE loc = RUBY_INIT_YYLLOC();
19996 args = new_args_tail(p, 0, 0, 0, 0);
19997 nd_set_loc(args, &loc);
19998 }
19999 args->nd_ainfo->pre_args_num = max_numparam;
20000 }
20001 return args;
20002}
20003
20004static NODE*
20005new_array_pattern(struct parser_params *p, NODE *constant, NODE *pre_arg, NODE *aryptn, const YYLTYPE *loc)
20006{
20007 struct rb_ary_pattern_info *apinfo = aryptn->nd_apinfo;
20008
20009 aryptn->nd_pconst = constant;
20010
20011 if (pre_arg) {
20012 NODE *pre_args = NEW_LIST(pre_arg, loc);
20013 if (apinfo->pre_args) {
20014 apinfo->pre_args = list_concat(pre_args, apinfo->pre_args);
20015 }
20016 else {
20017 apinfo->pre_args = pre_args;
20018 }
20019 }
20020 return aryptn;
20021}
20022
20023static NODE*
20024new_array_pattern_tail(struct parser_params *p, NODE *pre_args, int has_rest, ID rest_arg, NODE *post_args, const YYLTYPE *loc)
20025{
20026 int saved_line = p->ruby_sourceline;
20027 NODE *node;
20028 VALUE tmpbuf = rb_imemo_tmpbuf_auto_free_pointer();
20029 struct rb_ary_pattern_info *apinfo = ZALLOC(struct rb_ary_pattern_info);
20030 rb_imemo_tmpbuf_set_ptr(tmpbuf, apinfo);
20031 node = NEW_NODE(NODE_ARYPTN, 0, tmpbuf, apinfo, loc);
20032 RB_OBJ_WRITTEN(p->ast, Qnil, tmpbuf);
20033
20034 apinfo->pre_args = pre_args;
20035
20036 if (has_rest) {
20037 if (rest_arg) {
20038 apinfo->rest_arg = assignable(p, rest_arg, 0, loc);
20039 }
20040 else {
20041 apinfo->rest_arg = NODE_SPECIAL_NO_NAME_REST;
20042 }
20043 }
20044 else {
20045 apinfo->rest_arg = NULL;
20046 }
20047
20048 apinfo->post_args = post_args;
20049
20050 p->ruby_sourceline = saved_line;
20051 return node;
20052}
20053
20054static NODE*
20055new_find_pattern(struct parser_params *p, NODE *constant, NODE *fndptn, const YYLTYPE *loc)
20056{
20057 fndptn->nd_pconst = constant;
20058
20059 return fndptn;
20060}
20061
20062static NODE*
20063new_find_pattern_tail(struct parser_params *p, ID pre_rest_arg, NODE *args, ID post_rest_arg, const YYLTYPE *loc)
20064{
20065 int saved_line = p->ruby_sourceline;
20066 NODE *node;
20067 VALUE tmpbuf = rb_imemo_tmpbuf_auto_free_pointer();
20068 struct rb_fnd_pattern_info *fpinfo = ZALLOC(struct rb_fnd_pattern_info);
20069 rb_imemo_tmpbuf_set_ptr(tmpbuf, fpinfo);
20070 node = NEW_NODE(NODE_FNDPTN, 0, tmpbuf, fpinfo, loc);
20071 RB_OBJ_WRITTEN(p->ast, Qnil, tmpbuf);
20072
20073 fpinfo->pre_rest_arg = pre_rest_arg ? assignable(p, pre_rest_arg, 0, loc) : NODE_SPECIAL_NO_NAME_REST;
20074 fpinfo->args = args;
20075 fpinfo->post_rest_arg = post_rest_arg ? assignable(p, post_rest_arg, 0, loc) : NODE_SPECIAL_NO_NAME_REST;
20076
20077 p->ruby_sourceline = saved_line;
20078 return node;
20079}
20080
20081static NODE*
20082new_hash_pattern(struct parser_params *p, NODE *constant, NODE *hshptn, const YYLTYPE *loc)
20083{
20084 hshptn->nd_pconst = constant;
20085 return hshptn;
20086}
20087
20088static NODE*
20089new_hash_pattern_tail(struct parser_params *p, NODE *kw_args, ID kw_rest_arg, const YYLTYPE *loc)
20090{
20091 int saved_line = p->ruby_sourceline;
20092 NODE *node, *kw_rest_arg_node;
20093
20094 if (kw_rest_arg == idNil) {
20095 kw_rest_arg_node = NODE_SPECIAL_NO_REST_KEYWORD;
20096 }
20097 else if (kw_rest_arg) {
20098 kw_rest_arg_node = assignable(p, kw_rest_arg, 0, loc);
20099 }
20100 else {
20101 kw_rest_arg_node = NULL;
20102 }
20103
20104 node = NEW_NODE(NODE_HSHPTN, 0, kw_args, kw_rest_arg_node, loc);
20105
20106 p->ruby_sourceline = saved_line;
20107 return node;
20108}
20109
20110static NODE*
20111dsym_node(struct parser_params *p, NODE *node, const YYLTYPE *loc)
20112{
20113 VALUE lit;
20114
20115 if (!node) {
20116 return NEW_LIT(ID2SYM(idNULL), loc);
20117 }
20118
20119 switch (nd_type(node)) {
20120 case NODE_DSTR:
20121 nd_set_type(node, NODE_DSYM);
20122 nd_set_loc(node, loc);
20123 break;
20124 case NODE_STR:
20125 lit = node->nd_lit;
20126 RB_OBJ_WRITTEN(p->ast, Qnil, node->nd_lit = ID2SYM(rb_intern_str(lit)));
20127 nd_set_type(node, NODE_LIT);
20128 nd_set_loc(node, loc);
20129 break;
20130 default:
20131 node = NEW_NODE(NODE_DSYM, Qnil, 1, NEW_LIST(node, loc), loc);
20132 break;
20133 }
20134 return node;
20135}
20136
20137static int
20138append_literal_keys(st_data_t k, st_data_t v, st_data_t h)
20139{
20140 NODE *node = (NODE *)v;
20141 NODE **result = (NODE **)h;
20142 node->nd_alen = 2;
20143 node->nd_next->nd_end = node->nd_next;
20144 node->nd_next->nd_next = 0;
20145 if (*result)
20146 list_concat(*result, node);
20147 else
20148 *result = node;
20149 return ST_CONTINUE;
20150}
20151
20152static bool
20153hash_literal_key_p(VALUE k)
20154{
20155 switch (OBJ_BUILTIN_TYPE(k)) {
20156 case T_NODE:
20157 return false;
20158 default:
20159 return true;
20160 }
20161}
20162
20163static int
20164literal_cmp(VALUE val, VALUE lit)
20165{
20166 if (val == lit) return 0;
20167 if (!hash_literal_key_p(val) || !hash_literal_key_p(lit)) return -1;
20168 return rb_iseq_cdhash_cmp(val, lit);
20169}
20170
20171static st_index_t
20172literal_hash(VALUE a)
20173{
20174 if (!hash_literal_key_p(a)) return (st_index_t)a;
20175 return rb_iseq_cdhash_hash(a);
20176}
20177
20178static const struct st_hash_type literal_type = {
20179 literal_cmp,
20180 literal_hash,
20181};
20182
20183static NODE *
20184remove_duplicate_keys(struct parser_params *p, NODE *hash)
20185{
20186 st_table *literal_keys = st_init_table_with_size(&literal_type, hash->nd_alen / 2);
20187 NODE *result = 0;
20188 NODE *last_expr = 0;
20189 rb_code_location_t loc = hash->nd_loc;
20190 while (hash && hash->nd_head && hash->nd_next) {
20191 NODE *head = hash->nd_head;
20192 NODE *value = hash->nd_next;
20193 NODE *next = value->nd_next;
20194 st_data_t key = (st_data_t)head;
20195 st_data_t data;
20196 value->nd_next = 0;
20197 if (nd_type_p(head, NODE_LIT) &&
20198 st_delete(literal_keys, (key = (st_data_t)head->nd_lit, &key), &data)) {
20199 NODE *dup_value = ((NODE *)data)->nd_next;
20200 rb_compile_warn(p->ruby_sourcefile, nd_line((NODE *)data),
20201 "key %+"PRIsVALUE" is duplicated and overwritten on line %d",
20202 head->nd_lit, nd_line(head));
20203 if (dup_value == last_expr) {
20204 value->nd_head = block_append(p, dup_value->nd_head, value->nd_head);
20205 }
20206 else {
20207 last_expr->nd_head = block_append(p, dup_value->nd_head, last_expr->nd_head);
20208 }
20209 }
20210 st_insert(literal_keys, (st_data_t)key, (st_data_t)hash);
20211 last_expr = nd_type_p(head, NODE_LIT) ? value : head;
20212 hash = next;
20213 }
20214 st_foreach(literal_keys, append_literal_keys, (st_data_t)&result);
20215 st_free_table(literal_keys);
20216 if (hash) {
20217 if (!result) result = hash;
20218 else list_concat(result, hash);
20219 }
20220 result->nd_loc = loc;
20221 return result;
20222}
20223
20224static NODE *
20225new_hash(struct parser_params *p, NODE *hash, const YYLTYPE *loc)
20226{
20227 if (hash) hash = remove_duplicate_keys(p, hash);
20228 return NEW_HASH(hash, loc);
20229}
20230#endif
20231
20232static void
20233error_duplicate_pattern_variable(struct parser_params *p, ID id, const YYLTYPE *loc)
20234{
20235 if (is_private_local_id(id)) {
20236 return;
20237 }
20238 if (st_is_member(p->pvtbl, id)) {
20239 yyerror1(loc, "duplicated variable name");
20240 }
20241 else {
20242 st_insert(p->pvtbl, (st_data_t)id, 0);
20243 }
20244}
20245
20246static void
20247error_duplicate_pattern_key(struct parser_params *p, VALUE key, const YYLTYPE *loc)
20248{
20249 if (!p->pktbl) {
20250 p->pktbl = st_init_numtable();
20251 }
20252 else if (st_is_member(p->pktbl, key)) {
20253 yyerror1(loc, "duplicated key name");
20254 return;
20255 }
20256 st_insert(p->pktbl, (st_data_t)key, 0);
20257}
20258
20259#ifndef RIPPER
20260static NODE *
20261new_unique_key_hash(struct parser_params *p, NODE *hash, const YYLTYPE *loc)
20262{
20263 return NEW_HASH(hash, loc);
20264}
20265#endif /* !RIPPER */
20266
20267#ifndef RIPPER
20268static NODE *
20269new_op_assign(struct parser_params *p, NODE *lhs, ID op, NODE *rhs, struct lex_context ctxt, const YYLTYPE *loc)
20270{
20271 NODE *asgn;
20272
20273 if (lhs) {
20274 ID vid = lhs->nd_vid;
20275 YYLTYPE lhs_loc = lhs->nd_loc;
20276 int shareable = ctxt.shareable_constant_value;
20277 if (shareable) {
20278 switch (nd_type(lhs)) {
20279 case NODE_CDECL:
20280 case NODE_COLON2:
20281 case NODE_COLON3:
20282 break;
20283 default:
20284 shareable = 0;
20285 break;
20286 }
20287 }
20288 if (op == tOROP) {
20289 rhs = shareable_constant_value(p, shareable, lhs, rhs, &rhs->nd_loc);
20290 lhs->nd_value = rhs;
20291 nd_set_loc(lhs, loc);
20292 asgn = NEW_OP_ASGN_OR(gettable(p, vid, &lhs_loc), lhs, loc);
20293 if (is_notop_id(vid)) {
20294 switch (id_type(vid)) {
20295 case ID_GLOBAL:
20296 case ID_INSTANCE:
20297 case ID_CLASS:
20298 asgn->nd_aid = vid;
20299 }
20300 }
20301 }
20302 else if (op == tANDOP) {
20303 if (shareable) {
20304 rhs = shareable_constant_value(p, shareable, lhs, rhs, &rhs->nd_loc);
20305 }
20306 lhs->nd_value = rhs;
20307 nd_set_loc(lhs, loc);
20308 asgn = NEW_OP_ASGN_AND(gettable(p, vid, &lhs_loc), lhs, loc);
20309 }
20310 else {
20311 asgn = lhs;
20312 rhs = NEW_CALL(gettable(p, vid, &lhs_loc), op, NEW_LIST(rhs, &rhs->nd_loc), loc);
20313 if (shareable) {
20314 rhs = shareable_constant_value(p, shareable, lhs, rhs, &rhs->nd_loc);
20315 }
20316 asgn->nd_value = rhs;
20317 nd_set_loc(asgn, loc);
20318 }
20319 }
20320 else {
20321 asgn = NEW_BEGIN(0, loc);
20322 }
20323 return asgn;
20324}
20325
20326static NODE *
20327new_ary_op_assign(struct parser_params *p, NODE *ary,
20328 NODE *args, ID op, NODE *rhs, const YYLTYPE *args_loc, const YYLTYPE *loc)
20329{
20330 NODE *asgn;
20331
20332 args = make_list(args, args_loc);
20333 if (nd_type_p(args, NODE_BLOCK_PASS)) {
20334 args = NEW_ARGSCAT(args, rhs, loc);
20335 }
20336 else {
20337 args = arg_concat(p, args, rhs, loc);
20338 }
20339 asgn = NEW_OP_ASGN1(ary, op, args, loc);
20340 fixpos(asgn, ary);
20341 return asgn;
20342}
20343
20344static NODE *
20345new_attr_op_assign(struct parser_params *p, NODE *lhs,
20346 ID atype, ID attr, ID op, NODE *rhs, const YYLTYPE *loc)
20347{
20348 NODE *asgn;
20349
20350 asgn = NEW_OP_ASGN2(lhs, CALL_Q_P(atype), attr, op, rhs, loc);
20351 fixpos(asgn, lhs);
20352 return asgn;
20353}
20354
20355static NODE *
20356new_const_op_assign(struct parser_params *p, NODE *lhs, ID op, NODE *rhs, struct lex_context ctxt, const YYLTYPE *loc)
20357{
20358 NODE *asgn;
20359
20360 if (lhs) {
20361 rhs = shareable_constant_value(p, ctxt.shareable_constant_value, lhs, rhs, loc);
20362 asgn = NEW_OP_CDECL(lhs, op, rhs, loc);
20363 }
20364 else {
20365 asgn = NEW_BEGIN(0, loc);
20366 }
20367 fixpos(asgn, lhs);
20368 return asgn;
20369}
20370
20371static NODE *
20372const_decl(struct parser_params *p, NODE *path, const YYLTYPE *loc)
20373{
20374 if (p->ctxt.in_def) {
20375 yyerror1(loc, "dynamic constant assignment");
20376 }
20377 return NEW_CDECL(0, 0, (path), loc);
20378}
20379#else
20380static VALUE
20381const_decl(struct parser_params *p, VALUE path)
20382{
20383 if (p->ctxt.in_def) {
20384 path = assign_error(p, "dynamic constant assignment", path);
20385 }
20386 return path;
20387}
20388
20389static VALUE
20390assign_error(struct parser_params *p, const char *mesg, VALUE a)
20391{
20392 a = dispatch2(assign_error, ERR_MESG(), a);
20393 ripper_error(p);
20394 return a;
20395}
20396
20397static VALUE
20398var_field(struct parser_params *p, VALUE a)
20399{
20400 return ripper_new_yylval(p, get_id(a), dispatch1(var_field, a), 0);
20401}
20402#endif
20403
20404#ifndef RIPPER
20405static NODE *
20406new_bodystmt(struct parser_params *p, NODE *head, NODE *rescue, NODE *rescue_else, NODE *ensure, const YYLTYPE *loc)
20407{
20408 NODE *result = head;
20409 if (rescue) {
20410 NODE *tmp = rescue_else ? rescue_else : rescue;
20411 YYLTYPE rescue_loc = code_loc_gen(&head->nd_loc, &tmp->nd_loc);
20412
20413 result = NEW_RESCUE(head, rescue, rescue_else, &rescue_loc);
20414 nd_set_line(result, rescue->nd_loc.beg_pos.lineno);
20415 }
20416 else if (rescue_else) {
20417 result = block_append(p, result, rescue_else);
20418 }
20419 if (ensure) {
20420 result = NEW_ENSURE(result, ensure, loc);
20421 }
20422 fixpos(result, head);
20423 return result;
20424}
20425#endif
20426
20427static void
20428warn_unused_var(struct parser_params *p, struct local_vars *local)
20429{
20430 int cnt;
20431
20432 if (!local->used) return;
20433 cnt = local->used->pos;
20434 if (cnt != local->vars->pos) {
20435 rb_parser_fatal(p, "local->used->pos != local->vars->pos");
20436 }
20437#ifndef RIPPER
20438 ID *v = local->vars->tbl;
20439 ID *u = local->used->tbl;
20440 for (int i = 0; i < cnt; ++i) {
20441 if (!v[i] || (u[i] & LVAR_USED)) continue;
20442 if (is_private_local_id(v[i])) continue;
20443 rb_warn1L((int)u[i], "assigned but unused variable - %"PRIsWARN, rb_id2str(v[i]));
20444 }
20445#endif
20446}
20447
20448static void
20449local_push(struct parser_params *p, int toplevel_scope)
20450{
20451 struct local_vars *local;
20452 int inherits_dvars = toplevel_scope && compile_for_eval;
20453 int warn_unused_vars = RTEST(ruby_verbose);
20454
20455 local = ALLOC(struct local_vars);
20456 local->prev = p->lvtbl;
20457 local->args = vtable_alloc(0);
20458 local->vars = vtable_alloc(inherits_dvars ? DVARS_INHERIT : DVARS_TOPSCOPE);
20459#ifndef RIPPER
20460 if (toplevel_scope && compile_for_eval) warn_unused_vars = 0;
20461 if (toplevel_scope && e_option_supplied(p)) warn_unused_vars = 0;
20462 local->numparam.outer = 0;
20463 local->numparam.inner = 0;
20464 local->numparam.current = 0;
20465#endif
20466 local->used = warn_unused_vars ? vtable_alloc(0) : 0;
20467
20468# if WARN_PAST_SCOPE
20469 local->past = 0;
20470# endif
20471 CMDARG_PUSH(0);
20472 COND_PUSH(0);
20473 p->lvtbl = local;
20474}
20475
20476static void
20477local_pop(struct parser_params *p)
20478{
20479 struct local_vars *local = p->lvtbl->prev;
20480 if (p->lvtbl->used) {
20481 warn_unused_var(p, p->lvtbl);
20482 vtable_free(p->lvtbl->used);
20483 }
20484# if WARN_PAST_SCOPE
20485 while (p->lvtbl->past) {
20486 struct vtable *past = p->lvtbl->past;
20487 p->lvtbl->past = past->prev;
20488 vtable_free(past);
20489 }
20490# endif
20491 vtable_free(p->lvtbl->args);
20492 vtable_free(p->lvtbl->vars);
20493 CMDARG_POP();
20494 COND_POP();
20495 ruby_sized_xfree(p->lvtbl, sizeof(*p->lvtbl));
20496 p->lvtbl = local;
20497}
20498
20499#ifndef RIPPER
20500static rb_ast_id_table_t *
20501local_tbl(struct parser_params *p)
20502{
20503 int cnt_args = vtable_size(p->lvtbl->args);
20504 int cnt_vars = vtable_size(p->lvtbl->vars);
20505 int cnt = cnt_args + cnt_vars;
20506 int i, j;
20507 rb_ast_id_table_t *tbl;
20508
20509 if (cnt <= 0) return 0;
20510 tbl = rb_ast_new_local_table(p->ast, cnt);
20511 MEMCPY(tbl->ids, p->lvtbl->args->tbl, ID, cnt_args);
20512 /* remove IDs duplicated to warn shadowing */
20513 for (i = 0, j = cnt_args; i < cnt_vars; ++i) {
20514 ID id = p->lvtbl->vars->tbl[i];
20515 if (!vtable_included(p->lvtbl->args, id)) {
20516 tbl->ids[j++] = id;
20517 }
20518 }
20519 if (j < cnt) {
20520 tbl = rb_ast_resize_latest_local_table(p->ast, j);
20521 }
20522
20523 return tbl;
20524}
20525
20526static NODE*
20527node_newnode_with_locals(struct parser_params *p, enum node_type type, VALUE a1, VALUE a2, const rb_code_location_t *loc)
20528{
20530 NODE *n;
20531
20532 a0 = local_tbl(p);
20533 n = NEW_NODE(type, a0, a1, a2, loc);
20534 return n;
20535}
20536
20537#endif
20538
20539static void
20540numparam_name(struct parser_params *p, ID id)
20541{
20542 if (!NUMPARAM_ID_P(id)) return;
20543 compile_error(p, "_%d is reserved for numbered parameter",
20544 NUMPARAM_ID_TO_IDX(id));
20545}
20546
20547static void
20548arg_var(struct parser_params *p, ID id)
20549{
20550 numparam_name(p, id);
20551 vtable_add(p->lvtbl->args, id);
20552}
20553
20554static void
20555local_var(struct parser_params *p, ID id)
20556{
20557 numparam_name(p, id);
20558 vtable_add(p->lvtbl->vars, id);
20559 if (p->lvtbl->used) {
20560 vtable_add(p->lvtbl->used, (ID)p->ruby_sourceline);
20561 }
20562}
20563
20564static int
20565local_id_ref(struct parser_params *p, ID id, ID **vidrefp)
20566{
20567 struct vtable *vars, *args, *used;
20568
20569 vars = p->lvtbl->vars;
20570 args = p->lvtbl->args;
20571 used = p->lvtbl->used;
20572
20573 while (vars && !DVARS_TERMINAL_P(vars->prev)) {
20574 vars = vars->prev;
20575 args = args->prev;
20576 if (used) used = used->prev;
20577 }
20578
20579 if (vars && vars->prev == DVARS_INHERIT) {
20580 return rb_local_defined(id, p->parent_iseq);
20581 }
20582 else if (vtable_included(args, id)) {
20583 return 1;
20584 }
20585 else {
20586 int i = vtable_included(vars, id);
20587 if (i && used && vidrefp) *vidrefp = &used->tbl[i-1];
20588 return i != 0;
20589 }
20590}
20591
20592static int
20593local_id(struct parser_params *p, ID id)
20594{
20595 return local_id_ref(p, id, NULL);
20596}
20597
20598static int
20599check_forwarding_args(struct parser_params *p)
20600{
20601 if (local_id(p, idFWD_REST) &&
20602#if idFWD_KWREST
20603 local_id(p, idFWD_KWREST) &&
20604#endif
20605 local_id(p, idFWD_BLOCK)) return TRUE;
20606 compile_error(p, "unexpected ...");
20607 return FALSE;
20608}
20609
20610static void
20611add_forwarding_args(struct parser_params *p)
20612{
20613 arg_var(p, idFWD_REST);
20614#if idFWD_KWREST
20615 arg_var(p, idFWD_KWREST);
20616#endif
20617 arg_var(p, idFWD_BLOCK);
20618}
20619
20620#ifndef RIPPER
20621static NODE *
20622new_args_forward_call(struct parser_params *p, NODE *leading, const YYLTYPE *loc, const YYLTYPE *argsloc)
20623{
20624 NODE *splat = NEW_SPLAT(NEW_LVAR(idFWD_REST, loc), loc);
20625#if idFWD_KWREST
20626 NODE *kwrest = list_append(p, NEW_LIST(0, loc), NEW_LVAR(idFWD_KWREST, loc));
20627#endif
20628 NODE *block = NEW_BLOCK_PASS(NEW_LVAR(idFWD_BLOCK, loc), loc);
20629 NODE *args = leading ? rest_arg_append(p, leading, splat, argsloc) : splat;
20630#if idFWD_KWREST
20631 args = arg_append(p, splat, new_hash(p, kwrest, loc), loc);
20632#endif
20633 return arg_blk_pass(args, block);
20634}
20635#endif
20636
20637static NODE *
20638numparam_push(struct parser_params *p)
20639{
20640#ifndef RIPPER
20641 struct local_vars *local = p->lvtbl;
20642 NODE *inner = local->numparam.inner;
20643 if (!local->numparam.outer) {
20644 local->numparam.outer = local->numparam.current;
20645 }
20646 local->numparam.inner = 0;
20647 local->numparam.current = 0;
20648 return inner;
20649#else
20650 return 0;
20651#endif
20652}
20653
20654static void
20655numparam_pop(struct parser_params *p, NODE *prev_inner)
20656{
20657#ifndef RIPPER
20658 struct local_vars *local = p->lvtbl;
20659 if (prev_inner) {
20660 /* prefer first one */
20661 local->numparam.inner = prev_inner;
20662 }
20663 else if (local->numparam.current) {
20664 /* current and inner are exclusive */
20665 local->numparam.inner = local->numparam.current;
20666 }
20667 if (p->max_numparam > NO_PARAM) {
20668 /* current and outer are exclusive */
20669 local->numparam.current = local->numparam.outer;
20670 local->numparam.outer = 0;
20671 }
20672 else {
20673 /* no numbered parameter */
20674 local->numparam.current = 0;
20675 }
20676#endif
20677}
20678
20679static const struct vtable *
20680dyna_push(struct parser_params *p)
20681{
20682 p->lvtbl->args = vtable_alloc(p->lvtbl->args);
20683 p->lvtbl->vars = vtable_alloc(p->lvtbl->vars);
20684 if (p->lvtbl->used) {
20685 p->lvtbl->used = vtable_alloc(p->lvtbl->used);
20686 }
20687 return p->lvtbl->args;
20688}
20689
20690static void
20691dyna_pop_vtable(struct parser_params *p, struct vtable **vtblp)
20692{
20693 struct vtable *tmp = *vtblp;
20694 *vtblp = tmp->prev;
20695# if WARN_PAST_SCOPE
20696 if (p->past_scope_enabled) {
20697 tmp->prev = p->lvtbl->past;
20698 p->lvtbl->past = tmp;
20699 return;
20700 }
20701# endif
20702 vtable_free(tmp);
20703}
20704
20705static void
20706dyna_pop_1(struct parser_params *p)
20707{
20708 struct vtable *tmp;
20709
20710 if ((tmp = p->lvtbl->used) != 0) {
20711 warn_unused_var(p, p->lvtbl);
20712 p->lvtbl->used = p->lvtbl->used->prev;
20713 vtable_free(tmp);
20714 }
20715 dyna_pop_vtable(p, &p->lvtbl->args);
20716 dyna_pop_vtable(p, &p->lvtbl->vars);
20717}
20718
20719static void
20720dyna_pop(struct parser_params *p, const struct vtable *lvargs)
20721{
20722 while (p->lvtbl->args != lvargs) {
20723 dyna_pop_1(p);
20724 if (!p->lvtbl->args) {
20725 struct local_vars *local = p->lvtbl->prev;
20726 ruby_sized_xfree(p->lvtbl, sizeof(*p->lvtbl));
20727 p->lvtbl = local;
20728 }
20729 }
20730 dyna_pop_1(p);
20731}
20732
20733static int
20734dyna_in_block(struct parser_params *p)
20735{
20736 return !DVARS_TERMINAL_P(p->lvtbl->vars) && p->lvtbl->vars->prev != DVARS_TOPSCOPE;
20737}
20738
20739static int
20740dvar_defined_ref(struct parser_params *p, ID id, ID **vidrefp)
20741{
20742 struct vtable *vars, *args, *used;
20743 int i;
20744
20745 args = p->lvtbl->args;
20746 vars = p->lvtbl->vars;
20747 used = p->lvtbl->used;
20748
20749 while (!DVARS_TERMINAL_P(vars)) {
20750 if (vtable_included(args, id)) {
20751 return 1;
20752 }
20753 if ((i = vtable_included(vars, id)) != 0) {
20754 if (used && vidrefp) *vidrefp = &used->tbl[i-1];
20755 return 1;
20756 }
20757 args = args->prev;
20758 vars = vars->prev;
20759 if (!vidrefp) used = 0;
20760 if (used) used = used->prev;
20761 }
20762
20763 if (vars == DVARS_INHERIT && !NUMPARAM_ID_P(id)) {
20764 return rb_dvar_defined(id, p->parent_iseq);
20765 }
20766
20767 return 0;
20768}
20769
20770static int
20771dvar_defined(struct parser_params *p, ID id)
20772{
20773 return dvar_defined_ref(p, id, NULL);
20774}
20775
20776static int
20777dvar_curr(struct parser_params *p, ID id)
20778{
20779 return (vtable_included(p->lvtbl->args, id) ||
20780 vtable_included(p->lvtbl->vars, id));
20781}
20782
20783static void
20784reg_fragment_enc_error(struct parser_params* p, VALUE str, int c)
20785{
20786 compile_error(p,
20787 "regexp encoding option '%c' differs from source encoding '%s'",
20788 c, rb_enc_name(rb_enc_get(str)));
20789}
20790
20791#ifndef RIPPER
20792int
20793rb_reg_fragment_setenc(struct parser_params* p, VALUE str, int options)
20794{
20795 int c = RE_OPTION_ENCODING_IDX(options);
20796
20797 if (c) {
20798 int opt, idx;
20799 rb_char_to_option_kcode(c, &opt, &idx);
20800 if (idx != ENCODING_GET(str) &&
20802 goto error;
20803 }
20804 ENCODING_SET(str, idx);
20805 }
20806 else if (RE_OPTION_ENCODING_NONE(options)) {
20807 if (!ENCODING_IS_ASCII8BIT(str) &&
20809 c = 'n';
20810 goto error;
20811 }
20812 rb_enc_associate(str, rb_ascii8bit_encoding());
20813 }
20814 else if (p->enc == rb_usascii_encoding()) {
20816 /* raise in re.c */
20817 rb_enc_associate(str, rb_usascii_encoding());
20818 }
20819 else {
20820 rb_enc_associate(str, rb_ascii8bit_encoding());
20821 }
20822 }
20823 return 0;
20824
20825 error:
20826 return c;
20827}
20828
20829static void
20830reg_fragment_setenc(struct parser_params* p, VALUE str, int options)
20831{
20832 int c = rb_reg_fragment_setenc(p, str, options);
20833 if (c) reg_fragment_enc_error(p, str, c);
20834}
20835
20836static int
20837reg_fragment_check(struct parser_params* p, VALUE str, int options)
20838{
20839 VALUE err;
20840 reg_fragment_setenc(p, str, options);
20841 err = rb_reg_check_preprocess(str);
20842 if (err != Qnil) {
20843 err = rb_obj_as_string(err);
20844 compile_error(p, "%"PRIsVALUE, err);
20845 return 0;
20846 }
20847 return 1;
20848}
20849
20850typedef struct {
20851 struct parser_params* parser;
20852 rb_encoding *enc;
20853 NODE *succ_block;
20854 const YYLTYPE *loc;
20856
20857static int
20858reg_named_capture_assign_iter(const OnigUChar *name, const OnigUChar *name_end,
20859 int back_num, int *back_refs, OnigRegex regex, void *arg0)
20860{
20862 struct parser_params* p = arg->parser;
20863 rb_encoding *enc = arg->enc;
20864 long len = name_end - name;
20865 const char *s = (const char *)name;
20866 ID var;
20867 NODE *node, *succ;
20868
20869 if (!len) return ST_CONTINUE;
20870 if (rb_enc_symname_type(s, len, enc, (1U<<ID_LOCAL)) != ID_LOCAL)
20871 return ST_CONTINUE;
20872
20873 var = intern_cstr(s, len, enc);
20874 if (len < MAX_WORD_LENGTH && rb_reserved_word(s, (int)len)) {
20875 if (!lvar_defined(p, var)) return ST_CONTINUE;
20876 }
20877 node = node_assign(p, assignable(p, var, 0, arg->loc), NEW_LIT(ID2SYM(var), arg->loc), NO_LEX_CTXT, arg->loc);
20878 succ = arg->succ_block;
20879 if (!succ) succ = NEW_BEGIN(0, arg->loc);
20880 succ = block_append(p, succ, node);
20881 arg->succ_block = succ;
20882 return ST_CONTINUE;
20883}
20884
20885static NODE *
20886reg_named_capture_assign(struct parser_params* p, VALUE regexp, const YYLTYPE *loc)
20887{
20889
20890 arg.parser = p;
20891 arg.enc = rb_enc_get(regexp);
20892 arg.succ_block = 0;
20893 arg.loc = loc;
20894 onig_foreach_name(RREGEXP_PTR(regexp), reg_named_capture_assign_iter, &arg);
20895
20896 if (!arg.succ_block) return 0;
20897 return arg.succ_block->nd_next;
20898}
20899
20900static VALUE
20901parser_reg_compile(struct parser_params* p, VALUE str, int options)
20902{
20903 reg_fragment_setenc(p, str, options);
20904 return rb_parser_reg_compile(p, str, options);
20905}
20906
20907VALUE
20908rb_parser_reg_compile(struct parser_params* p, VALUE str, int options)
20909{
20910 return rb_reg_compile(str, options & RE_OPTION_MASK, p->ruby_sourcefile, p->ruby_sourceline);
20911}
20912
20913static VALUE
20914reg_compile(struct parser_params* p, VALUE str, int options)
20915{
20916 VALUE re;
20917 VALUE err;
20918
20919 err = rb_errinfo();
20920 re = parser_reg_compile(p, str, options);
20921 if (NIL_P(re)) {
20922 VALUE m = rb_attr_get(rb_errinfo(), idMesg);
20923 rb_set_errinfo(err);
20924 compile_error(p, "%"PRIsVALUE, m);
20925 return Qnil;
20926 }
20927 return re;
20928}
20929#else
20930static VALUE
20931parser_reg_compile(struct parser_params* p, VALUE str, int options, VALUE *errmsg)
20932{
20933 VALUE err = rb_errinfo();
20934 VALUE re;
20935 str = ripper_is_node_yylval(str) ? RNODE(str)->nd_cval : str;
20936 int c = rb_reg_fragment_setenc(p, str, options);
20937 if (c) reg_fragment_enc_error(p, str, c);
20938 re = rb_parser_reg_compile(p, str, options);
20939 if (NIL_P(re)) {
20940 *errmsg = rb_attr_get(rb_errinfo(), idMesg);
20941 rb_set_errinfo(err);
20942 }
20943 return re;
20944}
20945#endif
20946
20947#ifndef RIPPER
20948void
20949rb_parser_set_options(VALUE vparser, int print, int loop, int chomp, int split)
20950{
20951 struct parser_params *p;
20952 TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, p);
20953 p->do_print = print;
20954 p->do_loop = loop;
20955 p->do_chomp = chomp;
20956 p->do_split = split;
20957}
20958
20959static NODE *
20960parser_append_options(struct parser_params *p, NODE *node)
20961{
20962 static const YYLTYPE default_location = {{1, 0}, {1, 0}};
20963 const YYLTYPE *const LOC = &default_location;
20964
20965 if (p->do_print) {
20966 NODE *print = NEW_FCALL(rb_intern("print"),
20967 NEW_LIST(NEW_GVAR(idLASTLINE, LOC), LOC),
20968 LOC);
20969 node = block_append(p, node, print);
20970 }
20971
20972 if (p->do_loop) {
20973 if (p->do_split) {
20974 ID ifs = rb_intern("$;");
20975 ID fields = rb_intern("$F");
20976 NODE *args = NEW_LIST(NEW_GVAR(ifs, LOC), LOC);
20977 NODE *split = NEW_GASGN(fields,
20978 NEW_CALL(NEW_GVAR(idLASTLINE, LOC),
20979 rb_intern("split"), args, LOC),
20980 LOC);
20981 node = block_append(p, split, node);
20982 }
20983 if (p->do_chomp) {
20984 NODE *chomp = NEW_CALL(NEW_GVAR(idLASTLINE, LOC),
20985 rb_intern("chomp!"), 0, LOC);
20986 node = block_append(p, chomp, node);
20987 }
20988
20989 node = NEW_WHILE(NEW_VCALL(idGets, LOC), node, 1, LOC);
20990 }
20991
20992 return node;
20993}
20994
20995void
20996rb_init_parse(void)
20997{
20998 /* just to suppress unused-function warnings */
20999 (void)nodetype;
21000 (void)nodeline;
21001}
21002
21003static ID
21004internal_id(struct parser_params *p)
21005{
21006 return rb_make_temporary_id(vtable_size(p->lvtbl->args) + vtable_size(p->lvtbl->vars));
21007}
21008#endif /* !RIPPER */
21009
21010static void
21011parser_initialize(struct parser_params *p)
21012{
21013 /* note: we rely on TypedData_Make_Struct to set most fields to 0 */
21014 p->command_start = TRUE;
21015 p->ruby_sourcefile_string = Qnil;
21016 p->lex.lpar_beg = -1; /* make lambda_beginning_p() == FALSE at first */
21017 p->node_id = 0;
21018#ifdef RIPPER
21019 p->delayed.token = Qnil;
21020 p->result = Qnil;
21021 p->parsing_thread = Qnil;
21022#else
21023 p->error_buffer = Qfalse;
21024#endif
21025 p->debug_buffer = Qnil;
21026 p->debug_output = rb_ractor_stdout();
21027 p->enc = rb_utf8_encoding();
21028}
21029
21030#ifdef RIPPER
21031#define parser_mark ripper_parser_mark
21032#define parser_free ripper_parser_free
21033#endif
21034
21035static void
21036parser_mark(void *ptr)
21037{
21038 struct parser_params *p = (struct parser_params*)ptr;
21039
21040 rb_gc_mark(p->lex.input);
21041 rb_gc_mark(p->lex.prevline);
21042 rb_gc_mark(p->lex.lastline);
21043 rb_gc_mark(p->lex.nextline);
21044 rb_gc_mark(p->ruby_sourcefile_string);
21045 rb_gc_mark((VALUE)p->lex.strterm);
21046 rb_gc_mark((VALUE)p->ast);
21047 rb_gc_mark(p->case_labels);
21048#ifndef RIPPER
21049 rb_gc_mark(p->debug_lines);
21050 rb_gc_mark(p->compile_option);
21051 rb_gc_mark(p->error_buffer);
21052#else
21053 rb_gc_mark(p->delayed.token);
21054 rb_gc_mark(p->value);
21055 rb_gc_mark(p->result);
21056 rb_gc_mark(p->parsing_thread);
21057#endif
21058 rb_gc_mark(p->debug_buffer);
21059 rb_gc_mark(p->debug_output);
21060#ifdef YYMALLOC
21061 rb_gc_mark((VALUE)p->heap);
21062#endif
21063}
21064
21065static void
21066parser_free(void *ptr)
21067{
21068 struct parser_params *p = (struct parser_params*)ptr;
21069 struct local_vars *local, *prev;
21070
21071 if (p->tokenbuf) {
21072 ruby_sized_xfree(p->tokenbuf, p->toksiz);
21073 }
21074 for (local = p->lvtbl; local; local = prev) {
21075 if (local->vars) xfree(local->vars);
21076 prev = local->prev;
21077 xfree(local);
21078 }
21079 {
21080 token_info *ptinfo;
21081 while ((ptinfo = p->token_info) != 0) {
21082 p->token_info = ptinfo->next;
21083 xfree(ptinfo);
21084 }
21085 }
21086 xfree(ptr);
21087}
21088
21089static size_t
21090parser_memsize(const void *ptr)
21091{
21092 struct parser_params *p = (struct parser_params*)ptr;
21093 struct local_vars *local;
21094 size_t size = sizeof(*p);
21095
21096 size += p->toksiz;
21097 for (local = p->lvtbl; local; local = local->prev) {
21098 size += sizeof(*local);
21099 if (local->vars) size += local->vars->capa * sizeof(ID);
21100 }
21101 return size;
21102}
21103
21104static const rb_data_type_t parser_data_type = {
21105#ifndef RIPPER
21106 "parser",
21107#else
21108 "ripper",
21109#endif
21110 {
21111 parser_mark,
21112 parser_free,
21113 parser_memsize,
21114 },
21115 0, 0, RUBY_TYPED_FREE_IMMEDIATELY
21116};
21117
21118#ifndef RIPPER
21119#undef rb_reserved_word
21120
21121const struct kwtable *
21122rb_reserved_word(const char *str, unsigned int len)
21123{
21124 return reserved_word(str, len);
21125}
21126
21127VALUE
21128rb_parser_new(void)
21129{
21130 struct parser_params *p;
21131 VALUE parser = TypedData_Make_Struct(0, struct parser_params,
21132 &parser_data_type, p);
21133 parser_initialize(p);
21134 return parser;
21135}
21136
21137VALUE
21138rb_parser_set_context(VALUE vparser, const struct rb_iseq_struct *base, int main)
21139{
21140 struct parser_params *p;
21141
21142 TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, p);
21143 p->error_buffer = main ? Qfalse : Qnil;
21144 p->parent_iseq = base;
21145 return vparser;
21146}
21147
21148void
21149rb_parser_keep_script_lines(VALUE vparser)
21150{
21151 struct parser_params *p;
21152
21153 TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, p);
21154 p->keep_script_lines = 1;
21155}
21156#endif
21157
21158#ifdef RIPPER
21159#define rb_parser_end_seen_p ripper_parser_end_seen_p
21160#define rb_parser_encoding ripper_parser_encoding
21161#define rb_parser_get_yydebug ripper_parser_get_yydebug
21162#define rb_parser_set_yydebug ripper_parser_set_yydebug
21163#define rb_parser_get_debug_output ripper_parser_get_debug_output
21164#define rb_parser_set_debug_output ripper_parser_set_debug_output
21165static VALUE ripper_parser_end_seen_p(VALUE vparser);
21166static VALUE ripper_parser_encoding(VALUE vparser);
21167static VALUE ripper_parser_get_yydebug(VALUE self);
21168static VALUE ripper_parser_set_yydebug(VALUE self, VALUE flag);
21169static VALUE ripper_parser_get_debug_output(VALUE self);
21170static VALUE ripper_parser_set_debug_output(VALUE self, VALUE output);
21171
21172/*
21173 * call-seq:
21174 * ripper.error? -> Boolean
21175 *
21176 * Return true if parsed source has errors.
21177 */
21178static VALUE
21179ripper_error_p(VALUE vparser)
21180{
21181 struct parser_params *p;
21182
21183 TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, p);
21184 return RBOOL(p->error_p);
21185}
21186#endif
21187
21188/*
21189 * call-seq:
21190 * ripper.end_seen? -> Boolean
21191 *
21192 * Return true if parsed source ended by +\_\_END\_\_+.
21193 */
21194VALUE
21195rb_parser_end_seen_p(VALUE vparser)
21196{
21197 struct parser_params *p;
21198
21199 TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, p);
21200 return RBOOL(p->ruby__end__seen);
21201}
21202
21203/*
21204 * call-seq:
21205 * ripper.encoding -> encoding
21206 *
21207 * Return encoding of the source.
21208 */
21209VALUE
21210rb_parser_encoding(VALUE vparser)
21211{
21212 struct parser_params *p;
21213
21214 TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, p);
21215 return rb_enc_from_encoding(p->enc);
21216}
21217
21218#ifdef RIPPER
21219/*
21220 * call-seq:
21221 * ripper.yydebug -> true or false
21222 *
21223 * Get yydebug.
21224 */
21225VALUE
21226rb_parser_get_yydebug(VALUE self)
21227{
21228 struct parser_params *p;
21229
21230 TypedData_Get_Struct(self, struct parser_params, &parser_data_type, p);
21231 return RBOOL(p->debug);
21232}
21233#endif
21234
21235/*
21236 * call-seq:
21237 * ripper.yydebug = flag
21238 *
21239 * Set yydebug.
21240 */
21241VALUE
21242rb_parser_set_yydebug(VALUE self, VALUE flag)
21243{
21244 struct parser_params *p;
21245
21246 TypedData_Get_Struct(self, struct parser_params, &parser_data_type, p);
21247 p->debug = RTEST(flag);
21248 return flag;
21249}
21250
21251/*
21252 * call-seq:
21253 * ripper.debug_output -> obj
21254 *
21255 * Get debug output.
21256 */
21257VALUE
21258rb_parser_get_debug_output(VALUE self)
21259{
21260 struct parser_params *p;
21261
21262 TypedData_Get_Struct(self, struct parser_params, &parser_data_type, p);
21263 return p->debug_output;
21264}
21265
21266/*
21267 * call-seq:
21268 * ripper.debug_output = obj
21269 *
21270 * Set debug output.
21271 */
21272VALUE
21273rb_parser_set_debug_output(VALUE self, VALUE output)
21274{
21275 struct parser_params *p;
21276
21277 TypedData_Get_Struct(self, struct parser_params, &parser_data_type, p);
21278 return p->debug_output = output;
21279}
21280
21281#ifndef RIPPER
21282#ifdef YYMALLOC
21283#define HEAPCNT(n, size) ((n) * (size) / sizeof(YYSTYPE))
21284/* Keep the order; NEWHEAP then xmalloc and ADD2HEAP to get rid of
21285 * potential memory leak */
21286#define NEWHEAP() rb_imemo_tmpbuf_parser_heap(0, p->heap, 0)
21287#define ADD2HEAP(new, cnt, ptr) ((p->heap = (new))->ptr = (ptr), \
21288 (new)->cnt = (cnt), (ptr))
21289
21290void *
21291rb_parser_malloc(struct parser_params *p, size_t size)
21292{
21293 size_t cnt = HEAPCNT(1, size);
21294 rb_imemo_tmpbuf_t *n = NEWHEAP();
21295 void *ptr = xmalloc(size);
21296
21297 return ADD2HEAP(n, cnt, ptr);
21298}
21299
21300void *
21301rb_parser_calloc(struct parser_params *p, size_t nelem, size_t size)
21302{
21303 size_t cnt = HEAPCNT(nelem, size);
21304 rb_imemo_tmpbuf_t *n = NEWHEAP();
21305 void *ptr = xcalloc(nelem, size);
21306
21307 return ADD2HEAP(n, cnt, ptr);
21308}
21309
21310void *
21311rb_parser_realloc(struct parser_params *p, void *ptr, size_t size)
21312{
21314 size_t cnt = HEAPCNT(1, size);
21315
21316 if (ptr && (n = p->heap) != NULL) {
21317 do {
21318 if (n->ptr == ptr) {
21319 n->ptr = ptr = xrealloc(ptr, size);
21320 if (n->cnt) n->cnt = cnt;
21321 return ptr;
21322 }
21323 } while ((n = n->next) != NULL);
21324 }
21325 n = NEWHEAP();
21326 ptr = xrealloc(ptr, size);
21327 return ADD2HEAP(n, cnt, ptr);
21328}
21329
21330void
21331rb_parser_free(struct parser_params *p, void *ptr)
21332{
21333 rb_imemo_tmpbuf_t **prev = &p->heap, *n;
21334
21335 while ((n = *prev) != NULL) {
21336 if (n->ptr == ptr) {
21337 *prev = n->next;
21338 break;
21339 }
21340 prev = &n->next;
21341 }
21342}
21343#endif
21344
21345void
21346rb_parser_printf(struct parser_params *p, const char *fmt, ...)
21347{
21348 va_list ap;
21349 VALUE mesg = p->debug_buffer;
21350
21351 if (NIL_P(mesg)) p->debug_buffer = mesg = rb_str_new(0, 0);
21352 va_start(ap, fmt);
21353 rb_str_vcatf(mesg, fmt, ap);
21354 va_end(ap);
21355 if (RSTRING_END(mesg)[-1] == '\n') {
21356 rb_io_write(p->debug_output, mesg);
21357 p->debug_buffer = Qnil;
21358 }
21359}
21360
21361static void
21362parser_compile_error(struct parser_params *p, const char *fmt, ...)
21363{
21364 va_list ap;
21365
21366 rb_io_flush(p->debug_output);
21367 p->error_p = 1;
21368 va_start(ap, fmt);
21369 p->error_buffer =
21370 rb_syntax_error_append(p->error_buffer,
21371 p->ruby_sourcefile_string,
21372 p->ruby_sourceline,
21373 rb_long2int(p->lex.pcur - p->lex.pbeg),
21374 p->enc, fmt, ap);
21375 va_end(ap);
21376}
21377
21378static size_t
21379count_char(const char *str, int c)
21380{
21381 int n = 0;
21382 while (str[n] == c) ++n;
21383 return n;
21384}
21385
21386/*
21387 * strip enclosing double-quotes, same as the default yytnamerr except
21388 * for that single-quotes matching back-quotes do not stop stripping.
21389 *
21390 * "\"`class' keyword\"" => "`class' keyword"
21391 */
21392RUBY_FUNC_EXPORTED size_t
21393rb_yytnamerr(struct parser_params *p, char *yyres, const char *yystr)
21394{
21395 if (*yystr == '"') {
21396 size_t yyn = 0, bquote = 0;
21397 const char *yyp = yystr;
21398
21399 while (*++yyp) {
21400 switch (*yyp) {
21401 case '`':
21402 if (!bquote) {
21403 bquote = count_char(yyp+1, '`') + 1;
21404 if (yyres) memcpy(&yyres[yyn], yyp, bquote);
21405 yyn += bquote;
21406 yyp += bquote - 1;
21407 break;
21408 }
21409 goto default_char;
21410
21411 case '\'':
21412 if (bquote && count_char(yyp+1, '\'') + 1 == bquote) {
21413 if (yyres) memcpy(yyres + yyn, yyp, bquote);
21414 yyn += bquote;
21415 yyp += bquote - 1;
21416 bquote = 0;
21417 break;
21418 }
21419 if (yyp[1] && yyp[1] != '\'' && yyp[2] == '\'') {
21420 if (yyres) memcpy(yyres + yyn, yyp, 3);
21421 yyn += 3;
21422 yyp += 2;
21423 break;
21424 }
21425 goto do_not_strip_quotes;
21426
21427 case ',':
21428 goto do_not_strip_quotes;
21429
21430 case '\\':
21431 if (*++yyp != '\\')
21432 goto do_not_strip_quotes;
21433 /* Fall through. */
21434 default_char:
21435 default:
21436 if (yyres)
21437 yyres[yyn] = *yyp;
21438 yyn++;
21439 break;
21440
21441 case '"':
21442 case '\0':
21443 if (yyres)
21444 yyres[yyn] = '\0';
21445 return yyn;
21446 }
21447 }
21448 do_not_strip_quotes: ;
21449 }
21450
21451 if (!yyres) return strlen(yystr);
21452
21453 return (YYSIZE_T)(yystpcpy(yyres, yystr) - yyres);
21454}
21455#endif
21456
21457#ifdef RIPPER
21458#ifdef RIPPER_DEBUG
21459/* :nodoc: */
21460static VALUE
21461ripper_validate_object(VALUE self, VALUE x)
21462{
21463 if (x == Qfalse) return x;
21464 if (x == Qtrue) return x;
21465 if (x == Qnil) return x;
21466 if (x == Qundef)
21467 rb_raise(rb_eArgError, "Qundef given");
21468 if (FIXNUM_P(x)) return x;
21469 if (SYMBOL_P(x)) return x;
21470 switch (BUILTIN_TYPE(x)) {
21471 case T_STRING:
21472 case T_OBJECT:
21473 case T_ARRAY:
21474 case T_BIGNUM:
21475 case T_FLOAT:
21476 case T_COMPLEX:
21477 case T_RATIONAL:
21478 break;
21479 case T_NODE:
21480 if (!nd_type_p((NODE *)x, NODE_RIPPER)) {
21481 rb_raise(rb_eArgError, "NODE given: %p", (void *)x);
21482 }
21483 x = ((NODE *)x)->nd_rval;
21484 break;
21485 default:
21486 rb_raise(rb_eArgError, "wrong type of ruby object: %p (%s)",
21487 (void *)x, rb_obj_classname(x));
21488 }
21489 if (!RBASIC_CLASS(x)) {
21490 rb_raise(rb_eArgError, "hidden ruby object: %p (%s)",
21491 (void *)x, rb_builtin_type_name(TYPE(x)));
21492 }
21493 return x;
21494}
21495#endif
21496
21497#define validate(x) ((x) = get_value(x))
21498
21499static VALUE
21500ripper_dispatch0(struct parser_params *p, ID mid)
21501{
21502 return rb_funcall(p->value, mid, 0);
21503}
21504
21505static VALUE
21506ripper_dispatch1(struct parser_params *p, ID mid, VALUE a)
21507{
21508 validate(a);
21509 return rb_funcall(p->value, mid, 1, a);
21510}
21511
21512static VALUE
21513ripper_dispatch2(struct parser_params *p, ID mid, VALUE a, VALUE b)
21514{
21515 validate(a);
21516 validate(b);
21517 return rb_funcall(p->value, mid, 2, a, b);
21518}
21519
21520static VALUE
21521ripper_dispatch3(struct parser_params *p, ID mid, VALUE a, VALUE b, VALUE c)
21522{
21523 validate(a);
21524 validate(b);
21525 validate(c);
21526 return rb_funcall(p->value, mid, 3, a, b, c);
21527}
21528
21529static VALUE
21530ripper_dispatch4(struct parser_params *p, ID mid, VALUE a, VALUE b, VALUE c, VALUE d)
21531{
21532 validate(a);
21533 validate(b);
21534 validate(c);
21535 validate(d);
21536 return rb_funcall(p->value, mid, 4, a, b, c, d);
21537}
21538
21539static VALUE
21540ripper_dispatch5(struct parser_params *p, ID mid, VALUE a, VALUE b, VALUE c, VALUE d, VALUE e)
21541{
21542 validate(a);
21543 validate(b);
21544 validate(c);
21545 validate(d);
21546 validate(e);
21547 return rb_funcall(p->value, mid, 5, a, b, c, d, e);
21548}
21549
21550static VALUE
21551ripper_dispatch7(struct parser_params *p, ID mid, VALUE a, VALUE b, VALUE c, VALUE d, VALUE e, VALUE f, VALUE g)
21552{
21553 validate(a);
21554 validate(b);
21555 validate(c);
21556 validate(d);
21557 validate(e);
21558 validate(f);
21559 validate(g);
21560 return rb_funcall(p->value, mid, 7, a, b, c, d, e, f, g);
21561}
21562
21563static ID
21564ripper_get_id(VALUE v)
21565{
21566 NODE *nd;
21567 if (!RB_TYPE_P(v, T_NODE)) return 0;
21568 nd = (NODE *)v;
21569 if (!nd_type_p(nd, NODE_RIPPER)) return 0;
21570 return nd->nd_vid;
21571}
21572
21573static VALUE
21574ripper_get_value(VALUE v)
21575{
21576 NODE *nd;
21577 if (v == Qundef) return Qnil;
21578 if (!RB_TYPE_P(v, T_NODE)) return v;
21579 nd = (NODE *)v;
21580 if (!nd_type_p(nd, NODE_RIPPER)) return Qnil;
21581 return nd->nd_rval;
21582}
21583
21584static void
21585ripper_error(struct parser_params *p)
21586{
21587 p->error_p = TRUE;
21588}
21589
21590static void
21591ripper_compile_error(struct parser_params *p, const char *fmt, ...)
21592{
21593 VALUE str;
21594 va_list args;
21595
21596 va_start(args, fmt);
21597 str = rb_vsprintf(fmt, args);
21598 va_end(args);
21599 rb_funcall(p->value, rb_intern("compile_error"), 1, str);
21600 ripper_error(p);
21601}
21602
21603static VALUE
21604ripper_lex_get_generic(struct parser_params *p, VALUE src)
21605{
21606 VALUE line = rb_funcallv_public(src, id_gets, 0, 0);
21607 if (!NIL_P(line) && !RB_TYPE_P(line, T_STRING)) {
21609 "gets returned %"PRIsVALUE" (expected String or nil)",
21610 rb_obj_class(line));
21611 }
21612 return line;
21613}
21614
21615static VALUE
21616ripper_lex_io_get(struct parser_params *p, VALUE src)
21617{
21618 return rb_io_gets(src);
21619}
21620
21621static VALUE
21622ripper_s_allocate(VALUE klass)
21623{
21624 struct parser_params *p;
21625 VALUE self = TypedData_Make_Struct(klass, struct parser_params,
21626 &parser_data_type, p);
21627 p->value = self;
21628 return self;
21629}
21630
21631#define ripper_initialized_p(r) ((r)->lex.input != 0)
21632
21633/*
21634 * call-seq:
21635 * Ripper.new(src, filename="(ripper)", lineno=1) -> ripper
21636 *
21637 * Create a new Ripper object.
21638 * _src_ must be a String, an IO, or an Object which has #gets method.
21639 *
21640 * This method does not starts parsing.
21641 * See also Ripper#parse and Ripper.parse.
21642 */
21643static VALUE
21644ripper_initialize(int argc, VALUE *argv, VALUE self)
21645{
21646 struct parser_params *p;
21647 VALUE src, fname, lineno;
21648
21649 TypedData_Get_Struct(self, struct parser_params, &parser_data_type, p);
21650 rb_scan_args(argc, argv, "12", &src, &fname, &lineno);
21651 if (RB_TYPE_P(src, T_FILE)) {
21652 p->lex.gets = ripper_lex_io_get;
21653 }
21654 else if (rb_respond_to(src, id_gets)) {
21655 p->lex.gets = ripper_lex_get_generic;
21656 }
21657 else {
21658 StringValue(src);
21659 p->lex.gets = lex_get_str;
21660 }
21661 p->lex.input = src;
21662 p->eofp = 0;
21663 if (NIL_P(fname)) {
21664 fname = STR_NEW2("(ripper)");
21665 OBJ_FREEZE(fname);
21666 }
21667 else {
21668 StringValueCStr(fname);
21669 fname = rb_str_new_frozen(fname);
21670 }
21671 parser_initialize(p);
21672
21673 p->ruby_sourcefile_string = fname;
21674 p->ruby_sourcefile = RSTRING_PTR(fname);
21675 p->ruby_sourceline = NIL_P(lineno) ? 0 : NUM2INT(lineno) - 1;
21676
21677 return Qnil;
21678}
21679
21680static VALUE
21681ripper_parse0(VALUE parser_v)
21682{
21683 struct parser_params *p;
21684
21685 TypedData_Get_Struct(parser_v, struct parser_params, &parser_data_type, p);
21686 parser_prepare(p);
21687 p->ast = rb_ast_new();
21688 ripper_yyparse((void*)p);
21689 rb_ast_dispose(p->ast);
21690 p->ast = 0;
21691 return p->result;
21692}
21693
21694static VALUE
21695ripper_ensure(VALUE parser_v)
21696{
21697 struct parser_params *p;
21698
21699 TypedData_Get_Struct(parser_v, struct parser_params, &parser_data_type, p);
21700 p->parsing_thread = Qnil;
21701 return Qnil;
21702}
21703
21704/*
21705 * call-seq:
21706 * ripper.parse
21707 *
21708 * Start parsing and returns the value of the root action.
21709 */
21710static VALUE
21711ripper_parse(VALUE self)
21712{
21713 struct parser_params *p;
21714
21715 TypedData_Get_Struct(self, struct parser_params, &parser_data_type, p);
21716 if (!ripper_initialized_p(p)) {
21717 rb_raise(rb_eArgError, "method called for uninitialized object");
21718 }
21719 if (!NIL_P(p->parsing_thread)) {
21720 if (p->parsing_thread == rb_thread_current())
21721 rb_raise(rb_eArgError, "Ripper#parse is not reentrant");
21722 else
21723 rb_raise(rb_eArgError, "Ripper#parse is not multithread-safe");
21724 }
21725 p->parsing_thread = rb_thread_current();
21726 rb_ensure(ripper_parse0, self, ripper_ensure, self);
21727
21728 return p->result;
21729}
21730
21731/*
21732 * call-seq:
21733 * ripper.column -> Integer
21734 *
21735 * Return column number of current parsing line.
21736 * This number starts from 0.
21737 */
21738static VALUE
21739ripper_column(VALUE self)
21740{
21741 struct parser_params *p;
21742 long col;
21743
21744 TypedData_Get_Struct(self, struct parser_params, &parser_data_type, p);
21745 if (!ripper_initialized_p(p)) {
21746 rb_raise(rb_eArgError, "method called for uninitialized object");
21747 }
21748 if (NIL_P(p->parsing_thread)) return Qnil;
21749 col = p->lex.ptok - p->lex.pbeg;
21750 return LONG2NUM(col);
21751}
21752
21753/*
21754 * call-seq:
21755 * ripper.filename -> String
21756 *
21757 * Return current parsing filename.
21758 */
21759static VALUE
21760ripper_filename(VALUE self)
21761{
21762 struct parser_params *p;
21763
21764 TypedData_Get_Struct(self, struct parser_params, &parser_data_type, p);
21765 if (!ripper_initialized_p(p)) {
21766 rb_raise(rb_eArgError, "method called for uninitialized object");
21767 }
21768 return p->ruby_sourcefile_string;
21769}
21770
21771/*
21772 * call-seq:
21773 * ripper.lineno -> Integer
21774 *
21775 * Return line number of current parsing line.
21776 * This number starts from 1.
21777 */
21778static VALUE
21779ripper_lineno(VALUE self)
21780{
21781 struct parser_params *p;
21782
21783 TypedData_Get_Struct(self, struct parser_params, &parser_data_type, p);
21784 if (!ripper_initialized_p(p)) {
21785 rb_raise(rb_eArgError, "method called for uninitialized object");
21786 }
21787 if (NIL_P(p->parsing_thread)) return Qnil;
21788 return INT2NUM(p->ruby_sourceline);
21789}
21790
21791/*
21792 * call-seq:
21793 * ripper.state -> Integer
21794 *
21795 * Return scanner state of current token.
21796 */
21797static VALUE
21798ripper_state(VALUE self)
21799{
21800 struct parser_params *p;
21801
21802 TypedData_Get_Struct(self, struct parser_params, &parser_data_type, p);
21803 if (!ripper_initialized_p(p)) {
21804 rb_raise(rb_eArgError, "method called for uninitialized object");
21805 }
21806 if (NIL_P(p->parsing_thread)) return Qnil;
21807 return INT2NUM(p->lex.state);
21808}
21809
21810/*
21811 * call-seq:
21812 * ripper.token -> String
21813 *
21814 * Return the current token string.
21815 */
21816static VALUE
21817ripper_token(VALUE self)
21818{
21819 struct parser_params *p;
21820 long pos, len;
21821
21822 TypedData_Get_Struct(self, struct parser_params, &parser_data_type, p);
21823 if (!ripper_initialized_p(p)) {
21824 rb_raise(rb_eArgError, "method called for uninitialized object");
21825 }
21826 if (NIL_P(p->parsing_thread)) return Qnil;
21827 pos = p->lex.ptok - p->lex.pbeg;
21828 len = p->lex.pcur - p->lex.ptok;
21829 return rb_str_subseq(p->lex.lastline, pos, len);
21830}
21831
21832#ifdef RIPPER_DEBUG
21833/* :nodoc: */
21834static VALUE
21835ripper_assert_Qundef(VALUE self, VALUE obj, VALUE msg)
21836{
21837 StringValue(msg);
21838 if (obj == Qundef) {
21839 rb_raise(rb_eArgError, "%"PRIsVALUE, msg);
21840 }
21841 return Qnil;
21842}
21843
21844/* :nodoc: */
21845static VALUE
21846ripper_value(VALUE self, VALUE obj)
21847{
21848 return ULONG2NUM(obj);
21849}
21850#endif
21851
21852/*
21853 * call-seq:
21854 * Ripper.lex_state_name(integer) -> string
21855 *
21856 * Returns a string representation of lex_state.
21857 */
21858static VALUE
21859ripper_lex_state_name(VALUE self, VALUE state)
21860{
21861 return rb_parser_lex_state_name(NUM2INT(state));
21862}
21863
21864void
21865Init_ripper(void)
21866{
21867 ripper_init_eventids1();
21868 ripper_init_eventids2();
21869 id_warn = rb_intern_const("warn");
21870 id_warning = rb_intern_const("warning");
21871 id_gets = rb_intern_const("gets");
21872 id_assoc = rb_intern_const("=>");
21873
21874 (void)yystpcpy; /* may not used in newer bison */
21875
21876 InitVM(ripper);
21877}
21878
21879void
21880InitVM_ripper(void)
21881{
21882 VALUE Ripper;
21883
21884 Ripper = rb_define_class("Ripper", rb_cObject);
21885 /* version of Ripper */
21886 rb_define_const(Ripper, "Version", rb_usascii_str_new2(RIPPER_VERSION));
21887 rb_define_alloc_func(Ripper, ripper_s_allocate);
21888 rb_define_method(Ripper, "initialize", ripper_initialize, -1);
21889 rb_define_method(Ripper, "parse", ripper_parse, 0);
21890 rb_define_method(Ripper, "column", ripper_column, 0);
21891 rb_define_method(Ripper, "filename", ripper_filename, 0);
21892 rb_define_method(Ripper, "lineno", ripper_lineno, 0);
21893 rb_define_method(Ripper, "state", ripper_state, 0);
21894 rb_define_method(Ripper, "token", ripper_token, 0);
21895 rb_define_method(Ripper, "end_seen?", rb_parser_end_seen_p, 0);
21896 rb_define_method(Ripper, "encoding", rb_parser_encoding, 0);
21897 rb_define_method(Ripper, "yydebug", rb_parser_get_yydebug, 0);
21898 rb_define_method(Ripper, "yydebug=", rb_parser_set_yydebug, 1);
21899 rb_define_method(Ripper, "debug_output", rb_parser_get_debug_output, 0);
21900 rb_define_method(Ripper, "debug_output=", rb_parser_set_debug_output, 1);
21901 rb_define_method(Ripper, "error?", ripper_error_p, 0);
21902#ifdef RIPPER_DEBUG
21903 rb_define_method(Ripper, "assert_Qundef", ripper_assert_Qundef, 2);
21904 rb_define_method(Ripper, "rawVALUE", ripper_value, 1);
21905 rb_define_method(Ripper, "validate_object", ripper_validate_object, 1);
21906#endif
21907
21908 rb_define_singleton_method(Ripper, "dedent_string", parser_dedent_string, 2);
21909 rb_define_private_method(Ripper, "dedent_string", parser_dedent_string, 2);
21910
21911 rb_define_singleton_method(Ripper, "lex_state_name", ripper_lex_state_name, 1);
21912
21913 /* ignore newline, +/- is a sign. */
21914 rb_define_const(Ripper, "EXPR_BEG", INT2NUM(EXPR_BEG));
21915 /* newline significant, +/- is an operator. */
21916 rb_define_const(Ripper, "EXPR_END", INT2NUM(EXPR_END));
21917 /* ditto, and unbound braces. */
21918 rb_define_const(Ripper, "EXPR_ENDARG", INT2NUM(EXPR_ENDARG));
21919 /* ditto, and unbound braces. */
21920 rb_define_const(Ripper, "EXPR_ENDFN", INT2NUM(EXPR_ENDFN));
21921 /* newline significant, +/- is an operator. */
21922 rb_define_const(Ripper, "EXPR_ARG", INT2NUM(EXPR_ARG));
21923 /* newline significant, +/- is an operator. */
21924 rb_define_const(Ripper, "EXPR_CMDARG", INT2NUM(EXPR_CMDARG));
21925 /* newline significant, +/- is an operator. */
21926 rb_define_const(Ripper, "EXPR_MID", INT2NUM(EXPR_MID));
21927 /* ignore newline, no reserved words. */
21928 rb_define_const(Ripper, "EXPR_FNAME", INT2NUM(EXPR_FNAME));
21929 /* right after `.' or `::', no reserved words. */
21930 rb_define_const(Ripper, "EXPR_DOT", INT2NUM(EXPR_DOT));
21931 /* immediate after `class', no here document. */
21932 rb_define_const(Ripper, "EXPR_CLASS", INT2NUM(EXPR_CLASS));
21933 /* flag bit, label is allowed. */
21934 rb_define_const(Ripper, "EXPR_LABEL", INT2NUM(EXPR_LABEL));
21935 /* flag bit, just after a label. */
21936 rb_define_const(Ripper, "EXPR_LABELED", INT2NUM(EXPR_LABELED));
21937 /* symbol literal as FNAME. */
21938 rb_define_const(Ripper, "EXPR_FITEM", INT2NUM(EXPR_FITEM));
21939 /* equals to +EXPR_BEG+ */
21940 rb_define_const(Ripper, "EXPR_VALUE", INT2NUM(EXPR_VALUE));
21941 /* equals to <tt>(EXPR_BEG | EXPR_MID | EXPR_CLASS)</tt> */
21942 rb_define_const(Ripper, "EXPR_BEG_ANY", INT2NUM(EXPR_BEG_ANY));
21943 /* equals to <tt>(EXPR_ARG | EXPR_CMDARG)</tt> */
21944 rb_define_const(Ripper, "EXPR_ARG_ANY", INT2NUM(EXPR_ARG_ANY));
21945 /* equals to <tt>(EXPR_END | EXPR_ENDARG | EXPR_ENDFN)</tt> */
21946 rb_define_const(Ripper, "EXPR_END_ANY", INT2NUM(EXPR_END_ANY));
21947 /* equals to +0+ */
21948 rb_define_const(Ripper, "EXPR_NONE", INT2NUM(EXPR_NONE));
21949
21950 ripper_init_eventids1_table(Ripper);
21951 ripper_init_eventids2_table(Ripper);
21952
21953# if 0
21954 /* Hack to let RDoc document SCRIPT_LINES__ */
21955
21956 /*
21957 * When a Hash is assigned to +SCRIPT_LINES__+ the contents of files loaded
21958 * after the assignment will be added as an Array of lines with the file
21959 * name as the key.
21960 */
21961 rb_define_global_const("SCRIPT_LINES__", Qnil);
21962#endif
21963
21964}
21965#endif /* RIPPER */
21966
21967/*
21968 * Local variables:
21969 * mode: c
21970 * c-file-style: "ruby"
21971 * End:
21972 */
#define rb_define_method(klass, mid, func, arity)
Defines klass#mid.
#define rb_define_singleton_method(klass, mid, func, arity)
Defines klass.mid.
#define rb_define_private_method(klass, mid, func, arity)
Defines klass#mid and makes it private.
static bool rb_enc_isspace(OnigCodePoint c, rb_encoding *enc)
Identical to rb_isspace(), except it additionally takes an encoding.
Definition ctype.h:180
static bool rb_enc_isalnum(OnigCodePoint c, rb_encoding *enc)
Identical to rb_isalnum(), except it additionally takes an encoding.
Definition ctype.h:152
static bool RB_OBJ_FROZEN(VALUE obj)
Checks if an object is frozen.
Definition fl_type.h:927
VALUE rb_define_class(const char *name, VALUE super)
Defines a top-level class.
Definition class.c:837
int rb_scan_args(int argc, const VALUE *argv, const char *fmt,...)
Retrieves argument from argc and argv to given VALUE references according to the format string.
Definition class.c:2406
#define T_COMPLEX
Old name of RUBY_T_COMPLEX.
Definition value_type.h:59
#define TYPE(_)
Old name of rb_type.
Definition value_type.h:107
#define ENC_CODERANGE_7BIT
Old name of RUBY_ENC_CODERANGE_7BIT.
Definition coderange.h:180
#define T_FILE
Old name of RUBY_T_FILE.
Definition value_type.h:62
#define REALLOC_N
Old name of RB_REALLOC_N.
Definition memory.h:397
#define ISSPACE
Old name of rb_isspace.
Definition ctype.h:88
#define ALLOC
Old name of RB_ALLOC.
Definition memory.h:394
#define RFLOAT_VALUE
Old name of rb_float_value.
Definition double.h:28
#define T_STRING
Old name of RUBY_T_STRING.
Definition value_type.h:78
#define xfree
Old name of ruby_xfree.
Definition xmalloc.h:58
#define Qundef
Old name of RUBY_Qundef.
#define INT2FIX
Old name of RB_INT2FIX.
Definition long.h:48
#define T_FLOAT
Old name of RUBY_T_FLOAT.
Definition value_type.h:64
#define xrealloc
Old name of ruby_xrealloc.
Definition xmalloc.h:56
#define ID2SYM
Old name of RB_ID2SYM.
Definition symbol.h:44
#define T_BIGNUM
Old name of RUBY_T_BIGNUM.
Definition value_type.h:57
#define SPECIAL_CONST_P
Old name of RB_SPECIAL_CONST_P.
#define OBJ_FREEZE_RAW
Old name of RB_OBJ_FREEZE_RAW.
Definition fl_type.h:144
#define OBJ_FREEZE
Old name of RB_OBJ_FREEZE.
Definition fl_type.h:143
#define ULONG2NUM
Old name of RB_ULONG2NUM.
Definition long.h:60
#define UNREACHABLE_RETURN
Old name of RBIMPL_UNREACHABLE_RETURN.
Definition assume.h:31
#define SYM2ID
Old name of RB_SYM2ID.
Definition symbol.h:45
#define ZALLOC
Old name of RB_ZALLOC.
Definition memory.h:396
#define T_NODE
Old name of RUBY_T_NODE.
Definition value_type.h:73
#define ENC_CODERANGE_UNKNOWN
Old name of RUBY_ENC_CODERANGE_UNKNOWN.
Definition coderange.h:179
#define xmalloc
Old name of ruby_xmalloc.
Definition xmalloc.h:53
#define ENCODING_GET(obj)
Old name of RB_ENCODING_GET.
Definition encoding.h:108
#define LONG2FIX
Old name of RB_INT2FIX.
Definition long.h:49
#define NUM2UINT
Old name of RB_NUM2UINT.
Definition int.h:45
#define ISDIGIT
Old name of rb_isdigit.
Definition ctype.h:93
#define ASSUME
Old name of RBIMPL_ASSUME.
Definition assume.h:29
#define T_RATIONAL
Old name of RUBY_T_RATIONAL.
Definition value_type.h:76
#define T_HASH
Old name of RUBY_T_HASH.
Definition value_type.h:65
#define ALLOC_N
Old name of RB_ALLOC_N.
Definition memory.h:393
#define rb_ary_new3
Old name of rb_ary_new_from_args.
Definition array.h:652
#define LONG2NUM
Old name of RB_LONG2NUM.
Definition long.h:50
#define STRCASECMP
Old name of st_locale_insensitive_strcasecmp.
Definition ctype.h:102
#define rb_usascii_str_new2
Old name of rb_usascii_str_new_cstr.
Definition string.h:1744
#define ISALPHA
Old name of rb_isalpha.
Definition ctype.h:92
#define STRNCASECMP
Old name of st_locale_insensitive_strncasecmp.
Definition ctype.h:103
#define ISASCII
Old name of rb_isascii.
Definition ctype.h:85
#define FLONUM_P
Old name of RB_FLONUM_P.
#define Qtrue
Old name of RUBY_Qtrue.
#define NUM2INT
Old name of RB_NUM2INT.
Definition int.h:44
#define INT2NUM
Old name of RB_INT2NUM.
Definition int.h:43
#define Qnil
Old name of RUBY_Qnil.
#define Qfalse
Old name of RUBY_Qfalse.
#define FIX2LONG
Old name of RB_FIX2LONG.
Definition long.h:46
#define T_ARRAY
Old name of RUBY_T_ARRAY.
Definition value_type.h:56
#define scan_hex(s, l, e)
Old name of ruby_scan_hex.
Definition util.h:97
#define T_OBJECT
Old name of RUBY_T_OBJECT.
Definition value_type.h:75
#define NIL_P
Old name of RB_NIL_P.
#define MBCLEN_CHARFOUND_P(ret)
Old name of ONIGENC_MBCLEN_CHARFOUND_P.
Definition encoding.h:532
#define DBL2NUM
Old name of rb_float_new.
Definition double.h:29
#define BUILTIN_TYPE
Old name of RB_BUILTIN_TYPE.
Definition value_type.h:85
#define xcalloc
Old name of ruby_xcalloc.
Definition xmalloc.h:55
#define ENCODING_SET(obj, i)
Old name of RB_ENCODING_SET.
Definition encoding.h:106
#define ENCODING_IS_ASCII8BIT(obj)
Old name of RB_ENCODING_IS_ASCII8BIT.
Definition encoding.h:109
#define FIXNUM_P
Old name of RB_FIXNUM_P.
#define scan_oct(s, l, e)
Old name of ruby_scan_oct.
Definition util.h:74
#define CONST_ID
Old name of RUBY_CONST_ID.
Definition symbol.h:47
#define ISXDIGIT
Old name of rb_isxdigit.
Definition ctype.h:94
#define ISCNTRL
Old name of rb_iscntrl.
Definition ctype.h:96
#define ISALNUM
Old name of rb_isalnum.
Definition ctype.h:91
#define SYMBOL_P
Old name of RB_SYMBOL_P.
Definition value_type.h:88
#define T_REGEXP
Old name of RUBY_T_REGEXP.
Definition value_type.h:77
void rb_raise(VALUE exc, const char *fmt,...)
Exception entry point.
Definition error.c:3025
void rb_compile_warn(const char *file, int line, const char *fmt,...)
Identical to rb_compile_warning(), except it reports always regardless of runtime -W flag.
Definition error.c:360
void rb_exc_raise(VALUE mesg)
Raises an exception in the current thread.
Definition eval.c:675
void rb_set_errinfo(VALUE err)
Sets the current exception ($!) to the given value.
Definition eval.c:1764
#define ruby_verbose
This variable controls whether the interpreter is in debug mode.
Definition error.h:459
VALUE rb_eTypeError
TypeError exception.
Definition error.c:1099
void rb_fatal(const char *fmt,...)
Raises the unsung "fatal" exception.
Definition error.c:3076
VALUE rb_eRuntimeError
RuntimeError exception.
Definition error.c:1097
VALUE rb_eArgError
ArgumentError exception.
Definition error.c:1100
void rb_compile_warning(const char *file, int line, const char *fmt,...)
Issues a compile-time warning that happens at __file__:__line__.
Definition error.c:375
VALUE rb_errinfo(void)
This is the same as $! in Ruby.
Definition eval.c:1758
VALUE rb_eSyntaxError
SyntaxError exception.
Definition error.c:1116
@ RB_WARN_CATEGORY_EXPERIMENTAL
Warning is for experimental features.
Definition error.h:51
VALUE rb_class_new_instance(int argc, const VALUE *argv, VALUE klass)
Allocates, then initialises an instance of the given class.
Definition object.c:1950
VALUE rb_obj_hide(VALUE obj)
Make the object invisible from Ruby code.
Definition object.c:82
VALUE rb_obj_class(VALUE obj)
Queries the class of an object.
Definition object.c:188
VALUE rb_obj_freeze(VALUE obj)
Just calls rb_obj_freeze_inline() inside.
Definition object.c:1161
#define RB_OBJ_WRITTEN(old, oldv, young)
Identical to RB_OBJ_WRITE(), except it doesn't write any values, but only a WB declaration.
Definition rgengc.h:232
#define RB_OBJ_WRITE(old, slot, young)
Declaration of a "back" pointer.
Definition rgengc.h:220
Encoding relates APIs.
static const char * rb_enc_name(rb_encoding *enc)
Queries the (canonical) name of the passed encoding.
Definition encoding.h:433
static char * rb_enc_prev_char(const char *s, const char *p, const char *e, rb_encoding *enc)
Queries the previous (left) character.
Definition encoding.h:676
static bool rb_enc_asciicompat(rb_encoding *enc)
Queries if the passed encoding is in some sense compatible with ASCII.
Definition encoding.h:782
static int rb_enc_mbcput(unsigned int c, void *buf, rb_encoding *enc)
Identical to rb_enc_uint_chr(), except it writes back to the passed buffer instead of allocating one.
Definition encoding.h:657
int rb_char_to_option_kcode(int c, int *option, int *kcode)
Converts a character option to its encoding.
Definition re.c:329
int rb_enc_str_coderange(VALUE str)
Scans the passed string to collect its code range.
Definition string.c:776
VALUE rb_enc_str_buf_cat(VALUE str, const char *ptr, long len, rb_encoding *enc)
Identical to rb_str_cat(), except it additionally takes an encoding.
Definition string.c:3271
VALUE rb_enc_str_new(const char *ptr, long len, rb_encoding *enc)
Identical to rb_enc_str_new(), except it additionally takes an encoding.
Definition string.c:940
long rb_str_coderange_scan_restartable(const char *str, const char *end, rb_encoding *enc, int *cr)
Scans the passed string until it finds something odd.
Definition string.c:668
VALUE rb_funcall(VALUE recv, ID mid, int n,...)
Calls a method.
Definition vm_eval.c:1102
VALUE rb_funcallv_public(VALUE recv, ID mid, int argc, const VALUE *argv)
Identical to rb_funcallv(), except it only takes public methods into account.
Definition vm_eval.c:1153
VALUE rb_io_gets(VALUE io)
Reads a "line" from the given IO.
Definition io.c:3955
VALUE rb_io_puts(int argc, const VALUE *argv, VALUE io)
Iterates over the passed array to apply rb_io_write() individually.
Definition io.c:8208
VALUE rb_io_write(VALUE io, VALUE str)
Writes the given string to the given IO.
Definition io.c:2063
VALUE rb_io_flush(VALUE io)
Flushes any buffered data within the passed IO to the underlying operating system.
Definition io.c:2162
VALUE rb_default_rs
This is the default value of rb_rs, i.e.
Definition io.c:204
VALUE rb_int_positive_pow(long x, unsigned long y)
Raises the passed x to the power of y.
Definition numeric.c:4496
ID rb_id_attrset(ID id)
Calculates an ID of attribute writer.
Definition symbol.c:113
VALUE rb_rational_new(VALUE num, VALUE den)
Constructs a Rational, with reduction.
Definition rational.c:1963
#define rb_rational_raw1(x)
Shorthand of (x/1)r.
Definition rational.h:51
int rb_memcicmp(const void *s1, const void *s2, long n)
Identical to st_locale_insensitive_strcasecmp(), except it is timing safe and returns something diffe...
Definition re.c:88
VALUE rb_str_append(VALUE dst, VALUE src)
Identical to rb_str_buf_append(), except it converts the right hand side before concatenating.
Definition string.c:3317
VALUE rb_str_subseq(VALUE str, long beg, long len)
Identical to rb_str_substr(), except the numbers are interpreted as byte offsets instead of character...
Definition string.c:2821
#define rb_str_new(str, len)
Allocates an instance of rb_cString.
Definition string.h:1545
#define rb_str_buf_cat
Just another name of rb_str_cat.
Definition string.h:1745
#define rb_usascii_str_new(str, len)
Identical to rb_str_new, except it generates a string of "US ASCII" encoding.
Definition string.h:1579
VALUE rb_str_new_frozen(VALUE str)
Creates a frozen copy of the string, if necessary.
Definition string.c:1356
VALUE rb_str_dup(VALUE str)
Duplicates a string.
Definition string.c:1808
void rb_str_modify(VALUE str)
Declares that the string is about to be modified.
Definition string.c:2459
VALUE rb_str_cat(VALUE dst, const char *src, long srclen)
Destructively appends the passed contents to the string.
Definition string.c:3161
VALUE rb_filesystem_str_new_cstr(const char *ptr)
Identical to rb_filesystem_str_new(), except it assumes the passed pointer is a pointer to a C string...
Definition string.c:1269
VALUE rb_str_buf_append(VALUE dst, VALUE src)
Identical to rb_str_cat_cstr(), except it takes Ruby's string instead of C's.
Definition string.c:3302
void rb_str_set_len(VALUE str, long len)
Overwrites the length of the string.
Definition string.c:3039
#define rb_strlen_lit(str)
Length of a string literal.
Definition string.h:1756
#define rb_str_cat_cstr(buf, str)
Identical to rb_str_cat(), except it assumes the passed pointer is a pointer to a C string.
Definition string.h:1719
VALUE rb_str_resize(VALUE str, long len)
Overwrites the length of the string.
Definition string.c:3056
VALUE rb_str_buf_new(long capa)
Allocates a "string buffer".
Definition string.c:1506
#define rb_str_new_cstr(str)
Identical to rb_str_new, except it assumes the passed pointer is a pointer to a C string.
Definition string.h:1561
VALUE rb_str_intern(VALUE str)
Identical to rb_to_symbol(), except it assumes the receiver being an instance of RString.
Definition symbol.c:837
VALUE rb_obj_as_string(VALUE obj)
Try converting an object to its stringised representation using its to_s method, if any.
Definition string.c:1657
VALUE rb_thread_current(void)
Obtains the "current" thread.
Definition thread.c:2904
VALUE rb_attr_get(VALUE obj, ID name)
Identical to rb_ivar_get()
Definition variable.c:1293
VALUE rb_const_get_at(VALUE space, ID name)
Identical to rb_const_defined_at(), except it returns the actual defined value.
Definition variable.c:2739
int rb_const_defined_at(VALUE space, ID name)
Identical to rb_const_defined(), except it doesn't look for parent classes.
Definition variable.c:3043
int rb_respond_to(VALUE obj, ID mid)
Queries if the object responds to the method.
Definition vm_method.c:2765
void rb_define_alloc_func(VALUE klass, rb_alloc_func_t func)
Sets the allocator function of a class.
VALUE rb_make_backtrace(void)
Creates the good old fashioned array-of-strings style backtrace info.
ID rb_intern2(const char *name, long len)
Identical to rb_intern(), except it additionally takes the length of the string.
Definition symbol.c:775
static ID rb_intern_const(const char *str)
This is a "tiny optimisation" over rb_intern().
Definition symbol.h:276
ID rb_intern(const char *name)
Finds or creates a symbol of the given name.
Definition symbol.c:782
const char * rb_id2name(ID id)
Retrieves the name mapped to the given id.
Definition symbol.c:941
ID rb_intern_str(VALUE str)
Identical to rb_intern(), except it takes an instance of rb_cString.
Definition symbol.c:788
void rb_define_global_const(const char *name, VALUE val)
Identical to rb_define_const(), except it defines that of "global", i.e.
Definition variable.c:3265
void rb_define_const(VALUE klass, const char *name, VALUE val)
Defines a Ruby level constant under a namespace.
Definition variable.c:3253
#define strtod(s, e)
Just another name of ruby_strtod.
Definition util.h:212
unsigned long ruby_scan_oct(const char *str, size_t len, size_t *consumed)
Interprets the passed string as an octal unsigned integer.
Definition util.c:38
unsigned long ruby_scan_digits(const char *str, ssize_t len, int base, size_t *retlen, int *overflow)
Scans the passed string, assuming the string is a textual representation of an integer.
Definition util.c:98
VALUE rb_sprintf(const char *fmt,...)
Ruby's extended sprintf(3).
Definition sprintf.c:1201
VALUE rb_str_vcatf(VALUE dst, const char *fmt, va_list ap)
Identical to rb_str_catf(), except it takes a va_list.
Definition sprintf.c:1214
VALUE rb_vsprintf(const char *fmt, va_list ap)
Identical to rb_sprintf(), except it takes a va_list.
Definition sprintf.c:1195
VALUE rb_str_catf(VALUE dst, const char *fmt,...)
Identical to rb_sprintf(), except it renders the output to the specified object rather than creating ...
Definition sprintf.c:1241
#define rb_long2int
Just another name of rb_long2int_inline.
Definition long.h:62
#define MEMCPY(p1, p2, type, n)
Handy macro to call memcpy.
Definition memory.h:366
#define ALLOCA_N(type, n)
Definition memory.h:286
#define RB_GC_GUARD(v)
Prevents premature destruction of local objects.
Definition memory.h:161
#define MEMMOVE(p1, p2, type, n)
Handy macro to call memmove.
Definition memory.h:378
VALUE type(ANYARGS)
ANYARGS-ed function type.
VALUE rb_ensure(type *q, VALUE w, type *e, VALUE r)
An equivalent of ensure clause.
#define RBIMPL_ATTR_NONNULL(list)
Wraps (or simulates) __attribute__((nonnull))
Definition nonnull.h:30
VALUE rb_ractor_stderr(void)
Queries the standard error of the current Ractor that is calling this function.
Definition ractor.c:2146
VALUE rb_ractor_stdout(void)
Queries the standard output of the current Ractor that is calling this function.
Definition ractor.c:2134
VALUE rb_ractor_make_shareable(VALUE obj)
Destructively transforms the passed object so that multiple Ractors can share it.
Definition ractor.c:2497
#define RARRAY_LEN
Just another name of rb_array_len.
Definition rarray.h:68
#define RARRAY_AREF(a, i)
Definition rarray.h:588
static VALUE RBASIC_CLASS(VALUE obj)
Queries the class of an object.
Definition rbasic.h:152
#define RBASIC(obj)
Convenient casting macro.
Definition rbasic.h:40
#define RREGEXP_PTR(obj)
Convenient accessor macro.
Definition rregexp.h:45
#define StringValue(v)
Ensures that the parameter object is a String.
Definition rstring.h:72
static char * RSTRING_END(VALUE str)
Queries the end of the contents pointer of the string.
Definition rstring.h:527
#define RSTRING_GETMEM(str, ptrvar, lenvar)
Convenient macro to obtain the contents and length at once.
Definition rstring.h:573
static long RSTRING_LEN(VALUE str)
Queries the length of the string.
Definition rstring.h:483
static char * RSTRING_PTR(VALUE str)
Queries the contents pointer of the string.
Definition rstring.h:497
#define StringValueCStr(v)
Identical to StringValuePtr, except it additionally checks for the contents for viability as a C stri...
Definition rstring.h:95
#define TypedData_Get_Struct(obj, type, data_type, sval)
Obtains a C struct from inside of a wrapper Ruby object.
Definition rtypeddata.h:507
#define TypedData_Make_Struct(klass, type, data_type, sval)
Identical to TypedData_Wrap_Struct, except it allocates a new data region internally instead of takin...
Definition rtypeddata.h:489
const char * rb_obj_classname(VALUE obj)
Queries the name of the class of the passed object.
Definition variable.c:309
#define InitVM(ext)
This macro is for internal use.
Definition ruby.h:229
#define RTEST
This is an old name of RB_TEST.
Definition node.h:155
Definition lex.c:34
This is the struct that holds necessary info for a struct.
Definition rtypeddata.h:190
Definition st.h:79
uintptr_t ID
Type that represents a Ruby identifier such as a variable name.
Definition value.h:52
#define SIZEOF_VALUE
Identical to sizeof(VALUE), except it is a macro that can also be used inside of preprocessor directi...
Definition value.h:69
uintptr_t VALUE
Type that represents a Ruby object.
Definition value.h:40
static bool RB_TYPE_P(VALUE obj, enum ruby_value_type t)
Queries if the given object is of given type.
Definition value_type.h:375