Ruby 2.7.6p219 (2022-04-12 revision c9c2245c0a25176072e02db9254f0e0c84c805cd)
parse.c
Go to the documentation of this file.
1/* A Bison parser, made by GNU Bison 3.5.1. */
2
3/* Bison implementation for Yacc-like parsers in C
4
5 Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2020 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 <http://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/* All symbols defined below should begin with yy or YY, to avoid
38 infringing on user name space. This should be done even for local
39 variables, as they might otherwise be expanded by user macros.
40 There are some unavoidable exceptions within include files to
41 define necessary library symbols; they are noted "INFRINGES ON
42 USER NAME SPACE" below. */
43
44/* Undocumented macros, especially those whose name start with YY_,
45 are private implementation details. Do not rely on them. */
46
47/* Identify Bison output. */
48#define YYBISON 1
49
50/* Bison version. */
51#define YYBISON_VERSION "3.5.1"
52
53/* Skeleton name. */
54#define YYSKELETON_NAME "yacc.c"
55
56/* Pure parsers. */
57#define YYPURE 1
58
59/* Push parsers. */
60#define YYPUSH 0
61
62/* Pull parsers. */
63#define YYPULL 1
64
65
66
67
68/* First part of user prologue. */
69#line 12 "parse.y"
70
71
72#if !YYPURE
73# error needs pure parser
74#endif
75#define YYDEBUG 1
76#define YYERROR_VERBOSE 1
77#define YYSTACK_USE_ALLOCA 0
78#define YYLTYPE rb_code_location_t
79#define YYLTYPE_IS_DECLARED 1
80
81#include "ruby/ruby.h"
82#include "ruby/st.h"
83#include "ruby/encoding.h"
84#include "internal.h"
85#include "node.h"
86#include "parse.h"
87#include "symbol.h"
88#include "regenc.h"
89#include <stdio.h>
90#include <errno.h>
91#include <ctype.h>
92#include "probes.h"
93
94#ifndef WARN_PAST_SCOPE
95# define WARN_PAST_SCOPE 0
96#endif
97
98#define TAB_WIDTH 8
99
100#define yydebug (p->debug) /* disable the global variable definition */
101
102#define YYMALLOC(size) rb_parser_malloc(p, (size))
103#define YYREALLOC(ptr, size) rb_parser_realloc(p, (ptr), (size))
104#define YYCALLOC(nelem, size) rb_parser_calloc(p, (nelem), (size))
105#define YYFREE(ptr) rb_parser_free(p, (ptr))
106#define YYFPRINTF rb_parser_printf
107#define YYPRINT(out, tok, val) parser_token_value_print(p, (tok), &(val))
108#define YY_LOCATION_PRINT(File, loc) \
109 rb_parser_printf(p, "%d.%d-%d.%d", \
110 (loc).beg_pos.lineno, (loc).beg_pos.column,\
111 (loc).end_pos.lineno, (loc).end_pos.column)
112#define YYLLOC_DEFAULT(Current, Rhs, N) \
113 do \
114 if (N) \
115 { \
116 (Current).beg_pos = YYRHSLOC(Rhs, 1).beg_pos; \
117 (Current).end_pos = YYRHSLOC(Rhs, N).end_pos; \
118 } \
119 else \
120 { \
121 (Current).beg_pos = YYRHSLOC(Rhs, 0).end_pos; \
122 (Current).end_pos = YYRHSLOC(Rhs, 0).end_pos; \
123 } \
124 while (0)
125
126#define RUBY_SET_YYLLOC_FROM_STRTERM_HEREDOC(Current) \
127 rb_parser_set_location_from_strterm_heredoc(p, &p->lex.strterm->u.heredoc, &(Current))
128#define RUBY_SET_YYLLOC_OF_NONE(Current) \
129 rb_parser_set_location_of_none(p, &(Current))
130#define RUBY_SET_YYLLOC(Current) \
131 rb_parser_set_location(p, &(Current))
132#define RUBY_INIT_YYLLOC() \
133 { \
134 {p->ruby_sourceline, (int)(p->lex.ptok - p->lex.pbeg)}, \
135 {p->ruby_sourceline, (int)(p->lex.pcur - p->lex.pbeg)}, \
136 }
137
139 EXPR_BEG_bit, /* ignore newline, +/- is a sign. */
140 EXPR_END_bit, /* newline significant, +/- is an operator. */
141 EXPR_ENDARG_bit, /* ditto, and unbound braces. */
142 EXPR_ENDFN_bit, /* ditto, and unbound braces. */
143 EXPR_ARG_bit, /* newline significant, +/- is an operator. */
144 EXPR_CMDARG_bit, /* newline significant, +/- is an operator. */
145 EXPR_MID_bit, /* newline significant, +/- is an operator. */
146 EXPR_FNAME_bit, /* ignore newline, no reserved words. */
147 EXPR_DOT_bit, /* right after `.' or `::', no reserved words. */
148 EXPR_CLASS_bit, /* immediate after `class', no here document. */
149 EXPR_LABEL_bit, /* flag bit, label is allowed. */
150 EXPR_LABELED_bit, /* flag bit, just after a label. */
151 EXPR_FITEM_bit, /* symbol literal as FNAME. */
154/* examine combinations */
156#define DEF_EXPR(n) EXPR_##n = (1 << EXPR_##n##_bit)
158 DEF_EXPR(END),
159 DEF_EXPR(ENDARG),
160 DEF_EXPR(ENDFN),
161 DEF_EXPR(ARG),
162 DEF_EXPR(CMDARG),
163 DEF_EXPR(MID),
164 DEF_EXPR(FNAME),
165 DEF_EXPR(DOT),
166 DEF_EXPR(CLASS),
168 DEF_EXPR(LABELED),
169 DEF_EXPR(FITEM),
170 EXPR_VALUE = EXPR_BEG,
171 EXPR_BEG_ANY = (EXPR_BEG | EXPR_MID | EXPR_CLASS),
172 EXPR_ARG_ANY = (EXPR_ARG | EXPR_CMDARG),
173 EXPR_END_ANY = (EXPR_END | EXPR_ENDARG | EXPR_ENDFN),
174 EXPR_NONE = 0
176#define IS_lex_state_for(x, ls) ((x) & (ls))
177#define IS_lex_state_all_for(x, ls) (((x) & (ls)) == (ls))
178#define IS_lex_state(ls) IS_lex_state_for(p->lex.state, (ls))
179#define IS_lex_state_all(ls) IS_lex_state_all_for(p->lex.state, (ls))
180
181# define SET_LEX_STATE(ls) \
182 (p->lex.state = \
183 (p->debug ? \
184 rb_parser_trace_lex_state(p, p->lex.state, (ls), __LINE__) : \
185 (enum lex_state_e)(ls)))
186
188
189static const rb_code_location_t NULL_LOC = { {0, -1}, {0, -1} };
190
191# define SHOW_BITSTACK(stack, name) (p->debug ? rb_parser_show_bitstack(p, stack, name, __LINE__) : (void)0)
192# define BITSTACK_PUSH(stack, n) (((p->stack) = ((p->stack)<<1)|((n)&1)), SHOW_BITSTACK(p->stack, #stack"(push)"))
193# define BITSTACK_POP(stack) (((p->stack) = (p->stack) >> 1), SHOW_BITSTACK(p->stack, #stack"(pop)"))
194# define BITSTACK_SET_P(stack) (SHOW_BITSTACK(p->stack, #stack), (p->stack)&1)
195# define BITSTACK_SET(stack, n) ((p->stack)=(n), SHOW_BITSTACK(p->stack, #stack"(set)"))
196
197/* A flag to identify keyword_do_cond, "do" keyword after condition expression.
198 Examples: `while ... do`, `until ... do`, and `for ... in ... do` */
199#define COND_PUSH(n) BITSTACK_PUSH(cond_stack, (n))
200#define COND_POP() BITSTACK_POP(cond_stack)
201#define COND_P() BITSTACK_SET_P(cond_stack)
202#define COND_SET(n) BITSTACK_SET(cond_stack, (n))
203
204/* A flag to identify keyword_do_block; "do" keyword after command_call.
205 Example: `foo 1, 2 do`. */
206#define CMDARG_PUSH(n) BITSTACK_PUSH(cmdarg_stack, (n))
207#define CMDARG_POP() BITSTACK_POP(cmdarg_stack)
208#define CMDARG_P() BITSTACK_SET_P(cmdarg_stack)
209#define CMDARG_SET(n) BITSTACK_SET(cmdarg_stack, (n))
210
211struct vtable {
212 ID *tbl;
213 int pos;
214 int capa;
215 struct vtable *prev;
216};
217
218struct local_vars {
219 struct vtable *args;
220 struct vtable *vars;
221 struct vtable *used;
222# if WARN_PAST_SCOPE
223 struct vtable *past;
224# endif
225 struct local_vars *prev;
226# ifndef RIPPER
227 struct {
228 NODE *outer, *inner, *current;
230# endif
231};
232
233enum {
237};
238
239#define NUMPARAM_ID_P(id) numparam_id_p(id)
240#define NUMPARAM_ID_TO_IDX(id) (unsigned int)(((id) >> ID_SCOPE_SHIFT) - tNUMPARAM_1 + 1)
241#define NUMPARAM_IDX_TO_ID(idx) TOKEN2LOCALID((tNUMPARAM_1 + (idx) - 1))
242static int
243numparam_id_p(ID id)
244{
245 if (!is_local_id(id)) return 0;
246 unsigned int idx = NUMPARAM_ID_TO_IDX(id);
247 return idx > 0 && idx <= NUMPARAM_MAX;
248}
249static void numparam_name(struct parser_params *p, ID id);
250
251#define DVARS_INHERIT ((void*)1)
252#define DVARS_TOPSCOPE NULL
253#define DVARS_TERMINAL_P(tbl) ((tbl) == DVARS_INHERIT || (tbl) == DVARS_TOPSCOPE)
254
255typedef struct token_info {
256 const char *token;
258 int indent;
259 int nonspc;
260 struct token_info *next;
262
264
265/*
266 Structure of Lexer Buffer:
267
268 lex.pbeg lex.ptok lex.pcur lex.pend
269 | | | |
270 |------------+------------+------------|
271 |<---------->|
272 token
273*/
274struct parser_params {
276
277 YYSTYPE *lval;
278
279 struct {
281 VALUE (*gets)(struct parser_params*,VALUE);
282 VALUE input;
286 const char *pbeg;
287 const char *pcur;
288 const char *pend;
289 const char *ptok;
290 union {
291 long ptr;
292 VALUE (*call)(VALUE, int);
294 enum lex_state_e state;
295 /* track the nest level of any parens "()[]{}" */
296 int paren_nest;
297 /* keep p->lex.paren_nest at the beginning of lambda "->" to detect tLAMBEG and keyword_do_LAMBDA */
298 int lpar_beg;
299 /* track the nest level of only braces "{}" */
300 int brace_nest;
304 int tokidx;
305 int toksiz;
306 int tokline;
307 int heredoc_end;
308 int heredoc_indent;
310 char *tokenbuf;
311 struct local_vars *lvtbl;
314 int line_count;
315 int ruby_sourceline; /* current line no. */
316 const char *ruby_sourcefile; /* current source file */
322
325
326 ID cur_arg;
327
328 rb_ast_t *ast;
329 int node_id;
330
331 int max_numparam;
332
333 unsigned int command_start:1;
334 unsigned int eofp: 1;
335 unsigned int ruby__end__seen: 1;
336 unsigned int debug: 1;
337 unsigned int has_shebang: 1;
338 unsigned int in_defined: 1;
339 unsigned int in_kwarg: 1;
340 unsigned int in_def: 1;
341 unsigned int in_class: 1;
342 unsigned int token_seen: 1;
343 unsigned int token_info_enabled: 1;
344# if WARN_PAST_SCOPE
345 unsigned int past_scope_enabled: 1;
346# endif
347 unsigned int error_p: 1;
348 unsigned int cr_seen: 1;
349
350#ifndef RIPPER
351 /* Ruby core only */
352
353 unsigned int do_print: 1;
354 unsigned int do_loop: 1;
355 unsigned int do_chomp: 1;
356 unsigned int do_split: 1;
357 unsigned int warn_location: 1;
358
363 const struct rb_iseq_struct *parent_iseq;
364#else
365 /* Ripper only */
366
367 struct {
368 VALUE token;
369 int line;
370 int col;
371 } delayed;
372
373 VALUE value;
374 VALUE result;
375 VALUE parsing_thread;
376#endif
377};
378
379#define intern_cstr(n,l,en) rb_intern3(n,l,en)
380
381#define STR_NEW(ptr,len) rb_enc_str_new((ptr),(len),p->enc)
382#define STR_NEW0() rb_enc_str_new(0,0,p->enc)
383#define STR_NEW2(ptr) rb_enc_str_new((ptr),strlen(ptr),p->enc)
384#define STR_NEW3(ptr,len,e,func) parser_str_new((ptr),(len),(e),(func),p->enc)
385#define TOK_INTERN() intern_cstr(tok(p), toklen(p), p->enc)
386
387static st_table *
388push_pvtbl(struct parser_params *p)
389{
390 st_table *tbl = p->pvtbl;
391 p->pvtbl = st_init_numtable();
392 return tbl;
393}
394
395static void
396pop_pvtbl(struct parser_params *p, st_table *tbl)
397{
399 p->pvtbl = tbl;
400}
401
402static st_table *
403push_pktbl(struct parser_params *p)
404{
405 st_table *tbl = p->pktbl;
406 p->pktbl = 0;
407 return tbl;
408}
409
410static void
411pop_pktbl(struct parser_params *p, st_table *tbl)
412{
413 if (p->pktbl) st_free_table(p->pktbl);
414 p->pktbl = tbl;
415}
416
417static int parser_yyerror(struct parser_params*, const YYLTYPE *yylloc, const char*);
418#define yyerror0(msg) parser_yyerror(p, NULL, (msg))
419#define yyerror1(loc, msg) parser_yyerror(p, (loc), (msg))
420#define yyerror(yylloc, p, msg) parser_yyerror(p, yylloc, msg)
421#define token_flush(ptr) ((ptr)->lex.ptok = (ptr)->lex.pcur)
422
423#ifdef RIPPER
424#define compile_for_eval (0)
425#else
426#define compile_for_eval (p->parent_iseq != 0)
427#endif
428
429#define token_column ((int)(p->lex.ptok - p->lex.pbeg))
430
431#define CALL_Q_P(q) ((q) == TOKEN2VAL(tANDDOT))
432#define NODE_CALL_Q(q) (CALL_Q_P(q) ? NODE_QCALL : NODE_CALL)
433#define NEW_QCALL(q,r,m,a,loc) NEW_NODE(NODE_CALL_Q(q),r,m,a,loc)
434
435#define lambda_beginning_p() (p->lex.lpar_beg == p->lex.paren_nest)
436
437static enum yytokentype yylex(YYSTYPE*, YYLTYPE*, struct parser_params*);
438
439#ifndef RIPPER
440static inline void
441rb_discard_node(struct parser_params *p, NODE *n)
442{
444}
445#endif
446
447#ifdef RIPPER
448static inline VALUE
449add_mark_object(struct parser_params *p, VALUE obj)
450{
451 if (!SPECIAL_CONST_P(obj)
452 && !RB_TYPE_P(obj, T_NODE) /* Ripper jumbles NODE objects and other objects... */
453 ) {
455 }
456 return obj;
457}
458#else
459static NODE* node_newnode_with_locals(struct parser_params *, enum node_type, VALUE, VALUE, const rb_code_location_t*);
460#endif
461
462static NODE* node_newnode(struct parser_params *, enum node_type, VALUE, VALUE, VALUE, const rb_code_location_t*);
463#define rb_node_newnode(type, a1, a2, a3, loc) node_newnode(p, (type), (a1), (a2), (a3), (loc))
464
465static NODE *nd_set_loc(NODE *nd, const YYLTYPE *loc);
466
467static int
468parser_get_node_id(struct parser_params *p)
469{
470 int node_id = p->node_id;
471 p->node_id++;
472 return node_id;
473}
474
475#ifndef RIPPER
476static inline void
477set_line_body(NODE *body, int line)
478{
479 if (!body) return;
480 switch (nd_type(body)) {
481 case NODE_RESCUE:
482 case NODE_ENSURE:
483 nd_set_line(body, line);
484 }
485}
486
487#define yyparse ruby_yyparse
488
489static NODE* cond(struct parser_params *p, NODE *node, const YYLTYPE *loc);
490static NODE* method_cond(struct parser_params *p, NODE *node, const YYLTYPE *loc);
491#define new_nil(loc) NEW_NIL(loc)
492static NODE *new_if(struct parser_params*,NODE*,NODE*,NODE*,const YYLTYPE*);
493static NODE *new_unless(struct parser_params*,NODE*,NODE*,NODE*,const YYLTYPE*);
494static NODE *logop(struct parser_params*,ID,NODE*,NODE*,const YYLTYPE*,const YYLTYPE*);
495
496static NODE *newline_node(NODE*);
497static void fixpos(NODE*,NODE*);
498
499static int value_expr_gen(struct parser_params*,NODE*);
500static void void_expr(struct parser_params*,NODE*);
501static NODE *remove_begin(NODE*);
502static NODE *remove_begin_all(NODE*);
503#define value_expr(node) value_expr_gen(p, (node) = remove_begin(node))
504static NODE *void_stmts(struct parser_params*,NODE*);
505static void reduce_nodes(struct parser_params*,NODE**);
506static void block_dup_check(struct parser_params*,NODE*,NODE*);
507
508static NODE *block_append(struct parser_params*,NODE*,NODE*);
509static NODE *list_append(struct parser_params*,NODE*,NODE*);
510static NODE *list_concat(NODE*,NODE*);
511static NODE *arg_append(struct parser_params*,NODE*,NODE*,const YYLTYPE*);
512static NODE *last_arg_append(struct parser_params *p, NODE *args, NODE *last_arg, const YYLTYPE *loc);
513static NODE *rest_arg_append(struct parser_params *p, NODE *args, NODE *rest_arg, const YYLTYPE *loc);
514static NODE *literal_concat(struct parser_params*,NODE*,NODE*,const YYLTYPE*);
515static NODE *new_evstr(struct parser_params*,NODE*,const YYLTYPE*);
516static NODE *evstr2dstr(struct parser_params*,NODE*);
517static NODE *splat_array(NODE*);
518static void mark_lvar_used(struct parser_params *p, NODE *rhs);
519
520static NODE *call_bin_op(struct parser_params*,NODE*,ID,NODE*,const YYLTYPE*,const YYLTYPE*);
521static NODE *call_uni_op(struct parser_params*,NODE*,ID,const YYLTYPE*,const YYLTYPE*);
522static NODE *new_qcall(struct parser_params* p, ID atype, NODE *recv, ID mid, NODE *args, const YYLTYPE *op_loc, const YYLTYPE *loc);
523static 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);
524static 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;}
525
526static bool args_info_empty_p(struct rb_args_info *args);
527static NODE *new_args(struct parser_params*,NODE*,NODE*,ID,NODE*,NODE*,const YYLTYPE*);
528static NODE *new_args_tail(struct parser_params*,NODE*,ID,ID,const YYLTYPE*);
529static NODE *new_array_pattern(struct parser_params *p, NODE *constant, NODE *pre_arg, NODE *aryptn, const YYLTYPE *loc);
530static NODE *new_array_pattern_tail(struct parser_params *p, NODE *pre_args, int has_rest, ID rest_arg, NODE *post_args, const YYLTYPE *loc);
531static NODE *new_hash_pattern(struct parser_params *p, NODE *constant, NODE *hshptn, const YYLTYPE *loc);
532static NODE *new_hash_pattern_tail(struct parser_params *p, NODE *kw_args, ID kw_rest_arg, const YYLTYPE *loc);
533static NODE *new_case3(struct parser_params *p, NODE *val, NODE *pat, const YYLTYPE *loc);
534
535static NODE *new_kw_arg(struct parser_params *p, NODE *k, const YYLTYPE *loc);
536static NODE *args_with_numbered(struct parser_params*,NODE*,int);
537
538static VALUE negate_lit(struct parser_params*, VALUE);
539static NODE *ret_args(struct parser_params*,NODE*);
540static NODE *arg_blk_pass(NODE*,NODE*);
541static NODE *new_yield(struct parser_params*,NODE*,const YYLTYPE*);
542static NODE *dsym_node(struct parser_params*,NODE*,const YYLTYPE*);
543
544static NODE *gettable(struct parser_params*,ID,const YYLTYPE*);
545static NODE *assignable(struct parser_params*,ID,NODE*,const YYLTYPE*);
546
547static NODE *aryset(struct parser_params*,NODE*,NODE*,const YYLTYPE*);
548static NODE *attrset(struct parser_params*,NODE*,ID,ID,const YYLTYPE*);
549
550static void rb_backref_error(struct parser_params*,NODE*);
551static NODE *node_assign(struct parser_params*,NODE*,NODE*,const YYLTYPE*);
552
553static NODE *new_op_assign(struct parser_params *p, NODE *lhs, ID op, NODE *rhs, const YYLTYPE *loc);
554static NODE *new_ary_op_assign(struct parser_params *p, NODE *ary, NODE *args, ID op, NODE *rhs, const YYLTYPE *args_loc, const YYLTYPE *loc);
555static NODE *new_attr_op_assign(struct parser_params *p, NODE *lhs, ID atype, ID attr, ID op, NODE *rhs, const YYLTYPE *loc);
556static NODE *new_const_op_assign(struct parser_params *p, NODE *lhs, ID op, NODE *rhs, const YYLTYPE *loc);
557static NODE *new_bodystmt(struct parser_params *p, NODE *head, NODE *rescue, NODE *rescue_else, NODE *ensure, const YYLTYPE *loc);
558
559static NODE *const_decl(struct parser_params *p, NODE* path, const YYLTYPE *loc);
560
561static NODE *opt_arg_append(NODE*, NODE*);
562static NODE *kwd_append(NODE*, NODE*);
563
564static NODE *new_hash(struct parser_params *p, NODE *hash, const YYLTYPE *loc);
565static NODE *new_unique_key_hash(struct parser_params *p, NODE *hash, const YYLTYPE *loc);
566
567static NODE *new_defined(struct parser_params *p, NODE *expr, const YYLTYPE *loc);
568
569static NODE *new_regexp(struct parser_params *, NODE *, int, const YYLTYPE *);
570
571#define make_list(list, loc) ((list) ? (nd_set_loc(list, loc), list) : NEW_ZLIST(loc))
572
573static NODE *new_xstring(struct parser_params *, NODE *, const YYLTYPE *loc);
574
575static NODE *symbol_append(struct parser_params *p, NODE *symbols, NODE *symbol);
576
577static NODE *match_op(struct parser_params*,NODE*,NODE*,const YYLTYPE*,const YYLTYPE*);
578
579static ID *local_tbl(struct parser_params*);
580
581static VALUE reg_compile(struct parser_params*, VALUE, int);
582static void reg_fragment_setenc(struct parser_params*, VALUE, int);
583static int reg_fragment_check(struct parser_params*, VALUE, int);
584static NODE *reg_named_capture_assign(struct parser_params* p, VALUE regexp, const YYLTYPE *loc);
585
586static int literal_concat0(struct parser_params *p, VALUE head, VALUE tail);
587static NODE *heredoc_dedent(struct parser_params*,NODE*);
588
589static void check_literal_when(struct parser_params *p, NODE *args, const YYLTYPE *loc);
590
591#define get_id(id) (id)
592#define get_value(val) (val)
593#define get_num(num) (num)
594#else /* RIPPER */
595#define NODE_RIPPER NODE_CDECL
596
597static inline int ripper_is_node_yylval(VALUE n);
598
599static inline VALUE
600ripper_new_yylval(struct parser_params *p, ID a, VALUE b, VALUE c)
601{
602 if (ripper_is_node_yylval(c)) c = RNODE(c)->nd_cval;
603 add_mark_object(p, b);
604 add_mark_object(p, c);
605 return (VALUE)NEW_CDECL(a, b, c, &NULL_LOC);
606}
607
608static inline int
609ripper_is_node_yylval(VALUE n)
610{
611 return RB_TYPE_P(n, T_NODE) && nd_type(RNODE(n)) == NODE_RIPPER;
612}
613
614#define value_expr(node) ((void)(node))
615#define remove_begin(node) (node)
616#define void_stmts(p,x) (x)
617#define rb_dvar_defined(id, base) 0
618#define rb_local_defined(id, base) 0
619static ID ripper_get_id(VALUE);
620#define get_id(id) ripper_get_id(id)
621static VALUE ripper_get_value(VALUE);
622#define get_value(val) ripper_get_value(val)
623#define get_num(num) (int)get_id(num)
624static VALUE assignable(struct parser_params*,VALUE);
625static int id_is_var(struct parser_params *p, ID id);
626
627#define method_cond(p,node,loc) (node)
628#define call_bin_op(p, recv,id,arg1,op_loc,loc) dispatch3(binary, (recv), STATIC_ID2SYM(id), (arg1))
629#define match_op(p,node1,node2,op_loc,loc) call_bin_op(0, (node1), idEqTilde, (node2), op_loc, loc)
630#define call_uni_op(p, recv,id,op_loc,loc) dispatch2(unary, STATIC_ID2SYM(id), (recv))
631#define logop(p,id,node1,node2,op_loc,loc) call_bin_op(0, (node1), (id), (node2), op_loc, loc)
632
633#define new_nil(loc) Qnil
634
635static VALUE new_regexp(struct parser_params *, VALUE, VALUE, const YYLTYPE *);
636
637static VALUE const_decl(struct parser_params *p, VALUE path);
638
639static VALUE var_field(struct parser_params *p, VALUE a);
640static VALUE assign_error(struct parser_params *p, VALUE a);
641
642static VALUE parser_reg_compile(struct parser_params*, VALUE, int, VALUE *);
643
644#endif /* !RIPPER */
645
646/* forward declaration */
648
650VALUE rb_parser_reg_compile(struct parser_params* p, VALUE str, int options);
654void rb_parser_show_bitstack(struct parser_params *, stack_type, const char *, int);
655PRINTF_ARGS(void rb_parser_fatal(struct parser_params *p, const char *fmt, ...), 2, 3);
660
661static void error_duplicate_pattern_variable(struct parser_params *p, ID id, const YYLTYPE *loc);
662static void error_duplicate_pattern_key(struct parser_params *p, ID id, const YYLTYPE *loc);
663static void parser_token_value_print(struct parser_params *p, enum yytokentype type, const YYSTYPE *valp);
664static ID formal_argument(struct parser_params*, ID);
665static ID shadowing_lvar(struct parser_params*,ID);
666static void new_bv(struct parser_params*,ID);
667
668static void local_push(struct parser_params*,int);
669static void local_pop(struct parser_params*);
670static void local_var(struct parser_params*, ID);
671static void arg_var(struct parser_params*, ID);
672static int local_id(struct parser_params *p, ID id);
673static int local_id_ref(struct parser_params*, ID, ID **);
674#ifndef RIPPER
675static ID internal_id(struct parser_params*);
676#endif
677
678static const struct vtable *dyna_push(struct parser_params *);
679static void dyna_pop(struct parser_params*, const struct vtable *);
680static int dyna_in_block(struct parser_params*);
681#define dyna_var(p, id) local_var(p, id)
682static int dvar_defined(struct parser_params*, ID);
683static int dvar_defined_ref(struct parser_params*, ID, ID**);
684static int dvar_curr(struct parser_params*,ID);
685
686static int lvar_defined(struct parser_params*, ID);
687
688static NODE *numparam_push(struct parser_params *p);
689static void numparam_pop(struct parser_params *p, NODE *prev_inner);
690
691#ifdef RIPPER
692# define METHOD_NOT idNOT
693#else
694# define METHOD_NOT '!'
695#endif
696
697#define idFWD_REST '*'
698#ifdef RUBY3_KEYWORDS
699#define idFWD_KWREST idPow /* Use simple "**", as tDSTAR is "**arg" */
700#else
701#define idFWD_KWREST 0
702#endif
703#define idFWD_BLOCK '&'
704
705#define RE_OPTION_ONCE (1<<16)
706#define RE_OPTION_ENCODING_SHIFT 8
707#define RE_OPTION_ENCODING(e) (((e)&0xff)<<RE_OPTION_ENCODING_SHIFT)
708#define RE_OPTION_ENCODING_IDX(o) (((o)>>RE_OPTION_ENCODING_SHIFT)&0xff)
709#define RE_OPTION_ENCODING_NONE(o) ((o)&RE_OPTION_ARG_ENCODING_NONE)
710#define RE_OPTION_MASK 0xff
711#define RE_OPTION_ARG_ENCODING_NONE 32
712
713/* structs for managing terminator of string literal and heredocment */
714typedef struct rb_strterm_literal_struct {
715 union {
716 VALUE dummy;
717 long nest;
718 } u0;
719 union {
720 VALUE dummy;
721 long func; /* STR_FUNC_* (e.g., STR_FUNC_ESCAPE and STR_FUNC_EXPAND) */
722 } u1;
723 union {
724 VALUE dummy;
725 long paren; /* '(' of `%q(...)` */
726 } u2;
727 union {
728 VALUE dummy;
729 long term; /* ')' of `%q(...)` */
730 } u3;
732
733#define HERETERM_LENGTH_BITS ((SIZEOF_VALUE - 1) * CHAR_BIT - 1)
734
736 VALUE lastline; /* the string of line that contains `<<"END"` */
737 long offset; /* the column of END in `<<"END"` */
738 int sourceline; /* lineno of the line that contains `<<"END"` */
739 unsigned length /* the length of END in `<<"END"` */
740#if HERETERM_LENGTH_BITS < SIZEOF_INT * CHAR_BIT
742# define HERETERM_LENGTH_MAX ((1U << HERETERM_LENGTH_BITS) - 1)
743#else
744# define HERETERM_LENGTH_MAX UINT_MAX
745#endif
746 ;
747#if HERETERM_LENGTH_BITS < SIZEOF_INT * CHAR_BIT
748 unsigned quote: 1;
749 unsigned func: 8;
750#else
753#endif
754};
756
757#define STRTERM_HEREDOC IMEMO_FL_USER0
758
759struct rb_strterm_struct {
760 VALUE flags;
761 union {
764 } u;
765};
766
767#ifndef RIPPER
768void
770{
771 rb_strterm_t *strterm = (rb_strterm_t*)obj;
772 if (RBASIC(obj)->flags & STRTERM_HEREDOC) {
773 rb_strterm_heredoc_t *heredoc = &strterm->u.heredoc;
774 rb_gc_mark(heredoc->lastline);
775 }
776}
777#endif
778
779#define yytnamerr(yyres, yystr) (YYSIZE_T)rb_yytnamerr(p, yyres, yystr)
780size_t rb_yytnamerr(struct parser_params *p, char *yyres, const char *yystr);
781
782#define TOKEN2ID(tok) ( \
783 tTOKEN_LOCAL_BEGIN<(tok)&&(tok)<tTOKEN_LOCAL_END ? TOKEN2LOCALID(tok) : \
784 tTOKEN_INSTANCE_BEGIN<(tok)&&(tok)<tTOKEN_INSTANCE_END ? TOKEN2INSTANCEID(tok) : \
785 tTOKEN_GLOBAL_BEGIN<(tok)&&(tok)<tTOKEN_GLOBAL_END ? TOKEN2GLOBALID(tok) : \
786 tTOKEN_CONST_BEGIN<(tok)&&(tok)<tTOKEN_CONST_END ? TOKEN2CONSTID(tok) : \
787 tTOKEN_CLASS_BEGIN<(tok)&&(tok)<tTOKEN_CLASS_END ? TOKEN2CLASSID(tok) : \
788 tTOKEN_ATTRSET_BEGIN<(tok)&&(tok)<tTOKEN_ATTRSET_END ? TOKEN2ATTRSETID(tok) : \
789 ((tok) / ((tok)<tPRESERVED_ID_END && ((tok)>=128 || rb_ispunct(tok)))))
790
791/****** Ripper *******/
792
793#ifdef RIPPER
794#define RIPPER_VERSION "0.1.0"
795
796static inline VALUE intern_sym(const char *name);
797
798#include "eventids1.c"
799#include "eventids2.c"
800
801static VALUE ripper_dispatch0(struct parser_params*,ID);
802static VALUE ripper_dispatch1(struct parser_params*,ID,VALUE);
803static VALUE ripper_dispatch2(struct parser_params*,ID,VALUE,VALUE);
804static VALUE ripper_dispatch3(struct parser_params*,ID,VALUE,VALUE,VALUE);
805static VALUE ripper_dispatch4(struct parser_params*,ID,VALUE,VALUE,VALUE,VALUE);
806static VALUE ripper_dispatch5(struct parser_params*,ID,VALUE,VALUE,VALUE,VALUE,VALUE);
807static VALUE ripper_dispatch7(struct parser_params*,ID,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE);
808static void ripper_error(struct parser_params *p);
809
810#define dispatch0(n) ripper_dispatch0(p, TOKEN_PASTE(ripper_id_, n))
811#define dispatch1(n,a) ripper_dispatch1(p, TOKEN_PASTE(ripper_id_, n), (a))
812#define dispatch2(n,a,b) ripper_dispatch2(p, TOKEN_PASTE(ripper_id_, n), (a), (b))
813#define dispatch3(n,a,b,c) ripper_dispatch3(p, TOKEN_PASTE(ripper_id_, n), (a), (b), (c))
814#define dispatch4(n,a,b,c,d) ripper_dispatch4(p, TOKEN_PASTE(ripper_id_, n), (a), (b), (c), (d))
815#define dispatch5(n,a,b,c,d,e) ripper_dispatch5(p, TOKEN_PASTE(ripper_id_, n), (a), (b), (c), (d), (e))
816#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))
817
818#define yyparse ripper_yyparse
819
820#define ID2VAL(id) STATIC_ID2SYM(id)
821#define TOKEN2VAL(t) ID2VAL(TOKEN2ID(t))
822#define KWD2EID(t, v) ripper_new_yylval(p, keyword_##t, get_value(v), 0)
823
824#define params_new(pars, opts, rest, pars2, kws, kwrest, blk) \
825 dispatch7(params, (pars), (opts), (rest), (pars2), (kws), (kwrest), (blk))
826
827#define escape_Qundef(x) ((x)==Qundef ? Qnil : (x))
828
829static inline VALUE
830new_args(struct parser_params *p, VALUE pre_args, VALUE opt_args, VALUE rest_arg, VALUE post_args, VALUE tail, YYLTYPE *loc)
831{
832 NODE *t = (NODE *)tail;
833 VALUE kw_args = t->u1.value, kw_rest_arg = t->u2.value, block = t->u3.value;
834 return params_new(pre_args, opt_args, rest_arg, post_args, kw_args, kw_rest_arg, escape_Qundef(block));
835}
836
837static inline VALUE
838new_args_tail(struct parser_params *p, VALUE kw_args, VALUE kw_rest_arg, VALUE block, YYLTYPE *loc)
839{
840 NODE *t = rb_node_newnode(NODE_ARGS_AUX, kw_args, kw_rest_arg, block, &NULL_LOC);
841 add_mark_object(p, kw_args);
842 add_mark_object(p, kw_rest_arg);
843 add_mark_object(p, block);
844 return (VALUE)t;
845}
846
847static inline VALUE
848args_with_numbered(struct parser_params *p, VALUE args, int max_numparam)
849{
850 return args;
851}
852
853static VALUE
854new_array_pattern(struct parser_params *p, VALUE constant, VALUE pre_arg, VALUE aryptn, const YYLTYPE *loc)
855{
856 NODE *t = (NODE *)aryptn;
857 struct rb_ary_pattern_info *apinfo = t->nd_apinfo;
859
860 if (apinfo) {
861 pre_args = rb_ary_entry(apinfo->imemo, 0);
862 rest_arg = rb_ary_entry(apinfo->imemo, 1);
863 post_args = rb_ary_entry(apinfo->imemo, 2);
864 }
865
866 if (!NIL_P(pre_arg)) {
867 if (!NIL_P(pre_args)) {
868 rb_ary_unshift(pre_args, pre_arg);
869 }
870 else {
871 pre_args = rb_ary_new_from_args(1, pre_arg);
872 }
873 }
874 return dispatch4(aryptn, constant, pre_args, rest_arg, post_args);
875}
876
877static VALUE
878new_array_pattern_tail(struct parser_params *p, VALUE pre_args, VALUE has_rest, VALUE rest_arg, VALUE post_args, const YYLTYPE *loc)
879{
880 NODE *t;
881 struct rb_ary_pattern_info *apinfo;
882
883 if (has_rest) {
884 rest_arg = dispatch1(var_field, rest_arg ? rest_arg : Qnil);
885 }
886 else {
887 rest_arg = Qnil;
888 }
889
891 apinfo = ZALLOC(struct rb_ary_pattern_info);
892 rb_imemo_tmpbuf_set_ptr(tmpbuf, apinfo);
893 apinfo->imemo = rb_ary_new_from_args(4, pre_args, rest_arg, post_args, tmpbuf);
894
895 t = rb_node_newnode(NODE_ARYPTN, Qnil, Qnil, (VALUE)apinfo, &NULL_LOC);
896 RB_OBJ_WRITTEN(p->ast, Qnil, apinfo->imemo);
897
898 return (VALUE)t;
899}
900
901#define new_hash(p,h,l) rb_ary_new_from_args(0)
902
903static VALUE
904new_unique_key_hash(struct parser_params *p, VALUE ary, const YYLTYPE *loc)
905{
906 return ary;
907}
908
909static VALUE
910new_hash_pattern(struct parser_params *p, VALUE constant, VALUE hshptn, const YYLTYPE *loc)
911{
912 NODE *t = (NODE *)hshptn;
913 VALUE kw_args = t->u1.value, kw_rest_arg = t->u2.value;
914 return dispatch3(hshptn, constant, kw_args, kw_rest_arg);
915}
916
917static VALUE
918new_hash_pattern_tail(struct parser_params *p, VALUE kw_args, VALUE kw_rest_arg, const YYLTYPE *loc)
919{
920 NODE *t;
921 if (kw_rest_arg) {
922 kw_rest_arg = dispatch1(var_field, kw_rest_arg);
923 }
924 else {
925 kw_rest_arg = Qnil;
926 }
927 t = rb_node_newnode(NODE_HSHPTN, kw_args, kw_rest_arg, 0, &NULL_LOC);
928
929 add_mark_object(p, kw_args);
930 add_mark_object(p, kw_rest_arg);
931 return (VALUE)t;
932}
933
934#define new_defined(p,expr,loc) dispatch1(defined, (expr))
935
936static VALUE heredoc_dedent(struct parser_params*,VALUE);
937
938#else
939#define ID2VAL(id) (id)
940#define TOKEN2VAL(t) ID2VAL(t)
941#define KWD2EID(t, v) keyword_##t
942#endif /* RIPPER */
943
944#ifndef RIPPER
945# define Qnone 0
946# define Qnull 0
947# define ifndef_ripper(x) (x)
948#else
949# define Qnone Qnil
950# define Qnull Qundef
951# define ifndef_ripper(x)
952#endif
953
954# define rb_warn0(fmt) WARN_CALL(WARN_ARGS(fmt, 1))
955# define rb_warn1(fmt,a) WARN_CALL(WARN_ARGS(fmt, 2), (a))
956# define rb_warn2(fmt,a,b) WARN_CALL(WARN_ARGS(fmt, 3), (a), (b))
957# define rb_warn3(fmt,a,b,c) WARN_CALL(WARN_ARGS(fmt, 4), (a), (b), (c))
958# define rb_warn4(fmt,a,b,c,d) WARN_CALL(WARN_ARGS(fmt, 5), (a), (b), (c), (d))
959# define rb_warning0(fmt) WARNING_CALL(WARNING_ARGS(fmt, 1))
960# define rb_warning1(fmt,a) WARNING_CALL(WARNING_ARGS(fmt, 2), (a))
961# define rb_warning2(fmt,a,b) WARNING_CALL(WARNING_ARGS(fmt, 3), (a), (b))
962# define rb_warning3(fmt,a,b,c) WARNING_CALL(WARNING_ARGS(fmt, 4), (a), (b), (c))
963# define rb_warning4(fmt,a,b,c,d) WARNING_CALL(WARNING_ARGS(fmt, 5), (a), (b), (c), (d))
964# define rb_warn0L(l,fmt) WARN_CALL(WARN_ARGS_L(l, fmt, 1))
965# define rb_warn1L(l,fmt,a) WARN_CALL(WARN_ARGS_L(l, fmt, 2), (a))
966# define rb_warn2L(l,fmt,a,b) WARN_CALL(WARN_ARGS_L(l, fmt, 3), (a), (b))
967# define rb_warn3L(l,fmt,a,b,c) WARN_CALL(WARN_ARGS_L(l, fmt, 4), (a), (b), (c))
968# define rb_warn4L(l,fmt,a,b,c,d) WARN_CALL(WARN_ARGS_L(l, fmt, 5), (a), (b), (c), (d))
969# define rb_warning0L(l,fmt) WARNING_CALL(WARNING_ARGS_L(l, fmt, 1))
970# define rb_warning1L(l,fmt,a) WARNING_CALL(WARNING_ARGS_L(l, fmt, 2), (a))
971# define rb_warning2L(l,fmt,a,b) WARNING_CALL(WARNING_ARGS_L(l, fmt, 3), (a), (b))
972# define rb_warning3L(l,fmt,a,b,c) WARNING_CALL(WARNING_ARGS_L(l, fmt, 4), (a), (b), (c))
973# define rb_warning4L(l,fmt,a,b,c,d) WARNING_CALL(WARNING_ARGS_L(l, fmt, 5), (a), (b), (c), (d))
974#ifdef RIPPER
975static ID id_warn, id_warning, id_gets, id_assoc;
976# define WARN_S_L(s,l) STR_NEW(s,l)
977# define WARN_S(s) STR_NEW2(s)
978# define WARN_I(i) INT2NUM(i)
979# define WARN_ID(i) rb_id2str(i)
980# define WARN_IVAL(i) i
981# define PRIsWARN "s"
982# define WARN_ARGS(fmt,n) p->value, id_warn, n, rb_usascii_str_new_lit(fmt)
983# define WARN_ARGS_L(l,fmt,n) WARN_ARGS(fmt,n)
984# ifdef HAVE_VA_ARGS_MACRO
985# define WARN_CALL(...) rb_funcall(__VA_ARGS__)
986# else
987# define WARN_CALL rb_funcall
988# endif
989# define WARNING_ARGS(fmt,n) p->value, id_warning, n, rb_usascii_str_new_lit(fmt)
990# define WARNING_ARGS_L(l, fmt,n) WARNING_ARGS(fmt,n)
991# ifdef HAVE_VA_ARGS_MACRO
992# define WARNING_CALL(...) rb_funcall(__VA_ARGS__)
993# else
994# define WARNING_CALL rb_funcall
995# endif
996PRINTF_ARGS(static void ripper_compile_error(struct parser_params*, const char *fmt, ...), 2, 3);
997# define compile_error ripper_compile_error
998#else
999# define WARN_S_L(s,l) s
1000# define WARN_S(s) s
1001# define WARN_I(i) i
1002# define WARN_ID(i) rb_id2name(i)
1003# define WARN_IVAL(i) NUM2INT(i)
1004# define PRIsWARN PRIsVALUE
1005# define WARN_ARGS(fmt,n) WARN_ARGS_L(p->ruby_sourceline,fmt,n)
1006# define WARN_ARGS_L(l,fmt,n) p->ruby_sourcefile, (l), (fmt)
1007# define WARN_CALL rb_compile_warn
1008# define WARNING_ARGS(fmt,n) WARN_ARGS(fmt,n)
1009# define WARNING_ARGS_L(l,fmt,n) WARN_ARGS_L(l,fmt,n)
1010# define WARNING_CALL rb_compile_warning
1011PRINTF_ARGS(static void parser_compile_error(struct parser_params*, const char *fmt, ...), 2, 3);
1012# define compile_error parser_compile_error
1013#endif
1014
1015static void token_info_setup(token_info *ptinfo, const char *ptr, const rb_code_location_t *loc);
1016static void token_info_push(struct parser_params*, const char *token, const rb_code_location_t *loc);
1017static void token_info_pop(struct parser_params*, const char *token, const rb_code_location_t *loc);
1018static void token_info_warn(struct parser_params *p, const char *token, token_info *ptinfo_beg, int same, const rb_code_location_t *loc);
1019
1020#define WARN_EOL(tok) \
1021 (looking_at_eol_p(p) ? \
1022 (void)rb_warning0("`" tok "' at the end of line without an expression") : \
1023 (void)0)
1024static int looking_at_eol_p(struct parser_params *p);
1025
1026#line 1027 "parse.c"
1027
1028# ifndef YY_CAST
1029# ifdef __cplusplus
1030# define YY_CAST(Type, Val) static_cast<Type> (Val)
1031# define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast<Type> (Val)
1032# else
1033# define YY_CAST(Type, Val) ((Type) (Val))
1034# define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val))
1035# endif
1036# endif
1037# ifndef YY_NULLPTR
1038# if defined __cplusplus
1039# if 201103L <= __cplusplus
1040# define YY_NULLPTR nullptr
1041# else
1042# define YY_NULLPTR 0
1043# endif
1044# else
1045# define YY_NULLPTR ((void*)0)
1046# endif
1047# endif
1048
1049/* Enabling verbose error messages. */
1050#ifdef YYERROR_VERBOSE
1051# undef YYERROR_VERBOSE
1052# define YYERROR_VERBOSE 1
1053#else
1054# define YYERROR_VERBOSE 1
1055#endif
1056
1057/* Use api.header.include to #include this header
1058 instead of duplicating it here. */
1059#ifndef YY_YY_Y_TAB_H_INCLUDED
1060# define YY_YY_Y_TAB_H_INCLUDED
1061/* Debug traces. */
1062#ifndef YYDEBUG
1063# define YYDEBUG 0
1064#endif
1065#if YYDEBUG
1066#ifndef yydebug
1067extern int yydebug;
1068#endif
1069#endif
1070
1071/* Token type. */
1072#ifndef YYTOKENTYPE
1073# define YYTOKENTYPE
1074 enum yytokentype
1075 {
1076 END_OF_INPUT = 0,
1077 keyword_class = 258,
1078 keyword_module = 259,
1079 keyword_def = 260,
1080 keyword_undef = 261,
1081 keyword_begin = 262,
1082 keyword_rescue = 263,
1083 keyword_ensure = 264,
1084 keyword_end = 265,
1085 keyword_if = 266,
1086 keyword_unless = 267,
1087 keyword_then = 268,
1088 keyword_elsif = 269,
1089 keyword_else = 270,
1090 keyword_case = 271,
1091 keyword_when = 272,
1092 keyword_while = 273,
1093 keyword_until = 274,
1094 keyword_for = 275,
1095 keyword_break = 276,
1096 keyword_next = 277,
1097 keyword_redo = 278,
1098 keyword_retry = 279,
1099 keyword_in = 280,
1100 keyword_do = 281,
1101 keyword_do_cond = 282,
1102 keyword_do_block = 283,
1103 keyword_do_LAMBDA = 284,
1104 keyword_return = 285,
1105 keyword_yield = 286,
1106 keyword_super = 287,
1107 keyword_self = 288,
1108 keyword_nil = 289,
1109 keyword_true = 290,
1110 keyword_false = 291,
1111 keyword_and = 292,
1112 keyword_or = 293,
1113 keyword_not = 294,
1114 modifier_if = 295,
1115 modifier_unless = 296,
1116 modifier_while = 297,
1117 modifier_until = 298,
1118 modifier_rescue = 299,
1119 keyword_alias = 300,
1120 keyword_defined = 301,
1121 keyword_BEGIN = 302,
1122 keyword_END = 303,
1123 keyword__LINE__ = 304,
1124 keyword__FILE__ = 305,
1125 keyword__ENCODING__ = 306,
1126 tIDENTIFIER = 307,
1127 tFID = 308,
1128 tGVAR = 309,
1129 tIVAR = 310,
1130 tCONSTANT = 311,
1131 tCVAR = 312,
1132 tLABEL = 313,
1133 tINTEGER = 314,
1134 tFLOAT = 315,
1135 tRATIONAL = 316,
1136 tIMAGINARY = 317,
1137 tCHAR = 318,
1138 tNTH_REF = 319,
1139 tBACK_REF = 320,
1140 tSTRING_CONTENT = 321,
1141 tREGEXP_END = 322,
1142 tSP = 323,
1143 tUPLUS = 132,
1144 tUMINUS = 133,
1145 tPOW = 134,
1146 tCMP = 135,
1147 tEQ = 140,
1148 tEQQ = 141,
1149 tNEQ = 142,
1150 tGEQ = 139,
1151 tLEQ = 138,
1152 tANDOP = 148,
1153 tOROP = 149,
1154 tMATCH = 143,
1155 tNMATCH = 144,
1156 tDOT2 = 128,
1157 tDOT3 = 129,
1158 tBDOT2 = 130,
1159 tBDOT3 = 131,
1160 tAREF = 145,
1161 tASET = 146,
1162 tLSHFT = 136,
1163 tRSHFT = 137,
1164 tANDDOT = 150,
1165 tCOLON2 = 147,
1166 tCOLON3 = 324,
1167 tOP_ASGN = 325,
1168 tASSOC = 326,
1169 tLPAREN = 327,
1170 tLPAREN_ARG = 328,
1171 tRPAREN = 329,
1172 tLBRACK = 330,
1173 tLBRACE = 331,
1174 tLBRACE_ARG = 332,
1175 tSTAR = 333,
1176 tDSTAR = 334,
1177 tAMPER = 335,
1178 tLAMBDA = 336,
1179 tSYMBEG = 337,
1180 tSTRING_BEG = 338,
1181 tXSTRING_BEG = 339,
1182 tREGEXP_BEG = 340,
1183 tWORDS_BEG = 341,
1184 tQWORDS_BEG = 342,
1185 tSYMBOLS_BEG = 343,
1186 tQSYMBOLS_BEG = 344,
1187 tSTRING_END = 345,
1188 tSTRING_DEND = 346,
1189 tSTRING_DBEG = 347,
1190 tSTRING_DVAR = 348,
1191 tLAMBEG = 349,
1192 tLABEL_END = 350,
1193 tLOWEST = 351,
1194 tUMINUS_NUM = 352,
1195 tLAST_TOKEN = 353
1196 };
1197#endif
1198
1199/* Value type. */
1200#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
1201union YYSTYPE
1202{
1203#line 979 "parse.y"
1204
1205 VALUE val;
1206 NODE *node;
1207 ID id;
1208 int num;
1209 st_table *tbl;
1210 const struct vtable *vars;
1211 struct rb_strterm_struct *strterm;
1212
1213#line 1212 "parse.c"
1214
1215};
1216typedef union YYSTYPE YYSTYPE;
1217# define YYSTYPE_IS_TRIVIAL 1
1218# define YYSTYPE_IS_DECLARED 1
1219#endif
1220
1221/* Location type. */
1222#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
1223typedef struct YYLTYPE YYLTYPE;
1224struct YYLTYPE
1225{
1226 int first_line;
1227 int first_column;
1228 int last_line;
1229 int last_column;
1230};
1231# define YYLTYPE_IS_DECLARED 1
1232# define YYLTYPE_IS_TRIVIAL 1
1233#endif
1234
1235
1236
1237int yyparse (struct parser_params *p);
1238
1239#endif /* !YY_YY_Y_TAB_H_INCLUDED */
1240
1241
1242
1243#ifdef short
1244# undef short
1245#endif
1246
1247/* On compilers that do not define __PTRDIFF_MAX__ etc., make sure
1248 <limits.h> and (if available) <stdint.h> are included
1249 so that the code can choose integer types of a good width. */
1250
1251#ifndef __PTRDIFF_MAX__
1252# include <limits.h> /* INFRINGES ON USER NAME SPACE */
1253# if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
1254# include <stdint.h> /* INFRINGES ON USER NAME SPACE */
1255# define YY_STDINT_H
1256# endif
1257#endif
1258
1259/* Narrow types that promote to a signed type and that can represent a
1260 signed or unsigned integer of at least N bits. In tables they can
1261 save space and decrease cache pressure. Promoting to a signed type
1262 helps avoid bugs in integer arithmetic. */
1263
1264#ifdef __INT_LEAST8_MAX__
1265typedef __INT_LEAST8_TYPE__ yytype_int8;
1266#elif defined YY_STDINT_H
1268#else
1269typedef signed char yytype_int8;
1270#endif
1271
1272#ifdef __INT_LEAST16_MAX__
1273typedef __INT_LEAST16_TYPE__ yytype_int16;
1274#elif defined YY_STDINT_H
1276#else
1277typedef short yytype_int16;
1278#endif
1279
1280#if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__
1281typedef __UINT_LEAST8_TYPE__ yytype_uint8;
1282#elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \
1283 && UINT_LEAST8_MAX <= INT_MAX)
1285#elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX
1286typedef unsigned char yytype_uint8;
1287#else
1288typedef short yytype_uint8;
1289#endif
1290
1291#if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__
1292typedef __UINT_LEAST16_TYPE__ yytype_uint16;
1293#elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \
1294 && UINT_LEAST16_MAX <= INT_MAX)
1296#elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX
1297typedef unsigned short yytype_uint16;
1298#else
1299typedef int yytype_uint16;
1300#endif
1301
1302#ifndef YYPTRDIFF_T
1303# if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__
1304# define YYPTRDIFF_T __PTRDIFF_TYPE__
1305# define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__
1306# elif defined PTRDIFF_MAX
1307# ifndef ptrdiff_t
1308# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
1309# endif
1310# define YYPTRDIFF_T ptrdiff_t
1311# define YYPTRDIFF_MAXIMUM PTRDIFF_MAX
1312# else
1313# define YYPTRDIFF_T long
1314# define YYPTRDIFF_MAXIMUM LONG_MAX
1315# endif
1316#endif
1317
1318#ifndef YYSIZE_T
1319# ifdef __SIZE_TYPE__
1320# define YYSIZE_T __SIZE_TYPE__
1321# elif defined size_t
1322# define YYSIZE_T size_t
1323# elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
1324# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
1325# define YYSIZE_T size_t
1326# else
1327# define YYSIZE_T unsigned
1328# endif
1329#endif
1330
1331#define YYSIZE_MAXIMUM \
1332 YY_CAST (YYPTRDIFF_T, \
1333 (YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1) \
1334 ? YYPTRDIFF_MAXIMUM \
1335 : YY_CAST (YYSIZE_T, -1)))
1336
1337#define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X))
1338
1339/* Stored state numbers (used for stacks). */
1341
1342/* State numbers in computations. */
1344
1345#ifndef YY_
1346# if defined YYENABLE_NLS && YYENABLE_NLS
1347# if ENABLE_NLS
1348# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
1349# define YY_(Msgid) dgettext ("bison-runtime", Msgid)
1350# endif
1351# endif
1352# ifndef YY_
1353# define YY_(Msgid) Msgid
1354# endif
1355#endif
1356
1357#ifndef YY_ATTRIBUTE_PURE
1358# if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__)
1359# define YY_ATTRIBUTE_PURE __attribute__ ((__pure__))
1360# else
1361# define YY_ATTRIBUTE_PURE
1362# endif
1363#endif
1364
1365#ifndef YY_ATTRIBUTE_UNUSED
1366# if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__)
1367# define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
1368# else
1369# define YY_ATTRIBUTE_UNUSED
1370# endif
1371#endif
1372
1373/* Suppress unused-variable warnings by "using" E. */
1374#if ! defined lint || defined __GNUC__
1375# define YYUSE(E) ((void) (E))
1376#else
1377# define YYUSE(E) /* empty */
1378#endif
1379
1380#if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
1381/* Suppress an incorrect diagnostic about yylval being uninitialized. */
1382# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
1383 _Pragma ("GCC diagnostic push") \
1384 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \
1385 _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
1386# define YY_IGNORE_MAYBE_UNINITIALIZED_END \
1387 _Pragma ("GCC diagnostic pop")
1388#else
1389# define YY_INITIAL_VALUE(Value) Value
1390#endif
1391#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1392# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1393# define YY_IGNORE_MAYBE_UNINITIALIZED_END
1394#endif
1395#ifndef YY_INITIAL_VALUE
1396# define YY_INITIAL_VALUE(Value) /* Nothing. */
1397#endif
1398
1399#if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__
1400# define YY_IGNORE_USELESS_CAST_BEGIN \
1401 _Pragma ("GCC diagnostic push") \
1402 _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"")
1403# define YY_IGNORE_USELESS_CAST_END \
1404 _Pragma ("GCC diagnostic pop")
1405#endif
1406#ifndef YY_IGNORE_USELESS_CAST_BEGIN
1407# define YY_IGNORE_USELESS_CAST_BEGIN
1408# define YY_IGNORE_USELESS_CAST_END
1409#endif
1410
1411
1412#define YY_ASSERT(E) ((void) (0 && (E)))
1413
1414#if ! defined yyoverflow || YYERROR_VERBOSE
1415
1416/* The parser invokes alloca or malloc; define the necessary symbols. */
1417
1418# ifdef YYSTACK_USE_ALLOCA
1419# if YYSTACK_USE_ALLOCA
1420# ifdef __GNUC__
1421# define YYSTACK_ALLOC __builtin_alloca
1422# elif defined __BUILTIN_VA_ARG_INCR
1423# include <alloca.h> /* INFRINGES ON USER NAME SPACE */
1424# elif defined _AIX
1425# define YYSTACK_ALLOC __alloca
1426# elif defined _MSC_VER
1427# include <malloc.h> /* INFRINGES ON USER NAME SPACE */
1428# define alloca _alloca
1429# else
1430# define YYSTACK_ALLOC alloca
1431# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
1432# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
1433 /* Use EXIT_SUCCESS as a witness for stdlib.h. */
1434# ifndef EXIT_SUCCESS
1435# define EXIT_SUCCESS 0
1436# endif
1437# endif
1438# endif
1439# endif
1440# endif
1441
1442# ifdef YYSTACK_ALLOC
1443 /* Pacify GCC's 'empty if-body' warning. */
1444# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
1445# ifndef YYSTACK_ALLOC_MAXIMUM
1446 /* The OS might guarantee only one guard page at the bottom of the stack,
1447 and a page size can be as small as 4096 bytes. So we cannot safely
1448 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
1449 to allow for a few compiler-allocated temporary stack slots. */
1450# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
1451# endif
1452# else
1453# define YYSTACK_ALLOC YYMALLOC
1454# define YYSTACK_FREE YYFREE
1455# ifndef YYSTACK_ALLOC_MAXIMUM
1456# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
1457# endif
1458# if (defined __cplusplus && ! defined EXIT_SUCCESS \
1459 && ! ((defined YYMALLOC || defined malloc) \
1460 && (defined YYFREE || defined free)))
1461# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
1462# ifndef EXIT_SUCCESS
1463# define EXIT_SUCCESS 0
1464# endif
1465# endif
1466# ifndef YYMALLOC
1467# define YYMALLOC malloc
1468# if ! defined malloc && ! defined EXIT_SUCCESS
1469void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
1470# endif
1471# endif
1472# ifndef YYFREE
1473# define YYFREE free
1474# if ! defined free && ! defined EXIT_SUCCESS
1475void free (void *); /* INFRINGES ON USER NAME SPACE */
1476# endif
1477# endif
1478# endif
1479#endif /* ! defined yyoverflow || YYERROR_VERBOSE */
1480
1481
1482#if (! defined yyoverflow \
1483 && (! defined __cplusplus \
1484 || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \
1485 && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
1486
1487/* A type that is properly aligned for any stack member. */
1488union yyalloc
1489{
1493};
1494
1495/* The size of the maximum gap between one aligned stack and the next. */
1496# define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1)
1497
1498/* The size of an array large to enough to hold all stacks, each with
1499 N elements. */
1500# define YYSTACK_BYTES(N) \
1501 ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE) \
1502 + YYSIZEOF (YYLTYPE)) \
1503 + 2 * YYSTACK_GAP_MAXIMUM)
1504
1505# define YYCOPY_NEEDED 1
1506
1507/* Relocate STACK from its old location to the new one. The
1508 local variables YYSIZE and YYSTACKSIZE give the old and new number of
1509 elements in the stack, and YYPTR gives the new location of the
1510 stack. Advance YYPTR to a properly aligned location for the next
1511 stack. */
1512# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
1513 do \
1514 { \
1515 YYPTRDIFF_T yynewbytes; \
1516 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
1517 Stack = &yyptr->Stack_alloc; \
1518 yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \
1519 yyptr += yynewbytes / YYSIZEOF (*yyptr); \
1520 } \
1521 while (0)
1522
1523#endif
1524
1525#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
1526/* Copy COUNT objects from SRC to DST. The source and destination do
1527 not overlap. */
1528# ifndef YYCOPY
1529# if defined __GNUC__ && 1 < __GNUC__
1530# define YYCOPY(Dst, Src, Count) \
1531 __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src)))
1532# else
1533# define YYCOPY(Dst, Src, Count) \
1534 do \
1535 { \
1536 YYPTRDIFF_T yyi; \
1537 for (yyi = 0; yyi < (Count); yyi++) \
1538 (Dst)[yyi] = (Src)[yyi]; \
1539 } \
1540 while (0)
1541# endif
1542# endif
1543#endif /* !YYCOPY_NEEDED */
1544
1545/* YYFINAL -- State number of the termination state. */
1546#define YYFINAL 3
1547/* YYLAST -- Last index in YYTABLE. */
1548#define YYLAST 13883
1549
1550/* YYNTOKENS -- Number of terminals. */
1551#define YYNTOKENS 154
1552/* YYNNTS -- Number of nonterminals. */
1553#define YYNNTS 266
1554/* YYNRULES -- Number of rules. */
1555#define YYNRULES 761
1556/* YYNSTATES -- Number of states. */
1557#define YYNSTATES 1251
1558
1559#define YYUNDEFTOK 2
1560#define YYMAXUTOK 353
1561
1562
1563/* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM
1564 as returned by yylex, with out-of-bounds checking. */
1565#define YYTRANSLATE(YYX) \
1566 (0 <= (YYX) && (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
1567
1568/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
1569 as returned by yylex. */
1570static const yytype_uint8 yytranslate[] =
1571{
1572 0, 2, 2, 2, 2, 2, 2, 2, 2, 71,
1573 153, 74, 72, 73, 2, 2, 2, 2, 2, 2,
1574 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1575 2, 2, 152, 140, 2, 2, 2, 138, 133, 2,
1576 148, 149, 136, 134, 146, 135, 68, 137, 2, 2,
1577 2, 2, 2, 2, 2, 2, 2, 2, 128, 151,
1578 130, 126, 129, 127, 2, 2, 2, 2, 2, 2,
1579 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1580 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1581 2, 145, 69, 150, 132, 2, 147, 2, 2, 2,
1582 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1583 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1584 2, 2, 2, 143, 131, 144, 141, 2, 88, 89,
1585 90, 91, 75, 76, 77, 78, 94, 95, 83, 82,
1586 79, 80, 81, 86, 87, 92, 93, 97, 84, 85,
1587 96, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1588 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1589 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1590 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1591 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1592 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1593 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1594 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1595 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1596 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1597 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
1598 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
1599 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
1600 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
1601 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
1602 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
1603 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
1604 65, 66, 67, 70, 98, 99, 100, 101, 102, 103,
1605 104, 105, 106, 107, 108, 109, 110, 111, 112, 113,
1606 114, 115, 116, 117, 118, 119, 120, 121, 122, 123,
1607 124, 125, 139, 142
1608};
1609
1610#if YYDEBUG
1611 /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
1612static const yytype_int16 yyrline[] =
1613{
1614 0, 1177, 1177, 1177, 1203, 1209, 1216, 1223, 1230, 1236,
1615 1237, 1243, 1256, 1254, 1265, 1276, 1282, 1289, 1296, 1303,
1616 1309, 1314, 1313, 1323, 1323, 1330, 1337, 1347, 1355, 1362,
1617 1370, 1378, 1390, 1402, 1412, 1426, 1427, 1435, 1443, 1452,
1618 1459, 1462, 1469, 1476, 1484, 1491, 1498, 1506, 1513, 1523,
1619 1528, 1537, 1540, 1541, 1545, 1549, 1553, 1558, 1565, 1567,
1620 1557, 1575, 1578, 1585, 1585, 1585, 1591, 1592, 1595, 1596,
1621 1605, 1615, 1625, 1634, 1645, 1652, 1659, 1666, 1673, 1681,
1622 1689, 1696, 1703, 1712, 1713, 1722, 1723, 1732, 1739, 1746,
1623 1753, 1760, 1767, 1774, 1781, 1788, 1795, 1804, 1805, 1814,
1624 1821, 1830, 1837, 1846, 1853, 1860, 1867, 1877, 1884, 1894,
1625 1901, 1908, 1918, 1925, 1932, 1939, 1946, 1953, 1960, 1967,
1626 1974, 1984, 1991, 1994, 2001, 2008, 2017, 2018, 2019, 2020,
1627 2025, 2028, 2035, 2038, 2045, 2045, 2055, 2056, 2057, 2058,
1628 2059, 2060, 2061, 2062, 2063, 2064, 2065, 2066, 2067, 2068,
1629 2069, 2070, 2071, 2072, 2073, 2074, 2075, 2076, 2077, 2078,
1630 2079, 2080, 2081, 2082, 2083, 2084, 2087, 2087, 2087, 2088,
1631 2088, 2089, 2089, 2089, 2090, 2090, 2090, 2090, 2091, 2091,
1632 2091, 2091, 2092, 2092, 2092, 2093, 2093, 2093, 2093, 2094,
1633 2094, 2094, 2094, 2095, 2095, 2095, 2095, 2096, 2096, 2096,
1634 2096, 2097, 2097, 2097, 2097, 2098, 2098, 2101, 2108, 2115,
1635 2123, 2131, 2139, 2147, 2155, 2162, 2170, 2179, 2188, 2200,
1636 2212, 2224, 2236, 2240, 2244, 2248, 2252, 2256, 2260, 2264,
1637 2268, 2272, 2276, 2280, 2284, 2288, 2289, 2293, 2297, 2301,
1638 2305, 2309, 2313, 2317, 2321, 2325, 2329, 2333, 2333, 2338,
1639 2347, 2353, 2354, 2355, 2356, 2359, 2363, 2370, 2377, 2378,
1640 2382, 2389, 2398, 2403, 2414, 2421, 2447, 2476, 2477, 2480,
1641 2481, 2482, 2486, 2493, 2502, 2510, 2517, 2525, 2533, 2537,
1642 2537, 2574, 2583, 2587, 2593, 2600, 2607, 2614, 2623, 2624,
1643 2627, 2634, 2641, 2650, 2651, 2652, 2653, 2654, 2655, 2656,
1644 2657, 2658, 2659, 2660, 2668, 2667, 2682, 2682, 2689, 2689,
1645 2697, 2705, 2712, 2719, 2726, 2734, 2741, 2748, 2755, 2762,
1646 2762, 2767, 2771, 2775, 2782, 2783, 2792, 2791, 2802, 2813,
1647 2824, 2834, 2845, 2844, 2861, 2860, 2875, 2884, 2929, 2928,
1648 2952, 2951, 2974, 2973, 2997, 3003, 2996, 3023, 3024, 3023,
1649 3049, 3056, 3063, 3070, 3079, 3086, 3092, 3109, 3115, 3121,
1650 3127, 3133, 3139, 3145, 3151, 3157, 3163, 3169, 3175, 3181,
1651 3187, 3202, 3209, 3215, 3222, 3223, 3224, 3227, 3228, 3231,
1652 3232, 3244, 3245, 3254, 3255, 3258, 3266, 3275, 3282, 3291,
1653 3298, 3305, 3312, 3319, 3328, 3336, 3345, 3349, 3353, 3357,
1654 3361, 3367, 3372, 3377, 3381, 3385, 3389, 3393, 3397, 3405,
1655 3409, 3413, 3417, 3421, 3425, 3429, 3433, 3437, 3443, 3444,
1656 3450, 3459, 3471, 3475, 3484, 3486, 3490, 3495, 3501, 3504,
1657 3508, 3512, 3516, 3501, 3540, 3548, 3558, 3563, 3569, 3579,
1658 3593, 3600, 3607, 3616, 3625, 3633, 3641, 3648, 3656, 3664,
1659 3671, 3678, 3691, 3699, 3709, 3710, 3714, 3709, 3731, 3732,
1660 3736, 3731, 3755, 3763, 3770, 3778, 3787, 3799, 3800, 3804,
1661 3810, 3811, 3813, 3814, 3815, 3803, 3828, 3829, 3832, 3833,
1662 3841, 3851, 3852, 3857, 3865, 3869, 3875, 3878, 3887, 3890,
1663 3897, 3900, 3901, 3903, 3904, 3913, 3922, 3927, 3936, 3945,
1664 3950, 3950, 3955, 3961, 3960, 3972, 3977, 3977, 3984, 3993,
1665 3997, 4006, 4010, 4014, 4018, 4022, 4025, 4029, 4038, 4042,
1666 4046, 4050, 4056, 4057, 4066, 4075, 4079, 4083, 4087, 4091,
1667 4095, 4101, 4103, 4112, 4120, 4134, 4135, 4158, 4162, 4168,
1668 4174, 4175, 4184, 4193, 4205, 4217, 4218, 4219, 4220, 4232,
1669 4246, 4247, 4248, 4249, 4250, 4251, 4252, 4253, 4254, 4262,
1670 4261, 4274, 4284, 4297, 4304, 4311, 4320, 4332, 4335, 4342,
1671 4349, 4352, 4356, 4359, 4366, 4369, 4370, 4373, 4390, 4391,
1672 4392, 4401, 4411, 4420, 4426, 4436, 4442, 4451, 4453, 4462,
1673 4472, 4478, 4487, 4496, 4506, 4512, 4522, 4528, 4538, 4548,
1674 4567, 4573, 4583, 4593, 4634, 4637, 4636, 4653, 4657, 4662,
1675 4666, 4670, 4652, 4691, 4698, 4705, 4712, 4715, 4716, 4719,
1676 4729, 4730, 4731, 4732, 4735, 4745, 4746, 4756, 4757, 4758,
1677 4759, 4762, 4763, 4764, 4765, 4766, 4769, 4770, 4771, 4772,
1678 4773, 4774, 4775, 4778, 4791, 4800, 4807, 4816, 4817, 4821,
1679 4820, 4830, 4838, 4847, 4862, 4877, 4877, 4891, 4895, 4899,
1680 4903, 4907, 4913, 4918, 4923, 4927, 4931, 4935, 4939, 4943,
1681 4947, 4951, 4955, 4959, 4963, 4967, 4971, 4975, 4980, 4986,
1682 4995, 5003, 5011, 5019, 5029, 5030, 5038, 5047, 5055, 5076,
1683 5078, 5091, 5101, 5109, 5119, 5126, 5135, 5142, 5152, 5159,
1684 5168, 5169, 5172, 5180, 5188, 5198, 5208, 5218, 5225, 5234,
1685 5241, 5250, 5251, 5254, 5262, 5272, 5273, 5276, 5286, 5290,
1686 5296, 5301, 5301, 5325, 5326, 5335, 5337, 5360, 5371, 5378,
1687 5386, 5405, 5406, 5407, 5410, 5411, 5412, 5413, 5416, 5417,
1688 5418, 5421, 5422, 5425, 5426, 5429, 5430, 5433, 5434, 5437,
1689 5438, 5441, 5444, 5447, 5450, 5451, 5452, 5455, 5456, 5459,
1690 5460, 5464
1691};
1692#endif
1693
1694#if YYDEBUG || YYERROR_VERBOSE || 1
1695/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
1696 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
1697static const char *const yytname[] =
1698{
1699 "\"end-of-input\"", "error", "$undefined", "\"`class'\"",
1700 "\"`module'\"", "\"`def'\"", "\"`undef'\"", "\"`begin'\"",
1701 "\"`rescue'\"", "\"`ensure'\"", "\"`end'\"", "\"`if'\"", "\"`unless'\"",
1702 "\"`then'\"", "\"`elsif'\"", "\"`else'\"", "\"`case'\"", "\"`when'\"",
1703 "\"`while'\"", "\"`until'\"", "\"`for'\"", "\"`break'\"", "\"`next'\"",
1704 "\"`redo'\"", "\"`retry'\"", "\"`in'\"", "\"`do'\"",
1705 "\"`do' for condition\"", "\"`do' for block\"", "\"`do' for lambda\"",
1706 "\"`return'\"", "\"`yield'\"", "\"`super'\"", "\"`self'\"", "\"`nil'\"",
1707 "\"`true'\"", "\"`false'\"", "\"`and'\"", "\"`or'\"", "\"`not'\"",
1708 "\"`if' modifier\"", "\"`unless' modifier\"", "\"`while' modifier\"",
1709 "\"`until' modifier\"", "\"`rescue' modifier\"", "\"`alias'\"",
1710 "\"`defined?'\"", "\"`BEGIN'\"", "\"`END'\"", "\"`__LINE__'\"",
1711 "\"`__FILE__'\"", "\"`__ENCODING__'\"", "\"local variable or method\"",
1712 "\"method\"", "\"global variable\"", "\"instance variable\"",
1713 "\"constant\"", "\"class variable\"", "tLABEL", "\"integer literal\"",
1714 "\"float literal\"", "\"rational literal\"", "\"imaginary literal\"",
1715 "\"char literal\"", "\"numbered reference\"", "\"back reference\"",
1716 "\"literal content\"", "tREGEXP_END", "'.'", "\"backslash\"",
1717 "\"escaped space\"", "\"escaped horizontal tab\"",
1718 "\"escaped form feed\"", "\"escaped carriage return\"",
1719 "\"escaped vertical tab\"", "\"unary+\"", "\"unary-\"", "\"**\"",
1720 "\"<=>\"", "\"==\"", "\"===\"", "\"!=\"", "\">=\"", "\"<=\"", "\"&&\"",
1721 "\"||\"", "\"=~\"", "\"!~\"", "\"..\"", "\"...\"", "\"(..\"", "\"(...\"",
1722 "\"[]\"", "\"[]=\"", "\"<<\"", "\">>\"", "\"&.\"", "\"::\"",
1723 "\":: at EXPR_BEG\"", "\"operator-assignment\"", "\"=>\"", "\"(\"",
1724 "\"( arg\"", "\")\"", "\"[\"", "\"{\"", "\"{ arg\"", "\"*\"",
1725 "\"**arg\"", "\"&\"", "\"->\"", "\"symbol literal\"",
1726 "\"string literal\"", "\"backtick literal\"", "\"regexp literal\"",
1727 "\"word list\"", "\"verbatim word list\"", "\"symbol list\"",
1728 "\"verbatim symbol list\"", "\"terminator\"", "\"'}'\"", "tSTRING_DBEG",
1729 "tSTRING_DVAR", "tLAMBEG", "tLABEL_END", "tLOWEST", "'='", "'?'", "':'",
1730 "'>'", "'<'", "'|'", "'^'", "'&'", "'+'", "'-'", "'*'", "'/'", "'%'",
1731 "tUMINUS_NUM", "'!'", "'~'", "tLAST_TOKEN", "'{'", "'}'", "'['", "','",
1732 "'`'", "'('", "')'", "']'", "';'", "' '", "'\\n'", "$accept", "program",
1733 "$@1", "top_compstmt", "top_stmts", "top_stmt", "begin_block",
1734 "bodystmt", "$@2", "compstmt", "stmts", "stmt_or_begin", "$@3", "stmt",
1735 "$@4", "command_asgn", "command_rhs", "expr", "@5", "@6", "$@7",
1736 "expr_value", "expr_value_do", "$@8", "$@9", "command_call",
1737 "block_command", "cmd_brace_block", "fcall", "command", "mlhs",
1738 "mlhs_inner", "mlhs_basic", "mlhs_item", "mlhs_head", "mlhs_post",
1739 "mlhs_node", "lhs", "cname", "cpath", "fname", "fitem", "undef_list",
1740 "$@10", "op", "reswords", "arg", "$@11", "relop", "rel_expr",
1741 "arg_value", "aref_args", "arg_rhs", "paren_args", "opt_paren_args",
1742 "opt_call_args", "call_args", "command_args", "$@12", "block_arg",
1743 "opt_block_arg", "args", "mrhs_arg", "mrhs", "primary", "$@13", "$@14",
1744 "$@15", "$@16", "$@17", "@18", "@19", "$@20", "@21", "$@22", "@23",
1745 "@24", "@25", "@26", "primary_value", "k_begin", "k_if", "k_unless",
1746 "k_while", "k_until", "k_case", "k_for", "k_class", "k_module", "k_def",
1747 "k_do", "k_do_block", "k_rescue", "k_ensure", "k_when", "k_else",
1748 "k_elsif", "k_end", "k_return", "then", "do", "if_tail", "opt_else",
1749 "for_var", "f_marg", "f_marg_list", "f_margs", "f_rest_marg",
1750 "block_args_tail", "opt_block_args_tail", "block_param",
1751 "opt_block_param", "block_param_def", "opt_bv_decl", "bv_decls", "bvar",
1752 "lambda", "@27", "@28", "@29", "@30", "$@31", "f_larglist",
1753 "lambda_body", "do_block", "block_call", "method_call", "brace_block",
1754 "brace_body", "@32", "@33", "@34", "do_body", "@35", "@36", "@37",
1755 "case_args", "case_body", "cases", "p_case_body", "@38", "@39", "@40",
1756 "$@41", "$@42", "$@43", "p_cases", "p_top_expr", "p_top_expr_body",
1757 "p_expr", "p_as", "p_alt", "p_lparen", "p_lbracket", "p_expr_basic",
1758 "@44", "@45", "@46", "p_args", "p_args_head", "p_args_tail",
1759 "p_args_post", "p_arg", "p_kwargs", "p_kwarg", "p_kw", "p_kw_label",
1760 "p_kwrest", "p_kwnorest", "p_value", "p_primitive", "$@47", "p_variable",
1761 "p_var_ref", "p_const", "opt_rescue", "exc_list", "exc_var",
1762 "opt_ensure", "literal", "strings", "string", "string1", "xstring",
1763 "regexp", "words", "word_list", "word", "symbols", "symbol_list",
1764 "qwords", "qsymbols", "qword_list", "qsym_list", "string_contents",
1765 "xstring_contents", "regexp_contents", "string_content", "@48", "$@49",
1766 "@50", "@51", "@52", "@53", "string_dvar", "symbol", "ssym", "sym",
1767 "dsym", "numeric", "simple_numeric", "user_variable", "keyword_variable",
1768 "var_ref", "var_lhs", "backref", "superclass", "$@54", "f_arglist",
1769 "@55", "args_tail", "opt_args_tail", "f_args", "args_forward",
1770 "f_bad_arg", "f_norm_arg", "f_arg_asgn", "f_arg_item", "f_arg",
1771 "f_label", "f_kw", "f_block_kw", "f_block_kwarg", "f_kwarg",
1772 "kwrest_mark", "f_no_kwarg", "f_kwrest", "f_opt", "f_block_opt",
1773 "f_block_optarg", "f_optarg", "restarg_mark", "f_rest_arg",
1774 "blkarg_mark", "f_block_arg", "opt_f_block_arg", "singleton", "$@56",
1775 "assoc_list", "assocs", "assoc", "operation", "operation2", "operation3",
1776 "dot_or_colon", "call_op", "call_op2", "opt_terms", "opt_nl", "rparen",
1777 "rbracket", "rbrace", "trailer", "term", "terms", "none", YY_NULLPTR
1778};
1779#endif
1780
1781# ifdef YYPRINT
1782/* YYTOKNUM[NUM] -- (External) token number corresponding to the
1783 (internal) symbol number NUM (which must be that of a token). */
1784static const yytype_int16 yytoknum[] =
1785{
1786 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
1787 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
1788 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
1789 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
1790 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
1791 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
1792 315, 316, 317, 318, 319, 320, 321, 322, 46, 92,
1793 323, 9, 12, 13, 11, 132, 133, 134, 135, 140,
1794 141, 142, 139, 138, 148, 149, 143, 144, 128, 129,
1795 130, 131, 145, 146, 136, 137, 150, 147, 324, 325,
1796 326, 327, 328, 329, 330, 331, 332, 333, 334, 335,
1797 336, 337, 338, 339, 340, 341, 342, 343, 344, 345,
1798 346, 347, 348, 349, 350, 351, 61, 63, 58, 62,
1799 60, 124, 94, 38, 43, 45, 42, 47, 37, 352,
1800 33, 126, 353, 123, 125, 91, 44, 96, 40, 41,
1801 93, 59, 32, 10
1802};
1803# endif
1804
1805#define YYPACT_NINF (-1040)
1806
1807#define yypact_value_is_default(Yyn) \
1808 ((Yyn) == YYPACT_NINF)
1809
1810#define YYTABLE_NINF (-762)
1811
1812#define yytable_value_is_error(Yyn) \
1813 ((Yyn) == YYTABLE_NINF)
1814
1815 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
1816 STATE-NUM. */
1817static const yytype_int16 yypact[] =
1818{
1819 -1040, 114, 3745, -1040, 9167, -1040, -1040, -1040, 8625, -1040,
1820 -1040, -1040, -1040, -1040, -1040, -1040, 9293, 9293, -1040, -1040,
1821 -1040, 5085, 4644, -1040, -1040, -1040, -1040, 384, 8480, -27,
1822 236, 280, -1040, -1040, -1040, 3909, 4791, -1040, -1040, 4056,
1823 -1040, -1040, -1040, -1040, -1040, -1040, -1040, -1040, 11057, 11057,
1824 11057, 11057, 124, 6680, 9419, 9923, 10301, 8909, -1040, 8335,
1825 -1040, -1040, -1040, 282, 316, 388, 413, 996, 11183, 11057,
1826 -1040, 799, -1040, 1065, -1040, 374, -1040, -1040, 367, 549,
1827 495, -1040, 485, 11435, -1040, 520, 1591, 398, 65, 348,
1828 -1040, 11309, 11309, -1040, -1040, 7662, 11557, 11679, 11801, 8189,
1829 9293, 424, 95, -1040, -1040, 544, -1040, -1040, -1040, -1040,
1830 -1040, -1040, -1040, -1040, -1040, -1040, -1040, -1040, 323, 435,
1831 -1040, 570, 518, -1040, -1040, -1040, -1040, -1040, -1040, -1040,
1832 -1040, -1040, -1040, -1040, -1040, -1040, -1040, -1040, -1040, -1040,
1833 -1040, -1040, -1040, -1040, -1040, -1040, -1040, -1040, -1040, -1040,
1834 -1040, -1040, -1040, -1040, -1040, -1040, -1040, -1040, -1040, -1040,
1835 -1040, -1040, -1040, -1040, -1040, -1040, -1040, -1040, -1040, -1040,
1836 -1040, -1040, -1040, -1040, -1040, -1040, -1040, -1040, -1040, -1040,
1837 -1040, -1040, -1040, -1040, -1040, -1040, -1040, -1040, -1040, -1040,
1838 -1040, -1040, -1040, -1040, -1040, -1040, -1040, -1040, -1040, -1040,
1839 -1040, -1040, 547, -1040, -1040, -1040, 580, 11057, 634, 6831,
1840 11057, 11057, 11057, -1040, 11057, -1040, 613, 4181, 679, -1040,
1841 -1040, 640, 496, 353, 453, 696, 553, 655, -1040, -1040,
1842 7536, -1040, 9293, 9545, -1040, -1040, 7788, -1040, 11309, 863,
1843 -1040, 671, 6982, -1040, 7133, -1040, -1040, 702, 708, 367,
1844 -1040, 531, -1040, 759, 4328, 4328, 551, 9419, -1040, 6680,
1845 713, 799, -1040, 1065, -27, 745, -1040, 1065, -27, 750,
1846 -33, 38, -1040, 679, 765, 38, -1040, -27, 838, 996,
1847 11923, 769, -1040, 536, 562, 605, 659, -1040, -1040, -1040,
1848 -1040, -1040, 600, -1040, 716, 911, 438, -1040, -1040, -1040,
1849 -1040, 843, -1040, -1040, -1040, -1040, -1040, -1040, -1040, 7914,
1850 11309, 11309, 11309, 11309, 9419, 11309, 11309, -1040, -1040, -1040,
1851 824, -1040, -1040, -1040, -1040, -1040, 10427, -1040, 6680, 9038,
1852 794, 10427, -1040, 11057, 11057, 11057, 11057, 11057, -1040, -1040,
1853 11057, 11057, 11057, 11057, 11057, 11057, 11057, 11057, 11057, -1040,
1854 -1040, 11057, 11057, 11057, 11057, 11057, 11057, 11057, 11057, 11057,
1855 11057, -1040, -1040, 12386, 9293, 12476, 5824, 374, 106, 106,
1856 7284, 11309, 7284, 799, -1040, 798, 885, -1040, -1040, 662,
1857 928, 117, 127, 141, 439, 670, 11309, 880, -1040, 832,
1858 701, -1040, -1040, -1040, -1040, 34, 78, 415, 543, 558,
1859 612, 626, 632, 720, -1040, -1040, -1040, 732, -1040, -1040,
1860 -1040, 13736, -1040, -1040, 11183, 11183, -1040, -1040, 585, -1040,
1861 -1040, -1040, 777, 11057, 11057, 9671, -1040, -1040, 12566, 9293,
1862 12656, 11057, 11057, 10049, -1040, -27, 826, -1040, -1040, 11057,
1863 -27, -1040, 836, -27, 842, -1040, 133, -1040, -1040, -1040,
1864 -1040, -1040, 8625, -1040, 11057, 834, 847, 12566, 12656, 11057,
1865 1065, 236, -27, -1040, -1040, 8040, 846, -27, -1040, -1040,
1866 10175, -1040, -1040, 10301, -1040, -1040, -1040, 671, 731, -1040,
1867 -1040, 850, 11923, 12746, 9293, 12836, -1040, -1040, -1040, -1040,
1868 -1040, -1040, -1040, -1040, -1040, -1040, -1040, -1040, 931, 59,
1869 960, 340, 11057, -1040, -1040, -1040, -1040, -1040, -1040, -1040,
1870 -1040, -1040, 851, -1040, -1040, -1040, 990, -1040, 990, 11057,
1871 -1040, 855, 857, 963, -1040, -27, 11923, 858, -1040, -1040,
1872 -1040, 966, 887, 3887, -1040, -1040, -1040, 737, 663, -1040,
1873 759, 4622, 4622, 4622, 4622, 4769, 4475, 4622, 4622, 4328,
1874 4328, 849, 849, 3200, 1162, 1162, 886, 436, 436, 759,
1875 759, 759, 1842, 1842, 5232, 4203, 5526, 4350, -1040, 708,
1876 -1040, -27, 866, 588, -1040, 666, -1040, -1040, 4938, 990,
1877 1010, -1040, 5975, 1012, 6428, 990, 54, 990, 1003, 1018,
1878 144, 12926, 9293, 13016, -1040, 374, -1040, 731, -1040, -1040,
1879 -1040, 13106, 9293, 13196, 5824, 11309, -1040, -1040, -1040, -1040,
1880 -1040, -1040, 3529, -1040, 4034, -1040, -1040, -1040, 8625, 11057,
1881 -1040, 11057, 679, -1040, 655, 3369, 4497, -27, 688, 722,
1882 -1040, -1040, -1040, -1040, 9797, -1040, 10049, -1040, -1040, 11309,
1883 4181, -1040, -1040, 708, 708, -1040, -1040, 345, -1040, -1040,
1884 38, 11923, 850, 37, 470, -27, 271, 349, -1040, -1040,
1885 1007, -1040, 487, -1040, 877, -1040, -1040, 491, 884, -1040,
1886 759, -1040, -1040, 893, -1040, -1040, -1040, -1040, 895, 10553,
1887 9419, -1040, 850, 11923, 9419, 11183, 11057, 13286, 9293, 13376,
1888 12319, 918, 11183, 11183, -1040, 824, 889, 727, 9671, 11183,
1889 11183, -1040, -1040, 824, -1040, -1040, -1040, 10679, 738, -1040,
1890 574, -1040, 1033, -1040, -1040, -1040, -1040, -1040, -1040, 1018,
1891 990, -1040, 10805, 990, 72, 235, -27, 156, 312, 7284,
1892 799, 11309, 5824, 897, 470, -1040, -27, 990, 133, 921,
1893 8770, 95, 549, -1040, -1040, -1040, -1040, 11057, 11057, 733,
1894 11057, 11057, -27, 920, 133, -1040, -1040, 350, -1040, -1040,
1895 -1040, -1040, -1040, -1040, -1040, -1040, -1040, -1040, -1040, -1040,
1896 939, -1040, 939, 11057, 927, -1040, 850, -1040, 4181, 5379,
1897 5673, -27, 753, 786, -1040, -1040, 2945, 2945, 881, -1040,
1898 356, 631, -1040, 1024, 978, -1040, 952, -1040, -1040, 742,
1899 -1040, -1040, 341, -1040, -1040, -1040, -1040, -1040, -1040, -1040,
1900 -1040, -1040, 11057, -1040, -1040, -1040, -1040, -1040, -1040, 11183,
1901 -1040, -1040, -1040, -1040, -1040, 855, -1040, 989, -1040, -1040,
1902 -1040, 7284, -1040, -1040, -1040, -1040, 7284, 11309, 990, -1040,
1903 -1040, 990, -1040, -1040, 990, -1040, 11057, -1040, 26, -1040,
1904 332, 990, 5824, 799, 990, -1040, -1040, -1040, 2196, 5824,
1905 2402, -1040, -1040, -1040, 11057, -1040, 10049, -1040, 1834, -1040,
1906 1556, 7133, -1040, -1040, 5824, 944, 787, -1040, -1040, -1040,
1907 -1040, 12319, 12200, -1040, 577, 949, -1040, -1040, -1040, 1043,
1908 -1040, 12319, 2945, 2945, 881, 356, 790, 3608, 3608, 4181,
1909 -1040, -1040, 12045, 106, -1040, -1040, 6554, -1040, 106, -1040,
1910 -1040, -1040, -1040, -1040, 10931, 6126, -1040, 990, -1040, -1040,
1911 -1040, -1040, -1040, -1040, -1040, -1040, -1040, -1040, 1151, -1040,
1912 -1040, -1040, -1040, -1040, -1040, -27, -27, -1040, -1040, 973,
1913 -1040, 954, 11057, -1040, 956, 546, 965, 965, -1040, 967,
1914 1049, 968, 1066, -1040, 990, 799, 974, 921, 2402, -1040,
1915 -1040, -1040, -1040, -27, 991, 995, 979, 12167, -1040, 981,
1916 965, 965, -1040, 982, 992, -1040, 999, -1040, -1040, 3,
1917 264, 355, -27, 12286, -1040, 1001, -1040, -1040, -27, 1011,
1918 -1040, 12319, -1040, -1040, 744, -1040, -1040, -1040, -1040, -1040,
1919 -1040, -1040, -1040, -1040, -1040, -27, -27, -27, -27, 1068,
1920 -1040, 743, 198, 203, 213, 5824, 1133, 5975, 3608, 11057,
1921 -1040, 955, -1040, 1151, 1079, -1040, 1022, -27, 1025, -1040,
1922 -1040, -1040, 11057, 2196, -1040, -1040, 714, -1040, -1040, -1040,
1923 -1040, 243, -1040, -1040, 2402, -1040, -1040, 1417, -1040, -1040,
1924 -1040, -1040, 2402, 5824, -27, 291, 7410, 1027, -1040, 12167,
1925 2402, -1040, 1108, 748, 714, -1040, -1040, -1040, 2402, -1040,
1926 1417, -1040, 1089, -1040, 1028, 12319, -1040, 307, 978, 1031,
1927 -1040, 652, -1040, 577, 978, -1040, -1040, 800, -1040, -1040,
1928 -1040, -1040, 248, 13466, 9293, 13556, 1010, -1040, 574, 106,
1929 801, 377, -1040, -1040, -1040, -1040, -1040, -1040, -27, -1040,
1930 1151, -1040, 1097, -1040, -1040, -27, -1040, 1032, 1037, -1040,
1931 1121, 965, -1040, 1040, -1040, 1041, -1040, 1040, 990, 1046,
1932 5824, 7133, -1040, 1069, -1040, 748, -1040, 1051, 1053, -1040,
1933 13646, -1040, 965, 1054, -1040, 1067, 1054, -1040, 542, -1040,
1934 -1040, 12319, 1071, -1040, 1072, 12319, -1040, -1040, -1040, -1040,
1935 -1040, 61, 202, -27, 286, 313, -1040, -1040, -1040, 11309,
1936 11309, 12200, -1040, -1040, 1073, 1074, -1040, 2402, -1040, 1417,
1937 -1040, -1040, 1417, -1040, 1417, -1040, -1040, -1040, -1040, 990,
1938 1048, -1040, 2402, -1040, 1417, -1040, 1075, 1076, -1040, 1417,
1939 -1040, 1417, -1040, -1040, 1089, -1040, 1071, 12319, 12319, 1071,
1940 321, -1040, -1040, -1040, -1040, 1097, 1097, 1040, 1080, 1040,
1941 1040, -1040, -1040, 1054, 1087, 1054, 1054, -1040, -1040, 1071,
1942 -1040, 1074, -1040, 1417, -1040, -1040, -1040, -1040, 1417, -1040,
1943 -1040, -1040, 6277, 1040, 1054, 576, -1040, -1040, -1040, -1040,
1944 -1040
1945};
1946
1947 /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
1948 Performed when YYTABLE does not specify something else to do. Zero
1949 means the default is an error. */
1950static const yytype_int16 yydefact[] =
1951{
1952 2, 0, 0, 1, 0, 362, 363, 364, 0, 355,
1953 356, 357, 360, 358, 359, 361, 350, 351, 352, 353,
1954 373, 279, 279, 637, 636, 638, 639, 749, 0, 749,
1955 0, 0, 641, 640, 642, 731, 733, 633, 632, 732,
1956 635, 627, 628, 629, 630, 578, 647, 648, 0, 0,
1957 0, 0, 0, 0, 306, 761, 761, 95, 326, 598,
1958 598, 600, 602, 0, 0, 0, 0, 0, 0, 0,
1959 3, 747, 6, 9, 35, 40, 52, 67, 279, 66,
1960 0, 83, 0, 87, 97, 0, 61, 235, 250, 0,
1961 304, 0, 0, 63, 63, 747, 0, 0, 0, 0,
1962 315, 68, 324, 293, 294, 577, 579, 295, 296, 297,
1963 299, 298, 300, 576, 617, 618, 575, 625, 643, 644,
1964 301, 0, 302, 71, 5, 8, 176, 187, 177, 200,
1965 173, 193, 183, 182, 203, 204, 198, 181, 180, 175,
1966 201, 205, 206, 185, 174, 188, 192, 194, 186, 179,
1967 195, 202, 197, 196, 189, 199, 184, 172, 191, 190,
1968 171, 178, 169, 170, 166, 167, 168, 126, 128, 127,
1969 161, 162, 157, 139, 140, 141, 148, 145, 147, 142,
1970 143, 163, 164, 149, 150, 154, 158, 144, 146, 136,
1971 137, 138, 151, 152, 153, 155, 156, 159, 160, 165,
1972 131, 133, 28, 129, 130, 132, 0, 0, 0, 0,
1973 0, 0, 0, 598, 0, 274, 0, 257, 284, 81,
1974 278, 761, 0, 643, 644, 0, 302, 761, 725, 82,
1975 749, 79, 0, 761, 449, 78, 749, 750, 0, 0,
1976 23, 247, 0, 10, 0, 350, 351, 318, 450, 0,
1977 229, 0, 315, 230, 220, 221, 312, 0, 21, 0,
1978 0, 747, 17, 20, 749, 85, 16, 308, 749, 0,
1979 754, 754, 258, 0, 0, 754, 723, 749, 0, 0,
1980 0, 93, 354, 0, 103, 104, 111, 428, 622, 621,
1981 623, 620, 0, 619, 0, 0, 0, 585, 594, 590,
1982 596, 626, 56, 241, 242, 757, 758, 4, 759, 748,
1983 0, 0, 0, 0, 0, 0, 0, 365, 454, 443,
1984 72, 458, 323, 366, 458, 439, 0, 99, 0, 91,
1985 88, 0, 57, 0, 0, 0, 0, 0, 253, 254,
1986 0, 0, 0, 0, 218, 219, 0, 0, 0, 251,
1987 252, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1988 0, 743, 744, 0, 761, 0, 0, 62, 0, 0,
1989 0, 0, 0, 747, 334, 748, 0, 384, 383, 0,
1990 0, 643, 644, 302, 121, 122, 0, 0, 124, 651,
1991 0, 643, 644, 302, 342, 196, 189, 199, 184, 166,
1992 167, 168, 126, 127, 721, 344, 720, 0, 80, 746,
1993 745, 0, 325, 580, 0, 0, 134, 728, 312, 285,
1994 730, 281, 0, 0, 0, 0, 275, 283, 0, 761,
1995 0, 0, 0, 0, 276, 749, 0, 317, 280, 679,
1996 749, 270, 761, 749, 761, 269, 749, 322, 55, 25,
1997 27, 26, 0, 319, 0, 0, 0, 0, 0, 0,
1998 19, 0, 749, 310, 15, 748, 84, 749, 307, 313,
1999 756, 755, 259, 756, 261, 314, 724, 0, 110, 626,
2000 101, 96, 0, 0, 761, 0, 327, 429, 604, 624,
2001 607, 605, 599, 581, 582, 601, 583, 603, 0, 0,
2002 0, 0, 0, 760, 7, 29, 30, 31, 32, 33,
2003 53, 54, 0, 455, 454, 73, 0, 459, 0, 0,
2004 36, 289, 0, 39, 288, 749, 0, 89, 100, 51,
2005 41, 49, 0, 262, 284, 207, 37, 0, 302, 58,
2006 227, 234, 236, 237, 238, 245, 246, 239, 240, 216,
2007 217, 243, 244, 749, 231, 232, 233, 222, 223, 224,
2008 225, 226, 255, 256, 734, 736, 735, 737, 448, 279,
2009 446, 749, 761, 734, 736, 735, 737, 447, 279, 0,
2010 761, 375, 0, 374, 0, 0, 0, 0, 332, 0,
2011 312, 0, 761, 0, 63, 340, 121, 122, 123, 649,
2012 338, 0, 761, 0, 0, 0, 345, 741, 742, 347,
2013 734, 735, 279, 42, 262, 208, 48, 215, 0, 0,
2014 727, 0, 286, 282, 761, 734, 735, 749, 734, 735,
2015 726, 316, 751, 264, 271, 266, 273, 321, 24, 0,
2016 248, 11, 34, 0, 761, 214, 22, 86, 18, 309,
2017 754, 0, 94, 738, 109, 749, 734, 735, 430, 608,
2018 0, 584, 0, 587, 0, 592, 589, 0, 0, 593,
2019 228, 452, 456, 0, 372, 453, 460, 438, 292, 0,
2020 0, 98, 92, 0, 0, 0, 0, 0, 761, 0,
2021 0, 0, 0, 0, 445, 76, 0, 451, 271, 0,
2022 0, 268, 444, 74, 267, 305, 367, 761, 761, 567,
2023 761, 376, 761, 330, 378, 64, 377, 331, 469, 0,
2024 0, 369, 0, 0, 738, 311, 749, 734, 735, 0,
2025 0, 0, 0, 121, 122, 125, 749, 0, 749, 655,
2026 0, 440, 69, 135, 729, 287, 277, 0, 0, 451,
2027 0, 0, 749, 761, 749, 260, 102, 451, 431, 609,
2028 613, 614, 615, 606, 616, 586, 588, 595, 591, 597,
2029 761, 70, 761, 0, 290, 38, 90, 50, 263, 734,
2030 735, 749, 734, 735, 561, 565, 0, 0, 0, 506,
2031 500, 503, 559, 0, 59, 486, 488, 490, 493, 540,
2032 545, 546, 547, 550, 551, 552, 553, 554, 556, 555,
2033 557, 558, 0, 47, 212, 46, 213, 77, 752, 0,
2034 44, 210, 45, 211, 75, 568, 569, 761, 570, 368,
2035 370, 0, 12, 14, 574, 371, 0, 0, 0, 379,
2036 381, 0, 65, 470, 0, 336, 0, 462, 0, 335,
2037 451, 0, 0, 0, 0, 451, 343, 722, 678, 0,
2038 678, 348, 441, 442, 0, 265, 272, 320, 678, 610,
2039 749, 0, 419, 418, 0, 291, 451, 548, 549, 122,
2040 563, 0, 0, 502, 0, 0, 505, 428, 562, 0,
2041 60, 0, 543, 544, 0, 492, 491, 0, 0, 249,
2042 43, 209, 0, 0, 572, 573, 0, 382, 0, 328,
2043 329, 471, 333, 463, 0, 0, 337, 0, 650, 339,
2044 685, 682, 681, 680, 683, 691, 700, 679, 0, 712,
2045 701, 716, 715, 711, 677, 749, 749, 684, 686, 687,
2046 689, 663, 693, 698, 761, 704, 761, 761, 709, 663,
2047 714, 663, 0, 661, 0, 0, 663, 655, 678, 432,
2048 435, 611, 417, 749, 0, 687, 402, 695, 696, 761,
2049 761, 761, 707, 402, 402, 400, 422, 457, 461, 749,
2050 520, 508, 749, 509, 515, 0, 535, 598, 749, 526,
2051 531, 534, 528, 530, 538, 753, 560, 487, 489, 541,
2052 542, 564, 499, 496, 598, 749, 749, 749, 749, 0,
2053 571, 0, 643, 644, 302, 0, 761, 0, 0, 0,
2054 464, 761, 341, 0, 395, 387, 389, 749, 392, 385,
2055 652, 654, 0, 0, 670, 692, 0, 658, 719, 702,
2056 703, 0, 660, 659, 0, 673, 713, 0, 675, 717,
2057 346, 656, 0, 0, 749, 0, 0, 0, 420, 0,
2058 408, 410, 0, 694, 0, 397, 399, 398, 0, 413,
2059 0, 415, 0, 507, 518, 0, 501, 513, 524, 510,
2060 516, 0, 504, 527, 533, 539, 537, 0, 494, 495,
2061 497, 498, 312, 0, 761, 0, 761, 13, 761, 0,
2062 478, 481, 484, 485, 465, 467, 468, 466, 749, 394,
2063 0, 688, 0, 705, 662, 749, 690, 663, 663, 699,
2064 704, 761, 718, 663, 710, 663, 687, 663, 0, 0,
2065 0, 0, 433, 0, 421, 706, 401, 402, 402, 312,
2066 0, 697, 761, 402, 708, 402, 402, 426, 749, 424,
2067 427, 0, 521, 522, 511, 0, 517, 536, 532, 525,
2068 529, 738, 311, 749, 734, 735, 566, 380, 472, 0,
2069 0, 482, 386, 388, 390, 393, 653, 0, 666, 0,
2070 668, 657, 0, 674, 0, 671, 676, 349, 434, 0,
2071 0, 612, 0, 405, 0, 407, 738, 311, 396, 0,
2072 414, 0, 411, 416, 0, 423, 519, 0, 0, 514,
2073 451, 473, 479, 480, 483, 0, 0, 663, 663, 663,
2074 663, 437, 436, 402, 402, 402, 402, 425, 523, 512,
2075 474, 391, 667, 0, 664, 669, 672, 406, 0, 403,
2076 409, 412, 0, 663, 402, 761, 665, 404, 476, 477,
2077 475
2078};
2079
2080 /* YYPGOTO[NTERM-NUM]. */
2081static const yytype_int16 yypgoto[] =
2082{
2083 -1040, -1040, -1040, 972, -1040, 19, 754, -545, -1040, -51,
2084 -1040, 756, -1040, 68, -1040, -264, -308, -83, -1040, -1040,
2085 -1040, -66, -75, -1040, -1040, -25, -1040, -323, 645, 4,
2086 1126, -154, 7, -26, -1040, -391, 11, 2057, -345, 1127,
2087 -58, -11, -1040, -1040, 2, -1040, 2889, -1040, 1147, -1040,
2088 1411, -1040, 110, 60, 630, -350, 100, -15, -1040, -381,
2089 -205, 39, -1040, -307, -32, -1040, -1040, -1040, -1040, -1040,
2090 -1040, -1040, -1040, -1040, -1040, -1040, -1040, -1040, -1040, 32,
2091 -1040, -1040, -1040, -1040, -1040, -1040, -1040, -1040, -1040, -1040,
2092 -1040, -1040, -1040, -1040, -1040, 538, -1040, 331, 1177, -364,
2093 -1040, 146, -694, -1040, -1027, -1039, 230, 152, 393, 308,
2094 -1040, 501, -1040, -886, -1040, 74, 389, -1040, -1040, -1040,
2095 -1040, -1040, -1040, -1040, 537, -1040, -1040, -96, 766, -1040,
2096 -1040, -1040, 962, -1040, -1040, -1040, -1040, -688, -1040, 42,
2097 -1040, -1040, -1040, -1040, -1040, -1040, -1040, -1040, -1040, -603,
2098 -1040, -1040, -1040, -1040, 399, -1040, -1040, -1040, -860, -1040,
2099 274, -991, -605, -822, -1040, 206, -1040, 210, 218, -1040,
2100 -643, -1040, 414, -1040, -1040, 208, -1040, -1040, 289, 373,
2101 675, -1040, 1197, 1459, 1483, 1523, -1040, 806, 1936, -1040,
2102 1965, 2010, -1040, -1040, -56, -1040, -1040, -200, -1040, -1040,
2103 -1040, -1040, -1040, -1040, -1040, 5, -1040, -1040, -1040, -1040,
2104 -21, 1967, 1113, 1209, 1908, 1709, -1040, -1040, 352, -1040,
2105 -770, 412, -776, -607, -1001, -829, 207, -915, -287, -62,
2106 275, 249, -1040, -1040, -489, -327, 168, -975, -957, 256,
2107 -879, -1040, -729, -1040, 120, -748, -1040, -1040, -1040, 92,
2108 -393, -1040, -318, -1040, -1040, -86, -1040, -37, 253, 848,
2109 -577, 329, -243, -60, -55, -2
2110};
2111
2112 /* YYDEFGOTO[NTERM-NUM]. */
2113static const yytype_int16 yydefgoto[] =
2114{
2115 -1, 1, 2, 70, 71, 72, 243, 579, 906, 580,
2116 261, 262, 461, 263, 452, 74, 530, 75, 539, 690,
2117 890, 368, 370, 371, 842, 76, 77, 515, 249, 79,
2118 80, 264, 81, 82, 83, 481, 84, 216, 388, 389,
2119 200, 201, 202, 618, 567, 204, 86, 454, 359, 87,
2120 218, 269, 535, 568, 702, 440, 441, 231, 232, 220,
2121 426, 572, 523, 524, 88, 366, 268, 467, 639, 287,
2122 719, 589, 732, 730, 604, 606, 739, 740, 957, 251,
2123 90, 91, 92, 93, 94, 95, 96, 97, 98, 99,
2124 321, 324, 707, 831, 722, 836, 837, 675, 252, 582,
2125 715, 838, 839, 380, 1025, 1026, 1027, 1028, 1136, 1061,
2126 963, 871, 872, 964, 1148, 1149, 486, 487, 658, 758,
2127 868, 1055, 959, 1132, 325, 101, 102, 322, 512, 513,
2128 672, 770, 516, 517, 676, 772, 848, 723, 1107, 720,
2129 843, 911, 1018, 1211, 1230, 1242, 1250, 1099, 1100, 1078,
2130 795, 796, 897, 898, 797, 882, 884, 881, 982, 983,
2131 984, 1152, 985, 988, 989, 990, 991, 992, 993, 798,
2132 799, 887, 800, 801, 802, 708, 827, 903, 833, 103,
2133 104, 105, 106, 107, 108, 109, 498, 662, 110, 500,
2134 111, 112, 499, 501, 292, 295, 296, 492, 660, 659,
2135 759, 869, 961, 1056, 763, 113, 114, 293, 115, 116,
2136 117, 223, 224, 120, 225, 226, 600, 731, 859, 860,
2137 1114, 1034, 935, 443, 937, 938, 1126, 940, 956, 942,
2138 943, 968, 969, 944, 945, 946, 947, 948, 972, 973,
2139 949, 950, 951, 952, 953, 1037, 407, 605, 274, 444,
2140 228, 123, 643, 570, 609, 603, 411, 307, 436, 437,
2141 697, 886, 472, 583, 375, 266
2142};
2143
2144 /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
2145 positive, shift that token. If negative, reduce the rule whose
2146 number is the opposite. If YYTABLE_NINF, syntax error. */
2147static const yytype_int16 yytable[] =
2148{
2149 124, 291, 260, 365, 294, 584, 412, 235, 367, 367,
2150 203, 308, 367, 205, 571, 410, 309, 240, 841, 372,
2151 215, 215, 434, 125, 536, 282, 369, 752, 474, 373,
2152 203, 844, 476, 205, 89, 308, 89, 1005, 1007, 581,
2153 630, 405, 598, 302, 623, 569, 301, 578, 222, 222,
2154 749, 282, 623, 272, 276, 221, 221, 330, 374, 737,
2155 265, 203, -107, 320, 282, 282, 282, 529, 281, 1124,
2156 73, 1150, 73, 1175, -116, 1006, 1008, 1057, 757, 627,
2157 630, 714, 234, 1173, 955, 89, 89, 794, 934, 283,
2158 934, 652, 960, 612, 270, 495, 497, -116, 934, 1029,
2159 222, 203, -637, 889, 215, 462, 613, 616, 227, 227,
2160 569, 1144, 578, 470, 3, 283, 219, 229, 1116, 581,
2161 471, 317, 267, 222, 222, 664, 237, 222, 379, 390,
2162 390, -637, 222, -354, 655, 682, 430, 1116, 319, 221,
2163 644, 974, -112, 877, 878, 1116, -636, 271, 275, 850,
2164 529, 529, -113, 446, 1117, 448, 237, 422, 260, 855,
2165 1206, -354, -354, -107, 1209, 458, -120, 644, 1129, -119,
2166 315, 316, 914, 1117, 525, -636, 1231, 305, 665, 306,
2167 256, -115, 1054, -107, 473, -734, -107, 854, 934, 1173,
2168 -107, 471, 227, 456, 1029, 1109, 1103, 485, 1042, 1043,
2169 408, 308, 1124, 1150, 876, 305, 465, 306, 260, -734,
2170 -354, -112, -116, 883, -116, -118, -113, 1229, -107, 427,
2171 -734, 1065, 1066, 1067, 464, 427, -120, 367, 367, 367,
2172 367, 445, 510, 511, 215, 1144, 215, 215, 318, 434,
2173 124, 89, 726, 630, 505, 506, 507, 508, 282, 999,
2174 1000, 936, 736, 623, 480, 623, 735, 305, 479, 306,
2175 -118, -119, 222, -103, 222, 222, 265, 1116, 222, 221,
2176 222, 221, 442, -104, 89, 644, 89, 260, 979, 981,
2177 238, 1029, 241, 1029, 1116, 644, 237, -111, 367, 89,
2178 -110, 89, 776, 593, 981, 981, -106, 282, 663, -115,
2179 663, 520, -106, 595, 1118, 586, 531, 917, 234, 319,
2180 73, 1214, 283, 308, 954, 1125, 1074, 623, 1002, 585,
2181 1130, 587, 227, 1118, 227, 460, -117, 1105, 504, 978,
2182 435, 1138, 438, 1106, -114, 265, 588, -117, 781, 1145,
2183 527, 89, 222, 222, 222, 222, 89, 222, 222, -112,
2184 -735, -112, 931, -118, -113, -118, -113, -114, 222, 1154,
2185 89, 283, 445, 537, -120, 522, -120, 576, 215, 569,
2186 522, 578, 817, 1181, -108, -105, 932, 73, 1079, 242,
2187 824, -109, 509, -735, 813, 815, 1029, 1029, 1084, 531,
2188 531, 820, 822, 317, 1198, 994, 222, -106, 89, -119,
2189 826, -119, 89, 222, 89, 1076, 668, 755, 994, 994,
2190 1075, 315, 316, 576, 1131, 1101, 361, -106, 222, 746,
2191 -106, 529, -645, 244, -106, 577, 1115, 445, 529, 529,
2192 1090, 1091, 576, 215, 297, 529, 529, -115, 894, -115,
2193 427, 638, 427, 880, 362, 363, 537, 537, 1218, -112,
2194 282, 689, -645, 1155, 203, 889, 480, 205, -108, 669,
2195 576, 222, 766, 1224, -117, -731, -117, 766, 298, -103,
2196 1153, -84, -114, 630, -114, -108, -105, 889, -105, -112,
2197 338, 339, 445, -638, 915, 623, 895, 576, 215, 896,
2198 577, -98, 361, 364, 282, -108, -105, 89, -108, -105,
2199 480, -524, -108, -105, 488, 496, -749, -631, 1128, 237,
2200 318, 900, -638, 333, 283, 233, 222, 624, 577, 729,
2201 362, 409, 738, 1171, 615, 617, 716, 349, 350, 994,
2202 477, 710, 236, 712, -646, -631, -631, 237, -311, 1015,
2203 299, 615, 617, 970, 1017, 577, 1153, 1120, 746, 1001,
2204 1153, 1248, -646, 488, 695, 529, 754, 488, 283, 490,
2205 491, -113, 650, 703, 361, 300, -311, -311, 981, 645,
2206 427, 941, 356, 357, 358, 1120, 704, 323, 709, -113,
2207 1039, -104, -731, 966, -631, 1189, 1210, -731, 835, 830,
2208 445, 830, 362, 428, 994, 576, 215, 742, 1040, 361,
2209 445, 718, 1228, 1153, 361, 576, 215, 743, 490, 491,
2210 704, -639, 490, 491, 89, -311, 89, 415, -735, 282,
2211 203, 326, 427, 205, 222, 756, -641, 362, 457, 694,
2212 -643, 327, 362, 483, 222, 986, 89, 222, 701, 765,
2213 -639, 429, 704, 768, -120, 862, 331, 78, 367, 78,
2214 459, 282, 432, 577, 926, -641, 60, 480, -643, -643,
2215 531, 78, 78, 577, -111, 853, 488, 531, 531, 414,
2216 852, 222, 701, -644, 531, 531, 429, -119, 851, -120,
2217 -640, 484, 861, 283, 459, 930, 445, 699, 1204, 987,
2218 418, 576, 215, 416, -642, 237, -732, -110, 78, 78,
2219 -631, -644, -644, 694, 701, 828, 834, -643, 840, -640,
2220 840, -119, 89, 78, -115, 283, 89, 537, 488, 489,
2221 222, 490, 491, -642, 537, 537, 753, -302, 236, -631,
2222 361, 537, 537, 970, -106, 1168, 78, 78, -634, 423,
2223 78, 970, 203, 970, 1163, 78, 522, 829, 775, 577,
2224 -644, 427, 777, 830, 367, -302, -302, 1123, 362, 591,
2225 1127, 89, 415, 222, 89, 700, -634, -634, 873, 361,
2226 873, 908, 925, 490, 491, -749, 1157, 644, 1085, 424,
2227 905, 1143, 488, 1146, 237, 907, 425, 750, -634, -120,
2228 753, 926, -117, 918, 531, 431, 1086, 362, 601, -312,
2229 607, 433, 814, 816, -302, 361, 691, 592, 967, 821,
2230 823, 361, -108, -732, -115, -634, 361, -634, -732, 453,
2231 977, 751, 930, 931, 696, 904, 819, -312, -312, 608,
2232 892, 893, 864, 362, 687, 493, 333, 490, 491, 362,
2233 1093, 1169, 1170, 488, 362, 1140, 602, 932, -117, 677,
2234 230, 537, 699, -114, 78, 1016, 233, 814, 816, -114,
2235 821, 823, 463, 89, 1021, 970, 488, 970, 89, 222,
2236 282, -83, 970, -105, 970, 78, -312, 78, 78, -115,
2237 696, 78, 688, 78, 89, 700, 819, 78, 1094, 78,
2238 1217, 89, 1219, 602, 478, 1051, 493, 1220, 490, 491,
2239 469, 619, 78, 89, 78, 1223, 89, 1225, 696, 475,
2240 705, 970, -117, -114, 1226, 482, 713, 449, 717, 493,
2241 502, 490, 491, -738, 1157, 1095, 333, 450, 451, 901,
2242 514, 1081, 596, 596, 1011, 282, 597, 879, 89, -749,
2243 528, 590, 1038, 237, 1038, 1038, 1243, 89, 1087, 503,
2244 305, 1244, 306, 594, 78, 78, 78, 78, 78, 78,
2245 78, 78, 599, 333, 1096, -738, 1098, 1038, 1038, 1038,
2246 830, 78, 721, 78, 901, 632, 78, 488, 641, 696,
2247 346, 347, 634, 354, 355, 356, 357, 358, 636, 696,
2248 975, 642, -98, -738, -738, 671, 651, 488, 967, 1063,
2249 674, -284, 967, 679, 683, 1133, 967, 680, 967, 78,
2250 684, 78, 698, 685, 834, 78, 78, 78, 706, 840,
2251 354, 355, 356, 357, 358, 711, 488, 282, 718, 767,
2252 494, 78, 490, 491, 696, 721, 769, 771, 971, 818,
2253 -738, -285, -738, 696, 885, -734, 812, 89, 830, 89,
2254 661, 845, 490, 491, 849, 41, 42, 43, 44, 78,
2255 78, 760, 761, 803, 762, 939, 866, 939, 856, 858,
2256 870, 46, 47, -286, 78, 939, 888, 965, 889, 666,
2257 1190, 490, 491, 891, 447, 89, 367, 367, 89, 902,
2258 -287, 1135, 445, 995, 709, 784, 840, 576, 215, 1032,
2259 1033, 1046, 1036, 1212, 1213, 310, 311, 312, 313, 314,
2260 78, 1041, 466, 1044, 1047, 119, 468, 119, 1049, 1038,
2261 1052, 1059, 1058, 976, 1092, 1060, 222, 1064, 1068, 78,
2262 967, 920, 967, 921, 922, 923, 924, 967, 1070, 967,
2263 1038, 1147, 829, 921, 922, 923, 924, 1080, 696, 920,
2264 1072, 921, 922, 923, 924, 577, 1122, 1083, 1134, 803,
2265 803, 1122, 89, 89, 1139, 939, 119, 119, 1110, 909,
2266 285, 1112, 910, 1040, 1151, 912, 967, 1156, 1177, 100,
2267 975, 100, 916, 1179, 1122, 919, 1182, 1184, 975, 1191,
2268 975, 1245, 1222, 100, 100, 1188, 285, 1192, 1023, 1194,
2269 1199, 222, 222, 920, 1121, 921, 922, 923, 924, 382,
2270 392, 392, 392, 1201, 455, 646, 976, 1207, 1208, 1215,
2271 1216, 648, 377, -734, -735, 394, 1233, 78, 971, 78,
2272 100, 100, 1142, 1238, 360, 696, 971, 78, 971, 333,
2273 939, 885, 741, 840, 1167, 100, 832, 78, 1022, 78,
2274 78, 939, 1023, 1108, 803, 803, 346, 347, 1024, 939,
2275 696, 696, 1174, 962, 803, 803, 803, 965, 100, 100,
2276 803, 803, 100, 874, 89, 965, 996, 100, 1227, 863,
2277 673, 1069, 1071, 631, 78, 1050, 518, 1249, 633, 1158,
2278 998, 635, 1102, 1159, 637, 353, 354, 355, 356, 357,
2279 358, 1160, 413, 997, 1166, 1097, 667, 976, 406, 1053,
2280 647, 1119, 975, 1141, 975, 649, 1137, 1082, 0, 975,
2281 0, 975, 119, 0, 0, 78, 0, 0, 0, 78,
2282 78, 0, 0, 78, 0, 0, 0, 78, 78, 0,
2283 0, 0, 0, 0, 78, 78, 0, 0, 0, 0,
2284 0, 0, 0, 0, 0, 119, 803, 119, 975, 0,
2285 971, 1045, 971, 1048, 803, 804, 0, 971, 0, 971,
2286 119, 0, 119, 681, 78, 0, 78, 78, 0, 0,
2287 0, 0, 0, 0, 939, 0, 100, 0, 0, 0,
2288 0, 803, 0, 285, 0, 0, 0, 0, 0, 965,
2289 0, 1205, 0, 0, 0, 0, 971, 100, 0, 100,
2290 100, 0, 0, 100, 0, 100, 696, 0, 0, 100,
2291 0, 100, 119, 0, 0, 0, 0, 119, 0, 0,
2292 0, 0, 0, 0, 100, 0, 100, 0, 0, 0,
2293 0, 119, 285, 0, 0, 1193, 1195, 0, 803, 0,
2294 0, 1200, 0, 1202, 1203, 0, 0, 0, 0, 1187,
2295 0, 804, 804, 0, 78, 0, 0, 273, 0, 920,
2296 0, 921, 922, 923, 924, 925, 78, 0, 0, 119,
2297 0, 78, 78, 119, 0, 119, 100, 100, 100, 100,
2298 100, 100, 100, 100, 926, 0, 0, 78, 0, 0,
2299 0, 0, 0, 100, 78, 100, 0, 0, 100, 0,
2300 0, 0, 0, 0, 0, 0, 78, 0, 928, 78,
2301 1221, 0, 0, 0, 803, 930, 931, 0, 803, 1178,
2302 1180, 1237, 1239, 1240, 1241, 1183, 0, 1185, 0, 1186,
2303 0, 100, 0, 100, 803, 0, 0, 100, 100, 100,
2304 932, 78, 1247, 0, 0, 0, 804, 804, 0, 0,
2305 78, 0, 0, 100, 0, 0, 804, 804, 804, 0,
2306 0, 0, 804, 804, 0, 0, 0, 0, 119, 0,
2307 803, 803, 0, 0, 0, 0, 857, 0, 0, 0,
2308 0, 100, 100, 0, 0, 285, 0, 0, 0, 0,
2309 865, 0, 867, 0, 0, 0, 100, 0, 920, 0,
2310 921, 922, 923, 924, 925, 0, 332, 0, 417, 0,
2311 0, 419, 420, 421, 0, 0, 0, 0, 0, 1232,
2312 1234, 1235, 1236, 926, 0, 0, 0, 0, 0, 285,
2313 0, 0, 100, 0, 0, 0, 0, 0, 0, 0,
2314 0, 0, 0, 0, 0, 1246, 0, 928, 804, 0,
2315 78, 100, 78, 929, 930, 931, 804, 0, 333, 334,
2316 335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
2317 345, 0, 0, 0, 0, 346, 347, 0, 0, 932,
2318 0, 0, 933, 804, 0, 119, 0, 119, 78, 0,
2319 0, 78, 0, 0, 0, 0, 0, 0, 0, 237,
2320 0, 122, 0, 122, 0, 0, 0, 119, 348, 0,
2321 349, 350, 351, 352, 353, 354, 355, 356, 357, 358,
2322 0, 0, 0, 0, 0, 0, 0, 521, 0, 78,
2323 0, 0, 534, 0, 1003, 0, 0, 0, 0, 0,
2324 804, 0, 0, 0, 0, 0, 0, 0, 0, 100,
2325 0, 100, 122, 122, 285, 0, 286, 0, 0, 100,
2326 0, 0, 0, 0, 0, 78, 78, 0, 0, 100,
2327 0, 100, 100, 1030, 1031, 0, 0, 0, 0, 0,
2328 0, 0, 286, 119, 0, 0, 285, 119, 0, 0,
2329 0, 0, 0, 811, 0, 383, 393, 393, 0, 0,
2330 0, 0, 0, 0, 78, 78, 100, 0, 0, 0,
2331 0, 0, 0, 0, 0, 0, 804, 1073, 0, 0,
2332 804, 0, 0, 0, 0, 620, 622, 0, 0, 0,
2333 0, 0, 119, 0, 273, 119, 804, 0, 0, 0,
2334 0, 0, 0, 1088, 1089, 0, 0, 100, 0, 0,
2335 0, 100, 100, 0, 0, 100, 0, 0, 0, 100,
2336 100, 0, 0, 0, 0, 1111, 100, 100, 0, 0,
2337 0, 622, 804, 804, 273, 0, 920, 78, 921, 922,
2338 923, 924, 925, 0, 0, 0, 0, 0, 0, 811,
2339 811, 0, 0, 0, 0, 0, 100, 0, 100, 100,
2340 121, 926, 121, 0, 0, 0, 0, 0, 122, 333,
2341 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2342 678, 0, 0, 0, 0, 928, 346, 347, 0, 0,
2343 0, 929, 930, 931, 119, 0, 0, 0, 0, 119,
2344 0, 122, 0, 122, 0, 0, 1172, 0, 0, 0,
2345 0, 121, 121, 1176, 0, 119, 122, 932, 122, 118,
2346 933, 118, 119, 351, 352, 353, 354, 355, 356, 357,
2347 358, 0, 958, 0, 119, 0, 0, 119, 0, 286,
2348 0, 0, 0, 0, 811, 811, 100, 0, 0, 0,
2349 0, 0, 0, 0, 811, 811, 811, 0, 100, 0,
2350 811, 811, 0, 100, 100, 1013, 0, 0, 122, 119,
2351 118, 118, 0, 122, 284, 0, 0, 0, 119, 100,
2352 744, 0, 745, 0, 0, 0, 100, 122, 286, 0,
2353 538, 0, 0, 0, 0, 622, 0, 273, 100, 0,
2354 284, 100, 0, 0, 0, 0, 0, 0, 0, 85,
2355 0, 85, 0, 381, 391, 391, 391, 0, 0, 0,
2356 0, 0, 0, 0, 0, 122, 0, 0, 0, 122,
2357 392, 122, 0, 100, 0, 0, 0, 0, 0, 0,
2358 774, 0, 100, 0, 0, 0, 811, 0, 0, 0,
2359 0, 0, 0, 0, 811, 0, 0, 0, 0, 622,
2360 85, 85, 0, 0, 0, 0, 0, 121, 825, 0,
2361 0, 0, 0, 538, 538, 0, 0, 0, 119, 0,
2362 119, 811, 0, 847, 0, 0, 0, 0, 0, 0,
2363 0, 0, 0, 0, 0, 0, 0, 0, 0, 805,
2364 121, 0, 121, 378, 0, 0, 0, 0, 0, 0,
2365 0, 0, 0, 0, 0, 121, 119, 121, 0, 119,
2366 0, 0, 392, 806, 122, 0, 118, 0, 0, 0,
2367 0, 0, 0, 0, 875, 0, 0, 0, 811, 0,
2368 0, 286, 100, 0, 100, 0, 0, 0, 0, 0,
2369 0, 0, 0, 0, 0, 0, 0, 0, 0, 118,
2370 0, 118, 0, 807, 0, 0, 0, 121, 0, 0,
2371 0, 0, 121, 0, 118, 0, 118, 0, 0, 0,
2372 100, 0, 0, 100, 0, 286, 121, 0, 0, 121,
2373 0, 0, 0, 119, 119, 805, 805, 284, 920, 0,
2374 921, 922, 923, 924, 925, 0, 0, 913, 0, 0,
2375 0, 0, 0, 0, 811, 0, 85, 0, 811, 806,
2376 806, 100, 0, 926, 121, 0, 118, 273, 121, 0,
2377 121, 118, 0, 0, 811, 0, 0, 927, 0, 0,
2378 0, 122, 0, 122, 0, 118, 284, 928, 0, 85,
2379 0, 85, 0, 929, 930, 931, 0, 100, 100, 807,
2380 807, 0, 0, 122, 85, 0, 85, 0, 0, 0,
2381 811, 811, 121, 121, 0, 1020, 0, 0, 0, 932,
2382 0, 0, 933, 118, 0, 0, 0, 118, 0, 118,
2383 805, 805, 0, 0, 0, 0, 100, 100, 0, 0,
2384 805, 805, 805, 1035, 0, 119, 805, 805, 0, 0,
2385 286, 0, 0, 0, 806, 806, 85, 0, 0, 764,
2386 0, 85, 0, 121, 806, 806, 806, 0, 0, 0,
2387 806, 806, 0, 0, 0, 85, 0, 0, 532, 122,
2388 0, 0, 286, 122, 538, 0, 0, 0, 0, 0,
2389 0, 538, 538, 0, 807, 807, 0, 0, 538, 538,
2390 0, 0, 0, 0, 807, 807, 807, 0, 0, 100,
2391 807, 807, 0, 85, 0, 0, 0, 85, 0, 85,
2392 1104, 0, 118, 0, 0, 0, 0, 0, 122, 0,
2393 0, 122, 805, 1113, 0, 0, 0, 0, 0, 284,
2394 805, 0, 0, 0, 920, 0, 921, 922, 923, 924,
2395 925, 0, 0, 0, 0, 0, 806, 0, 0, 0,
2396 0, 532, 532, 0, 806, 0, 0, 805, 0, 926,
2397 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2398 121, 0, 121, 284, 0, 0, 0, 0, 0, 0,
2399 0, 806, 0, 928, 0, 0, 807, 0, 0, 929,
2400 930, 931, 121, 0, 807, 0, 0, 0, 0, 0,
2401 0, 0, 85, 0, 0, 0, 0, 0, 538, 0,
2402 0, 0, 0, 0, 805, 932, 0, 0, 933, 0,
2403 122, 807, 0, 0, 0, 122, 0, 0, 0, 118,
2404 0, 118, 0, 0, 0, 0, 0, 0, 806, 0,
2405 0, 122, 0, 0, 0, 0, 0, 0, 122, 0,
2406 0, 118, 0, 0, 0, 0, 0, 0, 0, 0,
2407 122, 0, 0, 122, 0, 0, 0, 0, 121, 0,
2408 0, 0, 121, 121, 0, 0, 0, 0, 807, 0,
2409 121, 121, 0, 0, 0, 0, 0, 121, 121, 0,
2410 805, 1014, 0, 0, 805, 122, 0, 0, 284, 0,
2411 0, 0, 0, 0, 122, 0, 808, 0, 0, 0,
2412 805, 0, 0, 0, 806, 0, 0, 121, 806, 85,
2413 121, 85, 0, 0, 0, 0, 0, 118, 0, 0,
2414 284, 118, 0, 0, 806, 809, 0, 0, 0, 0,
2415 0, 85, 0, 0, 0, 0, 805, 805, 0, 0,
2416 0, 0, 0, 0, 807, 0, 393, 0, 807, 0,
2417 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2418 806, 806, 0, 0, 807, 0, 118, 0, 0, 118,
2419 810, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2420 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2421 0, 0, 808, 808, 122, 0, 122, 121, 0, 0,
2422 807, 807, 0, 0, 0, 0, 0, 85, 0, 121,
2423 0, 85, 532, 0, 121, 0, 0, 0, 0, 532,
2424 532, 809, 809, 0, 0, 0, 532, 532, 0, 0,
2425 121, 0, 122, 0, 0, 122, 0, 121, 393, 0,
2426 0, 0, 0, 0, 0, 0, 0, 0, 0, 121,
2427 0, 0, 121, 0, 0, 0, 85, 0, 0, 85,
2428 0, 0, 0, 0, 0, 0, 810, 810, 118, 0,
2429 0, 0, 0, 118, 0, 0, 0, 0, 0, 0,
2430 0, 0, 0, 0, 121, 0, 0, 808, 808, 118,
2431 0, 0, 0, 121, 0, 0, 118, 808, 808, 808,
2432 0, 0, 0, 808, 808, 0, 0, 0, 118, 122,
2433 122, 118, 0, 0, 0, 0, 809, 809, 0, 0,
2434 0, 0, 0, 0, 0, 0, 809, 809, 809, 0,
2435 0, 0, 809, 809, 0, 0, 0, 0, 0, 1012,
2436 0, 0, 0, 118, 0, 0, 532, 0, 0, 0,
2437 0, 0, 118, 0, 0, 0, 0, 0, 85, 0,
2438 0, 810, 810, 85, 0, 0, 0, 0, 0, 0,
2439 0, 810, 810, 810, 0, 217, 217, 810, 810, 85,
2440 0, 0, 0, 0, 0, 0, 85, 0, 0, 808,
2441 0, 0, 0, 121, 0, 121, 0, 808, 85, 0,
2442 0, 85, 0, 0, 391, 0, 0, 250, 253, 254,
2443 255, 0, 0, 0, 217, 217, 0, 0, 809, 0,
2444 0, 122, 0, 0, 808, 0, 809, 303, 304, 1010,
2445 0, 121, 0, 85, 121, 0, 0, 0, 0, 0,
2446 0, 0, 85, 0, 0, 0, 0, 0, 23, 24,
2447 25, 26, 118, 809, 118, 0, 0, 0, 0, 217,
2448 0, 0, 0, 810, 32, 33, 34, 0, 0, 0,
2449 0, 810, 0, 0, 41, 42, 43, 44, 45, 0,
2450 0, 808, 0, 0, 0, 0, 0, 0, 0, 0,
2451 118, 0, 0, 118, 0, 0, 391, 0, 810, 0,
2452 0, 0, 0, 0, 0, 0, 0, 0, 121, 121,
2453 809, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2454 0, 0, 0, 0, 0, 792, 59, 60, 61, 62,
2455 63, 64, 65, 66, 0, 0, 0, 0, 0, 0,
2456 0, 0, 85, 0, 85, 0, 0, 0, 0, 0,
2457 0, 0, 0, 0, 279, 810, 0, 808, 0, 0,
2458 0, 808, 0, 0, 0, 0, 217, 118, 118, 217,
2459 217, 217, 0, 303, 0, 0, 0, 808, 0, 0,
2460 85, 0, 0, 85, 0, 0, 809, 0, 0, 217,
2461 809, 217, 217, 0, 0, 0, 0, 0, 0, 0,
2462 0, 0, 0, 0, 0, 0, 809, 0, 0, 0,
2463 0, 0, 0, 808, 808, 0, 0, 0, 0, 0,
2464 121, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2465 0, 810, 0, 0, 0, 810, 0, 0, 0, 0,
2466 0, 0, 809, 809, 0, 0, 0, 0, 0, 0,
2467 0, 810, 0, 0, 0, 0, 0, 85, 85, 0,
2468 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2469 0, 0, 0, 0, 0, 0, 0, 0, 0, 118,
2470 0, 0, 0, 0, 0, 217, 0, 810, 810, 0,
2471 533, 0, 540, 541, 542, 543, 544, 0, 0, 545,
2472 546, 547, 548, 549, 550, 551, 552, 553, 0, 0,
2473 554, 555, 556, 557, 558, 559, 560, 561, 562, 563,
2474 0, 0, 0, 217, 0, 0, 0, 0, 0, 0,
2475 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2476 0, 0, 0, 0, 0, 0, 0, 333, 334, 335,
2477 336, 337, 338, 339, 340, 341, 342, 343, 344, 345,
2478 0, 0, 0, 0, 346, 347, 0, 0, 0, 85,
2479 0, 0, 0, 614, 614, 0, 0, 0, 0, 0,
2480 0, 0, 614, 217, 217, 0, 0, 0, 217, 0,
2481 614, 614, 217, 0, 0, 0, 0, 348, 255, 349,
2482 350, 351, 352, 353, 354, 355, 356, 357, 358, 0,
2483 0, 0, 0, 640, 0, 0, 0, 0, 614, 0,
2484 0, 0, 0, 237, 0, 0, 0, 0, 0, 217,
2485 0, 0, 217, 0, 0, 0, 0, 0, 0, -738,
2486 0, 0, 0, 217, 0, 0, 0, -738, -738, -738,
2487 0, 0, -738, -738, -738, 0, -738, 0, 0, 0,
2488 0, 670, 0, 0, -738, -738, -738, -738, -738, 0,
2489 0, 0, 0, 0, 0, 0, -738, -738, 217, -738,
2490 -738, -738, -738, -738, 0, 0, 0, 0, 0, 0,
2491 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2492 0, 0, 0, 0, 0, 0, 0, -738, 0, 0,
2493 0, 0, 0, 0, 0, 0, -738, -738, -738, -738,
2494 -738, -738, -738, -738, -738, -738, -738, -738, -738, 0,
2495 0, 0, 0, -738, -738, -738, -738, 0, 747, -738,
2496 0, 0, 0, 0, 0, -738, 0, 0, 0, 0,
2497 0, 217, 0, 0, 0, 0, 0, 0, 0, -738,
2498 0, 217, -738, 0, 0, -116, -738, -738, -738, -738,
2499 -738, -738, -738, -738, -738, -738, -738, -738, 217, 0,
2500 217, 0, -738, -738, -738, -738, 0, 0, -738, -738,
2501 -738, 0, -738, 217, 0, 217, 0, 0, 0, -761,
2502 0, 0, 0, 0, 0, 0, 0, -761, -761, -761,
2503 0, 0, -761, -761, -761, 0, -761, 0, 0, 0,
2504 0, 0, 0, 0, -761, -761, -761, 0, 0, 0,
2505 0, 0, 0, 0, 0, 0, -761, -761, 217, -761,
2506 -761, -761, -761, -761, 614, 778, 0, 217, 0, 0,
2507 0, 614, 614, 0, 0, 0, 0, 217, 614, 614,
2508 0, 0, 0, 0, 0, 0, 217, -761, 0, 0,
2509 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2510 0, 217, 0, 0, 0, 0, 0, 0, 0, 0,
2511 0, 0, 0, 0, 0, -761, -761, 0, 0, 0,
2512 0, 0, 0, 0, 0, 0, 614, 614, 0, 614,
2513 614, 23, 24, 25, 26, 0, 0, 0, 0, -761,
2514 0, 0, 0, 0, 0, 0, 0, 32, 33, 34,
2515 784, 0, 217, 0, 785, 0, 986, 41, 42, 43,
2516 44, 45, -761, -761, 0, 0, 0, 233, -761, 0,
2517 -761, 0, -761, 0, 0, 926, 0, 0, 0, 0,
2518 0, 0, 0, 0, 0, 0, 0, 0, 786, 787,
2519 0, 899, 0, 0, 0, 0, 788, 0, 614, 789,
2520 0, 0, 790, 791, 0, 980, 930, 0, 792, 59,
2521 1004, 61, 62, 63, 64, 65, 66, 0, 0, 0,
2522 0, 0, 0, 0, 0, 217, 0, 0, 0, 0,
2523 793, 0, 0, 0, 0, -761, 4, 279, 5, 6,
2524 7, 8, 9, 614, 0, 217, 10, 11, 0, 0,
2525 0, 12, 0, 13, 14, 15, 16, 17, 18, 19,
2526 0, 0, 0, 0, 0, 20, 21, 22, 23, 24,
2527 25, 26, 0, 0, 27, 0, 0, 0, 0, 0,
2528 28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
2529 38, 39, 40, 217, 41, 42, 43, 44, 45, 46,
2530 47, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2531 48, 49, 0, 0, 0, 0, 0, 0, 0, 0,
2532 0, 217, 0, 0, 0, 50, 51, 0, 0, 0,
2533 0, 0, 0, 52, 0, 0, 53, 54, 0, 55,
2534 56, 0, 57, 0, 0, 58, 59, 60, 61, 62,
2535 63, 64, 65, 66, 0, 0, 0, 0, 0, 0,
2536 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2537 0, 0, 0, 0, 67, 68, 69, 0, 0, 0,
2538 0, 0, 0, 0, 0, 0, -761, 0, -761, 0,
2539 0, 0, 0, 0, 0, 0, 0, 0, 217, -631,
2540 0, 0, 0, 0, 0, 0, 0, -631, -631, -631,
2541 0, 217, -631, -631, -631, 0, -631, 0, 0, 0,
2542 0, 686, 0, 0, -631, 0, -631, -631, -631, 0,
2543 0, 0, 0, 0, 0, 0, -631, -631, 0, -631,
2544 -631, -631, -631, -631, 0, 0, 0, 0, 0, 0,
2545 0, 0, 0, 0, 333, 334, 335, 336, 337, 338,
2546 339, 340, 341, 342, 343, 344, 345, -631, 0, 0,
2547 0, 346, 347, 217, 0, 0, -631, -631, -631, -631,
2548 -631, -631, -631, -631, -631, -631, -631, -631, -631, 0,
2549 0, 0, 0, -631, -631, -631, -631, 0, -631, -631,
2550 0, 0, 0, 0, 348, -631, 349, 350, 351, 352,
2551 353, 354, 355, 356, 357, 358, 0, 0, 0, -631,
2552 0, 0, -631, -257, 0, -631, -631, -631, -631, -631,
2553 -631, -631, -631, -631, -631, -631, -631, -631, 0, 0,
2554 0, 0, 0, -631, -631, -631, -634, 0, -631, -631,
2555 -631, 0, -631, 0, -634, -634, -634, 0, 0, -634,
2556 -634, -634, 0, -634, 0, 0, 0, 0, 686, 0,
2557 0, -634, 0, -634, -634, -634, 0, 0, 0, 0,
2558 0, 0, 0, -634, -634, 0, -634, -634, -634, -634,
2559 -634, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2560 0, 333, 334, 335, 336, 337, 338, 339, 340, 341,
2561 342, 343, 344, 345, -634, 0, 0, 0, 346, 347,
2562 0, 0, 0, -634, -634, -634, -634, -634, -634, -634,
2563 -634, -634, -634, -634, -634, -634, 0, 0, 0, 0,
2564 -634, -634, -634, -634, 0, -634, -634, 0, 0, 0,
2565 0, 348, -634, 349, 350, 351, 352, 353, 354, 355,
2566 356, 357, 358, 0, 0, 0, -634, 0, 0, -634,
2567 0, 0, -634, -634, -634, -634, -634, -634, -634, -634,
2568 -634, -634, -634, -634, -634, 0, 0, 0, 0, 0,
2569 -634, -634, -634, -739, 0, -634, -634, -634, 0, -634,
2570 0, -739, -739, -739, 0, 0, -739, -739, -739, 0,
2571 -739, 0, 0, 0, 0, 0, 0, 0, -739, -739,
2572 -739, -739, -739, 0, 0, 0, 0, 0, 0, 0,
2573 -739, -739, 0, -739, -739, -739, -739, -739, 0, 0,
2574 0, 0, 0, 0, 0, 0, 0, 0, 333, 334,
2575 335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
2576 345, -739, 0, 0, 0, 346, 347, 0, 0, 0,
2577 -739, -739, -739, -739, -739, -739, -739, -739, -739, -739,
2578 -739, -739, -739, 0, 0, 0, 0, -739, -739, -739,
2579 -739, 0, 0, -739, 0, 0, 0, 0, 348, -739,
2580 349, 350, 351, 352, 353, 354, 355, 356, 357, 358,
2581 0, 0, 0, -739, 0, 0, -739, 0, 0, 0,
2582 -739, -739, -739, -739, -739, -739, -739, -739, -739, -739,
2583 -739, -739, 0, 0, 0, 0, -739, -739, -739, -739,
2584 -740, 0, -739, -739, -739, 0, -739, 0, -740, -740,
2585 -740, 0, 0, -740, -740, -740, 0, -740, 0, 0,
2586 0, 0, 0, 0, 0, -740, -740, -740, -740, -740,
2587 0, 0, 0, 0, 0, 0, 0, -740, -740, 0,
2588 -740, -740, -740, -740, -740, 0, 0, 0, 0, 0,
2589 0, 0, 0, 0, 0, 333, 334, 335, 336, 337,
2590 338, 339, 340, 341, 342, 343, -762, -762, -740, 0,
2591 0, 0, 346, 347, 0, 0, 0, -740, -740, -740,
2592 -740, -740, -740, -740, -740, -740, -740, -740, -740, -740,
2593 0, 0, 0, 0, -740, -740, -740, -740, 0, 0,
2594 -740, 0, 0, 0, 0, 0, -740, 349, 350, 351,
2595 352, 353, 354, 355, 356, 357, 358, 0, 0, 0,
2596 -740, 0, 0, -740, 0, 0, 0, -740, -740, -740,
2597 -740, -740, -740, -740, -740, -740, -740, -740, -740, 0,
2598 0, 0, 0, -740, -740, -740, -740, -311, 0, -740,
2599 -740, -740, 0, -740, 0, -311, -311, -311, 0, 0,
2600 -311, -311, -311, 0, -311, 0, 0, 0, 0, 0,
2601 0, 0, -311, 0, -311, -311, -311, 0, 0, 0,
2602 0, 0, 0, 0, -311, -311, 0, -311, -311, -311,
2603 -311, -311, 0, 0, 0, 0, 0, 0, 0, 0,
2604 0, 0, 333, 334, 335, 336, 337, 338, 339, 340,
2605 0, 342, 343, 0, 0, -311, 0, 0, 0, 346,
2606 347, 0, 0, 0, -311, -311, -311, -311, -311, -311,
2607 -311, -311, -311, -311, -311, -311, -311, 0, 0, 0,
2608 0, -311, -311, -311, -311, 0, 748, -311, 0, 0,
2609 0, 0, 0, -311, 349, 350, 351, 352, 353, 354,
2610 355, 356, 357, 358, 0, 0, 0, -311, 0, 0,
2611 -311, 0, 0, -118, -311, -311, -311, -311, -311, -311,
2612 -311, -311, -311, -311, -311, -311, 0, 0, 0, 0,
2613 0, -311, -311, -311, -450, 0, -311, -311, -311, 0,
2614 -311, 0, -450, -450, -450, 0, 0, -450, -450, -450,
2615 0, -450, 0, 0, 0, 0, 0, 0, 0, -450,
2616 -450, -450, -450, 0, 0, 0, 0, 0, 0, 0,
2617 0, -450, -450, 0, -450, -450, -450, -450, -450, 0,
2618 0, 0, 0, 0, 0, 0, 0, 0, 0, 333,
2619 -762, -762, -762, -762, 338, 339, 0, 0, -762, -762,
2620 0, 0, -450, 0, 0, 0, 346, 347, 0, 0,
2621 0, -450, -450, -450, -450, -450, -450, -450, -450, -450,
2622 -450, -450, -450, -450, 0, 0, 0, 0, -450, -450,
2623 -450, -450, 0, 0, -450, 0, 0, 0, 0, 0,
2624 -450, 349, 350, 351, 352, 353, 354, 355, 356, 357,
2625 358, 0, 0, 0, -450, 0, 0, 0, 0, 0,
2626 0, -450, 0, -450, -450, -450, -450, -450, -450, -450,
2627 -450, -450, -450, 0, 0, 0, 0, -450, -450, -450,
2628 -450, -303, 233, -450, -450, -450, 0, -450, 0, -303,
2629 -303, -303, 0, 0, -303, -303, -303, 0, -303, 0,
2630 0, 0, 0, 0, 0, 0, -303, 0, -303, -303,
2631 -303, 0, 0, 0, 0, 0, 0, 0, -303, -303,
2632 0, -303, -303, -303, -303, -303, 0, 0, 0, 0,
2633 0, 0, 0, 0, 0, 0, 333, 334, 335, 336,
2634 337, 338, 339, 0, 0, 342, 343, 0, 0, -303,
2635 0, 0, 0, 346, 347, 0, 0, 0, -303, -303,
2636 -303, -303, -303, -303, -303, -303, -303, -303, -303, -303,
2637 -303, 0, 0, 0, 0, -303, -303, -303, -303, 0,
2638 0, -303, 0, 0, 0, 0, 0, -303, 349, 350,
2639 351, 352, 353, 354, 355, 356, 357, 358, 0, 0,
2640 0, -303, 0, 0, -303, 0, 0, 0, -303, -303,
2641 -303, -303, -303, -303, -303, -303, -303, -303, -303, -303,
2642 0, 0, 0, 0, 0, -303, -303, -303, -761, 0,
2643 -303, -303, -303, 0, -303, 0, -761, -761, -761, 0,
2644 0, -761, -761, -761, 0, -761, 0, 0, 0, 0,
2645 0, 0, 0, -761, -761, -761, -761, 0, 0, 0,
2646 0, 0, 0, 0, 0, -761, -761, 0, -761, -761,
2647 -761, -761, -761, 0, 0, 0, 0, 0, 0, 0,
2648 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2649 0, 0, 0, 0, 0, 0, -761, 0, 0, 0,
2650 0, 0, 0, 0, 0, -761, -761, -761, -761, -761,
2651 -761, -761, -761, -761, -761, -761, -761, -761, 0, 0,
2652 0, 0, -761, -761, -761, -761, 0, 0, -761, 0,
2653 0, 0, 0, 0, -761, 0, 0, 0, 0, 0,
2654 0, 0, 0, 0, 0, 0, 0, 0, -761, 0,
2655 0, 0, 0, 0, 0, -761, 0, -761, -761, -761,
2656 -761, -761, -761, -761, -761, -761, -761, 0, 0, 0,
2657 0, -761, -761, -761, -761, -318, 233, -761, -761, -761,
2658 0, -761, 0, -318, -318, -318, 0, 0, -318, -318,
2659 -318, 0, -318, 0, 0, 0, 0, 0, 0, 0,
2660 -318, 0, -318, -318, 0, 0, 0, 0, 0, 0,
2661 0, 0, -318, -318, 0, -318, -318, -318, -318, -318,
2662 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2663 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2664 0, 0, 0, -318, 0, 0, 0, 0, 0, 0,
2665 0, 0, -318, -318, -318, -318, -318, -318, -318, -318,
2666 -318, -318, -318, -318, -318, 0, 0, 0, 0, -318,
2667 -318, -318, -318, 0, 0, -318, 0, 0, 0, 0,
2668 0, -318, 0, 0, 0, 0, 0, 0, 0, 0,
2669 0, 0, 0, 0, 0, -318, 0, 0, 0, 0,
2670 0, 0, -318, 0, -318, -318, -318, -318, -318, -318,
2671 -318, -318, -318, -318, 0, 0, 0, 0, 0, -318,
2672 -318, -318, -738, 230, -318, -318, -318, 0, -318, 0,
2673 -738, -738, -738, 0, 0, 0, -738, -738, 0, -738,
2674 0, 0, 0, 0, 0, 0, 0, -738, -738, 0,
2675 0, 0, 0, 0, 0, 0, 0, 0, 0, -738,
2676 -738, 0, -738, -738, -738, -738, -738, 0, 0, 0,
2677 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2678 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2679 -738, 0, 0, 0, 0, 0, 0, 0, 0, -738,
2680 -738, -738, -738, -738, -738, -738, -738, -738, -738, -738,
2681 -738, -738, 0, 0, 0, 0, -738, -738, -738, -738,
2682 0, 692, 0, 0, 0, 0, 0, 0, 0, 0,
2683 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2684 0, 0, -738, 0, 0, 0, 0, 0, -116, -738,
2685 0, -738, -738, -738, -738, -738, -738, -738, -738, -738,
2686 -738, 0, 0, 0, 0, -738, -738, -738, -107, -738,
2687 0, -738, 0, -738, 0, -738, 0, -738, -738, -738,
2688 0, 0, 0, -738, -738, 0, -738, 0, 0, 0,
2689 0, 0, 0, 0, -738, -738, 0, 0, 0, 0,
2690 0, 0, 0, 0, 0, 0, -738, -738, 0, -738,
2691 -738, -738, -738, -738, 0, 0, 0, 0, 0, 0,
2692 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2693 0, 0, 0, 0, 0, 0, 0, -738, 0, 0,
2694 0, 0, 0, 0, 0, 0, -738, -738, -738, -738,
2695 -738, -738, -738, -738, -738, -738, -738, -738, -738, 0,
2696 0, 0, 0, -738, -738, -738, -738, 0, 692, 0,
2697 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2698 0, 0, 0, 0, 0, 0, 0, 0, 0, -738,
2699 0, 0, 0, 0, 0, -116, -738, 0, -738, -738,
2700 -738, -738, -738, -738, -738, -738, -738, -738, 0, 0,
2701 0, 0, -738, -738, -738, -738, -311, 0, -738, 0,
2702 -738, 0, -738, 0, -311, -311, -311, 0, 0, 0,
2703 -311, -311, 0, -311, 0, 0, 0, 0, 0, 0,
2704 0, -311, 0, 0, 0, 0, 0, 0, 0, 0,
2705 0, 0, 0, -311, -311, 0, -311, -311, -311, -311,
2706 -311, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2707 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2708 0, 0, 0, 0, -311, 0, 0, 0, 0, 0,
2709 0, 0, 0, -311, -311, -311, -311, -311, -311, -311,
2710 -311, -311, -311, -311, -311, -311, 0, 0, 0, 0,
2711 -311, -311, -311, -311, 0, 693, 0, 0, 0, 0,
2712 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2713 0, 0, 0, 0, 0, 0, -311, 0, 0, 0,
2714 0, 0, -118, -311, 0, -311, -311, -311, -311, -311,
2715 -311, -311, -311, -311, -311, 0, 0, 0, 0, 0,
2716 -311, -311, -109, -311, 0, -311, 0, -311, 0, -311,
2717 0, -311, -311, -311, 0, 0, 0, -311, -311, 0,
2718 -311, 0, 0, 0, 0, 0, 0, 0, -311, 0,
2719 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2720 -311, -311, 0, -311, -311, -311, -311, -311, 0, 0,
2721 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2722 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2723 0, -311, 0, 0, 0, 0, 0, 0, 0, 0,
2724 -311, -311, -311, -311, -311, -311, -311, -311, -311, -311,
2725 -311, -311, -311, 0, 0, 0, 0, -311, -311, -311,
2726 -311, 0, 693, 0, 0, 0, 0, 0, 0, 0,
2727 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2728 0, 0, 0, -311, 0, 0, 0, 0, 0, -118,
2729 -311, 0, -311, -311, -311, -311, -311, -311, -311, -311,
2730 -311, -311, 0, 0, 0, 0, 0, -311, -311, -311,
2731 0, 0, -311, 0, -311, 257, -311, 5, 6, 7,
2732 8, 9, -761, -761, -761, 10, 11, 0, 0, -761,
2733 12, 0, 13, 14, 15, 16, 17, 18, 19, 0,
2734 0, 0, 0, 0, 20, 21, 22, 23, 24, 25,
2735 26, 0, 0, 27, 0, 0, 0, 0, 0, 28,
2736 29, 258, 31, 32, 33, 34, 35, 36, 37, 38,
2737 39, 40, 0, 41, 42, 43, 44, 45, 46, 47,
2738 0, 0, 0, 0, 0, 0, 0, 0, 0, 48,
2739 49, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2740 0, 0, 0, 0, 50, 51, 0, 0, 0, 0,
2741 0, 0, 52, 0, 0, 53, 54, 0, 55, 56,
2742 0, 57, 0, 0, 58, 59, 60, 61, 62, 63,
2743 64, 65, 66, 0, 0, 0, 0, 0, 0, 0,
2744 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2745 0, 0, 0, 67, 68, 69, 0, 0, 0, 0,
2746 0, 0, 0, 0, 0, -761, 257, -761, 5, 6,
2747 7, 8, 9, 0, 0, -761, 10, 11, 0, -761,
2748 -761, 12, 0, 13, 14, 15, 16, 17, 18, 19,
2749 0, 0, 0, 0, 0, 20, 21, 22, 23, 24,
2750 25, 26, 0, 0, 27, 0, 0, 0, 0, 0,
2751 28, 29, 258, 31, 32, 33, 34, 35, 36, 37,
2752 38, 39, 40, 0, 41, 42, 43, 44, 45, 46,
2753 47, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2754 48, 49, 0, 0, 0, 0, 0, 0, 0, 0,
2755 0, 0, 0, 0, 0, 50, 51, 0, 0, 0,
2756 0, 0, 0, 52, 0, 0, 53, 54, 0, 55,
2757 56, 0, 57, 0, 0, 58, 59, 60, 61, 62,
2758 63, 64, 65, 66, 0, 0, 0, 0, 0, 0,
2759 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2760 0, 0, 0, 0, 67, 68, 69, 0, 0, 0,
2761 0, 0, 0, 0, 0, 0, -761, 257, -761, 5,
2762 6, 7, 8, 9, 0, 0, -761, 10, 11, 0,
2763 0, -761, 12, -761, 13, 14, 15, 16, 17, 18,
2764 19, 0, 0, 0, 0, 0, 20, 21, 22, 23,
2765 24, 25, 26, 0, 0, 27, 0, 0, 0, 0,
2766 0, 28, 29, 258, 31, 32, 33, 34, 35, 36,
2767 37, 38, 39, 40, 0, 41, 42, 43, 44, 45,
2768 46, 47, 0, 0, 0, 0, 0, 0, 0, 0,
2769 0, 48, 49, 0, 0, 0, 0, 0, 0, 0,
2770 0, 0, 0, 0, 0, 0, 50, 51, 0, 0,
2771 0, 0, 0, 0, 52, 0, 0, 53, 54, 0,
2772 55, 56, 0, 57, 0, 0, 58, 59, 60, 61,
2773 62, 63, 64, 65, 66, 0, 0, 0, 0, 0,
2774 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2775 0, 0, 0, 0, 0, 67, 68, 69, 0, 0,
2776 0, 0, 0, 0, 0, 0, 0, -761, 257, -761,
2777 5, 6, 7, 8, 9, 0, 0, -761, 10, 11,
2778 0, 0, -761, 12, 0, 13, 14, 15, 16, 17,
2779 18, 19, -761, 0, 0, 0, 0, 20, 21, 22,
2780 23, 24, 25, 26, 0, 0, 27, 0, 0, 0,
2781 0, 0, 28, 29, 258, 31, 32, 33, 34, 35,
2782 36, 37, 38, 39, 40, 0, 41, 42, 43, 44,
2783 45, 46, 47, 0, 0, 0, 0, 0, 0, 0,
2784 0, 0, 48, 49, 0, 0, 0, 0, 0, 0,
2785 0, 0, 0, 0, 0, 0, 0, 50, 51, 0,
2786 0, 0, 0, 0, 0, 52, 0, 0, 53, 54,
2787 0, 55, 56, 0, 57, 0, 0, 58, 59, 60,
2788 61, 62, 63, 64, 65, 66, 0, 0, 0, 0,
2789 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2790 0, 0, 0, 0, 0, 0, 67, 68, 69, 0,
2791 0, 0, 0, 0, 0, 0, 0, 0, -761, 257,
2792 -761, 5, 6, 7, 8, 9, 0, 0, -761, 10,
2793 11, 0, 0, -761, 12, 0, 13, 14, 15, 16,
2794 17, 18, 19, 0, 0, 0, 0, 0, 20, 21,
2795 22, 23, 24, 25, 26, 0, 0, 27, 0, 0,
2796 0, 0, 0, 28, 29, 258, 31, 32, 33, 34,
2797 35, 36, 37, 38, 39, 40, 0, 41, 42, 43,
2798 44, 45, 46, 47, 0, 0, 0, 0, 0, 0,
2799 0, 0, 0, 48, 49, 0, 0, 0, 0, 0,
2800 0, 0, 0, 0, 0, 0, 0, 0, 50, 51,
2801 0, 0, 0, 0, 0, 0, 52, 0, 0, 53,
2802 54, 0, 55, 56, 0, 57, 0, 0, 58, 59,
2803 60, 61, 62, 63, 64, 65, 66, 0, 0, 0,
2804 0, 0, 0, 0, 0, 257, 0, 5, 6, 7,
2805 8, 9, 0, -761, -761, 10, 11, 67, 68, 69,
2806 12, 0, 13, 14, 15, 16, 17, 18, 19, -761,
2807 0, -761, 0, 0, 20, 21, 22, 23, 24, 25,
2808 26, 0, 0, 27, 0, 0, 0, 0, 0, 28,
2809 29, 258, 31, 32, 33, 34, 35, 36, 37, 38,
2810 39, 40, 0, 41, 42, 43, 44, 45, 46, 47,
2811 0, 0, 0, 0, 0, 0, 0, 0, 0, 48,
2812 49, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2813 0, 0, 0, 0, 50, 51, 0, 0, 0, 0,
2814 0, 0, 52, 0, 0, 53, 54, 0, 55, 56,
2815 0, 57, 0, 0, 58, 59, 60, 61, 62, 63,
2816 64, 65, 66, 0, 0, 0, 0, 0, 0, 0,
2817 0, 257, 0, 5, 6, 7, 8, 9, 0, 0,
2818 0, 10, 11, 67, 68, 69, 12, 0, 13, 14,
2819 15, 16, 17, 18, 19, -761, 0, -761, 0, 0,
2820 20, 21, 22, 23, 24, 25, 26, 0, 0, 27,
2821 0, 0, 0, 0, 0, 28, 29, 258, 31, 32,
2822 33, 34, 35, 36, 37, 38, 39, 40, 0, 41,
2823 42, 43, 44, 45, 46, 47, 0, 0, 0, 0,
2824 0, 0, 0, 0, 0, 48, 49, 0, 0, 0,
2825 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2826 50, 51, 0, 0, 0, 0, 0, 0, 52, 0,
2827 0, 259, 54, 0, 55, 56, 0, 57, 0, 0,
2828 58, 59, 60, 61, 62, 63, 64, 65, 66, 0,
2829 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2830 0, 0, 0, 0, 0, 0, 0, 0, 0, 67,
2831 68, 69, 0, 0, 0, 0, 0, 0, 0, -761,
2832 0, -761, 257, -761, 5, 6, 7, 8, 9, 0,
2833 0, 0, 10, 11, 0, 0, 0, 12, 0, 13,
2834 14, 15, 16, 17, 18, 19, 0, 0, 0, 0,
2835 0, 20, 21, 22, 23, 24, 25, 26, 0, 0,
2836 27, 0, 0, 0, 0, 0, 28, 29, 258, 31,
2837 32, 33, 34, 35, 36, 37, 38, 39, 40, 0,
2838 41, 42, 43, 44, 45, 46, 47, 0, 0, 0,
2839 0, 0, 0, 0, 0, 0, 48, 49, 0, 0,
2840 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2841 0, 50, 51, 0, 0, 0, 0, 0, 0, 52,
2842 0, 0, 53, 54, 0, 55, 56, 0, 57, 0,
2843 0, 58, 59, 60, 61, 62, 63, 64, 65, 66,
2844 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2845 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2846 67, 68, 69, 0, 0, 0, 0, 0, 0, 0,
2847 -761, 0, -761, 4, -761, 5, 6, 7, 8, 9,
2848 0, 0, 0, 10, 11, 0, 0, 0, 12, 0,
2849 13, 14, 15, 16, 17, 18, 19, 0, 0, 0,
2850 0, 0, 20, 21, 22, 23, 24, 25, 26, 0,
2851 0, 27, 0, 0, 0, 0, 0, 28, 29, 30,
2852 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
2853 0, 41, 42, 43, 44, 45, 46, 47, 0, 0,
2854 0, 0, 0, 0, 0, 0, 0, 48, 49, 0,
2855 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2856 0, 0, 50, 51, 0, 0, 0, 0, 0, 0,
2857 52, 0, 0, 53, 54, 0, 55, 56, 0, 57,
2858 0, 0, 58, 59, 60, 61, 62, 63, 64, 65,
2859 66, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2860 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2861 0, 67, 68, 69, 0, 0, -761, 0, 0, 0,
2862 0, 0, 0, -761, 257, -761, 5, 6, 7, 8,
2863 9, 0, 0, 0, 10, 11, 0, 0, 0, 12,
2864 0, 13, 14, 15, 16, 17, 18, 19, 0, 0,
2865 0, 0, 0, 20, 21, 22, 23, 24, 25, 26,
2866 0, 0, 27, 0, 0, 0, 0, 0, 28, 29,
2867 258, 31, 32, 33, 34, 35, 36, 37, 38, 39,
2868 40, 0, 41, 42, 43, 44, 45, 46, 47, 0,
2869 0, 0, 0, 0, 0, 0, 0, 0, 48, 49,
2870 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2871 0, 0, 0, 50, 51, 0, 0, 0, 0, 0,
2872 0, 52, 0, 0, 53, 54, 0, 55, 56, 0,
2873 57, 0, 0, 58, 59, 60, 61, 62, 63, 64,
2874 65, 66, 0, 0, 0, 0, 0, 0, 0, 0,
2875 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2876 0, 0, 67, 68, 69, 0, 0, -761, 0, 0,
2877 0, 0, 0, 0, -761, 257, -761, 5, 6, 7,
2878 8, 9, 0, 0, -761, 10, 11, 0, 0, 0,
2879 12, 0, 13, 14, 15, 16, 17, 18, 19, 0,
2880 0, 0, 0, 0, 20, 21, 22, 23, 24, 25,
2881 26, 0, 0, 27, 0, 0, 0, 0, 0, 28,
2882 29, 258, 31, 32, 33, 34, 35, 36, 37, 38,
2883 39, 40, 0, 41, 42, 43, 44, 45, 46, 47,
2884 0, 0, 0, 0, 0, 0, 0, 0, 0, 48,
2885 49, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2886 0, 0, 0, 0, 50, 51, 0, 0, 0, 0,
2887 0, 0, 52, 0, 0, 53, 54, 0, 55, 56,
2888 0, 57, 0, 0, 58, 59, 60, 61, 62, 63,
2889 64, 65, 66, 0, 0, 0, 0, 0, 0, 0,
2890 0, 257, 0, 5, 6, 7, 8, 9, 0, 0,
2891 0, 10, 11, 67, 68, 69, 12, 0, 13, 14,
2892 15, 16, 17, 18, 19, -761, 0, -761, 0, 0,
2893 20, 21, 22, 23, 24, 25, 26, 0, 0, 27,
2894 0, 0, 0, 0, 0, 28, 29, 258, 31, 32,
2895 33, 34, 35, 36, 37, 38, 39, 40, 0, 41,
2896 42, 43, 44, 45, 46, 47, 0, 0, 0, 0,
2897 0, 0, 0, 0, 0, 48, 49, 0, 0, 0,
2898 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2899 50, 51, 0, 0, 0, 0, 0, 0, 52, 0,
2900 0, 53, 54, 0, 55, 56, 0, 57, 0, 0,
2901 58, 59, 60, 61, 62, 63, 64, 65, 66, 0,
2902 -761, 0, 0, 0, 0, 0, 0, 0, 0, 5,
2903 6, 7, 0, 9, 0, 0, 0, 10, 11, 67,
2904 68, 69, 12, 0, 13, 14, 15, 16, 17, 18,
2905 19, -761, 0, -761, 0, 0, 20, 21, 22, 23,
2906 24, 25, 26, 0, 0, 206, 0, 0, 0, 0,
2907 0, 0, 29, 0, 0, 32, 33, 34, 35, 36,
2908 37, 38, 39, 40, 207, 41, 42, 43, 44, 45,
2909 46, 47, 0, 0, 0, 0, 0, 0, 0, 0,
2910 0, 48, 49, 0, 0, 0, 0, 0, 0, 0,
2911 0, 0, 0, 0, 0, 0, 50, 51, 0, 0,
2912 0, 0, 0, 0, 208, 0, 0, 209, 54, 0,
2913 55, 56, 0, 210, 211, 212, 58, 59, 213, 61,
2914 62, 63, 64, 65, 66, 0, 0, 0, 0, 0,
2915 0, 0, 0, 0, 0, 5, 6, 7, 0, 9,
2916 0, 0, 0, 10, 11, 67, 214, 69, 12, 0,
2917 13, 14, 15, 16, 17, 18, 19, 0, 0, 237,
2918 0, 0, 20, 21, 22, 23, 24, 25, 26, 0,
2919 0, 27, 0, 0, 0, 0, 0, 0, 29, 0,
2920 0, 32, 33, 34, 35, 36, 37, 38, 39, 40,
2921 0, 41, 42, 43, 44, 45, 46, 47, 0, 0,
2922 0, 0, 0, 0, 0, 0, 0, 48, 49, 0,
2923 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2924 0, 0, 50, 51, 0, 0, 0, 0, 0, 0,
2925 208, 0, 0, 209, 54, 0, 55, 56, 0, 0,
2926 0, 0, 58, 59, 60, 61, 62, 63, 64, 65,
2927 66, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2928 0, 5, 6, 7, 0, 9, 0, 0, 0, 10,
2929 11, 67, 68, 69, 12, 0, 13, 14, 15, 16,
2930 17, 18, 19, 305, 0, 306, 0, 0, 20, 21,
2931 22, 23, 24, 25, 26, 0, 0, 27, 0, 0,
2932 0, 0, 0, 0, 29, 0, 0, 32, 33, 34,
2933 35, 36, 37, 38, 39, 40, 0, 41, 42, 43,
2934 44, 45, 46, 47, 0, 0, 0, 0, 0, 0,
2935 0, 0, 0, 48, 49, 0, 0, 0, 0, 0,
2936 0, 0, 0, 0, 0, 0, 0, 0, 50, 51,
2937 0, 0, 0, 0, 0, 0, 208, 0, 0, 209,
2938 54, 0, 55, 56, 0, 0, 0, 0, 58, 59,
2939 60, 61, 62, 63, 64, 65, 66, 0, 0, 0,
2940 0, 0, 0, 0, 0, 0, 0, 5, 6, 7,
2941 8, 9, 0, 0, 0, 10, 11, 67, 68, 69,
2942 12, 0, 13, 14, 15, 16, 17, 18, 19, 0,
2943 0, 237, 0, 0, 20, 21, 22, 23, 24, 25,
2944 26, 0, 0, 27, 0, 0, 0, 0, 0, 28,
2945 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
2946 39, 40, 0, 41, 42, 43, 44, 45, 46, 47,
2947 0, 0, 0, 0, 0, 0, 0, 0, 0, 48,
2948 49, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2949 0, 0, 0, 0, 50, 51, 0, 0, 0, 0,
2950 0, 0, 52, 0, 0, 53, 54, 0, 55, 56,
2951 0, 57, 0, 0, 58, 59, 60, 61, 62, 63,
2952 64, 65, 66, 0, 0, 0, 0, 0, 0, 0,
2953 0, 0, 0, 5, 6, 7, 8, 9, 0, 0,
2954 0, 10, 11, 67, 68, 69, 12, 0, 13, 14,
2955 15, 16, 17, 18, 19, 503, 0, 0, 0, 0,
2956 20, 21, 22, 23, 24, 25, 26, 0, 0, 27,
2957 0, 0, 0, 0, 0, 28, 29, 258, 31, 32,
2958 33, 34, 35, 36, 37, 38, 39, 40, 0, 41,
2959 42, 43, 44, 45, 46, 47, 0, 0, 0, 0,
2960 0, 0, 0, 0, 0, 48, 49, 0, 0, 0,
2961 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2962 50, 51, 0, 0, 0, 0, 0, 0, 52, 0,
2963 0, 53, 54, 0, 55, 56, 0, 57, 0, 0,
2964 58, 59, 60, 61, 62, 63, 64, 65, 66, 0,
2965 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2966 0, 0, 0, 0, 0, 0, 0, 0, 0, 67,
2967 68, 69, 0, 0, 0, 0, 0, 0, 0, 0,
2968 0, 503, 126, 127, 128, 129, 130, 131, 132, 133,
2969 134, 135, 136, 137, 138, 139, 140, 141, 142, 143,
2970 144, 145, 146, 147, 148, 149, 0, 0, 0, 150,
2971 151, 152, 395, 396, 397, 398, 157, 158, 159, 0,
2972 0, 0, 0, 0, 160, 161, 162, 163, 399, 400,
2973 401, 402, 168, 37, 38, 403, 40, 0, 0, 0,
2974 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2975 0, 0, 0, 0, 170, 171, 172, 173, 174, 175,
2976 176, 177, 178, 0, 0, 179, 180, 0, 0, 0,
2977 0, 181, 182, 183, 184, 0, 0, 0, 0, 0,
2978 0, 0, 0, 0, 0, 0, 185, 186, 0, 0,
2979 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2980 0, 0, 0, 0, 0, 0, 0, 0, 187, 188,
2981 189, 190, 191, 192, 193, 194, 195, 196, 0, 197,
2982 198, 0, 0, 0, 0, 0, 199, 404, 126, 127,
2983 128, 129, 130, 131, 132, 133, 134, 135, 136, 137,
2984 138, 139, 140, 141, 142, 143, 144, 145, 146, 147,
2985 148, 149, 0, 0, 0, 150, 151, 152, 153, 154,
2986 155, 156, 157, 158, 159, 0, 0, 0, 0, 0,
2987 160, 161, 162, 163, 164, 165, 166, 167, 168, 288,
2988 289, 169, 290, 0, 0, 0, 0, 0, 0, 0,
2989 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2990 170, 171, 172, 173, 174, 175, 176, 177, 178, 0,
2991 0, 179, 180, 0, 0, 0, 0, 181, 182, 183,
2992 184, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2993 0, 0, 185, 186, 0, 0, 0, 0, 0, 0,
2994 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2995 0, 0, 0, 0, 187, 188, 189, 190, 191, 192,
2996 193, 194, 195, 196, 0, 197, 198, 0, 0, 0,
2997 0, 0, 199, 126, 127, 128, 129, 130, 131, 132,
2998 133, 134, 135, 136, 137, 138, 139, 140, 141, 142,
2999 143, 144, 145, 146, 147, 148, 149, 0, 0, 0,
3000 150, 151, 152, 153, 154, 155, 156, 157, 158, 159,
3001 0, 0, 0, 0, 0, 160, 161, 162, 163, 164,
3002 165, 166, 167, 168, 239, 0, 169, 0, 0, 0,
3003 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3004 0, 0, 0, 0, 0, 170, 171, 172, 173, 174,
3005 175, 176, 177, 178, 0, 0, 179, 180, 0, 0,
3006 0, 0, 181, 182, 183, 184, 0, 0, 0, 0,
3007 0, 0, 0, 0, 0, 0, 0, 185, 186, 0,
3008 0, 59, 0, 0, 0, 0, 0, 0, 0, 0,
3009 0, 0, 0, 0, 0, 0, 0, 0, 0, 187,
3010 188, 189, 190, 191, 192, 193, 194, 195, 196, 0,
3011 197, 198, 0, 0, 0, 0, 0, 199, 126, 127,
3012 128, 129, 130, 131, 132, 133, 134, 135, 136, 137,
3013 138, 139, 140, 141, 142, 143, 144, 145, 146, 147,
3014 148, 149, 0, 0, 0, 150, 151, 152, 153, 154,
3015 155, 156, 157, 158, 159, 0, 0, 0, 0, 0,
3016 160, 161, 162, 163, 164, 165, 166, 167, 168, 0,
3017 0, 169, 0, 0, 0, 0, 0, 0, 0, 0,
3018 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3019 170, 171, 172, 173, 174, 175, 176, 177, 178, 0,
3020 0, 179, 180, 0, 0, 0, 0, 181, 182, 183,
3021 184, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3022 0, 0, 185, 186, 0, 0, 59, 0, 0, 0,
3023 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3024 0, 0, 0, 0, 187, 188, 189, 190, 191, 192,
3025 193, 194, 195, 196, 0, 197, 198, 0, 0, 0,
3026 0, 0, 199, 126, 127, 128, 129, 130, 131, 132,
3027 133, 134, 135, 136, 137, 138, 139, 140, 141, 142,
3028 143, 144, 145, 146, 147, 148, 149, 0, 0, 0,
3029 150, 151, 152, 153, 154, 155, 156, 157, 158, 159,
3030 0, 0, 0, 0, 0, 160, 161, 162, 163, 164,
3031 165, 166, 167, 168, 0, 0, 169, 0, 0, 0,
3032 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3033 0, 0, 0, 0, 0, 170, 171, 172, 173, 174,
3034 175, 176, 177, 178, 0, 0, 179, 180, 0, 0,
3035 0, 0, 181, 182, 183, 184, 0, 0, 0, 0,
3036 0, 0, 0, 0, 0, 0, 0, 185, 186, 0,
3037 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3038 0, 0, 0, 0, 0, 0, 0, 0, 0, 187,
3039 188, 189, 190, 191, 192, 193, 194, 195, 196, 0,
3040 197, 198, 5, 6, 7, 0, 9, 199, 0, 0,
3041 10, 11, 0, 0, 0, 12, 0, 13, 14, 15,
3042 245, 246, 18, 19, 0, 0, 0, 0, 0, 20,
3043 247, 248, 23, 24, 25, 26, 0, 0, 206, 0,
3044 0, 0, 0, 0, 0, 277, 0, 0, 32, 33,
3045 34, 35, 36, 37, 38, 39, 40, 0, 41, 42,
3046 43, 44, 45, 46, 47, 0, 0, 0, 0, 0,
3047 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3048 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3049 0, 0, 0, 0, 0, 0, 0, 278, 0, 0,
3050 209, 54, 0, 55, 56, 0, 0, 0, 0, 58,
3051 59, 60, 61, 62, 63, 64, 65, 66, 0, 0,
3052 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3053 0, 5, 6, 7, 0, 9, 0, 0, 279, 10,
3054 11, 0, 0, 0, 12, 280, 13, 14, 15, 245,
3055 246, 18, 19, 0, 0, 0, 0, 0, 20, 247,
3056 248, 23, 24, 25, 26, 0, 0, 206, 0, 0,
3057 0, 0, 0, 0, 277, 0, 0, 32, 33, 34,
3058 35, 36, 37, 38, 39, 40, 0, 41, 42, 43,
3059 44, 45, 46, 47, 0, 0, 0, 0, 0, 0,
3060 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3061 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3062 0, 0, 0, 0, 0, 0, 278, 0, 0, 209,
3063 54, 0, 55, 56, 0, 0, 0, 0, 58, 59,
3064 60, 61, 62, 63, 64, 65, 66, 0, 0, 0,
3065 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3066 5, 6, 7, 8, 9, 0, 0, 279, 10, 11,
3067 0, 0, 0, 12, 526, 13, 14, 15, 16, 17,
3068 18, 19, 0, 0, 0, 0, 0, 20, 21, 22,
3069 23, 24, 25, 26, 0, 0, 27, 0, 0, 0,
3070 0, 0, 28, 29, 30, 31, 32, 33, 34, 35,
3071 36, 37, 38, 39, 40, 0, 41, 42, 43, 44,
3072 45, 46, 47, 0, 0, 0, 0, 0, 0, 0,
3073 0, 0, 48, 49, 0, 0, 0, 0, 0, 0,
3074 0, 0, 0, 0, 0, 0, 0, 50, 51, 0,
3075 0, 0, 0, 0, 0, 52, 0, 0, 53, 54,
3076 0, 55, 56, 0, 57, 0, 0, 58, 59, 60,
3077 61, 62, 63, 64, 65, 66, 0, 0, 0, 0,
3078 0, 0, 0, 0, 0, 0, 5, 6, 7, 0,
3079 9, 0, 0, 0, 10, 11, 67, 68, 69, 12,
3080 0, 13, 14, 15, 16, 17, 18, 19, 0, 0,
3081 0, 0, 0, 20, 21, 22, 23, 24, 25, 26,
3082 0, 0, 206, 0, 0, 0, 0, 0, 0, 29,
3083 0, 0, 32, 33, 34, 35, 36, 37, 38, 39,
3084 40, 207, 41, 42, 43, 44, 45, 46, 47, 0,
3085 0, 0, 0, 0, 0, 0, 0, 0, 48, 49,
3086 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3087 0, 0, 0, 50, 51, 0, 0, 0, 0, 0,
3088 0, 208, 0, 0, 209, 54, 0, 55, 56, 0,
3089 210, 211, 212, 58, 59, 213, 61, 62, 63, 64,
3090 65, 66, 0, 0, 0, 0, 0, 0, 0, 0,
3091 0, 0, 5, 6, 7, 8, 9, 0, 0, 0,
3092 10, 11, 67, 214, 69, 12, 0, 13, 14, 15,
3093 16, 17, 18, 19, 0, 0, 0, 0, 0, 20,
3094 21, 22, 23, 24, 25, 26, 0, 0, 27, 0,
3095 0, 0, 0, 0, 28, 29, 0, 31, 32, 33,
3096 34, 35, 36, 37, 38, 39, 40, 0, 41, 42,
3097 43, 44, 45, 46, 47, 0, 0, 0, 0, 0,
3098 0, 0, 0, 0, 48, 49, 0, 0, 0, 0,
3099 0, 0, 0, 0, 0, 0, 0, 0, 0, 50,
3100 51, 0, 0, 0, 0, 0, 0, 52, 0, 0,
3101 53, 54, 0, 55, 56, 0, 57, 0, 0, 58,
3102 59, 60, 61, 62, 63, 64, 65, 66, 0, 0,
3103 0, 0, 0, 0, 0, 0, 0, 0, 5, 6,
3104 7, 0, 9, 0, 0, 0, 10, 11, 67, 68,
3105 69, 12, 0, 13, 14, 15, 16, 17, 18, 19,
3106 0, 0, 0, 0, 0, 20, 21, 22, 23, 24,
3107 25, 26, 0, 0, 206, 0, 0, 0, 0, 0,
3108 0, 29, 0, 0, 32, 33, 34, 35, 36, 37,
3109 38, 39, 40, 207, 41, 42, 43, 44, 45, 46,
3110 47, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3111 48, 49, 0, 0, 0, 0, 0, 0, 0, 0,
3112 0, 0, 0, 0, 0, 50, 439, 0, 0, 0,
3113 0, 0, 0, 208, 0, 0, 209, 54, 0, 55,
3114 56, 0, 210, 211, 212, 58, 59, 213, 61, 62,
3115 63, 64, 65, 66, 0, 0, 0, 0, 0, 0,
3116 0, 0, 0, 0, 5, 6, 7, 0, 9, 0,
3117 0, 0, 10, 11, 67, 214, 69, 12, 0, 13,
3118 14, 15, 245, 246, 18, 19, 0, 0, 0, 0,
3119 0, 20, 247, 248, 23, 24, 25, 26, 0, 0,
3120 206, 0, 0, 0, 0, 0, 0, 29, 0, 0,
3121 32, 33, 34, 35, 36, 37, 38, 39, 40, 207,
3122 41, 42, 43, 44, 45, 46, 47, 0, 0, 0,
3123 0, 0, 0, 0, 0, 0, 48, 49, 0, 0,
3124 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3125 0, 50, 51, 0, 0, 0, 0, 0, 0, 208,
3126 0, 0, 209, 54, 0, 55, 56, 0, 621, 211,
3127 212, 58, 59, 213, 61, 62, 63, 64, 65, 66,
3128 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3129 5, 6, 7, 0, 9, 0, 0, 0, 10, 11,
3130 67, 214, 69, 12, 0, 13, 14, 15, 245, 246,
3131 18, 19, 0, 0, 0, 0, 0, 20, 247, 248,
3132 23, 24, 25, 26, 0, 0, 206, 0, 0, 0,
3133 0, 0, 0, 29, 0, 0, 32, 33, 34, 35,
3134 36, 37, 38, 39, 40, 207, 41, 42, 43, 44,
3135 45, 46, 47, 0, 0, 0, 0, 0, 0, 0,
3136 0, 0, 48, 49, 0, 0, 0, 0, 0, 0,
3137 0, 0, 0, 0, 0, 0, 0, 50, 439, 0,
3138 0, 0, 0, 0, 0, 208, 0, 0, 209, 54,
3139 0, 55, 56, 0, 621, 211, 212, 58, 59, 213,
3140 61, 62, 63, 64, 65, 66, 0, 0, 0, 0,
3141 0, 0, 0, 0, 0, 0, 5, 6, 7, 0,
3142 9, 0, 0, 0, 10, 11, 67, 214, 69, 12,
3143 0, 13, 14, 15, 245, 246, 18, 19, 0, 0,
3144 0, 0, 0, 20, 247, 248, 23, 24, 25, 26,
3145 0, 0, 206, 0, 0, 0, 0, 0, 0, 29,
3146 0, 0, 32, 33, 34, 35, 36, 37, 38, 39,
3147 40, 207, 41, 42, 43, 44, 45, 46, 47, 0,
3148 0, 0, 0, 0, 0, 0, 0, 0, 48, 49,
3149 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3150 0, 0, 0, 50, 51, 0, 0, 0, 0, 0,
3151 0, 208, 0, 0, 209, 54, 0, 55, 56, 0,
3152 210, 211, 0, 58, 59, 213, 61, 62, 63, 64,
3153 65, 66, 0, 0, 0, 0, 0, 0, 0, 0,
3154 0, 0, 5, 6, 7, 0, 9, 0, 0, 0,
3155 10, 11, 67, 214, 69, 12, 0, 13, 14, 15,
3156 245, 246, 18, 19, 0, 0, 0, 0, 0, 20,
3157 247, 248, 23, 24, 25, 26, 0, 0, 206, 0,
3158 0, 0, 0, 0, 0, 29, 0, 0, 32, 33,
3159 34, 35, 36, 37, 38, 39, 40, 207, 41, 42,
3160 43, 44, 45, 46, 47, 0, 0, 0, 0, 0,
3161 0, 0, 0, 0, 48, 49, 0, 0, 0, 0,
3162 0, 0, 0, 0, 0, 0, 0, 0, 0, 50,
3163 51, 0, 0, 0, 0, 0, 0, 208, 0, 0,
3164 209, 54, 0, 55, 56, 0, 0, 211, 212, 58,
3165 59, 213, 61, 62, 63, 64, 65, 66, 0, 0,
3166 0, 0, 0, 0, 0, 0, 0, 0, 5, 6,
3167 7, 0, 9, 0, 0, 0, 10, 11, 67, 214,
3168 69, 12, 0, 13, 14, 15, 245, 246, 18, 19,
3169 0, 0, 0, 0, 0, 20, 247, 248, 23, 24,
3170 25, 26, 0, 0, 206, 0, 0, 0, 0, 0,
3171 0, 29, 0, 0, 32, 33, 34, 35, 36, 37,
3172 38, 39, 40, 207, 41, 42, 43, 44, 45, 46,
3173 47, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3174 48, 49, 0, 0, 0, 0, 0, 0, 0, 0,
3175 0, 0, 0, 0, 0, 50, 51, 0, 0, 0,
3176 0, 0, 0, 208, 0, 0, 209, 54, 0, 55,
3177 56, 0, 621, 211, 0, 58, 59, 213, 61, 62,
3178 63, 64, 65, 66, 0, 0, 0, 0, 0, 0,
3179 0, 0, 0, 0, 5, 6, 7, 0, 9, 0,
3180 0, 0, 10, 11, 67, 214, 69, 12, 0, 13,
3181 14, 15, 245, 246, 18, 19, 0, 0, 0, 0,
3182 0, 20, 247, 248, 23, 24, 25, 26, 0, 0,
3183 206, 0, 0, 0, 0, 0, 0, 29, 0, 0,
3184 32, 33, 34, 35, 36, 37, 38, 39, 40, 207,
3185 41, 42, 43, 44, 45, 46, 47, 0, 0, 0,
3186 0, 0, 0, 0, 0, 0, 48, 49, 0, 0,
3187 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3188 0, 50, 51, 0, 0, 0, 0, 0, 0, 208,
3189 0, 0, 209, 54, 0, 55, 56, 0, 0, 211,
3190 0, 58, 59, 213, 61, 62, 63, 64, 65, 66,
3191 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3192 5, 6, 7, 0, 9, 0, 0, 0, 10, 11,
3193 67, 214, 69, 12, 0, 13, 14, 15, 16, 17,
3194 18, 19, 0, 0, 0, 0, 0, 20, 21, 22,
3195 23, 24, 25, 26, 0, 0, 206, 0, 0, 0,
3196 0, 0, 0, 29, 0, 0, 32, 33, 34, 35,
3197 36, 37, 38, 39, 40, 0, 41, 42, 43, 44,
3198 45, 46, 47, 0, 0, 0, 0, 0, 0, 0,
3199 0, 0, 48, 49, 0, 0, 0, 0, 0, 0,
3200 0, 0, 0, 0, 0, 0, 0, 50, 51, 0,
3201 0, 0, 0, 0, 0, 208, 0, 0, 209, 54,
3202 0, 55, 56, 0, 519, 0, 0, 58, 59, 60,
3203 61, 62, 63, 64, 65, 66, 0, 0, 0, 0,
3204 0, 0, 0, 0, 0, 0, 5, 6, 7, 0,
3205 9, 0, 0, 0, 10, 11, 67, 214, 69, 12,
3206 0, 13, 14, 15, 245, 246, 18, 19, 0, 0,
3207 0, 0, 0, 20, 247, 248, 23, 24, 25, 26,
3208 0, 0, 206, 0, 0, 0, 0, 0, 0, 29,
3209 0, 0, 32, 33, 34, 35, 36, 37, 38, 39,
3210 40, 0, 41, 42, 43, 44, 45, 46, 47, 0,
3211 0, 0, 0, 0, 0, 0, 0, 0, 48, 49,
3212 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3213 0, 0, 0, 50, 51, 0, 0, 0, 0, 0,
3214 0, 208, 0, 0, 209, 54, 0, 55, 56, 0,
3215 773, 0, 0, 58, 59, 60, 61, 62, 63, 64,
3216 65, 66, 0, 0, 0, 0, 0, 0, 0, 0,
3217 0, 0, 5, 6, 7, 0, 9, 0, 0, 0,
3218 10, 11, 67, 214, 69, 12, 0, 13, 14, 15,
3219 245, 246, 18, 19, 0, 0, 0, 0, 0, 20,
3220 247, 248, 23, 24, 25, 26, 0, 0, 206, 0,
3221 0, 0, 0, 0, 0, 29, 0, 0, 32, 33,
3222 34, 35, 36, 37, 38, 39, 40, 0, 41, 42,
3223 43, 44, 45, 46, 47, 0, 0, 0, 0, 0,
3224 0, 0, 0, 0, 48, 49, 0, 0, 0, 0,
3225 0, 0, 0, 0, 0, 0, 0, 0, 0, 50,
3226 51, 0, 0, 0, 0, 0, 0, 208, 0, 0,
3227 209, 54, 0, 55, 56, 0, 519, 0, 0, 58,
3228 59, 60, 61, 62, 63, 64, 65, 66, 0, 0,
3229 0, 0, 0, 0, 0, 0, 0, 0, 5, 6,
3230 7, 0, 9, 0, 0, 0, 10, 11, 67, 214,
3231 69, 12, 0, 13, 14, 15, 245, 246, 18, 19,
3232 0, 0, 0, 0, 0, 20, 247, 248, 23, 24,
3233 25, 26, 0, 0, 206, 0, 0, 0, 0, 0,
3234 0, 29, 0, 0, 32, 33, 34, 35, 36, 37,
3235 38, 39, 40, 0, 41, 42, 43, 44, 45, 46,
3236 47, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3237 48, 49, 0, 0, 0, 0, 0, 0, 0, 0,
3238 0, 0, 0, 0, 0, 50, 51, 0, 0, 0,
3239 0, 0, 0, 208, 0, 0, 209, 54, 0, 55,
3240 56, 0, 846, 0, 0, 58, 59, 60, 61, 62,
3241 63, 64, 65, 66, 0, 0, 0, 0, 0, 0,
3242 0, 0, 0, 0, 5, 6, 7, 0, 9, 0,
3243 0, 0, 10, 11, 67, 214, 69, 12, 0, 13,
3244 14, 15, 245, 246, 18, 19, 0, 0, 0, 0,
3245 0, 20, 247, 248, 23, 24, 25, 26, 0, 0,
3246 206, 0, 0, 0, 0, 0, 0, 29, 0, 0,
3247 32, 33, 34, 35, 36, 37, 38, 39, 40, 0,
3248 41, 42, 43, 44, 45, 46, 47, 0, 0, 0,
3249 0, 0, 0, 0, 0, 0, 48, 49, 0, 0,
3250 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3251 0, 50, 51, 0, 0, 0, 0, 0, 0, 208,
3252 0, 0, 209, 54, 0, 55, 56, 0, 1019, 0,
3253 0, 58, 59, 60, 61, 62, 63, 64, 65, 66,
3254 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3255 5, 6, 7, 0, 9, 0, 0, 0, 10, 11,
3256 67, 214, 69, 12, 0, 13, 14, 15, 245, 246,
3257 18, 19, 0, 0, 0, 0, 0, 20, 247, 248,
3258 23, 24, 25, 26, 0, 0, 206, 0, 0, 0,
3259 0, 0, 0, 29, 0, 0, 32, 33, 34, 35,
3260 36, 37, 38, 39, 40, 0, 41, 42, 43, 44,
3261 45, 46, 47, 0, 0, 0, 0, 0, 0, 0,
3262 0, 0, 48, 49, 0, 0, 0, 0, 0, 0,
3263 0, 0, 0, 0, 0, 0, 0, 50, 51, 0,
3264 0, 0, 0, 0, 0, 208, 0, 0, 209, 54,
3265 0, 55, 56, 0, 0, 0, 0, 58, 59, 60,
3266 61, 62, 63, 64, 65, 66, 0, 0, 0, 0,
3267 0, 0, 0, 0, 0, 0, 5, 6, 7, 0,
3268 9, 0, 0, 0, 10, 11, 67, 214, 69, 12,
3269 0, 13, 14, 15, 16, 17, 18, 19, 0, 0,
3270 0, 0, 0, 20, 21, 22, 23, 24, 25, 26,
3271 0, 0, 206, 0, 0, 0, 0, 0, 0, 29,
3272 0, 0, 32, 33, 34, 35, 36, 37, 38, 39,
3273 40, 0, 41, 42, 43, 44, 45, 46, 47, 0,
3274 0, 0, 0, 0, 0, 0, 0, 0, 48, 49,
3275 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3276 0, 0, 0, 50, 51, 0, 0, 0, 0, 0,
3277 0, 208, 0, 0, 209, 54, 0, 55, 56, 0,
3278 0, 0, 0, 58, 59, 60, 61, 62, 63, 64,
3279 65, 66, 0, 0, 0, 0, 0, 0, 0, 0,
3280 0, 0, 5, 6, 7, 0, 9, 0, 0, 0,
3281 10, 11, 67, 214, 69, 12, 0, 13, 14, 15,
3282 16, 17, 18, 19, 0, 0, 0, 0, 0, 20,
3283 21, 22, 23, 24, 25, 26, 0, 0, 27, 0,
3284 0, 0, 0, 0, 0, 29, 0, 0, 32, 33,
3285 34, 35, 36, 37, 38, 39, 40, 0, 41, 42,
3286 43, 44, 45, 46, 47, 0, 0, 0, 0, 0,
3287 0, 0, 0, 0, 48, 49, 0, 0, 0, 0,
3288 0, 0, 0, 0, 0, 0, 0, 0, 0, 50,
3289 51, 0, 0, 0, 0, 0, 0, 208, 0, 0,
3290 209, 54, 0, 55, 56, 0, 0, 0, 0, 58,
3291 59, 60, 61, 62, 63, 64, 65, 66, 0, 0,
3292 0, 0, 0, 0, 0, 0, 0, 0, 5, 6,
3293 7, 0, 9, 0, 0, 0, 10, 11, 67, 68,
3294 69, 12, 0, 13, 14, 15, 245, 246, 18, 19,
3295 0, 0, 0, 0, 0, 20, 247, 248, 23, 24,
3296 25, 26, 0, 0, 206, 0, 0, 0, 0, 0,
3297 0, 277, 0, 0, 32, 33, 34, 35, 36, 37,
3298 38, 39, 40, 0, 41, 42, 43, 44, 45, 46,
3299 47, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3300 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3301 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3302 0, 0, 0, 278, 0, 0, 328, 54, 0, 55,
3303 56, 0, 329, 0, 0, 58, 59, 60, 61, 62,
3304 63, 64, 65, 66, 0, 0, 0, 0, 0, 0,
3305 5, 6, 7, 0, 9, 0, 0, 0, 10, 11,
3306 0, 0, 0, 12, 279, 13, 14, 15, 245, 246,
3307 18, 19, 0, 0, 0, 0, 0, 20, 247, 248,
3308 23, 24, 25, 26, 0, 0, 206, 0, 0, 0,
3309 0, 0, 0, 277, 0, 0, 32, 33, 34, 35,
3310 36, 37, 38, 39, 40, 0, 41, 42, 43, 44,
3311 45, 46, 47, 0, 0, 0, 0, 0, 0, 0,
3312 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3313 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3314 0, 0, 0, 0, 0, 376, 0, 0, 53, 54,
3315 0, 55, 56, 0, 57, 0, 0, 58, 59, 60,
3316 61, 62, 63, 64, 65, 66, 0, 0, 0, 0,
3317 0, 0, 5, 6, 7, 0, 9, 0, 0, 0,
3318 10, 11, 0, 0, 0, 12, 279, 13, 14, 15,
3319 245, 246, 18, 19, 0, 0, 0, 0, 0, 20,
3320 247, 248, 23, 24, 25, 26, 0, 0, 206, 0,
3321 0, 0, 0, 0, 0, 277, 0, 0, 32, 33,
3322 34, 384, 36, 37, 38, 385, 40, 0, 41, 42,
3323 43, 44, 45, 46, 47, 0, 0, 0, 0, 0,
3324 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3325 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3326 0, 0, 0, 386, 0, 0, 0, 387, 0, 0,
3327 209, 54, 0, 55, 56, 0, 0, 0, 0, 58,
3328 59, 60, 61, 62, 63, 64, 65, 66, 0, 0,
3329 0, 0, 0, 0, 5, 6, 7, 0, 9, 0,
3330 0, 0, 10, 11, 0, 0, 0, 12, 279, 13,
3331 14, 15, 245, 246, 18, 19, 0, 0, 0, 0,
3332 0, 20, 247, 248, 23, 24, 25, 26, 0, 0,
3333 206, 0, 0, 0, 0, 0, 0, 277, 0, 0,
3334 32, 33, 34, 384, 36, 37, 38, 385, 40, 0,
3335 41, 42, 43, 44, 45, 46, 47, 0, 0, 0,
3336 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3337 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3338 0, 0, 0, 0, 0, 0, 0, 0, 0, 387,
3339 0, 0, 209, 54, 0, 55, 56, 0, 0, 0,
3340 0, 58, 59, 60, 61, 62, 63, 64, 65, 66,
3341 0, 0, 0, 0, 0, 0, 5, 6, 7, 0,
3342 9, 0, 0, 0, 10, 11, 0, 0, 0, 12,
3343 279, 13, 14, 15, 245, 246, 18, 19, 0, 0,
3344 0, 0, 0, 20, 247, 248, 23, 24, 25, 26,
3345 0, 0, 206, 0, 0, 0, 0, 0, 0, 277,
3346 0, 0, 32, 33, 34, 35, 36, 37, 38, 39,
3347 40, 0, 41, 42, 43, 44, 45, 46, 47, 0,
3348 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3349 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3350 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3351 0, 278, 0, 0, 328, 54, 0, 55, 56, 0,
3352 0, 0, 0, 58, 59, 60, 61, 62, 63, 64,
3353 65, 66, 0, 0, 0, 0, 0, 0, 5, 6,
3354 7, 0, 9, 0, 0, 0, 10, 11, 0, 0,
3355 0, 12, 279, 13, 14, 15, 245, 246, 18, 19,
3356 0, 0, 0, 0, 0, 20, 247, 248, 23, 24,
3357 25, 26, 0, 0, 206, 0, 0, 0, 0, 0,
3358 0, 277, 0, 0, 32, 33, 34, 35, 36, 37,
3359 38, 39, 40, 0, 41, 42, 43, 44, 45, 46,
3360 47, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3361 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3362 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3363 0, 0, 0, 1009, 0, 0, 209, 54, 0, 55,
3364 56, 0, 0, 0, 0, 58, 59, 60, 61, 62,
3365 63, 64, 65, 66, 0, 0, 0, 0, 0, 0,
3366 5, 6, 7, 0, 9, 0, 0, 0, 10, 11,
3367 0, 0, 0, 12, 279, 13, 14, 15, 245, 246,
3368 18, 19, 0, 0, 0, 0, 0, 20, 247, 248,
3369 23, 24, 25, 26, 0, 0, 206, 0, 0, 0,
3370 0, 0, 0, 277, 0, 0, 32, 33, 34, 35,
3371 36, 37, 38, 39, 40, 0, 41, 42, 43, 44,
3372 45, 46, 47, 23, 24, 25, 26, 0, 0, 0,
3373 0, 0, 0, 0, 0, 0, 0, 0, 0, 32,
3374 33, 34, 784, 0, 0, 0, 785, 0, 0, 41,
3375 42, 43, 44, 45, 0, 1062, 0, 0, 209, 54,
3376 0, 55, 56, 0, 0, 0, 0, 58, 59, 60,
3377 61, 62, 63, 64, 65, 66, 0, 0, 0, 0,
3378 786, 787, 0, 0, 0, 0, 0, 0, 788, 0,
3379 0, 789, 0, 0, 790, 791, 279, 980, 0, 0,
3380 792, 59, 60, 61, 62, 63, 64, 65, 66, 23,
3381 24, 25, 26, 0, 0, 0, 0, 0, 0, 0,
3382 0, 0, 793, 0, 0, 32, 33, 34, 784, 279,
3383 0, 0, 785, 0, 0, 41, 42, 43, 44, 45,
3384 0, 0, 23, 24, 25, 26, 0, 0, 0, 0,
3385 0, 0, 0, 0, 0, 0, 0, 0, 32, 33,
3386 34, 784, 0, 0, 0, 785, 786, 787, 41, 42,
3387 43, 44, 45, 0, 788, 0, 0, 789, 0, 0,
3388 790, 791, 0, 1077, 0, 0, 792, 59, 60, 61,
3389 62, 63, 64, 65, 66, 0, 0, 0, 0, 786,
3390 787, 0, 0, 0, 0, 0, 0, 788, 793, 0,
3391 789, 0, 0, 790, 791, 279, 0, 0, 0, 792,
3392 59, 60, 61, 62, 63, 64, 65, 66, 564, 565,
3393 0, 0, 566, 0, 0, 0, 0, 0, 0, 0,
3394 0, 793, 0, 0, 0, 0, 0, 0, 279, 0,
3395 0, 170, 171, 172, 173, 174, 175, 176, 177, 178,
3396 0, 0, 179, 180, 0, 0, 0, 0, 181, 182,
3397 183, 184, 0, 0, 0, 0, 0, 0, 0, 0,
3398 0, 0, 0, 185, 186, 0, 0, 0, 0, 0,
3399 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3400 0, 0, 0, 0, 0, 187, 188, 189, 190, 191,
3401 192, 193, 194, 195, 196, 0, 197, 198, 573, 574,
3402 0, 0, 575, 199, 233, 0, 0, 0, 0, 0,
3403 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3404 0, 170, 171, 172, 173, 174, 175, 176, 177, 178,
3405 0, 0, 179, 180, 0, 0, 0, 0, 181, 182,
3406 183, 184, 0, 0, 0, 0, 0, 0, 0, 0,
3407 0, 0, 0, 185, 186, 0, 0, 0, 0, 0,
3408 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3409 0, 0, 0, 0, 0, 187, 188, 189, 190, 191,
3410 192, 193, 194, 195, 196, 0, 197, 198, 625, 565,
3411 0, 0, 626, 199, 233, 0, 0, 0, 0, 0,
3412 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3413 0, 170, 171, 172, 173, 174, 175, 176, 177, 178,
3414 0, 0, 179, 180, 0, 0, 0, 0, 181, 182,
3415 183, 184, 0, 0, 0, 0, 0, 0, 0, 0,
3416 0, 0, 0, 185, 186, 0, 0, 0, 0, 0,
3417 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3418 0, 0, 0, 0, 0, 187, 188, 189, 190, 191,
3419 192, 193, 194, 195, 196, 0, 197, 198, 628, 574,
3420 0, 0, 629, 199, 233, 0, 0, 0, 0, 0,
3421 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3422 0, 170, 171, 172, 173, 174, 175, 176, 177, 178,
3423 0, 0, 179, 180, 0, 0, 0, 0, 181, 182,
3424 183, 184, 0, 0, 0, 0, 0, 0, 0, 0,
3425 0, 0, 0, 185, 186, 0, 0, 0, 0, 0,
3426 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3427 0, 0, 0, 0, 0, 187, 188, 189, 190, 191,
3428 192, 193, 194, 195, 196, 0, 197, 198, 653, 565,
3429 0, 0, 654, 199, 233, 0, 0, 0, 0, 0,
3430 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3431 0, 170, 171, 172, 173, 174, 175, 176, 177, 178,
3432 0, 0, 179, 180, 0, 0, 0, 0, 181, 182,
3433 183, 184, 0, 0, 0, 0, 0, 0, 0, 0,
3434 0, 0, 0, 185, 186, 0, 0, 0, 0, 0,
3435 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3436 0, 0, 0, 0, 0, 187, 188, 189, 190, 191,
3437 192, 193, 194, 195, 196, 0, 197, 198, 656, 574,
3438 0, 0, 657, 199, 233, 0, 0, 0, 0, 0,
3439 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3440 0, 170, 171, 172, 173, 174, 175, 176, 177, 178,
3441 0, 0, 179, 180, 0, 0, 0, 0, 181, 182,
3442 183, 184, 0, 0, 0, 0, 0, 0, 0, 0,
3443 0, 0, 0, 185, 186, 0, 0, 0, 0, 0,
3444 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3445 0, 0, 0, 0, 0, 187, 188, 189, 190, 191,
3446 192, 193, 194, 195, 196, 0, 197, 198, 724, 565,
3447 0, 0, 725, 199, 233, 0, 0, 0, 0, 0,
3448 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3449 0, 170, 171, 172, 173, 174, 175, 176, 177, 178,
3450 0, 0, 179, 180, 0, 0, 0, 0, 181, 182,
3451 183, 184, 0, 0, 0, 0, 0, 0, 0, 0,
3452 0, 0, 0, 185, 186, 0, 0, 0, 0, 0,
3453 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3454 0, 0, 0, 0, 0, 187, 188, 189, 190, 191,
3455 192, 193, 194, 195, 196, 0, 197, 198, 727, 574,
3456 0, 0, 728, 199, 233, 0, 0, 0, 0, 0,
3457 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3458 0, 170, 171, 172, 173, 174, 175, 176, 177, 178,
3459 0, 0, 179, 180, 0, 0, 0, 0, 181, 182,
3460 183, 184, 0, 0, 0, 0, 0, 0, 0, 0,
3461 0, 0, 0, 185, 186, 0, 0, 0, 0, 0,
3462 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3463 0, 0, 0, 0, 0, 187, 188, 189, 190, 191,
3464 192, 193, 194, 195, 196, 0, 197, 198, 733, 565,
3465 0, 0, 734, 199, 233, 0, 0, 0, 0, 0,
3466 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3467 0, 170, 171, 172, 173, 174, 175, 176, 177, 178,
3468 0, 0, 179, 180, 0, 0, 0, 0, 181, 182,
3469 183, 184, 0, 0, 0, 0, 0, 0, 0, 0,
3470 0, 0, 0, 185, 186, 0, 0, 0, 0, 0,
3471 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3472 0, 0, 0, 0, 0, 187, 188, 189, 190, 191,
3473 192, 193, 194, 195, 196, 0, 197, 198, 610, 574,
3474 0, 0, 611, 199, 233, 0, 0, 0, 0, 0,
3475 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3476 0, 170, 171, 172, 173, 174, 175, 176, 177, 178,
3477 0, 0, 179, 180, 0, 0, 0, 0, 181, 182,
3478 183, 184, 0, 0, 0, 0, 0, 0, 0, 0,
3479 0, 0, 0, 185, 186, 0, 0, 0, 0, 0,
3480 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3481 0, 0, 0, 0, 0, 187, 188, 189, 190, 191,
3482 192, 193, 194, 195, 196, 0, 197, 198, 779, 565,
3483 0, 0, 780, 199, 233, 0, 0, 0, 0, 0,
3484 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3485 0, 170, 171, 172, 173, 174, 175, 176, 177, 178,
3486 0, 0, 179, 180, 0, 0, 0, 0, 181, 182,
3487 183, 184, 0, 0, 0, 0, 0, 0, 0, 0,
3488 0, 0, 0, 185, 186, 0, 0, 0, 0, 0,
3489 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3490 0, 0, 0, 0, 0, 187, 188, 189, 190, 191,
3491 192, 193, 194, 195, 196, 0, 197, 198, 782, 574,
3492 0, 0, 783, 199, 233, 0, 0, 0, 0, 0,
3493 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3494 0, 170, 171, 172, 173, 174, 175, 176, 177, 178,
3495 0, 0, 179, 180, 0, 0, 0, 0, 181, 182,
3496 183, 184, 0, 0, 0, 0, 0, 0, 0, 0,
3497 0, 0, 0, 185, 186, 0, 0, 0, 0, 0,
3498 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3499 0, 0, 0, 0, 0, 187, 188, 189, 190, 191,
3500 192, 193, 194, 195, 196, 0, 197, 198, 1161, 565,
3501 0, 0, 1162, 199, 233, 0, 0, 0, 0, 0,
3502 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3503 0, 170, 171, 172, 173, 174, 175, 176, 177, 178,
3504 0, 0, 179, 180, 0, 0, 0, 0, 181, 182,
3505 183, 184, 0, 0, 0, 0, 0, 0, 0, 0,
3506 0, 0, 0, 185, 186, 0, 0, 0, 0, 0,
3507 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3508 0, 0, 0, 0, 0, 187, 188, 189, 190, 191,
3509 192, 193, 194, 195, 196, 0, 197, 198, 1164, 574,
3510 0, 0, 1165, 199, 233, 0, 0, 0, 0, 0,
3511 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3512 0, 170, 171, 172, 173, 174, 175, 176, 177, 178,
3513 0, 0, 179, 180, 0, 0, 0, 0, 181, 182,
3514 183, 184, 0, 0, 0, 0, 0, 0, 0, 0,
3515 0, 0, 0, 185, 186, 0, 0, 0, 0, 0,
3516 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3517 0, 0, 0, 0, 0, 187, 188, 189, 190, 191,
3518 192, 193, 194, 195, 196, 0, 197, 198, 1196, 565,
3519 0, 0, 1197, 199, 233, 0, 0, 0, 0, 0,
3520 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3521 0, 170, 171, 172, 173, 174, 175, 176, 177, 178,
3522 0, 0, 179, 180, 0, 0, 0, 0, 181, 182,
3523 183, 184, 0, 0, 0, 0, 0, 0, 0, 0,
3524 0, 0, 0, 185, 186, 0, 0, 0, 0, 0,
3525 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3526 0, 0, 0, 0, 0, 187, 188, 189, 190, 191,
3527 192, 193, 194, 195, 196, 0, 197, 198, 610, 574,
3528 0, 0, 611, 199, 233, 0, 0, 0, 0, 0,
3529 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3530 0, 170, 171, 172, 173, 174, 175, 176, 177, 178,
3531 0, 0, 179, 180, 0, 0, 0, 0, 181, 182,
3532 183, 184, 0, 0, 0, 0, 0, 0, 0, 0,
3533 0, 0, 0, 185, 186, 0, 0, 0, 0, 0,
3534 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3535 0, 0, 0, 0, 0, 187, 188, 189, 190, 191,
3536 192, 193, 194, 195, 196, 0, 197, 198, 0, 0,
3537 0, 0, 0, 199
3538};
3539
3540static const yytype_int16 yycheck[] =
3541{
3542 2, 59, 53, 89, 60, 369, 102, 22, 91, 92,
3543 8, 71, 95, 8, 364, 101, 71, 28, 712, 94,
3544 16, 17, 227, 4, 331, 57, 92, 634, 271, 95,
3545 28, 719, 275, 28, 2, 95, 4, 897, 898, 13,
3546 433, 99, 387, 68, 425, 363, 67, 365, 16, 17,
3547 627, 83, 433, 55, 56, 16, 17, 83, 95, 604,
3548 53, 59, 25, 78, 96, 97, 98, 331, 57, 1044,
3549 2, 1072, 4, 1112, 13, 897, 898, 963, 655, 429,
3550 473, 27, 22, 1110, 860, 53, 54, 690, 858, 57,
3551 860, 482, 868, 411, 55, 295, 296, 25, 868, 928,
3552 68, 99, 68, 100, 100, 259, 414, 415, 16, 17,
3553 428, 1068, 430, 146, 0, 83, 16, 17, 1033, 13,
3554 153, 26, 54, 91, 92, 66, 153, 95, 96, 97,
3555 98, 97, 100, 68, 484, 526, 222, 1052, 78, 100,
3556 458, 870, 25, 786, 787, 1060, 68, 55, 56, 726,
3557 414, 415, 25, 236, 1033, 238, 153, 213, 209, 736,
3558 1151, 96, 97, 126, 1155, 251, 25, 485, 1054, 25,
3559 37, 38, 146, 1052, 328, 97, 1215, 151, 119, 153,
3560 56, 25, 958, 146, 146, 148, 149, 732, 958, 1216,
3561 153, 153, 100, 244, 1023, 1024, 1018, 283, 946, 947,
3562 100, 261, 1177, 1204, 781, 151, 261, 153, 259, 148,
3563 145, 13, 151, 790, 153, 13, 13, 1208, 146, 221,
3564 148, 969, 970, 971, 261, 227, 13, 310, 311, 312,
3565 313, 233, 315, 316, 230, 1192, 232, 233, 143, 444,
3566 242, 209, 592, 636, 310, 311, 312, 313, 280, 892,
3567 893, 858, 602, 634, 280, 636, 601, 151, 279, 153,
3568 25, 13, 230, 146, 232, 233, 259, 1182, 236, 230,
3569 238, 232, 233, 146, 242, 593, 244, 328, 881, 882,
3570 27, 1110, 29, 1112, 1199, 603, 153, 146, 371, 257,
3571 146, 259, 683, 379, 897, 898, 25, 329, 498, 13,
3572 500, 326, 146, 386, 1033, 371, 331, 852, 248, 249,
3573 242, 1171, 280, 373, 859, 1044, 52, 698, 895, 370,
3574 29, 372, 230, 1052, 232, 257, 13, 1021, 309, 874,
3575 230, 1060, 232, 1021, 13, 328, 373, 25, 688, 1068,
3576 329, 309, 310, 311, 312, 313, 314, 315, 316, 151,
3577 148, 153, 109, 151, 151, 153, 153, 25, 326, 52,
3578 328, 329, 364, 331, 151, 326, 153, 365, 364, 687,
3579 331, 689, 695, 1121, 25, 25, 133, 309, 983, 143,
3580 703, 146, 314, 148, 692, 693, 1215, 1216, 991, 414,
3581 415, 699, 700, 26, 1142, 884, 364, 126, 366, 151,
3582 707, 153, 370, 371, 372, 982, 66, 650, 897, 898,
3583 146, 37, 38, 411, 123, 1018, 68, 146, 386, 624,
3584 149, 685, 99, 143, 153, 365, 1033, 429, 692, 693,
3585 1007, 1008, 430, 429, 152, 699, 700, 151, 97, 153,
3586 442, 452, 444, 788, 96, 97, 414, 415, 1177, 126,
3587 482, 537, 99, 146, 452, 100, 482, 452, 146, 119,
3588 458, 429, 662, 1192, 151, 26, 153, 667, 152, 146,
3589 1075, 126, 151, 866, 153, 126, 126, 100, 146, 126,
3590 82, 83, 484, 68, 848, 866, 145, 485, 484, 148,
3591 430, 146, 68, 145, 526, 146, 146, 465, 149, 149,
3592 526, 146, 153, 153, 66, 67, 150, 68, 1053, 153,
3593 143, 819, 97, 77, 482, 148, 484, 425, 458, 594,
3594 96, 97, 605, 146, 414, 415, 586, 129, 130, 1018,
3595 277, 582, 148, 584, 99, 96, 97, 153, 68, 903,
3596 152, 431, 432, 870, 908, 485, 1151, 1036, 753, 894,
3597 1155, 1245, 99, 66, 569, 819, 639, 66, 526, 121,
3598 122, 126, 470, 578, 68, 152, 96, 97, 1171, 459,
3599 572, 858, 136, 137, 138, 1064, 578, 28, 580, 126,
3600 34, 146, 143, 870, 145, 1130, 1163, 148, 14, 15,
3601 592, 15, 96, 97, 1083, 593, 592, 612, 52, 68,
3602 602, 25, 1207, 1208, 68, 603, 602, 618, 121, 122,
3603 612, 68, 121, 122, 582, 145, 584, 99, 148, 651,
3604 618, 126, 624, 618, 592, 651, 68, 96, 97, 569,
3605 68, 146, 96, 97, 602, 58, 604, 605, 578, 152,
3606 97, 145, 644, 152, 126, 741, 126, 2, 731, 4,
3607 99, 683, 99, 593, 77, 97, 112, 683, 96, 97,
3608 685, 16, 17, 603, 146, 731, 66, 692, 693, 99,
3609 730, 639, 612, 68, 699, 700, 145, 126, 729, 126,
3610 68, 145, 740, 651, 99, 108, 688, 99, 146, 112,
3611 56, 689, 688, 146, 68, 153, 26, 146, 53, 54,
3612 68, 96, 97, 643, 644, 707, 708, 145, 710, 97,
3613 712, 126, 680, 68, 126, 683, 684, 685, 66, 119,
3614 688, 121, 122, 97, 692, 693, 634, 68, 148, 97,
3615 68, 699, 700, 1060, 146, 1099, 91, 92, 68, 126,
3616 95, 1068, 740, 1070, 1094, 100, 707, 9, 680, 689,
3617 145, 753, 684, 15, 837, 96, 97, 1044, 96, 97,
3618 1047, 729, 99, 731, 732, 99, 96, 97, 770, 68,
3619 772, 837, 58, 121, 122, 144, 124, 1095, 34, 100,
3620 831, 1068, 66, 1070, 153, 836, 146, 99, 68, 126,
3621 698, 77, 126, 853, 819, 99, 52, 96, 97, 68,
3622 68, 146, 692, 693, 145, 68, 553, 145, 870, 699,
3623 700, 68, 146, 143, 126, 145, 68, 97, 148, 148,
3624 871, 99, 108, 109, 571, 827, 99, 96, 97, 97,
3625 88, 89, 99, 96, 97, 119, 77, 121, 122, 96,
3626 97, 40, 41, 66, 96, 97, 145, 133, 126, 518,
3627 148, 819, 99, 126, 209, 906, 148, 747, 748, 126,
3628 750, 751, 149, 831, 915, 1192, 66, 1194, 836, 837,
3629 902, 126, 1199, 146, 1201, 230, 145, 232, 233, 126,
3630 627, 236, 145, 238, 852, 99, 99, 242, 145, 244,
3631 1177, 859, 1179, 145, 56, 955, 119, 1184, 121, 122,
3632 150, 124, 257, 871, 259, 1192, 874, 1194, 655, 144,
3633 579, 1238, 126, 126, 1201, 146, 585, 54, 587, 119,
3634 77, 121, 122, 26, 124, 1011, 77, 64, 65, 819,
3635 106, 987, 52, 52, 902, 967, 56, 56, 906, 149,
3636 146, 56, 944, 153, 946, 947, 1233, 915, 1004, 151,
3637 151, 1238, 153, 25, 309, 310, 311, 312, 313, 314,
3638 315, 316, 130, 77, 1015, 68, 1017, 969, 970, 971,
3639 15, 326, 17, 328, 864, 149, 331, 66, 144, 726,
3640 94, 95, 146, 134, 135, 136, 137, 138, 146, 736,
3641 870, 144, 146, 96, 97, 144, 146, 66, 1060, 967,
3642 10, 146, 1064, 146, 146, 1056, 1068, 44, 1070, 364,
3643 44, 366, 146, 126, 1016, 370, 371, 372, 8, 1021,
3644 134, 135, 136, 137, 138, 13, 66, 1059, 25, 152,
3645 119, 386, 121, 122, 781, 17, 152, 144, 870, 150,
3646 143, 146, 145, 790, 791, 148, 128, 1015, 15, 1017,
3647 119, 720, 121, 122, 723, 59, 60, 61, 62, 414,
3648 415, 54, 55, 690, 57, 858, 146, 860, 737, 148,
3649 131, 64, 65, 146, 429, 868, 52, 870, 100, 119,
3650 1131, 121, 122, 131, 236, 1053, 1169, 1170, 1056, 100,
3651 146, 1059, 1094, 144, 1096, 52, 1098, 1095, 1094, 126,
3652 146, 52, 146, 1169, 1170, 40, 41, 42, 43, 44,
3653 465, 146, 264, 146, 146, 2, 268, 4, 52, 1121,
3654 146, 126, 131, 870, 56, 146, 1094, 146, 146, 484,
3655 1192, 52, 1194, 54, 55, 56, 57, 1199, 146, 1201,
3656 1142, 52, 9, 54, 55, 56, 57, 146, 895, 52,
3657 151, 54, 55, 56, 57, 1095, 1036, 146, 131, 786,
3658 787, 1041, 1130, 1131, 56, 958, 53, 54, 146, 838,
3659 57, 146, 841, 52, 146, 844, 1238, 146, 146, 2,
3660 1060, 4, 851, 146, 1064, 854, 146, 146, 1068, 120,
3661 1070, 1242, 144, 16, 17, 149, 83, 146, 101, 146,
3662 146, 1169, 1170, 52, 1036, 54, 55, 56, 57, 96,
3663 97, 98, 99, 146, 242, 461, 963, 146, 146, 146,
3664 146, 465, 96, 148, 148, 98, 146, 582, 1060, 584,
3665 53, 54, 1064, 146, 87, 982, 1068, 592, 1070, 77,
3666 1033, 988, 612, 1245, 1098, 68, 708, 602, 917, 604,
3667 605, 1044, 101, 1023, 881, 882, 94, 95, 107, 1052,
3668 1007, 1008, 1110, 870, 891, 892, 893, 1060, 91, 92,
3669 897, 898, 95, 772, 1242, 1068, 887, 100, 1204, 742,
3670 514, 973, 974, 435, 639, 954, 324, 1245, 440, 1083,
3671 891, 443, 1018, 1083, 446, 133, 134, 135, 136, 137,
3672 138, 1083, 105, 889, 1096, 1016, 500, 1054, 99, 957,
3673 462, 1036, 1192, 1064, 1194, 467, 1060, 988, -1, 1199,
3674 -1, 1201, 209, -1, -1, 680, -1, -1, -1, 684,
3675 685, -1, -1, 688, -1, -1, -1, 692, 693, -1,
3676 -1, -1, -1, -1, 699, 700, -1, -1, -1, -1,
3677 -1, -1, -1, -1, -1, 242, 983, 244, 1238, -1,
3678 1192, 949, 1194, 951, 991, 690, -1, 1199, -1, 1201,
3679 257, -1, 259, 525, 729, -1, 731, 732, -1, -1,
3680 -1, -1, -1, -1, 1177, -1, 209, -1, -1, -1,
3681 -1, 1018, -1, 280, -1, -1, -1, -1, -1, 1192,
3682 -1, 1148, -1, -1, -1, -1, 1238, 230, -1, 232,
3683 233, -1, -1, 236, -1, 238, 1163, -1, -1, 242,
3684 -1, 244, 309, -1, -1, -1, -1, 314, -1, -1,
3685 -1, -1, -1, -1, 257, -1, 259, -1, -1, -1,
3686 -1, 328, 329, -1, -1, 1137, 1138, -1, 1075, -1,
3687 -1, 1143, -1, 1145, 1146, -1, -1, -1, -1, 1128,
3688 -1, 786, 787, -1, 819, -1, -1, 56, -1, 52,
3689 -1, 54, 55, 56, 57, 58, 831, -1, -1, 366,
3690 -1, 836, 837, 370, -1, 372, 309, 310, 311, 312,
3691 313, 314, 315, 316, 77, -1, -1, 852, -1, -1,
3692 -1, -1, -1, 326, 859, 328, -1, -1, 331, -1,
3693 -1, -1, -1, -1, -1, -1, 871, -1, 101, 874,
3694 1189, -1, -1, -1, 1151, 108, 109, -1, 1155, 1117,
3695 1118, 1223, 1224, 1225, 1226, 1123, -1, 1125, -1, 1127,
3696 -1, 364, -1, 366, 1171, -1, -1, 370, 371, 372,
3697 133, 906, 1244, -1, -1, -1, 881, 882, -1, -1,
3698 915, -1, -1, 386, -1, -1, 891, 892, 893, -1,
3699 -1, -1, 897, 898, -1, -1, -1, -1, 465, -1,
3700 1207, 1208, -1, -1, -1, -1, 738, -1, -1, -1,
3701 -1, 414, 415, -1, -1, 482, -1, -1, -1, -1,
3702 752, -1, 754, -1, -1, -1, 429, -1, 52, -1,
3703 54, 55, 56, 57, 58, -1, 25, -1, 207, -1,
3704 -1, 210, 211, 212, -1, -1, -1, -1, -1, 1217,
3705 1218, 1219, 1220, 77, -1, -1, -1, -1, -1, 526,
3706 -1, -1, 465, -1, -1, -1, -1, -1, -1, -1,
3707 -1, -1, -1, -1, -1, 1243, -1, 101, 983, -1,
3708 1015, 484, 1017, 107, 108, 109, 991, -1, 77, 78,
3709 79, 80, 81, 82, 83, 84, 85, 86, 87, 88,
3710 89, -1, -1, -1, -1, 94, 95, -1, -1, 133,
3711 -1, -1, 136, 1018, -1, 582, -1, 584, 1053, -1,
3712 -1, 1056, -1, -1, -1, -1, -1, -1, -1, 153,
3713 -1, 2, -1, 4, -1, -1, -1, 604, 127, -1,
3714 129, 130, 131, 132, 133, 134, 135, 136, 137, 138,
3715 -1, -1, -1, -1, -1, -1, -1, 326, -1, 1094,
3716 -1, -1, 331, -1, 896, -1, -1, -1, -1, -1,
3717 1075, -1, -1, -1, -1, -1, -1, -1, -1, 582,
3718 -1, 584, 53, 54, 651, -1, 57, -1, -1, 592,
3719 -1, -1, -1, -1, -1, 1130, 1131, -1, -1, 602,
3720 -1, 604, 605, 935, 936, -1, -1, -1, -1, -1,
3721 -1, -1, 83, 680, -1, -1, 683, 684, -1, -1,
3722 -1, -1, -1, 690, -1, 96, 97, 98, -1, -1,
3723 -1, -1, -1, -1, 1169, 1170, 639, -1, -1, -1,
3724 -1, -1, -1, -1, -1, -1, 1151, 979, -1, -1,
3725 1155, -1, -1, -1, -1, 424, 425, -1, -1, -1,
3726 -1, -1, 729, -1, 433, 732, 1171, -1, -1, -1,
3727 -1, -1, -1, 1005, 1006, -1, -1, 680, -1, -1,
3728 -1, 684, 685, -1, -1, 688, -1, -1, -1, 692,
3729 693, -1, -1, -1, -1, 1027, 699, 700, -1, -1,
3730 -1, 470, 1207, 1208, 473, -1, 52, 1242, 54, 55,
3731 56, 57, 58, -1, -1, -1, -1, -1, -1, 786,
3732 787, -1, -1, -1, -1, -1, 729, -1, 731, 732,
3733 2, 77, 4, -1, -1, -1, -1, -1, 209, 77,
3734 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3735 519, -1, -1, -1, -1, 101, 94, 95, -1, -1,
3736 -1, 107, 108, 109, 831, -1, -1, -1, -1, 836,
3737 -1, 242, -1, 244, -1, -1, 1108, -1, -1, -1,
3738 -1, 53, 54, 1115, -1, 852, 257, 133, 259, 2,
3739 136, 4, 859, 131, 132, 133, 134, 135, 136, 137,
3740 138, -1, 148, -1, 871, -1, -1, 874, -1, 280,
3741 -1, -1, -1, -1, 881, 882, 819, -1, -1, -1,
3742 -1, -1, -1, -1, 891, 892, 893, -1, 831, -1,
3743 897, 898, -1, 836, 837, 902, -1, -1, 309, 906,
3744 53, 54, -1, 314, 57, -1, -1, -1, 915, 852,
3745 619, -1, 621, -1, -1, -1, 859, 328, 329, -1,
3746 331, -1, -1, -1, -1, 634, -1, 636, 871, -1,
3747 83, 874, -1, -1, -1, -1, -1, -1, -1, 2,
3748 -1, 4, -1, 96, 97, 98, 99, -1, -1, -1,
3749 -1, -1, -1, -1, -1, 366, -1, -1, -1, 370,
3750 967, 372, -1, 906, -1, -1, -1, -1, -1, -1,
3751 679, -1, 915, -1, -1, -1, 983, -1, -1, -1,
3752 -1, -1, -1, -1, 991, -1, -1, -1, -1, 698,
3753 53, 54, -1, -1, -1, -1, -1, 209, 707, -1,
3754 -1, -1, -1, 414, 415, -1, -1, -1, 1015, -1,
3755 1017, 1018, -1, 722, -1, -1, -1, -1, -1, -1,
3756 -1, -1, -1, -1, -1, -1, -1, -1, -1, 690,
3757 242, -1, 244, 96, -1, -1, -1, -1, -1, -1,
3758 -1, -1, -1, -1, -1, 257, 1053, 259, -1, 1056,
3759 -1, -1, 1059, 690, 465, -1, 209, -1, -1, -1,
3760 -1, -1, -1, -1, 773, -1, -1, -1, 1075, -1,
3761 -1, 482, 1015, -1, 1017, -1, -1, -1, -1, -1,
3762 -1, -1, -1, -1, -1, -1, -1, -1, -1, 242,
3763 -1, 244, -1, 690, -1, -1, -1, 309, -1, -1,
3764 -1, -1, 314, -1, 257, -1, 259, -1, -1, -1,
3765 1053, -1, -1, 1056, -1, 526, 328, -1, -1, 331,
3766 -1, -1, -1, 1130, 1131, 786, 787, 280, 52, -1,
3767 54, 55, 56, 57, 58, -1, -1, 846, -1, -1,
3768 -1, -1, -1, -1, 1151, -1, 209, -1, 1155, 786,
3769 787, 1094, -1, 77, 366, -1, 309, 866, 370, -1,
3770 372, 314, -1, -1, 1171, -1, -1, 91, -1, -1,
3771 -1, 582, -1, 584, -1, 328, 329, 101, -1, 242,
3772 -1, 244, -1, 107, 108, 109, -1, 1130, 1131, 786,
3773 787, -1, -1, 604, 257, -1, 259, -1, -1, -1,
3774 1207, 1208, 414, 415, -1, 914, -1, -1, -1, 133,
3775 -1, -1, 136, 366, -1, -1, -1, 370, -1, 372,
3776 881, 882, -1, -1, -1, -1, 1169, 1170, -1, -1,
3777 891, 892, 893, 942, -1, 1242, 897, 898, -1, -1,
3778 651, -1, -1, -1, 881, 882, 309, -1, -1, 660,
3779 -1, 314, -1, 465, 891, 892, 893, -1, -1, -1,
3780 897, 898, -1, -1, -1, 328, -1, -1, 331, 680,
3781 -1, -1, 683, 684, 685, -1, -1, -1, -1, -1,
3782 -1, 692, 693, -1, 881, 882, -1, -1, 699, 700,
3783 -1, -1, -1, -1, 891, 892, 893, -1, -1, 1242,
3784 897, 898, -1, 366, -1, -1, -1, 370, -1, 372,
3785 1019, -1, 465, -1, -1, -1, -1, -1, 729, -1,
3786 -1, 732, 983, 1032, -1, -1, -1, -1, -1, 482,
3787 991, -1, -1, -1, 52, -1, 54, 55, 56, 57,
3788 58, -1, -1, -1, -1, -1, 983, -1, -1, -1,
3789 -1, 414, 415, -1, 991, -1, -1, 1018, -1, 77,
3790 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3791 582, -1, 584, 526, -1, -1, -1, -1, -1, -1,
3792 -1, 1018, -1, 101, -1, -1, 983, -1, -1, 107,
3793 108, 109, 604, -1, 991, -1, -1, -1, -1, -1,
3794 -1, -1, 465, -1, -1, -1, -1, -1, 819, -1,
3795 -1, -1, -1, -1, 1075, 133, -1, -1, 136, -1,
3796 831, 1018, -1, -1, -1, 836, -1, -1, -1, 582,
3797 -1, 584, -1, -1, -1, -1, -1, -1, 1075, -1,
3798 -1, 852, -1, -1, -1, -1, -1, -1, 859, -1,
3799 -1, 604, -1, -1, -1, -1, -1, -1, -1, -1,
3800 871, -1, -1, 874, -1, -1, -1, -1, 680, -1,
3801 -1, -1, 684, 685, -1, -1, -1, -1, 1075, -1,
3802 692, 693, -1, -1, -1, -1, -1, 699, 700, -1,
3803 1151, 902, -1, -1, 1155, 906, -1, -1, 651, -1,
3804 -1, -1, -1, -1, 915, -1, 690, -1, -1, -1,
3805 1171, -1, -1, -1, 1151, -1, -1, 729, 1155, 582,
3806 732, 584, -1, -1, -1, -1, -1, 680, -1, -1,
3807 683, 684, -1, -1, 1171, 690, -1, -1, -1, -1,
3808 -1, 604, -1, -1, -1, -1, 1207, 1208, -1, -1,
3809 -1, -1, -1, -1, 1151, -1, 967, -1, 1155, -1,
3810 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3811 1207, 1208, -1, -1, 1171, -1, 729, -1, -1, 732,
3812 690, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3813 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3814 -1, -1, 786, 787, 1015, -1, 1017, 819, -1, -1,
3815 1207, 1208, -1, -1, -1, -1, -1, 680, -1, 831,
3816 -1, 684, 685, -1, 836, -1, -1, -1, -1, 692,
3817 693, 786, 787, -1, -1, -1, 699, 700, -1, -1,
3818 852, -1, 1053, -1, -1, 1056, -1, 859, 1059, -1,
3819 -1, -1, -1, -1, -1, -1, -1, -1, -1, 871,
3820 -1, -1, 874, -1, -1, -1, 729, -1, -1, 732,
3821 -1, -1, -1, -1, -1, -1, 786, 787, 831, -1,
3822 -1, -1, -1, 836, -1, -1, -1, -1, -1, -1,
3823 -1, -1, -1, -1, 906, -1, -1, 881, 882, 852,
3824 -1, -1, -1, 915, -1, -1, 859, 891, 892, 893,
3825 -1, -1, -1, 897, 898, -1, -1, -1, 871, 1130,
3826 1131, 874, -1, -1, -1, -1, 881, 882, -1, -1,
3827 -1, -1, -1, -1, -1, -1, 891, 892, 893, -1,
3828 -1, -1, 897, 898, -1, -1, -1, -1, -1, 902,
3829 -1, -1, -1, 906, -1, -1, 819, -1, -1, -1,
3830 -1, -1, 915, -1, -1, -1, -1, -1, 831, -1,
3831 -1, 881, 882, 836, -1, -1, -1, -1, -1, -1,
3832 -1, 891, 892, 893, -1, 16, 17, 897, 898, 852,
3833 -1, -1, -1, -1, -1, -1, 859, -1, -1, 983,
3834 -1, -1, -1, 1015, -1, 1017, -1, 991, 871, -1,
3835 -1, 874, -1, -1, 967, -1, -1, 48, 49, 50,
3836 51, -1, -1, -1, 55, 56, -1, -1, 983, -1,
3837 -1, 1242, -1, -1, 1018, -1, 991, 68, 69, 902,
3838 -1, 1053, -1, 906, 1056, -1, -1, -1, -1, -1,
3839 -1, -1, 915, -1, -1, -1, -1, -1, 33, 34,
3840 35, 36, 1015, 1018, 1017, -1, -1, -1, -1, 100,
3841 -1, -1, -1, 983, 49, 50, 51, -1, -1, -1,
3842 -1, 991, -1, -1, 59, 60, 61, 62, 63, -1,
3843 -1, 1075, -1, -1, -1, -1, -1, -1, -1, -1,
3844 1053, -1, -1, 1056, -1, -1, 1059, -1, 1018, -1,
3845 -1, -1, -1, -1, -1, -1, -1, -1, 1130, 1131,
3846 1075, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3847 -1, -1, -1, -1, -1, 110, 111, 112, 113, 114,
3848 115, 116, 117, 118, -1, -1, -1, -1, -1, -1,
3849 -1, -1, 1015, -1, 1017, -1, -1, -1, -1, -1,
3850 -1, -1, -1, -1, 139, 1075, -1, 1151, -1, -1,
3851 -1, 1155, -1, -1, -1, -1, 207, 1130, 1131, 210,
3852 211, 212, -1, 214, -1, -1, -1, 1171, -1, -1,
3853 1053, -1, -1, 1056, -1, -1, 1151, -1, -1, 230,
3854 1155, 232, 233, -1, -1, -1, -1, -1, -1, -1,
3855 -1, -1, -1, -1, -1, -1, 1171, -1, -1, -1,
3856 -1, -1, -1, 1207, 1208, -1, -1, -1, -1, -1,
3857 1242, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3858 -1, 1151, -1, -1, -1, 1155, -1, -1, -1, -1,
3859 -1, -1, 1207, 1208, -1, -1, -1, -1, -1, -1,
3860 -1, 1171, -1, -1, -1, -1, -1, 1130, 1131, -1,
3861 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3862 -1, -1, -1, -1, -1, -1, -1, -1, -1, 1242,
3863 -1, -1, -1, -1, -1, 326, -1, 1207, 1208, -1,
3864 331, -1, 333, 334, 335, 336, 337, -1, -1, 340,
3865 341, 342, 343, 344, 345, 346, 347, 348, -1, -1,
3866 351, 352, 353, 354, 355, 356, 357, 358, 359, 360,
3867 -1, -1, -1, 364, -1, -1, -1, -1, -1, -1,
3868 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3869 -1, -1, -1, -1, -1, -1, -1, 77, 78, 79,
3870 80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
3871 -1, -1, -1, -1, 94, 95, -1, -1, -1, 1242,
3872 -1, -1, -1, 414, 415, -1, -1, -1, -1, -1,
3873 -1, -1, 423, 424, 425, -1, -1, -1, 429, -1,
3874 431, 432, 433, -1, -1, -1, -1, 127, 439, 129,
3875 130, 131, 132, 133, 134, 135, 136, 137, 138, -1,
3876 -1, -1, -1, 454, -1, -1, -1, -1, 459, -1,
3877 -1, -1, -1, 153, -1, -1, -1, -1, -1, 470,
3878 -1, -1, 473, -1, -1, -1, -1, -1, -1, 0,
3879 -1, -1, -1, 484, -1, -1, -1, 8, 9, 10,
3880 -1, -1, 13, 14, 15, -1, 17, -1, -1, -1,
3881 -1, 502, -1, -1, 25, 26, 27, 28, 29, -1,
3882 -1, -1, -1, -1, -1, -1, 37, 38, 519, 40,
3883 41, 42, 43, 44, -1, -1, -1, -1, -1, -1,
3884 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3885 -1, -1, -1, -1, -1, -1, -1, 68, -1, -1,
3886 -1, -1, -1, -1, -1, -1, 77, 78, 79, 80,
3887 81, 82, 83, 84, 85, 86, 87, 88, 89, -1,
3888 -1, -1, -1, 94, 95, 96, 97, -1, 99, 100,
3889 -1, -1, -1, -1, -1, 106, -1, -1, -1, -1,
3890 -1, 592, -1, -1, -1, -1, -1, -1, -1, 120,
3891 -1, 602, 123, -1, -1, 126, 127, 128, 129, 130,
3892 131, 132, 133, 134, 135, 136, 137, 138, 619, -1,
3893 621, -1, 143, 144, 145, 146, -1, -1, 149, 150,
3894 151, -1, 153, 634, -1, 636, -1, -1, -1, 0,
3895 -1, -1, -1, -1, -1, -1, -1, 8, 9, 10,
3896 -1, -1, 13, 14, 15, -1, 17, -1, -1, -1,
3897 -1, -1, -1, -1, 25, 26, 27, -1, -1, -1,
3898 -1, -1, -1, -1, -1, -1, 37, 38, 679, 40,
3899 41, 42, 43, 44, 685, 686, -1, 688, -1, -1,
3900 -1, 692, 693, -1, -1, -1, -1, 698, 699, 700,
3901 -1, -1, -1, -1, -1, -1, 707, 68, -1, -1,
3902 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3903 -1, 722, -1, -1, -1, -1, -1, -1, -1, -1,
3904 -1, -1, -1, -1, -1, 96, 97, -1, -1, -1,
3905 -1, -1, -1, -1, -1, -1, 747, 748, -1, 750,
3906 751, 33, 34, 35, 36, -1, -1, -1, -1, 120,
3907 -1, -1, -1, -1, -1, -1, -1, 49, 50, 51,
3908 52, -1, 773, -1, 56, -1, 58, 59, 60, 61,
3909 62, 63, 143, 144, -1, -1, -1, 148, 149, -1,
3910 151, -1, 153, -1, -1, 77, -1, -1, -1, -1,
3911 -1, -1, -1, -1, -1, -1, -1, -1, 90, 91,
3912 -1, 812, -1, -1, -1, -1, 98, -1, 819, 101,
3913 -1, -1, 104, 105, -1, 107, 108, -1, 110, 111,
3914 112, 113, 114, 115, 116, 117, 118, -1, -1, -1,
3915 -1, -1, -1, -1, -1, 846, -1, -1, -1, -1,
3916 132, -1, -1, -1, -1, 0, 1, 139, 3, 4,
3917 5, 6, 7, 864, -1, 866, 11, 12, -1, -1,
3918 -1, 16, -1, 18, 19, 20, 21, 22, 23, 24,
3919 -1, -1, -1, -1, -1, 30, 31, 32, 33, 34,
3920 35, 36, -1, -1, 39, -1, -1, -1, -1, -1,
3921 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
3922 55, 56, 57, 914, 59, 60, 61, 62, 63, 64,
3923 65, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3924 75, 76, -1, -1, -1, -1, -1, -1, -1, -1,
3925 -1, 942, -1, -1, -1, 90, 91, -1, -1, -1,
3926 -1, -1, -1, 98, -1, -1, 101, 102, -1, 104,
3927 105, -1, 107, -1, -1, 110, 111, 112, 113, 114,
3928 115, 116, 117, 118, -1, -1, -1, -1, -1, -1,
3929 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3930 -1, -1, -1, -1, 139, 140, 141, -1, -1, -1,
3931 -1, -1, -1, -1, -1, -1, 151, -1, 153, -1,
3932 -1, -1, -1, -1, -1, -1, -1, -1, 1019, 0,
3933 -1, -1, -1, -1, -1, -1, -1, 8, 9, 10,
3934 -1, 1032, 13, 14, 15, -1, 17, -1, -1, -1,
3935 -1, 44, -1, -1, 25, -1, 27, 28, 29, -1,
3936 -1, -1, -1, -1, -1, -1, 37, 38, -1, 40,
3937 41, 42, 43, 44, -1, -1, -1, -1, -1, -1,
3938 -1, -1, -1, -1, 77, 78, 79, 80, 81, 82,
3939 83, 84, 85, 86, 87, 88, 89, 68, -1, -1,
3940 -1, 94, 95, 1094, -1, -1, 77, 78, 79, 80,
3941 81, 82, 83, 84, 85, 86, 87, 88, 89, -1,
3942 -1, -1, -1, 94, 95, 96, 97, -1, 99, 100,
3943 -1, -1, -1, -1, 127, 106, 129, 130, 131, 132,
3944 133, 134, 135, 136, 137, 138, -1, -1, -1, 120,
3945 -1, -1, 123, 146, -1, 126, 127, 128, 129, 130,
3946 131, 132, 133, 134, 135, 136, 137, 138, -1, -1,
3947 -1, -1, -1, 144, 145, 146, 0, -1, 149, 150,
3948 151, -1, 153, -1, 8, 9, 10, -1, -1, 13,
3949 14, 15, -1, 17, -1, -1, -1, -1, 44, -1,
3950 -1, 25, -1, 27, 28, 29, -1, -1, -1, -1,
3951 -1, -1, -1, 37, 38, -1, 40, 41, 42, 43,
3952 44, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3953 -1, 77, 78, 79, 80, 81, 82, 83, 84, 85,
3954 86, 87, 88, 89, 68, -1, -1, -1, 94, 95,
3955 -1, -1, -1, 77, 78, 79, 80, 81, 82, 83,
3956 84, 85, 86, 87, 88, 89, -1, -1, -1, -1,
3957 94, 95, 96, 97, -1, 99, 100, -1, -1, -1,
3958 -1, 127, 106, 129, 130, 131, 132, 133, 134, 135,
3959 136, 137, 138, -1, -1, -1, 120, -1, -1, 123,
3960 -1, -1, 126, 127, 128, 129, 130, 131, 132, 133,
3961 134, 135, 136, 137, 138, -1, -1, -1, -1, -1,
3962 144, 145, 146, 0, -1, 149, 150, 151, -1, 153,
3963 -1, 8, 9, 10, -1, -1, 13, 14, 15, -1,
3964 17, -1, -1, -1, -1, -1, -1, -1, 25, 26,
3965 27, 28, 29, -1, -1, -1, -1, -1, -1, -1,
3966 37, 38, -1, 40, 41, 42, 43, 44, -1, -1,
3967 -1, -1, -1, -1, -1, -1, -1, -1, 77, 78,
3968 79, 80, 81, 82, 83, 84, 85, 86, 87, 88,
3969 89, 68, -1, -1, -1, 94, 95, -1, -1, -1,
3970 77, 78, 79, 80, 81, 82, 83, 84, 85, 86,
3971 87, 88, 89, -1, -1, -1, -1, 94, 95, 96,
3972 97, -1, -1, 100, -1, -1, -1, -1, 127, 106,
3973 129, 130, 131, 132, 133, 134, 135, 136, 137, 138,
3974 -1, -1, -1, 120, -1, -1, 123, -1, -1, -1,
3975 127, 128, 129, 130, 131, 132, 133, 134, 135, 136,
3976 137, 138, -1, -1, -1, -1, 143, 144, 145, 146,
3977 0, -1, 149, 150, 151, -1, 153, -1, 8, 9,
3978 10, -1, -1, 13, 14, 15, -1, 17, -1, -1,
3979 -1, -1, -1, -1, -1, 25, 26, 27, 28, 29,
3980 -1, -1, -1, -1, -1, -1, -1, 37, 38, -1,
3981 40, 41, 42, 43, 44, -1, -1, -1, -1, -1,
3982 -1, -1, -1, -1, -1, 77, 78, 79, 80, 81,
3983 82, 83, 84, 85, 86, 87, 88, 89, 68, -1,
3984 -1, -1, 94, 95, -1, -1, -1, 77, 78, 79,
3985 80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
3986 -1, -1, -1, -1, 94, 95, 96, 97, -1, -1,
3987 100, -1, -1, -1, -1, -1, 106, 129, 130, 131,
3988 132, 133, 134, 135, 136, 137, 138, -1, -1, -1,
3989 120, -1, -1, 123, -1, -1, -1, 127, 128, 129,
3990 130, 131, 132, 133, 134, 135, 136, 137, 138, -1,
3991 -1, -1, -1, 143, 144, 145, 146, 0, -1, 149,
3992 150, 151, -1, 153, -1, 8, 9, 10, -1, -1,
3993 13, 14, 15, -1, 17, -1, -1, -1, -1, -1,
3994 -1, -1, 25, -1, 27, 28, 29, -1, -1, -1,
3995 -1, -1, -1, -1, 37, 38, -1, 40, 41, 42,
3996 43, 44, -1, -1, -1, -1, -1, -1, -1, -1,
3997 -1, -1, 77, 78, 79, 80, 81, 82, 83, 84,
3998 -1, 86, 87, -1, -1, 68, -1, -1, -1, 94,
3999 95, -1, -1, -1, 77, 78, 79, 80, 81, 82,
4000 83, 84, 85, 86, 87, 88, 89, -1, -1, -1,
4001 -1, 94, 95, 96, 97, -1, 99, 100, -1, -1,
4002 -1, -1, -1, 106, 129, 130, 131, 132, 133, 134,
4003 135, 136, 137, 138, -1, -1, -1, 120, -1, -1,
4004 123, -1, -1, 126, 127, 128, 129, 130, 131, 132,
4005 133, 134, 135, 136, 137, 138, -1, -1, -1, -1,
4006 -1, 144, 145, 146, 0, -1, 149, 150, 151, -1,
4007 153, -1, 8, 9, 10, -1, -1, 13, 14, 15,
4008 -1, 17, -1, -1, -1, -1, -1, -1, -1, 25,
4009 26, 27, 28, -1, -1, -1, -1, -1, -1, -1,
4010 -1, 37, 38, -1, 40, 41, 42, 43, 44, -1,
4011 -1, -1, -1, -1, -1, -1, -1, -1, -1, 77,
4012 78, 79, 80, 81, 82, 83, -1, -1, 86, 87,
4013 -1, -1, 68, -1, -1, -1, 94, 95, -1, -1,
4014 -1, 77, 78, 79, 80, 81, 82, 83, 84, 85,
4015 86, 87, 88, 89, -1, -1, -1, -1, 94, 95,
4016 96, 97, -1, -1, 100, -1, -1, -1, -1, -1,
4017 106, 129, 130, 131, 132, 133, 134, 135, 136, 137,
4018 138, -1, -1, -1, 120, -1, -1, -1, -1, -1,
4019 -1, 127, -1, 129, 130, 131, 132, 133, 134, 135,
4020 136, 137, 138, -1, -1, -1, -1, 143, 144, 145,
4021 146, 0, 148, 149, 150, 151, -1, 153, -1, 8,
4022 9, 10, -1, -1, 13, 14, 15, -1, 17, -1,
4023 -1, -1, -1, -1, -1, -1, 25, -1, 27, 28,
4024 29, -1, -1, -1, -1, -1, -1, -1, 37, 38,
4025 -1, 40, 41, 42, 43, 44, -1, -1, -1, -1,
4026 -1, -1, -1, -1, -1, -1, 77, 78, 79, 80,
4027 81, 82, 83, -1, -1, 86, 87, -1, -1, 68,
4028 -1, -1, -1, 94, 95, -1, -1, -1, 77, 78,
4029 79, 80, 81, 82, 83, 84, 85, 86, 87, 88,
4030 89, -1, -1, -1, -1, 94, 95, 96, 97, -1,
4031 -1, 100, -1, -1, -1, -1, -1, 106, 129, 130,
4032 131, 132, 133, 134, 135, 136, 137, 138, -1, -1,
4033 -1, 120, -1, -1, 123, -1, -1, -1, 127, 128,
4034 129, 130, 131, 132, 133, 134, 135, 136, 137, 138,
4035 -1, -1, -1, -1, -1, 144, 145, 146, 0, -1,
4036 149, 150, 151, -1, 153, -1, 8, 9, 10, -1,
4037 -1, 13, 14, 15, -1, 17, -1, -1, -1, -1,
4038 -1, -1, -1, 25, 26, 27, 28, -1, -1, -1,
4039 -1, -1, -1, -1, -1, 37, 38, -1, 40, 41,
4040 42, 43, 44, -1, -1, -1, -1, -1, -1, -1,
4041 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4042 -1, -1, -1, -1, -1, -1, 68, -1, -1, -1,
4043 -1, -1, -1, -1, -1, 77, 78, 79, 80, 81,
4044 82, 83, 84, 85, 86, 87, 88, 89, -1, -1,
4045 -1, -1, 94, 95, 96, 97, -1, -1, 100, -1,
4046 -1, -1, -1, -1, 106, -1, -1, -1, -1, -1,
4047 -1, -1, -1, -1, -1, -1, -1, -1, 120, -1,
4048 -1, -1, -1, -1, -1, 127, -1, 129, 130, 131,
4049 132, 133, 134, 135, 136, 137, 138, -1, -1, -1,
4050 -1, 143, 144, 145, 146, 0, 148, 149, 150, 151,
4051 -1, 153, -1, 8, 9, 10, -1, -1, 13, 14,
4052 15, -1, 17, -1, -1, -1, -1, -1, -1, -1,
4053 25, -1, 27, 28, -1, -1, -1, -1, -1, -1,
4054 -1, -1, 37, 38, -1, 40, 41, 42, 43, 44,
4055 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4056 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4057 -1, -1, -1, 68, -1, -1, -1, -1, -1, -1,
4058 -1, -1, 77, 78, 79, 80, 81, 82, 83, 84,
4059 85, 86, 87, 88, 89, -1, -1, -1, -1, 94,
4060 95, 96, 97, -1, -1, 100, -1, -1, -1, -1,
4061 -1, 106, -1, -1, -1, -1, -1, -1, -1, -1,
4062 -1, -1, -1, -1, -1, 120, -1, -1, -1, -1,
4063 -1, -1, 127, -1, 129, 130, 131, 132, 133, 134,
4064 135, 136, 137, 138, -1, -1, -1, -1, -1, 144,
4065 145, 146, 0, 148, 149, 150, 151, -1, 153, -1,
4066 8, 9, 10, -1, -1, -1, 14, 15, -1, 17,
4067 -1, -1, -1, -1, -1, -1, -1, 25, 26, -1,
4068 -1, -1, -1, -1, -1, -1, -1, -1, -1, 37,
4069 38, -1, 40, 41, 42, 43, 44, -1, -1, -1,
4070 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4071 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4072 68, -1, -1, -1, -1, -1, -1, -1, -1, 77,
4073 78, 79, 80, 81, 82, 83, 84, 85, 86, 87,
4074 88, 89, -1, -1, -1, -1, 94, 95, 96, 97,
4075 -1, 99, -1, -1, -1, -1, -1, -1, -1, -1,
4076 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4077 -1, -1, 120, -1, -1, -1, -1, -1, 126, 127,
4078 -1, 129, 130, 131, 132, 133, 134, 135, 136, 137,
4079 138, -1, -1, -1, -1, 143, 144, 145, 146, 0,
4080 -1, 149, -1, 151, -1, 153, -1, 8, 9, 10,
4081 -1, -1, -1, 14, 15, -1, 17, -1, -1, -1,
4082 -1, -1, -1, -1, 25, 26, -1, -1, -1, -1,
4083 -1, -1, -1, -1, -1, -1, 37, 38, -1, 40,
4084 41, 42, 43, 44, -1, -1, -1, -1, -1, -1,
4085 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4086 -1, -1, -1, -1, -1, -1, -1, 68, -1, -1,
4087 -1, -1, -1, -1, -1, -1, 77, 78, 79, 80,
4088 81, 82, 83, 84, 85, 86, 87, 88, 89, -1,
4089 -1, -1, -1, 94, 95, 96, 97, -1, 99, -1,
4090 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4091 -1, -1, -1, -1, -1, -1, -1, -1, -1, 120,
4092 -1, -1, -1, -1, -1, 126, 127, -1, 129, 130,
4093 131, 132, 133, 134, 135, 136, 137, 138, -1, -1,
4094 -1, -1, 143, 144, 145, 146, 0, -1, 149, -1,
4095 151, -1, 153, -1, 8, 9, 10, -1, -1, -1,
4096 14, 15, -1, 17, -1, -1, -1, -1, -1, -1,
4097 -1, 25, -1, -1, -1, -1, -1, -1, -1, -1,
4098 -1, -1, -1, 37, 38, -1, 40, 41, 42, 43,
4099 44, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4100 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4101 -1, -1, -1, -1, 68, -1, -1, -1, -1, -1,
4102 -1, -1, -1, 77, 78, 79, 80, 81, 82, 83,
4103 84, 85, 86, 87, 88, 89, -1, -1, -1, -1,
4104 94, 95, 96, 97, -1, 99, -1, -1, -1, -1,
4105 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4106 -1, -1, -1, -1, -1, -1, 120, -1, -1, -1,
4107 -1, -1, 126, 127, -1, 129, 130, 131, 132, 133,
4108 134, 135, 136, 137, 138, -1, -1, -1, -1, -1,
4109 144, 145, 146, 0, -1, 149, -1, 151, -1, 153,
4110 -1, 8, 9, 10, -1, -1, -1, 14, 15, -1,
4111 17, -1, -1, -1, -1, -1, -1, -1, 25, -1,
4112 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4113 37, 38, -1, 40, 41, 42, 43, 44, -1, -1,
4114 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4115 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4116 -1, 68, -1, -1, -1, -1, -1, -1, -1, -1,
4117 77, 78, 79, 80, 81, 82, 83, 84, 85, 86,
4118 87, 88, 89, -1, -1, -1, -1, 94, 95, 96,
4119 97, -1, 99, -1, -1, -1, -1, -1, -1, -1,
4120 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4121 -1, -1, -1, 120, -1, -1, -1, -1, -1, 126,
4122 127, -1, 129, 130, 131, 132, 133, 134, 135, 136,
4123 137, 138, -1, -1, -1, -1, -1, 144, 145, 146,
4124 -1, -1, 149, -1, 151, 1, 153, 3, 4, 5,
4125 6, 7, 8, 9, 10, 11, 12, -1, -1, 15,
4126 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
4127 -1, -1, -1, -1, 30, 31, 32, 33, 34, 35,
4128 36, -1, -1, 39, -1, -1, -1, -1, -1, 45,
4129 46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
4130 56, 57, -1, 59, 60, 61, 62, 63, 64, 65,
4131 -1, -1, -1, -1, -1, -1, -1, -1, -1, 75,
4132 76, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4133 -1, -1, -1, -1, 90, 91, -1, -1, -1, -1,
4134 -1, -1, 98, -1, -1, 101, 102, -1, 104, 105,
4135 -1, 107, -1, -1, 110, 111, 112, 113, 114, 115,
4136 116, 117, 118, -1, -1, -1, -1, -1, -1, -1,
4137 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4138 -1, -1, -1, 139, 140, 141, -1, -1, -1, -1,
4139 -1, -1, -1, -1, -1, 151, 1, 153, 3, 4,
4140 5, 6, 7, -1, -1, 10, 11, 12, -1, 14,
4141 15, 16, -1, 18, 19, 20, 21, 22, 23, 24,
4142 -1, -1, -1, -1, -1, 30, 31, 32, 33, 34,
4143 35, 36, -1, -1, 39, -1, -1, -1, -1, -1,
4144 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
4145 55, 56, 57, -1, 59, 60, 61, 62, 63, 64,
4146 65, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4147 75, 76, -1, -1, -1, -1, -1, -1, -1, -1,
4148 -1, -1, -1, -1, -1, 90, 91, -1, -1, -1,
4149 -1, -1, -1, 98, -1, -1, 101, 102, -1, 104,
4150 105, -1, 107, -1, -1, 110, 111, 112, 113, 114,
4151 115, 116, 117, 118, -1, -1, -1, -1, -1, -1,
4152 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4153 -1, -1, -1, -1, 139, 140, 141, -1, -1, -1,
4154 -1, -1, -1, -1, -1, -1, 151, 1, 153, 3,
4155 4, 5, 6, 7, -1, -1, 10, 11, 12, -1,
4156 -1, 15, 16, 17, 18, 19, 20, 21, 22, 23,
4157 24, -1, -1, -1, -1, -1, 30, 31, 32, 33,
4158 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
4159 -1, 45, 46, 47, 48, 49, 50, 51, 52, 53,
4160 54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
4161 64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
4162 -1, 75, 76, -1, -1, -1, -1, -1, -1, -1,
4163 -1, -1, -1, -1, -1, -1, 90, 91, -1, -1,
4164 -1, -1, -1, -1, 98, -1, -1, 101, 102, -1,
4165 104, 105, -1, 107, -1, -1, 110, 111, 112, 113,
4166 114, 115, 116, 117, 118, -1, -1, -1, -1, -1,
4167 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4168 -1, -1, -1, -1, -1, 139, 140, 141, -1, -1,
4169 -1, -1, -1, -1, -1, -1, -1, 151, 1, 153,
4170 3, 4, 5, 6, 7, -1, -1, 10, 11, 12,
4171 -1, -1, 15, 16, -1, 18, 19, 20, 21, 22,
4172 23, 24, 25, -1, -1, -1, -1, 30, 31, 32,
4173 33, 34, 35, 36, -1, -1, 39, -1, -1, -1,
4174 -1, -1, 45, 46, 47, 48, 49, 50, 51, 52,
4175 53, 54, 55, 56, 57, -1, 59, 60, 61, 62,
4176 63, 64, 65, -1, -1, -1, -1, -1, -1, -1,
4177 -1, -1, 75, 76, -1, -1, -1, -1, -1, -1,
4178 -1, -1, -1, -1, -1, -1, -1, 90, 91, -1,
4179 -1, -1, -1, -1, -1, 98, -1, -1, 101, 102,
4180 -1, 104, 105, -1, 107, -1, -1, 110, 111, 112,
4181 113, 114, 115, 116, 117, 118, -1, -1, -1, -1,
4182 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4183 -1, -1, -1, -1, -1, -1, 139, 140, 141, -1,
4184 -1, -1, -1, -1, -1, -1, -1, -1, 151, 1,
4185 153, 3, 4, 5, 6, 7, -1, -1, 10, 11,
4186 12, -1, -1, 15, 16, -1, 18, 19, 20, 21,
4187 22, 23, 24, -1, -1, -1, -1, -1, 30, 31,
4188 32, 33, 34, 35, 36, -1, -1, 39, -1, -1,
4189 -1, -1, -1, 45, 46, 47, 48, 49, 50, 51,
4190 52, 53, 54, 55, 56, 57, -1, 59, 60, 61,
4191 62, 63, 64, 65, -1, -1, -1, -1, -1, -1,
4192 -1, -1, -1, 75, 76, -1, -1, -1, -1, -1,
4193 -1, -1, -1, -1, -1, -1, -1, -1, 90, 91,
4194 -1, -1, -1, -1, -1, -1, 98, -1, -1, 101,
4195 102, -1, 104, 105, -1, 107, -1, -1, 110, 111,
4196 112, 113, 114, 115, 116, 117, 118, -1, -1, -1,
4197 -1, -1, -1, -1, -1, 1, -1, 3, 4, 5,
4198 6, 7, -1, 9, 10, 11, 12, 139, 140, 141,
4199 16, -1, 18, 19, 20, 21, 22, 23, 24, 151,
4200 -1, 153, -1, -1, 30, 31, 32, 33, 34, 35,
4201 36, -1, -1, 39, -1, -1, -1, -1, -1, 45,
4202 46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
4203 56, 57, -1, 59, 60, 61, 62, 63, 64, 65,
4204 -1, -1, -1, -1, -1, -1, -1, -1, -1, 75,
4205 76, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4206 -1, -1, -1, -1, 90, 91, -1, -1, -1, -1,
4207 -1, -1, 98, -1, -1, 101, 102, -1, 104, 105,
4208 -1, 107, -1, -1, 110, 111, 112, 113, 114, 115,
4209 116, 117, 118, -1, -1, -1, -1, -1, -1, -1,
4210 -1, 1, -1, 3, 4, 5, 6, 7, -1, -1,
4211 -1, 11, 12, 139, 140, 141, 16, -1, 18, 19,
4212 20, 21, 22, 23, 24, 151, -1, 153, -1, -1,
4213 30, 31, 32, 33, 34, 35, 36, -1, -1, 39,
4214 -1, -1, -1, -1, -1, 45, 46, 47, 48, 49,
4215 50, 51, 52, 53, 54, 55, 56, 57, -1, 59,
4216 60, 61, 62, 63, 64, 65, -1, -1, -1, -1,
4217 -1, -1, -1, -1, -1, 75, 76, -1, -1, -1,
4218 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4219 90, 91, -1, -1, -1, -1, -1, -1, 98, -1,
4220 -1, 101, 102, -1, 104, 105, -1, 107, -1, -1,
4221 110, 111, 112, 113, 114, 115, 116, 117, 118, -1,
4222 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4223 -1, -1, -1, -1, -1, -1, -1, -1, -1, 139,
4224 140, 141, -1, -1, -1, -1, -1, -1, -1, 149,
4225 -1, 151, 1, 153, 3, 4, 5, 6, 7, -1,
4226 -1, -1, 11, 12, -1, -1, -1, 16, -1, 18,
4227 19, 20, 21, 22, 23, 24, -1, -1, -1, -1,
4228 -1, 30, 31, 32, 33, 34, 35, 36, -1, -1,
4229 39, -1, -1, -1, -1, -1, 45, 46, 47, 48,
4230 49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
4231 59, 60, 61, 62, 63, 64, 65, -1, -1, -1,
4232 -1, -1, -1, -1, -1, -1, 75, 76, -1, -1,
4233 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4234 -1, 90, 91, -1, -1, -1, -1, -1, -1, 98,
4235 -1, -1, 101, 102, -1, 104, 105, -1, 107, -1,
4236 -1, 110, 111, 112, 113, 114, 115, 116, 117, 118,
4237 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4238 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4239 139, 140, 141, -1, -1, -1, -1, -1, -1, -1,
4240 149, -1, 151, 1, 153, 3, 4, 5, 6, 7,
4241 -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
4242 18, 19, 20, 21, 22, 23, 24, -1, -1, -1,
4243 -1, -1, 30, 31, 32, 33, 34, 35, 36, -1,
4244 -1, 39, -1, -1, -1, -1, -1, 45, 46, 47,
4245 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
4246 -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
4247 -1, -1, -1, -1, -1, -1, -1, 75, 76, -1,
4248 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4249 -1, -1, 90, 91, -1, -1, -1, -1, -1, -1,
4250 98, -1, -1, 101, 102, -1, 104, 105, -1, 107,
4251 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
4252 118, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4253 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4254 -1, 139, 140, 141, -1, -1, 144, -1, -1, -1,
4255 -1, -1, -1, 151, 1, 153, 3, 4, 5, 6,
4256 7, -1, -1, -1, 11, 12, -1, -1, -1, 16,
4257 -1, 18, 19, 20, 21, 22, 23, 24, -1, -1,
4258 -1, -1, -1, 30, 31, 32, 33, 34, 35, 36,
4259 -1, -1, 39, -1, -1, -1, -1, -1, 45, 46,
4260 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
4261 57, -1, 59, 60, 61, 62, 63, 64, 65, -1,
4262 -1, -1, -1, -1, -1, -1, -1, -1, 75, 76,
4263 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4264 -1, -1, -1, 90, 91, -1, -1, -1, -1, -1,
4265 -1, 98, -1, -1, 101, 102, -1, 104, 105, -1,
4266 107, -1, -1, 110, 111, 112, 113, 114, 115, 116,
4267 117, 118, -1, -1, -1, -1, -1, -1, -1, -1,
4268 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4269 -1, -1, 139, 140, 141, -1, -1, 144, -1, -1,
4270 -1, -1, -1, -1, 151, 1, 153, 3, 4, 5,
4271 6, 7, -1, -1, 10, 11, 12, -1, -1, -1,
4272 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
4273 -1, -1, -1, -1, 30, 31, 32, 33, 34, 35,
4274 36, -1, -1, 39, -1, -1, -1, -1, -1, 45,
4275 46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
4276 56, 57, -1, 59, 60, 61, 62, 63, 64, 65,
4277 -1, -1, -1, -1, -1, -1, -1, -1, -1, 75,
4278 76, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4279 -1, -1, -1, -1, 90, 91, -1, -1, -1, -1,
4280 -1, -1, 98, -1, -1, 101, 102, -1, 104, 105,
4281 -1, 107, -1, -1, 110, 111, 112, 113, 114, 115,
4282 116, 117, 118, -1, -1, -1, -1, -1, -1, -1,
4283 -1, 1, -1, 3, 4, 5, 6, 7, -1, -1,
4284 -1, 11, 12, 139, 140, 141, 16, -1, 18, 19,
4285 20, 21, 22, 23, 24, 151, -1, 153, -1, -1,
4286 30, 31, 32, 33, 34, 35, 36, -1, -1, 39,
4287 -1, -1, -1, -1, -1, 45, 46, 47, 48, 49,
4288 50, 51, 52, 53, 54, 55, 56, 57, -1, 59,
4289 60, 61, 62, 63, 64, 65, -1, -1, -1, -1,
4290 -1, -1, -1, -1, -1, 75, 76, -1, -1, -1,
4291 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4292 90, 91, -1, -1, -1, -1, -1, -1, 98, -1,
4293 -1, 101, 102, -1, 104, 105, -1, 107, -1, -1,
4294 110, 111, 112, 113, 114, 115, 116, 117, 118, -1,
4295 120, -1, -1, -1, -1, -1, -1, -1, -1, 3,
4296 4, 5, -1, 7, -1, -1, -1, 11, 12, 139,
4297 140, 141, 16, -1, 18, 19, 20, 21, 22, 23,
4298 24, 151, -1, 153, -1, -1, 30, 31, 32, 33,
4299 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
4300 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53,
4301 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
4302 64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
4303 -1, 75, 76, -1, -1, -1, -1, -1, -1, -1,
4304 -1, -1, -1, -1, -1, -1, 90, 91, -1, -1,
4305 -1, -1, -1, -1, 98, -1, -1, 101, 102, -1,
4306 104, 105, -1, 107, 108, 109, 110, 111, 112, 113,
4307 114, 115, 116, 117, 118, -1, -1, -1, -1, -1,
4308 -1, -1, -1, -1, -1, 3, 4, 5, -1, 7,
4309 -1, -1, -1, 11, 12, 139, 140, 141, 16, -1,
4310 18, 19, 20, 21, 22, 23, 24, -1, -1, 153,
4311 -1, -1, 30, 31, 32, 33, 34, 35, 36, -1,
4312 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
4313 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
4314 -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
4315 -1, -1, -1, -1, -1, -1, -1, 75, 76, -1,
4316 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4317 -1, -1, 90, 91, -1, -1, -1, -1, -1, -1,
4318 98, -1, -1, 101, 102, -1, 104, 105, -1, -1,
4319 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
4320 118, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4321 -1, 3, 4, 5, -1, 7, -1, -1, -1, 11,
4322 12, 139, 140, 141, 16, -1, 18, 19, 20, 21,
4323 22, 23, 24, 151, -1, 153, -1, -1, 30, 31,
4324 32, 33, 34, 35, 36, -1, -1, 39, -1, -1,
4325 -1, -1, -1, -1, 46, -1, -1, 49, 50, 51,
4326 52, 53, 54, 55, 56, 57, -1, 59, 60, 61,
4327 62, 63, 64, 65, -1, -1, -1, -1, -1, -1,
4328 -1, -1, -1, 75, 76, -1, -1, -1, -1, -1,
4329 -1, -1, -1, -1, -1, -1, -1, -1, 90, 91,
4330 -1, -1, -1, -1, -1, -1, 98, -1, -1, 101,
4331 102, -1, 104, 105, -1, -1, -1, -1, 110, 111,
4332 112, 113, 114, 115, 116, 117, 118, -1, -1, -1,
4333 -1, -1, -1, -1, -1, -1, -1, 3, 4, 5,
4334 6, 7, -1, -1, -1, 11, 12, 139, 140, 141,
4335 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
4336 -1, 153, -1, -1, 30, 31, 32, 33, 34, 35,
4337 36, -1, -1, 39, -1, -1, -1, -1, -1, 45,
4338 46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
4339 56, 57, -1, 59, 60, 61, 62, 63, 64, 65,
4340 -1, -1, -1, -1, -1, -1, -1, -1, -1, 75,
4341 76, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4342 -1, -1, -1, -1, 90, 91, -1, -1, -1, -1,
4343 -1, -1, 98, -1, -1, 101, 102, -1, 104, 105,
4344 -1, 107, -1, -1, 110, 111, 112, 113, 114, 115,
4345 116, 117, 118, -1, -1, -1, -1, -1, -1, -1,
4346 -1, -1, -1, 3, 4, 5, 6, 7, -1, -1,
4347 -1, 11, 12, 139, 140, 141, 16, -1, 18, 19,
4348 20, 21, 22, 23, 24, 151, -1, -1, -1, -1,
4349 30, 31, 32, 33, 34, 35, 36, -1, -1, 39,
4350 -1, -1, -1, -1, -1, 45, 46, 47, 48, 49,
4351 50, 51, 52, 53, 54, 55, 56, 57, -1, 59,
4352 60, 61, 62, 63, 64, 65, -1, -1, -1, -1,
4353 -1, -1, -1, -1, -1, 75, 76, -1, -1, -1,
4354 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4355 90, 91, -1, -1, -1, -1, -1, -1, 98, -1,
4356 -1, 101, 102, -1, 104, 105, -1, 107, -1, -1,
4357 110, 111, 112, 113, 114, 115, 116, 117, 118, -1,
4358 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4359 -1, -1, -1, -1, -1, -1, -1, -1, -1, 139,
4360 140, 141, -1, -1, -1, -1, -1, -1, -1, -1,
4361 -1, 151, 3, 4, 5, 6, 7, 8, 9, 10,
4362 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
4363 21, 22, 23, 24, 25, 26, -1, -1, -1, 30,
4364 31, 32, 33, 34, 35, 36, 37, 38, 39, -1,
4365 -1, -1, -1, -1, 45, 46, 47, 48, 49, 50,
4366 51, 52, 53, 54, 55, 56, 57, -1, -1, -1,
4367 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4368 -1, -1, -1, -1, 75, 76, 77, 78, 79, 80,
4369 81, 82, 83, -1, -1, 86, 87, -1, -1, -1,
4370 -1, 92, 93, 94, 95, -1, -1, -1, -1, -1,
4371 -1, -1, -1, -1, -1, -1, 107, 108, -1, -1,
4372 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4373 -1, -1, -1, -1, -1, -1, -1, -1, 129, 130,
4374 131, 132, 133, 134, 135, 136, 137, 138, -1, 140,
4375 141, -1, -1, -1, -1, -1, 147, 148, 3, 4,
4376 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
4377 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
4378 25, 26, -1, -1, -1, 30, 31, 32, 33, 34,
4379 35, 36, 37, 38, 39, -1, -1, -1, -1, -1,
4380 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
4381 55, 56, 57, -1, -1, -1, -1, -1, -1, -1,
4382 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4383 75, 76, 77, 78, 79, 80, 81, 82, 83, -1,
4384 -1, 86, 87, -1, -1, -1, -1, 92, 93, 94,
4385 95, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4386 -1, -1, 107, 108, -1, -1, -1, -1, -1, -1,
4387 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4388 -1, -1, -1, -1, 129, 130, 131, 132, 133, 134,
4389 135, 136, 137, 138, -1, 140, 141, -1, -1, -1,
4390 -1, -1, 147, 3, 4, 5, 6, 7, 8, 9,
4391 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
4392 20, 21, 22, 23, 24, 25, 26, -1, -1, -1,
4393 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
4394 -1, -1, -1, -1, -1, 45, 46, 47, 48, 49,
4395 50, 51, 52, 53, 54, -1, 56, -1, -1, -1,
4396 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4397 -1, -1, -1, -1, -1, 75, 76, 77, 78, 79,
4398 80, 81, 82, 83, -1, -1, 86, 87, -1, -1,
4399 -1, -1, 92, 93, 94, 95, -1, -1, -1, -1,
4400 -1, -1, -1, -1, -1, -1, -1, 107, 108, -1,
4401 -1, 111, -1, -1, -1, -1, -1, -1, -1, -1,
4402 -1, -1, -1, -1, -1, -1, -1, -1, -1, 129,
4403 130, 131, 132, 133, 134, 135, 136, 137, 138, -1,
4404 140, 141, -1, -1, -1, -1, -1, 147, 3, 4,
4405 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
4406 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
4407 25, 26, -1, -1, -1, 30, 31, 32, 33, 34,
4408 35, 36, 37, 38, 39, -1, -1, -1, -1, -1,
4409 45, 46, 47, 48, 49, 50, 51, 52, 53, -1,
4410 -1, 56, -1, -1, -1, -1, -1, -1, -1, -1,
4411 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4412 75, 76, 77, 78, 79, 80, 81, 82, 83, -1,
4413 -1, 86, 87, -1, -1, -1, -1, 92, 93, 94,
4414 95, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4415 -1, -1, 107, 108, -1, -1, 111, -1, -1, -1,
4416 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4417 -1, -1, -1, -1, 129, 130, 131, 132, 133, 134,
4418 135, 136, 137, 138, -1, 140, 141, -1, -1, -1,
4419 -1, -1, 147, 3, 4, 5, 6, 7, 8, 9,
4420 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
4421 20, 21, 22, 23, 24, 25, 26, -1, -1, -1,
4422 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
4423 -1, -1, -1, -1, -1, 45, 46, 47, 48, 49,
4424 50, 51, 52, 53, -1, -1, 56, -1, -1, -1,
4425 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4426 -1, -1, -1, -1, -1, 75, 76, 77, 78, 79,
4427 80, 81, 82, 83, -1, -1, 86, 87, -1, -1,
4428 -1, -1, 92, 93, 94, 95, -1, -1, -1, -1,
4429 -1, -1, -1, -1, -1, -1, -1, 107, 108, -1,
4430 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4431 -1, -1, -1, -1, -1, -1, -1, -1, -1, 129,
4432 130, 131, 132, 133, 134, 135, 136, 137, 138, -1,
4433 140, 141, 3, 4, 5, -1, 7, 147, -1, -1,
4434 11, 12, -1, -1, -1, 16, -1, 18, 19, 20,
4435 21, 22, 23, 24, -1, -1, -1, -1, -1, 30,
4436 31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
4437 -1, -1, -1, -1, -1, 46, -1, -1, 49, 50,
4438 51, 52, 53, 54, 55, 56, 57, -1, 59, 60,
4439 61, 62, 63, 64, 65, -1, -1, -1, -1, -1,
4440 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4441 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4442 -1, -1, -1, -1, -1, -1, -1, 98, -1, -1,
4443 101, 102, -1, 104, 105, -1, -1, -1, -1, 110,
4444 111, 112, 113, 114, 115, 116, 117, 118, -1, -1,
4445 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4446 -1, 3, 4, 5, -1, 7, -1, -1, 139, 11,
4447 12, -1, -1, -1, 16, 146, 18, 19, 20, 21,
4448 22, 23, 24, -1, -1, -1, -1, -1, 30, 31,
4449 32, 33, 34, 35, 36, -1, -1, 39, -1, -1,
4450 -1, -1, -1, -1, 46, -1, -1, 49, 50, 51,
4451 52, 53, 54, 55, 56, 57, -1, 59, 60, 61,
4452 62, 63, 64, 65, -1, -1, -1, -1, -1, -1,
4453 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4454 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4455 -1, -1, -1, -1, -1, -1, 98, -1, -1, 101,
4456 102, -1, 104, 105, -1, -1, -1, -1, 110, 111,
4457 112, 113, 114, 115, 116, 117, 118, -1, -1, -1,
4458 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4459 3, 4, 5, 6, 7, -1, -1, 139, 11, 12,
4460 -1, -1, -1, 16, 146, 18, 19, 20, 21, 22,
4461 23, 24, -1, -1, -1, -1, -1, 30, 31, 32,
4462 33, 34, 35, 36, -1, -1, 39, -1, -1, -1,
4463 -1, -1, 45, 46, 47, 48, 49, 50, 51, 52,
4464 53, 54, 55, 56, 57, -1, 59, 60, 61, 62,
4465 63, 64, 65, -1, -1, -1, -1, -1, -1, -1,
4466 -1, -1, 75, 76, -1, -1, -1, -1, -1, -1,
4467 -1, -1, -1, -1, -1, -1, -1, 90, 91, -1,
4468 -1, -1, -1, -1, -1, 98, -1, -1, 101, 102,
4469 -1, 104, 105, -1, 107, -1, -1, 110, 111, 112,
4470 113, 114, 115, 116, 117, 118, -1, -1, -1, -1,
4471 -1, -1, -1, -1, -1, -1, 3, 4, 5, -1,
4472 7, -1, -1, -1, 11, 12, 139, 140, 141, 16,
4473 -1, 18, 19, 20, 21, 22, 23, 24, -1, -1,
4474 -1, -1, -1, 30, 31, 32, 33, 34, 35, 36,
4475 -1, -1, 39, -1, -1, -1, -1, -1, -1, 46,
4476 -1, -1, 49, 50, 51, 52, 53, 54, 55, 56,
4477 57, 58, 59, 60, 61, 62, 63, 64, 65, -1,
4478 -1, -1, -1, -1, -1, -1, -1, -1, 75, 76,
4479 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4480 -1, -1, -1, 90, 91, -1, -1, -1, -1, -1,
4481 -1, 98, -1, -1, 101, 102, -1, 104, 105, -1,
4482 107, 108, 109, 110, 111, 112, 113, 114, 115, 116,
4483 117, 118, -1, -1, -1, -1, -1, -1, -1, -1,
4484 -1, -1, 3, 4, 5, 6, 7, -1, -1, -1,
4485 11, 12, 139, 140, 141, 16, -1, 18, 19, 20,
4486 21, 22, 23, 24, -1, -1, -1, -1, -1, 30,
4487 31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
4488 -1, -1, -1, -1, 45, 46, -1, 48, 49, 50,
4489 51, 52, 53, 54, 55, 56, 57, -1, 59, 60,
4490 61, 62, 63, 64, 65, -1, -1, -1, -1, -1,
4491 -1, -1, -1, -1, 75, 76, -1, -1, -1, -1,
4492 -1, -1, -1, -1, -1, -1, -1, -1, -1, 90,
4493 91, -1, -1, -1, -1, -1, -1, 98, -1, -1,
4494 101, 102, -1, 104, 105, -1, 107, -1, -1, 110,
4495 111, 112, 113, 114, 115, 116, 117, 118, -1, -1,
4496 -1, -1, -1, -1, -1, -1, -1, -1, 3, 4,
4497 5, -1, 7, -1, -1, -1, 11, 12, 139, 140,
4498 141, 16, -1, 18, 19, 20, 21, 22, 23, 24,
4499 -1, -1, -1, -1, -1, 30, 31, 32, 33, 34,
4500 35, 36, -1, -1, 39, -1, -1, -1, -1, -1,
4501 -1, 46, -1, -1, 49, 50, 51, 52, 53, 54,
4502 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
4503 65, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4504 75, 76, -1, -1, -1, -1, -1, -1, -1, -1,
4505 -1, -1, -1, -1, -1, 90, 91, -1, -1, -1,
4506 -1, -1, -1, 98, -1, -1, 101, 102, -1, 104,
4507 105, -1, 107, 108, 109, 110, 111, 112, 113, 114,
4508 115, 116, 117, 118, -1, -1, -1, -1, -1, -1,
4509 -1, -1, -1, -1, 3, 4, 5, -1, 7, -1,
4510 -1, -1, 11, 12, 139, 140, 141, 16, -1, 18,
4511 19, 20, 21, 22, 23, 24, -1, -1, -1, -1,
4512 -1, 30, 31, 32, 33, 34, 35, 36, -1, -1,
4513 39, -1, -1, -1, -1, -1, -1, 46, -1, -1,
4514 49, 50, 51, 52, 53, 54, 55, 56, 57, 58,
4515 59, 60, 61, 62, 63, 64, 65, -1, -1, -1,
4516 -1, -1, -1, -1, -1, -1, 75, 76, -1, -1,
4517 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4518 -1, 90, 91, -1, -1, -1, -1, -1, -1, 98,
4519 -1, -1, 101, 102, -1, 104, 105, -1, 107, 108,
4520 109, 110, 111, 112, 113, 114, 115, 116, 117, 118,
4521 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4522 3, 4, 5, -1, 7, -1, -1, -1, 11, 12,
4523 139, 140, 141, 16, -1, 18, 19, 20, 21, 22,
4524 23, 24, -1, -1, -1, -1, -1, 30, 31, 32,
4525 33, 34, 35, 36, -1, -1, 39, -1, -1, -1,
4526 -1, -1, -1, 46, -1, -1, 49, 50, 51, 52,
4527 53, 54, 55, 56, 57, 58, 59, 60, 61, 62,
4528 63, 64, 65, -1, -1, -1, -1, -1, -1, -1,
4529 -1, -1, 75, 76, -1, -1, -1, -1, -1, -1,
4530 -1, -1, -1, -1, -1, -1, -1, 90, 91, -1,
4531 -1, -1, -1, -1, -1, 98, -1, -1, 101, 102,
4532 -1, 104, 105, -1, 107, 108, 109, 110, 111, 112,
4533 113, 114, 115, 116, 117, 118, -1, -1, -1, -1,
4534 -1, -1, -1, -1, -1, -1, 3, 4, 5, -1,
4535 7, -1, -1, -1, 11, 12, 139, 140, 141, 16,
4536 -1, 18, 19, 20, 21, 22, 23, 24, -1, -1,
4537 -1, -1, -1, 30, 31, 32, 33, 34, 35, 36,
4538 -1, -1, 39, -1, -1, -1, -1, -1, -1, 46,
4539 -1, -1, 49, 50, 51, 52, 53, 54, 55, 56,
4540 57, 58, 59, 60, 61, 62, 63, 64, 65, -1,
4541 -1, -1, -1, -1, -1, -1, -1, -1, 75, 76,
4542 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4543 -1, -1, -1, 90, 91, -1, -1, -1, -1, -1,
4544 -1, 98, -1, -1, 101, 102, -1, 104, 105, -1,
4545 107, 108, -1, 110, 111, 112, 113, 114, 115, 116,
4546 117, 118, -1, -1, -1, -1, -1, -1, -1, -1,
4547 -1, -1, 3, 4, 5, -1, 7, -1, -1, -1,
4548 11, 12, 139, 140, 141, 16, -1, 18, 19, 20,
4549 21, 22, 23, 24, -1, -1, -1, -1, -1, 30,
4550 31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
4551 -1, -1, -1, -1, -1, 46, -1, -1, 49, 50,
4552 51, 52, 53, 54, 55, 56, 57, 58, 59, 60,
4553 61, 62, 63, 64, 65, -1, -1, -1, -1, -1,
4554 -1, -1, -1, -1, 75, 76, -1, -1, -1, -1,
4555 -1, -1, -1, -1, -1, -1, -1, -1, -1, 90,
4556 91, -1, -1, -1, -1, -1, -1, 98, -1, -1,
4557 101, 102, -1, 104, 105, -1, -1, 108, 109, 110,
4558 111, 112, 113, 114, 115, 116, 117, 118, -1, -1,
4559 -1, -1, -1, -1, -1, -1, -1, -1, 3, 4,
4560 5, -1, 7, -1, -1, -1, 11, 12, 139, 140,
4561 141, 16, -1, 18, 19, 20, 21, 22, 23, 24,
4562 -1, -1, -1, -1, -1, 30, 31, 32, 33, 34,
4563 35, 36, -1, -1, 39, -1, -1, -1, -1, -1,
4564 -1, 46, -1, -1, 49, 50, 51, 52, 53, 54,
4565 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
4566 65, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4567 75, 76, -1, -1, -1, -1, -1, -1, -1, -1,
4568 -1, -1, -1, -1, -1, 90, 91, -1, -1, -1,
4569 -1, -1, -1, 98, -1, -1, 101, 102, -1, 104,
4570 105, -1, 107, 108, -1, 110, 111, 112, 113, 114,
4571 115, 116, 117, 118, -1, -1, -1, -1, -1, -1,
4572 -1, -1, -1, -1, 3, 4, 5, -1, 7, -1,
4573 -1, -1, 11, 12, 139, 140, 141, 16, -1, 18,
4574 19, 20, 21, 22, 23, 24, -1, -1, -1, -1,
4575 -1, 30, 31, 32, 33, 34, 35, 36, -1, -1,
4576 39, -1, -1, -1, -1, -1, -1, 46, -1, -1,
4577 49, 50, 51, 52, 53, 54, 55, 56, 57, 58,
4578 59, 60, 61, 62, 63, 64, 65, -1, -1, -1,
4579 -1, -1, -1, -1, -1, -1, 75, 76, -1, -1,
4580 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4581 -1, 90, 91, -1, -1, -1, -1, -1, -1, 98,
4582 -1, -1, 101, 102, -1, 104, 105, -1, -1, 108,
4583 -1, 110, 111, 112, 113, 114, 115, 116, 117, 118,
4584 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4585 3, 4, 5, -1, 7, -1, -1, -1, 11, 12,
4586 139, 140, 141, 16, -1, 18, 19, 20, 21, 22,
4587 23, 24, -1, -1, -1, -1, -1, 30, 31, 32,
4588 33, 34, 35, 36, -1, -1, 39, -1, -1, -1,
4589 -1, -1, -1, 46, -1, -1, 49, 50, 51, 52,
4590 53, 54, 55, 56, 57, -1, 59, 60, 61, 62,
4591 63, 64, 65, -1, -1, -1, -1, -1, -1, -1,
4592 -1, -1, 75, 76, -1, -1, -1, -1, -1, -1,
4593 -1, -1, -1, -1, -1, -1, -1, 90, 91, -1,
4594 -1, -1, -1, -1, -1, 98, -1, -1, 101, 102,
4595 -1, 104, 105, -1, 107, -1, -1, 110, 111, 112,
4596 113, 114, 115, 116, 117, 118, -1, -1, -1, -1,
4597 -1, -1, -1, -1, -1, -1, 3, 4, 5, -1,
4598 7, -1, -1, -1, 11, 12, 139, 140, 141, 16,
4599 -1, 18, 19, 20, 21, 22, 23, 24, -1, -1,
4600 -1, -1, -1, 30, 31, 32, 33, 34, 35, 36,
4601 -1, -1, 39, -1, -1, -1, -1, -1, -1, 46,
4602 -1, -1, 49, 50, 51, 52, 53, 54, 55, 56,
4603 57, -1, 59, 60, 61, 62, 63, 64, 65, -1,
4604 -1, -1, -1, -1, -1, -1, -1, -1, 75, 76,
4605 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4606 -1, -1, -1, 90, 91, -1, -1, -1, -1, -1,
4607 -1, 98, -1, -1, 101, 102, -1, 104, 105, -1,
4608 107, -1, -1, 110, 111, 112, 113, 114, 115, 116,
4609 117, 118, -1, -1, -1, -1, -1, -1, -1, -1,
4610 -1, -1, 3, 4, 5, -1, 7, -1, -1, -1,
4611 11, 12, 139, 140, 141, 16, -1, 18, 19, 20,
4612 21, 22, 23, 24, -1, -1, -1, -1, -1, 30,
4613 31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
4614 -1, -1, -1, -1, -1, 46, -1, -1, 49, 50,
4615 51, 52, 53, 54, 55, 56, 57, -1, 59, 60,
4616 61, 62, 63, 64, 65, -1, -1, -1, -1, -1,
4617 -1, -1, -1, -1, 75, 76, -1, -1, -1, -1,
4618 -1, -1, -1, -1, -1, -1, -1, -1, -1, 90,
4619 91, -1, -1, -1, -1, -1, -1, 98, -1, -1,
4620 101, 102, -1, 104, 105, -1, 107, -1, -1, 110,
4621 111, 112, 113, 114, 115, 116, 117, 118, -1, -1,
4622 -1, -1, -1, -1, -1, -1, -1, -1, 3, 4,
4623 5, -1, 7, -1, -1, -1, 11, 12, 139, 140,
4624 141, 16, -1, 18, 19, 20, 21, 22, 23, 24,
4625 -1, -1, -1, -1, -1, 30, 31, 32, 33, 34,
4626 35, 36, -1, -1, 39, -1, -1, -1, -1, -1,
4627 -1, 46, -1, -1, 49, 50, 51, 52, 53, 54,
4628 55, 56, 57, -1, 59, 60, 61, 62, 63, 64,
4629 65, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4630 75, 76, -1, -1, -1, -1, -1, -1, -1, -1,
4631 -1, -1, -1, -1, -1, 90, 91, -1, -1, -1,
4632 -1, -1, -1, 98, -1, -1, 101, 102, -1, 104,
4633 105, -1, 107, -1, -1, 110, 111, 112, 113, 114,
4634 115, 116, 117, 118, -1, -1, -1, -1, -1, -1,
4635 -1, -1, -1, -1, 3, 4, 5, -1, 7, -1,
4636 -1, -1, 11, 12, 139, 140, 141, 16, -1, 18,
4637 19, 20, 21, 22, 23, 24, -1, -1, -1, -1,
4638 -1, 30, 31, 32, 33, 34, 35, 36, -1, -1,
4639 39, -1, -1, -1, -1, -1, -1, 46, -1, -1,
4640 49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
4641 59, 60, 61, 62, 63, 64, 65, -1, -1, -1,
4642 -1, -1, -1, -1, -1, -1, 75, 76, -1, -1,
4643 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4644 -1, 90, 91, -1, -1, -1, -1, -1, -1, 98,
4645 -1, -1, 101, 102, -1, 104, 105, -1, 107, -1,
4646 -1, 110, 111, 112, 113, 114, 115, 116, 117, 118,
4647 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4648 3, 4, 5, -1, 7, -1, -1, -1, 11, 12,
4649 139, 140, 141, 16, -1, 18, 19, 20, 21, 22,
4650 23, 24, -1, -1, -1, -1, -1, 30, 31, 32,
4651 33, 34, 35, 36, -1, -1, 39, -1, -1, -1,
4652 -1, -1, -1, 46, -1, -1, 49, 50, 51, 52,
4653 53, 54, 55, 56, 57, -1, 59, 60, 61, 62,
4654 63, 64, 65, -1, -1, -1, -1, -1, -1, -1,
4655 -1, -1, 75, 76, -1, -1, -1, -1, -1, -1,
4656 -1, -1, -1, -1, -1, -1, -1, 90, 91, -1,
4657 -1, -1, -1, -1, -1, 98, -1, -1, 101, 102,
4658 -1, 104, 105, -1, -1, -1, -1, 110, 111, 112,
4659 113, 114, 115, 116, 117, 118, -1, -1, -1, -1,
4660 -1, -1, -1, -1, -1, -1, 3, 4, 5, -1,
4661 7, -1, -1, -1, 11, 12, 139, 140, 141, 16,
4662 -1, 18, 19, 20, 21, 22, 23, 24, -1, -1,
4663 -1, -1, -1, 30, 31, 32, 33, 34, 35, 36,
4664 -1, -1, 39, -1, -1, -1, -1, -1, -1, 46,
4665 -1, -1, 49, 50, 51, 52, 53, 54, 55, 56,
4666 57, -1, 59, 60, 61, 62, 63, 64, 65, -1,
4667 -1, -1, -1, -1, -1, -1, -1, -1, 75, 76,
4668 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4669 -1, -1, -1, 90, 91, -1, -1, -1, -1, -1,
4670 -1, 98, -1, -1, 101, 102, -1, 104, 105, -1,
4671 -1, -1, -1, 110, 111, 112, 113, 114, 115, 116,
4672 117, 118, -1, -1, -1, -1, -1, -1, -1, -1,
4673 -1, -1, 3, 4, 5, -1, 7, -1, -1, -1,
4674 11, 12, 139, 140, 141, 16, -1, 18, 19, 20,
4675 21, 22, 23, 24, -1, -1, -1, -1, -1, 30,
4676 31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
4677 -1, -1, -1, -1, -1, 46, -1, -1, 49, 50,
4678 51, 52, 53, 54, 55, 56, 57, -1, 59, 60,
4679 61, 62, 63, 64, 65, -1, -1, -1, -1, -1,
4680 -1, -1, -1, -1, 75, 76, -1, -1, -1, -1,
4681 -1, -1, -1, -1, -1, -1, -1, -1, -1, 90,
4682 91, -1, -1, -1, -1, -1, -1, 98, -1, -1,
4683 101, 102, -1, 104, 105, -1, -1, -1, -1, 110,
4684 111, 112, 113, 114, 115, 116, 117, 118, -1, -1,
4685 -1, -1, -1, -1, -1, -1, -1, -1, 3, 4,
4686 5, -1, 7, -1, -1, -1, 11, 12, 139, 140,
4687 141, 16, -1, 18, 19, 20, 21, 22, 23, 24,
4688 -1, -1, -1, -1, -1, 30, 31, 32, 33, 34,
4689 35, 36, -1, -1, 39, -1, -1, -1, -1, -1,
4690 -1, 46, -1, -1, 49, 50, 51, 52, 53, 54,
4691 55, 56, 57, -1, 59, 60, 61, 62, 63, 64,
4692 65, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4693 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4694 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4695 -1, -1, -1, 98, -1, -1, 101, 102, -1, 104,
4696 105, -1, 107, -1, -1, 110, 111, 112, 113, 114,
4697 115, 116, 117, 118, -1, -1, -1, -1, -1, -1,
4698 3, 4, 5, -1, 7, -1, -1, -1, 11, 12,
4699 -1, -1, -1, 16, 139, 18, 19, 20, 21, 22,
4700 23, 24, -1, -1, -1, -1, -1, 30, 31, 32,
4701 33, 34, 35, 36, -1, -1, 39, -1, -1, -1,
4702 -1, -1, -1, 46, -1, -1, 49, 50, 51, 52,
4703 53, 54, 55, 56, 57, -1, 59, 60, 61, 62,
4704 63, 64, 65, -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, -1, -1, -1, -1,
4707 -1, -1, -1, -1, -1, 98, -1, -1, 101, 102,
4708 -1, 104, 105, -1, 107, -1, -1, 110, 111, 112,
4709 113, 114, 115, 116, 117, 118, -1, -1, -1, -1,
4710 -1, -1, 3, 4, 5, -1, 7, -1, -1, -1,
4711 11, 12, -1, -1, -1, 16, 139, 18, 19, 20,
4712 21, 22, 23, 24, -1, -1, -1, -1, -1, 30,
4713 31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
4714 -1, -1, -1, -1, -1, 46, -1, -1, 49, 50,
4715 51, 52, 53, 54, 55, 56, 57, -1, 59, 60,
4716 61, 62, 63, 64, 65, -1, -1, -1, -1, -1,
4717 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4718 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4719 -1, -1, -1, 94, -1, -1, -1, 98, -1, -1,
4720 101, 102, -1, 104, 105, -1, -1, -1, -1, 110,
4721 111, 112, 113, 114, 115, 116, 117, 118, -1, -1,
4722 -1, -1, -1, -1, 3, 4, 5, -1, 7, -1,
4723 -1, -1, 11, 12, -1, -1, -1, 16, 139, 18,
4724 19, 20, 21, 22, 23, 24, -1, -1, -1, -1,
4725 -1, 30, 31, 32, 33, 34, 35, 36, -1, -1,
4726 39, -1, -1, -1, -1, -1, -1, 46, -1, -1,
4727 49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
4728 59, 60, 61, 62, 63, 64, 65, -1, -1, -1,
4729 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4730 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4731 -1, -1, -1, -1, -1, -1, -1, -1, -1, 98,
4732 -1, -1, 101, 102, -1, 104, 105, -1, -1, -1,
4733 -1, 110, 111, 112, 113, 114, 115, 116, 117, 118,
4734 -1, -1, -1, -1, -1, -1, 3, 4, 5, -1,
4735 7, -1, -1, -1, 11, 12, -1, -1, -1, 16,
4736 139, 18, 19, 20, 21, 22, 23, 24, -1, -1,
4737 -1, -1, -1, 30, 31, 32, 33, 34, 35, 36,
4738 -1, -1, 39, -1, -1, -1, -1, -1, -1, 46,
4739 -1, -1, 49, 50, 51, 52, 53, 54, 55, 56,
4740 57, -1, 59, 60, 61, 62, 63, 64, 65, -1,
4741 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4742 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4743 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4744 -1, 98, -1, -1, 101, 102, -1, 104, 105, -1,
4745 -1, -1, -1, 110, 111, 112, 113, 114, 115, 116,
4746 117, 118, -1, -1, -1, -1, -1, -1, 3, 4,
4747 5, -1, 7, -1, -1, -1, 11, 12, -1, -1,
4748 -1, 16, 139, 18, 19, 20, 21, 22, 23, 24,
4749 -1, -1, -1, -1, -1, 30, 31, 32, 33, 34,
4750 35, 36, -1, -1, 39, -1, -1, -1, -1, -1,
4751 -1, 46, -1, -1, 49, 50, 51, 52, 53, 54,
4752 55, 56, 57, -1, 59, 60, 61, 62, 63, 64,
4753 65, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4754 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4755 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4756 -1, -1, -1, 98, -1, -1, 101, 102, -1, 104,
4757 105, -1, -1, -1, -1, 110, 111, 112, 113, 114,
4758 115, 116, 117, 118, -1, -1, -1, -1, -1, -1,
4759 3, 4, 5, -1, 7, -1, -1, -1, 11, 12,
4760 -1, -1, -1, 16, 139, 18, 19, 20, 21, 22,
4761 23, 24, -1, -1, -1, -1, -1, 30, 31, 32,
4762 33, 34, 35, 36, -1, -1, 39, -1, -1, -1,
4763 -1, -1, -1, 46, -1, -1, 49, 50, 51, 52,
4764 53, 54, 55, 56, 57, -1, 59, 60, 61, 62,
4765 63, 64, 65, 33, 34, 35, 36, -1, -1, -1,
4766 -1, -1, -1, -1, -1, -1, -1, -1, -1, 49,
4767 50, 51, 52, -1, -1, -1, 56, -1, -1, 59,
4768 60, 61, 62, 63, -1, 98, -1, -1, 101, 102,
4769 -1, 104, 105, -1, -1, -1, -1, 110, 111, 112,
4770 113, 114, 115, 116, 117, 118, -1, -1, -1, -1,
4771 90, 91, -1, -1, -1, -1, -1, -1, 98, -1,
4772 -1, 101, -1, -1, 104, 105, 139, 107, -1, -1,
4773 110, 111, 112, 113, 114, 115, 116, 117, 118, 33,
4774 34, 35, 36, -1, -1, -1, -1, -1, -1, -1,
4775 -1, -1, 132, -1, -1, 49, 50, 51, 52, 139,
4776 -1, -1, 56, -1, -1, 59, 60, 61, 62, 63,
4777 -1, -1, 33, 34, 35, 36, -1, -1, -1, -1,
4778 -1, -1, -1, -1, -1, -1, -1, -1, 49, 50,
4779 51, 52, -1, -1, -1, 56, 90, 91, 59, 60,
4780 61, 62, 63, -1, 98, -1, -1, 101, -1, -1,
4781 104, 105, -1, 107, -1, -1, 110, 111, 112, 113,
4782 114, 115, 116, 117, 118, -1, -1, -1, -1, 90,
4783 91, -1, -1, -1, -1, -1, -1, 98, 132, -1,
4784 101, -1, -1, 104, 105, 139, -1, -1, -1, 110,
4785 111, 112, 113, 114, 115, 116, 117, 118, 52, 53,
4786 -1, -1, 56, -1, -1, -1, -1, -1, -1, -1,
4787 -1, 132, -1, -1, -1, -1, -1, -1, 139, -1,
4788 -1, 75, 76, 77, 78, 79, 80, 81, 82, 83,
4789 -1, -1, 86, 87, -1, -1, -1, -1, 92, 93,
4790 94, 95, -1, -1, -1, -1, -1, -1, -1, -1,
4791 -1, -1, -1, 107, 108, -1, -1, -1, -1, -1,
4792 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4793 -1, -1, -1, -1, -1, 129, 130, 131, 132, 133,
4794 134, 135, 136, 137, 138, -1, 140, 141, 52, 53,
4795 -1, -1, 56, 147, 148, -1, -1, -1, -1, -1,
4796 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4797 -1, 75, 76, 77, 78, 79, 80, 81, 82, 83,
4798 -1, -1, 86, 87, -1, -1, -1, -1, 92, 93,
4799 94, 95, -1, -1, -1, -1, -1, -1, -1, -1,
4800 -1, -1, -1, 107, 108, -1, -1, -1, -1, -1,
4801 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4802 -1, -1, -1, -1, -1, 129, 130, 131, 132, 133,
4803 134, 135, 136, 137, 138, -1, 140, 141, 52, 53,
4804 -1, -1, 56, 147, 148, -1, -1, -1, -1, -1,
4805 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4806 -1, 75, 76, 77, 78, 79, 80, 81, 82, 83,
4807 -1, -1, 86, 87, -1, -1, -1, -1, 92, 93,
4808 94, 95, -1, -1, -1, -1, -1, -1, -1, -1,
4809 -1, -1, -1, 107, 108, -1, -1, -1, -1, -1,
4810 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4811 -1, -1, -1, -1, -1, 129, 130, 131, 132, 133,
4812 134, 135, 136, 137, 138, -1, 140, 141, 52, 53,
4813 -1, -1, 56, 147, 148, -1, -1, -1, -1, -1,
4814 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4815 -1, 75, 76, 77, 78, 79, 80, 81, 82, 83,
4816 -1, -1, 86, 87, -1, -1, -1, -1, 92, 93,
4817 94, 95, -1, -1, -1, -1, -1, -1, -1, -1,
4818 -1, -1, -1, 107, 108, -1, -1, -1, -1, -1,
4819 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4820 -1, -1, -1, -1, -1, 129, 130, 131, 132, 133,
4821 134, 135, 136, 137, 138, -1, 140, 141, 52, 53,
4822 -1, -1, 56, 147, 148, -1, -1, -1, -1, -1,
4823 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4824 -1, 75, 76, 77, 78, 79, 80, 81, 82, 83,
4825 -1, -1, 86, 87, -1, -1, -1, -1, 92, 93,
4826 94, 95, -1, -1, -1, -1, -1, -1, -1, -1,
4827 -1, -1, -1, 107, 108, -1, -1, -1, -1, -1,
4828 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4829 -1, -1, -1, -1, -1, 129, 130, 131, 132, 133,
4830 134, 135, 136, 137, 138, -1, 140, 141, 52, 53,
4831 -1, -1, 56, 147, 148, -1, -1, -1, -1, -1,
4832 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4833 -1, 75, 76, 77, 78, 79, 80, 81, 82, 83,
4834 -1, -1, 86, 87, -1, -1, -1, -1, 92, 93,
4835 94, 95, -1, -1, -1, -1, -1, -1, -1, -1,
4836 -1, -1, -1, 107, 108, -1, -1, -1, -1, -1,
4837 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4838 -1, -1, -1, -1, -1, 129, 130, 131, 132, 133,
4839 134, 135, 136, 137, 138, -1, 140, 141, 52, 53,
4840 -1, -1, 56, 147, 148, -1, -1, -1, -1, -1,
4841 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4842 -1, 75, 76, 77, 78, 79, 80, 81, 82, 83,
4843 -1, -1, 86, 87, -1, -1, -1, -1, 92, 93,
4844 94, 95, -1, -1, -1, -1, -1, -1, -1, -1,
4845 -1, -1, -1, 107, 108, -1, -1, -1, -1, -1,
4846 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4847 -1, -1, -1, -1, -1, 129, 130, 131, 132, 133,
4848 134, 135, 136, 137, 138, -1, 140, 141, 52, 53,
4849 -1, -1, 56, 147, 148, -1, -1, -1, -1, -1,
4850 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4851 -1, 75, 76, 77, 78, 79, 80, 81, 82, 83,
4852 -1, -1, 86, 87, -1, -1, -1, -1, 92, 93,
4853 94, 95, -1, -1, -1, -1, -1, -1, -1, -1,
4854 -1, -1, -1, 107, 108, -1, -1, -1, -1, -1,
4855 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4856 -1, -1, -1, -1, -1, 129, 130, 131, 132, 133,
4857 134, 135, 136, 137, 138, -1, 140, 141, 52, 53,
4858 -1, -1, 56, 147, 148, -1, -1, -1, -1, -1,
4859 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4860 -1, 75, 76, 77, 78, 79, 80, 81, 82, 83,
4861 -1, -1, 86, 87, -1, -1, -1, -1, 92, 93,
4862 94, 95, -1, -1, -1, -1, -1, -1, -1, -1,
4863 -1, -1, -1, 107, 108, -1, -1, -1, -1, -1,
4864 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4865 -1, -1, -1, -1, -1, 129, 130, 131, 132, 133,
4866 134, 135, 136, 137, 138, -1, 140, 141, 52, 53,
4867 -1, -1, 56, 147, 148, -1, -1, -1, -1, -1,
4868 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4869 -1, 75, 76, 77, 78, 79, 80, 81, 82, 83,
4870 -1, -1, 86, 87, -1, -1, -1, -1, 92, 93,
4871 94, 95, -1, -1, -1, -1, -1, -1, -1, -1,
4872 -1, -1, -1, 107, 108, -1, -1, -1, -1, -1,
4873 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4874 -1, -1, -1, -1, -1, 129, 130, 131, 132, 133,
4875 134, 135, 136, 137, 138, -1, 140, 141, 52, 53,
4876 -1, -1, 56, 147, 148, -1, -1, -1, -1, -1,
4877 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4878 -1, 75, 76, 77, 78, 79, 80, 81, 82, 83,
4879 -1, -1, 86, 87, -1, -1, -1, -1, 92, 93,
4880 94, 95, -1, -1, -1, -1, -1, -1, -1, -1,
4881 -1, -1, -1, 107, 108, -1, -1, -1, -1, -1,
4882 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4883 -1, -1, -1, -1, -1, 129, 130, 131, 132, 133,
4884 134, 135, 136, 137, 138, -1, 140, 141, 52, 53,
4885 -1, -1, 56, 147, 148, -1, -1, -1, -1, -1,
4886 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4887 -1, 75, 76, 77, 78, 79, 80, 81, 82, 83,
4888 -1, -1, 86, 87, -1, -1, -1, -1, 92, 93,
4889 94, 95, -1, -1, -1, -1, -1, -1, -1, -1,
4890 -1, -1, -1, 107, 108, -1, -1, -1, -1, -1,
4891 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4892 -1, -1, -1, -1, -1, 129, 130, 131, 132, 133,
4893 134, 135, 136, 137, 138, -1, 140, 141, 52, 53,
4894 -1, -1, 56, 147, 148, -1, -1, -1, -1, -1,
4895 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4896 -1, 75, 76, 77, 78, 79, 80, 81, 82, 83,
4897 -1, -1, 86, 87, -1, -1, -1, -1, 92, 93,
4898 94, 95, -1, -1, -1, -1, -1, -1, -1, -1,
4899 -1, -1, -1, 107, 108, -1, -1, -1, -1, -1,
4900 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4901 -1, -1, -1, -1, -1, 129, 130, 131, 132, 133,
4902 134, 135, 136, 137, 138, -1, 140, 141, 52, 53,
4903 -1, -1, 56, 147, 148, -1, -1, -1, -1, -1,
4904 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4905 -1, 75, 76, 77, 78, 79, 80, 81, 82, 83,
4906 -1, -1, 86, 87, -1, -1, -1, -1, 92, 93,
4907 94, 95, -1, -1, -1, -1, -1, -1, -1, -1,
4908 -1, -1, -1, 107, 108, -1, -1, -1, -1, -1,
4909 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4910 -1, -1, -1, -1, -1, 129, 130, 131, 132, 133,
4911 134, 135, 136, 137, 138, -1, 140, 141, 52, 53,
4912 -1, -1, 56, 147, 148, -1, -1, -1, -1, -1,
4913 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4914 -1, 75, 76, 77, 78, 79, 80, 81, 82, 83,
4915 -1, -1, 86, 87, -1, -1, -1, -1, 92, 93,
4916 94, 95, -1, -1, -1, -1, -1, -1, -1, -1,
4917 -1, -1, -1, 107, 108, -1, -1, -1, -1, -1,
4918 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4919 -1, -1, -1, -1, -1, 129, 130, 131, 132, 133,
4920 134, 135, 136, 137, 138, -1, 140, 141, 52, 53,
4921 -1, -1, 56, 147, 148, -1, -1, -1, -1, -1,
4922 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4923 -1, 75, 76, 77, 78, 79, 80, 81, 82, 83,
4924 -1, -1, 86, 87, -1, -1, -1, -1, 92, 93,
4925 94, 95, -1, -1, -1, -1, -1, -1, -1, -1,
4926 -1, -1, -1, 107, 108, -1, -1, -1, -1, -1,
4927 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4928 -1, -1, -1, -1, -1, 129, 130, 131, 132, 133,
4929 134, 135, 136, 137, 138, -1, 140, 141, -1, -1,
4930 -1, -1, -1, 147
4931};
4932
4933 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
4934 symbol of state STATE-NUM. */
4935static const yytype_int16 yystos[] =
4936{
4937 0, 155, 156, 0, 1, 3, 4, 5, 6, 7,
4938 11, 12, 16, 18, 19, 20, 21, 22, 23, 24,
4939 30, 31, 32, 33, 34, 35, 36, 39, 45, 46,
4940 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
4941 57, 59, 60, 61, 62, 63, 64, 65, 75, 76,
4942 90, 91, 98, 101, 102, 104, 105, 107, 110, 111,
4943 112, 113, 114, 115, 116, 117, 118, 139, 140, 141,
4944 157, 158, 159, 167, 169, 171, 179, 180, 182, 183,
4945 184, 186, 187, 188, 190, 191, 200, 203, 218, 233,
4946 234, 235, 236, 237, 238, 239, 240, 241, 242, 243,
4947 252, 279, 280, 333, 334, 335, 336, 337, 338, 339,
4948 342, 344, 345, 359, 360, 362, 363, 364, 365, 366,
4949 367, 368, 369, 405, 419, 159, 3, 4, 5, 6,
4950 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
4951 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
4952 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
4953 45, 46, 47, 48, 49, 50, 51, 52, 53, 56,
4954 75, 76, 77, 78, 79, 80, 81, 82, 83, 86,
4955 87, 92, 93, 94, 95, 107, 108, 129, 130, 131,
4956 132, 133, 134, 135, 136, 137, 138, 140, 141, 147,
4957 194, 195, 196, 198, 199, 359, 39, 58, 98, 101,
4958 107, 108, 109, 112, 140, 183, 191, 200, 204, 210,
4959 213, 215, 233, 365, 366, 368, 369, 403, 404, 210,
4960 148, 211, 212, 148, 207, 211, 148, 153, 412, 54,
4961 195, 412, 143, 160, 143, 21, 22, 31, 32, 182,
4962 200, 233, 252, 200, 200, 200, 56, 1, 47, 101,
4963 163, 164, 165, 167, 185, 186, 419, 167, 220, 205,
4964 215, 403, 419, 204, 402, 403, 419, 46, 98, 139,
4965 146, 190, 218, 233, 365, 366, 369, 223, 54, 55,
4966 57, 194, 348, 361, 348, 349, 350, 152, 152, 152,
4967 152, 364, 179, 200, 200, 151, 153, 411, 417, 418,
4968 40, 41, 42, 43, 44, 37, 38, 26, 143, 207,
4969 211, 244, 281, 28, 245, 278, 126, 146, 101, 107,
4970 187, 126, 25, 77, 78, 79, 80, 81, 82, 83,
4971 84, 85, 86, 87, 88, 89, 94, 95, 127, 129,
4972 130, 131, 132, 133, 134, 135, 136, 137, 138, 202,
4973 202, 68, 96, 97, 145, 409, 219, 171, 175, 175,
4974 176, 177, 176, 175, 411, 418, 98, 184, 191, 233,
4975 257, 365, 366, 369, 52, 56, 94, 98, 192, 193,
4976 233, 365, 366, 369, 193, 33, 34, 35, 36, 49,
4977 50, 51, 52, 56, 148, 194, 367, 400, 210, 97,
4978 409, 410, 281, 336, 99, 99, 146, 204, 56, 204,
4979 204, 204, 348, 126, 100, 146, 214, 419, 97, 145,
4980 409, 99, 99, 146, 214, 210, 412, 413, 210, 91,
4981 209, 210, 215, 377, 403, 419, 171, 413, 171, 54,
4982 64, 65, 168, 148, 201, 157, 163, 97, 409, 99,
4983 167, 166, 185, 149, 411, 418, 413, 221, 413, 150,
4984 146, 153, 416, 146, 416, 144, 416, 412, 56, 364,
4985 187, 189, 146, 97, 145, 409, 270, 271, 66, 119,
4986 121, 122, 351, 119, 119, 351, 67, 351, 340, 346,
4987 343, 347, 77, 151, 159, 175, 175, 175, 175, 167,
4988 171, 171, 282, 283, 106, 181, 286, 287, 286, 107,
4989 179, 204, 215, 216, 217, 185, 146, 190, 146, 169,
4990 170, 179, 191, 200, 204, 206, 217, 233, 369, 172,
4991 200, 200, 200, 200, 200, 200, 200, 200, 200, 200,
4992 200, 200, 200, 200, 200, 200, 200, 200, 200, 200,
4993 200, 200, 200, 200, 52, 53, 56, 198, 207, 406,
4994 407, 209, 215, 52, 53, 56, 198, 207, 406, 161,
4995 163, 13, 253, 417, 253, 163, 175, 163, 411, 225,
4996 56, 97, 145, 409, 25, 171, 52, 56, 192, 130,
4997 370, 97, 145, 409, 228, 401, 229, 68, 97, 408,
4998 52, 56, 406, 170, 200, 206, 170, 206, 197, 124,
4999 204, 107, 204, 213, 403, 52, 56, 209, 52, 56,
5000 404, 413, 149, 413, 146, 413, 146, 413, 195, 222,
5001 200, 144, 144, 406, 406, 206, 160, 413, 165, 413,
5002 403, 146, 189, 52, 56, 209, 52, 56, 272, 353,
5003 352, 119, 341, 351, 66, 119, 119, 341, 66, 119,
5004 200, 144, 284, 282, 10, 251, 288, 251, 204, 146,
5005 44, 413, 189, 146, 44, 126, 44, 97, 145, 409,
5006 173, 412, 99, 99, 207, 211, 412, 414, 146, 99,
5007 99, 207, 208, 211, 419, 251, 8, 246, 329, 419,
5008 163, 13, 163, 251, 27, 254, 417, 251, 25, 224,
5009 293, 17, 248, 291, 52, 56, 209, 52, 56, 176,
5010 227, 371, 226, 52, 56, 192, 209, 161, 171, 230,
5011 231, 208, 211, 195, 204, 204, 214, 99, 99, 414,
5012 99, 99, 377, 403, 171, 416, 187, 414, 273, 354,
5013 54, 55, 57, 358, 369, 152, 351, 152, 152, 152,
5014 285, 144, 289, 107, 204, 167, 189, 167, 200, 52,
5015 56, 209, 52, 56, 52, 56, 90, 91, 98, 101,
5016 104, 105, 110, 132, 303, 304, 305, 308, 323, 324,
5017 326, 327, 328, 333, 334, 337, 338, 339, 342, 344,
5018 345, 366, 128, 170, 206, 170, 206, 181, 150, 99,
5019 170, 206, 170, 206, 181, 204, 217, 330, 419, 9,
5020 15, 247, 249, 332, 419, 14, 249, 250, 255, 256,
5021 419, 256, 178, 294, 291, 251, 107, 204, 290, 251,
5022 414, 163, 417, 175, 161, 414, 251, 413, 148, 372,
5023 373, 194, 281, 278, 99, 413, 146, 413, 274, 355,
5024 131, 265, 266, 419, 265, 204, 414, 324, 324, 56,
5025 192, 311, 309, 414, 310, 412, 415, 325, 52, 100,
5026 174, 131, 88, 89, 97, 145, 148, 306, 307, 200,
5027 170, 206, 100, 331, 419, 163, 162, 163, 175, 251,
5028 251, 295, 251, 204, 146, 253, 251, 161, 417, 251,
5029 52, 54, 55, 56, 57, 58, 77, 91, 101, 107,
5030 108, 109, 133, 136, 374, 376, 377, 378, 379, 380,
5031 381, 382, 383, 384, 387, 388, 389, 390, 391, 394,
5032 395, 396, 397, 398, 161, 376, 382, 232, 148, 276,
5033 376, 356, 262, 264, 267, 380, 382, 383, 385, 386,
5034 389, 390, 392, 393, 396, 398, 412, 163, 161, 303,
5035 107, 303, 312, 313, 314, 316, 58, 112, 317, 318,
5036 319, 320, 321, 322, 388, 144, 270, 326, 308, 324,
5037 324, 192, 414, 413, 112, 312, 317, 312, 317, 98,
5038 191, 233, 365, 366, 369, 253, 163, 253, 296, 107,
5039 204, 163, 251, 101, 107, 258, 259, 260, 261, 379,
5040 413, 413, 126, 146, 375, 204, 146, 399, 419, 34,
5041 52, 146, 399, 399, 146, 375, 52, 146, 375, 52,
5042 251, 417, 146, 372, 376, 275, 357, 267, 131, 126,
5043 146, 263, 98, 233, 146, 399, 399, 399, 146, 263,
5044 146, 263, 151, 413, 52, 146, 414, 107, 303, 316,
5045 146, 348, 415, 146, 303, 34, 52, 348, 413, 413,
5046 414, 414, 56, 97, 145, 409, 163, 332, 163, 301,
5047 302, 303, 314, 317, 204, 256, 291, 292, 260, 379,
5048 146, 413, 146, 204, 374, 377, 381, 394, 396, 384,
5049 388, 390, 398, 382, 391, 396, 380, 382, 161, 267,
5050 29, 123, 277, 163, 131, 233, 262, 393, 396, 56,
5051 97, 385, 390, 382, 392, 396, 382, 52, 268, 269,
5052 378, 146, 315, 316, 52, 146, 146, 124, 319, 321,
5053 322, 52, 56, 209, 52, 56, 329, 255, 253, 40,
5054 41, 146, 413, 258, 261, 259, 413, 146, 375, 146,
5055 375, 399, 146, 375, 146, 375, 375, 251, 149, 161,
5056 163, 120, 146, 263, 146, 263, 52, 56, 399, 146,
5057 263, 146, 263, 263, 146, 412, 315, 146, 146, 315,
5058 414, 297, 175, 175, 312, 146, 146, 382, 396, 382,
5059 382, 251, 144, 382, 396, 382, 382, 269, 316, 315,
5060 298, 259, 375, 146, 375, 375, 375, 263, 146, 263,
5061 263, 263, 299, 382, 382, 163, 375, 263, 256, 293,
5062 300
5063};
5064
5065 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
5066static const yytype_int16 yyr1[] =
5067{
5068 0, 154, 156, 155, 157, 158, 158, 158, 158, 159,
5069 159, 160, 162, 161, 161, 163, 164, 164, 164, 164,
5070 165, 166, 165, 168, 167, 167, 167, 167, 167, 167,
5071 167, 167, 167, 167, 167, 167, 167, 167, 167, 167,
5072 167, 169, 169, 169, 169, 169, 169, 169, 169, 170,
5073 170, 170, 171, 171, 171, 171, 171, 172, 173, 174,
5074 171, 171, 175, 177, 178, 176, 179, 179, 180, 180,
5075 181, 182, 183, 183, 183, 183, 183, 183, 183, 183,
5076 183, 183, 183, 184, 184, 185, 185, 186, 186, 186,
5077 186, 186, 186, 186, 186, 186, 186, 187, 187, 188,
5078 188, 189, 189, 190, 190, 190, 190, 190, 190, 190,
5079 190, 190, 191, 191, 191, 191, 191, 191, 191, 191,
5080 191, 192, 192, 193, 193, 193, 194, 194, 194, 194,
5081 194, 195, 195, 196, 197, 196, 198, 198, 198, 198,
5082 198, 198, 198, 198, 198, 198, 198, 198, 198, 198,
5083 198, 198, 198, 198, 198, 198, 198, 198, 198, 198,
5084 198, 198, 198, 198, 198, 198, 199, 199, 199, 199,
5085 199, 199, 199, 199, 199, 199, 199, 199, 199, 199,
5086 199, 199, 199, 199, 199, 199, 199, 199, 199, 199,
5087 199, 199, 199, 199, 199, 199, 199, 199, 199, 199,
5088 199, 199, 199, 199, 199, 199, 199, 200, 200, 200,
5089 200, 200, 200, 200, 200, 200, 200, 200, 200, 200,
5090 200, 200, 200, 200, 200, 200, 200, 200, 200, 200,
5091 200, 200, 200, 200, 200, 200, 200, 200, 200, 200,
5092 200, 200, 200, 200, 200, 200, 200, 201, 200, 200,
5093 200, 202, 202, 202, 202, 203, 203, 204, 205, 205,
5094 205, 205, 206, 206, 207, 207, 207, 208, 208, 209,
5095 209, 209, 209, 209, 210, 210, 210, 210, 210, 212,
5096 211, 213, 214, 214, 215, 215, 215, 215, 216, 216,
5097 217, 217, 217, 218, 218, 218, 218, 218, 218, 218,
5098 218, 218, 218, 218, 219, 218, 220, 218, 221, 218,
5099 218, 218, 218, 218, 218, 218, 218, 218, 218, 222,
5100 218, 218, 218, 218, 218, 218, 223, 218, 218, 218,
5101 218, 218, 224, 218, 225, 218, 218, 218, 226, 218,
5102 227, 218, 228, 218, 229, 230, 218, 231, 232, 218,
5103 218, 218, 218, 218, 233, 234, 235, 236, 237, 238,
5104 239, 240, 241, 242, 243, 244, 245, 246, 247, 248,
5105 249, 250, 251, 252, 253, 253, 253, 254, 254, 255,
5106 255, 256, 256, 257, 257, 258, 258, 259, 259, 260,
5107 260, 260, 260, 260, 261, 261, 262, 262, 262, 262,
5108 262, 263, 263, 264, 264, 264, 264, 264, 264, 264,
5109 264, 264, 264, 264, 264, 264, 264, 264, 265, 265,
5110 266, 266, 267, 267, 268, 268, 269, 269, 271, 272,
5111 273, 274, 275, 270, 276, 276, 277, 277, 278, 279,
5112 279, 279, 279, 280, 280, 280, 280, 280, 280, 280,
5113 280, 280, 281, 281, 283, 284, 285, 282, 287, 288,
5114 289, 286, 290, 290, 290, 290, 291, 292, 292, 294,
5115 295, 296, 297, 298, 299, 293, 300, 300, 301, 301,
5116 301, 302, 302, 302, 302, 302, 303, 304, 304, 305,
5117 305, 306, 307, 308, 308, 308, 308, 308, 308, 308,
5118 309, 308, 308, 310, 308, 308, 311, 308, 312, 312,
5119 312, 312, 312, 312, 312, 312, 313, 313, 314, 314,
5120 314, 314, 315, 315, 316, 317, 317, 317, 317, 317,
5121 317, 318, 318, 319, 319, 320, 320, 321, 321, 322,
5122 323, 323, 323, 323, 323, 323, 323, 323, 323, 323,
5123 324, 324, 324, 324, 324, 324, 324, 324, 324, 325,
5124 324, 326, 327, 328, 328, 328, 329, 329, 330, 330,
5125 330, 331, 331, 332, 332, 333, 333, 334, 335, 335,
5126 335, 336, 337, 338, 339, 340, 340, 341, 341, 342,
5127 343, 343, 344, 345, 346, 346, 347, 347, 348, 348,
5128 349, 349, 350, 350, 351, 352, 351, 353, 354, 355,
5129 356, 357, 351, 358, 358, 358, 358, 359, 359, 360,
5130 361, 361, 361, 361, 362, 363, 363, 364, 364, 364,
5131 364, 365, 365, 365, 365, 365, 366, 366, 366, 366,
5132 366, 366, 366, 367, 367, 368, 368, 369, 369, 371,
5133 370, 370, 372, 372, 372, 373, 372, 374, 374, 374,
5134 374, 374, 375, 375, 376, 376, 376, 376, 376, 376,
5135 376, 376, 376, 376, 376, 376, 376, 376, 376, 377,
5136 378, 378, 378, 378, 379, 379, 380, 381, 381, 382,
5137 382, 383, 384, 384, 385, 385, 386, 386, 387, 387,
5138 388, 388, 389, 390, 390, 391, 392, 393, 393, 394,
5139 394, 395, 395, 396, 396, 397, 397, 398, 399, 399,
5140 400, 401, 400, 402, 402, 403, 403, 404, 404, 404,
5141 404, 405, 405, 405, 406, 406, 406, 406, 407, 407,
5142 407, 408, 408, 409, 409, 410, 410, 411, 411, 412,
5143 412, 413, 414, 415, 416, 416, 416, 417, 417, 418,
5144 418, 419
5145};
5146
5147 /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */
5148static const yytype_int8 yyr2[] =
5149{
5150 0, 2, 0, 2, 2, 1, 1, 3, 2, 1,
5151 2, 3, 0, 6, 3, 2, 1, 1, 3, 2,
5152 1, 0, 3, 0, 4, 3, 3, 3, 2, 3,
5153 3, 3, 3, 3, 4, 1, 3, 3, 5, 3,
5154 1, 3, 3, 6, 5, 5, 5, 5, 3, 1,
5155 3, 1, 1, 3, 3, 3, 2, 0, 0, 0,
5156 6, 1, 1, 0, 0, 4, 1, 1, 1, 4,
5157 3, 1, 2, 3, 4, 5, 4, 5, 2, 2,
5158 2, 2, 2, 1, 3, 1, 3, 1, 2, 3,
5159 5, 2, 4, 2, 4, 1, 3, 1, 3, 2,
5160 3, 1, 3, 1, 1, 4, 3, 3, 3, 3,
5161 2, 1, 1, 1, 4, 3, 3, 3, 3, 2,
5162 1, 1, 1, 2, 1, 3, 1, 1, 1, 1,
5163 1, 1, 1, 1, 0, 4, 1, 1, 1, 1,
5164 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
5165 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
5166 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
5167 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
5168 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
5169 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
5170 1, 1, 1, 1, 1, 1, 1, 3, 3, 6,
5171 5, 5, 5, 5, 4, 3, 3, 3, 2, 2,
5172 2, 2, 3, 3, 3, 3, 3, 3, 4, 2,
5173 2, 3, 3, 3, 3, 1, 3, 3, 3, 3,
5174 3, 2, 2, 3, 3, 3, 3, 0, 4, 6,
5175 1, 1, 1, 1, 1, 3, 3, 1, 1, 2,
5176 4, 2, 1, 3, 3, 5, 3, 1, 1, 1,
5177 1, 2, 4, 2, 1, 2, 2, 4, 1, 0,
5178 2, 2, 2, 1, 1, 2, 3, 4, 1, 1,
5179 3, 4, 2, 1, 1, 1, 1, 1, 1, 1,
5180 1, 1, 1, 1, 0, 4, 0, 3, 0, 4,
5181 3, 3, 2, 3, 3, 1, 4, 3, 1, 0,
5182 6, 4, 3, 2, 1, 2, 0, 3, 6, 6,
5183 4, 4, 0, 6, 0, 5, 5, 6, 0, 6,
5184 0, 7, 0, 5, 0, 0, 7, 0, 0, 9,
5185 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
5186 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
5187 1, 1, 1, 1, 1, 1, 2, 1, 1, 1,
5188 5, 1, 2, 1, 1, 1, 3, 1, 3, 1,
5189 3, 5, 1, 3, 2, 1, 4, 2, 2, 2,
5190 1, 2, 0, 6, 8, 4, 6, 4, 2, 6,
5191 2, 4, 6, 2, 4, 2, 4, 1, 1, 1,
5192 3, 4, 1, 4, 1, 3, 1, 1, 0, 0,
5193 0, 0, 0, 7, 4, 1, 3, 3, 3, 2,
5194 4, 5, 5, 2, 4, 4, 3, 3, 3, 2,
5195 1, 4, 3, 3, 0, 0, 0, 5, 0, 0,
5196 0, 5, 1, 2, 3, 4, 5, 1, 1, 0,
5197 0, 0, 0, 0, 0, 11, 1, 1, 1, 3,
5198 3, 1, 2, 3, 1, 1, 1, 3, 1, 3,
5199 1, 1, 1, 1, 4, 4, 3, 4, 4, 3,
5200 0, 4, 2, 0, 4, 2, 0, 4, 1, 1,
5201 2, 3, 5, 2, 4, 1, 2, 3, 2, 4,
5202 1, 3, 1, 3, 1, 3, 1, 2, 1, 3,
5203 1, 1, 3, 2, 1, 1, 3, 2, 1, 2,
5204 1, 3, 3, 2, 2, 1, 1, 1, 2, 2,
5205 1, 1, 1, 1, 1, 1, 1, 1, 1, 0,
5206 3, 1, 2, 2, 3, 1, 6, 1, 1, 1,
5207 1, 2, 1, 2, 1, 1, 1, 1, 1, 1,
5208 2, 3, 3, 3, 4, 0, 3, 1, 2, 4,
5209 0, 3, 4, 4, 0, 3, 0, 3, 0, 2,
5210 0, 2, 0, 2, 1, 0, 3, 0, 0, 0,
5211 0, 0, 8, 1, 1, 1, 1, 1, 1, 2,
5212 1, 1, 1, 1, 3, 1, 2, 1, 1, 1,
5213 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
5214 1, 1, 1, 1, 1, 1, 1, 1, 1, 0,
5215 4, 0, 3, 5, 3, 0, 3, 4, 2, 2,
5216 2, 1, 2, 0, 6, 8, 4, 6, 4, 6,
5217 2, 4, 6, 2, 4, 2, 4, 1, 0, 1,
5218 1, 1, 1, 1, 1, 1, 1, 1, 3, 1,
5219 3, 1, 2, 1, 2, 1, 1, 3, 1, 3,
5220 1, 1, 2, 2, 1, 3, 3, 1, 3, 1,
5221 3, 1, 1, 2, 1, 1, 1, 2, 2, 1,
5222 1, 0, 4, 1, 2, 1, 3, 3, 2, 4,
5223 2, 1, 1, 1, 1, 1, 1, 1, 1, 1,
5224 1, 1, 1, 1, 1, 1, 1, 0, 1, 0,
5225 1, 2, 2, 2, 0, 1, 1, 1, 1, 1,
5226 2, 0
5227};
5228
5229
5230#define yyerrok (yyerrstatus = 0)
5231#define yyclearin (yychar = YYEMPTY)
5232#define YYEMPTY (-2)
5233#define YYEOF 0
5234
5235#define YYACCEPT goto yyacceptlab
5236#define YYABORT goto yyabortlab
5237#define YYERROR goto yyerrorlab
5238
5239
5240#define YYRECOVERING() (!!yyerrstatus)
5241
5242#define YYBACKUP(Token, Value) \
5243 do \
5244 if (yychar == YYEMPTY) \
5245 { \
5246 yychar = (Token); \
5247 yylval = (Value); \
5248 YYPOPSTACK (yylen); \
5249 yystate = *yyssp; \
5250 goto yybackup; \
5251 } \
5252 else \
5253 { \
5254 yyerror (&yylloc, p, YY_("syntax error: cannot back up")); \
5255 YYERROR; \
5256 } \
5257 while (0)
5258
5259/* Error token number */
5260#define YYTERROR 1
5261#define YYERRCODE 256
5262
5263
5264/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
5265 If N is 0, then set CURRENT to the empty location which ends
5266 the previous symbol: RHS[0] (always defined). */
5267
5268#ifndef YYLLOC_DEFAULT
5269# define YYLLOC_DEFAULT(Current, Rhs, N) \
5270 do \
5271 if (N) \
5272 { \
5273 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
5274 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
5275 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
5276 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
5277 } \
5278 else \
5279 { \
5280 (Current).first_line = (Current).last_line = \
5281 YYRHSLOC (Rhs, 0).last_line; \
5282 (Current).first_column = (Current).last_column = \
5283 YYRHSLOC (Rhs, 0).last_column; \
5284 } \
5285 while (0)
5286#endif
5287
5288#define YYRHSLOC(Rhs, K) ((Rhs)[K])
5289
5290
5291/* Enable debugging if requested. */
5292#if YYDEBUG
5293
5294# ifndef YYFPRINTF
5295# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
5296# define YYFPRINTF fprintf
5297# endif
5298
5299# define YYDPRINTF(Args) \
5300do { \
5301 if (yydebug) \
5302 YYFPRINTF Args; \
5303} while (0)
5304
5305
5306/* YY_LOCATION_PRINT -- Print the location on the stream.
5307 This macro was not mandated originally: define only if we know
5308 we won't break user code: when these are the locations we know. */
5309
5310#ifndef YY_LOCATION_PRINT
5311# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
5312
5313/* Print *YYLOCP on YYO. Private, do not rely on its existence. */
5314
5316static int
5317yy_location_print_ (FILE *yyo, YYLTYPE const * const yylocp)
5318{
5319 int res = 0;
5320 int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0;
5321 if (0 <= yylocp->first_line)
5322 {
5323 res += YYFPRINTF (p, "%d", yylocp->first_line);
5324 if (0 <= yylocp->first_column)
5325 res += YYFPRINTF (p, ".%d", yylocp->first_column);
5326 }
5327 if (0 <= yylocp->last_line)
5328 {
5329 if (yylocp->first_line < yylocp->last_line)
5330 {
5331 res += YYFPRINTF (p, "-%d", yylocp->last_line);
5332 if (0 <= end_col)
5333 res += YYFPRINTF (p, ".%d", end_col);
5334 }
5335 else if (0 <= end_col && yylocp->first_column < end_col)
5336 res += YYFPRINTF (p, "-%d", end_col);
5337 }
5338 return res;
5339 }
5340
5341# define YY_LOCATION_PRINT(File, Loc) \
5342 yy_location_print_ (File, &(Loc))
5343
5344# else
5345# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
5346# endif
5347#endif
5348
5349
5350# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
5351do { \
5352 if (yydebug) \
5353 { \
5354 YYFPRINTF (p, "%s ", Title); \
5355 yy_symbol_print (stderr, \
5356 Type, Value, Location, p); \
5357 YYFPRINTF (p, "\n"); \
5358 } \
5359} while (0)
5360
5361
5362/*-----------------------------------.
5363| Print this symbol's value on YYO. |
5364`-----------------------------------*/
5365
5366static void
5367yy_symbol_value_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, struct parser_params *p)
5368{
5369 FILE *yyoutput = yyo;
5370 YYUSE (yyoutput);
5371 YYUSE (yylocationp);
5372 YYUSE (p);
5373 if (!yyvaluep)
5374 return;
5375# ifdef YYPRINT
5376 if (yytype < YYNTOKENS)
5377 YYPRINT (yyo, yytoknum[yytype], *yyvaluep);
5378# endif
5380 YYUSE (yytype);
5382}
5383
5384
5385/*---------------------------.
5386| Print this symbol on YYO. |
5387`---------------------------*/
5388
5389static void
5390yy_symbol_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, struct parser_params *p)
5391{
5392 YYFPRINTF (p, "%s %s (",
5393 yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]);
5394
5395 YY_LOCATION_PRINT (yyo, *yylocationp);
5396 YYFPRINTF (p, ": ");
5397 yy_symbol_value_print (yyo, yytype, yyvaluep, yylocationp, p);
5398 YYFPRINTF (p, ")");
5399}
5400
5401/*------------------------------------------------------------------.
5402| yy_stack_print -- Print the state stack from its BOTTOM up to its |
5403| TOP (included). |
5404`------------------------------------------------------------------*/
5405
5406static void
5407ruby_parser_yy_stack_print (yy_state_t *yybottom, yy_state_t *yytop, struct parser_params *p)
5408#define yy_stack_print(b, t) ruby_parser_yy_stack_print(b, t, p)
5409{
5410 YYFPRINTF (p, "Stack now");
5411 for (; yybottom <= yytop; yybottom++)
5412 {
5413 int yybot = *yybottom;
5414 YYFPRINTF (p, " %d", yybot);
5415 }
5416 YYFPRINTF (p, "\n");
5417}
5418
5419# define YY_STACK_PRINT(Bottom, Top) \
5420do { \
5421 if (yydebug) \
5422 yy_stack_print ((Bottom), (Top)); \
5423} while (0)
5424
5425
5426/*------------------------------------------------.
5427| Report that the YYRULE is going to be reduced. |
5428`------------------------------------------------*/
5429
5430static void
5431yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule, struct parser_params *p)
5432{
5433 int yylno = yyrline[yyrule];
5434 int yynrhs = yyr2[yyrule];
5435 int yyi;
5436 YYFPRINTF (p, "Reducing stack by rule %d (line %d):\n",
5437 yyrule - 1, yylno);
5438 /* The symbols being reduced. */
5439 for (yyi = 0; yyi < yynrhs; yyi++)
5440 {
5441 YYFPRINTF (p, " $%d = ", yyi + 1);
5442 yy_symbol_print (stderr,
5443 yystos[+yyssp[yyi + 1 - yynrhs]],
5444 &yyvsp[(yyi + 1) - (yynrhs)]
5445 , &(yylsp[(yyi + 1) - (yynrhs)]) , p);
5446 YYFPRINTF (p, "\n");
5447 }
5448}
5449
5450# define YY_REDUCE_PRINT(Rule) \
5451do { \
5452 if (yydebug) \
5453 yy_reduce_print (yyssp, yyvsp, yylsp, Rule, p); \
5454} while (0)
5455
5456/* Nonzero means print parse trace. It is left uninitialized so that
5457 multiple parsers can coexist. */
5458#ifndef yydebug
5459int yydebug;
5460#endif
5461#else /* !YYDEBUG */
5462# define YYDPRINTF(Args)
5463# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
5464# define YY_STACK_PRINT(Bottom, Top)
5465# define YY_REDUCE_PRINT(Rule)
5466#endif /* !YYDEBUG */
5467
5468
5469/* YYINITDEPTH -- initial size of the parser's stacks. */
5470#ifndef YYINITDEPTH
5471# define YYINITDEPTH 200
5472#endif
5473
5474/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
5475 if the built-in stack extension method is used).
5476
5477 Do not make this value too large; the results are undefined if
5478 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
5479 evaluated with infinite-precision integer arithmetic. */
5480
5481#ifndef YYMAXDEPTH
5482# define YYMAXDEPTH 10000
5483#endif
5484
5485
5486#if YYERROR_VERBOSE
5487
5488# ifndef yystrlen
5489# if defined __GLIBC__ && defined _STRING_H
5490# define yystrlen(S) (YY_CAST (YYPTRDIFF_T, strlen (S)))
5491# else
5492/* Return the length of YYSTR. */
5493static YYPTRDIFF_T
5494yystrlen (const char *yystr)
5495{
5496 YYPTRDIFF_T yylen;
5497 for (yylen = 0; yystr[yylen]; yylen++)
5498 continue;
5499 return yylen;
5500}
5501# endif
5502# endif
5503
5504# ifndef yystpcpy
5505# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
5506# define yystpcpy stpcpy
5507# else
5508/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
5509 YYDEST. */
5510static char *
5511yystpcpy (char *yydest, const char *yysrc)
5512{
5513 char *yyd = yydest;
5514 const char *yys = yysrc;
5515
5516 while ((*yyd++ = *yys++) != '\0')
5517 continue;
5518
5519 return yyd - 1;
5520}
5521# endif
5522# endif
5523
5524# ifndef yytnamerr
5525/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
5526 quotes and backslashes, so that it's suitable for yyerror. The
5527 heuristic is that double-quoting is unnecessary unless the string
5528 contains an apostrophe, a comma, or backslash (other than
5529 backslash-backslash). YYSTR is taken from yytname. If YYRES is
5530 null, do not copy; instead, return the length of what the result
5531 would have been. */
5532static YYPTRDIFF_T
5533yytnamerr (char *yyres, const char *yystr)
5534{
5535 if (*yystr == '"')
5536 {
5537 YYPTRDIFF_T yyn = 0;
5538 char const *yyp = yystr;
5539
5540 for (;;)
5541 switch (*++yyp)
5542 {
5543 case '\'':
5544 case ',':
5545 goto do_not_strip_quotes;
5546
5547 case '\\':
5548 if (*++yyp != '\\')
5549 goto do_not_strip_quotes;
5550 else
5551 goto append;
5552
5553 append:
5554 default:
5555 if (yyres)
5556 yyres[yyn] = *yyp;
5557 yyn++;
5558 break;
5559
5560 case '"':
5561 if (yyres)
5562 yyres[yyn] = '\0';
5563 return yyn;
5564 }
5565 do_not_strip_quotes: ;
5566 }
5567
5568 if (yyres)
5569 return yystpcpy (yyres, yystr) - yyres;
5570 else
5571 return yystrlen (yystr);
5572}
5573# endif
5574
5575/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
5576 about the unexpected token YYTOKEN for the state stack whose top is
5577 YYSSP.
5578
5579 Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is
5580 not large enough to hold the message. In that case, also set
5581 *YYMSG_ALLOC to the required number of bytes. Return 2 if the
5582 required number of bytes is too large to store. */
5583static int
5584yysyntax_error (struct parser_params *p, YYPTRDIFF_T *yymsg_alloc, char **yymsg,
5585 yy_state_t *yyssp, int yytoken)
5586{
5587 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
5588 /* Internationalized format string. */
5589 const char *yyformat = YY_NULLPTR;
5590 /* Arguments of yyformat: reported tokens (one for the "unexpected",
5591 one per "expected"). */
5592 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
5593 /* Actual size of YYARG. */
5594 int yycount = 0;
5595 /* Cumulated lengths of YYARG. */
5596 YYPTRDIFF_T yysize = 0;
5597
5598 /* There are many possibilities here to consider:
5599 - If this state is a consistent state with a default action, then
5600 the only way this function was invoked is if the default action
5601 is an error action. In that case, don't check for expected
5602 tokens because there are none.
5603 - The only way there can be no lookahead present (in yychar) is if
5604 this state is a consistent state with a default action. Thus,
5605 detecting the absence of a lookahead is sufficient to determine
5606 that there is no unexpected or expected token to report. In that
5607 case, just report a simple "syntax error".
5608 - Don't assume there isn't a lookahead just because this state is a
5609 consistent state with a default action. There might have been a
5610 previous inconsistent state, consistent state with a non-default
5611 action, or user semantic action that manipulated yychar.
5612 - Of course, the expected token list depends on states to have
5613 correct lookahead information, and it depends on the parser not
5614 to perform extra reductions after fetching a lookahead from the
5615 scanner and before detecting a syntax error. Thus, state merging
5616 (from LALR or IELR) and default reductions corrupt the expected
5617 token list. However, the list is correct for canonical LR with
5618 one exception: it will still contain any token that will not be
5619 accepted due to an error action in a later state.
5620 */
5621 if (yytoken != YYEMPTY)
5622 {
5623 int yyn = yypact[+*yyssp];
5624 YYPTRDIFF_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]);
5625 yysize = yysize0;
5626 yyarg[yycount++] = yytname[yytoken];
5627 if (!yypact_value_is_default (yyn))
5628 {
5629 /* Start YYX at -YYN if negative to avoid negative indexes in
5630 YYCHECK. In other words, skip the first -YYN actions for
5631 this state because they are default actions. */
5632 int yyxbegin = yyn < 0 ? -yyn : 0;
5633 /* Stay within bounds of both yycheck and yytname. */
5634 int yychecklim = YYLAST - yyn + 1;
5635 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
5636 int yyx;
5637
5638 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
5639 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
5640 && !yytable_value_is_error (yytable[yyx + yyn]))
5641 {
5642 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
5643 {
5644 yycount = 1;
5645 yysize = yysize0;
5646 break;
5647 }
5648 yyarg[yycount++] = yytname[yyx];
5649 {
5650 YYPTRDIFF_T yysize1
5651 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]);
5652 if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)
5653 yysize = yysize1;
5654 else
5655 return 2;
5656 }
5657 }
5658 }
5659 }
5660
5661 switch (yycount)
5662 {
5663# define YYCASE_(N, S) \
5664 case N: \
5665 yyformat = S; \
5666 break
5667 default: /* Avoid compiler warnings. */
5668 YYCASE_(0, YY_("syntax error"));
5669 YYCASE_(1, YY_("syntax error, unexpected %s"));
5670 YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
5671 YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
5672 YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
5673 YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
5674# undef YYCASE_
5675 }
5676
5677 {
5678 /* Don't count the "%s"s in the final size, but reserve room for
5679 the terminator. */
5680 YYPTRDIFF_T yysize1 = yysize + (yystrlen (yyformat) - 2 * yycount) + 1;
5681 if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)
5682 yysize = yysize1;
5683 else
5684 return 2;
5685 }
5686
5687 if (*yymsg_alloc < yysize)
5688 {
5689 *yymsg_alloc = 2 * yysize;
5690 if (! (yysize <= *yymsg_alloc
5691 && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
5692 *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
5693 return 1;
5694 }
5695
5696 /* Avoid sprintf, as that infringes on the user's name space.
5697 Don't have undefined behavior even if the translation
5698 produced a string with the wrong number of "%s"s. */
5699 {
5700 char *yyp = *yymsg;
5701 int yyi = 0;
5702 while ((*yyp = *yyformat) != '\0')
5703 if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
5704 {
5705 yyp += yytnamerr (yyp, yyarg[yyi++]);
5706 yyformat += 2;
5707 }
5708 else
5709 {
5710 ++yyp;
5711 ++yyformat;
5712 }
5713 }
5714 return 0;
5715}
5716#endif /* YYERROR_VERBOSE */
5717
5718/*-----------------------------------------------.
5719| Release the memory associated to this symbol. |
5720`-----------------------------------------------*/
5721
5722static void
5723yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, struct parser_params *p)
5724{
5725 YYUSE (yyvaluep);
5726 YYUSE (yylocationp);
5727 YYUSE (p);
5728 if (!yymsg)
5729 yymsg = "Deleting";
5730 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
5731
5733 YYUSE (yytype);
5735}
5736
5737
5738
5739
5740/*----------.
5741| yyparse. |
5742`----------*/
5743
5744int
5746{
5747/* The lookahead symbol. */
5748int yychar;
5749
5750
5751/* The semantic value of the lookahead symbol. */
5752/* Default value used for initialization, for pacifying older GCCs
5753 or non-GCC compilers. */
5754YY_INITIAL_VALUE (static YYSTYPE yyval_default;)
5755YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
5756
5757/* Location data for the lookahead symbol. */
5758static YYLTYPE yyloc_default
5759# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
5760 = { 1, 1, 1, 1 }
5761# endif
5762;
5763YYLTYPE yylloc = yyloc_default;
5764
5765 /* Number of syntax errors so far. */
5766 int yynerrs;
5767
5768 yy_state_fast_t yystate;
5769 /* Number of tokens to shift before error messages enabled. */
5770 int yyerrstatus;
5771
5772 /* The stacks and their tools:
5773 'yyss': related to states.
5774 'yyvs': related to semantic values.
5775 'yyls': related to locations.
5776
5777 Refer to the stacks through separate pointers, to allow yyoverflow
5778 to reallocate them elsewhere. */
5779
5780 /* The state stack. */
5781 yy_state_t yyssa[YYINITDEPTH];
5782 yy_state_t *yyss;
5783 yy_state_t *yyssp;
5784
5785 /* The semantic value stack. */
5786 YYSTYPE yyvsa[YYINITDEPTH];
5787 YYSTYPE *yyvs;
5788 YYSTYPE *yyvsp;
5789
5790 /* The location stack. */
5791 YYLTYPE yylsa[YYINITDEPTH];
5792 YYLTYPE *yyls;
5793 YYLTYPE *yylsp;
5794
5795 /* The locations where the error started and ended. */
5796 YYLTYPE yyerror_range[3];
5797
5798 YYPTRDIFF_T yystacksize;
5799
5800 int yyn;
5801 int yyresult;
5802 /* Lookahead token as an internal (translated) token number. */
5803 int yytoken = 0;
5804 /* The variables used to return semantic value and location from the
5805 action routines. */
5806 YYSTYPE yyval;
5807 YYLTYPE yyloc;
5808
5809#if YYERROR_VERBOSE
5810 /* Buffer for error messages, and its allocated size. */
5811 char yymsgbuf[128];
5812 char *yymsg = yymsgbuf;
5813 YYPTRDIFF_T yymsg_alloc = sizeof yymsgbuf;
5814#endif
5815
5816#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N))
5817
5818 /* The number of symbols on the RHS of the reduced rule.
5819 Keep to zero when no symbol should be popped. */
5820 int yylen = 0;
5821
5822 yyssp = yyss = yyssa;
5823 yyvsp = yyvs = yyvsa;
5824 yylsp = yyls = yylsa;
5825 yystacksize = YYINITDEPTH;
5826
5827 YYDPRINTF ((p, "Starting parse\n"));
5828
5829 yystate = 0;
5830 yyerrstatus = 0;
5831 yynerrs = 0;
5832 yychar = YYEMPTY; /* Cause a token to be read. */
5833
5834/* User initialization code. */
5835#line 975 "parse.y"
5836{
5838}
5839
5840#line 5836 "parse.c"
5841
5842 yylsp[0] = yylloc;
5843 goto yysetstate;
5844
5845
5846/*------------------------------------------------------------.
5847| yynewstate -- push a new state, which is found in yystate. |
5848`------------------------------------------------------------*/
5849yynewstate:
5850 /* In all cases, when you get here, the value and location stacks
5851 have just been pushed. So pushing a state here evens the stacks. */
5852 yyssp++;
5853
5854
5855/*--------------------------------------------------------------------.
5856| yysetstate -- set current state (the top of the stack) to yystate. |
5857`--------------------------------------------------------------------*/
5858yysetstate:
5859 YYDPRINTF ((p, "Entering state %d\n", yystate));
5860 YY_ASSERT (0 <= yystate && yystate < YYNSTATES);
5862 *yyssp = YY_CAST (yy_state_t, yystate);
5864
5865 if (yyss + yystacksize - 1 <= yyssp)
5866#if !defined yyoverflow && !defined YYSTACK_RELOCATE
5867 goto yyexhaustedlab;
5868#else
5869 {
5870 /* Get the current used size of the three stacks, in elements. */
5871 YYPTRDIFF_T yysize = yyssp - yyss + 1;
5872
5873# if defined yyoverflow
5874 {
5875 /* Give user a chance to reallocate the stack. Use copies of
5876 these so that the &'s don't force the real ones into
5877 memory. */
5878 yy_state_t *yyss1 = yyss;
5879 YYSTYPE *yyvs1 = yyvs;
5880 YYLTYPE *yyls1 = yyls;
5881
5882 /* Each stack pointer address is followed by the size of the
5883 data in use in that stack, in bytes. This used to be a
5884 conditional around just the two extra args, but that might
5885 be undefined if yyoverflow is a macro. */
5886 yyoverflow (YY_("memory exhausted"),
5887 &yyss1, yysize * YYSIZEOF (*yyssp),
5888 &yyvs1, yysize * YYSIZEOF (*yyvsp),
5889 &yyls1, yysize * YYSIZEOF (*yylsp),
5890 &yystacksize);
5891 yyss = yyss1;
5892 yyvs = yyvs1;
5893 yyls = yyls1;
5894 }
5895# else /* defined YYSTACK_RELOCATE */
5896 /* Extend the stack our own way. */
5897 if (YYMAXDEPTH <= yystacksize)
5898 goto yyexhaustedlab;
5899 yystacksize *= 2;
5900 if (YYMAXDEPTH < yystacksize)
5901 yystacksize = YYMAXDEPTH;
5902
5903 {
5904 yy_state_t *yyss1 = yyss;
5905 union yyalloc *yyptr =
5906 YY_CAST (union yyalloc *,
5907 YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize))));
5908 if (! yyptr)
5909 goto yyexhaustedlab;
5913# undef YYSTACK_RELOCATE
5914 if (yyss1 != yyssa)
5915 YYSTACK_FREE (yyss1);
5916 }
5917# endif
5918
5919 yyssp = yyss + yysize - 1;
5920 yyvsp = yyvs + yysize - 1;
5921 yylsp = yyls + yysize - 1;
5922
5924 YYDPRINTF ((p, "Stack size increased to %ld\n",
5925 YY_CAST (long, yystacksize)));
5927
5928 if (yyss + yystacksize - 1 <= yyssp)
5929 YYABORT;
5930 }
5931#endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */
5932
5933 if (yystate == YYFINAL)
5934 YYACCEPT;
5935
5936 goto yybackup;
5937
5938
5939/*-----------.
5940| yybackup. |
5941`-----------*/
5942yybackup:
5943 /* Do appropriate processing given the current state. Read a
5944 lookahead token if we need one and don't already have one. */
5945
5946 /* First try to decide what to do without reference to lookahead token. */
5947 yyn = yypact[yystate];
5948 if (yypact_value_is_default (yyn))
5949 goto yydefault;
5950
5951 /* Not known => get a lookahead token if don't already have one. */
5952
5953 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
5954 if (yychar == YYEMPTY)
5955 {
5956 YYDPRINTF ((p, "Reading a token: "));
5957 yychar = yylex (&yylval, &yylloc, p);
5958 }
5959
5960 if (yychar <= YYEOF)
5961 {
5962 yychar = yytoken = YYEOF;
5963 YYDPRINTF ((p, "Now at end of input.\n"));
5964 }
5965 else
5966 {
5967 yytoken = YYTRANSLATE (yychar);
5968 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
5969 }
5970
5971 /* If the proper action on seeing token YYTOKEN is to reduce or to
5972 detect an error, take that action. */
5973 yyn += yytoken;
5974 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
5975 goto yydefault;
5976 yyn = yytable[yyn];
5977 if (yyn <= 0)
5978 {
5979 if (yytable_value_is_error (yyn))
5980 goto yyerrlab;
5981 yyn = -yyn;
5982 goto yyreduce;
5983 }
5984
5985 /* Count tokens shifted since error; after three, turn off error
5986 status. */
5987 if (yyerrstatus)
5988 yyerrstatus--;
5989
5990 /* Shift the lookahead token. */
5991 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
5992 yystate = yyn;
5994 *++yyvsp = yylval;
5996 *++yylsp = yylloc;
5997
5998 /* Discard the shifted token. */
5999 yychar = YYEMPTY;
6000 goto yynewstate;
6001
6002
6003/*-----------------------------------------------------------.
6004| yydefault -- do the default action for the current state. |
6005`-----------------------------------------------------------*/
6006yydefault:
6007 yyn = yydefact[yystate];
6008 if (yyn == 0)
6009 goto yyerrlab;
6010 goto yyreduce;
6011
6012
6013/*-----------------------------.
6014| yyreduce -- do a reduction. |
6015`-----------------------------*/
6016yyreduce:
6017 /* yyn is the number of a rule to reduce with. */
6018 yylen = yyr2[yyn];
6019
6020 /* If YYLEN is nonzero, implement the default value of the action:
6021 '$$ = $1'.
6022
6023 Otherwise, the following line sets YYVAL to garbage.
6024 This behavior is undocumented and Bison
6025 users should not rely upon it. Assigning to YYVAL
6026 unconditionally makes the parser a bit smaller, and it avoids a
6027 GCC warning that YYVAL may be used uninitialized. */
6028 yyval = yyvsp[1-yylen];
6029
6030 /* Default location. */
6031 YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
6032 yyerror_range[1] = yyloc;
6033 YY_REDUCE_PRINT (yyn);
6034 switch (yyn)
6035 {
6036 case 2:
6037#line 1177 "parse.y"
6038 {
6039 SET_LEX_STATE(EXPR_BEG);
6040 local_push(p, ifndef_ripper(1)+0);
6041 }
6042#line 6038 "parse.c"
6043 break;
6044
6045 case 3:
6046#line 1182 "parse.y"
6047 {
6048 /*%%%*/
6049 if ((yyvsp[0].node) && !compile_for_eval) {
6050 NODE *node = (yyvsp[0].node);
6051 /* last expression should not be void */
6052 if (nd_type(node) == NODE_BLOCK) {
6053 while (node->nd_next) {
6054 node = node->nd_next;
6055 }
6056 node = node->nd_head;
6057 }
6058 node = remove_begin(node);
6059 void_expr(p, node);
6060 }
6061 p->eval_tree = NEW_SCOPE(0, block_append(p, p->eval_tree, (yyvsp[0].node)), &(yyloc));
6062 /*% %*/
6063 /*% ripper[final]: program!($2) %*/
6064 local_pop(p);
6065 }
6066#line 6062 "parse.c"
6067 break;
6068
6069 case 4:
6070#line 1204 "parse.y"
6071 {
6072 (yyval.node) = void_stmts(p, (yyvsp[-1].node));
6073 }
6074#line 6070 "parse.c"
6075 break;
6076
6077 case 5:
6078#line 1210 "parse.y"
6079 {
6080 /*%%%*/
6081 (yyval.node) = NEW_BEGIN(0, &(yyloc));
6082 /*% %*/
6083 /*% ripper: stmts_add!(stmts_new!, void_stmt!) %*/
6084 }
6085#line 6081 "parse.c"
6086 break;
6087
6088 case 6:
6089#line 1217 "parse.y"
6090 {
6091 /*%%%*/
6092 (yyval.node) = newline_node((yyvsp[0].node));
6093 /*% %*/
6094 /*% ripper: stmts_add!(stmts_new!, $1) %*/
6095 }
6096#line 6092 "parse.c"
6097 break;
6098
6099 case 7:
6100#line 1224 "parse.y"
6101 {
6102 /*%%%*/
6103 (yyval.node) = block_append(p, (yyvsp[-2].node), newline_node((yyvsp[0].node)));
6104 /*% %*/
6105 /*% ripper: stmts_add!($1, $3) %*/
6106 }
6107#line 6103 "parse.c"
6108 break;
6109
6110 case 8:
6111#line 1231 "parse.y"
6112 {
6113 (yyval.node) = remove_begin((yyvsp[0].node));
6114 }
6115#line 6111 "parse.c"
6116 break;
6117
6118 case 10:
6119#line 1238 "parse.y"
6120 {
6121 (yyval.node) = (yyvsp[0].node);
6122 }
6123#line 6119 "parse.c"
6124 break;
6125
6126 case 11:
6127#line 1244 "parse.y"
6128 {
6129 /*%%%*/
6130 p->eval_tree_begin = block_append(p, p->eval_tree_begin,
6131 NEW_BEGIN((yyvsp[-1].node), &(yyloc)));
6132 (yyval.node) = NEW_BEGIN(0, &(yyloc));
6133 /*% %*/
6134 /*% ripper: BEGIN!($2) %*/
6135 }
6136#line 6132 "parse.c"
6137 break;
6138
6139 case 12:
6140#line 1256 "parse.y"
6141 {if (!(yyvsp[-1].node)) {yyerror1(&(yylsp[0]), "else without rescue is useless");}}
6142#line 6138 "parse.c"
6143 break;
6144
6145 case 13:
6146#line 1259 "parse.y"
6147 {
6148 /*%%%*/
6149 (yyval.node) = new_bodystmt(p, (yyvsp[-5].node), (yyvsp[-4].node), (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
6150 /*% %*/
6151 /*% ripper: bodystmt!(escape_Qundef($1), escape_Qundef($2), escape_Qundef($5), escape_Qundef($6)) %*/
6152 }
6153#line 6149 "parse.c"
6154 break;
6155
6156 case 14:
6157#line 1268 "parse.y"
6158 {
6159 /*%%%*/
6160 (yyval.node) = new_bodystmt(p, (yyvsp[-2].node), (yyvsp[-1].node), 0, (yyvsp[0].node), &(yyloc));
6161 /*% %*/
6162 /*% ripper: bodystmt!(escape_Qundef($1), escape_Qundef($2), Qnil, escape_Qundef($3)) %*/
6163 }
6164#line 6160 "parse.c"
6165 break;
6166
6167 case 15:
6168#line 1277 "parse.y"
6169 {
6170 (yyval.node) = void_stmts(p, (yyvsp[-1].node));
6171 }
6172#line 6168 "parse.c"
6173 break;
6174
6175 case 16:
6176#line 1283 "parse.y"
6177 {
6178 /*%%%*/
6179 (yyval.node) = NEW_BEGIN(0, &(yyloc));
6180 /*% %*/
6181 /*% ripper: stmts_add!(stmts_new!, void_stmt!) %*/
6182 }
6183#line 6179 "parse.c"
6184 break;
6185
6186 case 17:
6187#line 1290 "parse.y"
6188 {
6189 /*%%%*/
6190 (yyval.node) = newline_node((yyvsp[0].node));
6191 /*% %*/
6192 /*% ripper: stmts_add!(stmts_new!, $1) %*/
6193 }
6194#line 6190 "parse.c"
6195 break;
6196
6197 case 18:
6198#line 1297 "parse.y"
6199 {
6200 /*%%%*/
6201 (yyval.node) = block_append(p, (yyvsp[-2].node), newline_node((yyvsp[0].node)));
6202 /*% %*/
6203 /*% ripper: stmts_add!($1, $3) %*/
6204 }
6205#line 6201 "parse.c"
6206 break;
6207
6208 case 19:
6209#line 1304 "parse.y"
6210 {
6211 (yyval.node) = remove_begin((yyvsp[0].node));
6212 }
6213#line 6209 "parse.c"
6214 break;
6215
6216 case 20:
6217#line 1310 "parse.y"
6218 {
6219 (yyval.node) = (yyvsp[0].node);
6220 }
6221#line 6217 "parse.c"
6222 break;
6223
6224 case 21:
6225#line 1314 "parse.y"
6226 {
6227 yyerror1(&(yylsp[0]), "BEGIN is permitted only at toplevel");
6228 }
6229#line 6225 "parse.c"
6230 break;
6231
6232 case 22:
6233#line 1318 "parse.y"
6234 {
6235 (yyval.node) = (yyvsp[0].node);
6236 }
6237#line 6233 "parse.c"
6238 break;
6239
6240 case 23:
6241#line 1323 "parse.y"
6242 {SET_LEX_STATE(EXPR_FNAME|EXPR_FITEM);}
6243#line 6239 "parse.c"
6244 break;
6245
6246 case 24:
6247#line 1324 "parse.y"
6248 {
6249 /*%%%*/
6250 (yyval.node) = NEW_ALIAS((yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
6251 /*% %*/
6252 /*% ripper: alias!($2, $4) %*/
6253 }
6254#line 6250 "parse.c"
6255 break;
6256
6257 case 25:
6258#line 1331 "parse.y"
6259 {
6260 /*%%%*/
6261 (yyval.node) = NEW_VALIAS((yyvsp[-1].id), (yyvsp[0].id), &(yyloc));
6262 /*% %*/
6263 /*% ripper: var_alias!($2, $3) %*/
6264 }
6265#line 6261 "parse.c"
6266 break;
6267
6268 case 26:
6269#line 1338 "parse.y"
6270 {
6271 /*%%%*/
6272 char buf[2];
6273 buf[0] = '$';
6274 buf[1] = (char)(yyvsp[0].node)->nd_nth;
6275 (yyval.node) = NEW_VALIAS((yyvsp[-1].id), rb_intern2(buf, 2), &(yyloc));
6276 /*% %*/
6277 /*% ripper: var_alias!($2, $3) %*/
6278 }
6279#line 6275 "parse.c"
6280 break;
6281
6282 case 27:
6283#line 1348 "parse.y"
6284 {
6285 /*%%%*/
6286 yyerror1(&(yylsp[0]), "can't make alias for the number variables");
6287 (yyval.node) = NEW_BEGIN(0, &(yyloc));
6288 /*% %*/
6289 /*% ripper[error]: alias_error!(var_alias!($2, $3)) %*/
6290 }
6291#line 6287 "parse.c"
6292 break;
6293
6294 case 28:
6295#line 1356 "parse.y"
6296 {
6297 /*%%%*/
6298 (yyval.node) = (yyvsp[0].node);
6299 /*% %*/
6300 /*% ripper: undef!($2) %*/
6301 }
6302#line 6298 "parse.c"
6303 break;
6304
6305 case 29:
6306#line 1363 "parse.y"
6307 {
6308 /*%%%*/
6309 (yyval.node) = new_if(p, (yyvsp[0].node), remove_begin((yyvsp[-2].node)), 0, &(yyloc));
6310 fixpos((yyval.node), (yyvsp[0].node));
6311 /*% %*/
6312 /*% ripper: if_mod!($3, $1) %*/
6313 }
6314#line 6310 "parse.c"
6315 break;
6316
6317 case 30:
6318#line 1371 "parse.y"
6319 {
6320 /*%%%*/
6321 (yyval.node) = new_unless(p, (yyvsp[0].node), remove_begin((yyvsp[-2].node)), 0, &(yyloc));
6322 fixpos((yyval.node), (yyvsp[0].node));
6323 /*% %*/
6324 /*% ripper: unless_mod!($3, $1) %*/
6325 }
6326#line 6322 "parse.c"
6327 break;
6328
6329 case 31:
6330#line 1379 "parse.y"
6331 {
6332 /*%%%*/
6333 if ((yyvsp[-2].node) && nd_type((yyvsp[-2].node)) == NODE_BEGIN) {
6334 (yyval.node) = NEW_WHILE(cond(p, (yyvsp[0].node), &(yylsp[0])), (yyvsp[-2].node)->nd_body, 0, &(yyloc));
6335 }
6336 else {
6337 (yyval.node) = NEW_WHILE(cond(p, (yyvsp[0].node), &(yylsp[0])), (yyvsp[-2].node), 1, &(yyloc));
6338 }
6339 /*% %*/
6340 /*% ripper: while_mod!($3, $1) %*/
6341 }
6342#line 6338 "parse.c"
6343 break;
6344
6345 case 32:
6346#line 1391 "parse.y"
6347 {
6348 /*%%%*/
6349 if ((yyvsp[-2].node) && nd_type((yyvsp[-2].node)) == NODE_BEGIN) {
6350 (yyval.node) = NEW_UNTIL(cond(p, (yyvsp[0].node), &(yylsp[0])), (yyvsp[-2].node)->nd_body, 0, &(yyloc));
6351 }
6352 else {
6353 (yyval.node) = NEW_UNTIL(cond(p, (yyvsp[0].node), &(yylsp[0])), (yyvsp[-2].node), 1, &(yyloc));
6354 }
6355 /*% %*/
6356 /*% ripper: until_mod!($3, $1) %*/
6357 }
6358#line 6354 "parse.c"
6359 break;
6360
6361 case 33:
6362#line 1403 "parse.y"
6363 {
6364 /*%%%*/
6365 NODE *resq;
6366 YYLTYPE loc = code_loc_gen(&(yylsp[-1]), &(yylsp[0]));
6367 resq = NEW_RESBODY(0, remove_begin((yyvsp[0].node)), 0, &loc);
6368 (yyval.node) = NEW_RESCUE(remove_begin((yyvsp[-2].node)), resq, 0, &(yyloc));
6369 /*% %*/
6370 /*% ripper: rescue_mod!($1, $3) %*/
6371 }
6372#line 6368 "parse.c"
6373 break;
6374
6375 case 34:
6376#line 1413 "parse.y"
6377 {
6378 if (p->in_def) {
6379 rb_warn0("END in method; use at_exit");
6380 }
6381 /*%%%*/
6382 {
6383 NODE *scope = NEW_NODE(
6384 NODE_SCOPE, 0 /* tbl */, (yyvsp[-1].node) /* body */, 0 /* args */, &(yyloc));
6385 (yyval.node) = NEW_POSTEXE(scope, &(yyloc));
6386 }
6387 /*% %*/
6388 /*% ripper: END!($3) %*/
6389 }
6390#line 6386 "parse.c"
6391 break;
6392
6393 case 36:
6394#line 1428 "parse.y"
6395 {
6396 /*%%%*/
6397 value_expr((yyvsp[0].node));
6398 (yyval.node) = node_assign(p, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
6399 /*% %*/
6400 /*% ripper: massign!($1, $3) %*/
6401 }
6402#line 6398 "parse.c"
6403 break;
6404
6405 case 37:
6406#line 1436 "parse.y"
6407 {
6408 /*%%%*/
6409 value_expr((yyvsp[0].node));
6410 (yyval.node) = node_assign(p, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
6411 /*% %*/
6412 /*% ripper: assign!($1, $3) %*/
6413 }
6414#line 6410 "parse.c"
6415 break;
6416
6417 case 38:
6418#line 1444 "parse.y"
6419 {
6420 /*%%%*/
6421 YYLTYPE loc = code_loc_gen(&(yylsp[-1]), &(yylsp[0]));
6422 value_expr((yyvsp[-2].node));
6423 (yyval.node) = node_assign(p, (yyvsp[-4].node), NEW_RESCUE((yyvsp[-2].node), NEW_RESBODY(0, remove_begin((yyvsp[0].node)), 0, &loc), 0, &(yyloc)), &(yyloc));
6424 /*% %*/
6425 /*% ripper: massign!($1, rescue_mod!($3, $5)) %*/
6426 }
6427#line 6423 "parse.c"
6428 break;
6429
6430 case 39:
6431#line 1453 "parse.y"
6432 {
6433 /*%%%*/
6434 (yyval.node) = node_assign(p, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
6435 /*% %*/
6436 /*% ripper: massign!($1, $3) %*/
6437 }
6438#line 6434 "parse.c"
6439 break;
6440
6441 case 41:
6442#line 1463 "parse.y"
6443 {
6444 /*%%%*/
6445 (yyval.node) = node_assign(p, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
6446 /*% %*/
6447 /*% ripper: assign!($1, $3) %*/
6448 }
6449#line 6445 "parse.c"
6450 break;
6451
6452 case 42:
6453#line 1470 "parse.y"
6454 {
6455 /*%%%*/
6456 (yyval.node) = new_op_assign(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].node), &(yyloc));
6457 /*% %*/
6458 /*% ripper: opassign!($1, $2, $3) %*/
6459 }
6460#line 6456 "parse.c"
6461 break;
6462
6463 case 43:
6464#line 1477 "parse.y"
6465 {
6466 /*%%%*/
6467 (yyval.node) = new_ary_op_assign(p, (yyvsp[-5].node), (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-3]), &(yyloc));
6468 /*% %*/
6469 /*% ripper: opassign!(aref_field!($1, escape_Qundef($3)), $5, $6) %*/
6470
6471 }
6472#line 6468 "parse.c"
6473 break;
6474
6475 case 44:
6476#line 1485 "parse.y"
6477 {
6478 /*%%%*/
6479 (yyval.node) = new_attr_op_assign(p, (yyvsp[-4].node), (yyvsp[-3].id), (yyvsp[-2].id), (yyvsp[-1].id), (yyvsp[0].node), &(yyloc));
6480 /*% %*/
6481 /*% ripper: opassign!(field!($1, $2, $3), $4, $5) %*/
6482 }
6483#line 6479 "parse.c"
6484 break;
6485
6486 case 45:
6487#line 1492 "parse.y"
6488 {
6489 /*%%%*/
6490 (yyval.node) = new_attr_op_assign(p, (yyvsp[-4].node), (yyvsp[-3].id), (yyvsp[-2].id), (yyvsp[-1].id), (yyvsp[0].node), &(yyloc));
6491 /*% %*/
6492 /*% ripper: opassign!(field!($1, $2, $3), $4, $5) %*/
6493 }
6494#line 6490 "parse.c"
6495 break;
6496
6497 case 46:
6498#line 1499 "parse.y"
6499 {
6500 /*%%%*/
6501 YYLTYPE loc = code_loc_gen(&(yylsp[-4]), &(yylsp[-2]));
6502 (yyval.node) = new_const_op_assign(p, NEW_COLON2((yyvsp[-4].node), (yyvsp[-2].id), &loc), (yyvsp[-1].id), (yyvsp[0].node), &(yyloc));
6503 /*% %*/
6504 /*% ripper: opassign!(const_path_field!($1, $3), $4, $5) %*/
6505 }
6506#line 6502 "parse.c"
6507 break;
6508
6509 case 47:
6510#line 1507 "parse.y"
6511 {
6512 /*%%%*/
6513 (yyval.node) = new_attr_op_assign(p, (yyvsp[-4].node), ID2VAL(idCOLON2), (yyvsp[-2].id), (yyvsp[-1].id), (yyvsp[0].node), &(yyloc));
6514 /*% %*/
6515 /*% ripper: opassign!(field!($1, ID2VAL(idCOLON2), $3), $4, $5) %*/
6516 }
6517#line 6513 "parse.c"
6518 break;
6519
6520 case 48:
6521#line 1514 "parse.y"
6522 {
6523 /*%%%*/
6524 rb_backref_error(p, (yyvsp[-2].node));
6525 (yyval.node) = NEW_BEGIN(0, &(yyloc));
6526 /*% %*/
6527 /*% ripper[error]: assign_error!(assign!(var_field(p, $1), $3)) %*/
6528 }
6529#line 6525 "parse.c"
6530 break;
6531
6532 case 49:
6533#line 1524 "parse.y"
6534 {
6535 value_expr((yyvsp[0].node));
6536 (yyval.node) = (yyvsp[0].node);
6537 }
6538#line 6534 "parse.c"
6539 break;
6540
6541 case 50:
6542#line 1529 "parse.y"
6543 {
6544 /*%%%*/
6545 YYLTYPE loc = code_loc_gen(&(yylsp[-1]), &(yylsp[0]));
6546 value_expr((yyvsp[-2].node));
6547 (yyval.node) = NEW_RESCUE((yyvsp[-2].node), NEW_RESBODY(0, remove_begin((yyvsp[0].node)), 0, &loc), 0, &(yyloc));
6548 /*% %*/
6549 /*% ripper: rescue_mod!($1, $3) %*/
6550 }
6551#line 6547 "parse.c"
6552 break;
6553
6554 case 53:
6555#line 1542 "parse.y"
6556 {
6557 (yyval.node) = logop(p, idAND, (yyvsp[-2].node), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
6558 }
6559#line 6555 "parse.c"
6560 break;
6561
6562 case 54:
6563#line 1546 "parse.y"
6564 {
6565 (yyval.node) = logop(p, idOR, (yyvsp[-2].node), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
6566 }
6567#line 6563 "parse.c"
6568 break;
6569
6570 case 55:
6571#line 1550 "parse.y"
6572 {
6573 (yyval.node) = call_uni_op(p, method_cond(p, (yyvsp[0].node), &(yylsp[0])), METHOD_NOT, &(yylsp[-2]), &(yyloc));
6574 }
6575#line 6571 "parse.c"
6576 break;
6577
6578 case 56:
6579#line 1554 "parse.y"
6580 {
6581 (yyval.node) = call_uni_op(p, method_cond(p, (yyvsp[0].node), &(yylsp[0])), '!', &(yylsp[-1]), &(yyloc));
6582 }
6583#line 6579 "parse.c"
6584 break;
6585
6586 case 57:
6587#line 1558 "parse.y"
6588 {
6589 value_expr((yyvsp[-1].node));
6590 SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
6591 p->command_start = FALSE;
6592 (yyval.num) = p->in_kwarg;
6593 p->in_kwarg = 1;
6594 }
6595#line 6591 "parse.c"
6596 break;
6597
6598 case 58:
6599#line 1565 "parse.y"
6600 {(yyval.tbl) = push_pvtbl(p);}
6601#line 6597 "parse.c"
6602 break;
6603
6604 case 59:
6605#line 1567 "parse.y"
6606 {pop_pvtbl(p, (yyvsp[-1].tbl));}
6607#line 6603 "parse.c"
6608 break;
6609
6610 case 60:
6611#line 1568 "parse.y"
6612 {
6613 p->in_kwarg = !!(yyvsp[-3].num);
6614 /*%%%*/
6615 (yyval.node) = new_case3(p, (yyvsp[-5].node), NEW_IN((yyvsp[-1].node), 0, 0, &(yylsp[-1])), &(yyloc));
6616 /*% %*/
6617 /*% ripper: case!($1, in!($5, Qnil, Qnil)) %*/
6618 }
6619#line 6615 "parse.c"
6620 break;
6621
6622 case 62:
6623#line 1579 "parse.y"
6624 {
6625 value_expr((yyvsp[0].node));
6626 (yyval.node) = (yyvsp[0].node);
6627 }
6628#line 6624 "parse.c"
6629 break;
6630
6631 case 63:
6632#line 1585 "parse.y"
6633 {COND_PUSH(1);}
6634#line 6630 "parse.c"
6635 break;
6636
6637 case 64:
6638#line 1585 "parse.y"
6639 {COND_POP();}
6640#line 6636 "parse.c"
6641 break;
6642
6643 case 65:
6644#line 1586 "parse.y"
6645 {
6646 (yyval.node) = (yyvsp[-2].node);
6647 }
6648#line 6644 "parse.c"
6649 break;
6650
6651 case 69:
6652#line 1597 "parse.y"
6653 {
6654 /*%%%*/
6655 (yyval.node) = new_qcall(p, (yyvsp[-2].id), (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
6656 /*% %*/
6657 /*% ripper: method_add_arg!(call!($1, $2, $3), $4) %*/
6658 }
6659#line 6655 "parse.c"
6660 break;
6661
6662 case 70:
6663#line 1606 "parse.y"
6664 {
6665 (yyval.node) = (yyvsp[-1].node);
6666 /*%%%*/
6667 (yyval.node)->nd_body->nd_loc = code_loc_gen(&(yylsp[-2]), &(yylsp[0]));
6668 nd_set_line((yyval.node), (yylsp[-2]).end_pos.lineno);
6669 /*% %*/
6670 }
6671#line 6667 "parse.c"
6672 break;
6673
6674 case 71:
6675#line 1616 "parse.y"
6676 {
6677 /*%%%*/
6678 (yyval.node) = NEW_FCALL((yyvsp[0].id), 0, &(yyloc));
6679 nd_set_line((yyval.node), p->tokline);
6680 /*% %*/
6681 /*% ripper: $1 %*/
6682 }
6683#line 6679 "parse.c"
6684 break;
6685
6686 case 72:
6687#line 1626 "parse.y"
6688 {
6689 /*%%%*/
6690 (yyvsp[-1].node)->nd_args = (yyvsp[0].node);
6691 nd_set_last_loc((yyvsp[-1].node), (yylsp[0]).end_pos);
6692 (yyval.node) = (yyvsp[-1].node);
6693 /*% %*/
6694 /*% ripper: command!($1, $2) %*/
6695 }
6696#line 6692 "parse.c"
6697 break;
6698
6699 case 73:
6700#line 1635 "parse.y"
6701 {
6702 /*%%%*/
6703 block_dup_check(p, (yyvsp[-1].node), (yyvsp[0].node));
6704 (yyvsp[-2].node)->nd_args = (yyvsp[-1].node);
6705 (yyval.node) = method_add_block(p, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
6706 fixpos((yyval.node), (yyvsp[-2].node));
6707 nd_set_last_loc((yyvsp[-2].node), (yylsp[-1]).end_pos);
6708 /*% %*/
6709 /*% ripper: method_add_block!(command!($1, $2), $3) %*/
6710 }
6711#line 6707 "parse.c"
6712 break;
6713
6714 case 74:
6715#line 1646 "parse.y"
6716 {
6717 /*%%%*/
6718 (yyval.node) = new_command_qcall(p, (yyvsp[-2].id), (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), Qnull, &(yylsp[-1]), &(yyloc));
6719 /*% %*/
6720 /*% ripper: command_call!($1, $2, $3, $4) %*/
6721 }
6722#line 6718 "parse.c"
6723 break;
6724
6725 case 75:
6726#line 1653 "parse.y"
6727 {
6728 /*%%%*/
6729 (yyval.node) = new_command_qcall(p, (yyvsp[-3].id), (yyvsp[-4].node), (yyvsp[-2].id), (yyvsp[-1].node), (yyvsp[0].node), &(yylsp[-2]), &(yyloc));
6730 /*% %*/
6731 /*% ripper: method_add_block!(command_call!($1, $2, $3, $4), $5) %*/
6732 }
6733#line 6729 "parse.c"
6734 break;
6735
6736 case 76:
6737#line 1660 "parse.y"
6738 {
6739 /*%%%*/
6740 (yyval.node) = new_command_qcall(p, ID2VAL(idCOLON2), (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), Qnull, &(yylsp[-1]), &(yyloc));
6741 /*% %*/
6742 /*% ripper: command_call!($1, ID2VAL(idCOLON2), $3, $4) %*/
6743 }
6744#line 6740 "parse.c"
6745 break;
6746
6747 case 77:
6748#line 1667 "parse.y"
6749 {
6750 /*%%%*/
6751 (yyval.node) = new_command_qcall(p, ID2VAL(idCOLON2), (yyvsp[-4].node), (yyvsp[-2].id), (yyvsp[-1].node), (yyvsp[0].node), &(yylsp[-2]), &(yyloc));
6752 /*% %*/
6753 /*% ripper: method_add_block!(command_call!($1, ID2VAL(idCOLON2), $3, $4), $5) %*/
6754 }
6755#line 6751 "parse.c"
6756 break;
6757
6758 case 78:
6759#line 1674 "parse.y"
6760 {
6761 /*%%%*/
6762 (yyval.node) = NEW_SUPER((yyvsp[0].node), &(yyloc));
6763 fixpos((yyval.node), (yyvsp[0].node));
6764 /*% %*/
6765 /*% ripper: super!($2) %*/
6766 }
6767#line 6763 "parse.c"
6768 break;
6769
6770 case 79:
6771#line 1682 "parse.y"
6772 {
6773 /*%%%*/
6774 (yyval.node) = new_yield(p, (yyvsp[0].node), &(yyloc));
6775 fixpos((yyval.node), (yyvsp[0].node));
6776 /*% %*/
6777 /*% ripper: yield!($2) %*/
6778 }
6779#line 6775 "parse.c"
6780 break;
6781
6782 case 80:
6783#line 1690 "parse.y"
6784 {
6785 /*%%%*/
6786 (yyval.node) = NEW_RETURN(ret_args(p, (yyvsp[0].node)), &(yyloc));
6787 /*% %*/
6788 /*% ripper: return!($2) %*/
6789 }
6790#line 6786 "parse.c"
6791 break;
6792
6793 case 81:
6794#line 1697 "parse.y"
6795 {
6796 /*%%%*/
6797 (yyval.node) = NEW_BREAK(ret_args(p, (yyvsp[0].node)), &(yyloc));
6798 /*% %*/
6799 /*% ripper: break!($2) %*/
6800 }
6801#line 6797 "parse.c"
6802 break;
6803
6804 case 82:
6805#line 1704 "parse.y"
6806 {
6807 /*%%%*/
6808 (yyval.node) = NEW_NEXT(ret_args(p, (yyvsp[0].node)), &(yyloc));
6809 /*% %*/
6810 /*% ripper: next!($2) %*/
6811 }
6812#line 6808 "parse.c"
6813 break;
6814
6815 case 84:
6816#line 1714 "parse.y"
6817 {
6818 /*%%%*/
6819 (yyval.node) = (yyvsp[-1].node);
6820 /*% %*/
6821 /*% ripper: mlhs_paren!($2) %*/
6822 }
6823#line 6819 "parse.c"
6824 break;
6825
6826 case 86:
6827#line 1724 "parse.y"
6828 {
6829 /*%%%*/
6830 (yyval.node) = NEW_MASGN(NEW_LIST((yyvsp[-1].node), &(yyloc)), 0, &(yyloc));
6831 /*% %*/
6832 /*% ripper: mlhs_paren!($2) %*/
6833 }
6834#line 6830 "parse.c"
6835 break;
6836
6837 case 87:
6838#line 1733 "parse.y"
6839 {
6840 /*%%%*/
6841 (yyval.node) = NEW_MASGN((yyvsp[0].node), 0, &(yyloc));
6842 /*% %*/
6843 /*% ripper: $1 %*/
6844 }
6845#line 6841 "parse.c"
6846 break;
6847
6848 case 88:
6849#line 1740 "parse.y"
6850 {
6851 /*%%%*/
6852 (yyval.node) = NEW_MASGN(list_append(p, (yyvsp[-1].node),(yyvsp[0].node)), 0, &(yyloc));
6853 /*% %*/
6854 /*% ripper: mlhs_add!($1, $2) %*/
6855 }
6856#line 6852 "parse.c"
6857 break;
6858
6859 case 89:
6860#line 1747 "parse.y"
6861 {
6862 /*%%%*/
6863 (yyval.node) = NEW_MASGN((yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
6864 /*% %*/
6865 /*% ripper: mlhs_add_star!($1, $3) %*/
6866 }
6867#line 6863 "parse.c"
6868 break;
6869
6870 case 90:
6871#line 1754 "parse.y"
6872 {
6873 /*%%%*/
6874 (yyval.node) = NEW_MASGN((yyvsp[-4].node), NEW_POSTARG((yyvsp[-2].node),(yyvsp[0].node),&(yyloc)), &(yyloc));
6875 /*% %*/
6876 /*% ripper: mlhs_add_post!(mlhs_add_star!($1, $3), $5) %*/
6877 }
6878#line 6874 "parse.c"
6879 break;
6880
6881 case 91:
6882#line 1761 "parse.y"
6883 {
6884 /*%%%*/
6885 (yyval.node) = NEW_MASGN((yyvsp[-1].node), NODE_SPECIAL_NO_NAME_REST, &(yyloc));
6886 /*% %*/
6887 /*% ripper: mlhs_add_star!($1, Qnil) %*/
6888 }
6889#line 6885 "parse.c"
6890 break;
6891
6892 case 92:
6893#line 1768 "parse.y"
6894 {
6895 /*%%%*/
6896 (yyval.node) = NEW_MASGN((yyvsp[-3].node), NEW_POSTARG(NODE_SPECIAL_NO_NAME_REST, (yyvsp[0].node), &(yyloc)), &(yyloc));
6897 /*% %*/
6898 /*% ripper: mlhs_add_post!(mlhs_add_star!($1, Qnil), $4) %*/
6899 }
6900#line 6896 "parse.c"
6901 break;
6902
6903 case 93:
6904#line 1775 "parse.y"
6905 {
6906 /*%%%*/
6907 (yyval.node) = NEW_MASGN(0, (yyvsp[0].node), &(yyloc));
6908 /*% %*/
6909 /*% ripper: mlhs_add_star!(mlhs_new!, $2) %*/
6910 }
6911#line 6907 "parse.c"
6912 break;
6913
6914 case 94:
6915#line 1782 "parse.y"
6916 {
6917 /*%%%*/
6918 (yyval.node) = NEW_MASGN(0, NEW_POSTARG((yyvsp[-2].node),(yyvsp[0].node),&(yyloc)), &(yyloc));
6919 /*% %*/
6920 /*% ripper: mlhs_add_post!(mlhs_add_star!(mlhs_new!, $2), $4) %*/
6921 }
6922#line 6918 "parse.c"
6923 break;
6924
6925 case 95:
6926#line 1789 "parse.y"
6927 {
6928 /*%%%*/
6929 (yyval.node) = NEW_MASGN(0, NODE_SPECIAL_NO_NAME_REST, &(yyloc));
6930 /*% %*/
6931 /*% ripper: mlhs_add_star!(mlhs_new!, Qnil) %*/
6932 }
6933#line 6929 "parse.c"
6934 break;
6935
6936 case 96:
6937#line 1796 "parse.y"
6938 {
6939 /*%%%*/
6940 (yyval.node) = NEW_MASGN(0, NEW_POSTARG(NODE_SPECIAL_NO_NAME_REST, (yyvsp[0].node), &(yyloc)), &(yyloc));
6941 /*% %*/
6942 /*% ripper: mlhs_add_post!(mlhs_add_star!(mlhs_new!, Qnil), $3) %*/
6943 }
6944#line 6940 "parse.c"
6945 break;
6946
6947 case 98:
6948#line 1806 "parse.y"
6949 {
6950 /*%%%*/
6951 (yyval.node) = (yyvsp[-1].node);
6952 /*% %*/
6953 /*% ripper: mlhs_paren!($2) %*/
6954 }
6955#line 6951 "parse.c"
6956 break;
6957
6958 case 99:
6959#line 1815 "parse.y"
6960 {
6961 /*%%%*/
6962 (yyval.node) = NEW_LIST((yyvsp[-1].node), &(yylsp[-1]));
6963 /*% %*/
6964 /*% ripper: mlhs_add!(mlhs_new!, $1) %*/
6965 }
6966#line 6962 "parse.c"
6967 break;
6968
6969 case 100:
6970#line 1822 "parse.y"
6971 {
6972 /*%%%*/
6973 (yyval.node) = list_append(p, (yyvsp[-2].node), (yyvsp[-1].node));
6974 /*% %*/
6975 /*% ripper: mlhs_add!($1, $2) %*/
6976 }
6977#line 6973 "parse.c"
6978 break;
6979
6980 case 101:
6981#line 1831 "parse.y"
6982 {
6983 /*%%%*/
6984 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
6985 /*% %*/
6986 /*% ripper: mlhs_add!(mlhs_new!, $1) %*/
6987 }
6988#line 6984 "parse.c"
6989 break;
6990
6991 case 102:
6992#line 1838 "parse.y"
6993 {
6994 /*%%%*/
6995 (yyval.node) = list_append(p, (yyvsp[-2].node), (yyvsp[0].node));
6996 /*% %*/
6997 /*% ripper: mlhs_add!($1, $3) %*/
6998 }
6999#line 6995 "parse.c"
7000 break;
7001
7002 case 103:
7003#line 1847 "parse.y"
7004 {
7005 /*%%%*/
7006 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
7007 /*% %*/
7008 /*% ripper: assignable(p, var_field(p, $1)) %*/
7009 }
7010#line 7006 "parse.c"
7011 break;
7012
7013 case 104:
7014#line 1854 "parse.y"
7015 {
7016 /*%%%*/
7017 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
7018 /*% %*/
7019 /*% ripper: assignable(p, var_field(p, $1)) %*/
7020 }
7021#line 7017 "parse.c"
7022 break;
7023
7024 case 105:
7025#line 1861 "parse.y"
7026 {
7027 /*%%%*/
7028 (yyval.node) = aryset(p, (yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
7029 /*% %*/
7030 /*% ripper: aref_field!($1, escape_Qundef($3)) %*/
7031 }
7032#line 7028 "parse.c"
7033 break;
7034
7035 case 106:
7036#line 1868 "parse.y"
7037 {
7038 if ((yyvsp[-1].id) == tANDDOT) {
7039 yyerror1(&(yylsp[-1]), "&. inside multiple assignment destination");
7040 }
7041 /*%%%*/
7042 (yyval.node) = attrset(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].id), &(yyloc));
7043 /*% %*/
7044 /*% ripper: field!($1, $2, $3) %*/
7045 }
7046#line 7042 "parse.c"
7047 break;
7048
7049 case 107:
7050#line 1878 "parse.y"
7051 {
7052 /*%%%*/
7053 (yyval.node) = attrset(p, (yyvsp[-2].node), idCOLON2, (yyvsp[0].id), &(yyloc));
7054 /*% %*/
7055 /*% ripper: const_path_field!($1, $3) %*/
7056 }
7057#line 7053 "parse.c"
7058 break;
7059
7060 case 108:
7061#line 1885 "parse.y"
7062 {
7063 if ((yyvsp[-1].id) == tANDDOT) {
7064 yyerror1(&(yylsp[-1]), "&. inside multiple assignment destination");
7065 }
7066 /*%%%*/
7067 (yyval.node) = attrset(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].id), &(yyloc));
7068 /*% %*/
7069 /*% ripper: field!($1, $2, $3) %*/
7070 }
7071#line 7067 "parse.c"
7072 break;
7073
7074 case 109:
7075#line 1895 "parse.y"
7076 {
7077 /*%%%*/
7078 (yyval.node) = const_decl(p, NEW_COLON2((yyvsp[-2].node), (yyvsp[0].id), &(yyloc)), &(yyloc));
7079 /*% %*/
7080 /*% ripper: const_decl(p, const_path_field!($1, $3)) %*/
7081 }
7082#line 7078 "parse.c"
7083 break;
7084
7085 case 110:
7086#line 1902 "parse.y"
7087 {
7088 /*%%%*/
7089 (yyval.node) = const_decl(p, NEW_COLON3((yyvsp[0].id), &(yyloc)), &(yyloc));
7090 /*% %*/
7091 /*% ripper: const_decl(p, top_const_field!($2)) %*/
7092 }
7093#line 7089 "parse.c"
7094 break;
7095
7096 case 111:
7097#line 1909 "parse.y"
7098 {
7099 /*%%%*/
7100 rb_backref_error(p, (yyvsp[0].node));
7101 (yyval.node) = NEW_BEGIN(0, &(yyloc));
7102 /*% %*/
7103 /*% ripper[error]: assign_error!(var_field(p, $1)) %*/
7104 }
7105#line 7101 "parse.c"
7106 break;
7107
7108 case 112:
7109#line 1919 "parse.y"
7110 {
7111 /*%%%*/
7112 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
7113 /*% %*/
7114 /*% ripper: assignable(p, var_field(p, $1)) %*/
7115 }
7116#line 7112 "parse.c"
7117 break;
7118
7119 case 113:
7120#line 1926 "parse.y"
7121 {
7122 /*%%%*/
7123 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
7124 /*% %*/
7125 /*% ripper: assignable(p, var_field(p, $1)) %*/
7126 }
7127#line 7123 "parse.c"
7128 break;
7129
7130 case 114:
7131#line 1933 "parse.y"
7132 {
7133 /*%%%*/
7134 (yyval.node) = aryset(p, (yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
7135 /*% %*/
7136 /*% ripper: aref_field!($1, escape_Qundef($3)) %*/
7137 }
7138#line 7134 "parse.c"
7139 break;
7140
7141 case 115:
7142#line 1940 "parse.y"
7143 {
7144 /*%%%*/
7145 (yyval.node) = attrset(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].id), &(yyloc));
7146 /*% %*/
7147 /*% ripper: field!($1, $2, $3) %*/
7148 }
7149#line 7145 "parse.c"
7150 break;
7151
7152 case 116:
7153#line 1947 "parse.y"
7154 {
7155 /*%%%*/
7156 (yyval.node) = attrset(p, (yyvsp[-2].node), idCOLON2, (yyvsp[0].id), &(yyloc));
7157 /*% %*/
7158 /*% ripper: field!($1, ID2VAL(idCOLON2), $3) %*/
7159 }
7160#line 7156 "parse.c"
7161 break;
7162
7163 case 117:
7164#line 1954 "parse.y"
7165 {
7166 /*%%%*/
7167 (yyval.node) = attrset(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].id), &(yyloc));
7168 /*% %*/
7169 /*% ripper: field!($1, $2, $3) %*/
7170 }
7171#line 7167 "parse.c"
7172 break;
7173
7174 case 118:
7175#line 1961 "parse.y"
7176 {
7177 /*%%%*/
7178 (yyval.node) = const_decl(p, NEW_COLON2((yyvsp[-2].node), (yyvsp[0].id), &(yyloc)), &(yyloc));
7179 /*% %*/
7180 /*% ripper: const_decl(p, const_path_field!($1, $3)) %*/
7181 }
7182#line 7178 "parse.c"
7183 break;
7184
7185 case 119:
7186#line 1968 "parse.y"
7187 {
7188 /*%%%*/
7189 (yyval.node) = const_decl(p, NEW_COLON3((yyvsp[0].id), &(yyloc)), &(yyloc));
7190 /*% %*/
7191 /*% ripper: const_decl(p, top_const_field!($2)) %*/
7192 }
7193#line 7189 "parse.c"
7194 break;
7195
7196 case 120:
7197#line 1975 "parse.y"
7198 {
7199 /*%%%*/
7200 rb_backref_error(p, (yyvsp[0].node));
7201 (yyval.node) = NEW_BEGIN(0, &(yyloc));
7202 /*% %*/
7203 /*% ripper[error]: assign_error!(var_field(p, $1)) %*/
7204 }
7205#line 7201 "parse.c"
7206 break;
7207
7208 case 121:
7209#line 1985 "parse.y"
7210 {
7211 /*%%%*/
7212 yyerror1(&(yylsp[0]), "class/module name must be CONSTANT");
7213 /*% %*/
7214 /*% ripper[error]: class_name_error!($1) %*/
7215 }
7216#line 7212 "parse.c"
7217 break;
7218
7219 case 123:
7220#line 1995 "parse.y"
7221 {
7222 /*%%%*/
7223 (yyval.node) = NEW_COLON3((yyvsp[0].id), &(yyloc));
7224 /*% %*/
7225 /*% ripper: top_const_ref!($2) %*/
7226 }
7227#line 7223 "parse.c"
7228 break;
7229
7230 case 124:
7231#line 2002 "parse.y"
7232 {
7233 /*%%%*/
7234 (yyval.node) = NEW_COLON2(0, (yyval.node), &(yyloc));
7235 /*% %*/
7236 /*% ripper: const_ref!($1) %*/
7237 }
7238#line 7234 "parse.c"
7239 break;
7240
7241 case 125:
7242#line 2009 "parse.y"
7243 {
7244 /*%%%*/
7245 (yyval.node) = NEW_COLON2((yyvsp[-2].node), (yyvsp[0].id), &(yyloc));
7246 /*% %*/
7247 /*% ripper: const_path_ref!($1, $3) %*/
7248 }
7249#line 7245 "parse.c"
7250 break;
7251
7252 case 129:
7253#line 2021 "parse.y"
7254 {
7255 SET_LEX_STATE(EXPR_ENDFN);
7256 (yyval.id) = (yyvsp[0].id);
7257 }
7258#line 7254 "parse.c"
7259 break;
7260
7261 case 131:
7262#line 2029 "parse.y"
7263 {
7264 /*%%%*/
7265 (yyval.node) = NEW_LIT(ID2SYM((yyvsp[0].id)), &(yyloc));
7266 /*% %*/
7267 /*% ripper: symbol_literal!($1) %*/
7268 }
7269#line 7265 "parse.c"
7270 break;
7271
7272 case 133:
7273#line 2039 "parse.y"
7274 {
7275 /*%%%*/
7276 (yyval.node) = NEW_UNDEF((yyvsp[0].node), &(yyloc));
7277 /*% %*/
7278 /*% ripper: rb_ary_new3(1, get_value($1)) %*/
7279 }
7280#line 7276 "parse.c"
7281 break;
7282
7283 case 134:
7284#line 2045 "parse.y"
7285 {SET_LEX_STATE(EXPR_FNAME|EXPR_FITEM);}
7286#line 7282 "parse.c"
7287 break;
7288
7289 case 135:
7290#line 2046 "parse.y"
7291 {
7292 /*%%%*/
7293 NODE *undef = NEW_UNDEF((yyvsp[0].node), &(yylsp[0]));
7294 (yyval.node) = block_append(p, (yyvsp[-3].node), undef);
7295 /*% %*/
7296 /*% ripper: rb_ary_push($1, get_value($4)) %*/
7297 }
7298#line 7294 "parse.c"
7299 break;
7300
7301 case 136:
7302#line 2055 "parse.y"
7303 { ifndef_ripper((yyval.id) = '|'); }
7304#line 7300 "parse.c"
7305 break;
7306
7307 case 137:
7308#line 2056 "parse.y"
7309 { ifndef_ripper((yyval.id) = '^'); }
7310#line 7306 "parse.c"
7311 break;
7312
7313 case 138:
7314#line 2057 "parse.y"
7315 { ifndef_ripper((yyval.id) = '&'); }
7316#line 7312 "parse.c"
7317 break;
7318
7319 case 139:
7320#line 2058 "parse.y"
7321 { ifndef_ripper((yyval.id) = tCMP); }
7322#line 7318 "parse.c"
7323 break;
7324
7325 case 140:
7326#line 2059 "parse.y"
7327 { ifndef_ripper((yyval.id) = tEQ); }
7328#line 7324 "parse.c"
7329 break;
7330
7331 case 141:
7332#line 2060 "parse.y"
7333 { ifndef_ripper((yyval.id) = tEQQ); }
7334#line 7330 "parse.c"
7335 break;
7336
7337 case 142:
7338#line 2061 "parse.y"
7339 { ifndef_ripper((yyval.id) = tMATCH); }
7340#line 7336 "parse.c"
7341 break;
7342
7343 case 143:
7344#line 2062 "parse.y"
7345 { ifndef_ripper((yyval.id) = tNMATCH); }
7346#line 7342 "parse.c"
7347 break;
7348
7349 case 144:
7350#line 2063 "parse.y"
7351 { ifndef_ripper((yyval.id) = '>'); }
7352#line 7348 "parse.c"
7353 break;
7354
7355 case 145:
7356#line 2064 "parse.y"
7357 { ifndef_ripper((yyval.id) = tGEQ); }
7358#line 7354 "parse.c"
7359 break;
7360
7361 case 146:
7362#line 2065 "parse.y"
7363 { ifndef_ripper((yyval.id) = '<'); }
7364#line 7360 "parse.c"
7365 break;
7366
7367 case 147:
7368#line 2066 "parse.y"
7369 { ifndef_ripper((yyval.id) = tLEQ); }
7370#line 7366 "parse.c"
7371 break;
7372
7373 case 148:
7374#line 2067 "parse.y"
7375 { ifndef_ripper((yyval.id) = tNEQ); }
7376#line 7372 "parse.c"
7377 break;
7378
7379 case 149:
7380#line 2068 "parse.y"
7381 { ifndef_ripper((yyval.id) = tLSHFT); }
7382#line 7378 "parse.c"
7383 break;
7384
7385 case 150:
7386#line 2069 "parse.y"
7387 { ifndef_ripper((yyval.id) = tRSHFT); }
7388#line 7384 "parse.c"
7389 break;
7390
7391 case 151:
7392#line 2070 "parse.y"
7393 { ifndef_ripper((yyval.id) = '+'); }
7394#line 7390 "parse.c"
7395 break;
7396
7397 case 152:
7398#line 2071 "parse.y"
7399 { ifndef_ripper((yyval.id) = '-'); }
7400#line 7396 "parse.c"
7401 break;
7402
7403 case 153:
7404#line 2072 "parse.y"
7405 { ifndef_ripper((yyval.id) = '*'); }
7406#line 7402 "parse.c"
7407 break;
7408
7409 case 154:
7410#line 2073 "parse.y"
7411 { ifndef_ripper((yyval.id) = '*'); }
7412#line 7408 "parse.c"
7413 break;
7414
7415 case 155:
7416#line 2074 "parse.y"
7417 { ifndef_ripper((yyval.id) = '/'); }
7418#line 7414 "parse.c"
7419 break;
7420
7421 case 156:
7422#line 2075 "parse.y"
7423 { ifndef_ripper((yyval.id) = '%'); }
7424#line 7420 "parse.c"
7425 break;
7426
7427 case 157:
7428#line 2076 "parse.y"
7429 { ifndef_ripper((yyval.id) = tPOW); }
7430#line 7426 "parse.c"
7431 break;
7432
7433 case 158:
7434#line 2077 "parse.y"
7435 { ifndef_ripper((yyval.id) = tDSTAR); }
7436#line 7432 "parse.c"
7437 break;
7438
7439 case 159:
7440#line 2078 "parse.y"
7441 { ifndef_ripper((yyval.id) = '!'); }
7442#line 7438 "parse.c"
7443 break;
7444
7445 case 160:
7446#line 2079 "parse.y"
7447 { ifndef_ripper((yyval.id) = '~'); }
7448#line 7444 "parse.c"
7449 break;
7450
7451 case 161:
7452#line 2080 "parse.y"
7453 { ifndef_ripper((yyval.id) = tUPLUS); }
7454#line 7450 "parse.c"
7455 break;
7456
7457 case 162:
7458#line 2081 "parse.y"
7459 { ifndef_ripper((yyval.id) = tUMINUS); }
7460#line 7456 "parse.c"
7461 break;
7462
7463 case 163:
7464#line 2082 "parse.y"
7465 { ifndef_ripper((yyval.id) = tAREF); }
7466#line 7462 "parse.c"
7467 break;
7468
7469 case 164:
7470#line 2083 "parse.y"
7471 { ifndef_ripper((yyval.id) = tASET); }
7472#line 7468 "parse.c"
7473 break;
7474
7475 case 165:
7476#line 2084 "parse.y"
7477 { ifndef_ripper((yyval.id) = '`'); }
7478#line 7474 "parse.c"
7479 break;
7480
7481 case 207:
7482#line 2102 "parse.y"
7483 {
7484 /*%%%*/
7485 (yyval.node) = node_assign(p, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
7486 /*% %*/
7487 /*% ripper: assign!($1, $3) %*/
7488 }
7489#line 7485 "parse.c"
7490 break;
7491
7492 case 208:
7493#line 2109 "parse.y"
7494 {
7495 /*%%%*/
7496 (yyval.node) = new_op_assign(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].node), &(yyloc));
7497 /*% %*/
7498 /*% ripper: opassign!($1, $2, $3) %*/
7499 }
7500#line 7496 "parse.c"
7501 break;
7502
7503 case 209:
7504#line 2116 "parse.y"
7505 {
7506 /*%%%*/
7507 value_expr((yyvsp[0].node));
7508 (yyval.node) = new_ary_op_assign(p, (yyvsp[-5].node), (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-3]), &(yyloc));
7509 /*% %*/
7510 /*% ripper: opassign!(aref_field!($1, escape_Qundef($3)), $5, $6) %*/
7511 }
7512#line 7508 "parse.c"
7513 break;
7514
7515 case 210:
7516#line 2124 "parse.y"
7517 {
7518 /*%%%*/
7519 value_expr((yyvsp[0].node));
7520 (yyval.node) = new_attr_op_assign(p, (yyvsp[-4].node), (yyvsp[-3].id), (yyvsp[-2].id), (yyvsp[-1].id), (yyvsp[0].node), &(yyloc));
7521 /*% %*/
7522 /*% ripper: opassign!(field!($1, $2, $3), $4, $5) %*/
7523 }
7524#line 7520 "parse.c"
7525 break;
7526
7527 case 211:
7528#line 2132 "parse.y"
7529 {
7530 /*%%%*/
7531 value_expr((yyvsp[0].node));
7532 (yyval.node) = new_attr_op_assign(p, (yyvsp[-4].node), (yyvsp[-3].id), (yyvsp[-2].id), (yyvsp[-1].id), (yyvsp[0].node), &(yyloc));
7533 /*% %*/
7534 /*% ripper: opassign!(field!($1, $2, $3), $4, $5) %*/
7535 }
7536#line 7532 "parse.c"
7537 break;
7538
7539 case 212:
7540#line 2140 "parse.y"
7541 {
7542 /*%%%*/
7543 value_expr((yyvsp[0].node));
7544 (yyval.node) = new_attr_op_assign(p, (yyvsp[-4].node), ID2VAL(idCOLON2), (yyvsp[-2].id), (yyvsp[-1].id), (yyvsp[0].node), &(yyloc));
7545 /*% %*/
7546 /*% ripper: opassign!(field!($1, ID2VAL(idCOLON2), $3), $4, $5) %*/
7547 }
7548#line 7544 "parse.c"
7549 break;
7550
7551 case 213:
7552#line 2148 "parse.y"
7553 {
7554 /*%%%*/
7555 YYLTYPE loc = code_loc_gen(&(yylsp[-4]), &(yylsp[-2]));
7556 (yyval.node) = new_const_op_assign(p, NEW_COLON2((yyvsp[-4].node), (yyvsp[-2].id), &loc), (yyvsp[-1].id), (yyvsp[0].node), &(yyloc));
7557 /*% %*/
7558 /*% ripper: opassign!(const_path_field!($1, $3), $4, $5) %*/
7559 }
7560#line 7556 "parse.c"
7561 break;
7562
7563 case 214:
7564#line 2156 "parse.y"
7565 {
7566 /*%%%*/
7567 (yyval.node) = new_const_op_assign(p, NEW_COLON3((yyvsp[-2].id), &(yyloc)), (yyvsp[-1].id), (yyvsp[0].node), &(yyloc));
7568 /*% %*/
7569 /*% ripper: opassign!(top_const_field!($2), $3, $4) %*/
7570 }
7571#line 7567 "parse.c"
7572 break;
7573
7574 case 215:
7575#line 2163 "parse.y"
7576 {
7577 /*%%%*/
7578 rb_backref_error(p, (yyvsp[-2].node));
7579 (yyval.node) = NEW_BEGIN(0, &(yyloc));
7580 /*% %*/
7581 /*% ripper[error]: assign_error!(opassign!(var_field(p, $1), $2, $3)) %*/
7582 }
7583#line 7579 "parse.c"
7584 break;
7585
7586 case 216:
7587#line 2171 "parse.y"
7588 {
7589 /*%%%*/
7590 value_expr((yyvsp[-2].node));
7591 value_expr((yyvsp[0].node));
7592 (yyval.node) = NEW_DOT2((yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
7593 /*% %*/
7594 /*% ripper: dot2!($1, $3) %*/
7595 }
7596#line 7592 "parse.c"
7597 break;
7598
7599 case 217:
7600#line 2180 "parse.y"
7601 {
7602 /*%%%*/
7603 value_expr((yyvsp[-2].node));
7604 value_expr((yyvsp[0].node));
7605 (yyval.node) = NEW_DOT3((yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
7606 /*% %*/
7607 /*% ripper: dot3!($1, $3) %*/
7608 }
7609#line 7605 "parse.c"
7610 break;
7611
7612 case 218:
7613#line 2189 "parse.y"
7614 {
7615 /*%%%*/
7616 YYLTYPE loc;
7617 loc.beg_pos = (yylsp[0]).end_pos;
7618 loc.end_pos = (yylsp[0]).end_pos;
7619
7620 value_expr((yyvsp[-1].node));
7621 (yyval.node) = NEW_DOT2((yyvsp[-1].node), new_nil(&loc), &(yyloc));
7622 /*% %*/
7623 /*% ripper: dot2!($1, Qnil) %*/
7624 }
7625#line 7621 "parse.c"
7626 break;
7627
7628 case 219:
7629#line 2201 "parse.y"
7630 {
7631 /*%%%*/
7632 YYLTYPE loc;
7633 loc.beg_pos = (yylsp[0]).end_pos;
7634 loc.end_pos = (yylsp[0]).end_pos;
7635
7636 value_expr((yyvsp[-1].node));
7637 (yyval.node) = NEW_DOT3((yyvsp[-1].node), new_nil(&loc), &(yyloc));
7638 /*% %*/
7639 /*% ripper: dot3!($1, Qnil) %*/
7640 }
7641#line 7637 "parse.c"
7642 break;
7643
7644 case 220:
7645#line 2213 "parse.y"
7646 {
7647 /*%%%*/
7648 YYLTYPE loc;
7649 loc.beg_pos = (yylsp[-1]).beg_pos;
7650 loc.end_pos = (yylsp[-1]).beg_pos;
7651
7652 value_expr((yyvsp[0].node));
7653 (yyval.node) = NEW_DOT2(new_nil(&loc), (yyvsp[0].node), &(yyloc));
7654 /*% %*/
7655 /*% ripper: dot2!(Qnil, $2) %*/
7656 }
7657#line 7653 "parse.c"
7658 break;
7659
7660 case 221:
7661#line 2225 "parse.y"
7662 {
7663 /*%%%*/
7664 YYLTYPE loc;
7665 loc.beg_pos = (yylsp[-1]).beg_pos;
7666 loc.end_pos = (yylsp[-1]).beg_pos;
7667
7668 value_expr((yyvsp[0].node));
7669 (yyval.node) = NEW_DOT3(new_nil(&loc), (yyvsp[0].node), &(yyloc));
7670 /*% %*/
7671 /*% ripper: dot3!(Qnil, $2) %*/
7672 }
7673#line 7669 "parse.c"
7674 break;
7675
7676 case 222:
7677#line 2237 "parse.y"
7678 {
7679 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '+', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
7680 }
7681#line 7677 "parse.c"
7682 break;
7683
7684 case 223:
7685#line 2241 "parse.y"
7686 {
7687 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '-', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
7688 }
7689#line 7685 "parse.c"
7690 break;
7691
7692 case 224:
7693#line 2245 "parse.y"
7694 {
7695 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '*', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
7696 }
7697#line 7693 "parse.c"
7698 break;
7699
7700 case 225:
7701#line 2249 "parse.y"
7702 {
7703 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '/', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
7704 }
7705#line 7701 "parse.c"
7706 break;
7707
7708 case 226:
7709#line 2253 "parse.y"
7710 {
7711 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '%', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
7712 }
7713#line 7709 "parse.c"
7714 break;
7715
7716 case 227:
7717#line 2257 "parse.y"
7718 {
7719 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idPow, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
7720 }
7721#line 7717 "parse.c"
7722 break;
7723
7724 case 228:
7725#line 2261 "parse.y"
7726 {
7727 (yyval.node) = call_uni_op(p, call_bin_op(p, (yyvsp[-2].node), idPow, (yyvsp[0].node), &(yylsp[-2]), &(yyloc)), idUMinus, &(yylsp[-3]), &(yyloc));
7728 }
7729#line 7725 "parse.c"
7730 break;
7731
7732 case 229:
7733#line 2265 "parse.y"
7734 {
7735 (yyval.node) = call_uni_op(p, (yyvsp[0].node), idUPlus, &(yylsp[-1]), &(yyloc));
7736 }
7737#line 7733 "parse.c"
7738 break;
7739
7740 case 230:
7741#line 2269 "parse.y"
7742 {
7743 (yyval.node) = call_uni_op(p, (yyvsp[0].node), idUMinus, &(yylsp[-1]), &(yyloc));
7744 }
7745#line 7741 "parse.c"
7746 break;
7747
7748 case 231:
7749#line 2273 "parse.y"
7750 {
7751 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '|', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
7752 }
7753#line 7749 "parse.c"
7754 break;
7755
7756 case 232:
7757#line 2277 "parse.y"
7758 {
7759 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '^', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
7760 }
7761#line 7757 "parse.c"
7762 break;
7763
7764 case 233:
7765#line 2281 "parse.y"
7766 {
7767 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '&', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
7768 }
7769#line 7765 "parse.c"
7770 break;
7771
7772 case 234:
7773#line 2285 "parse.y"
7774 {
7775 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idCmp, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
7776 }
7777#line 7773 "parse.c"
7778 break;
7779
7780 case 236:
7781#line 2290 "parse.y"
7782 {
7783 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idEq, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
7784 }
7785#line 7781 "parse.c"
7786 break;
7787
7788 case 237:
7789#line 2294 "parse.y"
7790 {
7791 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idEqq, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
7792 }
7793#line 7789 "parse.c"
7794 break;
7795
7796 case 238:
7797#line 2298 "parse.y"
7798 {
7799 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idNeq, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
7800 }
7801#line 7797 "parse.c"
7802 break;
7803
7804 case 239:
7805#line 2302 "parse.y"
7806 {
7807 (yyval.node) = match_op(p, (yyvsp[-2].node), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
7808 }
7809#line 7805 "parse.c"
7810 break;
7811
7812 case 240:
7813#line 2306 "parse.y"
7814 {
7815 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idNeqTilde, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
7816 }
7817#line 7813 "parse.c"
7818 break;
7819
7820 case 241:
7821#line 2310 "parse.y"
7822 {
7823 (yyval.node) = call_uni_op(p, method_cond(p, (yyvsp[0].node), &(yylsp[0])), '!', &(yylsp[-1]), &(yyloc));
7824 }
7825#line 7821 "parse.c"
7826 break;
7827
7828 case 242:
7829#line 2314 "parse.y"
7830 {
7831 (yyval.node) = call_uni_op(p, (yyvsp[0].node), '~', &(yylsp[-1]), &(yyloc));
7832 }
7833#line 7829 "parse.c"
7834 break;
7835
7836 case 243:
7837#line 2318 "parse.y"
7838 {
7839 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idLTLT, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
7840 }
7841#line 7837 "parse.c"
7842 break;
7843
7844 case 244:
7845#line 2322 "parse.y"
7846 {
7847 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idGTGT, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
7848 }
7849#line 7845 "parse.c"
7850 break;
7851
7852 case 245:
7853#line 2326 "parse.y"
7854 {
7855 (yyval.node) = logop(p, idANDOP, (yyvsp[-2].node), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
7856 }
7857#line 7853 "parse.c"
7858 break;
7859
7860 case 246:
7861#line 2330 "parse.y"
7862 {
7863 (yyval.node) = logop(p, idOROP, (yyvsp[-2].node), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
7864 }
7865#line 7861 "parse.c"
7866 break;
7867
7868 case 247:
7869#line 2333 "parse.y"
7870 {p->in_defined = 1;}
7871#line 7867 "parse.c"
7872 break;
7873
7874 case 248:
7875#line 2334 "parse.y"
7876 {
7877 p->in_defined = 0;
7878 (yyval.node) = new_defined(p, (yyvsp[0].node), &(yyloc));
7879 }
7880#line 7876 "parse.c"
7881 break;
7882
7883 case 249:
7884#line 2339 "parse.y"
7885 {
7886 /*%%%*/
7887 value_expr((yyvsp[-5].node));
7888 (yyval.node) = new_if(p, (yyvsp[-5].node), (yyvsp[-3].node), (yyvsp[0].node), &(yyloc));
7889 fixpos((yyval.node), (yyvsp[-5].node));
7890 /*% %*/
7891 /*% ripper: ifop!($1, $3, $6) %*/
7892 }
7893#line 7889 "parse.c"
7894 break;
7895
7896 case 250:
7897#line 2348 "parse.y"
7898 {
7899 (yyval.node) = (yyvsp[0].node);
7900 }
7901#line 7897 "parse.c"
7902 break;
7903
7904 case 251:
7905#line 2353 "parse.y"
7906 {(yyval.id) = '>';}
7907#line 7903 "parse.c"
7908 break;
7909
7910 case 252:
7911#line 2354 "parse.y"
7912 {(yyval.id) = '<';}
7913#line 7909 "parse.c"
7914 break;
7915
7916 case 253:
7917#line 2355 "parse.y"
7918 {(yyval.id) = idGE;}
7919#line 7915 "parse.c"
7920 break;
7921
7922 case 254:
7923#line 2356 "parse.y"
7924 {(yyval.id) = idLE;}
7925#line 7921 "parse.c"
7926 break;
7927
7928 case 255:
7929#line 2360 "parse.y"
7930 {
7931 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
7932 }
7933#line 7929 "parse.c"
7934 break;
7935
7936 case 256:
7937#line 2364 "parse.y"
7938 {
7939 rb_warning1("comparison '%s' after comparison", WARN_ID((yyvsp[-1].id)));
7940 (yyval.node) = call_bin_op(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
7941 }
7942#line 7938 "parse.c"
7943 break;
7944
7945 case 257:
7946#line 2371 "parse.y"
7947 {
7948 value_expr((yyvsp[0].node));
7949 (yyval.node) = (yyvsp[0].node);
7950 }
7951#line 7947 "parse.c"
7952 break;
7953
7954 case 259:
7955#line 2379 "parse.y"
7956 {
7957 (yyval.node) = (yyvsp[-1].node);
7958 }
7959#line 7955 "parse.c"
7960 break;
7961
7962 case 260:
7963#line 2383 "parse.y"
7964 {
7965 /*%%%*/
7966 (yyval.node) = (yyvsp[-1].node) ? arg_append(p, (yyvsp[-3].node), new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yyloc)) : (yyvsp[-3].node);
7967 /*% %*/
7968 /*% ripper: args_add!($1, bare_assoc_hash!($3)) %*/
7969 }
7970#line 7966 "parse.c"
7971 break;
7972
7973 case 261:
7974#line 2390 "parse.y"
7975 {
7976 /*%%%*/
7977 (yyval.node) = (yyvsp[-1].node) ? NEW_LIST(new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yyloc)) : 0;
7978 /*% %*/
7979 /*% ripper: args_add!(args_new!, bare_assoc_hash!($1)) %*/
7980 }
7981#line 7977 "parse.c"
7982 break;
7983
7984 case 262:
7985#line 2399 "parse.y"
7986 {
7987 value_expr((yyvsp[0].node));
7988 (yyval.node) = (yyvsp[0].node);
7989 }
7990#line 7986 "parse.c"
7991 break;
7992
7993 case 263:
7994#line 2404 "parse.y"
7995 {
7996 /*%%%*/
7997 YYLTYPE loc = code_loc_gen(&(yylsp[-1]), &(yylsp[0]));
7998 value_expr((yyvsp[-2].node));
7999 (yyval.node) = NEW_RESCUE((yyvsp[-2].node), NEW_RESBODY(0, remove_begin((yyvsp[0].node)), 0, &loc), 0, &(yyloc));
8000 /*% %*/
8001 /*% ripper: rescue_mod!($1, $3) %*/
8002 }
8003#line 7999 "parse.c"
8004 break;
8005
8006 case 264:
8007#line 2415 "parse.y"
8008 {
8009 /*%%%*/
8010 (yyval.node) = (yyvsp[-1].node);
8011 /*% %*/
8012 /*% ripper: arg_paren!(escape_Qundef($2)) %*/
8013 }
8014#line 8010 "parse.c"
8015 break;
8016
8017 case 265:
8018#line 2422 "parse.y"
8019 {
8020 if (!local_id(p, idFWD_REST) ||
8021#if idFWD_KWREST
8022 !local_id(p, idFWD_KWREST) ||
8023#endif
8024 !local_id(p, idFWD_BLOCK)) {
8025 compile_error(p, "unexpected ...");
8026 (yyval.node) = Qnone;
8027 }
8028 else {
8029 /*%%%*/
8030 NODE *splat = NEW_SPLAT(NEW_LVAR(idFWD_REST, &(yylsp[-1])), &(yylsp[-1]));
8031#if idFWD_KWREST
8032 NODE *kwrest = list_append(p, NEW_LIST(0, &(yylsp[-1])), NEW_LVAR(idFWD_KWREST, &(yylsp[-1])));
8033#endif
8034 NODE *block = NEW_BLOCK_PASS(NEW_LVAR(idFWD_BLOCK, &(yylsp[-1])), &(yylsp[-1]));
8035 (yyval.node) = rest_arg_append(p, (yyvsp[-3].node), splat, &(yyloc));
8036#if idFWD_KWREST
8037 (yyval.node) = arg_append(p, (yyval.node), new_hash(p, kwrest, &(yylsp[-1])), &(yylsp[-1]));
8038#endif
8039 (yyval.node) = arg_blk_pass((yyval.node), block);
8040 /*% %*/
8041 /*% ripper: arg_paren!(args_add!($2, $4)) %*/
8042 }
8043 }
8044#line 8040 "parse.c"
8045 break;
8046
8047 case 266:
8048#line 2448 "parse.y"
8049 {
8050 if (!local_id(p, idFWD_REST) ||
8051#if idFWD_KWREST
8052 !local_id(p, idFWD_KWREST) ||
8053#endif
8054 !local_id(p, idFWD_BLOCK)) {
8055 compile_error(p, "unexpected ...");
8056 (yyval.node) = Qnone;
8057 }
8058 else {
8059 /*%%%*/
8060 NODE *splat = NEW_SPLAT(NEW_LVAR(idFWD_REST, &(yylsp[-1])), &(yylsp[-1]));
8061#if idFWD_KWREST
8062 NODE *kwrest = list_append(p, NEW_LIST(0, &(yylsp[-1])), NEW_LVAR(idFWD_KWREST, &(yylsp[-1])));
8063#endif
8064 NODE *block = NEW_BLOCK_PASS(NEW_LVAR(idFWD_BLOCK, &(yylsp[-1])), &(yylsp[-1]));
8065#if idFWD_KWREST
8066 (yyval.node) = arg_append(p, splat, new_hash(p, kwrest, &(yylsp[-1])), &(yylsp[-1]));
8067#else
8068 (yyval.node) = splat;
8069#endif
8070 (yyval.node) = arg_blk_pass((yyval.node), block);
8071 /*% %*/
8072 /*% ripper: arg_paren!($2) %*/
8073 }
8074 }
8075#line 8071 "parse.c"
8076 break;
8077
8078 case 271:
8079#line 2483 "parse.y"
8080 {
8081 (yyval.node) = (yyvsp[-1].node);
8082 }
8083#line 8079 "parse.c"
8084 break;
8085
8086 case 272:
8087#line 2487 "parse.y"
8088 {
8089 /*%%%*/
8090 (yyval.node) = (yyvsp[-1].node) ? arg_append(p, (yyvsp[-3].node), new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yyloc)) : (yyvsp[-3].node);
8091 /*% %*/
8092 /*% ripper: args_add!($1, bare_assoc_hash!($3)) %*/
8093 }
8094#line 8090 "parse.c"
8095 break;
8096
8097 case 273:
8098#line 2494 "parse.y"
8099 {
8100 /*%%%*/
8101 (yyval.node) = (yyvsp[-1].node) ? NEW_LIST(new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yylsp[-1])) : 0;
8102 /*% %*/
8103 /*% ripper: args_add!(args_new!, bare_assoc_hash!($1)) %*/
8104 }
8105#line 8101 "parse.c"
8106 break;
8107
8108 case 274:
8109#line 2503 "parse.y"
8110 {
8111 /*%%%*/
8112 value_expr((yyvsp[0].node));
8113 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
8114 /*% %*/
8115 /*% ripper: args_add!(args_new!, $1) %*/
8116 }
8117#line 8113 "parse.c"
8118 break;
8119
8120 case 275:
8121#line 2511 "parse.y"
8122 {
8123 /*%%%*/
8124 (yyval.node) = arg_blk_pass((yyvsp[-1].node), (yyvsp[0].node));
8125 /*% %*/
8126 /*% ripper: args_add_block!($1, $2) %*/
8127 }
8128#line 8124 "parse.c"
8129 break;
8130
8131 case 276:
8132#line 2518 "parse.y"
8133 {
8134 /*%%%*/
8135 (yyval.node) = (yyvsp[-1].node) ? NEW_LIST(new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yylsp[-1])) : 0;
8136 (yyval.node) = arg_blk_pass((yyval.node), (yyvsp[0].node));
8137 /*% %*/
8138 /*% ripper: args_add_block!(args_add!(args_new!, bare_assoc_hash!($1)), $2) %*/
8139 }
8140#line 8136 "parse.c"
8141 break;
8142
8143 case 277:
8144#line 2526 "parse.y"
8145 {
8146 /*%%%*/
8147 (yyval.node) = (yyvsp[-1].node) ? arg_append(p, (yyvsp[-3].node), new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yyloc)) : (yyvsp[-3].node);
8148 (yyval.node) = arg_blk_pass((yyval.node), (yyvsp[0].node));
8149 /*% %*/
8150 /*% ripper: args_add_block!(args_add!($1, bare_assoc_hash!($3)), $4) %*/
8151 }
8152#line 8148 "parse.c"
8153 break;
8154
8155 case 279:
8156#line 2537 "parse.y"
8157 {
8158 /* If call_args starts with a open paren '(' or '[',
8159 * look-ahead reading of the letters calls CMDARG_PUSH(0),
8160 * but the push must be done after CMDARG_PUSH(1).
8161 * So this code makes them consistent by first cancelling
8162 * the premature CMDARG_PUSH(0), doing CMDARG_PUSH(1),
8163 * and finally redoing CMDARG_PUSH(0).
8164 */
8165 int lookahead = 0;
8166 switch (yychar) {
8167 case '(': case tLPAREN: case tLPAREN_ARG: case '[': case tLBRACK:
8168 lookahead = 1;
8169 }
8170 if (lookahead) CMDARG_POP();
8171 CMDARG_PUSH(1);
8172 if (lookahead) CMDARG_PUSH(0);
8173 }
8174#line 8170 "parse.c"
8175 break;
8176
8177 case 280:
8178#line 2555 "parse.y"
8179 {
8180 /* call_args can be followed by tLBRACE_ARG (that does CMDARG_PUSH(0) in the lexer)
8181 * but the push must be done after CMDARG_POP() in the parser.
8182 * So this code does CMDARG_POP() to pop 0 pushed by tLBRACE_ARG,
8183 * CMDARG_POP() to pop 1 pushed by command_args,
8184 * and CMDARG_PUSH(0) to restore back the flag set by tLBRACE_ARG.
8185 */
8186 int lookahead = 0;
8187 switch (yychar) {
8188 case tLBRACE_ARG:
8189 lookahead = 1;
8190 }
8191 if (lookahead) CMDARG_POP();
8192 CMDARG_POP();
8193 if (lookahead) CMDARG_PUSH(0);
8194 (yyval.node) = (yyvsp[0].node);
8195 }
8196#line 8192 "parse.c"
8197 break;
8198
8199 case 281:
8200#line 2575 "parse.y"
8201 {
8202 /*%%%*/
8203 (yyval.node) = NEW_BLOCK_PASS((yyvsp[0].node), &(yyloc));
8204 /*% %*/
8205 /*% ripper: $2 %*/
8206 }
8207#line 8203 "parse.c"
8208 break;
8209
8210 case 282:
8211#line 2584 "parse.y"
8212 {
8213 (yyval.node) = (yyvsp[0].node);
8214 }
8215#line 8211 "parse.c"
8216 break;
8217
8218 case 283:
8219#line 2588 "parse.y"
8220 {
8221 (yyval.node) = 0;
8222 }
8223#line 8219 "parse.c"
8224 break;
8225
8226 case 284:
8227#line 2594 "parse.y"
8228 {
8229 /*%%%*/
8230 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
8231 /*% %*/
8232 /*% ripper: args_add!(args_new!, $1) %*/
8233 }
8234#line 8230 "parse.c"
8235 break;
8236
8237 case 285:
8238#line 2601 "parse.y"
8239 {
8240 /*%%%*/
8241 (yyval.node) = NEW_SPLAT((yyvsp[0].node), &(yyloc));
8242 /*% %*/
8243 /*% ripper: args_add_star!(args_new!, $2) %*/
8244 }
8245#line 8241 "parse.c"
8246 break;
8247
8248 case 286:
8249#line 2608 "parse.y"
8250 {
8251 /*%%%*/
8252 (yyval.node) = last_arg_append(p, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
8253 /*% %*/
8254 /*% ripper: args_add!($1, $3) %*/
8255 }
8256#line 8252 "parse.c"
8257 break;
8258
8259 case 287:
8260#line 2615 "parse.y"
8261 {
8262 /*%%%*/
8263 (yyval.node) = rest_arg_append(p, (yyvsp[-3].node), (yyvsp[0].node), &(yyloc));
8264 /*% %*/
8265 /*% ripper: args_add_star!($1, $4) %*/
8266 }
8267#line 8263 "parse.c"
8268 break;
8269
8270 case 290:
8271#line 2628 "parse.y"
8272 {
8273 /*%%%*/
8274 (yyval.node) = last_arg_append(p, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
8275 /*% %*/
8276 /*% ripper: mrhs_add!(mrhs_new_from_args!($1), $3) %*/
8277 }
8278#line 8274 "parse.c"
8279 break;
8280
8281 case 291:
8282#line 2635 "parse.y"
8283 {
8284 /*%%%*/
8285 (yyval.node) = rest_arg_append(p, (yyvsp[-3].node), (yyvsp[0].node), &(yyloc));
8286 /*% %*/
8287 /*% ripper: mrhs_add_star!(mrhs_new_from_args!($1), $4) %*/
8288 }
8289#line 8285 "parse.c"
8290 break;
8291
8292 case 292:
8293#line 2642 "parse.y"
8294 {
8295 /*%%%*/
8296 (yyval.node) = NEW_SPLAT((yyvsp[0].node), &(yyloc));
8297 /*% %*/
8298 /*% ripper: mrhs_add_star!(mrhs_new!, $2) %*/
8299 }
8300#line 8296 "parse.c"
8301 break;
8302
8303 case 303:
8304#line 2661 "parse.y"
8305 {
8306 /*%%%*/
8307 (yyval.node) = NEW_FCALL((yyvsp[0].id), 0, &(yyloc));
8308 /*% %*/
8309 /*% ripper: method_add_arg!(fcall!($1), args_new!) %*/
8310 }
8311#line 8307 "parse.c"
8312 break;
8313
8314 case 304:
8315#line 2668 "parse.y"
8316 {
8317 CMDARG_PUSH(0);
8318 }
8319#line 8315 "parse.c"
8320 break;
8321
8322 case 305:
8323#line 2673 "parse.y"
8324 {
8325 CMDARG_POP();
8326 /*%%%*/
8327 set_line_body((yyvsp[-1].node), (yylsp[-3]).end_pos.lineno);
8328 (yyval.node) = NEW_BEGIN((yyvsp[-1].node), &(yyloc));
8329 nd_set_line((yyval.node), (yylsp[-3]).end_pos.lineno);
8330 /*% %*/
8331 /*% ripper: begin!($3) %*/
8332 }
8333#line 8329 "parse.c"
8334 break;
8335
8336 case 306:
8337#line 2682 "parse.y"
8338 {SET_LEX_STATE(EXPR_ENDARG);}
8339#line 8335 "parse.c"
8340 break;
8341
8342 case 307:
8343#line 2683 "parse.y"
8344 {
8345 /*%%%*/
8346 (yyval.node) = NEW_BEGIN(0, &(yyloc));
8347 /*% %*/
8348 /*% ripper: paren!(0) %*/
8349 }
8350#line 8346 "parse.c"
8351 break;
8352
8353 case 308:
8354#line 2689 "parse.y"
8355 {SET_LEX_STATE(EXPR_ENDARG);}
8356#line 8352 "parse.c"
8357 break;
8358
8359 case 309:
8360#line 2690 "parse.y"
8361 {
8362 /*%%%*/
8363 if (nd_type((yyvsp[-2].node)) == NODE_SELF) (yyvsp[-2].node)->nd_state = 0;
8364 (yyval.node) = (yyvsp[-2].node);
8365 /*% %*/
8366 /*% ripper: paren!($2) %*/
8367 }
8368#line 8364 "parse.c"
8369 break;
8370
8371 case 310:
8372#line 2698 "parse.y"
8373 {
8374 /*%%%*/
8375 if (nd_type((yyvsp[-1].node)) == NODE_SELF) (yyvsp[-1].node)->nd_state = 0;
8376 (yyval.node) = (yyvsp[-1].node);
8377 /*% %*/
8378 /*% ripper: paren!($2) %*/
8379 }
8380#line 8376 "parse.c"
8381 break;
8382
8383 case 311:
8384#line 2706 "parse.y"
8385 {
8386 /*%%%*/
8387 (yyval.node) = NEW_COLON2((yyvsp[-2].node), (yyvsp[0].id), &(yyloc));
8388 /*% %*/
8389 /*% ripper: const_path_ref!($1, $3) %*/
8390 }
8391#line 8387 "parse.c"
8392 break;
8393
8394 case 312:
8395#line 2713 "parse.y"
8396 {
8397 /*%%%*/
8398 (yyval.node) = NEW_COLON3((yyvsp[0].id), &(yyloc));
8399 /*% %*/
8400 /*% ripper: top_const_ref!($2) %*/
8401 }
8402#line 8398 "parse.c"
8403 break;
8404
8405 case 313:
8406#line 2720 "parse.y"
8407 {
8408 /*%%%*/
8409 (yyval.node) = make_list((yyvsp[-1].node), &(yyloc));
8410 /*% %*/
8411 /*% ripper: array!(escape_Qundef($2)) %*/
8412 }
8413#line 8409 "parse.c"
8414 break;
8415
8416 case 314:
8417#line 2727 "parse.y"
8418 {
8419 /*%%%*/
8420 (yyval.node) = new_hash(p, (yyvsp[-1].node), &(yyloc));
8421 (yyval.node)->nd_brace = TRUE;
8422 /*% %*/
8423 /*% ripper: hash!(escape_Qundef($2)) %*/
8424 }
8425#line 8421 "parse.c"
8426 break;
8427
8428 case 315:
8429#line 2735 "parse.y"
8430 {
8431 /*%%%*/
8432 (yyval.node) = NEW_RETURN(0, &(yyloc));
8433 /*% %*/
8434 /*% ripper: return0! %*/
8435 }
8436#line 8432 "parse.c"
8437 break;
8438
8439 case 316:
8440#line 2742 "parse.y"
8441 {
8442 /*%%%*/
8443 (yyval.node) = new_yield(p, (yyvsp[-1].node), &(yyloc));
8444 /*% %*/
8445 /*% ripper: yield!(paren!($3)) %*/
8446 }
8447#line 8443 "parse.c"
8448 break;
8449
8450 case 317:
8451#line 2749 "parse.y"
8452 {
8453 /*%%%*/
8454 (yyval.node) = NEW_YIELD(0, &(yyloc));
8455 /*% %*/
8456 /*% ripper: yield!(paren!(args_new!)) %*/
8457 }
8458#line 8454 "parse.c"
8459 break;
8460
8461 case 318:
8462#line 2756 "parse.y"
8463 {
8464 /*%%%*/
8465 (yyval.node) = NEW_YIELD(0, &(yyloc));
8466 /*% %*/
8467 /*% ripper: yield0! %*/
8468 }
8469#line 8465 "parse.c"
8470 break;
8471
8472 case 319:
8473#line 2762 "parse.y"
8474 {p->in_defined = 1;}
8475#line 8471 "parse.c"
8476 break;
8477
8478 case 320:
8479#line 2763 "parse.y"
8480 {
8481 p->in_defined = 0;
8482 (yyval.node) = new_defined(p, (yyvsp[-1].node), &(yyloc));
8483 }
8484#line 8480 "parse.c"
8485 break;
8486
8487 case 321:
8488#line 2768 "parse.y"
8489 {
8490 (yyval.node) = call_uni_op(p, method_cond(p, (yyvsp[-1].node), &(yylsp[-1])), METHOD_NOT, &(yylsp[-3]), &(yyloc));
8491 }
8492#line 8488 "parse.c"
8493 break;
8494
8495 case 322:
8496#line 2772 "parse.y"
8497 {
8498 (yyval.node) = call_uni_op(p, method_cond(p, new_nil(&(yylsp[-1])), &(yylsp[-1])), METHOD_NOT, &(yylsp[-2]), &(yyloc));
8499 }
8500#line 8496 "parse.c"
8501 break;
8502
8503 case 323:
8504#line 2776 "parse.y"
8505 {
8506 /*%%%*/
8507 (yyval.node) = method_add_block(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
8508 /*% %*/
8509 /*% ripper: method_add_block!(method_add_arg!(fcall!($1), args_new!), $2) %*/
8510 }
8511#line 8507 "parse.c"
8512 break;
8513
8514 case 325:
8515#line 2784 "parse.y"
8516 {
8517 /*%%%*/
8518 block_dup_check(p, (yyvsp[-1].node)->nd_args, (yyvsp[0].node));
8519 (yyval.node) = method_add_block(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
8520 /*% %*/
8521 /*% ripper: method_add_block!($1, $2) %*/
8522 }
8523#line 8519 "parse.c"
8524 break;
8525
8526 case 326:
8527#line 2792 "parse.y"
8528 {
8529 token_info_push(p, "->", &(yylsp[0]));
8530 }
8531#line 8527 "parse.c"
8532 break;
8533
8534 case 327:
8535#line 2796 "parse.y"
8536 {
8537 (yyval.node) = (yyvsp[0].node);
8538 /*%%%*/
8539 nd_set_first_loc((yyval.node), (yylsp[-2]).beg_pos);
8540 /*% %*/
8541 }
8542#line 8538 "parse.c"
8543 break;
8544
8545 case 328:
8546#line 2806 "parse.y"
8547 {
8548 /*%%%*/
8549 (yyval.node) = new_if(p, (yyvsp[-4].node), (yyvsp[-2].node), (yyvsp[-1].node), &(yyloc));
8550 fixpos((yyval.node), (yyvsp[-4].node));
8551 /*% %*/
8552 /*% ripper: if!($2, $4, escape_Qundef($5)) %*/
8553 }
8554#line 8550 "parse.c"
8555 break;
8556
8557 case 329:
8558#line 2817 "parse.y"
8559 {
8560 /*%%%*/
8561 (yyval.node) = new_unless(p, (yyvsp[-4].node), (yyvsp[-2].node), (yyvsp[-1].node), &(yyloc));
8562 fixpos((yyval.node), (yyvsp[-4].node));
8563 /*% %*/
8564 /*% ripper: unless!($2, $4, escape_Qundef($5)) %*/
8565 }
8566#line 8562 "parse.c"
8567 break;
8568
8569 case 330:
8570#line 2827 "parse.y"
8571 {
8572 /*%%%*/
8573 (yyval.node) = NEW_WHILE(cond(p, (yyvsp[-2].node), &(yylsp[-2])), (yyvsp[-1].node), 1, &(yyloc));
8574 fixpos((yyval.node), (yyvsp[-2].node));
8575 /*% %*/
8576 /*% ripper: while!($2, $3) %*/
8577 }
8578#line 8574 "parse.c"
8579 break;
8580
8581 case 331:
8582#line 2837 "parse.y"
8583 {
8584 /*%%%*/
8585 (yyval.node) = NEW_UNTIL(cond(p, (yyvsp[-2].node), &(yylsp[-2])), (yyvsp[-1].node), 1, &(yyloc));
8586 fixpos((yyval.node), (yyvsp[-2].node));
8587 /*% %*/
8588 /*% ripper: until!($2, $3) %*/
8589 }
8590#line 8586 "parse.c"
8591 break;
8592
8593 case 332:
8594#line 2845 "parse.y"
8595 {
8596 (yyval.val) = p->case_labels;
8597 p->case_labels = Qnil;
8598 }
8599#line 8595 "parse.c"
8600 break;
8601
8602 case 333:
8603#line 2851 "parse.y"
8604 {
8606 p->case_labels = (yyvsp[-2].val);
8607 /*%%%*/
8608 (yyval.node) = NEW_CASE((yyvsp[-4].node), (yyvsp[-1].node), &(yyloc));
8609 fixpos((yyval.node), (yyvsp[-4].node));
8610 /*% %*/
8611 /*% ripper: case!($2, $5) %*/
8612 }
8613#line 8609 "parse.c"
8614 break;
8615
8616 case 334:
8617#line 2861 "parse.y"
8618 {
8619 (yyval.val) = p->case_labels;
8620 p->case_labels = 0;
8621 }
8622#line 8618 "parse.c"
8623 break;
8624
8625 case 335:
8626#line 2867 "parse.y"
8627 {
8629 p->case_labels = (yyvsp[-2].val);
8630 /*%%%*/
8631 (yyval.node) = NEW_CASE2((yyvsp[-1].node), &(yyloc));
8632 /*% %*/
8633 /*% ripper: case!(Qnil, $4) %*/
8634 }
8635#line 8631 "parse.c"
8636 break;
8637
8638 case 336:
8639#line 2878 "parse.y"
8640 {
8641 /*%%%*/
8642 (yyval.node) = new_case3(p, (yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
8643 /*% %*/
8644 /*% ripper: case!($2, $4) %*/
8645 }
8646#line 8642 "parse.c"
8647 break;
8648
8649 case 337:
8650#line 2887 "parse.y"
8651 {
8652 /*%%%*/
8653 /*
8654 * for a, b, c in e
8655 * #=>
8656 * e.each{|*x| a, b, c = x}
8657 *
8658 * for a in e
8659 * #=>
8660 * e.each{|x| a, = x}
8661 */
8662 ID id = internal_id(p);
8663 NODE *m = NEW_ARGS_AUX(0, 0, &NULL_LOC);
8664 NODE *args, *scope, *internal_var = NEW_DVAR(id, &(yylsp[-4]));
8665 ID *tbl = ALLOC_N(ID, 3);
8666 tbl[0] = 1 /* length of local var table */; tbl[1] = id /* internal id */;
8667 rb_ast_add_local_table(p->ast, tbl);
8668
8669 switch (nd_type((yyvsp[-4].node))) {
8670 case NODE_LASGN:
8671 case NODE_DASGN:
8672 case NODE_DASGN_CURR: /* e.each {|internal_var| a = internal_var; ... } */
8673 (yyvsp[-4].node)->nd_value = internal_var;
8674 id = 0;
8675 m->nd_plen = 1;
8676 m->nd_next = (yyvsp[-4].node);
8677 break;
8678 case NODE_MASGN: /* e.each {|*internal_var| a, b, c = (internal_var.length == 1 && Array === (tmp = internal_var[0]) ? tmp : internal_var); ... } */
8679 m->nd_next = node_assign(p, (yyvsp[-4].node), NEW_FOR_MASGN(internal_var, &(yylsp[-4])), &(yylsp[-4]));
8680 break;
8681 default: /* e.each {|*internal_var| @a, B, c[1], d.attr = internal_val; ... } */
8682 m->nd_next = node_assign(p, NEW_MASGN(NEW_LIST((yyvsp[-4].node), &(yylsp[-4])), 0, &(yylsp[-4])), internal_var, &(yylsp[-4]));
8683 }
8684 /* {|*internal_id| <m> = internal_id; ... } */
8685 args = new_args(p, m, 0, id, 0, new_args_tail(p, 0, 0, 0, &(yylsp[-4])), &(yylsp[-4]));
8686 scope = NEW_NODE(NODE_SCOPE, tbl, (yyvsp[-1].node), args, &(yyloc));
8687 (yyval.node) = NEW_FOR((yyvsp[-2].node), scope, &(yyloc));
8688 fixpos((yyval.node), (yyvsp[-4].node));
8689 /*% %*/
8690 /*% ripper: for!($2, $4, $5) %*/
8691 }
8692#line 8688 "parse.c"
8693 break;
8694
8695 case 338:
8696#line 2929 "parse.y"
8697 {
8698 if (p->in_def) {
8699 YYLTYPE loc = code_loc_gen(&(yylsp[-2]), &(yylsp[-1]));
8700 yyerror1(&loc, "class definition in method body");
8701 }
8702 (yyvsp[-2].num) = p->in_class;
8703 p->in_class = 1;
8704 local_push(p, 0);
8705 }
8706#line 8702 "parse.c"
8707 break;
8708
8709 case 339:
8710#line 2940 "parse.y"
8711 {
8712 /*%%%*/
8713 (yyval.node) = NEW_CLASS((yyvsp[-4].node), (yyvsp[-1].node), (yyvsp[-3].node), &(yyloc));
8714 nd_set_line((yyval.node)->nd_body, (yylsp[0]).end_pos.lineno);
8715 set_line_body((yyvsp[-1].node), (yylsp[-3]).end_pos.lineno);
8716 nd_set_line((yyval.node), (yylsp[-3]).end_pos.lineno);
8717 /*% %*/
8718 /*% ripper: class!($2, $3, $5) %*/
8719 local_pop(p);
8720 p->in_class = (yyvsp[-5].num) & 1;
8721 }
8722#line 8718 "parse.c"
8723 break;
8724
8725 case 340:
8726#line 2952 "parse.y"
8727 {
8728 (yyval.num) = (p->in_class << 1) | p->in_def;
8729 p->in_def = 0;
8730 p->in_class = 0;
8731 local_push(p, 0);
8732 }
8733#line 8729 "parse.c"
8734 break;
8735
8736 case 341:
8737#line 2961 "parse.y"
8738 {
8739 /*%%%*/
8740 (yyval.node) = NEW_SCLASS((yyvsp[-4].node), (yyvsp[-1].node), &(yyloc));
8741 nd_set_line((yyval.node)->nd_body, (yylsp[0]).end_pos.lineno);
8742 set_line_body((yyvsp[-1].node), nd_line((yyvsp[-4].node)));
8743 fixpos((yyval.node), (yyvsp[-4].node));
8744 /*% %*/
8745 /*% ripper: sclass!($3, $6) %*/
8746 local_pop(p);
8747 p->in_def = (yyvsp[-3].num) & 1;
8748 p->in_class = ((yyvsp[-3].num) >> 1) & 1;
8749 }
8750#line 8746 "parse.c"
8751 break;
8752
8753 case 342:
8754#line 2974 "parse.y"
8755 {
8756 if (p->in_def) {
8757 YYLTYPE loc = code_loc_gen(&(yylsp[-1]), &(yylsp[0]));
8758 yyerror1(&loc, "module definition in method body");
8759 }
8760 (yyvsp[-1].num) = p->in_class;
8761 p->in_class = 1;
8762 local_push(p, 0);
8763 }
8764#line 8760 "parse.c"
8765 break;
8766
8767 case 343:
8768#line 2985 "parse.y"
8769 {
8770 /*%%%*/
8771 (yyval.node) = NEW_MODULE((yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
8772 nd_set_line((yyval.node)->nd_body, (yylsp[0]).end_pos.lineno);
8773 set_line_body((yyvsp[-1].node), (yylsp[-3]).end_pos.lineno);
8774 nd_set_line((yyval.node), (yylsp[-3]).end_pos.lineno);
8775 /*% %*/
8776 /*% ripper: module!($2, $4) %*/
8777 local_pop(p);
8778 p->in_class = (yyvsp[-4].num) & 1;
8779 }
8780#line 8776 "parse.c"
8781 break;
8782
8783 case 344:
8784#line 2997 "parse.y"
8785 {
8786 numparam_name(p, get_id((yyvsp[0].id)));
8787 local_push(p, 0);
8788 (yyval.id) = p->cur_arg;
8789 p->cur_arg = 0;
8790 }
8791#line 8787 "parse.c"
8792 break;
8793
8794 case 345:
8795#line 3003 "parse.y"
8796 {
8797 (yyval.num) = p->in_def;
8798 p->in_def = 1;
8799 }
8800#line 8796 "parse.c"
8801 break;
8802
8803 case 346:
8804#line 3010 "parse.y"
8805 {
8806 /*%%%*/
8807 NODE *body = remove_begin((yyvsp[-1].node));
8808 reduce_nodes(p, &body);
8809 (yyval.node) = NEW_DEFN((yyvsp[-5].id), (yyvsp[-2].node), body, &(yyloc));
8810 nd_set_line((yyval.node)->nd_defn, (yylsp[0]).end_pos.lineno);
8811 set_line_body(body, (yylsp[-6]).beg_pos.lineno);
8812 /*% %*/
8813 /*% ripper: def!($2, $5, $6) %*/
8814 local_pop(p);
8815 p->in_def = (yyvsp[-3].num) & 1;
8816 p->cur_arg = (yyvsp[-4].id);
8817 }
8818#line 8814 "parse.c"
8819 break;
8820
8821 case 347:
8822#line 3023 "parse.y"
8823 {SET_LEX_STATE(EXPR_FNAME);}
8824#line 8820 "parse.c"
8825 break;
8826
8827 case 348:
8828#line 3024 "parse.y"
8829 {
8830 numparam_name(p, get_id((yyvsp[0].id)));
8831 (yyvsp[-1].num) = p->in_def;
8832 p->in_def = 1;
8833 SET_LEX_STATE(EXPR_ENDFN|EXPR_LABEL); /* force for args */
8834 local_push(p, 0);
8835 (yyval.id) = p->cur_arg;
8836 p->cur_arg = 0;
8837 }
8838#line 8834 "parse.c"
8839 break;
8840
8841 case 349:
8842#line 3036 "parse.y"
8843 {
8844 /*%%%*/
8845 NODE *body = remove_begin((yyvsp[-1].node));
8846 reduce_nodes(p, &body);
8847 (yyval.node) = NEW_DEFS((yyvsp[-7].node), (yyvsp[-4].id), (yyvsp[-2].node), body, &(yyloc));
8848 nd_set_line((yyval.node)->nd_defn, (yylsp[0]).end_pos.lineno);
8849 set_line_body(body, (yylsp[-8]).beg_pos.lineno);
8850 /*% %*/
8851 /*% ripper: defs!($2, $3, $5, $7, $8) %*/
8852 local_pop(p);
8853 p->in_def = (yyvsp[-5].num) & 1;
8854 p->cur_arg = (yyvsp[-3].id);
8855 }
8856#line 8852 "parse.c"
8857 break;
8858
8859 case 350:
8860#line 3050 "parse.y"
8861 {
8862 /*%%%*/
8863 (yyval.node) = NEW_BREAK(0, &(yyloc));
8864 /*% %*/
8865 /*% ripper: break!(args_new!) %*/
8866 }
8867#line 8863 "parse.c"
8868 break;
8869
8870 case 351:
8871#line 3057 "parse.y"
8872 {
8873 /*%%%*/
8874 (yyval.node) = NEW_NEXT(0, &(yyloc));
8875 /*% %*/
8876 /*% ripper: next!(args_new!) %*/
8877 }
8878#line 8874 "parse.c"
8879 break;
8880
8881 case 352:
8882#line 3064 "parse.y"
8883 {
8884 /*%%%*/
8885 (yyval.node) = NEW_REDO(&(yyloc));
8886 /*% %*/
8887 /*% ripper: redo! %*/
8888 }
8889#line 8885 "parse.c"
8890 break;
8891
8892 case 353:
8893#line 3071 "parse.y"
8894 {
8895 /*%%%*/
8896 (yyval.node) = NEW_RETRY(&(yyloc));
8897 /*% %*/
8898 /*% ripper: retry! %*/
8899 }
8900#line 8896 "parse.c"
8901 break;
8902
8903 case 354:
8904#line 3080 "parse.y"
8905 {
8906 value_expr((yyvsp[0].node));
8907 (yyval.node) = (yyvsp[0].node);
8908 }
8909#line 8905 "parse.c"
8910 break;
8911
8912 case 355:
8913#line 3087 "parse.y"
8914 {
8915 token_info_push(p, "begin", &(yyloc));
8916 }
8917#line 8913 "parse.c"
8918 break;
8919
8920 case 356:
8921#line 3093 "parse.y"
8922 {
8923 WARN_EOL("if");
8924 token_info_push(p, "if", &(yyloc));
8925 if (p->token_info && p->token_info->nonspc &&
8926 p->token_info->next && !strcmp(p->token_info->next->token, "else")) {
8927 const char *tok = p->lex.ptok;
8928 const char *beg = p->lex.pbeg + p->token_info->next->beg.column;
8929 beg += rb_strlen_lit("else");
8930 while (beg < tok && ISSPACE(*beg)) beg++;
8931 if (beg == tok) {
8932 p->token_info->nonspc = 0;
8933 }
8934 }
8935 }
8936#line 8932 "parse.c"
8937 break;
8938
8939 case 357:
8940#line 3110 "parse.y"
8941 {
8942 token_info_push(p, "unless", &(yyloc));
8943 }
8944#line 8940 "parse.c"
8945 break;
8946
8947 case 358:
8948#line 3116 "parse.y"
8949 {
8950 token_info_push(p, "while", &(yyloc));
8951 }
8952#line 8948 "parse.c"
8953 break;
8954
8955 case 359:
8956#line 3122 "parse.y"
8957 {
8958 token_info_push(p, "until", &(yyloc));
8959 }
8960#line 8956 "parse.c"
8961 break;
8962
8963 case 360:
8964#line 3128 "parse.y"
8965 {
8966 token_info_push(p, "case", &(yyloc));
8967 }
8968#line 8964 "parse.c"
8969 break;
8970
8971 case 361:
8972#line 3134 "parse.y"
8973 {
8974 token_info_push(p, "for", &(yyloc));
8975 }
8976#line 8972 "parse.c"
8977 break;
8978
8979 case 362:
8980#line 3140 "parse.y"
8981 {
8982 token_info_push(p, "class", &(yyloc));
8983 }
8984#line 8980 "parse.c"
8985 break;
8986
8987 case 363:
8988#line 3146 "parse.y"
8989 {
8990 token_info_push(p, "module", &(yyloc));
8991 }
8992#line 8988 "parse.c"
8993 break;
8994
8995 case 364:
8996#line 3152 "parse.y"
8997 {
8998 token_info_push(p, "def", &(yyloc));
8999 }
9000#line 8996 "parse.c"
9001 break;
9002
9003 case 365:
9004#line 3158 "parse.y"
9005 {
9006 token_info_push(p, "do", &(yyloc));
9007 }
9008#line 9004 "parse.c"
9009 break;
9010
9011 case 366:
9012#line 3164 "parse.y"
9013 {
9014 token_info_push(p, "do", &(yyloc));
9015 }
9016#line 9012 "parse.c"
9017 break;
9018
9019 case 367:
9020#line 3170 "parse.y"
9021 {
9022 token_info_warn(p, "rescue", p->token_info, 1, &(yyloc));
9023 }
9024#line 9020 "parse.c"
9025 break;
9026
9027 case 368:
9028#line 3176 "parse.y"
9029 {
9030 token_info_warn(p, "ensure", p->token_info, 1, &(yyloc));
9031 }
9032#line 9028 "parse.c"
9033 break;
9034
9035 case 369:
9036#line 3182 "parse.y"
9037 {
9038 token_info_warn(p, "when", p->token_info, 0, &(yyloc));
9039 }
9040#line 9036 "parse.c"
9041 break;
9042
9043 case 370:
9044#line 3188 "parse.y"
9045 {
9046 token_info *ptinfo_beg = p->token_info;
9047 int same = ptinfo_beg && strcmp(ptinfo_beg->token, "case") != 0;
9048 token_info_warn(p, "else", p->token_info, same, &(yyloc));
9049 if (same) {
9050 token_info e;
9051 e.next = ptinfo_beg->next;
9052 e.token = "else";
9053 token_info_setup(&e, p->lex.pbeg, &(yyloc));
9054 if (!e.nonspc) *ptinfo_beg = e;
9055 }
9056 }
9057#line 9053 "parse.c"
9058 break;
9059
9060 case 371:
9061#line 3203 "parse.y"
9062 {
9063 WARN_EOL("elsif");
9064 token_info_warn(p, "elsif", p->token_info, 1, &(yyloc));
9065 }
9066#line 9062 "parse.c"
9067 break;
9068
9069 case 372:
9070#line 3210 "parse.y"
9071 {
9072 token_info_pop(p, "end", &(yyloc));
9073 }
9074#line 9070 "parse.c"
9075 break;
9076
9077 case 373:
9078#line 3216 "parse.y"
9079 {
9080 if (p->in_class && !p->in_def && !dyna_in_block(p))
9081 yyerror1(&(yylsp[0]), "Invalid return in class/module body");
9082 }
9083#line 9079 "parse.c"
9084 break;
9085
9086 case 380:
9087#line 3235 "parse.y"
9088 {
9089 /*%%%*/
9090 (yyval.node) = new_if(p, (yyvsp[-3].node), (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
9091 fixpos((yyval.node), (yyvsp[-3].node));
9092 /*% %*/
9093 /*% ripper: elsif!($2, $4, escape_Qundef($5)) %*/
9094 }
9095#line 9091 "parse.c"
9096 break;
9097
9098 case 382:
9099#line 3246 "parse.y"
9100 {
9101 /*%%%*/
9102 (yyval.node) = (yyvsp[0].node);
9103 /*% %*/
9104 /*% ripper: else!($2) %*/
9105 }
9106#line 9102 "parse.c"
9107 break;
9108
9109 case 385:
9110#line 3259 "parse.y"
9111 {
9112 /*%%%*/
9113 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
9114 mark_lvar_used(p, (yyval.node));
9115 /*% %*/
9116 /*% ripper: assignable(p, $1) %*/
9117 }
9118#line 9114 "parse.c"
9119 break;
9120
9121 case 386:
9122#line 3267 "parse.y"
9123 {
9124 /*%%%*/
9125 (yyval.node) = (yyvsp[-1].node);
9126 /*% %*/
9127 /*% ripper: mlhs_paren!($2) %*/
9128 }
9129#line 9125 "parse.c"
9130 break;
9131
9132 case 387:
9133#line 3276 "parse.y"
9134 {
9135 /*%%%*/
9136 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
9137 /*% %*/
9138 /*% ripper: mlhs_add!(mlhs_new!, $1) %*/
9139 }
9140#line 9136 "parse.c"
9141 break;
9142
9143 case 388:
9144#line 3283 "parse.y"
9145 {
9146 /*%%%*/
9147 (yyval.node) = list_append(p, (yyvsp[-2].node), (yyvsp[0].node));
9148 /*% %*/
9149 /*% ripper: mlhs_add!($1, $3) %*/
9150 }
9151#line 9147 "parse.c"
9152 break;
9153
9154 case 389:
9155#line 3292 "parse.y"
9156 {
9157 /*%%%*/
9158 (yyval.node) = NEW_MASGN((yyvsp[0].node), 0, &(yyloc));
9159 /*% %*/
9160 /*% ripper: $1 %*/
9161 }
9162#line 9158 "parse.c"
9163 break;
9164
9165 case 390:
9166#line 3299 "parse.y"
9167 {
9168 /*%%%*/
9169 (yyval.node) = NEW_MASGN((yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
9170 /*% %*/
9171 /*% ripper: mlhs_add_star!($1, $3) %*/
9172 }
9173#line 9169 "parse.c"
9174 break;
9175
9176 case 391:
9177#line 3306 "parse.y"
9178 {
9179 /*%%%*/
9180 (yyval.node) = NEW_MASGN((yyvsp[-4].node), NEW_POSTARG((yyvsp[-2].node), (yyvsp[0].node), &(yyloc)), &(yyloc));
9181 /*% %*/
9182 /*% ripper: mlhs_add_post!(mlhs_add_star!($1, $3), $5) %*/
9183 }
9184#line 9180 "parse.c"
9185 break;
9186
9187 case 392:
9188#line 3313 "parse.y"
9189 {
9190 /*%%%*/
9191 (yyval.node) = NEW_MASGN(0, (yyvsp[0].node), &(yyloc));
9192 /*% %*/
9193 /*% ripper: mlhs_add_star!(mlhs_new!, $1) %*/
9194 }
9195#line 9191 "parse.c"
9196 break;
9197
9198 case 393:
9199#line 3320 "parse.y"
9200 {
9201 /*%%%*/
9202 (yyval.node) = NEW_MASGN(0, NEW_POSTARG((yyvsp[-2].node), (yyvsp[0].node), &(yyloc)), &(yyloc));
9203 /*% %*/
9204 /*% ripper: mlhs_add_post!(mlhs_add_star!(mlhs_new!, $1), $3) %*/
9205 }
9206#line 9202 "parse.c"
9207 break;
9208
9209 case 394:
9210#line 3329 "parse.y"
9211 {
9212 /*%%%*/
9213 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
9214 mark_lvar_used(p, (yyval.node));
9215 /*% %*/
9216 /*% ripper: assignable(p, $2) %*/
9217 }
9218#line 9214 "parse.c"
9219 break;
9220
9221 case 395:
9222#line 3337 "parse.y"
9223 {
9224 /*%%%*/
9226 /*% %*/
9227 /*% ripper: Qnil %*/
9228 }
9229#line 9225 "parse.c"
9230 break;
9231
9232 case 396:
9233#line 3346 "parse.y"
9234 {
9235 (yyval.node) = new_args_tail(p, (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].id), &(yylsp[-1]));
9236 }
9237#line 9233 "parse.c"
9238 break;
9239
9240 case 397:
9241#line 3350 "parse.y"
9242 {
9243 (yyval.node) = new_args_tail(p, (yyvsp[-1].node), Qnone, (yyvsp[0].id), &(yylsp[-1]));
9244 }
9245#line 9241 "parse.c"
9246 break;
9247
9248 case 398:
9249#line 3354 "parse.y"
9250 {
9251 (yyval.node) = new_args_tail(p, Qnone, (yyvsp[-1].id), (yyvsp[0].id), &(yylsp[-1]));
9252 }
9253#line 9249 "parse.c"
9254 break;
9255
9256 case 399:
9257#line 3358 "parse.y"
9258 {
9259 (yyval.node) = new_args_tail(p, Qnone, ID2VAL(idNil), (yyvsp[0].id), &(yylsp[-1]));
9260 }
9261#line 9257 "parse.c"
9262 break;
9263
9264 case 400:
9265#line 3362 "parse.y"
9266 {
9267 (yyval.node) = new_args_tail(p, Qnone, Qnone, (yyvsp[0].id), &(yylsp[0]));
9268 }
9269#line 9265 "parse.c"
9270 break;
9271
9272 case 401:
9273#line 3368 "parse.y"
9274 {
9275 (yyval.node) = (yyvsp[0].node);
9276 }
9277#line 9273 "parse.c"
9278 break;
9279
9280 case 402:
9281#line 3372 "parse.y"
9282 {
9283 (yyval.node) = new_args_tail(p, Qnone, Qnone, Qnone, &(yylsp[0]));
9284 }
9285#line 9281 "parse.c"
9286 break;
9287
9288 case 403:
9289#line 3378 "parse.y"
9290 {
9291 (yyval.node) = new_args(p, (yyvsp[-5].node), (yyvsp[-3].node), (yyvsp[-1].id), Qnone, (yyvsp[0].node), &(yyloc));
9292 }
9293#line 9289 "parse.c"
9294 break;
9295
9296 case 404:
9297#line 3382 "parse.y"
9298 {
9299 (yyval.node) = new_args(p, (yyvsp[-7].node), (yyvsp[-5].node), (yyvsp[-3].id), (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
9300 }
9301#line 9297 "parse.c"
9302 break;
9303
9304 case 405:
9305#line 3386 "parse.y"
9306 {
9307 (yyval.node) = new_args(p, (yyvsp[-3].node), (yyvsp[-1].node), Qnone, Qnone, (yyvsp[0].node), &(yyloc));
9308 }
9309#line 9305 "parse.c"
9310 break;
9311
9312 case 406:
9313#line 3390 "parse.y"
9314 {
9315 (yyval.node) = new_args(p, (yyvsp[-5].node), (yyvsp[-3].node), Qnone, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
9316 }
9317#line 9313 "parse.c"
9318 break;
9319
9320 case 407:
9321#line 3394 "parse.y"
9322 {
9323 (yyval.node) = new_args(p, (yyvsp[-3].node), Qnone, (yyvsp[-1].id), Qnone, (yyvsp[0].node), &(yyloc));
9324 }
9325#line 9321 "parse.c"
9326 break;
9327
9328 case 408:
9329#line 3398 "parse.y"
9330 {
9331 /*%%%*/
9332 /* magic number for rest_id in iseq_set_arguments() */
9333 (yyval.node) = new_args(p, (yyvsp[-1].node), Qnone, NODE_SPECIAL_EXCESSIVE_COMMA, Qnone, new_args_tail(p, Qnone, Qnone, Qnone, &(yylsp[-1])), &(yyloc));
9334 /*% %*/
9335 /*% ripper: new_args(p, $1, Qnone, excessed_comma!, Qnone, new_args_tail(p, Qnone, Qnone, Qnone, NULL), NULL) %*/
9336 }
9337#line 9333 "parse.c"
9338 break;
9339
9340 case 409:
9341#line 3406 "parse.y"
9342 {
9343 (yyval.node) = new_args(p, (yyvsp[-5].node), Qnone, (yyvsp[-3].id), (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
9344 }
9345#line 9341 "parse.c"
9346 break;
9347
9348 case 410:
9349#line 3410 "parse.y"
9350 {
9351 (yyval.node) = new_args(p, (yyvsp[-1].node), Qnone, Qnone, Qnone, (yyvsp[0].node), &(yyloc));
9352 }
9353#line 9349 "parse.c"
9354 break;
9355
9356 case 411:
9357#line 3414 "parse.y"
9358 {
9359 (yyval.node) = new_args(p, Qnone, (yyvsp[-3].node), (yyvsp[-1].id), Qnone, (yyvsp[0].node), &(yyloc));
9360 }
9361#line 9357 "parse.c"
9362 break;
9363
9364 case 412:
9365#line 3418 "parse.y"
9366 {
9367 (yyval.node) = new_args(p, Qnone, (yyvsp[-5].node), (yyvsp[-3].id), (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
9368 }
9369#line 9365 "parse.c"
9370 break;
9371
9372 case 413:
9373#line 3422 "parse.y"
9374 {
9375 (yyval.node) = new_args(p, Qnone, (yyvsp[-1].node), Qnone, Qnone, (yyvsp[0].node), &(yyloc));
9376 }
9377#line 9373 "parse.c"
9378 break;
9379
9380 case 414:
9381#line 3426 "parse.y"
9382 {
9383 (yyval.node) = new_args(p, Qnone, (yyvsp[-3].node), Qnone, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
9384 }
9385#line 9381 "parse.c"
9386 break;
9387
9388 case 415:
9389#line 3430 "parse.y"
9390 {
9391 (yyval.node) = new_args(p, Qnone, Qnone, (yyvsp[-1].id), Qnone, (yyvsp[0].node), &(yyloc));
9392 }
9393#line 9389 "parse.c"
9394 break;
9395
9396 case 416:
9397#line 3434 "parse.y"
9398 {
9399 (yyval.node) = new_args(p, Qnone, Qnone, (yyvsp[-3].id), (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
9400 }
9401#line 9397 "parse.c"
9402 break;
9403
9404 case 417:
9405#line 3438 "parse.y"
9406 {
9407 (yyval.node) = new_args(p, Qnone, Qnone, Qnone, Qnone, (yyvsp[0].node), &(yyloc));
9408 }
9409#line 9405 "parse.c"
9410 break;
9411
9412 case 419:
9413#line 3445 "parse.y"
9414 {
9415 p->command_start = TRUE;
9416 }
9417#line 9413 "parse.c"
9418 break;
9419
9420 case 420:
9421#line 3451 "parse.y"
9422 {
9423 p->cur_arg = 0;
9425 /*%%%*/
9426 (yyval.node) = 0;
9427 /*% %*/
9428 /*% ripper: block_var!(params!(Qnil,Qnil,Qnil,Qnil,Qnil,Qnil,Qnil), escape_Qundef($2)) %*/
9429 }
9430#line 9426 "parse.c"
9431 break;
9432
9433 case 421:
9434#line 3460 "parse.y"
9435 {
9436 p->cur_arg = 0;
9438 /*%%%*/
9439 (yyval.node) = (yyvsp[-2].node);
9440 /*% %*/
9441 /*% ripper: block_var!(escape_Qundef($2), escape_Qundef($3)) %*/
9442 }
9443#line 9439 "parse.c"
9444 break;
9445
9446 case 422:
9447#line 3472 "parse.y"
9448 {
9449 (yyval.node) = 0;
9450 }
9451#line 9447 "parse.c"
9452 break;
9453
9454 case 423:
9455#line 3476 "parse.y"
9456 {
9457 /*%%%*/
9458 (yyval.node) = 0;
9459 /*% %*/
9460 /*% ripper: $3 %*/
9461 }
9462#line 9458 "parse.c"
9463 break;
9464
9465 case 426:
9466#line 3491 "parse.y"
9467 {
9468 new_bv(p, get_id((yyvsp[0].id)));
9469 /*% ripper: get_value($1) %*/
9470 }
9471#line 9467 "parse.c"
9472 break;
9473
9474 case 427:
9475#line 3496 "parse.y"
9476 {
9477 (yyval.node) = 0;
9478 }
9479#line 9475 "parse.c"
9480 break;
9481
9482 case 428:
9483#line 3501 "parse.y"
9484 {
9485 (yyval.vars) = dyna_push(p);
9486 }
9487#line 9483 "parse.c"
9488 break;
9489
9490 case 429:
9491#line 3504 "parse.y"
9492 {
9493 (yyval.num) = p->lex.lpar_beg;
9494 p->lex.lpar_beg = p->lex.paren_nest;
9495 }
9496#line 9492 "parse.c"
9497 break;
9498
9499 case 430:
9500#line 3508 "parse.y"
9501 {
9502 (yyval.num) = p->max_numparam;
9503 p->max_numparam = 0;
9504 }
9505#line 9501 "parse.c"
9506 break;
9507
9508 case 431:
9509#line 3512 "parse.y"
9510 {
9511 (yyval.node) = numparam_push(p);
9512 }
9513#line 9509 "parse.c"
9514 break;
9515
9516 case 432:
9517#line 3516 "parse.y"
9518 {
9519 CMDARG_PUSH(0);
9520 }
9521#line 9517 "parse.c"
9522 break;
9523
9524 case 433:
9525#line 3520 "parse.y"
9526 {
9527 int max_numparam = p->max_numparam;
9528 p->lex.lpar_beg = (yyvsp[-5].num);
9529 p->max_numparam = (yyvsp[-4].num);
9530 CMDARG_POP();
9531 (yyvsp[-2].node) = args_with_numbered(p, (yyvsp[-2].node), max_numparam);
9532 /*%%%*/
9533 {
9534 YYLTYPE loc = code_loc_gen(&(yylsp[-2]), &(yylsp[0]));
9535 (yyval.node) = NEW_LAMBDA((yyvsp[-2].node), (yyvsp[0].node), &loc);
9536 nd_set_line((yyval.node)->nd_body, (yylsp[0]).end_pos.lineno);
9537 nd_set_line((yyval.node), (yylsp[-2]).end_pos.lineno);
9538 }
9539 /*% %*/
9540 /*% ripper: lambda!($5, $7) %*/
9541 numparam_pop(p, (yyvsp[-3].node));
9542 dyna_pop(p, (yyvsp[-6].vars));
9543 }
9544#line 9540 "parse.c"
9545 break;
9546
9547 case 434:
9548#line 3541 "parse.y"
9549 {
9550 /*%%%*/
9551 (yyval.node) = (yyvsp[-2].node);
9553 /*% %*/
9554 /*% ripper: paren!($2) %*/
9555 }
9556#line 9552 "parse.c"
9557 break;
9558
9559 case 435:
9560#line 3549 "parse.y"
9561 {
9562 /*%%%*/
9563 if (!args_info_empty_p((yyvsp[0].node)->nd_ainfo))
9565 /*% %*/
9566 (yyval.node) = (yyvsp[0].node);
9567 }
9568#line 9564 "parse.c"
9569 break;
9570
9571 case 436:
9572#line 3559 "parse.y"
9573 {
9574 token_info_pop(p, "}", &(yylsp[0]));
9575 (yyval.node) = (yyvsp[-1].node);
9576 }
9577#line 9573 "parse.c"
9578 break;
9579
9580 case 437:
9581#line 3564 "parse.y"
9582 {
9583 (yyval.node) = (yyvsp[-1].node);
9584 }
9585#line 9581 "parse.c"
9586 break;
9587
9588 case 438:
9589#line 3570 "parse.y"
9590 {
9591 (yyval.node) = (yyvsp[-1].node);
9592 /*%%%*/
9593 (yyval.node)->nd_body->nd_loc = code_loc_gen(&(yylsp[-2]), &(yylsp[0]));
9594 nd_set_line((yyval.node), (yylsp[-2]).end_pos.lineno);
9595 /*% %*/
9596 }
9597#line 9593 "parse.c"
9598 break;
9599
9600 case 439:
9601#line 3580 "parse.y"
9602 {
9603 /*%%%*/
9604 if (nd_type((yyvsp[-1].node)) == NODE_YIELD) {
9605 compile_error(p, "block given to yield");
9606 }
9607 else {
9608 block_dup_check(p, (yyvsp[-1].node)->nd_args, (yyvsp[0].node));
9609 }
9610 (yyval.node) = method_add_block(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
9611 fixpos((yyval.node), (yyvsp[-1].node));
9612 /*% %*/
9613 /*% ripper: method_add_block!($1, $2) %*/
9614 }
9615#line 9611 "parse.c"
9616 break;
9617
9618 case 440:
9619#line 3594 "parse.y"
9620 {
9621 /*%%%*/
9622 (yyval.node) = new_qcall(p, (yyvsp[-2].id), (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
9623 /*% %*/
9624 /*% ripper: opt_event(:method_add_arg!, call!($1, $2, $3), $4) %*/
9625 }
9626#line 9622 "parse.c"
9627 break;
9628
9629 case 441:
9630#line 3601 "parse.y"
9631 {
9632 /*%%%*/
9633 (yyval.node) = new_command_qcall(p, (yyvsp[-3].id), (yyvsp[-4].node), (yyvsp[-2].id), (yyvsp[-1].node), (yyvsp[0].node), &(yylsp[-2]), &(yyloc));
9634 /*% %*/
9635 /*% ripper: opt_event(:method_add_block!, command_call!($1, $2, $3, $4), $5) %*/
9636 }
9637#line 9633 "parse.c"
9638 break;
9639
9640 case 442:
9641#line 3608 "parse.y"
9642 {
9643 /*%%%*/
9644 (yyval.node) = new_command_qcall(p, (yyvsp[-3].id), (yyvsp[-4].node), (yyvsp[-2].id), (yyvsp[-1].node), (yyvsp[0].node), &(yylsp[-2]), &(yyloc));
9645 /*% %*/
9646 /*% ripper: method_add_block!(command_call!($1, $2, $3, $4), $5) %*/
9647 }
9648#line 9644 "parse.c"
9649 break;
9650
9651 case 443:
9652#line 3617 "parse.y"
9653 {
9654 /*%%%*/
9655 (yyval.node) = (yyvsp[-1].node);
9656 (yyval.node)->nd_args = (yyvsp[0].node);
9657 nd_set_last_loc((yyvsp[-1].node), (yylsp[0]).end_pos);
9658 /*% %*/
9659 /*% ripper: method_add_arg!(fcall!($1), $2) %*/
9660 }
9661#line 9657 "parse.c"
9662 break;
9663
9664 case 444:
9665#line 3626 "parse.y"
9666 {
9667 /*%%%*/
9668 (yyval.node) = new_qcall(p, (yyvsp[-2].id), (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
9669 nd_set_line((yyval.node), (yylsp[-1]).end_pos.lineno);
9670 /*% %*/
9671 /*% ripper: opt_event(:method_add_arg!, call!($1, $2, $3), $4) %*/
9672 }
9673#line 9669 "parse.c"
9674 break;
9675
9676 case 445:
9677#line 3634 "parse.y"
9678 {
9679 /*%%%*/
9680 (yyval.node) = new_qcall(p, ID2VAL(idCOLON2), (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
9681 nd_set_line((yyval.node), (yylsp[-1]).end_pos.lineno);
9682 /*% %*/
9683 /*% ripper: method_add_arg!(call!($1, ID2VAL(idCOLON2), $3), $4) %*/
9684 }
9685#line 9681 "parse.c"
9686 break;
9687
9688 case 446:
9689#line 3642 "parse.y"
9690 {
9691 /*%%%*/
9692 (yyval.node) = new_qcall(p, ID2VAL(idCOLON2), (yyvsp[-2].node), (yyvsp[0].id), Qnull, &(yylsp[0]), &(yyloc));
9693 /*% %*/
9694 /*% ripper: call!($1, ID2VAL(idCOLON2), $3) %*/
9695 }
9696#line 9692 "parse.c"
9697 break;
9698
9699 case 447:
9700#line 3649 "parse.y"
9701 {
9702 /*%%%*/
9703 (yyval.node) = new_qcall(p, (yyvsp[-1].id), (yyvsp[-2].node), ID2VAL(idCall), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
9704 nd_set_line((yyval.node), (yylsp[-1]).end_pos.lineno);
9705 /*% %*/
9706 /*% ripper: method_add_arg!(call!($1, $2, ID2VAL(idCall)), $3) %*/
9707 }
9708#line 9704 "parse.c"
9709 break;
9710
9711 case 448:
9712#line 3657 "parse.y"
9713 {
9714 /*%%%*/
9715 (yyval.node) = new_qcall(p, ID2VAL(idCOLON2), (yyvsp[-2].node), ID2VAL(idCall), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
9716 nd_set_line((yyval.node), (yylsp[-1]).end_pos.lineno);
9717 /*% %*/
9718 /*% ripper: method_add_arg!(call!($1, ID2VAL(idCOLON2), ID2VAL(idCall)), $3) %*/
9719 }
9720#line 9716 "parse.c"
9721 break;
9722
9723 case 449:
9724#line 3665 "parse.y"
9725 {
9726 /*%%%*/
9727 (yyval.node) = NEW_SUPER((yyvsp[0].node), &(yyloc));
9728 /*% %*/
9729 /*% ripper: super!($2) %*/
9730 }
9731#line 9727 "parse.c"
9732 break;
9733
9734 case 450:
9735#line 3672 "parse.y"
9736 {
9737 /*%%%*/
9738 (yyval.node) = NEW_ZSUPER(&(yyloc));
9739 /*% %*/
9740 /*% ripper: zsuper! %*/
9741 }
9742#line 9738 "parse.c"
9743 break;
9744
9745 case 451:
9746#line 3679 "parse.y"
9747 {
9748 /*%%%*/
9749 if ((yyvsp[-3].node) && nd_type((yyvsp[-3].node)) == NODE_SELF)
9750 (yyval.node) = NEW_FCALL(tAREF, (yyvsp[-1].node), &(yyloc));
9751 else
9752 (yyval.node) = NEW_CALL((yyvsp[-3].node), tAREF, (yyvsp[-1].node), &(yyloc));
9753 fixpos((yyval.node), (yyvsp[-3].node));
9754 /*% %*/
9755 /*% ripper: aref!($1, escape_Qundef($3)) %*/
9756 }
9757#line 9753 "parse.c"
9758 break;
9759
9760 case 452:
9761#line 3692 "parse.y"
9762 {
9763 (yyval.node) = (yyvsp[-1].node);
9764 /*%%%*/
9765 (yyval.node)->nd_body->nd_loc = code_loc_gen(&(yylsp[-2]), &(yylsp[0]));
9766 nd_set_line((yyval.node), (yylsp[-2]).end_pos.lineno);
9767 /*% %*/
9768 }
9769#line 9765 "parse.c"
9770 break;
9771
9772 case 453:
9773#line 3700 "parse.y"
9774 {
9775 (yyval.node) = (yyvsp[-1].node);
9776 /*%%%*/
9777 (yyval.node)->nd_body->nd_loc = code_loc_gen(&(yylsp[-2]), &(yylsp[0]));
9778 nd_set_line((yyval.node), (yylsp[-2]).end_pos.lineno);
9779 /*% %*/
9780 }
9781#line 9777 "parse.c"
9782 break;
9783
9784 case 454:
9785#line 3709 "parse.y"
9786 {(yyval.vars) = dyna_push(p);}
9787#line 9783 "parse.c"
9788 break;
9789
9790 case 455:
9791#line 3710 "parse.y"
9792 {
9793 (yyval.num) = p->max_numparam;
9794 p->max_numparam = 0;
9795 }
9796#line 9792 "parse.c"
9797 break;
9798
9799 case 456:
9800#line 3714 "parse.y"
9801 {
9802 (yyval.node) = numparam_push(p);
9803 }
9804#line 9800 "parse.c"
9805 break;
9806
9807 case 457:
9808#line 3718 "parse.y"
9809 {
9810 int max_numparam = p->max_numparam;
9811 p->max_numparam = (yyvsp[-3].num);
9812 (yyvsp[-1].node) = args_with_numbered(p, (yyvsp[-1].node), max_numparam);
9813 /*%%%*/
9814 (yyval.node) = NEW_ITER((yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
9815 /*% %*/
9816 /*% ripper: brace_block!(escape_Qundef($4), $5) %*/
9817 numparam_pop(p, (yyvsp[-2].node));
9818 dyna_pop(p, (yyvsp[-4].vars));
9819 }
9820#line 9816 "parse.c"
9821 break;
9822
9823 case 458:
9824#line 3731 "parse.y"
9825 {(yyval.vars) = dyna_push(p);}
9826#line 9822 "parse.c"
9827 break;
9828
9829 case 459:
9830#line 3732 "parse.y"
9831 {
9832 (yyval.num) = p->max_numparam;
9833 p->max_numparam = 0;
9834 }
9835#line 9831 "parse.c"
9836 break;
9837
9838 case 460:
9839#line 3736 "parse.y"
9840 {
9841 (yyval.node) = numparam_push(p);
9842 CMDARG_PUSH(0);
9843 }
9844#line 9840 "parse.c"
9845 break;
9846
9847 case 461:
9848#line 3741 "parse.y"
9849 {
9850 int max_numparam = p->max_numparam;
9851 p->max_numparam = (yyvsp[-3].num);
9852 (yyvsp[-1].node) = args_with_numbered(p, (yyvsp[-1].node), max_numparam);
9853 /*%%%*/
9854 (yyval.node) = NEW_ITER((yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
9855 /*% %*/
9856 /*% ripper: do_block!(escape_Qundef($4), $5) %*/
9857 CMDARG_POP();
9858 numparam_pop(p, (yyvsp[-2].node));
9859 dyna_pop(p, (yyvsp[-4].vars));
9860 }
9861#line 9857 "parse.c"
9862 break;
9863
9864 case 462:
9865#line 3756 "parse.y"
9866 {
9867 /*%%%*/
9868 check_literal_when(p, (yyvsp[0].node), &(yylsp[0]));
9869 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
9870 /*% %*/
9871 /*% ripper: args_add!(args_new!, $1) %*/
9872 }
9873#line 9869 "parse.c"
9874 break;
9875
9876 case 463:
9877#line 3764 "parse.y"
9878 {
9879 /*%%%*/
9880 (yyval.node) = NEW_SPLAT((yyvsp[0].node), &(yyloc));
9881 /*% %*/
9882 /*% ripper: args_add_star!(args_new!, $2) %*/
9883 }
9884#line 9880 "parse.c"
9885 break;
9886
9887 case 464:
9888#line 3771 "parse.y"
9889 {
9890 /*%%%*/
9891 check_literal_when(p, (yyvsp[0].node), &(yylsp[0]));
9892 (yyval.node) = last_arg_append(p, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
9893 /*% %*/
9894 /*% ripper: args_add!($1, $3) %*/
9895 }
9896#line 9892 "parse.c"
9897 break;
9898
9899 case 465:
9900#line 3779 "parse.y"
9901 {
9902 /*%%%*/
9903 (yyval.node) = rest_arg_append(p, (yyvsp[-3].node), (yyvsp[0].node), &(yyloc));
9904 /*% %*/
9905 /*% ripper: args_add_star!($1, $4) %*/
9906 }
9907#line 9903 "parse.c"
9908 break;
9909
9910 case 466:
9911#line 3790 "parse.y"
9912 {
9913 /*%%%*/
9914 (yyval.node) = NEW_WHEN((yyvsp[-3].node), (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
9915 fixpos((yyval.node), (yyvsp[-3].node));
9916 /*% %*/
9917 /*% ripper: when!($2, $4, escape_Qundef($5)) %*/
9918 }
9919#line 9915 "parse.c"
9920 break;
9921
9922 case 469:
9923#line 3804 "parse.y"
9924 {
9925 SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
9926 p->command_start = FALSE;
9927 (yyval.num) = p->in_kwarg;
9928 p->in_kwarg = 1;
9929 }
9930#line 9926 "parse.c"
9931 break;
9932
9933 case 470:
9934#line 3810 "parse.y"
9935 {(yyval.tbl) = push_pvtbl(p);}
9936#line 9932 "parse.c"
9937 break;
9938
9939 case 471:
9940#line 3811 "parse.y"
9941 {(yyval.tbl) = push_pktbl(p);}
9942#line 9938 "parse.c"
9943 break;
9944
9945 case 472:
9946#line 3813 "parse.y"
9947 {pop_pktbl(p, (yyvsp[-2].tbl));}
9948#line 9944 "parse.c"
9949 break;
9950
9951 case 473:
9952#line 3814 "parse.y"
9953 {pop_pvtbl(p, (yyvsp[-4].tbl));}
9954#line 9950 "parse.c"
9955 break;
9956
9957 case 474:
9958#line 3815 "parse.y"
9959 {
9960 p->in_kwarg = !!(yyvsp[-6].num);
9961 }
9962#line 9958 "parse.c"
9963 break;
9964
9965 case 475:
9966#line 3820 "parse.y"
9967 {
9968 /*%%%*/
9969 (yyval.node) = NEW_IN((yyvsp[-6].node), (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
9970 /*% %*/
9971 /*% ripper: in!($5, $10, escape_Qundef($11)) %*/
9972 }
9973#line 9969 "parse.c"
9974 break;
9975
9976 case 479:
9977#line 3834 "parse.y"
9978 {
9979 /*%%%*/
9980 (yyval.node) = new_if(p, (yyvsp[0].node), remove_begin((yyvsp[-2].node)), 0, &(yyloc));
9981 fixpos((yyval.node), (yyvsp[0].node));
9982 /*% %*/
9983 /*% ripper: if_mod!($3, $1) %*/
9984 }
9985#line 9981 "parse.c"
9986 break;
9987
9988 case 480:
9989#line 3842 "parse.y"
9990 {
9991 /*%%%*/
9992 (yyval.node) = new_unless(p, (yyvsp[0].node), remove_begin((yyvsp[-2].node)), 0, &(yyloc));
9993 fixpos((yyval.node), (yyvsp[0].node));
9994 /*% %*/
9995 /*% ripper: unless_mod!($3, $1) %*/
9996 }
9997#line 9993 "parse.c"
9998 break;
9999
10000 case 482:
10001#line 3853 "parse.y"
10002 {
10003 (yyval.node) = new_array_pattern_tail(p, Qnone, 1, 0, Qnone, &(yyloc));
10004 (yyval.node) = new_array_pattern(p, Qnone, get_value((yyvsp[-1].node)), (yyval.node), &(yyloc));
10005 }
10006#line 10002 "parse.c"
10007 break;
10008
10009 case 483:
10010#line 3858 "parse.y"
10011 {
10012 (yyval.node) = new_array_pattern(p, Qnone, get_value((yyvsp[-2].node)), (yyvsp[0].node), &(yyloc));
10013 /*%%%*/
10014 nd_set_first_loc((yyval.node), (yylsp[-2]).beg_pos);
10015 /*%
10016 %*/
10017 }
10018#line 10014 "parse.c"
10019 break;
10020
10021 case 484:
10022#line 3866 "parse.y"
10023 {
10024 (yyval.node) = new_array_pattern(p, Qnone, Qnone, (yyvsp[0].node), &(yyloc));
10025 }
10026#line 10022 "parse.c"
10027 break;
10028
10029 case 485:
10030#line 3870 "parse.y"
10031 {
10032 (yyval.node) = new_hash_pattern(p, Qnone, (yyvsp[0].node), &(yyloc));
10033 }
10034#line 10030 "parse.c"
10035 break;
10036
10037 case 487:
10038#line 3879 "parse.y"
10039 {
10040 /*%%%*/
10041 NODE *n = NEW_LIST((yyvsp[-2].node), &(yyloc));
10042 n = list_append(p, n, (yyvsp[0].node));
10043 (yyval.node) = new_hash(p, n, &(yyloc));
10044 /*% %*/
10045 /*% ripper: binary!($1, STATIC_ID2SYM((id_assoc)), $3) %*/
10046 }
10047#line 10043 "parse.c"
10048 break;
10049
10050 case 489:
10051#line 3891 "parse.y"
10052 {
10053 /*%%%*/
10054 (yyval.node) = NEW_NODE(NODE_OR, (yyvsp[-2].node), (yyvsp[0].node), 0, &(yyloc));
10055 /*% %*/
10056 /*% ripper: binary!($1, STATIC_ID2SYM(idOr), $3) %*/
10057 }
10058#line 10054 "parse.c"
10059 break;
10060
10061 case 491:
10062#line 3900 "parse.y"
10063 {(yyval.tbl) = push_pktbl(p);}
10064#line 10060 "parse.c"
10065 break;
10066
10067 case 492:
10068#line 3901 "parse.y"
10069 {(yyval.tbl) = push_pktbl(p);}
10070#line 10066 "parse.c"
10071 break;
10072
10073 case 494:
10074#line 3905 "parse.y"
10075 {
10076 pop_pktbl(p, (yyvsp[-2].tbl));
10077 (yyval.node) = new_array_pattern(p, (yyvsp[-3].node), Qnone, (yyvsp[-1].node), &(yyloc));
10078 /*%%%*/
10079 nd_set_first_loc((yyval.node), (yylsp[-3]).beg_pos);
10080 /*%
10081 %*/
10082 }
10083#line 10079 "parse.c"
10084 break;
10085
10086 case 495:
10087#line 3914 "parse.y"
10088 {
10089 pop_pktbl(p, (yyvsp[-2].tbl));
10090 (yyval.node) = new_hash_pattern(p, (yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
10091 /*%%%*/
10092 nd_set_first_loc((yyval.node), (yylsp[-3]).beg_pos);
10093 /*%
10094 %*/
10095 }
10096#line 10092 "parse.c"
10097 break;
10098
10099 case 496:
10100#line 3923 "parse.y"
10101 {
10102 (yyval.node) = new_array_pattern_tail(p, Qnone, 0, 0, Qnone, &(yyloc));
10103 (yyval.node) = new_array_pattern(p, (yyvsp[-2].node), Qnone, (yyval.node), &(yyloc));
10104 }
10105#line 10101 "parse.c"
10106 break;
10107
10108 case 497:
10109#line 3928 "parse.y"
10110 {
10111 pop_pktbl(p, (yyvsp[-2].tbl));
10112 (yyval.node) = new_array_pattern(p, (yyvsp[-3].node), Qnone, (yyvsp[-1].node), &(yyloc));
10113 /*%%%*/
10114 nd_set_first_loc((yyval.node), (yylsp[-3]).beg_pos);
10115 /*%
10116 %*/
10117 }
10118#line 10114 "parse.c"
10119 break;
10120
10121 case 498:
10122#line 3937 "parse.y"
10123 {
10124 pop_pktbl(p, (yyvsp[-2].tbl));
10125 (yyval.node) = new_hash_pattern(p, (yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
10126 /*%%%*/
10127 nd_set_first_loc((yyval.node), (yylsp[-3]).beg_pos);
10128 /*%
10129 %*/
10130 }
10131#line 10127 "parse.c"
10132 break;
10133
10134 case 499:
10135#line 3946 "parse.y"
10136 {
10137 (yyval.node) = new_array_pattern_tail(p, Qnone, 0, 0, Qnone, &(yyloc));
10138 (yyval.node) = new_array_pattern(p, (yyvsp[-2].node), Qnone, (yyval.node), &(yyloc));
10139 }
10140#line 10136 "parse.c"
10141 break;
10142
10143 case 500:
10144#line 3950 "parse.y"
10145 {(yyval.tbl) = push_pktbl(p);}
10146#line 10142 "parse.c"
10147 break;
10148
10149 case 501:
10150#line 3951 "parse.y"
10151 {
10152 pop_pktbl(p, (yyvsp[-2].tbl));
10153 (yyval.node) = new_array_pattern(p, Qnone, Qnone, (yyvsp[-1].node), &(yyloc));
10154 }
10155#line 10151 "parse.c"
10156 break;
10157
10158 case 502:
10159#line 3956 "parse.y"
10160 {
10161 (yyval.node) = new_array_pattern_tail(p, Qnone, 0, 0, Qnone, &(yyloc));
10162 (yyval.node) = new_array_pattern(p, Qnone, Qnone, (yyval.node), &(yyloc));
10163 }
10164#line 10160 "parse.c"
10165 break;
10166
10167 case 503:
10168#line 3961 "parse.y"
10169 {
10170 (yyval.tbl) = push_pktbl(p);
10171 (yyvsp[0].num) = p->in_kwarg;
10172 p->in_kwarg = 0;
10173 }
10174#line 10170 "parse.c"
10175 break;
10176
10177 case 504:
10178#line 3967 "parse.y"
10179 {
10180 pop_pktbl(p, (yyvsp[-2].tbl));
10181 p->in_kwarg = (yyvsp[-3].num);
10182 (yyval.node) = new_hash_pattern(p, Qnone, (yyvsp[-1].node), &(yyloc));
10183 }
10184#line 10180 "parse.c"
10185 break;
10186
10187 case 505:
10188#line 3973 "parse.y"
10189 {
10190 (yyval.node) = new_hash_pattern_tail(p, Qnone, 0, &(yyloc));
10191 (yyval.node) = new_hash_pattern(p, Qnone, (yyval.node), &(yyloc));
10192 }
10193#line 10189 "parse.c"
10194 break;
10195
10196 case 506:
10197#line 3977 "parse.y"
10198 {(yyval.tbl) = push_pktbl(p);}
10199#line 10195 "parse.c"
10200 break;
10201
10202 case 507:
10203#line 3978 "parse.y"
10204 {
10205 pop_pktbl(p, (yyvsp[-2].tbl));
10206 (yyval.node) = (yyvsp[-1].node);
10207 }
10208#line 10204 "parse.c"
10209 break;
10210
10211 case 508:
10212#line 3985 "parse.y"
10213 {
10214 /*%%%*/
10215 NODE *pre_args = NEW_LIST((yyvsp[0].node), &(yyloc));
10216 (yyval.node) = new_array_pattern_tail(p, pre_args, 0, 0, Qnone, &(yyloc));
10217 /*%
10218 $$ = new_array_pattern_tail(p, rb_ary_new_from_args(1, get_value($1)), 0, 0, Qnone, &@$);
10219 %*/
10220 }
10221#line 10217 "parse.c"
10222 break;
10223
10224 case 509:
10225#line 3994 "parse.y"
10226 {
10227 (yyval.node) = new_array_pattern_tail(p, (yyvsp[0].node), 1, 0, Qnone, &(yyloc));
10228 }
10229#line 10225 "parse.c"
10230 break;
10231
10232 case 510:
10233#line 3998 "parse.y"
10234 {
10235 /*%%%*/
10236 (yyval.node) = new_array_pattern_tail(p, list_concat((yyvsp[-1].node), (yyvsp[0].node)), 0, 0, Qnone, &(yyloc));
10237 /*%
10238 VALUE pre_args = rb_ary_concat($1, get_value($2));
10239 $$ = new_array_pattern_tail(p, pre_args, 0, 0, Qnone, &@$);
10240 %*/
10241 }
10242#line 10238 "parse.c"
10243 break;
10244
10245 case 511:
10246#line 4007 "parse.y"
10247 {
10248 (yyval.node) = new_array_pattern_tail(p, (yyvsp[-2].node), 1, (yyvsp[0].id), Qnone, &(yyloc));
10249 }
10250#line 10246 "parse.c"
10251 break;
10252
10253 case 512:
10254#line 4011 "parse.y"
10255 {
10256 (yyval.node) = new_array_pattern_tail(p, (yyvsp[-4].node), 1, (yyvsp[-2].id), (yyvsp[0].node), &(yyloc));
10257 }
10258#line 10254 "parse.c"
10259 break;
10260
10261 case 513:
10262#line 4015 "parse.y"
10263 {
10264 (yyval.node) = new_array_pattern_tail(p, (yyvsp[-1].node), 1, 0, Qnone, &(yyloc));
10265 }
10266#line 10262 "parse.c"
10267 break;
10268
10269 case 514:
10270#line 4019 "parse.y"
10271 {
10272 (yyval.node) = new_array_pattern_tail(p, (yyvsp[-3].node), 1, 0, (yyvsp[0].node), &(yyloc));
10273 }
10274#line 10270 "parse.c"
10275 break;
10276
10277 case 516:
10278#line 4026 "parse.y"
10279 {
10280 (yyval.node) = (yyvsp[-1].node);
10281 }
10282#line 10278 "parse.c"
10283 break;
10284
10285 case 517:
10286#line 4030 "parse.y"
10287 {
10288 /*%%%*/
10289 (yyval.node) = list_concat((yyvsp[-2].node), (yyvsp[-1].node));
10290 /*% %*/
10291 /*% ripper: rb_ary_concat($1, get_value($2)) %*/
10292 }
10293#line 10289 "parse.c"
10294 break;
10295
10296 case 518:
10297#line 4039 "parse.y"
10298 {
10299 (yyval.node) = new_array_pattern_tail(p, Qnone, 1, (yyvsp[0].id), Qnone, &(yyloc));
10300 }
10301#line 10297 "parse.c"
10302 break;
10303
10304 case 519:
10305#line 4043 "parse.y"
10306 {
10307 (yyval.node) = new_array_pattern_tail(p, Qnone, 1, (yyvsp[-2].id), (yyvsp[0].node), &(yyloc));
10308 }
10309#line 10305 "parse.c"
10310 break;
10311
10312 case 520:
10313#line 4047 "parse.y"
10314 {
10315 (yyval.node) = new_array_pattern_tail(p, Qnone, 1, 0, Qnone, &(yyloc));
10316 }
10317#line 10313 "parse.c"
10318 break;
10319
10320 case 521:
10321#line 4051 "parse.y"
10322 {
10323 (yyval.node) = new_array_pattern_tail(p, Qnone, 1, 0, (yyvsp[0].node), &(yyloc));
10324 }
10325#line 10321 "parse.c"
10326 break;
10327
10328 case 523:
10329#line 4058 "parse.y"
10330 {
10331 /*%%%*/
10332 (yyval.node) = list_concat((yyvsp[-2].node), (yyvsp[0].node));
10333 /*% %*/
10334 /*% ripper: rb_ary_concat($1, get_value($3)) %*/
10335 }
10336#line 10332 "parse.c"
10337 break;
10338
10339 case 524:
10340#line 4067 "parse.y"
10341 {
10342 /*%%%*/
10343 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
10344 /*% %*/
10345 /*% ripper: rb_ary_new_from_args(1, get_value($1)) %*/
10346 }
10347#line 10343 "parse.c"
10348 break;
10349
10350 case 525:
10351#line 4076 "parse.y"
10352 {
10353 (yyval.node) = new_hash_pattern_tail(p, new_unique_key_hash(p, (yyvsp[-2].node), &(yyloc)), (yyvsp[0].id), &(yyloc));
10354 }
10355#line 10351 "parse.c"
10356 break;
10357
10358 case 526:
10359#line 4080 "parse.y"
10360 {
10361 (yyval.node) = new_hash_pattern_tail(p, new_unique_key_hash(p, (yyvsp[0].node), &(yyloc)), 0, &(yyloc));
10362 }
10363#line 10359 "parse.c"
10364 break;
10365
10366 case 527:
10367#line 4084 "parse.y"
10368 {
10369 (yyval.node) = new_hash_pattern_tail(p, new_unique_key_hash(p, (yyvsp[-1].node), &(yyloc)), 0, &(yyloc));
10370 }
10371#line 10367 "parse.c"
10372 break;
10373
10374 case 528:
10375#line 4088 "parse.y"
10376 {
10377 (yyval.node) = new_hash_pattern_tail(p, new_hash(p, Qnone, &(yyloc)), (yyvsp[0].id), &(yyloc));
10378 }
10379#line 10375 "parse.c"
10380 break;
10381
10382 case 529:
10383#line 4092 "parse.y"
10384 {
10385 (yyval.node) = new_hash_pattern_tail(p, new_unique_key_hash(p, (yyvsp[-2].node), &(yyloc)), ID2VAL(idNil), &(yyloc));
10386 }
10387#line 10383 "parse.c"
10388 break;
10389
10390 case 530:
10391#line 4096 "parse.y"
10392 {
10393 (yyval.node) = new_hash_pattern_tail(p, new_hash(p, Qnone, &(yyloc)), ID2VAL(idNil), &(yyloc));
10394 }
10395#line 10391 "parse.c"
10396 break;
10397
10398 case 532:
10399#line 4104 "parse.y"
10400 {
10401 /*%%%*/
10402 (yyval.node) = list_concat((yyvsp[-2].node), (yyvsp[0].node));
10403 /*% %*/
10404 /*% ripper: rb_ary_push($1, $3) %*/
10405 }
10406#line 10402 "parse.c"
10407 break;
10408
10409 case 533:
10410#line 4113 "parse.y"
10411 {
10412 error_duplicate_pattern_key(p, get_id((yyvsp[-1].id)), &(yylsp[-1]));
10413 /*%%%*/
10414 (yyval.node) = list_append(p, NEW_LIST(NEW_LIT(ID2SYM((yyvsp[-1].id)), &(yyloc)), &(yyloc)), (yyvsp[0].node));
10415 /*% %*/
10416 /*% ripper: rb_ary_new_from_args(2, get_value($1), get_value($2)) %*/
10417 }
10418#line 10414 "parse.c"
10419 break;
10420
10421 case 534:
10422#line 4121 "parse.y"
10423 {
10424 error_duplicate_pattern_key(p, get_id((yyvsp[0].id)), &(yylsp[0]));
10425 if ((yyvsp[0].id) && !is_local_id(get_id((yyvsp[0].id)))) {
10426 yyerror1(&(yylsp[0]), "key must be valid as local variables");
10427 }
10428 error_duplicate_pattern_variable(p, get_id((yyvsp[0].id)), &(yylsp[0]));
10429 /*%%%*/
10430 (yyval.node) = list_append(p, NEW_LIST(NEW_LIT(ID2SYM((yyvsp[0].id)), &(yyloc)), &(yyloc)), assignable(p, (yyvsp[0].id), 0, &(yyloc)));
10431 /*% %*/
10432 /*% ripper: rb_ary_new_from_args(2, get_value($1), Qnil) %*/
10433 }
10434#line 10430 "parse.c"
10435 break;
10436
10437 case 536:
10438#line 4136 "parse.y"
10439 {
10440 YYLTYPE loc = code_loc_gen(&(yylsp[-2]), &(yylsp[0]));
10441 /*%%%*/
10442 if (!(yyvsp[-1].node) || nd_type((yyvsp[-1].node)) == NODE_STR) {
10443 NODE *node = dsym_node(p, (yyvsp[-1].node), &loc);
10444 (yyval.id) = SYM2ID(node->nd_lit);
10445 }
10446 /*%
10447 if (ripper_is_node_yylval($2) && RNODE($2)->nd_cval) {
10448 VALUE label = RNODE($2)->nd_cval;
10449 VALUE rval = RNODE($2)->nd_rval;
10450 $$ = ripper_new_yylval(p, rb_intern_str(label), rval, label);
10451 RNODE($$)->nd_loc = loc;
10452 }
10453 %*/
10454 else {
10455 yyerror1(&loc, "symbol literal with interpolation is not allowed");
10456 (yyval.id) = 0;
10457 }
10458 }
10459#line 10455 "parse.c"
10460 break;
10461
10462 case 537:
10463#line 4159 "parse.y"
10464 {
10465 (yyval.id) = (yyvsp[0].id);
10466 }
10467#line 10463 "parse.c"
10468 break;
10469
10470 case 538:
10471#line 4163 "parse.y"
10472 {
10473 (yyval.id) = 0;
10474 }
10475#line 10471 "parse.c"
10476 break;
10477
10478 case 539:
10479#line 4169 "parse.y"
10480 {
10481 (yyval.id) = 0;
10482 }
10483#line 10479 "parse.c"
10484 break;
10485
10486 case 541:
10487#line 4176 "parse.y"
10488 {
10489 /*%%%*/
10490 value_expr((yyvsp[-2].node));
10491 value_expr((yyvsp[0].node));
10492 (yyval.node) = NEW_DOT2((yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
10493 /*% %*/
10494 /*% ripper: dot2!($1, $3) %*/
10495 }
10496#line 10492 "parse.c"
10497 break;
10498
10499 case 542:
10500#line 4185 "parse.y"
10501 {
10502 /*%%%*/
10503 value_expr((yyvsp[-2].node));
10504 value_expr((yyvsp[0].node));
10505 (yyval.node) = NEW_DOT3((yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
10506 /*% %*/
10507 /*% ripper: dot3!($1, $3) %*/
10508 }
10509#line 10505 "parse.c"
10510 break;
10511
10512 case 543:
10513#line 4194 "parse.y"
10514 {
10515 /*%%%*/
10516 YYLTYPE loc;
10517 loc.beg_pos = (yylsp[0]).end_pos;
10518 loc.end_pos = (yylsp[0]).end_pos;
10519
10520 value_expr((yyvsp[-1].node));
10521 (yyval.node) = NEW_DOT2((yyvsp[-1].node), new_nil(&loc), &(yyloc));
10522 /*% %*/
10523 /*% ripper: dot2!($1, Qnil) %*/
10524 }
10525#line 10521 "parse.c"
10526 break;
10527
10528 case 544:
10529#line 4206 "parse.y"
10530 {
10531 /*%%%*/
10532 YYLTYPE loc;
10533 loc.beg_pos = (yylsp[0]).end_pos;
10534 loc.end_pos = (yylsp[0]).end_pos;
10535
10536 value_expr((yyvsp[-1].node));
10537 (yyval.node) = NEW_DOT3((yyvsp[-1].node), new_nil(&loc), &(yyloc));
10538 /*% %*/
10539 /*% ripper: dot3!($1, Qnil) %*/
10540 }
10541#line 10537 "parse.c"
10542 break;
10543
10544 case 548:
10545#line 4221 "parse.y"
10546 {
10547 /*%%%*/
10548 YYLTYPE loc;
10549 loc.beg_pos = (yylsp[-1]).beg_pos;
10550 loc.end_pos = (yylsp[-1]).beg_pos;
10551
10552 value_expr((yyvsp[0].node));
10553 (yyval.node) = NEW_DOT2(new_nil(&loc), (yyvsp[0].node), &(yyloc));
10554 /*% %*/
10555 /*% ripper: dot2!(Qnil, $2) %*/
10556 }
10557#line 10553 "parse.c"
10558 break;
10559
10560 case 549:
10561#line 4233 "parse.y"
10562 {
10563 /*%%%*/
10564 YYLTYPE loc;
10565 loc.beg_pos = (yylsp[-1]).beg_pos;
10566 loc.end_pos = (yylsp[-1]).beg_pos;
10567
10568 value_expr((yyvsp[0].node));
10569 (yyval.node) = NEW_DOT3(new_nil(&loc), (yyvsp[0].node), &(yyloc));
10570 /*% %*/
10571 /*% ripper: dot3!(Qnil, $2) %*/
10572 }
10573#line 10569 "parse.c"
10574 break;
10575
10576 case 558:
10577#line 4255 "parse.y"
10578 {
10579 /*%%%*/
10580 if (!((yyval.node) = gettable(p, (yyvsp[0].id), &(yyloc)))) (yyval.node) = NEW_BEGIN(0, &(yyloc));
10581 /*% %*/
10582 /*% ripper: var_ref!($1) %*/
10583 }
10584#line 10580 "parse.c"
10585 break;
10586
10587 case 559:
10588#line 4262 "parse.y"
10589 {
10590 token_info_push(p, "->", &(yylsp[0]));
10591 }
10592#line 10588 "parse.c"
10593 break;
10594
10595 case 560:
10596#line 4266 "parse.y"
10597 {
10598 (yyval.node) = (yyvsp[0].node);
10599 /*%%%*/
10600 nd_set_first_loc((yyval.node), (yylsp[-2]).beg_pos);
10601 /*% %*/
10602 }
10603#line 10599 "parse.c"
10604 break;
10605
10606 case 561:
10607#line 4275 "parse.y"
10608 {
10609 /*%%%*/
10610 error_duplicate_pattern_variable(p, (yyvsp[0].id), &(yylsp[0]));
10611 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
10612 /*% %*/
10613 /*% ripper: assignable(p, var_field(p, $1)) %*/
10614 }
10615#line 10611 "parse.c"
10616 break;
10617
10618 case 562:
10619#line 4285 "parse.y"
10620 {
10621 /*%%%*/
10622 NODE *n = gettable(p, (yyvsp[0].id), &(yyloc));
10623 if (!(nd_type(n) == NODE_LVAR || nd_type(n) == NODE_DVAR)) {
10624 compile_error(p, "%"PRIsVALUE": no such local variable", rb_id2str((yyvsp[0].id)));
10625 }
10626 (yyval.node) = n;
10627 /*% %*/
10628 /*% ripper: var_ref!($2) %*/
10629 }
10630#line 10626 "parse.c"
10631 break;
10632
10633 case 563:
10634#line 4298 "parse.y"
10635 {
10636 /*%%%*/
10637 (yyval.node) = NEW_COLON3((yyvsp[0].id), &(yyloc));
10638 /*% %*/
10639 /*% ripper: top_const_ref!($2) %*/
10640 }
10641#line 10637 "parse.c"
10642 break;
10643
10644 case 564:
10645#line 4305 "parse.y"
10646 {
10647 /*%%%*/
10648 (yyval.node) = NEW_COLON2((yyvsp[-2].node), (yyvsp[0].id), &(yyloc));
10649 /*% %*/
10650 /*% ripper: const_path_ref!($1, $3) %*/
10651 }
10652#line 10648 "parse.c"
10653 break;
10654
10655 case 565:
10656#line 4312 "parse.y"
10657 {
10658 /*%%%*/
10659 (yyval.node) = gettable(p, (yyvsp[0].id), &(yyloc));
10660 /*% %*/
10661 /*% ripper: var_ref!($1) %*/
10662 }
10663#line 10659 "parse.c"
10664 break;
10665
10666 case 566:
10667#line 4323 "parse.y"
10668 {
10669 /*%%%*/
10670 (yyval.node) = NEW_RESBODY((yyvsp[-4].node),
10671 (yyvsp[-3].node) ? block_append(p, node_assign(p, (yyvsp[-3].node), NEW_ERRINFO(&(yylsp[-3])), &(yylsp[-3])), (yyvsp[-1].node)) : (yyvsp[-1].node),
10672 (yyvsp[0].node), &(yyloc));
10673 fixpos((yyval.node), (yyvsp[-4].node)?(yyvsp[-4].node):(yyvsp[-1].node));
10674 /*% %*/
10675 /*% ripper: rescue!(escape_Qundef($2), escape_Qundef($3), escape_Qundef($5), escape_Qundef($6)) %*/
10676 }
10677#line 10673 "parse.c"
10678 break;
10679
10680 case 568:
10681#line 4336 "parse.y"
10682 {
10683 /*%%%*/
10684 (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
10685 /*% %*/
10686 /*% ripper: rb_ary_new3(1, get_value($1)) %*/
10687 }
10688#line 10684 "parse.c"
10689 break;
10690
10691 case 569:
10692#line 4343 "parse.y"
10693 {
10694 /*%%%*/
10695 if (!((yyval.node) = splat_array((yyvsp[0].node)))) (yyval.node) = (yyvsp[0].node);
10696 /*% %*/
10697 /*% ripper: $1 %*/
10698 }
10699#line 10695 "parse.c"
10700 break;
10701
10702 case 571:
10703#line 4353 "parse.y"
10704 {
10705 (yyval.node) = (yyvsp[0].node);
10706 }
10707#line 10703 "parse.c"
10708 break;
10709
10710 case 573:
10711#line 4360 "parse.y"
10712 {
10713 /*%%%*/
10714 (yyval.node) = (yyvsp[0].node);
10715 /*% %*/
10716 /*% ripper: ensure!($2) %*/
10717 }
10718#line 10714 "parse.c"
10719 break;
10720
10721 case 577:
10722#line 4374 "parse.y"
10723 {
10724 /*%%%*/
10725 NODE *node = (yyvsp[0].node);
10726 if (!node) {
10727 node = NEW_STR(STR_NEW0(), &(yyloc));
10728 RB_OBJ_WRITTEN(p->ast, Qnil, node->nd_lit);
10729 }
10730 else {
10731 node = evstr2dstr(p, node);
10732 }
10733 (yyval.node) = node;
10734 /*% %*/
10735 /*% ripper: $1 %*/
10736 }
10737#line 10733 "parse.c"
10738 break;
10739
10740 case 580:
10741#line 4393 "parse.y"
10742 {
10743 /*%%%*/
10744 (yyval.node) = literal_concat(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
10745 /*% %*/
10746 /*% ripper: string_concat!($1, $2) %*/
10747 }
10748#line 10744 "parse.c"
10749 break;
10750
10751 case 581:
10752#line 4402 "parse.y"
10753 {
10754 /*%%%*/
10755 (yyval.node) = heredoc_dedent(p, (yyvsp[-1].node));
10756 if ((yyval.node)) nd_set_loc((yyval.node), &(yyloc));
10757 /*% %*/
10758 /*% ripper: string_literal!(heredoc_dedent(p, $2)) %*/
10759 }
10760#line 10756 "parse.c"
10761 break;
10762
10763 case 582:
10764#line 4412 "parse.y"
10765 {
10766 /*%%%*/
10767 (yyval.node) = new_xstring(p, heredoc_dedent(p, (yyvsp[-1].node)), &(yyloc));
10768 /*% %*/
10769 /*% ripper: xstring_literal!(heredoc_dedent(p, $2)) %*/
10770 }
10771#line 10767 "parse.c"
10772 break;
10773
10774 case 583:
10775#line 4421 "parse.y"
10776 {
10777 (yyval.node) = new_regexp(p, (yyvsp[-1].node), (yyvsp[0].num), &(yyloc));
10778 }
10779#line 10775 "parse.c"
10780 break;
10781
10782 case 584:
10783#line 4427 "parse.y"
10784 {
10785 /*%%%*/
10786 (yyval.node) = make_list((yyvsp[-1].node), &(yyloc));
10787 /*% %*/
10788 /*% ripper: array!($3) %*/
10789 }
10790#line 10786 "parse.c"
10791 break;
10792
10793 case 585:
10794#line 4436 "parse.y"
10795 {
10796 /*%%%*/
10797 (yyval.node) = 0;
10798 /*% %*/
10799 /*% ripper: words_new! %*/
10800 }
10801#line 10797 "parse.c"
10802 break;
10803
10804 case 586:
10805#line 4443 "parse.y"
10806 {
10807 /*%%%*/
10808 (yyval.node) = list_append(p, (yyvsp[-2].node), evstr2dstr(p, (yyvsp[-1].node)));
10809 /*% %*/
10810 /*% ripper: words_add!($1, $2) %*/
10811 }
10812#line 10808 "parse.c"
10813 break;
10814
10815 case 588:
10816#line 4454 "parse.y"
10817 {
10818 /*%%%*/
10819 (yyval.node) = literal_concat(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
10820 /*% %*/
10821 /*% ripper: word_add!($1, $2) %*/
10822 }
10823#line 10819 "parse.c"
10824 break;
10825
10826 case 589:
10827#line 4463 "parse.y"
10828 {
10829 /*%%%*/
10830 (yyval.node) = make_list((yyvsp[-1].node), &(yyloc));
10831 /*% %*/
10832 /*% ripper: array!($3) %*/
10833 }
10834#line 10830 "parse.c"
10835 break;
10836
10837 case 590:
10838#line 4472 "parse.y"
10839 {
10840 /*%%%*/
10841 (yyval.node) = 0;
10842 /*% %*/
10843 /*% ripper: symbols_new! %*/
10844 }
10845#line 10841 "parse.c"
10846 break;
10847
10848 case 591:
10849#line 4479 "parse.y"
10850 {
10851 /*%%%*/
10852 (yyval.node) = symbol_append(p, (yyvsp[-2].node), evstr2dstr(p, (yyvsp[-1].node)));
10853 /*% %*/
10854 /*% ripper: symbols_add!($1, $2) %*/
10855 }
10856#line 10852 "parse.c"
10857 break;
10858
10859 case 592:
10860#line 4488 "parse.y"
10861 {
10862 /*%%%*/
10863 (yyval.node) = make_list((yyvsp[-1].node), &(yyloc));
10864 /*% %*/
10865 /*% ripper: array!($3) %*/
10866 }
10867#line 10863 "parse.c"
10868 break;
10869
10870 case 593:
10871#line 4497 "parse.y"
10872 {
10873 /*%%%*/
10874 (yyval.node) = make_list((yyvsp[-1].node), &(yyloc));
10875 /*% %*/
10876 /*% ripper: array!($3) %*/
10877 }
10878#line 10874 "parse.c"
10879 break;
10880
10881 case 594:
10882#line 4506 "parse.y"
10883 {
10884 /*%%%*/
10885 (yyval.node) = 0;
10886 /*% %*/
10887 /*% ripper: qwords_new! %*/
10888 }
10889#line 10885 "parse.c"
10890 break;
10891
10892 case 595:
10893#line 4513 "parse.y"
10894 {
10895 /*%%%*/
10896 (yyval.node) = list_append(p, (yyvsp[-2].node), (yyvsp[-1].node));
10897 /*% %*/
10898 /*% ripper: qwords_add!($1, $2) %*/
10899 }
10900#line 10896 "parse.c"
10901 break;
10902
10903 case 596:
10904#line 4522 "parse.y"
10905 {
10906 /*%%%*/
10907 (yyval.node) = 0;
10908 /*% %*/
10909 /*% ripper: qsymbols_new! %*/
10910 }
10911#line 10907 "parse.c"
10912 break;
10913
10914 case 597:
10915#line 4529 "parse.y"
10916 {
10917 /*%%%*/
10918 (yyval.node) = symbol_append(p, (yyvsp[-2].node), (yyvsp[-1].node));
10919 /*% %*/
10920 /*% ripper: qsymbols_add!($1, $2) %*/
10921 }
10922#line 10918 "parse.c"
10923 break;
10924
10925 case 598:
10926#line 4538 "parse.y"
10927 {
10928 /*%%%*/
10929 (yyval.node) = 0;
10930 /*% %*/
10931 /*% ripper: string_content! %*/
10932 /*%%%*/
10933 /*%
10934 $$ = ripper_new_yylval(p, 0, $$, 0);
10935 %*/
10936 }
10937#line 10933 "parse.c"
10938 break;
10939
10940 case 599:
10941#line 4549 "parse.y"
10942 {
10943 /*%%%*/
10944 (yyval.node) = literal_concat(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
10945 /*% %*/
10946 /*% ripper: string_add!($1, $2) %*/
10947 /*%%%*/
10948 /*%
10949 if (ripper_is_node_yylval($1) && ripper_is_node_yylval($2) &&
10950 !RNODE($1)->nd_cval) {
10951 RNODE($1)->nd_cval = RNODE($2)->nd_cval;
10952 RNODE($1)->nd_rval = add_mark_object(p, $$);
10953 $$ = $1;
10954 }
10955 %*/
10956 }
10957#line 10953 "parse.c"
10958 break;
10959
10960 case 600:
10961#line 4567 "parse.y"
10962 {
10963 /*%%%*/
10964 (yyval.node) = 0;
10965 /*% %*/
10966 /*% ripper: xstring_new! %*/
10967 }
10968#line 10964 "parse.c"
10969 break;
10970
10971 case 601:
10972#line 4574 "parse.y"
10973 {
10974 /*%%%*/
10975 (yyval.node) = literal_concat(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
10976 /*% %*/
10977 /*% ripper: xstring_add!($1, $2) %*/
10978 }
10979#line 10975 "parse.c"
10980 break;
10981
10982 case 602:
10983#line 4583 "parse.y"
10984 {
10985 /*%%%*/
10986 (yyval.node) = 0;
10987 /*% %*/
10988 /*% ripper: regexp_new! %*/
10989 /*%%%*/
10990 /*%
10991 $$ = ripper_new_yylval(p, 0, $$, 0);
10992 %*/
10993 }
10994#line 10990 "parse.c"
10995 break;
10996
10997 case 603:
10998#line 4594 "parse.y"
10999 {
11000 /*%%%*/
11001 NODE *head = (yyvsp[-1].node), *tail = (yyvsp[0].node);
11002 if (!head) {
11003 (yyval.node) = tail;
11004 }
11005 else if (!tail) {
11006 (yyval.node) = head;
11007 }
11008 else {
11009 switch (nd_type(head)) {
11010 case NODE_STR:
11011 nd_set_type(head, NODE_DSTR);
11012 break;
11013 case NODE_DSTR:
11014 break;
11015 default:
11016 head = list_append(p, NEW_DSTR(Qnil, &(yyloc)), head);
11017 break;
11018 }
11019 (yyval.node) = list_append(p, head, tail);
11020 }
11021 /*%
11022 VALUE s1 = 1, s2 = 0, n1 = $1, n2 = $2;
11023 if (ripper_is_node_yylval(n1)) {
11024 s1 = RNODE(n1)->nd_cval;
11025 n1 = RNODE(n1)->nd_rval;
11026 }
11027 if (ripper_is_node_yylval(n2)) {
11028 s2 = RNODE(n2)->nd_cval;
11029 n2 = RNODE(n2)->nd_rval;
11030 }
11031 $$ = dispatch2(regexp_add, n1, n2);
11032 if (!s1 && s2) {
11033 $$ = ripper_new_yylval(p, 0, $$, s2);
11034 }
11035 %*/
11036 }
11037#line 11033 "parse.c"
11038 break;
11039
11040 case 605:
11041#line 4637 "parse.y"
11042 {
11043 /* need to backup p->lex.strterm so that a string literal `%&foo,#$&,bar&` can be parsed */
11044 (yyval.strterm) = p->lex.strterm;
11045 p->lex.strterm = 0;
11046 SET_LEX_STATE(EXPR_BEG);
11047 }
11048#line 11044 "parse.c"
11049 break;
11050
11051 case 606:
11052#line 4644 "parse.y"
11053 {
11054 p->lex.strterm = (yyvsp[-1].strterm);
11055 /*%%%*/
11056 (yyval.node) = NEW_EVSTR((yyvsp[0].node), &(yyloc));
11057 nd_set_line((yyval.node), (yylsp[0]).end_pos.lineno);
11058 /*% %*/
11059 /*% ripper: string_dvar!($3) %*/
11060 }
11061#line 11057 "parse.c"
11062 break;
11063
11064 case 607:
11065#line 4653 "parse.y"
11066 {
11067 CMDARG_PUSH(0);
11068 COND_PUSH(0);
11069 }
11070#line 11066 "parse.c"
11071 break;
11072
11073 case 608:
11074#line 4657 "parse.y"
11075 {
11076 /* need to backup p->lex.strterm so that a string literal `%!foo,#{ !0 },bar!` can be parsed */
11077 (yyval.strterm) = p->lex.strterm;
11078 p->lex.strterm = 0;
11079 }
11080#line 11076 "parse.c"
11081 break;
11082
11083 case 609:
11084#line 4662 "parse.y"
11085 {
11086 (yyval.num) = p->lex.state;
11087 SET_LEX_STATE(EXPR_BEG);
11088 }
11089#line 11085 "parse.c"
11090 break;
11091
11092 case 610:
11093#line 4666 "parse.y"
11094 {
11095 (yyval.num) = p->lex.brace_nest;
11096 p->lex.brace_nest = 0;
11097 }
11098#line 11094 "parse.c"
11099 break;
11100
11101 case 611:
11102#line 4670 "parse.y"
11103 {
11104 (yyval.num) = p->heredoc_indent;
11105 p->heredoc_indent = 0;
11106 }
11107#line 11103 "parse.c"
11108 break;
11109
11110 case 612:
11111#line 4675 "parse.y"
11112 {
11113 COND_POP();
11114 CMDARG_POP();
11115 p->lex.strterm = (yyvsp[-5].strterm);
11116 SET_LEX_STATE((yyvsp[-4].num));
11117 p->lex.brace_nest = (yyvsp[-3].num);
11118 p->heredoc_indent = (yyvsp[-2].num);
11119 p->heredoc_line_indent = -1;
11120 /*%%%*/
11121 if ((yyvsp[-1].node)) (yyvsp[-1].node)->flags &= ~NODE_FL_NEWLINE;
11122 (yyval.node) = new_evstr(p, (yyvsp[-1].node), &(yyloc));
11123 /*% %*/
11124 /*% ripper: string_embexpr!($7) %*/
11125 }
11126#line 11122 "parse.c"
11127 break;
11128
11129 case 613:
11130#line 4692 "parse.y"
11131 {
11132 /*%%%*/
11133 (yyval.node) = NEW_GVAR((yyvsp[0].id), &(yyloc));
11134 /*% %*/
11135 /*% ripper: var_ref!($1) %*/
11136 }
11137#line 11133 "parse.c"
11138 break;
11139
11140 case 614:
11141#line 4699 "parse.y"
11142 {
11143 /*%%%*/
11144 (yyval.node) = NEW_IVAR((yyvsp[0].id), &(yyloc));
11145 /*% %*/
11146 /*% ripper: var_ref!($1) %*/
11147 }
11148#line 11144 "parse.c"
11149 break;
11150
11151 case 615:
11152#line 4706 "parse.y"
11153 {
11154 /*%%%*/
11155 (yyval.node) = NEW_CVAR((yyvsp[0].id), &(yyloc));
11156 /*% %*/
11157 /*% ripper: var_ref!($1) %*/
11158 }
11159#line 11155 "parse.c"
11160 break;
11161
11162 case 619:
11163#line 4720 "parse.y"
11164 {
11165 SET_LEX_STATE(EXPR_END);
11166 /*%%%*/
11167 (yyval.node) = NEW_LIT(ID2SYM((yyvsp[0].id)), &(yyloc));
11168 /*% %*/
11169 /*% ripper: symbol_literal!(symbol!($2)) %*/
11170 }
11171#line 11167 "parse.c"
11172 break;
11173
11174 case 624:
11175#line 4736 "parse.y"
11176 {
11177 SET_LEX_STATE(EXPR_END);
11178 /*%%%*/
11179 (yyval.node) = dsym_node(p, (yyvsp[-1].node), &(yyloc));
11180 /*% %*/
11181 /*% ripper: dyna_symbol!($2) %*/
11182 }
11183#line 11179 "parse.c"
11184 break;
11185
11186 case 626:
11187#line 4747 "parse.y"
11188 {
11189 /*%%%*/
11190 (yyval.node) = (yyvsp[0].node);
11191 RB_OBJ_WRITE(p->ast, &(yyval.node)->nd_lit, negate_lit(p, (yyval.node)->nd_lit));
11192 /*% %*/
11193 /*% ripper: unary!(ID2VAL(idUMinus), $2) %*/
11194 }
11195#line 11191 "parse.c"
11196 break;
11197
11198 case 636:
11199#line 4769 "parse.y"
11200 {(yyval.id) = KWD2EID(nil, (yyvsp[0].id));}
11201#line 11197 "parse.c"
11202 break;
11203
11204 case 637:
11205#line 4770 "parse.y"
11206 {(yyval.id) = KWD2EID(self, (yyvsp[0].id));}
11207#line 11203 "parse.c"
11208 break;
11209
11210 case 638:
11211#line 4771 "parse.y"
11212 {(yyval.id) = KWD2EID(true, (yyvsp[0].id));}
11213#line 11209 "parse.c"
11214 break;
11215
11216 case 639:
11217#line 4772 "parse.y"
11218 {(yyval.id) = KWD2EID(false, (yyvsp[0].id));}
11219#line 11215 "parse.c"
11220 break;
11221
11222 case 640:
11223#line 4773 "parse.y"
11224 {(yyval.id) = KWD2EID(_FILE__, (yyvsp[0].id));}
11225#line 11221 "parse.c"
11226 break;
11227
11228 case 641:
11229#line 4774 "parse.y"
11230 {(yyval.id) = KWD2EID(_LINE__, (yyvsp[0].id));}
11231#line 11227 "parse.c"
11232 break;
11233
11234 case 642:
11235#line 4775 "parse.y"
11236 {(yyval.id) = KWD2EID(_ENCODING__, (yyvsp[0].id));}
11237#line 11233 "parse.c"
11238 break;
11239
11240 case 643:
11241#line 4779 "parse.y"
11242 {
11243 /*%%%*/
11244 if (!((yyval.node) = gettable(p, (yyvsp[0].id), &(yyloc)))) (yyval.node) = NEW_BEGIN(0, &(yyloc));
11245 /*%
11246 if (id_is_var(p, get_id($1))) {
11247 $$ = dispatch1(var_ref, $1);
11248 }
11249 else {
11250 $$ = dispatch1(vcall, $1);
11251 }
11252 %*/
11253 }
11254#line 11250 "parse.c"
11255 break;
11256
11257 case 644:
11258#line 4792 "parse.y"
11259 {
11260 /*%%%*/
11261 if (!((yyval.node) = gettable(p, (yyvsp[0].id), &(yyloc)))) (yyval.node) = NEW_BEGIN(0, &(yyloc));
11262 /*% %*/
11263 /*% ripper: var_ref!($1) %*/
11264 }
11265#line 11261 "parse.c"
11266 break;
11267
11268 case 645:
11269#line 4801 "parse.y"
11270 {
11271 /*%%%*/
11272 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
11273 /*% %*/
11274 /*% ripper: assignable(p, var_field(p, $1)) %*/
11275 }
11276#line 11272 "parse.c"
11277 break;
11278
11279 case 646:
11280#line 4808 "parse.y"
11281 {
11282 /*%%%*/
11283 (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
11284 /*% %*/
11285 /*% ripper: assignable(p, var_field(p, $1)) %*/
11286 }
11287#line 11283 "parse.c"
11288 break;
11289
11290 case 649:
11291#line 4821 "parse.y"
11292 {
11293 SET_LEX_STATE(EXPR_BEG);
11294 p->command_start = TRUE;
11295 }
11296#line 11292 "parse.c"
11297 break;
11298
11299 case 650:
11300#line 4826 "parse.y"
11301 {
11302 (yyval.node) = (yyvsp[-1].node);
11303 }
11304#line 11300 "parse.c"
11305 break;
11306
11307 case 651:
11308#line 4830 "parse.y"
11309 {
11310 /*%%%*/
11311 (yyval.node) = 0;
11312 /*% %*/
11313 /*% ripper: Qnil %*/
11314 }
11315#line 11311 "parse.c"
11316 break;
11317
11318 case 652:
11319#line 4839 "parse.y"
11320 {
11321 /*%%%*/
11322 (yyval.node) = (yyvsp[-1].node);
11323 /*% %*/
11324 /*% ripper: paren!($2) %*/
11325 SET_LEX_STATE(EXPR_BEG);
11326 p->command_start = TRUE;
11327 }
11328#line 11324 "parse.c"
11329 break;
11330
11331 case 653:
11332#line 4848 "parse.y"
11333 {
11334 arg_var(p, idFWD_REST);
11335#if idFWD_KWREST
11336 arg_var(p, idFWD_KWREST);
11337#endif
11338 arg_var(p, idFWD_BLOCK);
11339 /*%%%*/
11340 (yyval.node) = new_args_tail(p, Qnone, idFWD_KWREST, idFWD_BLOCK, &(yylsp[-1]));
11341 (yyval.node) = new_args(p, (yyvsp[-3].node), Qnone, idFWD_REST, Qnone, (yyval.node), &(yylsp[-1]));
11342 /*% %*/
11343 /*% ripper: paren!(params_new($2, Qnone, $4, Qnone, Qnone, Qnone, Qnone)) %*/
11344 SET_LEX_STATE(EXPR_BEG);
11345 p->command_start = TRUE;
11346 }
11347#line 11343 "parse.c"
11348 break;
11349
11350 case 654:
11351#line 4863 "parse.y"
11352 {
11353 arg_var(p, idFWD_REST);
11354#if idFWD_KWREST
11355 arg_var(p, idFWD_KWREST);
11356#endif
11357 arg_var(p, idFWD_BLOCK);
11358 /*%%%*/
11359 (yyval.node) = new_args_tail(p, Qnone, idFWD_KWREST, idFWD_BLOCK, &(yylsp[-1]));
11360 (yyval.node) = new_args(p, Qnone, Qnone, idFWD_REST, Qnone, (yyval.node), &(yylsp[-1]));
11361 /*% %*/
11362 /*% ripper: paren!(params_new(Qnone, Qnone, $2, Qnone, Qnone, Qnone, Qnone)) %*/
11363 SET_LEX_STATE(EXPR_BEG);
11364 p->command_start = TRUE;
11365 }
11366#line 11362 "parse.c"
11367 break;
11368
11369 case 655:
11370#line 4877 "parse.y"
11371 {
11372 (yyval.num) = p->in_kwarg;
11373 p->in_kwarg = 1;
11374 SET_LEX_STATE(p->lex.state|EXPR_LABEL); /* force for args */
11375 }
11376#line 11372 "parse.c"
11377 break;
11378
11379 case 656:
11380#line 4883 "parse.y"
11381 {
11382 p->in_kwarg = !!(yyvsp[-2].num);
11383 (yyval.node) = (yyvsp[-1].node);
11384 SET_LEX_STATE(EXPR_BEG);
11385 p->command_start = TRUE;
11386 }
11387#line 11383 "parse.c"
11388 break;
11389
11390 case 657:
11391#line 4892 "parse.y"
11392 {
11393 (yyval.node) = new_args_tail(p, (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].id), &(yylsp[-1]));
11394 }
11395#line 11391 "parse.c"
11396 break;
11397
11398 case 658:
11399#line 4896 "parse.y"
11400 {
11401 (yyval.node) = new_args_tail(p, (yyvsp[-1].node), Qnone, (yyvsp[0].id), &(yylsp[-1]));
11402 }
11403#line 11399 "parse.c"
11404 break;
11405
11406 case 659:
11407#line 4900 "parse.y"
11408 {
11409 (yyval.node) = new_args_tail(p, Qnone, (yyvsp[-1].id), (yyvsp[0].id), &(yylsp[-1]));
11410 }
11411#line 11407 "parse.c"
11412 break;
11413
11414 case 660:
11415#line 4904 "parse.y"
11416 {
11417 (yyval.node) = new_args_tail(p, Qnone, ID2VAL(idNil), (yyvsp[0].id), &(yylsp[-1]));
11418 }
11419#line 11415 "parse.c"
11420 break;
11421
11422 case 661:
11423#line 4908 "parse.y"
11424 {
11425 (yyval.node) = new_args_tail(p, Qnone, Qnone, (yyvsp[0].id), &(yylsp[0]));
11426 }
11427#line 11423 "parse.c"
11428 break;
11429
11430 case 662:
11431#line 4914 "parse.y"
11432 {
11433 (yyval.node) = (yyvsp[0].node);
11434 }
11435#line 11431 "parse.c"
11436 break;
11437
11438 case 663:
11439#line 4918 "parse.y"
11440 {
11441 (yyval.node) = new_args_tail(p, Qnone, Qnone, Qnone, &(yylsp[0]));
11442 }
11443#line 11439 "parse.c"
11444 break;
11445
11446 case 664:
11447#line 4924 "parse.y"
11448 {
11449 (yyval.node) = new_args(p, (yyvsp[-5].node), (yyvsp[-3].node), (yyvsp[-1].id), Qnone, (yyvsp[0].node), &(yyloc));
11450 }
11451#line 11447 "parse.c"
11452 break;
11453
11454 case 665:
11455#line 4928 "parse.y"
11456 {
11457 (yyval.node) = new_args(p, (yyvsp[-7].node), (yyvsp[-5].node), (yyvsp[-3].id), (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
11458 }
11459#line 11455 "parse.c"
11460 break;
11461
11462 case 666:
11463#line 4932 "parse.y"
11464 {
11465 (yyval.node) = new_args(p, (yyvsp[-3].node), (yyvsp[-1].node), Qnone, Qnone, (yyvsp[0].node), &(yyloc));
11466 }
11467#line 11463 "parse.c"
11468 break;
11469
11470 case 667:
11471#line 4936 "parse.y"
11472 {
11473 (yyval.node) = new_args(p, (yyvsp[-5].node), (yyvsp[-3].node), Qnone, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
11474 }
11475#line 11471 "parse.c"
11476 break;
11477
11478 case 668:
11479#line 4940 "parse.y"
11480 {
11481 (yyval.node) = new_args(p, (yyvsp[-3].node), Qnone, (yyvsp[-1].id), Qnone, (yyvsp[0].node), &(yyloc));
11482 }
11483#line 11479 "parse.c"
11484 break;
11485
11486 case 669:
11487#line 4944 "parse.y"
11488 {
11489 (yyval.node) = new_args(p, (yyvsp[-5].node), Qnone, (yyvsp[-3].id), (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
11490 }
11491#line 11487 "parse.c"
11492 break;
11493
11494 case 670:
11495#line 4948 "parse.y"
11496 {
11497 (yyval.node) = new_args(p, (yyvsp[-1].node), Qnone, Qnone, Qnone, (yyvsp[0].node), &(yyloc));
11498 }
11499#line 11495 "parse.c"
11500 break;
11501
11502 case 671:
11503#line 4952 "parse.y"
11504 {
11505 (yyval.node) = new_args(p, Qnone, (yyvsp[-3].node), (yyvsp[-1].id), Qnone, (yyvsp[0].node), &(yyloc));
11506 }
11507#line 11503 "parse.c"
11508 break;
11509
11510 case 672:
11511#line 4956 "parse.y"
11512 {
11513 (yyval.node) = new_args(p, Qnone, (yyvsp[-5].node), (yyvsp[-3].id), (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
11514 }
11515#line 11511 "parse.c"
11516 break;
11517
11518 case 673:
11519#line 4960 "parse.y"
11520 {
11521 (yyval.node) = new_args(p, Qnone, (yyvsp[-1].node), Qnone, Qnone, (yyvsp[0].node), &(yyloc));
11522 }
11523#line 11519 "parse.c"
11524 break;
11525
11526 case 674:
11527#line 4964 "parse.y"
11528 {
11529 (yyval.node) = new_args(p, Qnone, (yyvsp[-3].node), Qnone, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
11530 }
11531#line 11527 "parse.c"
11532 break;
11533
11534 case 675:
11535#line 4968 "parse.y"
11536 {
11537 (yyval.node) = new_args(p, Qnone, Qnone, (yyvsp[-1].id), Qnone, (yyvsp[0].node), &(yyloc));
11538 }
11539#line 11535 "parse.c"
11540 break;
11541
11542 case 676:
11543#line 4972 "parse.y"
11544 {
11545 (yyval.node) = new_args(p, Qnone, Qnone, (yyvsp[-3].id), (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
11546 }
11547#line 11543 "parse.c"
11548 break;
11549
11550 case 677:
11551#line 4976 "parse.y"
11552 {
11553 (yyval.node) = new_args(p, Qnone, Qnone, Qnone, Qnone, (yyvsp[0].node), &(yyloc));
11554 }
11555#line 11551 "parse.c"
11556 break;
11557
11558 case 678:
11559#line 4980 "parse.y"
11560 {
11561 (yyval.node) = new_args_tail(p, Qnone, Qnone, Qnone, &(yylsp[0]));
11562 (yyval.node) = new_args(p, Qnone, Qnone, Qnone, Qnone, (yyval.node), &(yylsp[0]));
11563 }
11564#line 11560 "parse.c"
11565 break;
11566
11567 case 679:
11568#line 4987 "parse.y"
11569 {
11570 /*%%%*/
11571 (yyval.id) = idDot3;
11572 /*% %*/
11573 /*% ripper: args_forward! %*/
11574 }
11575#line 11571 "parse.c"
11576 break;
11577
11578 case 680:
11579#line 4996 "parse.y"
11580 {
11581 /*%%%*/
11582 yyerror1(&(yylsp[0]), "formal argument cannot be a constant");
11583 (yyval.id) = 0;
11584 /*% %*/
11585 /*% ripper[error]: param_error!($1) %*/
11586 }
11587#line 11583 "parse.c"
11588 break;
11589
11590 case 681:
11591#line 5004 "parse.y"
11592 {
11593 /*%%%*/
11594 yyerror1(&(yylsp[0]), "formal argument cannot be an instance variable");
11595 (yyval.id) = 0;
11596 /*% %*/
11597 /*% ripper[error]: param_error!($1) %*/
11598 }
11599#line 11595 "parse.c"
11600 break;
11601
11602 case 682:
11603#line 5012 "parse.y"
11604 {
11605 /*%%%*/
11606 yyerror1(&(yylsp[0]), "formal argument cannot be a global variable");
11607 (yyval.id) = 0;
11608 /*% %*/
11609 /*% ripper[error]: param_error!($1) %*/
11610 }
11611#line 11607 "parse.c"
11612 break;
11613
11614 case 683:
11615#line 5020 "parse.y"
11616 {
11617 /*%%%*/
11618 yyerror1(&(yylsp[0]), "formal argument cannot be a class variable");
11619 (yyval.id) = 0;
11620 /*% %*/
11621 /*% ripper[error]: param_error!($1) %*/
11622 }
11623#line 11619 "parse.c"
11624 break;
11625
11626 case 685:
11627#line 5031 "parse.y"
11628 {
11629 formal_argument(p, get_id((yyvsp[0].id)));
11631 (yyval.id) = (yyvsp[0].id);
11632 }
11633#line 11629 "parse.c"
11634 break;
11635
11636 case 686:
11637#line 5039 "parse.y"
11638 {
11639 ID id = get_id((yyvsp[0].id));
11640 arg_var(p, id);
11641 p->cur_arg = id;
11642 (yyval.id) = (yyvsp[0].id);
11643 }
11644#line 11640 "parse.c"
11645 break;
11646
11647 case 687:
11648#line 5048 "parse.y"
11649 {
11650 p->cur_arg = 0;
11651 /*%%%*/
11652 (yyval.node) = NEW_ARGS_AUX((yyvsp[0].id), 1, &NULL_LOC);
11653 /*% %*/
11654 /*% ripper: get_value($1) %*/
11655 }
11656#line 11652 "parse.c"
11657 break;
11658
11659 case 688:
11660#line 5056 "parse.y"
11661 {
11662 /*%%%*/
11663 ID tid = internal_id(p);
11664 YYLTYPE loc;
11665 loc.beg_pos = (yylsp[-1]).beg_pos;
11666 loc.end_pos = (yylsp[-1]).beg_pos;
11667 arg_var(p, tid);
11668 if (dyna_in_block(p)) {
11669 (yyvsp[-1].node)->nd_value = NEW_DVAR(tid, &loc);
11670 }
11671 else {
11672 (yyvsp[-1].node)->nd_value = NEW_LVAR(tid, &loc);
11673 }
11674 (yyval.node) = NEW_ARGS_AUX(tid, 1, &NULL_LOC);
11675 (yyval.node)->nd_next = (yyvsp[-1].node);
11676 /*% %*/
11677 /*% ripper: mlhs_paren!($2) %*/
11678 }
11679#line 11675 "parse.c"
11680 break;
11681
11682 case 690:
11683#line 5079 "parse.y"
11684 {
11685 /*%%%*/
11686 (yyval.node) = (yyvsp[-2].node);
11687 (yyval.node)->nd_plen++;
11688 (yyval.node)->nd_next = block_append(p, (yyval.node)->nd_next, (yyvsp[0].node)->nd_next);
11689 rb_discard_node(p, (yyvsp[0].node));
11690 /*% %*/
11691 /*% ripper: rb_ary_push($1, get_value($3)) %*/
11692 }
11693#line 11689 "parse.c"
11694 break;
11695
11696 case 691:
11697#line 5092 "parse.y"
11698 {
11699 ID id = get_id((yyvsp[0].id));
11700 arg_var(p, formal_argument(p, id));
11701 p->cur_arg = id;
11703 (yyval.id) = (yyvsp[0].id);
11704 }
11705#line 11701 "parse.c"
11706 break;
11707
11708 case 692:
11709#line 5102 "parse.y"
11710 {
11711 p->cur_arg = 0;
11712 /*%%%*/
11713 (yyval.node) = new_kw_arg(p, assignable(p, (yyvsp[-1].id), (yyvsp[0].node), &(yyloc)), &(yyloc));
11714 /*% %*/
11715 /*% ripper: rb_assoc_new(get_value(assignable(p, $1)), get_value($2)) %*/
11716 }
11717#line 11713 "parse.c"
11718 break;
11719
11720 case 693:
11721#line 5110 "parse.y"
11722 {
11723 p->cur_arg = 0;
11724 /*%%%*/
11725 (yyval.node) = new_kw_arg(p, assignable(p, (yyvsp[0].id), NODE_SPECIAL_REQUIRED_KEYWORD, &(yyloc)), &(yyloc));
11726 /*% %*/
11727 /*% ripper: rb_assoc_new(get_value(assignable(p, $1)), 0) %*/
11728 }
11729#line 11725 "parse.c"
11730 break;
11731
11732 case 694:
11733#line 5120 "parse.y"
11734 {
11735 /*%%%*/
11736 (yyval.node) = new_kw_arg(p, assignable(p, (yyvsp[-1].id), (yyvsp[0].node), &(yyloc)), &(yyloc));
11737 /*% %*/
11738 /*% ripper: rb_assoc_new(get_value(assignable(p, $1)), get_value($2)) %*/
11739 }
11740#line 11736 "parse.c"
11741 break;
11742
11743 case 695:
11744#line 5127 "parse.y"
11745 {
11746 /*%%%*/
11747 (yyval.node) = new_kw_arg(p, assignable(p, (yyvsp[0].id), NODE_SPECIAL_REQUIRED_KEYWORD, &(yyloc)), &(yyloc));
11748 /*% %*/
11749 /*% ripper: rb_assoc_new(get_value(assignable(p, $1)), 0) %*/
11750 }
11751#line 11747 "parse.c"
11752 break;
11753
11754 case 696:
11755#line 5136 "parse.y"
11756 {
11757 /*%%%*/
11758 (yyval.node) = (yyvsp[0].node);
11759 /*% %*/
11760 /*% ripper: rb_ary_new3(1, get_value($1)) %*/
11761 }
11762#line 11758 "parse.c"
11763 break;
11764
11765 case 697:
11766#line 5143 "parse.y"
11767 {
11768 /*%%%*/
11769 (yyval.node) = kwd_append((yyvsp[-2].node), (yyvsp[0].node));
11770 /*% %*/
11771 /*% ripper: rb_ary_push($1, get_value($3)) %*/
11772 }
11773#line 11769 "parse.c"
11774 break;
11775
11776 case 698:
11777#line 5153 "parse.y"
11778 {
11779 /*%%%*/
11780 (yyval.node) = (yyvsp[0].node);
11781 /*% %*/
11782 /*% ripper: rb_ary_new3(1, get_value($1)) %*/
11783 }
11784#line 11780 "parse.c"
11785 break;
11786
11787 case 699:
11788#line 5160 "parse.y"
11789 {
11790 /*%%%*/
11791 (yyval.node) = kwd_append((yyvsp[-2].node), (yyvsp[0].node));
11792 /*% %*/
11793 /*% ripper: rb_ary_push($1, get_value($3)) %*/
11794 }
11795#line 11791 "parse.c"
11796 break;
11797
11798 case 702:
11799#line 5173 "parse.y"
11800 {
11801 /*%%%*/
11802 /*% %*/
11803 /*% ripper: nokw_param!(Qnil) %*/
11804 }
11805#line 11801 "parse.c"
11806 break;
11807
11808 case 703:
11809#line 5181 "parse.y"
11810 {
11811 arg_var(p, shadowing_lvar(p, get_id((yyvsp[0].id))));
11812 /*%%%*/
11813 (yyval.id) = (yyvsp[0].id);
11814 /*% %*/
11815 /*% ripper: kwrest_param!($2) %*/
11816 }
11817#line 11813 "parse.c"
11818 break;
11819
11820 case 704:
11821#line 5189 "parse.y"
11822 {
11823 /*%%%*/
11824 (yyval.id) = internal_id(p);
11825 arg_var(p, (yyval.id));
11826 /*% %*/
11827 /*% ripper: kwrest_param!(Qnil) %*/
11828 }
11829#line 11825 "parse.c"
11830 break;
11831
11832 case 705:
11833#line 5199 "parse.y"
11834 {
11835 p->cur_arg = 0;
11836 /*%%%*/
11837 (yyval.node) = NEW_OPT_ARG(0, assignable(p, (yyvsp[-2].id), (yyvsp[0].node), &(yyloc)), &(yyloc));
11838 /*% %*/
11839 /*% ripper: rb_assoc_new(get_value(assignable(p, $1)), get_value($3)) %*/
11840 }
11841#line 11837 "parse.c"
11842 break;
11843
11844 case 706:
11845#line 5209 "parse.y"
11846 {
11847 p->cur_arg = 0;
11848 /*%%%*/
11849 (yyval.node) = NEW_OPT_ARG(0, assignable(p, (yyvsp[-2].id), (yyvsp[0].node), &(yyloc)), &(yyloc));
11850 /*% %*/
11851 /*% ripper: rb_assoc_new(get_value(assignable(p, $1)), get_value($3)) %*/
11852 }
11853#line 11849 "parse.c"
11854 break;
11855
11856 case 707:
11857#line 5219 "parse.y"
11858 {
11859 /*%%%*/
11860 (yyval.node) = (yyvsp[0].node);
11861 /*% %*/
11862 /*% ripper: rb_ary_new3(1, get_value($1)) %*/
11863 }
11864#line 11860 "parse.c"
11865 break;
11866
11867 case 708:
11868#line 5226 "parse.y"
11869 {
11870 /*%%%*/
11871 (yyval.node) = opt_arg_append((yyvsp[-2].node), (yyvsp[0].node));
11872 /*% %*/
11873 /*% ripper: rb_ary_push($1, get_value($3)) %*/
11874 }
11875#line 11871 "parse.c"
11876 break;
11877
11878 case 709:
11879#line 5235 "parse.y"
11880 {
11881 /*%%%*/
11882 (yyval.node) = (yyvsp[0].node);
11883 /*% %*/
11884 /*% ripper: rb_ary_new3(1, get_value($1)) %*/
11885 }
11886#line 11882 "parse.c"
11887 break;
11888
11889 case 710:
11890#line 5242 "parse.y"
11891 {
11892 /*%%%*/
11893 (yyval.node) = opt_arg_append((yyvsp[-2].node), (yyvsp[0].node));
11894 /*% %*/
11895 /*% ripper: rb_ary_push($1, get_value($3)) %*/
11896 }
11897#line 11893 "parse.c"
11898 break;
11899
11900 case 713:
11901#line 5255 "parse.y"
11902 {
11903 arg_var(p, shadowing_lvar(p, get_id((yyvsp[0].id))));
11904 /*%%%*/
11905 (yyval.id) = (yyvsp[0].id);
11906 /*% %*/
11907 /*% ripper: rest_param!($2) %*/
11908 }
11909#line 11905 "parse.c"
11910 break;
11911
11912 case 714:
11913#line 5263 "parse.y"
11914 {
11915 /*%%%*/
11916 (yyval.id) = internal_id(p);
11917 arg_var(p, (yyval.id));
11918 /*% %*/
11919 /*% ripper: rest_param!(Qnil) %*/
11920 }
11921#line 11917 "parse.c"
11922 break;
11923
11924 case 717:
11925#line 5277 "parse.y"
11926 {
11927 arg_var(p, shadowing_lvar(p, get_id((yyvsp[0].id))));
11928 /*%%%*/
11929 (yyval.id) = (yyvsp[0].id);
11930 /*% %*/
11931 /*% ripper: blockarg!($2) %*/
11932 }
11933#line 11929 "parse.c"
11934 break;
11935
11936 case 718:
11937#line 5287 "parse.y"
11938 {
11939 (yyval.id) = (yyvsp[0].id);
11940 }
11941#line 11937 "parse.c"
11942 break;
11943
11944 case 719:
11945#line 5291 "parse.y"
11946 {
11947 (yyval.id) = Qnull;
11948 }
11949#line 11945 "parse.c"
11950 break;
11951
11952 case 720:
11953#line 5297 "parse.y"
11954 {
11955 value_expr((yyvsp[0].node));
11956 (yyval.node) = (yyvsp[0].node);
11957 }
11958#line 11954 "parse.c"
11959 break;
11960
11961 case 721:
11962#line 5301 "parse.y"
11963 {SET_LEX_STATE(EXPR_BEG);}
11964#line 11960 "parse.c"
11965 break;
11966
11967 case 722:
11968#line 5302 "parse.y"
11969 {
11970 /*%%%*/
11971 switch (nd_type((yyvsp[-1].node))) {
11972 case NODE_STR:
11973 case NODE_DSTR:
11974 case NODE_XSTR:
11975 case NODE_DXSTR:
11976 case NODE_DREGX:
11977 case NODE_LIT:
11978 case NODE_LIST:
11979 case NODE_ZLIST:
11980 yyerror1(&(yylsp[-1]), "can't define singleton method for literals");
11981 break;
11982 default:
11983 value_expr((yyvsp[-1].node));
11984 break;
11985 }
11986 (yyval.node) = (yyvsp[-1].node);
11987 /*% %*/
11988 /*% ripper: paren!($3) %*/
11989 }
11990#line 11986 "parse.c"
11991 break;
11992
11993 case 724:
11994#line 5327 "parse.y"
11995 {
11996 /*%%%*/
11997 (yyval.node) = (yyvsp[-1].node);
11998 /*% %*/
11999 /*% ripper: assoclist_from_args!($1) %*/
12000 }
12001#line 11997 "parse.c"
12002 break;
12003
12004 case 726:
12005#line 5338 "parse.y"
12006 {
12007 /*%%%*/
12008 NODE *assocs = (yyvsp[-2].node);
12009 NODE *tail = (yyvsp[0].node);
12010 if (!assocs) {
12011 assocs = tail;
12012 }
12013 else if (tail) {
12014 if (assocs->nd_head &&
12015 !tail->nd_head && nd_type(tail->nd_next) == NODE_LIST &&
12016 nd_type(tail->nd_next->nd_head) == NODE_HASH) {
12017 /* DSTAR */
12018 tail = tail->nd_next->nd_head->nd_head;
12019 }
12020 assocs = list_concat(assocs, tail);
12021 }
12022 (yyval.node) = assocs;
12023 /*% %*/
12024 /*% ripper: rb_ary_push($1, get_value($3)) %*/
12025 }
12026#line 12022 "parse.c"
12027 break;
12028
12029 case 727:
12030#line 5361 "parse.y"
12031 {
12032 /*%%%*/
12033 if (nd_type((yyvsp[-2].node)) == NODE_STR) {
12034 nd_set_type((yyvsp[-2].node), NODE_LIT);
12035 RB_OBJ_WRITE(p->ast, &(yyvsp[-2].node)->nd_lit, rb_fstring((yyvsp[-2].node)->nd_lit));
12036 }
12037 (yyval.node) = list_append(p, NEW_LIST((yyvsp[-2].node), &(yyloc)), (yyvsp[0].node));
12038 /*% %*/
12039 /*% ripper: assoc_new!($1, $3) %*/
12040 }
12041#line 12037 "parse.c"
12042 break;
12043
12044 case 728:
12045#line 5372 "parse.y"
12046 {
12047 /*%%%*/
12048 (yyval.node) = list_append(p, NEW_LIST(NEW_LIT(ID2SYM((yyvsp[-1].id)), &(yylsp[-1])), &(yyloc)), (yyvsp[0].node));
12049 /*% %*/
12050 /*% ripper: assoc_new!($1, $2) %*/
12051 }
12052#line 12048 "parse.c"
12053 break;
12054
12055 case 729:
12056#line 5379 "parse.y"
12057 {
12058 /*%%%*/
12059 YYLTYPE loc = code_loc_gen(&(yylsp[-3]), &(yylsp[-1]));
12060 (yyval.node) = list_append(p, NEW_LIST(dsym_node(p, (yyvsp[-2].node), &loc), &loc), (yyvsp[0].node));
12061 /*% %*/
12062 /*% ripper: assoc_new!(dyna_symbol!($2), $4) %*/
12063 }
12064#line 12060 "parse.c"
12065 break;
12066
12067 case 730:
12068#line 5387 "parse.y"
12069 {
12070 /*%%%*/
12071 if (nd_type((yyvsp[0].node)) == NODE_HASH &&
12072 !((yyvsp[0].node)->nd_head && (yyvsp[0].node)->nd_head->nd_alen)) {
12073 static VALUE empty_hash;
12074 if (!empty_hash) {
12075 empty_hash = rb_obj_freeze(rb_hash_new());
12076 rb_gc_register_mark_object(empty_hash);
12077 }
12078 (yyval.node) = list_append(p, NEW_LIST(0, &(yyloc)), NEW_LIT(empty_hash, &(yyloc)));
12079 }
12080 else
12081 (yyval.node) = list_append(p, NEW_LIST(0, &(yyloc)), (yyvsp[0].node));
12082 /*% %*/
12083 /*% ripper: assoc_splat!($2) %*/
12084 }
12085#line 12081 "parse.c"
12086 break;
12087
12088 case 757:
12089#line 5455 "parse.y"
12090 {yyerrok;token_flush(p);}
12091#line 12087 "parse.c"
12092 break;
12093
12094 case 758:
12095#line 5456 "parse.y"
12096 {token_flush(p);}
12097#line 12093 "parse.c"
12098 break;
12099
12100 case 760:
12101#line 5460 "parse.y"
12102 {yyerrok;}
12103#line 12099 "parse.c"
12104 break;
12105
12106 case 761:
12107#line 5464 "parse.y"
12108 {
12109 (yyval.node) = Qnull;
12110 }
12111#line 12107 "parse.c"
12112 break;
12113
12114
12115#line 12111 "parse.c"
12116
12117 default: break;
12118 }
12119 /* User semantic actions sometimes alter yychar, and that requires
12120 that yytoken be updated with the new translation. We take the
12121 approach of translating immediately before every use of yytoken.
12122 One alternative is translating here after every semantic action,
12123 but that translation would be missed if the semantic action invokes
12124 YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
12125 if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
12126 incorrect destructor might then be invoked immediately. In the
12127 case of YYERROR or YYBACKUP, subsequent parser actions might lead
12128 to an incorrect destructor call or verbose syntax error message
12129 before the lookahead is translated. */
12130 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
12131
12132 YYPOPSTACK (yylen);
12133 yylen = 0;
12134 YY_STACK_PRINT (yyss, yyssp);
12135
12136 *++yyvsp = yyval;
12137 *++yylsp = yyloc;
12138
12139 /* Now 'shift' the result of the reduction. Determine what state
12140 that goes to, based on the state we popped back to and the rule
12141 number reduced by. */
12142 {
12143 const int yylhs = yyr1[yyn] - YYNTOKENS;
12144 const int yyi = yypgoto[yylhs] + *yyssp;
12145 yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp
12146 ? yytable[yyi]
12147 : yydefgoto[yylhs]);
12148 }
12149
12150 goto yynewstate;
12151
12152
12153/*--------------------------------------.
12154| yyerrlab -- here on detecting error. |
12155`--------------------------------------*/
12156yyerrlab:
12157 /* Make sure we have latest lookahead translation. See comments at
12158 user semantic actions for why this is necessary. */
12159 yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
12160
12161 /* If not already recovering from an error, report this error. */
12162 if (!yyerrstatus)
12163 {
12164 ++yynerrs;
12165#if ! YYERROR_VERBOSE
12166 yyerror (&yylloc, p, YY_("syntax error"));
12167#else
12168# define YYSYNTAX_ERROR yysyntax_error (p, &yymsg_alloc, &yymsg, \
12169 yyssp, yytoken)
12170 {
12171 char const *yymsgp = YY_("syntax error");
12172 int yysyntax_error_status;
12173 yysyntax_error_status = YYSYNTAX_ERROR;
12174 if (yysyntax_error_status == 0)
12175 yymsgp = yymsg;
12176 else if (yysyntax_error_status == 1)
12177 {
12178 if (yymsg != yymsgbuf)
12179 YYSTACK_FREE (yymsg);
12180 yymsg = YY_CAST (char *, YYSTACK_ALLOC (YY_CAST (YYSIZE_T, yymsg_alloc)));
12181 if (!yymsg)
12182 {
12183 yymsg = yymsgbuf;
12184 yymsg_alloc = sizeof yymsgbuf;
12185 yysyntax_error_status = 2;
12186 }
12187 else
12188 {
12189 yysyntax_error_status = YYSYNTAX_ERROR;
12190 yymsgp = yymsg;
12191 }
12192 }
12193 yyerror (&yylloc, p, yymsgp);
12194 if (yysyntax_error_status == 2)
12195 goto yyexhaustedlab;
12196 }
12197# undef YYSYNTAX_ERROR
12198#endif
12199 }
12200
12201 yyerror_range[1] = yylloc;
12202
12203 if (yyerrstatus == 3)
12204 {
12205 /* If just tried and failed to reuse lookahead token after an
12206 error, discard it. */
12207
12208 if (yychar <= YYEOF)
12209 {
12210 /* Return failure if at end of input. */
12211 if (yychar == YYEOF)
12212 YYABORT;
12213 }
12214 else
12215 {
12216 yydestruct ("Error: discarding",
12217 yytoken, &yylval, &yylloc, p);
12218 yychar = YYEMPTY;
12219 }
12220 }
12221
12222 /* Else will try to reuse lookahead token after shifting the error
12223 token. */
12224 goto yyerrlab1;
12225
12226
12227/*---------------------------------------------------.
12228| yyerrorlab -- error raised explicitly by YYERROR. |
12229`---------------------------------------------------*/
12230yyerrorlab:
12231 /* Pacify compilers when the user code never invokes YYERROR and the
12232 label yyerrorlab therefore never appears in user code. */
12233 if (0)
12234 YYERROR;
12235
12236 /* Do not reclaim the symbols of the rule whose action triggered
12237 this YYERROR. */
12238 YYPOPSTACK (yylen);
12239 yylen = 0;
12240 YY_STACK_PRINT (yyss, yyssp);
12241 yystate = *yyssp;
12242 goto yyerrlab1;
12243
12244
12245/*-------------------------------------------------------------.
12246| yyerrlab1 -- common code for both syntax error and YYERROR. |
12247`-------------------------------------------------------------*/
12248yyerrlab1:
12249 yyerrstatus = 3; /* Each real token shifted decrements this. */
12250
12251 for (;;)
12252 {
12253 yyn = yypact[yystate];
12254 if (!yypact_value_is_default (yyn))
12255 {
12256 yyn += YYTERROR;
12257 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
12258 {
12259 yyn = yytable[yyn];
12260 if (0 < yyn)
12261 break;
12262 }
12263 }
12264
12265 /* Pop the current state because it cannot handle the error token. */
12266 if (yyssp == yyss)
12267 YYABORT;
12268
12269 yyerror_range[1] = *yylsp;
12270 yydestruct ("Error: popping",
12271 yystos[yystate], yyvsp, yylsp, p);
12272 YYPOPSTACK (1);
12273 yystate = *yyssp;
12274 YY_STACK_PRINT (yyss, yyssp);
12275 }
12276
12278 *++yyvsp = yylval;
12280
12281 yyerror_range[2] = yylloc;
12282 /* Using YYLLOC is tempting, but would change the location of
12283 the lookahead. YYLOC is available though. */
12284 YYLLOC_DEFAULT (yyloc, yyerror_range, 2);
12285 *++yylsp = yyloc;
12286
12287 /* Shift the error token. */
12288 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
12289
12290 yystate = yyn;
12291 goto yynewstate;
12292
12293
12294/*-------------------------------------.
12295| yyacceptlab -- YYACCEPT comes here. |
12296`-------------------------------------*/
12297yyacceptlab:
12298 yyresult = 0;
12299 goto yyreturn;
12300
12301
12302/*-----------------------------------.
12303| yyabortlab -- YYABORT comes here. |
12304`-----------------------------------*/
12305yyabortlab:
12306 yyresult = 1;
12307 goto yyreturn;
12308
12309
12310#if !defined yyoverflow || YYERROR_VERBOSE
12311/*-------------------------------------------------.
12312| yyexhaustedlab -- memory exhaustion comes here. |
12313`-------------------------------------------------*/
12314yyexhaustedlab:
12315 yyerror (&yylloc, p, YY_("memory exhausted"));
12316 yyresult = 2;
12317 /* Fall through. */
12318#endif
12319
12320
12321/*-----------------------------------------------------.
12322| yyreturn -- parsing is finished, return the result. |
12323`-----------------------------------------------------*/
12324yyreturn:
12325 if (yychar != YYEMPTY)
12326 {
12327 /* Make sure we have latest lookahead translation. See comments at
12328 user semantic actions for why this is necessary. */
12329 yytoken = YYTRANSLATE (yychar);
12330 yydestruct ("Cleanup: discarding lookahead",
12331 yytoken, &yylval, &yylloc, p);
12332 }
12333 /* Do not reclaim the symbols of the rule whose action triggered
12334 this YYABORT or YYACCEPT. */
12335 YYPOPSTACK (yylen);
12336 YY_STACK_PRINT (yyss, yyssp);
12337 while (yyssp != yyss)
12338 {
12339 yydestruct ("Cleanup: popping",
12340 yystos[+*yyssp], yyvsp, yylsp, p);
12341 YYPOPSTACK (1);
12342 }
12343#ifndef yyoverflow
12344 if (yyss != yyssa)
12345 YYSTACK_FREE (yyss);
12346#endif
12347#if YYERROR_VERBOSE
12348 if (yymsg != yymsgbuf)
12349 YYSTACK_FREE (yymsg);
12350#endif
12351 return yyresult;
12352}
12353#line 5468 "parse.y"
12354
12355# undef p
12356# undef yylex
12357# undef yylval
12358# define yylval (*p->lval)
12359
12360static int regx_options(struct parser_params*);
12361static int tokadd_string(struct parser_params*,int,int,int,long*,rb_encoding**,rb_encoding**);
12362static void tokaddmbc(struct parser_params *p, int c, rb_encoding *enc);
12363static enum yytokentype parse_string(struct parser_params*,rb_strterm_literal_t*);
12364static enum yytokentype here_document(struct parser_params*,rb_strterm_heredoc_t*);
12365
12366#ifndef RIPPER
12367# define set_yylval_node(x) { \
12368 YYLTYPE _cur_loc; \
12369 rb_parser_set_location(p, &_cur_loc); \
12370 yylval.node = (x); \
12371}
12372# define set_yylval_str(x) \
12373do { \
12374 set_yylval_node(NEW_STR(x, &_cur_loc)); \
12375 RB_OBJ_WRITTEN(p->ast, Qnil, x); \
12376} while(0)
12377# define set_yylval_literal(x) \
12378do { \
12379 set_yylval_node(NEW_LIT(x, &_cur_loc)); \
12380 RB_OBJ_WRITTEN(p->ast, Qnil, x); \
12381} while(0)
12382# define set_yylval_num(x) (yylval.num = (x))
12383# define set_yylval_id(x) (yylval.id = (x))
12384# define set_yylval_name(x) (yylval.id = (x))
12385# define yylval_id() (yylval.id)
12386#else
12387static inline VALUE
12388ripper_yylval_id(struct parser_params *p, ID x)
12389{
12390 return ripper_new_yylval(p, x, ID2SYM(x), 0);
12391}
12392# define set_yylval_str(x) (yylval.val = add_mark_object(p, (x)))
12393# define set_yylval_num(x) (yylval.val = ripper_new_yylval(p, (x), 0, 0))
12394# define set_yylval_id(x) (void)(x)
12395# define set_yylval_name(x) (void)(yylval.val = ripper_yylval_id(p, x))
12396# define set_yylval_literal(x) add_mark_object(p, (x))
12397# define set_yylval_node(x) (void)(x)
12398# define yylval_id() yylval.id
12399# define _cur_loc NULL_LOC /* dummy */
12400#endif
12401
12402#define set_yylval_noname() set_yylval_id(keyword_nil)
12403
12404#ifndef RIPPER
12405#define literal_flush(p, ptr) ((p)->lex.ptok = (ptr))
12406#define dispatch_scan_event(p, t) ((void)0)
12407#define dispatch_delayed_token(p, t) ((void)0)
12408#define has_delayed_token(p) (0)
12409#else
12410#define literal_flush(p, ptr) ((void)(ptr))
12411
12412#define yylval_rval (*(RB_TYPE_P(yylval.val, T_NODE) ? &yylval.node->nd_rval : &yylval.val))
12413
12414static inline VALUE
12415intern_sym(const char *name)
12416{
12417 ID id = rb_intern_const(name);
12418 return ID2SYM(id);
12419}
12420
12421static int
12422ripper_has_scan_event(struct parser_params *p)
12423{
12424 if (p->lex.pcur < p->lex.ptok) rb_raise(rb_eRuntimeError, "lex.pcur < lex.ptok");
12425 return p->lex.pcur > p->lex.ptok;
12426}
12427
12428static VALUE
12429ripper_scan_event_val(struct parser_params *p, enum yytokentype t)
12430{
12431 VALUE str = STR_NEW(p->lex.ptok, p->lex.pcur - p->lex.ptok);
12432 VALUE rval = ripper_dispatch1(p, ripper_token2eventid(t), str);
12433 token_flush(p);
12434 return rval;
12435}
12436
12437static void
12438ripper_dispatch_scan_event(struct parser_params *p, enum yytokentype t)
12439{
12440 if (!ripper_has_scan_event(p)) return;
12441 add_mark_object(p, yylval_rval = ripper_scan_event_val(p, t));
12442}
12443#define dispatch_scan_event(p, t) ripper_dispatch_scan_event(p, t)
12444
12445static void
12446ripper_dispatch_delayed_token(struct parser_params *p, enum yytokentype t)
12447{
12448 int saved_line = p->ruby_sourceline;
12449 const char *saved_tokp = p->lex.ptok;
12450
12451 if (NIL_P(p->delayed.token)) return;
12452 p->ruby_sourceline = p->delayed.line;
12453 p->lex.ptok = p->lex.pbeg + p->delayed.col;
12454 add_mark_object(p, yylval_rval = ripper_dispatch1(p, ripper_token2eventid(t), p->delayed.token));
12455 p->delayed.token = Qnil;
12456 p->ruby_sourceline = saved_line;
12457 p->lex.ptok = saved_tokp;
12458}
12459#define dispatch_delayed_token(p, t) ripper_dispatch_delayed_token(p, t)
12460#define has_delayed_token(p) (!NIL_P(p->delayed.token))
12461#endif /* RIPPER */
12462
12463#include "ruby/regex.h"
12464#include "ruby/util.h"
12465
12466static inline int
12467is_identchar(const char *ptr, const char *MAYBE_UNUSED(ptr_end), rb_encoding *enc)
12468{
12469 return rb_enc_isalnum((unsigned char)*ptr, enc) || *ptr == '_' || !ISASCII(*ptr);
12470}
12471
12472static inline int
12473parser_is_identchar(struct parser_params *p)
12474{
12475 return !(p)->eofp && is_identchar(p->lex.pcur-1, p->lex.pend, p->enc);
12476}
12477
12478static inline int
12479parser_isascii(struct parser_params *p)
12480{
12481 return ISASCII(*(p->lex.pcur-1));
12482}
12483
12484static void
12485token_info_setup(token_info *ptinfo, const char *ptr, const rb_code_location_t *loc)
12486{
12487 int column = 1, nonspc = 0, i;
12488 for (i = 0; i < loc->beg_pos.column; i++, ptr++) {
12489 if (*ptr == '\t') {
12490 column = (((column - 1) / TAB_WIDTH) + 1) * TAB_WIDTH;
12491 }
12492 column++;
12493 if (*ptr != ' ' && *ptr != '\t') {
12494 nonspc = 1;
12495 }
12496 }
12497
12498 ptinfo->beg = loc->beg_pos;
12499 ptinfo->indent = column;
12500 ptinfo->nonspc = nonspc;
12501}
12502
12503static void
12504token_info_push(struct parser_params *p, const char *token, const rb_code_location_t *loc)
12505{
12506 token_info *ptinfo;
12507
12508 if (!p->token_info_enabled) return;
12509 ptinfo = ALLOC(token_info);
12510 ptinfo->token = token;
12511 ptinfo->next = p->token_info;
12512 token_info_setup(ptinfo, p->lex.pbeg, loc);
12513
12514 p->token_info = ptinfo;
12515}
12516
12517static void
12518token_info_pop(struct parser_params *p, const char *token, const rb_code_location_t *loc)
12519{
12520 token_info *ptinfo_beg = p->token_info;
12521
12522 if (!ptinfo_beg) return;
12523 p->token_info = ptinfo_beg->next;
12524
12525 /* indentation check of matched keywords (begin..end, if..end, etc.) */
12526 token_info_warn(p, token, ptinfo_beg, 1, loc);
12527 ruby_sized_xfree(ptinfo_beg, sizeof(*ptinfo_beg));
12528}
12529
12530static void
12531token_info_warn(struct parser_params *p, const char *token, token_info *ptinfo_beg, int same, const rb_code_location_t *loc)
12532{
12533 token_info ptinfo_end_body, *ptinfo_end = &ptinfo_end_body;
12534 if (!p->token_info_enabled) return;
12535 if (!ptinfo_beg) return;
12536 token_info_setup(ptinfo_end, p->lex.pbeg, loc);
12537 if (ptinfo_beg->beg.lineno == ptinfo_end->beg.lineno) return; /* ignore one-line block */
12538 if (ptinfo_beg->nonspc || ptinfo_end->nonspc) return; /* ignore keyword in the middle of a line */
12539 if (ptinfo_beg->indent == ptinfo_end->indent) return; /* the indents are matched */
12540 if (!same && ptinfo_beg->indent < ptinfo_end->indent) return;
12541 rb_warn3L(ptinfo_end->beg.lineno,
12542 "mismatched indentations at '%s' with '%s' at %d",
12543 WARN_S(token), WARN_S(ptinfo_beg->token), WARN_I(ptinfo_beg->beg.lineno));
12544}
12545
12546static int
12547parser_precise_mbclen(struct parser_params *p, const char *ptr)
12548{
12549 int len = rb_enc_precise_mbclen(ptr, p->lex.pend, p->enc);
12550 if (!MBCLEN_CHARFOUND_P(len)) {
12551 compile_error(p, "invalid multibyte char (%s)", rb_enc_name(p->enc));
12552 return -1;
12553 }
12554 return len;
12555}
12556
12557#ifndef RIPPER
12558static void ruby_show_error_line(VALUE errbuf, const YYLTYPE *yylloc, int lineno, VALUE str);
12559
12560static inline void
12561parser_show_error_line(struct parser_params *p, const YYLTYPE *yylloc)
12562{
12563 VALUE str;
12564 int lineno = p->ruby_sourceline;
12565 if (!yylloc) {
12566 return;
12567 }
12568 else if (yylloc->beg_pos.lineno == lineno) {
12569 str = p->lex.lastline;
12570 }
12571 else {
12572 return;
12573 }
12574 ruby_show_error_line(p->error_buffer, yylloc, lineno, str);
12575}
12576
12577static int
12578parser_yyerror(struct parser_params *p, const YYLTYPE *yylloc, const char *msg)
12579{
12580 YYLTYPE current;
12581
12582 if (!yylloc) {
12583 yylloc = RUBY_SET_YYLLOC(current);
12584 }
12585 else if ((p->ruby_sourceline != yylloc->beg_pos.lineno &&
12586 p->ruby_sourceline != yylloc->end_pos.lineno) ||
12587 (yylloc->beg_pos.lineno == yylloc->end_pos.lineno &&
12588 yylloc->beg_pos.column == yylloc->end_pos.column)) {
12589 yylloc = 0;
12590 }
12591 compile_error(p, "%s", msg);
12592 parser_show_error_line(p, yylloc);
12593 return 0;
12594}
12595
12596static void
12597ruby_show_error_line(VALUE errbuf, const YYLTYPE *yylloc, int lineno, VALUE str)
12598{
12599 VALUE mesg;
12600 const int max_line_margin = 30;
12601 const char *ptr, *ptr_end, *pt, *pb;
12602 const char *pre = "", *post = "", *pend;
12603 const char *code = "", *caret = "";
12604 const char *lim;
12605 const char *const pbeg = RSTRING_PTR(str);
12606 char *buf;
12607 long len;
12608 int i;
12609
12610 if (!yylloc) return;
12611 pend = RSTRING_END(str);
12612 if (pend > pbeg && pend[-1] == '\n') {
12613 if (--pend > pbeg && pend[-1] == '\r') --pend;
12614 }
12615
12616 pt = pend;
12617 if (lineno == yylloc->end_pos.lineno &&
12618 (pend - pbeg) > yylloc->end_pos.column) {
12619 pt = pbeg + yylloc->end_pos.column;
12620 }
12621
12622 ptr = ptr_end = pt;
12623 lim = ptr - pbeg > max_line_margin ? ptr - max_line_margin : pbeg;
12624 while ((lim < ptr) && (*(ptr-1) != '\n')) ptr--;
12625
12626 lim = pend - ptr_end > max_line_margin ? ptr_end + max_line_margin : pend;
12627 while ((ptr_end < lim) && (*ptr_end != '\n') && (*ptr_end != '\r')) ptr_end++;
12628
12629 len = ptr_end - ptr;
12630 if (len > 4) {
12631 if (ptr > pbeg) {
12632 ptr = rb_enc_prev_char(pbeg, ptr, pt, rb_enc_get(str));
12633 if (ptr > pbeg) pre = "...";
12634 }
12635 if (ptr_end < pend) {
12636 ptr_end = rb_enc_prev_char(pt, ptr_end, pend, rb_enc_get(str));
12637 if (ptr_end < pend) post = "...";
12638 }
12639 }
12640 pb = pbeg;
12641 if (lineno == yylloc->beg_pos.lineno) {
12642 pb += yylloc->beg_pos.column;
12643 if (pb > pt) pb = pt;
12644 }
12645 if (pb < ptr) pb = ptr;
12646 if (len <= 4 && yylloc->beg_pos.lineno == yylloc->end_pos.lineno) {
12647 return;
12648 }
12649 if (RTEST(errbuf)) {
12650 mesg = rb_attr_get(errbuf, idMesg);
12651 if (RSTRING_LEN(mesg) > 0 && *(RSTRING_END(mesg)-1) != '\n')
12652 rb_str_cat_cstr(mesg, "\n");
12653 }
12654 else {
12655 mesg = rb_enc_str_new(0, 0, rb_enc_get(str));
12656 }
12657 if (!errbuf && rb_stderr_tty_p()) {
12658#define CSI_BEGIN "\033["
12659#define CSI_SGR "m"
12660 rb_str_catf(mesg,
12661 CSI_BEGIN""CSI_SGR"%s" /* pre */
12662 CSI_BEGIN"1"CSI_SGR"%.*s"
12663 CSI_BEGIN"1;4"CSI_SGR"%.*s"
12664 CSI_BEGIN";1"CSI_SGR"%.*s"
12665 CSI_BEGIN""CSI_SGR"%s" /* post */
12666 "\n",
12667 pre,
12668 (int)(pb - ptr), ptr,
12669 (int)(pt - pb), pb,
12670 (int)(ptr_end - pt), pt,
12671 post);
12672 }
12673 else {
12674 char *p2;
12675
12676 len = ptr_end - ptr;
12677 lim = pt < pend ? pt : pend;
12678 i = (int)(lim - ptr);
12679 buf = ALLOCA_N(char, i+2);
12680 code = ptr;
12681 caret = p2 = buf;
12682 if (ptr <= pb) {
12683 while (ptr < pb) {
12684 *p2++ = *ptr++ == '\t' ? '\t' : ' ';
12685 }
12686 *p2++ = '^';
12687 ptr++;
12688 }
12689 if (lim > ptr) {
12690 memset(p2, '~', (lim - ptr));
12691 p2 += (lim - ptr);
12692 }
12693 *p2 = '\0';
12694 rb_str_catf(mesg, "%s%.*s%s\n""%s%s\n",
12695 pre, (int)len, code, post,
12696 pre, caret);
12697 }
12698 if (!errbuf) rb_write_error_str(mesg);
12699}
12700#else
12701static int
12702parser_yyerror(struct parser_params *p, const YYLTYPE *yylloc, const char *msg)
12703{
12704 const char *pcur = 0, *ptok = 0;
12705 if (yylloc &&
12706 p->ruby_sourceline == yylloc->beg_pos.lineno &&
12707 p->ruby_sourceline == yylloc->end_pos.lineno) {
12708 pcur = p->lex.pcur;
12709 ptok = p->lex.ptok;
12710 p->lex.ptok = p->lex.pbeg + yylloc->beg_pos.column;
12711 p->lex.pcur = p->lex.pbeg + yylloc->end_pos.column;
12712 }
12713 dispatch1(parse_error, STR_NEW2(msg));
12714 ripper_error(p);
12715 if (pcur) {
12716 p->lex.ptok = ptok;
12717 p->lex.pcur = pcur;
12718 }
12719 return 0;
12720}
12721
12722static inline void
12723parser_show_error_line(struct parser_params *p, const YYLTYPE *yylloc)
12724{
12725}
12726#endif /* !RIPPER */
12727
12728#ifndef RIPPER
12729static int
12730vtable_size(const struct vtable *tbl)
12731{
12732 if (!DVARS_TERMINAL_P(tbl)) {
12733 return tbl->pos;
12734 }
12735 else {
12736 return 0;
12737 }
12738}
12739#endif
12740
12741static struct vtable *
12742vtable_alloc_gen(struct parser_params *p, int line, struct vtable *prev)
12743{
12744 struct vtable *tbl = ALLOC(struct vtable);
12745 tbl->pos = 0;
12746 tbl->capa = 8;
12747 tbl->tbl = ALLOC_N(ID, tbl->capa);
12748 tbl->prev = prev;
12749#ifndef RIPPER
12750 if (p->debug) {
12751 rb_parser_printf(p, "vtable_alloc:%d: %p\n", line, (void *)tbl);
12752 }
12753#endif
12754 return tbl;
12755}
12756#define vtable_alloc(prev) vtable_alloc_gen(p, __LINE__, prev)
12757
12758static void
12759vtable_free_gen(struct parser_params *p, int line, const char *name,
12760 struct vtable *tbl)
12761{
12762#ifndef RIPPER
12763 if (p->debug) {
12764 rb_parser_printf(p, "vtable_free:%d: %s(%p)\n", line, name, (void *)tbl);
12765 }
12766#endif
12767 if (!DVARS_TERMINAL_P(tbl)) {
12768 if (tbl->tbl) {
12769 ruby_sized_xfree(tbl->tbl, tbl->capa * sizeof(ID));
12770 }
12771 ruby_sized_xfree(tbl, sizeof(tbl));
12772 }
12773}
12774#define vtable_free(tbl) vtable_free_gen(p, __LINE__, #tbl, tbl)
12775
12776static void
12777vtable_add_gen(struct parser_params *p, int line, const char *name,
12778 struct vtable *tbl, ID id)
12779{
12780#ifndef RIPPER
12781 if (p->debug) {
12782 rb_parser_printf(p, "vtable_add:%d: %s(%p), %s\n",
12783 line, name, (void *)tbl, rb_id2name(id));
12784 }
12785#endif
12786 if (DVARS_TERMINAL_P(tbl)) {
12787 rb_parser_fatal(p, "vtable_add: vtable is not allocated (%p)", (void *)tbl);
12788 return;
12789 }
12790 if (tbl->pos == tbl->capa) {
12791 tbl->capa = tbl->capa * 2;
12792 SIZED_REALLOC_N(tbl->tbl, ID, tbl->capa, tbl->pos);
12793 }
12794 tbl->tbl[tbl->pos++] = id;
12795}
12796#define vtable_add(tbl, id) vtable_add_gen(p, __LINE__, #tbl, tbl, id)
12797
12798#ifndef RIPPER
12799static void
12800vtable_pop_gen(struct parser_params *p, int line, const char *name,
12801 struct vtable *tbl, int n)
12802{
12803 if (p->debug) {
12804 rb_parser_printf(p, "vtable_pop:%d: %s(%p), %d\n",
12805 line, name, (void *)tbl, n);
12806 }
12807 if (tbl->pos < n) {
12808 rb_parser_fatal(p, "vtable_pop: unreachable (%d < %d)", tbl->pos, n);
12809 return;
12810 }
12811 tbl->pos -= n;
12812}
12813#define vtable_pop(tbl, n) vtable_pop_gen(p, __LINE__, #tbl, tbl, n)
12814#endif
12815
12816static int
12817vtable_included(const struct vtable * tbl, ID id)
12818{
12819 int i;
12820
12821 if (!DVARS_TERMINAL_P(tbl)) {
12822 for (i = 0; i < tbl->pos; i++) {
12823 if (tbl->tbl[i] == id) {
12824 return i+1;
12825 }
12826 }
12827 }
12828 return 0;
12829}
12830
12831static void parser_prepare(struct parser_params *p);
12832
12833#ifndef RIPPER
12834static NODE *parser_append_options(struct parser_params *p, NODE *node);
12835
12836static VALUE
12837debug_lines(VALUE fname)
12838{
12839 ID script_lines;
12840 CONST_ID(script_lines, "SCRIPT_LINES__");
12841 if (rb_const_defined_at(rb_cObject, script_lines)) {
12842 VALUE hash = rb_const_get_at(rb_cObject, script_lines);
12843 if (RB_TYPE_P(hash, T_HASH)) {
12844 VALUE lines = rb_ary_new();
12845 rb_hash_aset(hash, fname, lines);
12846 return lines;
12847 }
12848 }
12849 return 0;
12850}
12851
12852static int
12853e_option_supplied(struct parser_params *p)
12854{
12855 return strcmp(p->ruby_sourcefile, "-e") == 0;
12856}
12857
12858static VALUE
12859yycompile0(VALUE arg)
12860{
12861 int n;
12862 NODE *tree;
12863 struct parser_params *p = (struct parser_params *)arg;
12864 VALUE cov = Qfalse;
12865
12868 if (p->debug_lines && p->ruby_sourceline > 0) {
12869 VALUE str = STR_NEW0();
12870 n = p->ruby_sourceline;
12871 do {
12873 } while (--n);
12874 }
12875
12876 if (!e_option_supplied(p)) {
12877 cov = Qtrue;
12878 }
12879 }
12880
12881 parser_prepare(p);
12882#define RUBY_DTRACE_PARSE_HOOK(name) \
12883 if (RUBY_DTRACE_PARSE_##name##_ENABLED()) { \
12884 RUBY_DTRACE_PARSE_##name(p->ruby_sourcefile, p->ruby_sourceline); \
12885 }
12887 n = yyparse(p);
12889 p->debug_lines = 0;
12890
12891 p->lex.strterm = 0;
12892 p->lex.pcur = p->lex.pbeg = p->lex.pend = 0;
12893 p->lex.prevline = p->lex.lastline = p->lex.nextline = 0;
12894 if (n || p->error_p) {
12895 VALUE mesg = p->error_buffer;
12896 if (!mesg) {
12898 }
12899 rb_set_errinfo(mesg);
12900 return FALSE;
12901 }
12902 tree = p->eval_tree;
12903 if (!tree) {
12904 tree = NEW_NIL(&NULL_LOC);
12905 }
12906 else {
12907 VALUE opt = p->compile_option;
12908 NODE *prelude;
12909 NODE *body = parser_append_options(p, tree->nd_body);
12910 if (!opt) opt = rb_obj_hide(rb_ident_hash_new());
12911 rb_hash_aset(opt, rb_sym_intern_ascii_cstr("coverage_enabled"), cov);
12912 prelude = block_append(p, p->eval_tree_begin, body);
12913 tree->nd_body = prelude;
12914 RB_OBJ_WRITE(p->ast, &p->ast->body.compile_option, opt);
12915 }
12916 p->ast->body.root = tree;
12917 p->ast->body.line_count = p->line_count;
12918 return TRUE;
12919}
12920
12921static rb_ast_t *
12922yycompile(VALUE vparser, struct parser_params *p, VALUE fname, int line)
12923{
12924 rb_ast_t *ast;
12925 if (NIL_P(fname)) {
12927 p->ruby_sourcefile = "(none)";
12928 }
12929 else {
12931 p->ruby_sourcefile = StringValueCStr(fname);
12932 }
12933 p->ruby_sourceline = line - 1;
12934
12935 p->ast = ast = rb_ast_new();
12936 rb_suppress_tracing(yycompile0, (VALUE)p);
12937 p->ast = 0;
12938 RB_GC_GUARD(vparser); /* prohibit tail call optimization */
12939
12940 return ast;
12941}
12942#endif /* !RIPPER */
12943
12944static rb_encoding *
12945must_be_ascii_compatible(VALUE s)
12946{
12948 if (!rb_enc_asciicompat(enc)) {
12949 rb_raise(rb_eArgError, "invalid source encoding");
12950 }
12951 return enc;
12952}
12953
12954static VALUE
12955lex_get_str(struct parser_params *p, VALUE s)
12956{
12957 char *beg, *end, *start;
12958 long len;
12959
12960 beg = RSTRING_PTR(s);
12961 len = RSTRING_LEN(s);
12962 start = beg;
12963 if (p->lex.gets_.ptr) {
12964 if (len == p->lex.gets_.ptr) return Qnil;
12965 beg += p->lex.gets_.ptr;
12966 len -= p->lex.gets_.ptr;
12967 }
12968 end = memchr(beg, '\n', len);
12969 if (end) len = ++end - beg;
12970 p->lex.gets_.ptr += len;
12971 return rb_str_subseq(s, beg - start, len);
12972}
12973
12974static VALUE
12975lex_getline(struct parser_params *p)
12976{
12977 VALUE line = (*p->lex.gets)(p, p->lex.input);
12978 if (NIL_P(line)) return line;
12979 must_be_ascii_compatible(line);
12980#ifndef RIPPER
12981 if (p->debug_lines) {
12982 rb_enc_associate(line, p->enc);
12983 rb_ary_push(p->debug_lines, line);
12984 }
12985#endif
12986 p->line_count++;
12987 return line;
12988}
12989
12990static const rb_data_type_t parser_data_type;
12991
12992#ifndef RIPPER
12993static rb_ast_t*
12994parser_compile_string(VALUE vparser, VALUE fname, VALUE s, int line)
12995{
12996 struct parser_params *p;
12997
12998 TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, p);
12999
13000 p->lex.gets = lex_get_str;
13001 p->lex.gets_.ptr = 0;
13002 p->lex.input = rb_str_new_frozen(s);
13003 p->lex.pbeg = p->lex.pcur = p->lex.pend = 0;
13004
13005 return yycompile(vparser, p, fname, line);
13006}
13007
13008rb_ast_t*
13009rb_parser_compile_string(VALUE vparser, const char *f, VALUE s, int line)
13010{
13012}
13013
13014rb_ast_t*
13016{
13017 must_be_ascii_compatible(s);
13018 return parser_compile_string(vparser, f, s, line);
13019}
13020
13022
13023static VALUE
13024lex_io_gets(struct parser_params *p, VALUE io)
13025{
13026 return rb_io_gets_internal(io);
13027}
13028
13029rb_ast_t*
13030rb_parser_compile_file_path(VALUE vparser, VALUE fname, VALUE file, int start)
13031{
13032 struct parser_params *p;
13033
13034 TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, p);
13035
13036 p->lex.gets = lex_io_gets;
13037 p->lex.input = file;
13038 p->lex.pbeg = p->lex.pcur = p->lex.pend = 0;
13039
13040 return yycompile(vparser, p, fname, start);
13041}
13042
13043static VALUE
13044lex_generic_gets(struct parser_params *p, VALUE input)
13045{
13046 return (*p->lex.gets_.call)(input, p->line_count);
13047}
13048
13049rb_ast_t*
13050rb_parser_compile_generic(VALUE vparser, VALUE (*lex_gets)(VALUE, int), VALUE fname, VALUE input, int start)
13051{
13052 struct parser_params *p;
13053
13054 TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, p);
13055
13056 p->lex.gets = lex_generic_gets;
13057 p->lex.gets_.call = lex_gets;
13058 p->lex.input = input;
13059 p->lex.pbeg = p->lex.pcur = p->lex.pend = 0;
13060
13061 return yycompile(vparser, p, fname, start);
13062}
13063#endif /* !RIPPER */
13064
13065#define STR_FUNC_ESCAPE 0x01
13066#define STR_FUNC_EXPAND 0x02
13067#define STR_FUNC_REGEXP 0x04
13068#define STR_FUNC_QWORDS 0x08
13069#define STR_FUNC_SYMBOL 0x10
13070#define STR_FUNC_INDENT 0x20
13071#define STR_FUNC_LABEL 0x40
13072#define STR_FUNC_LIST 0x4000
13073#define STR_FUNC_TERM 0x8000
13074
13086
13087static VALUE
13088parser_str_new(const char *ptr, long len, rb_encoding *enc, int func, rb_encoding *enc0)
13089{
13090 VALUE str;
13091
13093 if (!(func & STR_FUNC_REGEXP) && rb_enc_asciicompat(enc)) {
13095 }
13096 else if (enc0 == rb_usascii_encoding() && enc != rb_utf8_encoding()) {
13098 }
13099 }
13100
13101 return str;
13102}
13103
13104#define lex_goto_eol(p) ((p)->lex.pcur = (p)->lex.pend)
13105#define lex_eol_p(p) ((p)->lex.pcur >= (p)->lex.pend)
13106#define lex_eol_n_p(p,n) ((p)->lex.pcur+(n) >= (p)->lex.pend)
13107#define peek(p,c) peek_n(p, (c), 0)
13108#define peek_n(p,c,n) (!lex_eol_n_p(p, n) && (c) == (unsigned char)(p)->lex.pcur[n])
13109#define peekc(p) peekc_n(p, 0)
13110#define peekc_n(p,n) (lex_eol_n_p(p, n) ? -1 : (unsigned char)(p)->lex.pcur[n])
13111
13112#ifdef RIPPER
13113static void
13114add_delayed_token(struct parser_params *p, const char *tok, const char *end)
13115{
13116 if (tok < end) {
13117 if (!has_delayed_token(p)) {
13118 p->delayed.token = rb_str_buf_new(end - tok);
13119 rb_enc_associate(p->delayed.token, p->enc);
13120 p->delayed.line = p->ruby_sourceline;
13121 p->delayed.col = rb_long2int(tok - p->lex.pbeg);
13122 }
13123 rb_str_buf_cat(p->delayed.token, tok, end - tok);
13124 p->lex.ptok = end;
13125 }
13126}
13127#else
13128#define add_delayed_token(p, tok, end) ((void)(tok), (void)(end))
13129#endif
13130
13131static int
13132nextline(struct parser_params *p)
13133{
13134 VALUE v = p->lex.nextline;
13135 p->lex.nextline = 0;
13136 if (!v) {
13137 if (p->eofp)
13138 return -1;
13139
13140 if (p->lex.pend > p->lex.pbeg && *(p->lex.pend-1) != '\n') {
13141 goto end_of_input;
13142 }
13143
13144 if (!p->lex.input || NIL_P(v = lex_getline(p))) {
13145 end_of_input:
13146 p->eofp = 1;
13147 lex_goto_eol(p);
13148 return -1;
13149 }
13150 p->cr_seen = FALSE;
13151 }
13152 else if (NIL_P(v)) {
13153 /* after here-document without terminator */
13154 goto end_of_input;
13155 }
13156 add_delayed_token(p, p->lex.ptok, p->lex.pend);
13157 if (p->heredoc_end > 0) {
13159 p->heredoc_end = 0;
13160 }
13161 p->ruby_sourceline++;
13162 p->lex.pbeg = p->lex.pcur = RSTRING_PTR(v);
13163 p->lex.pend = p->lex.pcur + RSTRING_LEN(v);
13164 token_flush(p);
13165 p->lex.prevline = p->lex.lastline;
13166 p->lex.lastline = v;
13167 return 0;
13168}
13169
13170static int
13171parser_cr(struct parser_params *p, int c)
13172{
13173 if (peek(p, '\n')) {
13174 p->lex.pcur++;
13175 c = '\n';
13176 }
13177 else if (!p->cr_seen) {
13178 p->cr_seen = TRUE;
13179 /* carried over with p->lex.nextline for nextc() */
13180 rb_warn0("encountered \\r in middle of line, treated as a mere space");
13181 }
13182 return c;
13183}
13184
13185static inline int
13186nextc(struct parser_params *p)
13187{
13188 int c;
13189
13190 if (UNLIKELY((p->lex.pcur == p->lex.pend) || p->eofp || RTEST(p->lex.nextline))) {
13191 if (nextline(p)) return -1;
13192 }
13193 c = (unsigned char)*p->lex.pcur++;
13194 if (UNLIKELY(c == '\r')) {
13195 c = parser_cr(p, c);
13196 }
13197
13198 return c;
13199}
13200
13201static void
13202pushback(struct parser_params *p, int c)
13203{
13204 if (c == -1) return;
13205 p->lex.pcur--;
13206 if (p->lex.pcur > p->lex.pbeg && p->lex.pcur[0] == '\n' && p->lex.pcur[-1] == '\r') {
13207 p->lex.pcur--;
13208 }
13209}
13210
13211#define was_bol(p) ((p)->lex.pcur == (p)->lex.pbeg + 1)
13212
13213#define tokfix(p) ((p)->tokenbuf[(p)->tokidx]='\0')
13214#define tok(p) (p)->tokenbuf
13215#define toklen(p) (p)->tokidx
13216
13217static int
13218looking_at_eol_p(struct parser_params *p)
13219{
13220 const char *ptr = p->lex.pcur;
13221 while (ptr < p->lex.pend) {
13222 int c = (unsigned char)*ptr++;
13223 int eol = (c == '\n' || c == '#');
13224 if (eol || !ISSPACE(c)) {
13225 return eol;
13226 }
13227 }
13228 return TRUE;
13229}
13230
13231static char*
13232newtok(struct parser_params *p)
13233{
13234 p->tokidx = 0;
13235 p->tokline = p->ruby_sourceline;
13236 if (!p->tokenbuf) {
13237 p->toksiz = 60;
13238 p->tokenbuf = ALLOC_N(char, 60);
13239 }
13240 if (p->toksiz > 4096) {
13241 p->toksiz = 60;
13242 REALLOC_N(p->tokenbuf, char, 60);
13243 }
13244 return p->tokenbuf;
13245}
13246
13247static char *
13248tokspace(struct parser_params *p, int n)
13249{
13250 p->tokidx += n;
13251
13252 if (p->tokidx >= p->toksiz) {
13253 do {p->toksiz *= 2;} while (p->toksiz < p->tokidx);
13254 REALLOC_N(p->tokenbuf, char, p->toksiz);
13255 }
13256 return &p->tokenbuf[p->tokidx-n];
13257}
13258
13259static void
13260tokadd(struct parser_params *p, int c)
13261{
13262 p->tokenbuf[p->tokidx++] = (char)c;
13263 if (p->tokidx >= p->toksiz) {
13264 p->toksiz *= 2;
13265 REALLOC_N(p->tokenbuf, char, p->toksiz);
13266 }
13267}
13268
13269static int
13270tok_hex(struct parser_params *p, size_t *numlen)
13271{
13272 int c;
13273
13274 c = scan_hex(p->lex.pcur, 2, numlen);
13275 if (!*numlen) {
13276 yyerror0("invalid hex escape");
13277 token_flush(p);
13278 return 0;
13279 }
13280 p->lex.pcur += *numlen;
13281 return c;
13282}
13283
13284#define tokcopy(p, n) memcpy(tokspace(p, n), (p)->lex.pcur - (n), (n))
13285
13286static int
13287escaped_control_code(int c)
13288{
13289 int c2 = 0;
13290 switch (c) {
13291 case ' ':
13292 c2 = 's';
13293 break;
13294 case '\n':
13295 c2 = 'n';
13296 break;
13297 case '\t':
13298 c2 = 't';
13299 break;
13300 case '\v':
13301 c2 = 'v';
13302 break;
13303 case '\r':
13304 c2 = 'r';
13305 break;
13306 case '\f':
13307 c2 = 'f';
13308 break;
13309 }
13310 return c2;
13311}
13312
13313#define WARN_SPACE_CHAR(c, prefix) \
13314 rb_warn1("invalid character syntax; use "prefix"\\%c", WARN_I(c2))
13315
13316static int
13317tokadd_codepoint(struct parser_params *p, rb_encoding **encp,
13318 int regexp_literal, int wide)
13319{
13320 size_t numlen;
13321 int codepoint = scan_hex(p->lex.pcur, wide ? p->lex.pend - p->lex.pcur : 4, &numlen);
13322 literal_flush(p, p->lex.pcur);
13323 p->lex.pcur += numlen;
13324 if (wide ? (numlen == 0 || numlen > 6) : (numlen < 4)) {
13325 yyerror0("invalid Unicode escape");
13326 return wide && numlen > 0;
13327 }
13328 if (codepoint > 0x10ffff) {
13329 yyerror0("invalid Unicode codepoint (too large)");
13330 return wide;
13331 }
13332 if ((codepoint & 0xfffff800) == 0xd800) {
13333 yyerror0("invalid Unicode codepoint");
13334 return wide;
13335 }
13336 if (regexp_literal) {
13337 tokcopy(p, (int)numlen);
13338 }
13339 else if (codepoint >= 0x80) {
13340 rb_encoding *utf8 = rb_utf8_encoding();
13341 if (*encp && utf8 != *encp) {
13342 YYLTYPE loc = RUBY_INIT_YYLLOC();
13343 compile_error(p, "UTF-8 mixed within %s source", rb_enc_name(*encp));
13344 parser_show_error_line(p, &loc);
13345 return wide;
13346 }
13347 *encp = utf8;
13348 tokaddmbc(p, codepoint, *encp);
13349 }
13350 else {
13351 tokadd(p, codepoint);
13352 }
13353 return TRUE;
13354}
13355
13356/* return value is for ?\u3042 */
13357static void
13358tokadd_utf8(struct parser_params *p, rb_encoding **encp,
13359 int term, int symbol_literal, int regexp_literal)
13360{
13361 /*
13362 * If `term` is not -1, then we allow multiple codepoints in \u{}
13363 * upto `term` byte, otherwise we're parsing a character literal.
13364 * And then add the codepoints to the current token.
13365 */
13366 static const char multiple_codepoints[] = "Multiple codepoints at single character literal";
13367
13368 const int open_brace = '{', close_brace = '}';
13369
13370 if (regexp_literal) { tokadd(p, '\\'); tokadd(p, 'u'); }
13371
13372 if (peek(p, open_brace)) { /* handle \u{...} form */
13373 const char *second = NULL;
13374 int c, last = nextc(p);
13375 if (p->lex.pcur >= p->lex.pend) goto unterminated;
13376 while (ISSPACE(c = *p->lex.pcur) && ++p->lex.pcur < p->lex.pend);
13377 while (c != close_brace) {
13378 if (c == term) goto unterminated;
13379 if (second == multiple_codepoints)
13380 second = p->lex.pcur;
13381 if (regexp_literal) tokadd(p, last);
13382 if (!tokadd_codepoint(p, encp, regexp_literal, TRUE)) {
13383 break;
13384 }
13385 while (ISSPACE(c = *p->lex.pcur)) {
13386 if (++p->lex.pcur >= p->lex.pend) goto unterminated;
13387 last = c;
13388 }
13389 if (term == -1 && !second)
13390 second = multiple_codepoints;
13391 }
13392
13393 if (c != close_brace) {
13394 unterminated:
13395 token_flush(p);
13396 yyerror0("unterminated Unicode escape");
13397 return;
13398 }
13399 if (second && second != multiple_codepoints) {
13400 const char *pcur = p->lex.pcur;
13401 p->lex.pcur = second;
13403 token_flush(p);
13404 p->lex.pcur = pcur;
13405 yyerror0(multiple_codepoints);
13406 token_flush(p);
13407 }
13408
13409 if (regexp_literal) tokadd(p, close_brace);
13410 nextc(p);
13411 }
13412 else { /* handle \uxxxx form */
13413 if (!tokadd_codepoint(p, encp, regexp_literal, FALSE)) {
13414 token_flush(p);
13415 return;
13416 }
13417 }
13418}
13419
13420#define ESCAPE_CONTROL 1
13421#define ESCAPE_META 2
13422
13423static int
13424read_escape(struct parser_params *p, int flags, rb_encoding **encp)
13425{
13426 int c;
13427 size_t numlen;
13428
13429 switch (c = nextc(p)) {
13430 case '\\': /* Backslash */
13431 return c;
13432
13433 case 'n': /* newline */
13434 return '\n';
13435
13436 case 't': /* horizontal tab */
13437 return '\t';
13438
13439 case 'r': /* carriage-return */
13440 return '\r';
13441
13442 case 'f': /* form-feed */
13443 return '\f';
13444
13445 case 'v': /* vertical tab */
13446 return '\13';
13447
13448 case 'a': /* alarm(bell) */
13449 return '\007';
13450
13451 case 'e': /* escape */
13452 return 033;
13453
13454 case '0': case '1': case '2': case '3': /* octal constant */
13455 case '4': case '5': case '6': case '7':
13456 pushback(p, c);
13457 c = scan_oct(p->lex.pcur, 3, &numlen);
13458 p->lex.pcur += numlen;
13459 return c;
13460
13461 case 'x': /* hex constant */
13462 c = tok_hex(p, &numlen);
13463 if (numlen == 0) return 0;
13464 return c;
13465
13466 case 'b': /* backspace */
13467 return '\010';
13468
13469 case 's': /* space */
13470 return ' ';
13471
13472 case 'M':
13473 if (flags & ESCAPE_META) goto eof;
13474 if ((c = nextc(p)) != '-') {
13475 goto eof;
13476 }
13477 if ((c = nextc(p)) == '\\') {
13478 if (peek(p, 'u')) goto eof;
13479 return read_escape(p, flags|ESCAPE_META, encp) | 0x80;
13480 }
13481 else if (c == -1 || !ISASCII(c)) goto eof;
13482 else {
13483 int c2 = escaped_control_code(c);
13484 if (c2) {
13485 if (ISCNTRL(c) || !(flags & ESCAPE_CONTROL)) {
13486 WARN_SPACE_CHAR(c2, "\\M-");
13487 }
13488 else {
13489 WARN_SPACE_CHAR(c2, "\\C-\\M-");
13490 }
13491 }
13492 else if (ISCNTRL(c)) goto eof;
13493 return ((c & 0xff) | 0x80);
13494 }
13495
13496 case 'C':
13497 if ((c = nextc(p)) != '-') {
13498 goto eof;
13499 }
13500 case 'c':
13501 if (flags & ESCAPE_CONTROL) goto eof;
13502 if ((c = nextc(p))== '\\') {
13503 if (peek(p, 'u')) goto eof;
13504 c = read_escape(p, flags|ESCAPE_CONTROL, encp);
13505 }
13506 else if (c == '?')
13507 return 0177;
13508 else if (c == -1 || !ISASCII(c)) goto eof;
13509 else {
13510 int c2 = escaped_control_code(c);
13511 if (c2) {
13512 if (ISCNTRL(c)) {
13513 if (flags & ESCAPE_META) {
13514 WARN_SPACE_CHAR(c2, "\\M-");
13515 }
13516 else {
13517 WARN_SPACE_CHAR(c2, "");
13518 }
13519 }
13520 else {
13521 if (flags & ESCAPE_META) {
13522 WARN_SPACE_CHAR(c2, "\\M-\\C-");
13523 }
13524 else {
13525 WARN_SPACE_CHAR(c2, "\\C-");
13526 }
13527 }
13528 }
13529 else if (ISCNTRL(c)) goto eof;
13530 }
13531 return c & 0x9f;
13532
13533 eof:
13534 case -1:
13535 yyerror0("Invalid escape character syntax");
13536 token_flush(p);
13537 return '\0';
13538
13539 default:
13540 return c;
13541 }
13542}
13543
13544static void
13545tokaddmbc(struct parser_params *p, int c, rb_encoding *enc)
13546{
13547 int len = rb_enc_codelen(c, enc);
13548 rb_enc_mbcput(c, tokspace(p, len), enc);
13549}
13550
13551static int
13552tokadd_escape(struct parser_params *p, rb_encoding **encp)
13553{
13554 int c;
13555 int flags = 0;
13556 size_t numlen;
13557
13558 first:
13559 switch (c = nextc(p)) {
13560 case '\n':
13561 return 0; /* just ignore */
13562
13563 case '0': case '1': case '2': case '3': /* octal constant */
13564 case '4': case '5': case '6': case '7':
13565 {
13566 ruby_scan_oct(--p->lex.pcur, 3, &numlen);
13567 if (numlen == 0) goto eof;
13568 p->lex.pcur += numlen;
13569 tokcopy(p, (int)numlen + 1);
13570 }
13571 return 0;
13572
13573 case 'x': /* hex constant */
13574 {
13575 tok_hex(p, &numlen);
13576 if (numlen == 0) return -1;
13577 tokcopy(p, (int)numlen + 2);
13578 }
13579 return 0;
13580
13581 case 'M':
13582 if (flags & ESCAPE_META) goto eof;
13583 if ((c = nextc(p)) != '-') {
13584 pushback(p, c);
13585 goto eof;
13586 }
13587 tokcopy(p, 3);
13588 flags |= ESCAPE_META;
13589 goto escaped;
13590
13591 case 'C':
13592 if (flags & ESCAPE_CONTROL) goto eof;
13593 if ((c = nextc(p)) != '-') {
13594 pushback(p, c);
13595 goto eof;
13596 }
13597 tokcopy(p, 3);
13598 goto escaped;
13599
13600 case 'c':
13601 if (flags & ESCAPE_CONTROL) goto eof;
13602 tokcopy(p, 2);
13603 flags |= ESCAPE_CONTROL;
13604 escaped:
13605 if ((c = nextc(p)) == '\\') {
13606 goto first;
13607 }
13608 else if (c == -1) goto eof;
13609 tokadd(p, c);
13610 return 0;
13611
13612 eof:
13613 case -1:
13614 yyerror0("Invalid escape character syntax");
13615 token_flush(p);
13616 return -1;
13617
13618 default:
13619 tokadd(p, '\\');
13620 tokadd(p, c);
13621 }
13622 return 0;
13623}
13624
13625static int
13626regx_options(struct parser_params *p)
13627{
13628 int kcode = 0;
13629 int kopt = 0;
13630 int options = 0;
13631 int c, opt, kc;
13632
13633 newtok(p);
13634 while (c = nextc(p), ISALPHA(c)) {
13635 if (c == 'o') {
13636 options |= RE_OPTION_ONCE;
13637 }
13638 else if (rb_char_to_option_kcode(c, &opt, &kc)) {
13639 if (kc >= 0) {
13640 if (kc != rb_ascii8bit_encindex()) kcode = c;
13641 kopt = opt;
13642 }
13643 else {
13644 options |= opt;
13645 }
13646 }
13647 else {
13648 tokadd(p, c);
13649 }
13650 }
13651 options |= kopt;
13652 pushback(p, c);
13653 if (toklen(p)) {
13654 YYLTYPE loc = RUBY_INIT_YYLLOC();
13655 tokfix(p);
13656 compile_error(p, "unknown regexp option%s - %*s",
13657 toklen(p) > 1 ? "s" : "", toklen(p), tok(p));
13658 parser_show_error_line(p, &loc);
13659 }
13660 return options | RE_OPTION_ENCODING(kcode);
13661}
13662
13663static int
13664tokadd_mbchar(struct parser_params *p, int c)
13665{
13666 int len = parser_precise_mbclen(p, p->lex.pcur-1);
13667 if (len < 0) return -1;
13668 tokadd(p, c);
13669 p->lex.pcur += --len;
13670 if (len > 0) tokcopy(p, len);
13671 return c;
13672}
13673
13674static inline int
13675simple_re_meta(int c)
13676{
13677 switch (c) {
13678 case '$': case '*': case '+': case '.':
13679 case '?': case '^': case '|':
13680 case ')': case ']': case '}': case '>':
13681 return TRUE;
13682 default:
13683 return FALSE;
13684 }
13685}
13686
13687static int
13688parser_update_heredoc_indent(struct parser_params *p, int c)
13689{
13690 if (p->heredoc_line_indent == -1) {
13691 if (c == '\n') p->heredoc_line_indent = 0;
13692 }
13693 else {
13694 if (c == ' ') {
13696 return TRUE;
13697 }
13698 else if (c == '\t') {
13699 int w = (p->heredoc_line_indent / TAB_WIDTH) + 1;
13701 return TRUE;
13702 }
13703 else if (c != '\n') {
13704 if (p->heredoc_indent > p->heredoc_line_indent) {
13706 }
13707 p->heredoc_line_indent = -1;
13708 }
13709 }
13710 return FALSE;
13711}
13712
13713static void
13714parser_mixed_error(struct parser_params *p, rb_encoding *enc1, rb_encoding *enc2)
13715{
13716 YYLTYPE loc = RUBY_INIT_YYLLOC();
13717 const char *n1 = rb_enc_name(enc1), *n2 = rb_enc_name(enc2);
13718 compile_error(p, "%s mixed within %s source", n1, n2);
13719 parser_show_error_line(p, &loc);
13720}
13721
13722static void
13723parser_mixed_escape(struct parser_params *p, const char *beg, rb_encoding *enc1, rb_encoding *enc2)
13724{
13725 const char *pos = p->lex.pcur;
13726 p->lex.pcur = beg;
13727 parser_mixed_error(p, enc1, enc2);
13728 p->lex.pcur = pos;
13729}
13730
13731static int
13732tokadd_string(struct parser_params *p,
13733 int func, int term, int paren, long *nest,
13734 rb_encoding **encp, rb_encoding **enc)
13735{
13736 int c;
13737 bool erred = false;
13738
13739#define mixed_error(enc1, enc2) \
13740 (void)(erred || (parser_mixed_error(p, enc1, enc2), erred = true))
13741#define mixed_escape(beg, enc1, enc2) \
13742 (void)(erred || (parser_mixed_escape(p, beg, enc1, enc2), erred = true))
13743
13744 while ((c = nextc(p)) != -1) {
13745 if (p->heredoc_indent > 0) {
13746 parser_update_heredoc_indent(p, c);
13747 }
13748
13749 if (paren && c == paren) {
13750 ++*nest;
13751 }
13752 else if (c == term) {
13753 if (!nest || !*nest) {
13754 pushback(p, c);
13755 break;
13756 }
13757 --*nest;
13758 }
13759 else if ((func & STR_FUNC_EXPAND) && c == '#' && p->lex.pcur < p->lex.pend) {
13760 int c2 = *p->lex.pcur;
13761 if (c2 == '$' || c2 == '@' || c2 == '{') {
13762 pushback(p, c);
13763 break;
13764 }
13765 }
13766 else if (c == '\\') {
13767 literal_flush(p, p->lex.pcur - 1);
13768 c = nextc(p);
13769 switch (c) {
13770 case '\n':
13771 if (func & STR_FUNC_QWORDS) break;
13772 if (func & STR_FUNC_EXPAND) {
13773 if (!(func & STR_FUNC_INDENT) || (p->heredoc_indent < 0))
13774 continue;
13775 if (c == term) {
13776 c = '\\';
13777 goto terminate;
13778 }
13779 }
13780 tokadd(p, '\\');
13781 break;
13782
13783 case '\\':
13784 if (func & STR_FUNC_ESCAPE) tokadd(p, c);
13785 break;
13786
13787 case 'u':
13788 if ((func & STR_FUNC_EXPAND) == 0) {
13789 tokadd(p, '\\');
13790 break;
13791 }
13792 tokadd_utf8(p, enc, term,
13793 func & STR_FUNC_SYMBOL,
13794 func & STR_FUNC_REGEXP);
13795 continue;
13796
13797 default:
13798 if (c == -1) return -1;
13799 if (!ISASCII(c)) {
13800 if ((func & STR_FUNC_EXPAND) == 0) tokadd(p, '\\');
13801 goto non_ascii;
13802 }
13803 if (func & STR_FUNC_REGEXP) {
13804 if (c == term && !simple_re_meta(c)) {
13805 tokadd(p, c);
13806 continue;
13807 }
13808 pushback(p, c);
13809 if ((c = tokadd_escape(p, enc)) < 0)
13810 return -1;
13811 if (*enc && *enc != *encp) {
13812 mixed_escape(p->lex.ptok+2, *enc, *encp);
13813 }
13814 continue;
13815 }
13816 else if (func & STR_FUNC_EXPAND) {
13817 pushback(p, c);
13818 if (func & STR_FUNC_ESCAPE) tokadd(p, '\\');
13819 c = read_escape(p, 0, enc);
13820 }
13821 else if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) {
13822 /* ignore backslashed spaces in %w */
13823 }
13824 else if (c != term && !(paren && c == paren)) {
13825 tokadd(p, '\\');
13826 pushback(p, c);
13827 continue;
13828 }
13829 }
13830 }
13831 else if (!parser_isascii(p)) {
13832 non_ascii:
13833 if (!*enc) {
13834 *enc = *encp;
13835 }
13836 else if (*enc != *encp) {
13837 mixed_error(*enc, *encp);
13838 continue;
13839 }
13840 if (tokadd_mbchar(p, c) == -1) return -1;
13841 continue;
13842 }
13843 else if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) {
13844 pushback(p, c);
13845 break;
13846 }
13847 if (c & 0x80) {
13848 if (!*enc) {
13849 *enc = *encp;
13850 }
13851 else if (*enc != *encp) {
13852 mixed_error(*enc, *encp);
13853 continue;
13854 }
13855 }
13856 tokadd(p, c);
13857 }
13858 terminate:
13859 if (*enc) *encp = *enc;
13860 return c;
13861}
13862
13863static inline rb_strterm_t *
13864new_strterm(VALUE v1, VALUE v2, VALUE v3, VALUE v0)
13865{
13866 return (rb_strterm_t*)rb_imemo_new(imemo_parser_strterm, v1, v2, v3, v0);
13867}
13868
13869/* imemo_parser_strterm for literal */
13870#define NEW_STRTERM(func, term, paren) \
13871 new_strterm((VALUE)(func), (VALUE)(paren), (VALUE)(term), 0)
13872
13873#ifdef RIPPER
13874static void
13876{
13877 VALUE content = yylval.val;
13878 if (!ripper_is_node_yylval(content))
13879 content = ripper_new_yylval(p, 0, 0, content);
13880 if (has_delayed_token(p)) {
13881 ptrdiff_t len = p->lex.pcur - p->lex.ptok;
13882 if (len > 0) {
13883 rb_enc_str_buf_cat(p->delayed.token, p->lex.ptok, len, enc);
13884 }
13886 p->lex.ptok = p->lex.pcur;
13887 RNODE(content)->nd_rval = yylval.val;
13888 }
13890 if (yylval.val != content)
13891 RNODE(content)->nd_rval = yylval.val;
13892 yylval.val = content;
13893}
13894#else
13895#define flush_string_content(p, enc) ((void)(enc))
13896#endif
13897
13898RUBY_FUNC_EXPORTED const unsigned int ruby_global_name_punct_bits[(0x7e - 0x20 + 31) / 32];
13899/* this can be shared with ripper, since it's independent from struct
13900 * parser_params. */
13901#ifndef RIPPER
13902#define BIT(c, idx) (((c) / 32 - 1 == idx) ? (1U << ((c) % 32)) : 0)
13903#define SPECIAL_PUNCT(idx) ( \
13904 BIT('~', idx) | BIT('*', idx) | BIT('$', idx) | BIT('?', idx) | \
13905 BIT('!', idx) | BIT('@', idx) | BIT('/', idx) | BIT('\\', idx) | \
13906 BIT(';', idx) | BIT(',', idx) | BIT('.', idx) | BIT('=', idx) | \
13907 BIT(':', idx) | BIT('<', idx) | BIT('>', idx) | BIT('\"', idx) | \
13908 BIT('&', idx) | BIT('`', idx) | BIT('\'', idx) | BIT('+', idx) | \
13909 BIT('0', idx))
13910const unsigned int ruby_global_name_punct_bits[] = {
13911 SPECIAL_PUNCT(0),
13912 SPECIAL_PUNCT(1),
13913 SPECIAL_PUNCT(2),
13914};
13915#undef BIT
13916#undef SPECIAL_PUNCT
13917#endif
13918
13919static enum yytokentype
13920parser_peek_variable_name(struct parser_params *p)
13921{
13922 int c;
13923 const char *ptr = p->lex.pcur;
13924
13925 if (ptr + 1 >= p->lex.pend) return 0;
13926 c = *ptr++;
13927 switch (c) {
13928 case '$':
13929 if ((c = *ptr) == '-') {
13930 if (++ptr >= p->lex.pend) return 0;
13931 c = *ptr;
13932 }
13933 else if (is_global_name_punct(c) || ISDIGIT(c)) {
13934 return tSTRING_DVAR;
13935 }
13936 break;
13937 case '@':
13938 if ((c = *ptr) == '@') {
13939 if (++ptr >= p->lex.pend) return 0;
13940 c = *ptr;
13941 }
13942 break;
13943 case '{':
13944 p->lex.pcur = ptr;
13945 p->command_start = TRUE;
13946 return tSTRING_DBEG;
13947 default:
13948 return 0;
13949 }
13950 if (!ISASCII(c) || c == '_' || ISALPHA(c))
13951 return tSTRING_DVAR;
13952 return 0;
13953}
13954
13955#define IS_ARG() IS_lex_state(EXPR_ARG_ANY)
13956#define IS_END() IS_lex_state(EXPR_END_ANY)
13957#define IS_BEG() (IS_lex_state(EXPR_BEG_ANY) || IS_lex_state_all(EXPR_ARG|EXPR_LABELED))
13958#define IS_SPCARG(c) (IS_ARG() && space_seen && !ISSPACE(c))
13959#define IS_LABEL_POSSIBLE() (\
13960 (IS_lex_state(EXPR_LABEL|EXPR_ENDFN) && !cmd_state) || \
13961 IS_ARG())
13962#define IS_LABEL_SUFFIX(n) (peek_n(p, ':',(n)) && !peek_n(p, ':', (n)+1))
13963#define IS_AFTER_OPERATOR() IS_lex_state(EXPR_FNAME | EXPR_DOT)
13964
13965static inline enum yytokentype
13966parser_string_term(struct parser_params *p, int func)
13967{
13968 p->lex.strterm = 0;
13969 if (func & STR_FUNC_REGEXP) {
13970 set_yylval_num(regx_options(p));
13971 dispatch_scan_event(p, tREGEXP_END);
13972 SET_LEX_STATE(EXPR_END);
13973 return tREGEXP_END;
13974 }
13975 if ((func & STR_FUNC_LABEL) && IS_LABEL_SUFFIX(0)) {
13976 nextc(p);
13977 SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
13978 return tLABEL_END;
13979 }
13980 SET_LEX_STATE(EXPR_END);
13981 return tSTRING_END;
13982}
13983
13984static enum yytokentype
13985parse_string(struct parser_params *p, rb_strterm_literal_t *quote)
13986{
13987 int func = (int)quote->u1.func;
13988 int term = (int)quote->u3.term;
13989 int paren = (int)quote->u2.paren;
13990 int c, space = 0;
13991 rb_encoding *enc = p->enc;
13992 rb_encoding *base_enc = 0;
13993 VALUE lit;
13994
13995 if (func & STR_FUNC_TERM) {
13996 if (func & STR_FUNC_QWORDS) nextc(p); /* delayed term */
13997 SET_LEX_STATE(EXPR_END);
13998 p->lex.strterm = 0;
13999 return func & STR_FUNC_REGEXP ? tREGEXP_END : tSTRING_END;
14000 }
14001 c = nextc(p);
14002 if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) {
14003 do {c = nextc(p);} while (ISSPACE(c));
14004 space = 1;
14005 }
14006 if (func & STR_FUNC_LIST) {
14007 quote->u1.func &= ~STR_FUNC_LIST;
14008 space = 1;
14009 }
14010 if (c == term && !quote->u0.nest) {
14011 if (func & STR_FUNC_QWORDS) {
14012 quote->u1.func |= STR_FUNC_TERM;
14013 pushback(p, c); /* dispatch the term at tSTRING_END */
14014 add_delayed_token(p, p->lex.ptok, p->lex.pcur);
14015 return ' ';
14016 }
14017 return parser_string_term(p, func);
14018 }
14019 if (space) {
14020 pushback(p, c);
14021 add_delayed_token(p, p->lex.ptok, p->lex.pcur);
14022 return ' ';
14023 }
14024 newtok(p);
14025 if ((func & STR_FUNC_EXPAND) && c == '#') {
14026 int t = parser_peek_variable_name(p);
14027 if (t) return t;
14028 tokadd(p, '#');
14029 c = nextc(p);
14030 }
14031 pushback(p, c);
14032 if (tokadd_string(p, func, term, paren, &quote->u0.nest,
14033 &enc, &base_enc) == -1) {
14034 if (p->eofp) {
14035#ifndef RIPPER
14036# define unterminated_literal(mesg) yyerror0(mesg)
14037#else
14038# define unterminated_literal(mesg) compile_error(p, mesg)
14039#endif
14040 literal_flush(p, p->lex.pcur);
14041 if (func & STR_FUNC_QWORDS) {
14042 /* no content to add, bailing out here */
14043 unterminated_literal("unterminated list meets end of file");
14044 p->lex.strterm = 0;
14045 return tSTRING_END;
14046 }
14047 if (func & STR_FUNC_REGEXP) {
14048 unterminated_literal("unterminated regexp meets end of file");
14049 }
14050 else {
14051 unterminated_literal("unterminated string meets end of file");
14052 }
14053 quote->u1.func |= STR_FUNC_TERM;
14054 }
14055 }
14056
14057 tokfix(p);
14058 lit = STR_NEW3(tok(p), toklen(p), enc, func);
14059 set_yylval_str(lit);
14060 flush_string_content(p, enc);
14061
14062 return tSTRING_CONTENT;
14063}
14064
14065static enum yytokentype
14066heredoc_identifier(struct parser_params *p)
14067{
14068 /*
14069 * term_len is length of `<<"END"` except `END`,
14070 * in this case term_len is 4 (<, <, " and ").
14071 */
14072 long len, offset = p->lex.pcur - p->lex.pbeg;
14073 int c = nextc(p), term, func = 0, quote = 0;
14074 enum yytokentype token = tSTRING_BEG;
14075 int indent = 0;
14076
14077 if (c == '-') {
14078 c = nextc(p);
14079 func = STR_FUNC_INDENT;
14080 offset++;
14081 }
14082 else if (c == '~') {
14083 c = nextc(p);
14084 func = STR_FUNC_INDENT;
14085 offset++;
14086 indent = INT_MAX;
14087 }
14088 switch (c) {
14089 case '\'':
14090 func |= str_squote; goto quoted;
14091 case '"':
14092 func |= str_dquote; goto quoted;
14093 case '`':
14095 func |= str_xquote; goto quoted;
14096
14097 quoted:
14098 quote++;
14099 offset++;
14100 term = c;
14101 len = 0;
14102 while ((c = nextc(p)) != term) {
14103 if (c == -1 || c == '\r' || c == '\n') {
14104 yyerror(NULL, p, "unterminated here document identifier");
14105 return -1;
14106 }
14107 }
14108 break;
14109
14110 default:
14111 if (!parser_is_identchar(p)) {
14112 pushback(p, c);
14113 if (func & STR_FUNC_INDENT) {
14114 pushback(p, indent > 0 ? '~' : '-');
14115 }
14116 return 0;
14117 }
14118 func |= str_dquote;
14119 do {
14120 int n = parser_precise_mbclen(p, p->lex.pcur-1);
14121 if (n < 0) return 0;
14122 p->lex.pcur += --n;
14123 } while ((c = nextc(p)) != -1 && parser_is_identchar(p));
14124 pushback(p, c);
14125 break;
14126 }
14127
14128 len = p->lex.pcur - (p->lex.pbeg + offset) - quote;
14129 if ((unsigned long)len >= HERETERM_LENGTH_MAX)
14130 yyerror(NULL, p, "too long here document identifier");
14132 lex_goto_eol(p);
14133
14134 p->lex.strterm = new_strterm(0, 0, 0, p->lex.lastline);
14137 here->offset = offset;
14138 here->sourceline = p->ruby_sourceline;
14139 here->length = (int)len;
14140 here->quote = quote;
14141 here->func = func;
14142
14143 token_flush(p);
14144 p->heredoc_indent = indent;
14145 p->heredoc_line_indent = 0;
14146 return token;
14147}
14148
14149static void
14150heredoc_restore(struct parser_params *p, rb_strterm_heredoc_t *here)
14151{
14152 VALUE line;
14153
14154 p->lex.strterm = 0;
14155 line = here->lastline;
14156 p->lex.lastline = line;
14157 p->lex.pbeg = RSTRING_PTR(line);
14158 p->lex.pend = p->lex.pbeg + RSTRING_LEN(line);
14159 p->lex.pcur = p->lex.pbeg + here->offset + here->length + here->quote;
14160 p->lex.ptok = p->lex.pbeg + here->offset - here->quote;
14162 p->ruby_sourceline = (int)here->sourceline;
14163 if (p->eofp) p->lex.nextline = Qnil;
14164 p->eofp = 0;
14165}
14166
14167static int
14168dedent_string(VALUE string, int width)
14169{
14170 char *str;
14171 long len;
14172 int i, col = 0;
14173
14174 RSTRING_GETMEM(string, str, len);
14175 for (i = 0; i < len && col < width; i++) {
14176 if (str[i] == ' ') {
14177 col++;
14178 }
14179 else if (str[i] == '\t') {
14180 int n = TAB_WIDTH * (col / TAB_WIDTH + 1);
14181 if (n > width) break;
14182 col = n;
14183 }
14184 else {
14185 break;
14186 }
14187 }
14188 if (!i) return 0;
14189 rb_str_modify(string);
14190 str = RSTRING_PTR(string);
14191 if (RSTRING_LEN(string) != len)
14192 rb_fatal("literal string changed: %+"PRIsVALUE, string);
14193 MEMMOVE(str, str + i, char, len - i);
14194 rb_str_set_len(string, len - i);
14195 return i;
14196}
14197
14198#ifndef RIPPER
14199static NODE *
14200heredoc_dedent(struct parser_params *p, NODE *root)
14201{
14202 NODE *node, *str_node, *prev_node;
14203 int indent = p->heredoc_indent;
14204 VALUE prev_lit = 0;
14205
14206 if (indent <= 0) return root;
14207 p->heredoc_indent = 0;
14208 if (!root) return root;
14209
14210 prev_node = node = str_node = root;
14211 if (nd_type(root) == NODE_LIST) str_node = root->nd_head;
14212
14213 while (str_node) {
14214 VALUE lit = str_node->nd_lit;
14215 if (str_node->flags & NODE_FL_NEWLINE) {
14216 dedent_string(lit, indent);
14217 }
14218 if (!prev_lit) {
14219 prev_lit = lit;
14220 }
14221 else if (!literal_concat0(p, prev_lit, lit)) {
14222 return 0;
14223 }
14224 else {
14225 NODE *end = node->nd_end;
14226 node = prev_node->nd_next = node->nd_next;
14227 if (!node) {
14228 if (nd_type(prev_node) == NODE_DSTR)
14229 nd_set_type(prev_node, NODE_STR);
14230 break;
14231 }
14232 node->nd_end = end;
14233 goto next_str;
14234 }
14235
14236 str_node = 0;
14237 while ((node = (prev_node = node)->nd_next) != 0) {
14238 next_str:
14239 if (nd_type(node) != NODE_LIST) break;
14240 if ((str_node = node->nd_head) != 0) {
14241 enum node_type type = nd_type(str_node);
14242 if (type == NODE_STR || type == NODE_DSTR) break;
14243 prev_lit = 0;
14244 str_node = 0;
14245 }
14246 }
14247 }
14248 return root;
14249}
14250#else /* RIPPER */
14251static VALUE
14252heredoc_dedent(struct parser_params *p, VALUE array)
14253{
14254 int indent = p->heredoc_indent;
14255
14256 if (indent <= 0) return array;
14257 p->heredoc_indent = 0;
14258 dispatch2(heredoc_dedent, array, INT2NUM(indent));
14259 return array;
14260}
14261
14262/*
14263 * call-seq:
14264 * Ripper.dedent_string(input, width) -> Integer
14265 *
14266 * USE OF RIPPER LIBRARY ONLY.
14267 *
14268 * Strips up to +width+ leading whitespaces from +input+,
14269 * and returns the stripped column width.
14270 */
14271static VALUE
14272parser_dedent_string(VALUE self, VALUE input, VALUE width)
14273{
14274 int wid, col;
14275
14277 wid = NUM2UINT(width);
14278 col = dedent_string(input, wid);
14279 return INT2NUM(col);
14280}
14281#endif
14282
14283static int
14284whole_match_p(struct parser_params *p, const char *eos, long len, int indent)
14285{
14286 const char *ptr = p->lex.pbeg;
14287 long n;
14288
14289 if (indent) {
14290 while (*ptr && ISSPACE(*ptr)) ptr++;
14291 }
14292 n = p->lex.pend - (ptr + len);
14293 if (n < 0) return FALSE;
14294 if (n > 0 && ptr[len] != '\n') {
14295 if (ptr[len] != '\r') return FALSE;
14296 if (n <= 1 || ptr[len+1] != '\n') return FALSE;
14297 }
14298 return strncmp(eos, ptr, len) == 0;
14299}
14300
14301static int
14302word_match_p(struct parser_params *p, const char *word, long len)
14303{
14304 if (strncmp(p->lex.pcur, word, len)) return 0;
14305 if (p->lex.pcur + len == p->lex.pend) return 1;
14306 int c = (unsigned char)p->lex.pcur[len];
14307 if (ISSPACE(c)) return 1;
14308 switch (c) {
14309 case '\0': case '\004': case '\032': return 1;
14310 }
14311 return 0;
14312}
14313
14314#define NUM_SUFFIX_R (1<<0)
14315#define NUM_SUFFIX_I (1<<1)
14316#define NUM_SUFFIX_ALL 3
14317
14318static int
14319number_literal_suffix(struct parser_params *p, int mask)
14320{
14321 int c, result = 0;
14322 const char *lastp = p->lex.pcur;
14323
14324 while ((c = nextc(p)) != -1) {
14325 if ((mask & NUM_SUFFIX_I) && c == 'i') {
14326 result |= (mask & NUM_SUFFIX_I);
14327 mask &= ~NUM_SUFFIX_I;
14328 /* r after i, rational of complex is disallowed */
14329 mask &= ~NUM_SUFFIX_R;
14330 continue;
14331 }
14332 if ((mask & NUM_SUFFIX_R) && c == 'r') {
14333 result |= (mask & NUM_SUFFIX_R);
14334 mask &= ~NUM_SUFFIX_R;
14335 continue;
14336 }
14337 if (!ISASCII(c) || ISALPHA(c) || c == '_') {
14338 p->lex.pcur = lastp;
14339 literal_flush(p, p->lex.pcur);
14340 return 0;
14341 }
14342 pushback(p, c);
14343 break;
14344 }
14345 return result;
14346}
14347
14348static enum yytokentype
14349set_number_literal(struct parser_params *p, VALUE v,
14350 enum yytokentype type, int suffix)
14351{
14352 if (suffix & NUM_SUFFIX_I) {
14353 v = rb_complex_raw(INT2FIX(0), v);
14354 type = tIMAGINARY;
14355 }
14357 SET_LEX_STATE(EXPR_END);
14358 return type;
14359}
14360
14361static enum yytokentype
14362set_integer_literal(struct parser_params *p, VALUE v, int suffix)
14363{
14364 enum yytokentype type = tINTEGER;
14365 if (suffix & NUM_SUFFIX_R) {
14366 v = rb_rational_raw1(v);
14367 type = tRATIONAL;
14368 }
14369 return set_number_literal(p, v, type, suffix);
14370}
14371
14372#ifdef RIPPER
14373static void
14375{
14376 VALUE str;
14377 if (has_delayed_token(p))
14379 str = STR_NEW(p->lex.ptok, p->lex.pend - p->lex.ptok);
14380 ripper_dispatch1(p, ripper_token2eventid(tHEREDOC_END), str);
14381 lex_goto_eol(p);
14382 token_flush(p);
14383}
14384
14385#else
14386#define dispatch_heredoc_end(p) ((void)0)
14387#endif
14388
14389static enum yytokentype
14390here_document(struct parser_params *p, rb_strterm_heredoc_t *here)
14391{
14392 int c, func, indent = 0;
14393 const char *eos, *ptr, *ptr_end;
14394 long len;
14395 VALUE str = 0;
14396 rb_encoding *enc = p->enc;
14397 rb_encoding *base_enc = 0;
14398 int bol;
14399
14400 eos = RSTRING_PTR(here->lastline) + here->offset;
14401 len = here->length;
14402 indent = (func = here->func) & STR_FUNC_INDENT;
14403
14404 if ((c = nextc(p)) == -1) {
14405 error:
14406#ifdef RIPPER
14407 if (!has_delayed_token(p)) {
14409 }
14410 else {
14411 if ((len = p->lex.pcur - p->lex.ptok) > 0) {
14412 if (!(func & STR_FUNC_REGEXP) && rb_enc_asciicompat(enc)) {
14413 int cr = ENC_CODERANGE_UNKNOWN;
14415 if (cr != ENC_CODERANGE_7BIT &&
14416 p->enc == rb_usascii_encoding() &&
14417 enc != rb_utf8_encoding()) {
14419 }
14420 }
14421 rb_enc_str_buf_cat(p->delayed.token, p->lex.ptok, len, enc);
14422 }
14424 }
14425 lex_goto_eol(p);
14426#endif
14427 heredoc_restore(p, &p->lex.strterm->u.heredoc);
14428 compile_error(p, "can't find string \"%.*s\" anywhere before EOF",
14429 (int)len, eos);
14430 token_flush(p);
14431 p->lex.strterm = 0;
14432 SET_LEX_STATE(EXPR_END);
14433 return tSTRING_END;
14434 }
14435 bol = was_bol(p);
14436 if (!bol) {
14437 /* not beginning of line, cannot be the terminator */
14438 }
14439 else if (p->heredoc_line_indent == -1) {
14440 /* `heredoc_line_indent == -1` means
14441 * - "after an interpolation in the same line", or
14442 * - "in a continuing line"
14443 */
14444 p->heredoc_line_indent = 0;
14445 }
14446 else if (whole_match_p(p, eos, len, indent)) {
14448 restore:
14449 heredoc_restore(p, &p->lex.strterm->u.heredoc);
14450 token_flush(p);
14451 p->lex.strterm = 0;
14452 SET_LEX_STATE(EXPR_END);
14453 return tSTRING_END;
14454 }
14455
14456 if (!(func & STR_FUNC_EXPAND)) {
14457 do {
14459 ptr_end = p->lex.pend;
14460 if (ptr_end > ptr) {
14461 switch (ptr_end[-1]) {
14462 case '\n':
14463 if (--ptr_end == ptr || ptr_end[-1] != '\r') {
14464 ptr_end++;
14465 break;
14466 }
14467 case '\r':
14468 --ptr_end;
14469 }
14470 }
14471
14472 if (p->heredoc_indent > 0) {
14473 long i = 0;
14474 while (ptr + i < ptr_end && parser_update_heredoc_indent(p, ptr[i]))
14475 i++;
14476 p->heredoc_line_indent = 0;
14477 }
14478
14479 if (str)
14480 rb_str_cat(str, ptr, ptr_end - ptr);
14481 else
14482 str = STR_NEW(ptr, ptr_end - ptr);
14483 if (ptr_end < p->lex.pend) rb_str_cat(str, "\n", 1);
14484 lex_goto_eol(p);
14485 if (p->heredoc_indent > 0) {
14486 goto flush_str;
14487 }
14488 if (nextc(p) == -1) {
14489 if (str) {
14490 str = 0;
14491 }
14492 goto error;
14493 }
14494 } while (!whole_match_p(p, eos, len, indent));
14495 }
14496 else {
14497 /* int mb = ENC_CODERANGE_7BIT, *mbp = &mb;*/
14498 newtok(p);
14499 if (c == '#') {
14500 int t = parser_peek_variable_name(p);
14501 if (p->heredoc_line_indent != -1) {
14502 if (p->heredoc_indent > p->heredoc_line_indent) {
14504 }
14505 p->heredoc_line_indent = -1;
14506 }
14507 if (t) return t;
14508 tokadd(p, '#');
14509 c = nextc(p);
14510 }
14511 do {
14512 pushback(p, c);
14513 enc = p->enc;
14514 if ((c = tokadd_string(p, func, '\n', 0, NULL, &enc, &base_enc)) == -1) {
14515 if (p->eofp) goto error;
14516 goto restore;
14517 }
14518 if (c != '\n') {
14519 if (c == '\\') p->heredoc_line_indent = -1;
14520 flush:
14521 str = STR_NEW3(tok(p), toklen(p), enc, func);
14522 flush_str:
14524#ifndef RIPPER
14525 if (bol) yylval.node->flags |= NODE_FL_NEWLINE;
14526#endif
14528 return tSTRING_CONTENT;
14529 }
14530 tokadd(p, nextc(p));
14531 if (p->heredoc_indent > 0) {
14532 lex_goto_eol(p);
14533 goto flush;
14534 }
14535 /* if (mbp && mb == ENC_CODERANGE_UNKNOWN) mbp = 0;*/
14536 if ((c = nextc(p)) == -1) goto error;
14537 } while (!whole_match_p(p, eos, len, indent));
14538 str = STR_NEW3(tok(p), toklen(p), enc, func);
14539 }
14541#ifdef RIPPER
14542 str = ripper_new_yylval(p, ripper_token2eventid(tSTRING_CONTENT),
14543 yylval.val, str);
14544#endif
14545 heredoc_restore(p, &p->lex.strterm->u.heredoc);
14546 token_flush(p);
14547 p->lex.strterm = NEW_STRTERM(func | STR_FUNC_TERM, 0, 0);
14549#ifndef RIPPER
14550 if (bol) yylval.node->flags |= NODE_FL_NEWLINE;
14551#endif
14552 return tSTRING_CONTENT;
14553}
14554
14555#include "lex.c"
14556
14557static int
14558arg_ambiguous(struct parser_params *p, char c)
14559{
14560#ifndef RIPPER
14561 rb_warning1("ambiguous first argument; put parentheses or a space even after `%c' operator", WARN_I(c));
14562#else
14563 dispatch1(arg_ambiguous, rb_usascii_str_new(&c, 1));
14564#endif
14565 return TRUE;
14566}
14567
14568static ID
14569formal_argument(struct parser_params *p, ID lhs)
14570{
14571 switch (id_type(lhs)) {
14572 case ID_LOCAL:
14573 break;
14574#ifndef RIPPER
14575 case ID_CONST:
14576 yyerror0("formal argument cannot be a constant");
14577 return 0;
14578 case ID_INSTANCE:
14579 yyerror0("formal argument cannot be an instance variable");
14580 return 0;
14581 case ID_GLOBAL:
14582 yyerror0("formal argument cannot be a global variable");
14583 return 0;
14584 case ID_CLASS:
14585 yyerror0("formal argument cannot be a class variable");
14586 return 0;
14587 default:
14588 yyerror0("formal argument must be local variable");
14589 return 0;
14590#else
14591 default:
14592 lhs = dispatch1(param_error, lhs);
14593 ripper_error(p);
14594 return 0;
14595#endif
14596 }
14597 shadowing_lvar(p, lhs);
14598 return lhs;
14599}
14600
14601static int
14602lvar_defined(struct parser_params *p, ID id)
14603{
14604 return (dyna_in_block(p) && dvar_defined(p, id)) || local_id(p, id);
14605}
14606
14607/* emacsen -*- hack */
14608static long
14609parser_encode_length(struct parser_params *p, const char *name, long len)
14610{
14611 long nlen;
14612
14613 if (len > 5 && name[nlen = len - 5] == '-') {
14614 if (rb_memcicmp(name + nlen + 1, "unix", 4) == 0)
14615 return nlen;
14616 }
14617 if (len > 4 && name[nlen = len - 4] == '-') {
14618 if (rb_memcicmp(name + nlen + 1, "dos", 3) == 0)
14619 return nlen;
14620 if (rb_memcicmp(name + nlen + 1, "mac", 3) == 0 &&
14621 !(len == 8 && rb_memcicmp(name, "utf8-mac", len) == 0))
14622 /* exclude UTF8-MAC because the encoding named "UTF8" doesn't exist in Ruby */
14623 return nlen;
14624 }
14625 return len;
14626}
14627
14628static void
14629parser_set_encode(struct parser_params *p, const char *name)
14630{
14631 int idx = rb_enc_find_index(name);
14633 VALUE excargs[3];
14634
14635 if (idx < 0) {
14636 excargs[1] = rb_sprintf("unknown encoding name: %s", name);
14637 error:
14638 excargs[0] = rb_eArgError;
14639 excargs[2] = rb_make_backtrace();
14641 rb_exc_raise(rb_make_exception(3, excargs));
14642 }
14643 enc = rb_enc_from_index(idx);
14644 if (!rb_enc_asciicompat(enc)) {
14645 excargs[1] = rb_sprintf("%s is not ASCII compatible", rb_enc_name(enc));
14646 goto error;
14647 }
14648 p->enc = enc;
14649#ifndef RIPPER
14650 if (p->debug_lines) {
14651 VALUE lines = p->debug_lines;
14652 long i, n = RARRAY_LEN(lines);
14653 for (i = 0; i < n; ++i) {
14654 rb_enc_associate_index(RARRAY_AREF(lines, i), idx);
14655 }
14656 }
14657#endif
14658}
14659
14660static int
14661comment_at_top(struct parser_params *p)
14662{
14663 const char *ptr = p->lex.pbeg, *ptr_end = p->lex.pcur - 1;
14664 if (p->line_count != (p->has_shebang ? 2 : 1)) return 0;
14665 while (ptr < ptr_end) {
14666 if (!ISSPACE(*ptr)) return 0;
14667 ptr++;
14668 }
14669 return 1;
14670}
14671
14672typedef long (*rb_magic_comment_length_t)(struct parser_params *p, const char *name, long len);
14673typedef void (*rb_magic_comment_setter_t)(struct parser_params *p, const char *name, const char *val);
14674
14675static void
14676magic_comment_encoding(struct parser_params *p, const char *name, const char *val)
14677{
14678 if (!comment_at_top(p)) {
14679 return;
14680 }
14681 parser_set_encode(p, val);
14682}
14683
14684static int
14685parser_get_bool(struct parser_params *p, const char *name, const char *val)
14686{
14687 switch (*val) {
14688 case 't': case 'T':
14689 if (strcasecmp(val, "true") == 0) {
14690 return TRUE;
14691 }
14692 break;
14693 case 'f': case 'F':
14694 if (strcasecmp(val, "false") == 0) {
14695 return FALSE;
14696 }
14697 break;
14698 }
14699 rb_compile_warning(p->ruby_sourcefile, p->ruby_sourceline, "invalid value for %s: %s", name, val);
14700 return -1;
14701}
14702
14703static void
14704parser_set_token_info(struct parser_params *p, const char *name, const char *val)
14705{
14706 int b = parser_get_bool(p, name, val);
14707 if (b >= 0) p->token_info_enabled = b;
14708}
14709
14710static void
14711parser_set_compile_option_flag(struct parser_params *p, const char *name, const char *val)
14712{
14713 int b;
14714
14715 if (p->token_seen) {
14716 rb_warning1("`%s' is ignored after any tokens", WARN_S(name));
14717 return;
14718 }
14719
14720 b = parser_get_bool(p, name, val);
14721 if (b < 0) return;
14722
14723 if (!p->compile_option)
14726 (b ? Qtrue : Qfalse));
14727}
14728
14729# if WARN_PAST_SCOPE
14730static void
14731parser_set_past_scope(struct parser_params *p, const char *name, const char *val)
14732{
14733 int b = parser_get_bool(p, name, val);
14734 if (b >= 0) p->past_scope_enabled = b;
14735}
14736# endif
14737
14738struct magic_comment {
14739 const char *name;
14742};
14743
14744static const struct magic_comment magic_comments[] = {
14745 {"coding", magic_comment_encoding, parser_encode_length},
14746 {"encoding", magic_comment_encoding, parser_encode_length},
14747 {"frozen_string_literal", parser_set_compile_option_flag},
14748 {"warn_indent", parser_set_token_info},
14749# if WARN_PAST_SCOPE
14750 {"warn_past_scope", parser_set_past_scope},
14751# endif
14752};
14753
14754static const char *
14755magic_comment_marker(const char *str, long len)
14756{
14757 long i = 2;
14758
14759 while (i < len) {
14760 switch (str[i]) {
14761 case '-':
14762 if (str[i-1] == '*' && str[i-2] == '-') {
14763 return str + i + 1;
14764 }
14765 i += 2;
14766 break;
14767 case '*':
14768 if (i + 1 >= len) return 0;
14769 if (str[i+1] != '-') {
14770 i += 4;
14771 }
14772 else if (str[i-1] != '-') {
14773 i += 2;
14774 }
14775 else {
14776 return str + i + 2;
14777 }
14778 break;
14779 default:
14780 i += 3;
14781 break;
14782 }
14783 }
14784 return 0;
14785}
14786
14787static int
14788parser_magic_comment(struct parser_params *p, const char *str, long len)
14789{
14790 int indicator = 0;
14791 VALUE name = 0, val = 0;
14792 const char *beg, *end, *vbeg, *vend;
14793#define str_copy(_s, _p, _n) ((_s) \
14794 ? (void)(rb_str_resize((_s), (_n)), \
14795 MEMCPY(RSTRING_PTR(_s), (_p), char, (_n)), (_s)) \
14796 : (void)((_s) = STR_NEW((_p), (_n))))
14797
14798 if (len <= 7) return FALSE;
14799 if (!!(beg = magic_comment_marker(str, len))) {
14800 if (!(end = magic_comment_marker(beg, str + len - beg)))
14801 return FALSE;
14802 indicator = TRUE;
14803 str = beg;
14804 len = end - beg - 3;
14805 }
14806
14807 /* %r"([^\\s\'\":;]+)\\s*:\\s*(\"(?:\\\\.|[^\"])*\"|[^\"\\s;]+)[\\s;]*" */
14808 while (len > 0) {
14809 const struct magic_comment *mc = magic_comments;
14810 char *s;
14811 int i;
14812 long n = 0;
14813
14814 for (; len > 0 && *str; str++, --len) {
14815 switch (*str) {
14816 case '\'': case '"': case ':': case ';':
14817 continue;
14818 }
14819 if (!ISSPACE(*str)) break;
14820 }
14821 for (beg = str; len > 0; str++, --len) {
14822 switch (*str) {
14823 case '\'': case '"': case ':': case ';':
14824 break;
14825 default:
14826 if (ISSPACE(*str)) break;
14827 continue;
14828 }
14829 break;
14830 }
14831 for (end = str; len > 0 && ISSPACE(*str); str++, --len);
14832 if (!len) break;
14833 if (*str != ':') {
14834 if (!indicator) return FALSE;
14835 continue;
14836 }
14837
14838 do str++; while (--len > 0 && ISSPACE(*str));
14839 if (!len) break;
14840 if (*str == '"') {
14841 for (vbeg = ++str; --len > 0 && *str != '"'; str++) {
14842 if (*str == '\\') {
14843 --len;
14844 ++str;
14845 }
14846 }
14847 vend = str;
14848 if (len) {
14849 --len;
14850 ++str;
14851 }
14852 }
14853 else {
14854 for (vbeg = str; len > 0 && *str != '"' && *str != ';' && !ISSPACE(*str); --len, str++);
14855 vend = str;
14856 }
14857 if (indicator) {
14858 while (len > 0 && (*str == ';' || ISSPACE(*str))) --len, str++;
14859 }
14860 else {
14861 while (len > 0 && (ISSPACE(*str))) --len, str++;
14862 if (len) return FALSE;
14863 }
14864
14865 n = end - beg;
14866 str_copy(name, beg, n);
14867 s = RSTRING_PTR(name);
14868 for (i = 0; i < n; ++i) {
14869 if (s[i] == '-') s[i] = '_';
14870 }
14871 do {
14872 if (STRNCASECMP(mc->name, s, n) == 0 && !mc->name[n]) {
14873 n = vend - vbeg;
14874 if (mc->length) {
14875 n = (*mc->length)(p, vbeg, n);
14876 }
14877 str_copy(val, vbeg, n);
14878 (*mc->func)(p, mc->name, RSTRING_PTR(val));
14879 break;
14880 }
14881 } while (++mc < magic_comments + numberof(magic_comments));
14882#ifdef RIPPER
14883 str_copy(val, vbeg, vend - vbeg);
14884 dispatch2(magic_comment, name, val);
14885#endif
14886 }
14887
14888 return TRUE;
14889}
14890
14891static void
14892set_file_encoding(struct parser_params *p, const char *str, const char *send)
14893{
14894 int sep = 0;
14895 const char *beg = str;
14896 VALUE s;
14897
14898 for (;;) {
14899 if (send - str <= 6) return;
14900 switch (str[6]) {
14901 case 'C': case 'c': str += 6; continue;
14902 case 'O': case 'o': str += 5; continue;
14903 case 'D': case 'd': str += 4; continue;
14904 case 'I': case 'i': str += 3; continue;
14905 case 'N': case 'n': str += 2; continue;
14906 case 'G': case 'g': str += 1; continue;
14907 case '=': case ':':
14908 sep = 1;
14909 str += 6;
14910 break;
14911 default:
14912 str += 6;
14913 if (ISSPACE(*str)) break;
14914 continue;
14915 }
14916 if (STRNCASECMP(str-6, "coding", 6) == 0) break;
14917 }
14918 for (;;) {
14919 do {
14920 if (++str >= send) return;
14921 } while (ISSPACE(*str));
14922 if (sep) break;
14923 if (*str != '=' && *str != ':') return;
14924 sep = 1;
14925 str++;
14926 }
14927 beg = str;
14928 while ((*str == '-' || *str == '_' || ISALNUM(*str)) && ++str < send);
14929 s = rb_str_new(beg, parser_encode_length(p, beg, str - beg));
14930 parser_set_encode(p, RSTRING_PTR(s));
14931 rb_str_resize(s, 0);
14932}
14933
14934static void
14935parser_prepare(struct parser_params *p)
14936{
14937 int c = nextc(p);
14939 switch (c) {
14940 case '#':
14941 if (peek(p, '!')) p->has_shebang = 1;
14942 break;
14943 case 0xef: /* UTF-8 BOM marker */
14944 if (p->lex.pend - p->lex.pcur >= 2 &&
14945 (unsigned char)p->lex.pcur[0] == 0xbb &&
14946 (unsigned char)p->lex.pcur[1] == 0xbf) {
14947 p->enc = rb_utf8_encoding();
14948 p->lex.pcur += 2;
14949 p->lex.pbeg = p->lex.pcur;
14950 return;
14951 }
14952 break;
14953 case EOF:
14954 return;
14955 }
14956 pushback(p, c);
14957 p->enc = rb_enc_get(p->lex.lastline);
14958}
14959
14960#ifndef RIPPER
14961#define ambiguous_operator(tok, op, syn) ( \
14962 rb_warning0("`"op"' after local variable or literal is interpreted as binary operator"), \
14963 rb_warning0("even though it seems like "syn""))
14964#else
14965#define ambiguous_operator(tok, op, syn) \
14966 dispatch2(operator_ambiguous, TOKEN2VAL(tok), rb_str_new_cstr(syn))
14967#endif
14968#define warn_balanced(tok, op, syn) ((void) \
14969 (!IS_lex_state_for(last_state, EXPR_CLASS|EXPR_DOT|EXPR_FNAME|EXPR_ENDFN) && \
14970 space_seen && !ISSPACE(c) && \
14971 (ambiguous_operator(tok, op, syn), 0)), \
14972 (enum yytokentype)(tok))
14973
14974static VALUE
14975parse_rational(struct parser_params *p, char *str, int len, int seen_point)
14976{
14977 VALUE v;
14978 char *point = &str[seen_point];
14979 size_t fraclen = len-seen_point-1;
14980 memmove(point, point+1, fraclen+1);
14981 v = rb_cstr_to_inum(str, 10, FALSE);
14982 return rb_rational_new(v, rb_int_positive_pow(10, fraclen));
14983}
14984
14985static enum yytokentype
14986no_digits(struct parser_params *p)
14987{
14988 yyerror0("numeric literal without digits");
14989 if (peek(p, '_')) nextc(p);
14990 /* dummy 0, for tUMINUS_NUM at numeric */
14991 return set_integer_literal(p, INT2FIX(0), 0);
14992}
14993
14994static enum yytokentype
14995parse_numeric(struct parser_params *p, int c)
14996{
14997 int is_float, seen_point, seen_e, nondigit;
14998 int suffix;
14999
15000 is_float = seen_point = seen_e = nondigit = 0;
15001 SET_LEX_STATE(EXPR_END);
15002 newtok(p);
15003 if (c == '-' || c == '+') {
15004 tokadd(p, c);
15005 c = nextc(p);
15006 }
15007 if (c == '0') {
15008 int start = toklen(p);
15009 c = nextc(p);
15010 if (c == 'x' || c == 'X') {
15011 /* hexadecimal */
15012 c = nextc(p);
15013 if (c != -1 && ISXDIGIT(c)) {
15014 do {
15015 if (c == '_') {
15016 if (nondigit) break;
15017 nondigit = c;
15018 continue;
15019 }
15020 if (!ISXDIGIT(c)) break;
15021 nondigit = 0;
15022 tokadd(p, c);
15023 } while ((c = nextc(p)) != -1);
15024 }
15025 pushback(p, c);
15026 tokfix(p);
15027 if (toklen(p) == start) {
15028 return no_digits(p);
15029 }
15030 else if (nondigit) goto trailing_uc;
15031 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
15032 return set_integer_literal(p, rb_cstr_to_inum(tok(p), 16, FALSE), suffix);
15033 }
15034 if (c == 'b' || c == 'B') {
15035 /* binary */
15036 c = nextc(p);
15037 if (c == '0' || c == '1') {
15038 do {
15039 if (c == '_') {
15040 if (nondigit) break;
15041 nondigit = c;
15042 continue;
15043 }
15044 if (c != '0' && c != '1') break;
15045 nondigit = 0;
15046 tokadd(p, c);
15047 } while ((c = nextc(p)) != -1);
15048 }
15049 pushback(p, c);
15050 tokfix(p);
15051 if (toklen(p) == start) {
15052 return no_digits(p);
15053 }
15054 else if (nondigit) goto trailing_uc;
15055 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
15056 return set_integer_literal(p, rb_cstr_to_inum(tok(p), 2, FALSE), suffix);
15057 }
15058 if (c == 'd' || c == 'D') {
15059 /* decimal */
15060 c = nextc(p);
15061 if (c != -1 && ISDIGIT(c)) {
15062 do {
15063 if (c == '_') {
15064 if (nondigit) break;
15065 nondigit = c;
15066 continue;
15067 }
15068 if (!ISDIGIT(c)) break;
15069 nondigit = 0;
15070 tokadd(p, c);
15071 } while ((c = nextc(p)) != -1);
15072 }
15073 pushback(p, c);
15074 tokfix(p);
15075 if (toklen(p) == start) {
15076 return no_digits(p);
15077 }
15078 else if (nondigit) goto trailing_uc;
15079 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
15080 return set_integer_literal(p, rb_cstr_to_inum(tok(p), 10, FALSE), suffix);
15081 }
15082 if (c == '_') {
15083 /* 0_0 */
15084 goto octal_number;
15085 }
15086 if (c == 'o' || c == 'O') {
15087 /* prefixed octal */
15088 c = nextc(p);
15089 if (c == -1 || c == '_' || !ISDIGIT(c)) {
15090 return no_digits(p);
15091 }
15092 }
15093 if (c >= '0' && c <= '7') {
15094 /* octal */
15095 octal_number:
15096 do {
15097 if (c == '_') {
15098 if (nondigit) break;
15099 nondigit = c;
15100 continue;
15101 }
15102 if (c < '0' || c > '9') break;
15103 if (c > '7') goto invalid_octal;
15104 nondigit = 0;
15105 tokadd(p, c);
15106 } while ((c = nextc(p)) != -1);
15107 if (toklen(p) > start) {
15108 pushback(p, c);
15109 tokfix(p);
15110 if (nondigit) goto trailing_uc;
15111 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
15112 return set_integer_literal(p, rb_cstr_to_inum(tok(p), 8, FALSE), suffix);
15113 }
15114 if (nondigit) {
15115 pushback(p, c);
15116 goto trailing_uc;
15117 }
15118 }
15119 if (c > '7' && c <= '9') {
15120 invalid_octal:
15121 yyerror0("Invalid octal digit");
15122 }
15123 else if (c == '.' || c == 'e' || c == 'E') {
15124 tokadd(p, '0');
15125 }
15126 else {
15127 pushback(p, c);
15128 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
15129 return set_integer_literal(p, INT2FIX(0), suffix);
15130 }
15131 }
15132
15133 for (;;) {
15134 switch (c) {
15135 case '0': case '1': case '2': case '3': case '4':
15136 case '5': case '6': case '7': case '8': case '9':
15137 nondigit = 0;
15138 tokadd(p, c);
15139 break;
15140
15141 case '.':
15142 if (nondigit) goto trailing_uc;
15143 if (seen_point || seen_e) {
15144 goto decode_num;
15145 }
15146 else {
15147 int c0 = nextc(p);
15148 if (c0 == -1 || !ISDIGIT(c0)) {
15149 pushback(p, c0);
15150 goto decode_num;
15151 }
15152 c = c0;
15153 }
15154 seen_point = toklen(p);
15155 tokadd(p, '.');
15156 tokadd(p, c);
15157 is_float++;
15158 nondigit = 0;
15159 break;
15160
15161 case 'e':
15162 case 'E':
15163 if (nondigit) {
15164 pushback(p, c);
15165 c = nondigit;
15166 goto decode_num;
15167 }
15168 if (seen_e) {
15169 goto decode_num;
15170 }
15171 nondigit = c;
15172 c = nextc(p);
15173 if (c != '-' && c != '+' && !ISDIGIT(c)) {
15174 pushback(p, c);
15175 nondigit = 0;
15176 goto decode_num;
15177 }
15178 tokadd(p, nondigit);
15179 seen_e++;
15180 is_float++;
15181 tokadd(p, c);
15182 nondigit = (c == '-' || c == '+') ? c : 0;
15183 break;
15184
15185 case '_': /* `_' in number just ignored */
15186 if (nondigit) goto decode_num;
15187 nondigit = c;
15188 break;
15189
15190 default:
15191 goto decode_num;
15192 }
15193 c = nextc(p);
15194 }
15195
15196 decode_num:
15197 pushback(p, c);
15198 if (nondigit) {
15199 trailing_uc:
15200 literal_flush(p, p->lex.pcur - 1);
15201 YYLTYPE loc = RUBY_INIT_YYLLOC();
15202 compile_error(p, "trailing `%c' in number", nondigit);
15203 parser_show_error_line(p, &loc);
15204 }
15205 tokfix(p);
15206 if (is_float) {
15207 enum yytokentype type = tFLOAT;
15208 VALUE v;
15209
15210 suffix = number_literal_suffix(p, seen_e ? NUM_SUFFIX_I : NUM_SUFFIX_ALL);
15211 if (suffix & NUM_SUFFIX_R) {
15212 type = tRATIONAL;
15213 v = parse_rational(p, tok(p), toklen(p), seen_point);
15214 }
15215 else {
15216 double d = strtod(tok(p), 0);
15217 if (errno == ERANGE) {
15218 rb_warning1("Float %s out of range", WARN_S(tok(p)));
15219 errno = 0;
15220 }
15221 v = DBL2NUM(d);
15222 }
15223 return set_number_literal(p, v, type, suffix);
15224 }
15225 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
15226 return set_integer_literal(p, rb_cstr_to_inum(tok(p), 10, FALSE), suffix);
15227}
15228
15229static enum yytokentype
15230parse_qmark(struct parser_params *p, int space_seen)
15231{
15232 rb_encoding *enc;
15233 register int c;
15234 VALUE lit;
15235
15236 if (IS_END()) {
15238 return '?';
15239 }
15240 c = nextc(p);
15241 if (c == -1) {
15242 compile_error(p, "incomplete character syntax");
15243 return 0;
15244 }
15245 if (rb_enc_isspace(c, p->enc)) {
15246 if (!IS_ARG()) {
15247 int c2 = escaped_control_code(c);
15248 if (c2) {
15249 WARN_SPACE_CHAR(c2, "?");
15250 }
15251 }
15252 ternary:
15253 pushback(p, c);
15255 return '?';
15256 }
15257 newtok(p);
15258 enc = p->enc;
15259 if (!parser_isascii(p)) {
15260 if (tokadd_mbchar(p, c) == -1) return 0;
15261 }
15262 else if ((rb_enc_isalnum(c, p->enc) || c == '_') &&
15263 p->lex.pcur < p->lex.pend && is_identchar(p->lex.pcur, p->lex.pend, p->enc)) {
15264 if (space_seen) {
15265 const char *start = p->lex.pcur - 1, *ptr = start;
15266 do {
15267 int n = parser_precise_mbclen(p, ptr);
15268 if (n < 0) return -1;
15269 ptr += n;
15270 } while (ptr < p->lex.pend && is_identchar(ptr, p->lex.pend, p->enc));
15271 rb_warn2("`?' just followed by `%.*s' is interpreted as" \
15272 " a conditional operator, put a space after `?'",
15273 WARN_I((int)(ptr - start)), WARN_S_L(start, (ptr - start)));
15274 }
15275 goto ternary;
15276 }
15277 else if (c == '\\') {
15278 if (peek(p, 'u')) {
15279 nextc(p);
15280 enc = rb_utf8_encoding();
15281 tokadd_utf8(p, &enc, -1, 0, 0);
15282 }
15283 else if (!lex_eol_p(p) && !(c = *p->lex.pcur, ISASCII(c))) {
15284 nextc(p);
15285 if (tokadd_mbchar(p, c) == -1) return 0;
15286 }
15287 else {
15288 c = read_escape(p, 0, &enc);
15289 tokadd(p, c);
15290 }
15291 }
15292 else {
15293 tokadd(p, c);
15294 }
15295 tokfix(p);
15296 lit = STR_NEW3(tok(p), toklen(p), enc, 0);
15297 set_yylval_str(lit);
15298 SET_LEX_STATE(EXPR_END);
15299 return tCHAR;
15300}
15301
15302static enum yytokentype
15303parse_percent(struct parser_params *p, const int space_seen, const enum lex_state_e last_state)
15304{
15305 register int c;
15306 const char *ptok = p->lex.pcur;
15307
15308 if (IS_BEG()) {
15309 int term;
15310 int paren;
15311
15312 c = nextc(p);
15313 quotation:
15314 if (c == -1 || !ISALNUM(c)) {
15315 term = c;
15316 c = 'Q';
15317 }
15318 else {
15319 term = nextc(p);
15320 if (rb_enc_isalnum(term, p->enc) || !parser_isascii(p)) {
15321 yyerror0("unknown type of %string");
15322 return 0;
15323 }
15324 }
15325 if (c == -1 || term == -1) {
15326 compile_error(p, "unterminated quoted string meets end of file");
15327 return 0;
15328 }
15329 paren = term;
15330 if (term == '(') term = ')';
15331 else if (term == '[') term = ']';
15332 else if (term == '{') term = '}';
15333 else if (term == '<') term = '>';
15334 else paren = 0;
15335
15336 p->lex.ptok = ptok-1;
15337 switch (c) {
15338 case 'Q':
15339 p->lex.strterm = NEW_STRTERM(str_dquote, term, paren);
15340 return tSTRING_BEG;
15341
15342 case 'q':
15343 p->lex.strterm = NEW_STRTERM(str_squote, term, paren);
15344 return tSTRING_BEG;
15345
15346 case 'W':
15347 p->lex.strterm = NEW_STRTERM(str_dword, term, paren);
15348 return tWORDS_BEG;
15349
15350 case 'w':
15351 p->lex.strterm = NEW_STRTERM(str_sword, term, paren);
15352 return tQWORDS_BEG;
15353
15354 case 'I':
15355 p->lex.strterm = NEW_STRTERM(str_dword, term, paren);
15356 return tSYMBOLS_BEG;
15357
15358 case 'i':
15359 p->lex.strterm = NEW_STRTERM(str_sword, term, paren);
15360 return tQSYMBOLS_BEG;
15361
15362 case 'x':
15363 p->lex.strterm = NEW_STRTERM(str_xquote, term, paren);
15364 return tXSTRING_BEG;
15365
15366 case 'r':
15367 p->lex.strterm = NEW_STRTERM(str_regexp, term, paren);
15368 return tREGEXP_BEG;
15369
15370 case 's':
15371 p->lex.strterm = NEW_STRTERM(str_ssym, term, paren);
15372 SET_LEX_STATE(EXPR_FNAME|EXPR_FITEM);
15373 return tSYMBEG;
15374
15375 default:
15376 yyerror0("unknown type of %string");
15377 return 0;
15378 }
15379 }
15380 if ((c = nextc(p)) == '=') {
15381 set_yylval_id('%');
15382 SET_LEX_STATE(EXPR_BEG);
15383 return tOP_ASGN;
15384 }
15385 if (IS_SPCARG(c) || (IS_lex_state(EXPR_FITEM) && c == 's')) {
15386 goto quotation;
15387 }
15388 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
15389 pushback(p, c);
15390 return warn_balanced('%', "%%", "string literal");
15391}
15392
15393static int
15394tokadd_ident(struct parser_params *p, int c)
15395{
15396 do {
15397 if (tokadd_mbchar(p, c) == -1) return -1;
15398 c = nextc(p);
15399 } while (parser_is_identchar(p));
15400 pushback(p, c);
15401 return 0;
15402}
15403
15404static ID
15405tokenize_ident(struct parser_params *p, const enum lex_state_e last_state)
15406{
15407 ID ident = TOK_INTERN();
15408
15409 set_yylval_name(ident);
15410
15411 return ident;
15412}
15413
15414static int
15415parse_numvar(struct parser_params *p)
15416{
15417 size_t len;
15418 int overflow;
15419 unsigned long n = ruby_scan_digits(tok(p)+1, toklen(p)-1, 10, &len, &overflow);
15420 const unsigned long nth_ref_max =
15421 ((FIXNUM_MAX < INT_MAX) ? FIXNUM_MAX : INT_MAX) >> 1;
15422 /* NTH_REF is left-shifted to be ORed with back-ref flag and
15423 * turned into a Fixnum, in compile.c */
15424
15425 if (overflow || n > nth_ref_max) {
15426 /* compile_error()? */
15427 rb_warn1("`%s' is too big for a number variable, always nil", WARN_S(tok(p)));
15428 return 0; /* $0 is $PROGRAM_NAME, not NTH_REF */
15429 }
15430 else {
15431 return (int)n;
15432 }
15433}
15434
15435static enum yytokentype
15436parse_gvar(struct parser_params *p, const enum lex_state_e last_state)
15437{
15438 const char *ptr = p->lex.pcur;
15439 register int c;
15440
15441 SET_LEX_STATE(EXPR_END);
15442 p->lex.ptok = ptr - 1; /* from '$' */
15443 newtok(p);
15444 c = nextc(p);
15445 switch (c) {
15446 case '_': /* $_: last read line string */
15447 c = nextc(p);
15448 if (parser_is_identchar(p)) {
15449 tokadd(p, '$');
15450 tokadd(p, '_');
15451 break;
15452 }
15453 pushback(p, c);
15454 c = '_';
15455 /* fall through */
15456 case '~': /* $~: match-data */
15457 case '*': /* $*: argv */
15458 case '$': /* $$: pid */
15459 case '?': /* $?: last status */
15460 case '!': /* $!: error string */
15461 case '@': /* $@: error position */
15462 case '/': /* $/: input record separator */
15463 case '\\': /* $\: output record separator */
15464 case ';': /* $;: field separator */
15465 case ',': /* $,: output field separator */
15466 case '.': /* $.: last read line number */
15467 case '=': /* $=: ignorecase */
15468 case ':': /* $:: load path */
15469 case '<': /* $<: reading filename */
15470 case '>': /* $>: default output handle */
15471 case '\"': /* $": already loaded files */
15472 tokadd(p, '$');
15473 tokadd(p, c);
15474 goto gvar;
15475
15476 case '-':
15477 tokadd(p, '$');
15478 tokadd(p, c);
15479 c = nextc(p);
15480 if (parser_is_identchar(p)) {
15481 if (tokadd_mbchar(p, c) == -1) return 0;
15482 }
15483 else {
15484 pushback(p, c);
15485 pushback(p, '-');
15486 return '$';
15487 }
15488 gvar:
15490 return tGVAR;
15491
15492 case '&': /* $&: last match */
15493 case '`': /* $`: string before last match */
15494 case '\'': /* $': string after last match */
15495 case '+': /* $+: string matches last paren. */
15496 if (IS_lex_state_for(last_state, EXPR_FNAME)) {
15497 tokadd(p, '$');
15498 tokadd(p, c);
15499 goto gvar;
15500 }
15501 set_yylval_node(NEW_BACK_REF(c, &_cur_loc));
15502 return tBACK_REF;
15503
15504 case '1': case '2': case '3':
15505 case '4': case '5': case '6':
15506 case '7': case '8': case '9':
15507 tokadd(p, '$');
15508 do {
15509 tokadd(p, c);
15510 c = nextc(p);
15511 } while (c != -1 && ISDIGIT(c));
15512 pushback(p, c);
15513 if (IS_lex_state_for(last_state, EXPR_FNAME)) goto gvar;
15514 tokfix(p);
15515 set_yylval_node(NEW_NTH_REF(parse_numvar(p), &_cur_loc));
15516 return tNTH_REF;
15517
15518 default:
15519 if (!parser_is_identchar(p)) {
15520 YYLTYPE loc = RUBY_INIT_YYLLOC();
15521 if (c == -1 || ISSPACE(c)) {
15522 compile_error(p, "`$' without identifiers is not allowed as a global variable name");
15523 }
15524 else {
15525 pushback(p, c);
15526 compile_error(p, "`$%c' is not allowed as a global variable name", c);
15527 }
15528 parser_show_error_line(p, &loc);
15530 return tGVAR;
15531 }
15532 /* fall through */
15533 case '0':
15534 tokadd(p, '$');
15535 }
15536
15537 if (tokadd_ident(p, c)) return 0;
15538 SET_LEX_STATE(EXPR_END);
15539 tokenize_ident(p, last_state);
15540 return tGVAR;
15541}
15542
15543#ifndef RIPPER
15544static bool
15545parser_numbered_param(struct parser_params *p, int n)
15546{
15547 if (n < 0) return false;
15548
15550 return false;
15551 }
15552 if (p->max_numparam == ORDINAL_PARAM) {
15553 compile_error(p, "ordinary parameter is defined");
15554 return false;
15555 }
15556 struct vtable *args = p->lvtbl->args;
15557 if (p->max_numparam < n) {
15558 p->max_numparam = n;
15559 }
15560 while (n > args->pos) {
15561 vtable_add(args, NUMPARAM_IDX_TO_ID(args->pos+1));
15562 }
15563 return true;
15564}
15565#endif
15566
15567static enum yytokentype
15568parse_atmark(struct parser_params *p, const enum lex_state_e last_state)
15569{
15570 const char *ptr = p->lex.pcur;
15571 enum yytokentype result = tIVAR;
15572 register int c = nextc(p);
15573 YYLTYPE loc;
15574
15575 p->lex.ptok = ptr - 1; /* from '@' */
15576 newtok(p);
15577 tokadd(p, '@');
15578 if (c == '@') {
15579 result = tCVAR;
15580 tokadd(p, '@');
15581 c = nextc(p);
15582 }
15583 SET_LEX_STATE(IS_lex_state_for(last_state, EXPR_FNAME) ? EXPR_ENDFN : EXPR_END);
15584 if (c == -1 || !parser_is_identchar(p)) {
15585 pushback(p, c);
15586 RUBY_SET_YYLLOC(loc);
15587 if (result == tIVAR) {
15588 compile_error(p, "`@' without identifiers is not allowed as an instance variable name");
15589 }
15590 else {
15591 compile_error(p, "`@@' without identifiers is not allowed as a class variable name");
15592 }
15593 parser_show_error_line(p, &loc);
15595 SET_LEX_STATE(EXPR_END);
15596 return result;
15597 }
15598 else if (ISDIGIT(c)) {
15599 pushback(p, c);
15600 RUBY_SET_YYLLOC(loc);
15601 if (result == tIVAR) {
15602 compile_error(p, "`@%c' is not allowed as an instance variable name", c);
15603 }
15604 else {
15605 compile_error(p, "`@@%c' is not allowed as a class variable name", c);
15606 }
15607 parser_show_error_line(p, &loc);
15609 SET_LEX_STATE(EXPR_END);
15610 return result;
15611 }
15612
15613 if (tokadd_ident(p, c)) return 0;
15614 tokenize_ident(p, last_state);
15615 return result;
15616}
15617
15618static enum yytokentype
15619parse_ident(struct parser_params *p, int c, int cmd_state)
15620{
15621 enum yytokentype result;
15622 int mb = ENC_CODERANGE_7BIT;
15623 const enum lex_state_e last_state = p->lex.state;
15624 ID ident;
15625
15626 do {
15627 if (!ISASCII(c)) mb = ENC_CODERANGE_UNKNOWN;
15628 if (tokadd_mbchar(p, c) == -1) return 0;
15629 c = nextc(p);
15630 } while (parser_is_identchar(p));
15631 if ((c == '!' || c == '?') && !peek(p, '=')) {
15632 result = tFID;
15633 tokadd(p, c);
15634 }
15635 else if (c == '=' && IS_lex_state(EXPR_FNAME) &&
15636 (!peek(p, '~') && !peek(p, '>') && (!peek(p, '=') || (peek_n(p, '>', 1))))) {
15637 result = tIDENTIFIER;
15638 tokadd(p, c);
15639 }
15640 else {
15641 result = tCONSTANT; /* assume provisionally */
15642 pushback(p, c);
15643 }
15644 tokfix(p);
15645
15646 if (IS_LABEL_POSSIBLE()) {
15647 if (IS_LABEL_SUFFIX(0)) {
15648 SET_LEX_STATE(EXPR_ARG|EXPR_LABELED);
15649 nextc(p);
15651 return tLABEL;
15652 }
15653 }
15654 if (mb == ENC_CODERANGE_7BIT && !IS_lex_state(EXPR_DOT)) {
15655 const struct kwtable *kw;
15656
15657 /* See if it is a reserved word. */
15658 kw = rb_reserved_word(tok(p), toklen(p));
15659 if (kw) {
15660 enum lex_state_e state = p->lex.state;
15661 if (IS_lex_state_for(state, EXPR_FNAME)) {
15662 SET_LEX_STATE(EXPR_ENDFN);
15664 return kw->id[0];
15665 }
15666 SET_LEX_STATE(kw->state);
15667 if (IS_lex_state(EXPR_BEG)) {
15668 p->command_start = TRUE;
15669 }
15670 if (kw->id[0] == keyword_do) {
15671 if (lambda_beginning_p()) {
15672 p->lex.lpar_beg = -1; /* make lambda_beginning_p() == FALSE in the body of "-> do ... end" */
15673 return keyword_do_LAMBDA;
15674 }
15675 if (COND_P()) return keyword_do_cond;
15676 if (CMDARG_P() && !IS_lex_state_for(state, EXPR_CMDARG))
15677 return keyword_do_block;
15678 return keyword_do;
15679 }
15680 if (IS_lex_state_for(state, (EXPR_BEG | EXPR_LABELED)))
15681 return kw->id[0];
15682 else {
15683 if (kw->id[0] != kw->id[1])
15684 SET_LEX_STATE(EXPR_BEG | EXPR_LABEL);
15685 return kw->id[1];
15686 }
15687 }
15688 }
15689
15690 if (IS_lex_state(EXPR_BEG_ANY | EXPR_ARG_ANY | EXPR_DOT)) {
15691 if (cmd_state) {
15692 SET_LEX_STATE(EXPR_CMDARG);
15693 }
15694 else {
15695 SET_LEX_STATE(EXPR_ARG);
15696 }
15697 }
15698 else if (p->lex.state == EXPR_FNAME) {
15699 SET_LEX_STATE(EXPR_ENDFN);
15700 }
15701 else {
15702 SET_LEX_STATE(EXPR_END);
15703 }
15704
15705 ident = tokenize_ident(p, last_state);
15706 if (result == tCONSTANT && is_local_id(ident)) result = tIDENTIFIER;
15707 if (!IS_lex_state_for(last_state, EXPR_DOT|EXPR_FNAME) &&
15708 (result == tIDENTIFIER) && /* not EXPR_FNAME, not attrasgn */
15709 lvar_defined(p, ident)) {
15710 SET_LEX_STATE(EXPR_END|EXPR_LABEL);
15711 }
15712 return result;
15713}
15714
15715static enum yytokentype
15716parser_yylex(struct parser_params *p)
15717{
15718 register int c;
15719 int space_seen = 0;
15720 int cmd_state;
15721 int label;
15722 enum lex_state_e last_state;
15723 int fallthru = FALSE;
15724 int token_seen = p->token_seen;
15725
15726 if (p->lex.strterm) {
15727 if (p->lex.strterm->flags & STRTERM_HEREDOC) {
15728 return here_document(p, &p->lex.strterm->u.heredoc);
15729 }
15730 else {
15731 token_flush(p);
15732 return parse_string(p, &p->lex.strterm->u.literal);
15733 }
15734 }
15735 cmd_state = p->command_start;
15736 p->command_start = FALSE;
15737 p->token_seen = TRUE;
15738 retry:
15739 last_state = p->lex.state;
15740#ifndef RIPPER
15741 token_flush(p);
15742#endif
15743 switch (c = nextc(p)) {
15744 case '\0': /* NUL */
15745 case '\004': /* ^D */
15746 case '\032': /* ^Z */
15747 case -1: /* end of script. */
15748 return 0;
15749
15750 /* white spaces */
15751 case ' ': case '\t': case '\f': case '\r':
15752 case '\13': /* '\v' */
15753 space_seen = 1;
15754#ifdef RIPPER
15755 while ((c = nextc(p))) {
15756 switch (c) {
15757 case ' ': case '\t': case '\f': case '\r':
15758 case '\13': /* '\v' */
15759 break;
15760 default:
15761 goto outofloop;
15762 }
15763 }
15764 outofloop:
15765 pushback(p, c);
15767#endif
15768 goto retry;
15769
15770 case '#': /* it's a comment */
15771 p->token_seen = token_seen;
15772 /* no magic_comment in shebang line */
15773 if (!parser_magic_comment(p, p->lex.pcur, p->lex.pend - p->lex.pcur)) {
15774 if (comment_at_top(p)) {
15775 set_file_encoding(p, p->lex.pcur, p->lex.pend);
15776 }
15777 }
15778 lex_goto_eol(p);
15780 fallthru = TRUE;
15781 /* fall through */
15782 case '\n':
15783 p->token_seen = token_seen;
15784 c = (IS_lex_state(EXPR_BEG|EXPR_CLASS|EXPR_FNAME|EXPR_DOT) &&
15785 !IS_lex_state(EXPR_LABELED));
15786 if (c || IS_lex_state_all(EXPR_ARG|EXPR_LABELED)) {
15787 if (!fallthru) {
15789 }
15790 fallthru = FALSE;
15791 if (!c && p->in_kwarg) {
15792 goto normal_newline;
15793 }
15794 goto retry;
15795 }
15796 while (1) {
15797 switch (c = nextc(p)) {
15798 case ' ': case '\t': case '\f': case '\r':
15799 case '\13': /* '\v' */
15800 space_seen = 1;
15801 break;
15802 case '#':
15803 pushback(p, c);
15804 if (space_seen) dispatch_scan_event(p, tSP);
15805 goto retry;
15806 case '&':
15807 case '.': {
15809 if (peek(p, '.') == (c == '&')) {
15810 pushback(p, c);
15812 goto retry;
15813 }
15814 }
15815 default:
15816 p->ruby_sourceline--;
15817 p->lex.nextline = p->lex.lastline;
15818 case -1: /* EOF no decrement*/
15819#ifndef RIPPER
15820 if (p->lex.prevline && !p->eofp) p->lex.lastline = p->lex.prevline;
15821 p->lex.pbeg = RSTRING_PTR(p->lex.lastline);
15822 p->lex.pend = p->lex.pcur = p->lex.pbeg + RSTRING_LEN(p->lex.lastline);
15823 pushback(p, 1); /* always pushback */
15824 p->lex.ptok = p->lex.pcur;
15825#else
15826 lex_goto_eol(p);
15827 if (c != -1) {
15828 p->lex.ptok = p->lex.pcur;
15829 }
15830#endif
15831 goto normal_newline;
15832 }
15833 }
15834 normal_newline:
15835 p->command_start = TRUE;
15836 SET_LEX_STATE(EXPR_BEG);
15837 return '\n';
15838
15839 case '*':
15840 if ((c = nextc(p)) == '*') {
15841 if ((c = nextc(p)) == '=') {
15843 SET_LEX_STATE(EXPR_BEG);
15844 return tOP_ASGN;
15845 }
15846 pushback(p, c);
15847 if (IS_SPCARG(c)) {
15848 rb_warning0("`**' interpreted as argument prefix");
15849 c = tDSTAR;
15850 }
15851 else if (IS_BEG()) {
15852 c = tDSTAR;
15853 }
15854 else {
15855 c = warn_balanced((enum ruby_method_ids)tPOW, "**", "argument prefix");
15856 }
15857 }
15858 else {
15859 if (c == '=') {
15860 set_yylval_id('*');
15861 SET_LEX_STATE(EXPR_BEG);
15862 return tOP_ASGN;
15863 }
15864 pushback(p, c);
15865 if (IS_SPCARG(c)) {
15866 rb_warning0("`*' interpreted as argument prefix");
15867 c = tSTAR;
15868 }
15869 else if (IS_BEG()) {
15870 c = tSTAR;
15871 }
15872 else {
15873 c = warn_balanced('*', "*", "argument prefix");
15874 }
15875 }
15876 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
15877 return c;
15878
15879 case '!':
15880 c = nextc(p);
15881 if (IS_AFTER_OPERATOR()) {
15882 SET_LEX_STATE(EXPR_ARG);
15883 if (c == '@') {
15884 return '!';
15885 }
15886 }
15887 else {
15888 SET_LEX_STATE(EXPR_BEG);
15889 }
15890 if (c == '=') {
15891 return tNEQ;
15892 }
15893 if (c == '~') {
15894 return tNMATCH;
15895 }
15896 pushback(p, c);
15897 return '!';
15898
15899 case '=':
15900 if (was_bol(p)) {
15901 /* skip embedded rd document */
15902 if (word_match_p(p, "begin", 5)) {
15903 int first_p = TRUE;
15904
15905 lex_goto_eol(p);
15907 for (;;) {
15908 lex_goto_eol(p);
15909 if (!first_p) {
15911 }
15912 first_p = FALSE;
15913 c = nextc(p);
15914 if (c == -1) {
15915 compile_error(p, "embedded document meets end of file");
15916 return 0;
15917 }
15918 if (c == '=' && word_match_p(p, "end", 3)) {
15919 break;
15920 }
15921 pushback(p, c);
15922 }
15923 lex_goto_eol(p);
15925 goto retry;
15926 }
15927 }
15928
15929 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
15930 if ((c = nextc(p)) == '=') {
15931 if ((c = nextc(p)) == '=') {
15932 return tEQQ;
15933 }
15934 pushback(p, c);
15935 return tEQ;
15936 }
15937 if (c == '~') {
15938 return tMATCH;
15939 }
15940 else if (c == '>') {
15941 return tASSOC;
15942 }
15943 pushback(p, c);
15944 return '=';
15945
15946 case '<':
15947 c = nextc(p);
15948 if (c == '<' &&
15949 !IS_lex_state(EXPR_DOT | EXPR_CLASS) &&
15950 !IS_END() &&
15951 (!IS_ARG() || IS_lex_state(EXPR_LABELED) || space_seen)) {
15952 int token = heredoc_identifier(p);
15953 if (token) return token < 0 ? 0 : token;
15954 }
15955 if (IS_AFTER_OPERATOR()) {
15956 SET_LEX_STATE(EXPR_ARG);
15957 }
15958 else {
15959 if (IS_lex_state(EXPR_CLASS))
15960 p->command_start = TRUE;
15961 SET_LEX_STATE(EXPR_BEG);
15962 }
15963 if (c == '=') {
15964 if ((c = nextc(p)) == '>') {
15965 return tCMP;
15966 }
15967 pushback(p, c);
15968 return tLEQ;
15969 }
15970 if (c == '<') {
15971 if ((c = nextc(p)) == '=') {
15973 SET_LEX_STATE(EXPR_BEG);
15974 return tOP_ASGN;
15975 }
15976 pushback(p, c);
15977 return warn_balanced((enum ruby_method_ids)tLSHFT, "<<", "here document");
15978 }
15979 pushback(p, c);
15980 return '<';
15981
15982 case '>':
15983 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
15984 if ((c = nextc(p)) == '=') {
15985 return tGEQ;
15986 }
15987 if (c == '>') {
15988 if ((c = nextc(p)) == '=') {
15990 SET_LEX_STATE(EXPR_BEG);
15991 return tOP_ASGN;
15992 }
15993 pushback(p, c);
15994 return tRSHFT;
15995 }
15996 pushback(p, c);
15997 return '>';
15998
15999 case '"':
16000 label = (IS_LABEL_POSSIBLE() ? str_label : 0);
16001 p->lex.strterm = NEW_STRTERM(str_dquote | label, '"', 0);
16002 p->lex.ptok = p->lex.pcur-1;
16003 return tSTRING_BEG;
16004
16005 case '`':
16006 if (IS_lex_state(EXPR_FNAME)) {
16007 SET_LEX_STATE(EXPR_ENDFN);
16008 return c;
16009 }
16010 if (IS_lex_state(EXPR_DOT)) {
16011 if (cmd_state)
16012 SET_LEX_STATE(EXPR_CMDARG);
16013 else
16014 SET_LEX_STATE(EXPR_ARG);
16015 return c;
16016 }
16017 p->lex.strterm = NEW_STRTERM(str_xquote, '`', 0);
16018 return tXSTRING_BEG;
16019
16020 case '\'':
16021 label = (IS_LABEL_POSSIBLE() ? str_label : 0);
16022 p->lex.strterm = NEW_STRTERM(str_squote | label, '\'', 0);
16023 p->lex.ptok = p->lex.pcur-1;
16024 return tSTRING_BEG;
16025
16026 case '?':
16027 return parse_qmark(p, space_seen);
16028
16029 case '&':
16030 if ((c = nextc(p)) == '&') {
16031 SET_LEX_STATE(EXPR_BEG);
16032 if ((c = nextc(p)) == '=') {
16034 SET_LEX_STATE(EXPR_BEG);
16035 return tOP_ASGN;
16036 }
16037 pushback(p, c);
16038 return tANDOP;
16039 }
16040 else if (c == '=') {
16041 set_yylval_id('&');
16042 SET_LEX_STATE(EXPR_BEG);
16043 return tOP_ASGN;
16044 }
16045 else if (c == '.') {
16047 SET_LEX_STATE(EXPR_DOT);
16048 return tANDDOT;
16049 }
16050 pushback(p, c);
16051 if (IS_SPCARG(c)) {
16052 if ((c != ':') ||
16053 (c = peekc_n(p, 1)) == -1 ||
16054 !(c == '\'' || c == '"' ||
16055 is_identchar((p->lex.pcur+1), p->lex.pend, p->enc))) {
16056 rb_warning0("`&' interpreted as argument prefix");
16057 }
16058 c = tAMPER;
16059 }
16060 else if (IS_BEG()) {
16061 c = tAMPER;
16062 }
16063 else {
16064 c = warn_balanced('&', "&", "argument prefix");
16065 }
16066 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
16067 return c;
16068
16069 case '|':
16070 if ((c = nextc(p)) == '|') {
16071 SET_LEX_STATE(EXPR_BEG);
16072 if ((c = nextc(p)) == '=') {
16074 SET_LEX_STATE(EXPR_BEG);
16075 return tOP_ASGN;
16076 }
16077 pushback(p, c);
16078 if (IS_lex_state_for(last_state, EXPR_BEG)) {
16079 c = '|';
16080 pushback(p, '|');
16081 return c;
16082 }
16083 return tOROP;
16084 }
16085 if (c == '=') {
16086 set_yylval_id('|');
16087 SET_LEX_STATE(EXPR_BEG);
16088 return tOP_ASGN;
16089 }
16090 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG|EXPR_LABEL);
16091 pushback(p, c);
16092 return '|';
16093
16094 case '+':
16095 c = nextc(p);
16096 if (IS_AFTER_OPERATOR()) {
16097 SET_LEX_STATE(EXPR_ARG);
16098 if (c == '@') {
16099 return tUPLUS;
16100 }
16101 pushback(p, c);
16102 return '+';
16103 }
16104 if (c == '=') {
16105 set_yylval_id('+');
16106 SET_LEX_STATE(EXPR_BEG);
16107 return tOP_ASGN;
16108 }
16109 if (IS_BEG() || (IS_SPCARG(c) && arg_ambiguous(p, '+'))) {
16110 SET_LEX_STATE(EXPR_BEG);
16111 pushback(p, c);
16112 if (c != -1 && ISDIGIT(c)) {
16113 return parse_numeric(p, '+');
16114 }
16115 return tUPLUS;
16116 }
16117 SET_LEX_STATE(EXPR_BEG);
16118 pushback(p, c);
16119 return warn_balanced('+', "+", "unary operator");
16120
16121 case '-':
16122 c = nextc(p);
16123 if (IS_AFTER_OPERATOR()) {
16124 SET_LEX_STATE(EXPR_ARG);
16125 if (c == '@') {
16126 return tUMINUS;
16127 }
16128 pushback(p, c);
16129 return '-';
16130 }
16131 if (c == '=') {
16132 set_yylval_id('-');
16133 SET_LEX_STATE(EXPR_BEG);
16134 return tOP_ASGN;
16135 }
16136 if (c == '>') {
16137 SET_LEX_STATE(EXPR_ENDFN);
16138 return tLAMBDA;
16139 }
16140 if (IS_BEG() || (IS_SPCARG(c) && arg_ambiguous(p, '-'))) {
16141 SET_LEX_STATE(EXPR_BEG);
16142 pushback(p, c);
16143 if (c != -1 && ISDIGIT(c)) {
16144 return tUMINUS_NUM;
16145 }
16146 return tUMINUS;
16147 }
16148 SET_LEX_STATE(EXPR_BEG);
16149 pushback(p, c);
16150 return warn_balanced('-', "-", "unary operator");
16151
16152 case '.': {
16153 int is_beg = IS_BEG();
16154 SET_LEX_STATE(EXPR_BEG);
16155 if ((c = nextc(p)) == '.') {
16156 if ((c = nextc(p)) == '.') {
16157 if (p->lex.paren_nest == 0 && looking_at_eol_p(p)) {
16158 rb_warn0("... at EOL, should be parenthesized?");
16159 }
16160 return is_beg ? tBDOT3 : tDOT3;
16161 }
16162 pushback(p, c);
16163 return is_beg ? tBDOT2 : tDOT2;
16164 }
16165 pushback(p, c);
16166 if (c != -1 && ISDIGIT(c)) {
16167 char prev = p->lex.pcur-1 > p->lex.pbeg ? *(p->lex.pcur-2) : 0;
16168 parse_numeric(p, '.');
16169 if (ISDIGIT(prev)) {
16170 yyerror0("unexpected fraction part after numeric literal");
16171 }
16172 else {
16173 yyerror0("no .<digit> floating literal anymore; put 0 before dot");
16174 }
16175 SET_LEX_STATE(EXPR_END);
16176 p->lex.ptok = p->lex.pcur;
16177 goto retry;
16178 }
16179 set_yylval_id('.');
16180 SET_LEX_STATE(EXPR_DOT);
16181 return '.';
16182 }
16183
16184 case '0': case '1': case '2': case '3': case '4':
16185 case '5': case '6': case '7': case '8': case '9':
16186 return parse_numeric(p, c);
16187
16188 case ')':
16189 COND_POP();
16190 CMDARG_POP();
16191 SET_LEX_STATE(EXPR_ENDFN);
16192 p->lex.paren_nest--;
16193 return c;
16194
16195 case ']':
16196 COND_POP();
16197 CMDARG_POP();
16198 SET_LEX_STATE(EXPR_END);
16199 p->lex.paren_nest--;
16200 return c;
16201
16202 case '}':
16203 /* tSTRING_DEND does COND_POP and CMDARG_POP in the yacc's rule */
16204 if (!p->lex.brace_nest--) return tSTRING_DEND;
16205 COND_POP();
16206 CMDARG_POP();
16207 SET_LEX_STATE(EXPR_END);
16208 p->lex.paren_nest--;
16209 return c;
16210
16211 case ':':
16212 c = nextc(p);
16213 if (c == ':') {
16214 if (IS_BEG() || IS_lex_state(EXPR_CLASS) || IS_SPCARG(-1)) {
16215 SET_LEX_STATE(EXPR_BEG);
16216 return tCOLON3;
16217 }
16219 SET_LEX_STATE(EXPR_DOT);
16220 return tCOLON2;
16221 }
16222 if (IS_END() || ISSPACE(c) || c == '#') {
16223 pushback(p, c);
16224 c = warn_balanced(':', ":", "symbol literal");
16225 SET_LEX_STATE(EXPR_BEG);
16226 return c;
16227 }
16228 switch (c) {
16229 case '\'':
16230 p->lex.strterm = NEW_STRTERM(str_ssym, c, 0);
16231 break;
16232 case '"':
16233 p->lex.strterm = NEW_STRTERM(str_dsym, c, 0);
16234 break;
16235 default:
16236 pushback(p, c);
16237 break;
16238 }
16239 SET_LEX_STATE(EXPR_FNAME);
16240 return tSYMBEG;
16241
16242 case '/':
16243 if (IS_BEG()) {
16244 p->lex.strterm = NEW_STRTERM(str_regexp, '/', 0);
16245 return tREGEXP_BEG;
16246 }
16247 if ((c = nextc(p)) == '=') {
16248 set_yylval_id('/');
16249 SET_LEX_STATE(EXPR_BEG);
16250 return tOP_ASGN;
16251 }
16252 pushback(p, c);
16253 if (IS_SPCARG(c)) {
16254 arg_ambiguous(p, '/');
16255 p->lex.strterm = NEW_STRTERM(str_regexp, '/', 0);
16256 return tREGEXP_BEG;
16257 }
16258 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
16259 return warn_balanced('/', "/", "regexp literal");
16260
16261 case '^':
16262 if ((c = nextc(p)) == '=') {
16263 set_yylval_id('^');
16264 SET_LEX_STATE(EXPR_BEG);
16265 return tOP_ASGN;
16266 }
16267 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
16268 pushback(p, c);
16269 return '^';
16270
16271 case ';':
16272 SET_LEX_STATE(EXPR_BEG);
16273 p->command_start = TRUE;
16274 return ';';
16275
16276 case ',':
16277 SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
16278 return ',';
16279
16280 case '~':
16281 if (IS_AFTER_OPERATOR()) {
16282 if ((c = nextc(p)) != '@') {
16283 pushback(p, c);
16284 }
16285 SET_LEX_STATE(EXPR_ARG);
16286 }
16287 else {
16288 SET_LEX_STATE(EXPR_BEG);
16289 }
16290 return '~';
16291
16292 case '(':
16293 if (IS_BEG()) {
16294 c = tLPAREN;
16295 }
16296 else if (!space_seen) {
16297 /* foo( ... ) => method call, no ambiguity */
16298 }
16299 else if (IS_ARG() || IS_lex_state_all(EXPR_END|EXPR_LABEL)) {
16300 c = tLPAREN_ARG;
16301 }
16302 else if (IS_lex_state(EXPR_ENDFN) && !lambda_beginning_p()) {
16303 rb_warning0("parentheses after method name is interpreted as "
16304 "an argument list, not a decomposed argument");
16305 }
16306 p->lex.paren_nest++;
16307 COND_PUSH(0);
16308 CMDARG_PUSH(0);
16309 SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
16310 return c;
16311
16312 case '[':
16313 p->lex.paren_nest++;
16314 if (IS_AFTER_OPERATOR()) {
16315 if ((c = nextc(p)) == ']') {
16316 SET_LEX_STATE(EXPR_ARG);
16317 if ((c = nextc(p)) == '=') {
16318 return tASET;
16319 }
16320 pushback(p, c);
16321 return tAREF;
16322 }
16323 pushback(p, c);
16324 SET_LEX_STATE(EXPR_ARG|EXPR_LABEL);
16325 return '[';
16326 }
16327 else if (IS_BEG()) {
16328 c = tLBRACK;
16329 }
16330 else if (IS_ARG() && (space_seen || IS_lex_state(EXPR_LABELED))) {
16331 c = tLBRACK;
16332 }
16333 SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
16334 COND_PUSH(0);
16335 CMDARG_PUSH(0);
16336 return c;
16337
16338 case '{':
16339 ++p->lex.brace_nest;
16340 if (lambda_beginning_p())
16341 c = tLAMBEG;
16342 else if (IS_lex_state(EXPR_LABELED))
16343 c = tLBRACE; /* hash */
16344 else if (IS_lex_state(EXPR_ARG_ANY | EXPR_END | EXPR_ENDFN))
16345 c = '{'; /* block (primary) */
16346 else if (IS_lex_state(EXPR_ENDARG))
16347 c = tLBRACE_ARG; /* block (expr) */
16348 else
16349 c = tLBRACE; /* hash */
16350 if (c != tLBRACE) {
16351 p->command_start = TRUE;
16352 SET_LEX_STATE(EXPR_BEG);
16353 }
16354 else {
16355 SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
16356 }
16357 ++p->lex.paren_nest; /* after lambda_beginning_p() */
16358 COND_PUSH(0);
16359 CMDARG_PUSH(0);
16360 return c;
16361
16362 case '\\':
16363 c = nextc(p);
16364 if (c == '\n') {
16365 space_seen = 1;
16367 goto retry; /* skip \\n */
16368 }
16369 if (c == ' ') return tSP;
16370 if (ISSPACE(c)) return c;
16371 pushback(p, c);
16372 return '\\';
16373
16374 case '%':
16375 return parse_percent(p, space_seen, last_state);
16376
16377 case '$':
16378 return parse_gvar(p, last_state);
16379
16380 case '@':
16381 return parse_atmark(p, last_state);
16382
16383 case '_':
16384 if (was_bol(p) && whole_match_p(p, "__END__", 7, 0)) {
16385 p->ruby__end__seen = 1;
16386 p->eofp = 1;
16387#ifndef RIPPER
16388 return -1;
16389#else
16390 lex_goto_eol(p);
16392 return 0;
16393#endif
16394 }
16395 newtok(p);
16396 break;
16397
16398 default:
16399 if (!parser_is_identchar(p)) {
16400 compile_error(p, "Invalid char `\\x%02X' in expression", c);
16401 token_flush(p);
16402 goto retry;
16403 }
16404
16405 newtok(p);
16406 break;
16407 }
16408
16409 return parse_ident(p, c, cmd_state);
16410}
16411
16412static enum yytokentype
16413yylex(YYSTYPE *lval, YYLTYPE *yylloc, struct parser_params *p)
16414{
16415 enum yytokentype t;
16416
16417 p->lval = lval;
16418 lval->val = Qundef;
16419 t = parser_yylex(p);
16420
16421 if (p->lex.strterm && (p->lex.strterm->flags & STRTERM_HEREDOC))
16423 else
16424 RUBY_SET_YYLLOC(*yylloc);
16425
16426 if (has_delayed_token(p))
16428 else if (t != 0)
16429 dispatch_scan_event(p, t);
16430
16431 return t;
16432}
16433
16434#define LVAR_USED ((ID)1 << (sizeof(ID) * CHAR_BIT - 1))
16435
16436static NODE*
16437node_newnode(struct parser_params *p, enum node_type type, VALUE a0, VALUE a1, VALUE a2, const rb_code_location_t *loc)
16438{
16439 NODE *n = rb_ast_newnode(p->ast, type);
16440
16441 rb_node_init(n, type, a0, a1, a2);
16442
16443 nd_set_loc(n, loc);
16444 nd_set_node_id(n, parser_get_node_id(p));
16445 return n;
16446}
16447
16448static NODE *
16449nd_set_loc(NODE *nd, const YYLTYPE *loc)
16450{
16451 nd->nd_loc = *loc;
16452 nd_set_line(nd, loc->beg_pos.lineno);
16453 return nd;
16454}
16455
16456#ifndef RIPPER
16457static enum node_type
16458nodetype(NODE *node) /* for debug */
16459{
16460 return (enum node_type)nd_type(node);
16461}
16462
16463static int
16464nodeline(NODE *node)
16465{
16466 return nd_line(node);
16467}
16468
16469static NODE*
16470newline_node(NODE *node)
16471{
16472 if (node) {
16473 node = remove_begin(node);
16474 node->flags |= NODE_FL_NEWLINE;
16475 }
16476 return node;
16477}
16478
16479static void
16480fixpos(NODE *node, NODE *orig)
16481{
16482 if (!node) return;
16483 if (!orig) return;
16484 nd_set_line(node, nd_line(orig));
16485}
16486
16487static void
16488parser_warning(struct parser_params *p, NODE *node, const char *mesg)
16489{
16490 rb_compile_warning(p->ruby_sourcefile, nd_line(node), "%s", mesg);
16491}
16492
16493static void
16494parser_warn(struct parser_params *p, NODE *node, const char *mesg)
16495{
16496 rb_compile_warn(p->ruby_sourcefile, nd_line(node), "%s", mesg);
16497}
16498
16499static NODE*
16500block_append(struct parser_params *p, NODE *head, NODE *tail)
16501{
16502 NODE *end, *h = head, *nd;
16503
16504 if (tail == 0) return head;
16505
16506 if (h == 0) return tail;
16507 switch (nd_type(h)) {
16508 case NODE_LIT:
16509 case NODE_STR:
16510 case NODE_SELF:
16511 case NODE_TRUE:
16512 case NODE_FALSE:
16513 case NODE_NIL:
16514 parser_warning(p, h, "unused literal ignored");
16515 return tail;
16516 default:
16517 h = end = NEW_BLOCK(head, &head->nd_loc);
16518 end->nd_end = end;
16519 head = end;
16520 break;
16521 case NODE_BLOCK:
16522 end = h->nd_end;
16523 break;
16524 }
16525
16526 nd = end->nd_head;
16527 switch (nd_type(nd)) {
16528 case NODE_RETURN:
16529 case NODE_BREAK:
16530 case NODE_NEXT:
16531 case NODE_REDO:
16532 case NODE_RETRY:
16533 if (RTEST(ruby_verbose)) {
16534 parser_warning(p, tail, "statement not reached");
16535 }
16536 break;
16537
16538 default:
16539 break;
16540 }
16541
16542 if (nd_type(tail) != NODE_BLOCK) {
16543 tail = NEW_BLOCK(tail, &tail->nd_loc);
16544 tail->nd_end = tail;
16545 }
16546 end->nd_next = tail;
16547 h->nd_end = tail->nd_end;
16548 nd_set_last_loc(head, nd_last_loc(tail));
16549 return head;
16550}
16551
16552/* append item to the list */
16553static NODE*
16554list_append(struct parser_params *p, NODE *list, NODE *item)
16555{
16556 NODE *last;
16557
16558 if (list == 0) return NEW_LIST(item, &item->nd_loc);
16559 if (list->nd_next) {
16560 last = list->nd_next->nd_end;
16561 }
16562 else {
16563 last = list;
16564 }
16565
16566 list->nd_alen += 1;
16567 last->nd_next = NEW_LIST(item, &item->nd_loc);
16568 list->nd_next->nd_end = last->nd_next;
16569
16571
16572 return list;
16573}
16574
16575/* concat two lists */
16576static NODE*
16577list_concat(NODE *head, NODE *tail)
16578{
16579 NODE *last;
16580
16581 if (head->nd_next) {
16582 last = head->nd_next->nd_end;
16583 }
16584 else {
16585 last = head;
16586 }
16587
16588 head->nd_alen += tail->nd_alen;
16589 last->nd_next = tail;
16590 if (tail->nd_next) {
16591 head->nd_next->nd_end = tail->nd_next->nd_end;
16592 }
16593 else {
16594 head->nd_next->nd_end = tail;
16595 }
16596
16597 nd_set_last_loc(head, nd_last_loc(tail));
16598
16599 return head;
16600}
16601
16602static int
16603literal_concat0(struct parser_params *p, VALUE head, VALUE tail)
16604{
16605 if (NIL_P(tail)) return 1;
16606 if (!rb_enc_compatible(head, tail)) {
16607 compile_error(p, "string literal encodings differ (%s / %s)",
16608 rb_enc_name(rb_enc_get(head)),
16609 rb_enc_name(rb_enc_get(tail)));
16610 rb_str_resize(head, 0);
16611 rb_str_resize(tail, 0);
16612 return 0;
16613 }
16614 rb_str_buf_append(head, tail);
16615 return 1;
16616}
16617
16618/* concat two string literals */
16619static NODE *
16620literal_concat(struct parser_params *p, NODE *head, NODE *tail, const YYLTYPE *loc)
16621{
16622 enum node_type htype;
16623 NODE *headlast;
16624 VALUE lit;
16625
16626 if (!head) return tail;
16627 if (!tail) return head;
16628
16629 htype = nd_type(head);
16630 if (htype == NODE_EVSTR) {
16631 NODE *node = NEW_DSTR(STR_NEW0(), loc);
16632 RB_OBJ_WRITTEN(p->ast, Qnil, node->nd_lit);
16633 head = list_append(p, node, head);
16634 htype = NODE_DSTR;
16635 }
16636 if (p->heredoc_indent > 0) {
16637 switch (htype) {
16638 case NODE_STR:
16639 nd_set_type(head, NODE_DSTR);
16640 case NODE_DSTR:
16641 return list_append(p, head, tail);
16642 default:
16643 break;
16644 }
16645 }
16646 switch (nd_type(tail)) {
16647 case NODE_STR:
16648 if (htype == NODE_DSTR && (headlast = head->nd_next->nd_end->nd_head) &&
16649 nd_type(headlast) == NODE_STR) {
16650 htype = NODE_STR;
16651 lit = headlast->nd_lit;
16652 }
16653 else {
16654 lit = head->nd_lit;
16655 }
16656 if (htype == NODE_STR) {
16657 if (!literal_concat0(p, lit, tail->nd_lit)) {
16658 error:
16659 rb_discard_node(p, head);
16660 rb_discard_node(p, tail);
16661 return 0;
16662 }
16663 rb_discard_node(p, tail);
16664 }
16665 else {
16666 list_append(p, head, tail);
16667 }
16668 break;
16669
16670 case NODE_DSTR:
16671 if (htype == NODE_STR) {
16672 if (!literal_concat0(p, head->nd_lit, tail->nd_lit))
16673 goto error;
16674 tail->nd_lit = head->nd_lit;
16675 rb_discard_node(p, head);
16676 head = tail;
16677 }
16678 else if (NIL_P(tail->nd_lit)) {
16679 append:
16680 head->nd_alen += tail->nd_alen - 1;
16681 head->nd_next->nd_end->nd_next = tail->nd_next;
16682 head->nd_next->nd_end = tail->nd_next->nd_end;
16683 rb_discard_node(p, tail);
16684 }
16685 else if (htype == NODE_DSTR && (headlast = head->nd_next->nd_end->nd_head) &&
16686 nd_type(headlast) == NODE_STR) {
16687 lit = headlast->nd_lit;
16688 if (!literal_concat0(p, lit, tail->nd_lit))
16689 goto error;
16690 tail->nd_lit = Qnil;
16691 goto append;
16692 }
16693 else {
16694 list_concat(head, NEW_NODE(NODE_LIST, NEW_STR(tail->nd_lit, loc), tail->nd_alen, tail->nd_next, loc));
16695 }
16696 break;
16697
16698 case NODE_EVSTR:
16699 if (htype == NODE_STR) {
16700 nd_set_type(head, NODE_DSTR);
16701 head->nd_alen = 1;
16702 }
16703 list_append(p, head, tail);
16704 break;
16705 }
16706 return head;
16707}
16708
16709static NODE *
16710evstr2dstr(struct parser_params *p, NODE *node)
16711{
16712 if (nd_type(node) == NODE_EVSTR) {
16713 NODE * dstr = NEW_DSTR(STR_NEW0(), &node->nd_loc);
16714 RB_OBJ_WRITTEN(p->ast, Qnil, dstr->nd_lit);
16715 node = list_append(p, dstr, node);
16716 }
16717 return node;
16718}
16719
16720static NODE *
16721new_evstr(struct parser_params *p, NODE *node, const YYLTYPE *loc)
16722{
16723 NODE *head = node;
16724
16725 if (node) {
16726 switch (nd_type(node)) {
16727 case NODE_STR: case NODE_DSTR: case NODE_EVSTR:
16728 return node;
16729 }
16730 }
16731 return NEW_EVSTR(head, loc);
16732}
16733
16734static NODE *
16735call_bin_op(struct parser_params *p, NODE *recv, ID id, NODE *arg1,
16736 const YYLTYPE *op_loc, const YYLTYPE *loc)
16737{
16738 NODE *expr;
16739 value_expr(recv);
16740 value_expr(arg1);
16741 expr = NEW_OPCALL(recv, id, NEW_LIST(arg1, &arg1->nd_loc), loc);
16742 nd_set_line(expr, op_loc->beg_pos.lineno);
16743 return expr;
16744}
16745
16746static NODE *
16747call_uni_op(struct parser_params *p, NODE *recv, ID id, const YYLTYPE *op_loc, const YYLTYPE *loc)
16748{
16749 NODE *opcall;
16750 value_expr(recv);
16751 opcall = NEW_OPCALL(recv, id, 0, loc);
16752 nd_set_line(opcall, op_loc->beg_pos.lineno);
16753 return opcall;
16754}
16755
16756static NODE *
16757new_qcall(struct parser_params* p, ID atype, NODE *recv, ID mid, NODE *args, const YYLTYPE *op_loc, const YYLTYPE *loc)
16758{
16759 NODE *qcall = NEW_QCALL(atype, recv, mid, args, loc);
16760 nd_set_line(qcall, op_loc->beg_pos.lineno);
16761 return qcall;
16762}
16763
16764static NODE*
16765new_command_qcall(struct parser_params* p, ID atype, NODE *recv, ID mid, NODE *args, NODE *block, const YYLTYPE *op_loc, const YYLTYPE *loc)
16766{
16767 NODE *ret;
16768 if (block) block_dup_check(p, args, block);
16769 ret = new_qcall(p, atype, recv, mid, args, op_loc, loc);
16770 if (block) ret = method_add_block(p, ret, block, loc);
16771 fixpos(ret, recv);
16772 return ret;
16773}
16774
16775#define nd_once_body(node) (nd_type(node) == NODE_ONCE ? (node)->nd_body : node)
16776static NODE*
16777match_op(struct parser_params *p, NODE *node1, NODE *node2, const YYLTYPE *op_loc, const YYLTYPE *loc)
16778{
16779 NODE *n;
16780 int line = op_loc->beg_pos.lineno;
16781
16782 value_expr(node1);
16783 value_expr(node2);
16784 if (node1 && (n = nd_once_body(node1)) != 0) {
16785 switch (nd_type(n)) {
16786 case NODE_DREGX:
16787 {
16788 NODE *match = NEW_MATCH2(node1, node2, loc);
16789 nd_set_line(match, line);
16790 return match;
16791 }
16792
16793 case NODE_LIT:
16794 if (RB_TYPE_P(n->nd_lit, T_REGEXP)) {
16795 const VALUE lit = n->nd_lit;
16796 NODE *match = NEW_MATCH2(node1, node2, loc);
16797 match->nd_args = reg_named_capture_assign(p, lit, loc);
16798 nd_set_line(match, line);
16799 return match;
16800 }
16801 }
16802 }
16803
16804 if (node2 && (n = nd_once_body(node2)) != 0) {
16805 NODE *match3;
16806
16807 switch (nd_type(n)) {
16808 case NODE_LIT:
16809 if (!RB_TYPE_P(n->nd_lit, T_REGEXP)) break;
16810 /* fallthru */
16811 case NODE_DREGX:
16812 match3 = NEW_MATCH3(node2, node1, loc);
16813 return match3;
16814 }
16815 }
16816
16817 n = NEW_CALL(node1, tMATCH, NEW_LIST(node2, &node2->nd_loc), loc);
16818 nd_set_line(n, line);
16819 return n;
16820}
16821
16822# if WARN_PAST_SCOPE
16823static int
16824past_dvar_p(struct parser_params *p, ID id)
16825{
16826 struct vtable *past = p->lvtbl->past;
16827 while (past) {
16828 if (vtable_included(past, id)) return 1;
16829 past = past->prev;
16830 }
16831 return 0;
16832}
16833# endif
16834
16835/* As Ripper#warn does not have arguments for the location, so the
16836 * following messages cannot be separated */
16837#define WARN_LOCATION(type) do { \
16838 if (p->warn_location) { \
16839 int line; \
16840 VALUE file = rb_source_location(&line); \
16841 rb_warn3(type" in eval may not return location in binding;" \
16842 " use Binding#source_location instead\n" \
16843 "%"PRIsWARN":%d: warning: in `%"PRIsWARN"'", \
16844 file, WARN_I(line), rb_id2str(rb_frame_this_func())); \
16845 } \
16846} while (0)
16847
16848static int
16849numparam_nested_p(struct parser_params *p)
16850{
16851 struct local_vars *local = p->lvtbl;
16852 NODE *outer = local->numparam.outer;
16853 NODE *inner = local->numparam.inner;
16854 if (outer || inner) {
16855 NODE *used = outer ? outer : inner;
16856 compile_error(p, "numbered parameter is already used in\n"
16857 "%s:%d: %s block here",
16859 outer ? "outer" : "inner");
16860 parser_show_error_line(p, &used->nd_loc);
16861 return 1;
16862 }
16863 return 0;
16864}
16865
16866static NODE*
16867gettable(struct parser_params *p, ID id, const YYLTYPE *loc)
16868{
16869 ID *vidp = NULL;
16870 NODE *node;
16871 switch (id) {
16872 case keyword_self:
16873 return NEW_SELF(loc);
16874 case keyword_nil:
16875 return NEW_NIL(loc);
16876 case keyword_true:
16877 return NEW_TRUE(loc);
16878 case keyword_false:
16879 return NEW_FALSE(loc);
16880 case keyword__FILE__:
16881 WARN_LOCATION("__FILE__");
16882 {
16883 VALUE file = p->ruby_sourcefile_string;
16884 if (NIL_P(file))
16885 file = rb_str_new(0, 0);
16886 else
16887 file = rb_str_dup(file);
16888 node = NEW_STR(file, loc);
16889 RB_OBJ_WRITTEN(p->ast, Qnil, file);
16890 }
16891 return node;
16892 case keyword__LINE__:
16893 WARN_LOCATION("__LINE__");
16894 return NEW_LIT(INT2FIX(p->tokline), loc);
16896 node = NEW_LIT(rb_enc_from_encoding(p->enc), loc);
16897 RB_OBJ_WRITTEN(p->ast, Qnil, node->nd_lit);
16898 return node;
16899
16900 }
16901 switch (id_type(id)) {
16902 case ID_LOCAL:
16903 if (dyna_in_block(p) && dvar_defined_ref(p, id, &vidp)) {
16904 if (NUMPARAM_ID_P(id) && numparam_nested_p(p)) return 0;
16905 if (id == p->cur_arg) {
16906 compile_error(p, "circular argument reference - %"PRIsWARN, rb_id2str(id));
16907 return 0;
16908 }
16909 if (vidp) *vidp |= LVAR_USED;
16910 node = NEW_DVAR(id, loc);
16911 return node;
16912 }
16913 if (local_id_ref(p, id, &vidp)) {
16914 if (id == p->cur_arg) {
16915 compile_error(p, "circular argument reference - %"PRIsWARN, rb_id2str(id));
16916 return 0;
16917 }
16918 if (vidp) *vidp |= LVAR_USED;
16919 node = NEW_LVAR(id, loc);
16920 return node;
16921 }
16922 if (dyna_in_block(p) && NUMPARAM_ID_P(id) &&
16923 parser_numbered_param(p, NUMPARAM_ID_TO_IDX(id))) {
16924 if (numparam_nested_p(p)) return 0;
16925 node = NEW_DVAR(id, loc);
16926 struct local_vars *local = p->lvtbl;
16927 if (!local->numparam.current) local->numparam.current = node;
16928 return node;
16929 }
16930# if WARN_PAST_SCOPE
16931 if (!p->in_defined && RTEST(ruby_verbose) && past_dvar_p(p, id)) {
16932 rb_warning1("possible reference to past scope - %"PRIsWARN, rb_id2str(id));
16933 }
16934# endif
16935 /* method call without arguments */
16936 return NEW_VCALL(id, loc);
16937 case ID_GLOBAL:
16938 return NEW_GVAR(id, loc);
16939 case ID_INSTANCE:
16940 return NEW_IVAR(id, loc);
16941 case ID_CONST:
16942 return NEW_CONST(id, loc);
16943 case ID_CLASS:
16944 return NEW_CVAR(id, loc);
16945 }
16946 compile_error(p, "identifier %"PRIsVALUE" is not valid to get", rb_id2str(id));
16947 return 0;
16948}
16949
16950static NODE *
16951opt_arg_append(NODE *opt_list, NODE *opt)
16952{
16953 NODE *opts = opt_list;
16954 opts->nd_loc.end_pos = opt->nd_loc.end_pos;
16955
16956 while (opts->nd_next) {
16957 opts = opts->nd_next;
16958 opts->nd_loc.end_pos = opt->nd_loc.end_pos;
16959 }
16960 opts->nd_next = opt;
16961
16962 return opt_list;
16963}
16964
16965static NODE *
16966kwd_append(NODE *kwlist, NODE *kw)
16967{
16968 if (kwlist) {
16969 NODE *kws = kwlist;
16970 kws->nd_loc.end_pos = kw->nd_loc.end_pos;
16971 while (kws->nd_next) {
16972 kws = kws->nd_next;
16973 kws->nd_loc.end_pos = kw->nd_loc.end_pos;
16974 }
16975 kws->nd_next = kw;
16976 }
16977 return kwlist;
16978}
16979
16980static NODE *
16981new_defined(struct parser_params *p, NODE *expr, const YYLTYPE *loc)
16982{
16983 return NEW_DEFINED(remove_begin_all(expr), loc);
16984}
16985
16986static NODE*
16987symbol_append(struct parser_params *p, NODE *symbols, NODE *symbol)
16988{
16989 if (nd_type(symbol) == NODE_DSTR) {
16990 nd_set_type(symbol, NODE_DSYM);
16991 }
16992 else {
16993 nd_set_type(symbol, NODE_LIT);
16994 RB_OBJ_WRITTEN(p->ast, Qnil, symbol->nd_lit = rb_str_intern(symbol->nd_lit));
16995 }
16996 return list_append(p, symbols, symbol);
16997}
16998
16999static NODE *
17000new_regexp(struct parser_params *p, NODE *node, int options, const YYLTYPE *loc)
17001{
17002 NODE *list, *prev;
17003 VALUE lit;
17004
17005 if (!node) {
17006 node = NEW_LIT(reg_compile(p, STR_NEW0(), options), loc);
17007 RB_OBJ_WRITTEN(p->ast, Qnil, node->nd_lit);
17008 return node;
17009 }
17010 switch (nd_type(node)) {
17011 case NODE_STR:
17012 {
17013 VALUE src = node->nd_lit;
17014 nd_set_type(node, NODE_LIT);
17015 nd_set_loc(node, loc);
17016 RB_OBJ_WRITTEN(p->ast, Qnil, node->nd_lit = reg_compile(p, src, options));
17017 }
17018 break;
17019 default:
17020 lit = STR_NEW0();
17021 node = NEW_NODE(NODE_DSTR, lit, 1, NEW_LIST(node, loc), loc);
17022 RB_OBJ_WRITTEN(p->ast, Qnil, lit);
17023 /* fall through */
17024 case NODE_DSTR:
17025 nd_set_type(node, NODE_DREGX);
17026 nd_set_loc(node, loc);
17027 node->nd_cflag = options & RE_OPTION_MASK;
17028 if (!NIL_P(node->nd_lit)) reg_fragment_check(p, node->nd_lit, options);
17029 for (list = (prev = node)->nd_next; list; list = list->nd_next) {
17030 if (nd_type(list->nd_head) == NODE_STR) {
17031 VALUE tail = list->nd_head->nd_lit;
17032 if (reg_fragment_check(p, tail, options) && prev && !NIL_P(prev->nd_lit)) {
17033 VALUE lit = prev == node ? prev->nd_lit : prev->nd_head->nd_lit;
17034 if (!literal_concat0(p, lit, tail)) {
17035 return NEW_NIL(loc); /* dummy node on error */
17036 }
17037 rb_str_resize(tail, 0);
17038 prev->nd_next = list->nd_next;
17039 rb_discard_node(p, list->nd_head);
17040 rb_discard_node(p, list);
17041 list = prev;
17042 }
17043 else {
17044 prev = list;
17045 }
17046 }
17047 else {
17048 prev = 0;
17049 }
17050 }
17051 if (!node->nd_next) {
17052 VALUE src = node->nd_lit;
17053 nd_set_type(node, NODE_LIT);
17054 RB_OBJ_WRITTEN(p->ast, Qnil, node->nd_lit = reg_compile(p, src, options));
17055 }
17056 if (options & RE_OPTION_ONCE) {
17057 node = NEW_NODE(NODE_ONCE, 0, node, 0, loc);
17058 }
17059 break;
17060 }
17061 return node;
17062}
17063
17064static NODE *
17065new_kw_arg(struct parser_params *p, NODE *k, const YYLTYPE *loc)
17066{
17067 if (!k) return 0;
17068 return NEW_KW_ARG(0, (k), loc);
17069}
17070
17071static NODE *
17072new_xstring(struct parser_params *p, NODE *node, const YYLTYPE *loc)
17073{
17074 if (!node) {
17075 VALUE lit = STR_NEW0();
17076 NODE *xstr = NEW_XSTR(lit, loc);
17077 RB_OBJ_WRITTEN(p->ast, Qnil, lit);
17078 return xstr;
17079 }
17080 switch (nd_type(node)) {
17081 case NODE_STR:
17082 nd_set_type(node, NODE_XSTR);
17083 nd_set_loc(node, loc);
17084 break;
17085 case NODE_DSTR:
17086 nd_set_type(node, NODE_DXSTR);
17087 nd_set_loc(node, loc);
17088 break;
17089 default:
17090 node = NEW_NODE(NODE_DXSTR, Qnil, 1, NEW_LIST(node, loc), loc);
17091 break;
17092 }
17093 return node;
17094}
17095
17096static void
17097check_literal_when(struct parser_params *p, NODE *arg, const YYLTYPE *loc)
17098{
17099 VALUE lit;
17100
17101 if (!arg || !p->case_labels) return;
17102
17104 if (lit == Qundef) return;
17105 if (nd_type(arg) == NODE_STR) {
17106 RB_OBJ_WRITTEN(p->ast, Qnil, arg->nd_lit = lit);
17107 }
17108
17109 if (NIL_P(p->case_labels)) {
17111 }
17112 else {
17113 VALUE line = rb_hash_lookup(p->case_labels, lit);
17114 if (!NIL_P(line)) {
17115 rb_warning1("duplicated `when' clause with line %d is ignored",
17116 WARN_IVAL(line));
17117 return;
17118 }
17119 }
17121}
17122
17123#else /* !RIPPER */
17124static int
17125id_is_var(struct parser_params *p, ID id)
17126{
17127 if (is_notop_id(id)) {
17128 switch (id & ID_SCOPE_MASK) {
17129 case ID_GLOBAL: case ID_INSTANCE: case ID_CONST: case ID_CLASS:
17130 return 1;
17131 case ID_LOCAL:
17132 if (dyna_in_block(p)) {
17133 if (NUMPARAM_ID_P(id) || dvar_defined(p, id)) return 1;
17134 }
17135 if (local_id(p, id)) return 1;
17136 /* method call without arguments */
17137 return 0;
17138 }
17139 }
17140 compile_error(p, "identifier %"PRIsVALUE" is not valid to get", rb_id2str(id));
17141 return 0;
17142}
17143
17144static VALUE
17145new_regexp(struct parser_params *p, VALUE re, VALUE opt, const YYLTYPE *loc)
17146{
17147 VALUE src = 0, err;
17148 int options = 0;
17149 if (ripper_is_node_yylval(re)) {
17150 src = RNODE(re)->nd_cval;
17151 re = RNODE(re)->nd_rval;
17152 }
17153 if (ripper_is_node_yylval(opt)) {
17154 options = (int)RNODE(opt)->nd_tag;
17155 opt = RNODE(opt)->nd_rval;
17156 }
17157 if (src && NIL_P(parser_reg_compile(p, src, options, &err))) {
17158 compile_error(p, "%"PRIsVALUE, err);
17159 }
17160 return dispatch2(regexp_literal, re, opt);
17161}
17162#endif /* !RIPPER */
17163
17164
17165#ifndef RIPPER
17166static const char rb_parser_lex_state_names[][8] = {
17167 "BEG", "END", "ENDARG", "ENDFN", "ARG",
17168 "CMDARG", "MID", "FNAME", "DOT", "CLASS",
17169 "LABEL", "LABELED","FITEM",
17170};
17171
17172static VALUE
17173append_lex_state_name(enum lex_state_e state, VALUE buf)
17174{
17175 int i, sep = 0;
17176 unsigned int mask = 1;
17177 static const char none[] = "NONE";
17178
17179 for (i = 0; i < EXPR_MAX_STATE; ++i, mask <<= 1) {
17180 if ((unsigned)state & mask) {
17181 if (sep) {
17182 rb_str_cat(buf, "|", 1);
17183 }
17184 sep = 1;
17185 rb_str_cat_cstr(buf, rb_parser_lex_state_names[i]);
17186 }
17187 }
17188 if (!sep) {
17189 rb_str_cat(buf, none, sizeof(none)-1);
17190 }
17191 return buf;
17192}
17193
17194static void
17195flush_debug_buffer(struct parser_params *p, VALUE out, VALUE str)
17196{
17197 VALUE mesg = p->debug_buffer;
17198
17199 if (!NIL_P(mesg) && RSTRING_LEN(mesg)) {
17200 p->debug_buffer = Qnil;
17201 rb_io_puts(1, &mesg, out);
17202 }
17203 if (!NIL_P(str) && RSTRING_LEN(str)) {
17205 }
17206}
17207
17208enum lex_state_e
17210 enum lex_state_e to, int line)
17211{
17212 VALUE mesg;
17213 mesg = rb_str_new_cstr("lex_state: ");
17214 append_lex_state_name(from, mesg);
17215 rb_str_cat_cstr(mesg, " -> ");
17216 append_lex_state_name(to, mesg);
17217 rb_str_catf(mesg, " at line %d\n", line);
17218 flush_debug_buffer(p, p->debug_output, mesg);
17219 return to;
17220}
17221
17222VALUE
17224{
17225 return rb_fstring(append_lex_state_name(state, rb_str_new(0, 0)));
17226}
17227
17228static void
17229append_bitstack_value(stack_type stack, VALUE mesg)
17230{
17231 if (stack == 0) {
17232 rb_str_cat_cstr(mesg, "0");
17233 }
17234 else {
17235 stack_type mask = (stack_type)1U << (CHAR_BIT * sizeof(stack_type) - 1);
17236 for (; mask && !(stack & mask); mask >>= 1) continue;
17237 for (; mask; mask >>= 1) rb_str_cat(mesg, stack & mask ? "1" : "0", 1);
17238 }
17239}
17240
17241void
17243 const char *name, int line)
17244{
17245 VALUE mesg = rb_sprintf("%s: ", name);
17246 append_bitstack_value(stack, mesg);
17247 rb_str_catf(mesg, " at line %d\n", line);
17248 flush_debug_buffer(p, p->debug_output, mesg);
17249}
17250
17251void
17252rb_parser_fatal(struct parser_params *p, const char *fmt, ...)
17253{
17254 va_list ap;
17255 VALUE mesg = rb_str_new_cstr("internal parser error: ");
17256
17257 va_start(ap, fmt);
17258 rb_str_vcatf(mesg, fmt, ap);
17259 va_end(ap);
17260 parser_yyerror(p, NULL, RSTRING_PTR(mesg));
17261 RB_GC_GUARD(mesg);
17262
17263 mesg = rb_str_new(0, 0);
17264 append_lex_state_name(p->lex.state, mesg);
17265 compile_error(p, "lex.state: %"PRIsVALUE, mesg);
17266 rb_str_resize(mesg, 0);
17267 append_bitstack_value(p->cond_stack, mesg);
17268 compile_error(p, "cond_stack: %"PRIsVALUE, mesg);
17269 rb_str_resize(mesg, 0);
17270 append_bitstack_value(p->cmdarg_stack, mesg);
17271 compile_error(p, "cmdarg_stack: %"PRIsVALUE, mesg);
17272 if (p->debug_output == rb_stdout)
17274 p->debug = TRUE;
17275}
17276
17277YYLTYPE *
17279{
17280 int sourceline = here->sourceline;
17281 int beg_pos = (int)here->offset - here->quote
17282 - (rb_strlen_lit("<<-") - !(here->func & STR_FUNC_INDENT));
17283 int end_pos = (int)here->offset + here->length + here->quote;
17284
17285 yylloc->beg_pos.lineno = sourceline;
17286 yylloc->beg_pos.column = beg_pos;
17287 yylloc->end_pos.lineno = sourceline;
17288 yylloc->end_pos.column = end_pos;
17289 return yylloc;
17290}
17291
17292YYLTYPE *
17294{
17295 yylloc->beg_pos.lineno = p->ruby_sourceline;
17296 yylloc->beg_pos.column = (int)(p->lex.ptok - p->lex.pbeg);
17297 yylloc->end_pos.lineno = p->ruby_sourceline;
17298 yylloc->end_pos.column = (int)(p->lex.ptok - p->lex.pbeg);
17299 return yylloc;
17300}
17301
17302YYLTYPE *
17304{
17305 yylloc->beg_pos.lineno = p->ruby_sourceline;
17306 yylloc->beg_pos.column = (int)(p->lex.ptok - p->lex.pbeg);
17307 yylloc->end_pos.lineno = p->ruby_sourceline;
17308 yylloc->end_pos.column = (int)(p->lex.pcur - p->lex.pbeg);
17309 return yylloc;
17310}
17311#endif /* !RIPPER */
17312
17313static void
17314parser_token_value_print(struct parser_params *p, enum yytokentype type, const YYSTYPE *valp)
17315{
17316 VALUE v;
17317
17318 switch (type) {
17319 case tIDENTIFIER: case tFID: case tGVAR: case tIVAR:
17320 case tCONSTANT: case tCVAR: case tLABEL: case tOP_ASGN:
17321#ifndef RIPPER
17322 v = rb_id2str(valp->id);
17323#else
17324 v = valp->node->nd_rval;
17325#endif
17327 break;
17328 case tINTEGER: case tFLOAT: case tRATIONAL: case tIMAGINARY:
17329 case tSTRING_CONTENT: case tCHAR:
17330#ifndef RIPPER
17331 v = valp->node->nd_lit;
17332#else
17333 v = valp->val;
17334#endif
17335 rb_parser_printf(p, "%+"PRIsVALUE, v);
17336 break;
17337 case tNTH_REF:
17338#ifndef RIPPER
17339 rb_parser_printf(p, "$%ld", valp->node->nd_nth);
17340#else
17341 rb_parser_printf(p, "%"PRIsVALUE, valp->val);
17342#endif
17343 break;
17344 case tBACK_REF:
17345#ifndef RIPPER
17346 rb_parser_printf(p, "$%c", (int)valp->node->nd_nth);
17347#else
17348 rb_parser_printf(p, "%"PRIsVALUE, valp->val);
17349#endif
17350 break;
17351 default:
17352 break;
17353 }
17354}
17355
17356static int
17357assignable0(struct parser_params *p, ID id, const char **err)
17358{
17359 if (!id) return -1;
17360 switch (id) {
17361 case keyword_self:
17362 *err = "Can't change the value of self";
17363 return -1;
17364 case keyword_nil:
17365 *err = "Can't assign to nil";
17366 return -1;
17367 case keyword_true:
17368 *err = "Can't assign to true";
17369 return -1;
17370 case keyword_false:
17371 *err = "Can't assign to false";
17372 return -1;
17373 case keyword__FILE__:
17374 *err = "Can't assign to __FILE__";
17375 return -1;
17376 case keyword__LINE__:
17377 *err = "Can't assign to __LINE__";
17378 return -1;
17380 *err = "Can't assign to __ENCODING__";
17381 return -1;
17382 }
17383 switch (id_type(id)) {
17384 case ID_LOCAL:
17385 if (dyna_in_block(p)) {
17386 if (p->max_numparam > NO_PARAM && NUMPARAM_ID_P(id)) {
17387 compile_error(p, "Can't assign to numbered parameter _%d",
17388 NUMPARAM_ID_TO_IDX(id));
17389 return -1;
17390 }
17391 if (dvar_curr(p, id)) return NODE_DASGN_CURR;
17392 if (dvar_defined(p, id)) return NODE_DASGN;
17393 if (local_id(p, id)) return NODE_LASGN;
17394 dyna_var(p, id);
17395 return NODE_DASGN_CURR;
17396 }
17397 else {
17398 if (!local_id(p, id)) local_var(p, id);
17399 return NODE_LASGN;
17400 }
17401 break;
17402 case ID_GLOBAL: return NODE_GASGN;
17403 case ID_INSTANCE: return NODE_IASGN;
17404 case ID_CONST:
17405 if (!p->in_def) return NODE_CDECL;
17406 *err = "dynamic constant assignment";
17407 return -1;
17408 case ID_CLASS: return NODE_CVASGN;
17409 default:
17410 compile_error(p, "identifier %"PRIsVALUE" is not valid to set", rb_id2str(id));
17411 }
17412 return -1;
17413}
17414
17415#ifndef RIPPER
17416static NODE*
17417assignable(struct parser_params *p, ID id, NODE *val, const YYLTYPE *loc)
17418{
17419 const char *err = 0;
17420 int node_type = assignable0(p, id, &err);
17421 switch (node_type) {
17422 case NODE_DASGN_CURR: return NEW_DASGN_CURR(id, val, loc);
17423 case NODE_DASGN: return NEW_DASGN(id, val, loc);
17424 case NODE_LASGN: return NEW_LASGN(id, val, loc);
17425 case NODE_GASGN: return NEW_GASGN(id, val, loc);
17426 case NODE_IASGN: return NEW_IASGN(id, val, loc);
17427 case NODE_CDECL: return NEW_CDECL(id, val, 0, loc);
17428 case NODE_CVASGN: return NEW_CVASGN(id, val, loc);
17429 }
17430 if (err) yyerror1(loc, err);
17431 return NEW_BEGIN(0, loc);
17432}
17433#else
17434static VALUE
17435assignable(struct parser_params *p, VALUE lhs)
17436{
17437 const char *err = 0;
17438 assignable0(p, get_id(lhs), &err);
17439 if (err) lhs = assign_error(p, lhs);
17440 return lhs;
17441}
17442#endif
17443
17444static int
17445is_private_local_id(ID name)
17446{
17447 VALUE s;
17448 if (name == idUScore) return 1;
17449 if (!is_local_id(name)) return 0;
17450 s = rb_id2str(name);
17451 if (!s) return 0;
17452 return RSTRING_PTR(s)[0] == '_';
17453}
17454
17455static int
17456shadowing_lvar_0(struct parser_params *p, ID name)
17457{
17458 if (is_private_local_id(name)) return 1;
17459 if (dyna_in_block(p)) {
17460 if (dvar_curr(p, name)) {
17461 yyerror0("duplicated argument name");
17462 }
17463 else if (dvar_defined(p, name) || local_id(p, name)) {
17464 vtable_add(p->lvtbl->vars, name);
17465 if (p->lvtbl->used) {
17467 }
17468 return 0;
17469 }
17470 }
17471 else {
17472 if (local_id(p, name)) {
17473 yyerror0("duplicated argument name");
17474 }
17475 }
17476 return 1;
17477}
17478
17479static ID
17480shadowing_lvar(struct parser_params *p, ID name)
17481{
17482 shadowing_lvar_0(p, name);
17483 return name;
17484}
17485
17486static void
17487new_bv(struct parser_params *p, ID name)
17488{
17489 if (!name) return;
17490 if (!is_local_id(name)) {
17491 compile_error(p, "invalid local variable - %"PRIsVALUE,
17492 rb_id2str(name));
17493 return;
17494 }
17495 if (!shadowing_lvar_0(p, name)) return;
17496 dyna_var(p, name);
17497}
17498
17499#ifndef RIPPER
17500static NODE *
17501aryset(struct parser_params *p, NODE *recv, NODE *idx, const YYLTYPE *loc)
17502{
17503 return NEW_ATTRASGN(recv, tASET, idx, loc);
17504}
17505
17506static void
17507block_dup_check(struct parser_params *p, NODE *node1, NODE *node2)
17508{
17509 if (node2 && node1 && nd_type(node1) == NODE_BLOCK_PASS) {
17510 compile_error(p, "both block arg and actual block given");
17511 }
17512}
17513
17514static NODE *
17515attrset(struct parser_params *p, NODE *recv, ID atype, ID id, const YYLTYPE *loc)
17516{
17517 if (!CALL_Q_P(atype)) id = rb_id_attrset(id);
17518 return NEW_ATTRASGN(recv, id, 0, loc);
17519}
17520
17521static void
17522rb_backref_error(struct parser_params *p, NODE *node)
17523{
17524 switch (nd_type(node)) {
17525 case NODE_NTH_REF:
17526 compile_error(p, "Can't set variable $%ld", node->nd_nth);
17527 break;
17528 case NODE_BACK_REF:
17529 compile_error(p, "Can't set variable $%c", (int)node->nd_nth);
17530 break;
17531 }
17532}
17533
17534static NODE *
17535arg_append(struct parser_params *p, NODE *node1, NODE *node2, const YYLTYPE *loc)
17536{
17537 if (!node1) return NEW_LIST(node2, &node2->nd_loc);
17538 switch (nd_type(node1)) {
17539 case NODE_LIST:
17540 return list_append(p, node1, node2);
17541 case NODE_BLOCK_PASS:
17542 node1->nd_head = arg_append(p, node1->nd_head, node2, loc);
17543 node1->nd_loc.end_pos = node1->nd_head->nd_loc.end_pos;
17544 return node1;
17545 case NODE_ARGSPUSH:
17546 node1->nd_body = list_append(p, NEW_LIST(node1->nd_body, &node1->nd_body->nd_loc), node2);
17547 node1->nd_loc.end_pos = node1->nd_body->nd_loc.end_pos;
17548 nd_set_type(node1, NODE_ARGSCAT);
17549 return node1;
17550 case NODE_ARGSCAT:
17551 if (nd_type(node1->nd_body) != NODE_LIST) break;
17552 node1->nd_body = list_append(p, node1->nd_body, node2);
17553 node1->nd_loc.end_pos = node1->nd_body->nd_loc.end_pos;
17554 return node1;
17555 }
17556 return NEW_ARGSPUSH(node1, node2, loc);
17557}
17558
17559static NODE *
17560arg_concat(struct parser_params *p, NODE *node1, NODE *node2, const YYLTYPE *loc)
17561{
17562 if (!node2) return node1;
17563 switch (nd_type(node1)) {
17564 case NODE_BLOCK_PASS:
17565 if (node1->nd_head)
17566 node1->nd_head = arg_concat(p, node1->nd_head, node2, loc);
17567 else
17568 node1->nd_head = NEW_LIST(node2, loc);
17569 return node1;
17570 case NODE_ARGSPUSH:
17571 if (nd_type(node2) != NODE_LIST) break;
17572 node1->nd_body = list_concat(NEW_LIST(node1->nd_body, loc), node2);
17573 nd_set_type(node1, NODE_ARGSCAT);
17574 return node1;
17575 case NODE_ARGSCAT:
17576 if (nd_type(node2) != NODE_LIST ||
17577 nd_type(node1->nd_body) != NODE_LIST) break;
17578 node1->nd_body = list_concat(node1->nd_body, node2);
17579 return node1;
17580 }
17581 return NEW_ARGSCAT(node1, node2, loc);
17582}
17583
17584static NODE *
17585last_arg_append(struct parser_params *p, NODE *args, NODE *last_arg, const YYLTYPE *loc)
17586{
17587 NODE *n1;
17588 if ((n1 = splat_array(args)) != 0) {
17589 return list_append(p, n1, last_arg);
17590 }
17591 return arg_append(p, args, last_arg, loc);
17592}
17593
17594static NODE *
17595rest_arg_append(struct parser_params *p, NODE *args, NODE *rest_arg, const YYLTYPE *loc)
17596{
17597 NODE *n1;
17598 if ((nd_type(rest_arg) == NODE_LIST) && (n1 = splat_array(args)) != 0) {
17599 return list_concat(n1, rest_arg);
17600 }
17601 return arg_concat(p, args, rest_arg, loc);
17602}
17603
17604static NODE *
17605splat_array(NODE* node)
17606{
17607 if (nd_type(node) == NODE_SPLAT) node = node->nd_head;
17608 if (nd_type(node) == NODE_LIST) return node;
17609 return 0;
17610}
17611
17612static void
17613mark_lvar_used(struct parser_params *p, NODE *rhs)
17614{
17615 ID *vidp = NULL;
17616 if (!rhs) return;
17617 switch (nd_type(rhs)) {
17618 case NODE_LASGN:
17619 if (local_id_ref(p, rhs->nd_vid, &vidp)) {
17620 if (vidp) *vidp |= LVAR_USED;
17621 }
17622 break;
17623 case NODE_DASGN:
17624 case NODE_DASGN_CURR:
17625 if (dvar_defined_ref(p, rhs->nd_vid, &vidp)) {
17626 if (vidp) *vidp |= LVAR_USED;
17627 }
17628 break;
17629#if 0
17630 case NODE_MASGN:
17631 for (rhs = rhs->nd_head; rhs; rhs = rhs->nd_next) {
17632 mark_lvar_used(p, rhs->nd_head);
17633 }
17634 break;
17635#endif
17636 }
17637}
17638
17639static NODE *
17640node_assign(struct parser_params *p, NODE *lhs, NODE *rhs, const YYLTYPE *loc)
17641{
17642 if (!lhs) return 0;
17643
17644 switch (nd_type(lhs)) {
17645 case NODE_GASGN:
17646 case NODE_IASGN:
17647 case NODE_LASGN:
17648 case NODE_DASGN:
17649 case NODE_DASGN_CURR:
17650 case NODE_MASGN:
17651 case NODE_CDECL:
17652 case NODE_CVASGN:
17653 lhs->nd_value = rhs;
17654 nd_set_loc(lhs, loc);
17655 break;
17656
17657 case NODE_ATTRASGN:
17658 lhs->nd_args = arg_append(p, lhs->nd_args, rhs, loc);
17659 nd_set_loc(lhs, loc);
17660 break;
17661
17662 default:
17663 /* should not happen */
17664 break;
17665 }
17666
17667 return lhs;
17668}
17669
17670static NODE *
17671value_expr_check(struct parser_params *p, NODE *node)
17672{
17673 NODE *void_node = 0, *vn;
17674
17675 if (!node) {
17676 rb_warning0("empty expression");
17677 }
17678 while (node) {
17679 switch (nd_type(node)) {
17680 case NODE_RETURN:
17681 case NODE_BREAK:
17682 case NODE_NEXT:
17683 case NODE_REDO:
17684 case NODE_RETRY:
17685 return void_node ? void_node : node;
17686
17687 case NODE_CASE3:
17688 if (!node->nd_body || nd_type(node->nd_body) != NODE_IN) {
17689 compile_error(p, "unexpected node");
17690 return NULL;
17691 }
17692 if (node->nd_body->nd_body) {
17693 return NULL;
17694 }
17695 /* single line pattern matching */
17696 return void_node ? void_node : node;
17697
17698 case NODE_BLOCK:
17699 while (node->nd_next) {
17700 node = node->nd_next;
17701 }
17702 node = node->nd_head;
17703 break;
17704
17705 case NODE_BEGIN:
17706 node = node->nd_body;
17707 break;
17708
17709 case NODE_IF:
17710 case NODE_UNLESS:
17711 if (!node->nd_body) {
17712 return NULL;
17713 }
17714 else if (!node->nd_else) {
17715 return NULL;
17716 }
17717 vn = value_expr_check(p, node->nd_body);
17718 if (!vn) return NULL;
17719 if (!void_node) void_node = vn;
17720 node = node->nd_else;
17721 break;
17722
17723 case NODE_AND:
17724 case NODE_OR:
17725 node = node->nd_1st;
17726 break;
17727
17728 case NODE_LASGN:
17729 case NODE_DASGN:
17730 case NODE_DASGN_CURR:
17731 case NODE_MASGN:
17732 mark_lvar_used(p, node);
17733 return NULL;
17734
17735 default:
17736 return NULL;
17737 }
17738 }
17739
17740 return NULL;
17741}
17742
17743static int
17744value_expr_gen(struct parser_params *p, NODE *node)
17745{
17746 NODE *void_node = value_expr_check(p, node);
17747 if (void_node) {
17748 yyerror1(&void_node->nd_loc, "void value expression");
17749 /* or "control never reach"? */
17750 return FALSE;
17751 }
17752 return TRUE;
17753}
17754static void
17755void_expr(struct parser_params *p, NODE *node)
17756{
17757 const char *useless = 0;
17758
17759 if (!RTEST(ruby_verbose)) return;
17760
17761 if (!node || !(node = nd_once_body(node))) return;
17762 switch (nd_type(node)) {
17763 case NODE_OPCALL:
17764 switch (node->nd_mid) {
17765 case '+':
17766 case '-':
17767 case '*':
17768 case '/':
17769 case '%':
17770 case tPOW:
17771 case tUPLUS:
17772 case tUMINUS:
17773 case '|':
17774 case '^':
17775 case '&':
17776 case tCMP:
17777 case '>':
17778 case tGEQ:
17779 case '<':
17780 case tLEQ:
17781 case tEQ:
17782 case tNEQ:
17783 useless = rb_id2name(node->nd_mid);
17784 break;
17785 }
17786 break;
17787
17788 case NODE_LVAR:
17789 case NODE_DVAR:
17790 case NODE_GVAR:
17791 case NODE_IVAR:
17792 case NODE_CVAR:
17793 case NODE_NTH_REF:
17794 case NODE_BACK_REF:
17795 useless = "a variable";
17796 break;
17797 case NODE_CONST:
17798 useless = "a constant";
17799 break;
17800 case NODE_LIT:
17801 case NODE_STR:
17802 case NODE_DSTR:
17803 case NODE_DREGX:
17804 useless = "a literal";
17805 break;
17806 case NODE_COLON2:
17807 case NODE_COLON3:
17808 useless = "::";
17809 break;
17810 case NODE_DOT2:
17811 useless = "..";
17812 break;
17813 case NODE_DOT3:
17814 useless = "...";
17815 break;
17816 case NODE_SELF:
17817 useless = "self";
17818 break;
17819 case NODE_NIL:
17820 useless = "nil";
17821 break;
17822 case NODE_TRUE:
17823 useless = "true";
17824 break;
17825 case NODE_FALSE:
17826 useless = "false";
17827 break;
17828 case NODE_DEFINED:
17829 useless = "defined?";
17830 break;
17831 }
17832
17833 if (useless) {
17834 rb_warn1L(nd_line(node), "possibly useless use of %s in void context", WARN_S(useless));
17835 }
17836}
17837
17838static NODE *
17839void_stmts(struct parser_params *p, NODE *node)
17840{
17841 NODE *const n = node;
17842 if (!RTEST(ruby_verbose)) return n;
17843 if (!node) return n;
17844 if (nd_type(node) != NODE_BLOCK) return n;
17845
17846 while (node->nd_next) {
17847 void_expr(p, node->nd_head);
17848 node = node->nd_next;
17849 }
17850 return n;
17851}
17852
17853static NODE *
17854remove_begin(NODE *node)
17855{
17856 NODE **n = &node, *n1 = node;
17857 while (n1 && nd_type(n1) == NODE_BEGIN && n1->nd_body) {
17858 *n = n1 = n1->nd_body;
17859 }
17860 return node;
17861}
17862
17863static NODE *
17864remove_begin_all(NODE *node)
17865{
17866 NODE **n = &node, *n1 = node;
17867 while (n1 && nd_type(n1) == NODE_BEGIN) {
17868 *n = n1 = n1->nd_body;
17869 }
17870 return node;
17871}
17872
17873static void
17874reduce_nodes(struct parser_params *p, NODE **body)
17875{
17876 NODE *node = *body;
17877
17878 if (!node) {
17879 *body = NEW_NIL(&NULL_LOC);
17880 return;
17881 }
17882#define subnodes(n1, n2) \
17883 ((!node->n1) ? (node->n2 ? (body = &node->n2, 1) : 0) : \
17884 (!node->n2) ? (body = &node->n1, 1) : \
17885 (reduce_nodes(p, &node->n1), body = &node->n2, 1))
17886
17887 while (node) {
17888 int newline = (int)(node->flags & NODE_FL_NEWLINE);
17889 switch (nd_type(node)) {
17890 end:
17891 case NODE_NIL:
17892 *body = 0;
17893 return;
17894 case NODE_RETURN:
17895 *body = node = node->nd_stts;
17896 if (newline && node) node->flags |= NODE_FL_NEWLINE;
17897 continue;
17898 case NODE_BEGIN:
17899 *body = node = node->nd_body;
17900 if (newline && node) node->flags |= NODE_FL_NEWLINE;
17901 continue;
17902 case NODE_BLOCK:
17903 body = &node->nd_end->nd_head;
17904 break;
17905 case NODE_IF:
17906 case NODE_UNLESS:
17907 if (subnodes(nd_body, nd_else)) break;
17908 return;
17909 case NODE_CASE:
17910 body = &node->nd_body;
17911 break;
17912 case NODE_WHEN:
17913 if (!subnodes(nd_body, nd_next)) goto end;
17914 break;
17915 case NODE_ENSURE:
17916 if (!subnodes(nd_head, nd_resq)) goto end;
17917 break;
17918 case NODE_RESCUE:
17919 if (node->nd_else) {
17920 body = &node->nd_resq;
17921 break;
17922 }
17923 if (!subnodes(nd_head, nd_resq)) goto end;
17924 break;
17925 default:
17926 return;
17927 }
17928 node = *body;
17929 if (newline && node) node->flags |= NODE_FL_NEWLINE;
17930 }
17931
17932#undef subnodes
17933}
17934
17935static int
17936is_static_content(NODE *node)
17937{
17938 if (!node) return 1;
17939 switch (nd_type(node)) {
17940 case NODE_HASH:
17941 if (!(node = node->nd_head)) break;
17942 case NODE_LIST:
17943 do {
17944 if (!is_static_content(node->nd_head)) return 0;
17945 } while ((node = node->nd_next) != 0);
17946 case NODE_LIT:
17947 case NODE_STR:
17948 case NODE_NIL:
17949 case NODE_TRUE:
17950 case NODE_FALSE:
17951 case NODE_ZLIST:
17952 break;
17953 default:
17954 return 0;
17955 }
17956 return 1;
17957}
17958
17959static int
17960assign_in_cond(struct parser_params *p, NODE *node)
17961{
17962 switch (nd_type(node)) {
17963 case NODE_MASGN:
17964 case NODE_LASGN:
17965 case NODE_DASGN:
17966 case NODE_DASGN_CURR:
17967 case NODE_GASGN:
17968 case NODE_IASGN:
17969 break;
17970
17971 default:
17972 return 0;
17973 }
17974
17975 if (!node->nd_value) return 1;
17976 if (is_static_content(node->nd_value)) {
17977 /* reports always */
17978 parser_warn(p, node->nd_value, "found `= literal' in conditional, should be ==");
17979 }
17980 return 1;
17981}
17982
17988
17989#define SWITCH_BY_COND_TYPE(t, w, arg) \
17990 switch (t) { \
17991 case COND_IN_OP: break; \
17992 case COND_IN_COND: rb_##w##0(arg "literal in condition"); break; \
17993 case COND_IN_FF: rb_##w##0(arg "literal in flip-flop"); break; \
17994 }
17995
17996static NODE *cond0(struct parser_params*,NODE*,enum cond_type,const YYLTYPE*);
17997
17998static NODE*
17999range_op(struct parser_params *p, NODE *node, const YYLTYPE *loc)
18000{
18001 enum node_type type;
18002
18003 if (node == 0) return 0;
18004
18005 type = nd_type(node);
18006 value_expr(node);
18007 if (type == NODE_LIT && FIXNUM_P(node->nd_lit)) {
18008 if (!e_option_supplied(p)) parser_warn(p, node, "integer literal in flip-flop");
18009 return NEW_CALL(node, tEQ, NEW_LIST(NEW_GVAR(rb_intern("$."), loc), loc), loc);
18010 }
18011 return cond0(p, node, COND_IN_FF, loc);
18012}
18013
18014static NODE*
18015cond0(struct parser_params *p, NODE *node, enum cond_type type, const YYLTYPE *loc)
18016{
18017 if (node == 0) return 0;
18018 if (!(node = nd_once_body(node))) return 0;
18019 assign_in_cond(p, node);
18020
18021 switch (nd_type(node)) {
18022 case NODE_DSTR:
18023 case NODE_EVSTR:
18024 case NODE_STR:
18025 SWITCH_BY_COND_TYPE(type, warn, "string ")
18026 break;
18027
18028 case NODE_DREGX:
18029 if (!e_option_supplied(p)) SWITCH_BY_COND_TYPE(type, warning, "regex ")
18030
18031 return NEW_MATCH2(node, NEW_GVAR(idLASTLINE, loc), loc);
18032
18033 case NODE_AND:
18034 case NODE_OR:
18035 node->nd_1st = cond0(p, node->nd_1st, COND_IN_COND, loc);
18036 node->nd_2nd = cond0(p, node->nd_2nd, COND_IN_COND, loc);
18037 break;
18038
18039 case NODE_DOT2:
18040 case NODE_DOT3:
18041 node->nd_beg = range_op(p, node->nd_beg, loc);
18042 node->nd_end = range_op(p, node->nd_end, loc);
18043 if (nd_type(node) == NODE_DOT2) nd_set_type(node,NODE_FLIP2);
18044 else if (nd_type(node) == NODE_DOT3) nd_set_type(node, NODE_FLIP3);
18045 break;
18046
18047 case NODE_DSYM:
18048 SWITCH_BY_COND_TYPE(type, warning, "string ")
18049 break;
18050
18051 case NODE_LIT:
18052 if (RB_TYPE_P(node->nd_lit, T_REGEXP)) {
18053 if (!e_option_supplied(p)) SWITCH_BY_COND_TYPE(type, warn, "regex ")
18054 nd_set_type(node, NODE_MATCH);
18055 }
18056 else if (node->nd_lit == Qtrue ||
18057 node->nd_lit == Qfalse) {
18058 /* booleans are OK, e.g., while true */
18059 }
18060 else {
18061 SWITCH_BY_COND_TYPE(type, warning, "")
18062 }
18063 default:
18064 break;
18065 }
18066 return node;
18067}
18068
18069static NODE*
18070cond(struct parser_params *p, NODE *node, const YYLTYPE *loc)
18071{
18072 if (node == 0) return 0;
18073 return cond0(p, node, COND_IN_COND, loc);
18074}
18075
18076static NODE*
18077method_cond(struct parser_params *p, NODE *node, const YYLTYPE *loc)
18078{
18079 if (node == 0) return 0;
18080 return cond0(p, node, COND_IN_OP, loc);
18081}
18082
18083static NODE*
18084new_if(struct parser_params *p, NODE *cc, NODE *left, NODE *right, const YYLTYPE *loc)
18085{
18086 if (!cc) return right;
18087 cc = cond0(p, cc, COND_IN_COND, loc);
18088 return newline_node(NEW_IF(cc, left, right, loc));
18089}
18090
18091static NODE*
18092new_unless(struct parser_params *p, NODE *cc, NODE *left, NODE *right, const YYLTYPE *loc)
18093{
18094 if (!cc) return right;
18095 cc = cond0(p, cc, COND_IN_COND, loc);
18096 return newline_node(NEW_UNLESS(cc, left, right, loc));
18097}
18098
18099static NODE*
18100logop(struct parser_params *p, ID id, NODE *left, NODE *right,
18101 const YYLTYPE *op_loc, const YYLTYPE *loc)
18102{
18103 enum node_type type = id == idAND || id == idANDOP ? NODE_AND : NODE_OR;
18104 NODE *op;
18105 value_expr(left);
18106 if (left && (enum node_type)nd_type(left) == type) {
18107 NODE *node = left, *second;
18108 while ((second = node->nd_2nd) != 0 && (enum node_type)nd_type(second) == type) {
18109 node = second;
18110 }
18111 node->nd_2nd = NEW_NODE(type, second, right, 0, loc);
18112 nd_set_line(node->nd_2nd, op_loc->beg_pos.lineno);
18113 left->nd_loc.end_pos = loc->end_pos;
18114 return left;
18115 }
18116 op = NEW_NODE(type, left, right, 0, loc);
18117 nd_set_line(op, op_loc->beg_pos.lineno);
18118 return op;
18119}
18120
18121static void
18122no_blockarg(struct parser_params *p, NODE *node)
18123{
18124 if (node && nd_type(node) == NODE_BLOCK_PASS) {
18125 compile_error(p, "block argument should not be given");
18126 }
18127}
18128
18129static NODE *
18130ret_args(struct parser_params *p, NODE *node)
18131{
18132 if (node) {
18133 no_blockarg(p, node);
18134 if (nd_type(node) == NODE_LIST) {
18135 if (node->nd_next == 0) {
18136 node = node->nd_head;
18137 }
18138 else {
18139 nd_set_type(node, NODE_VALUES);
18140 }
18141 }
18142 }
18143 return node;
18144}
18145
18146static NODE *
18147new_yield(struct parser_params *p, NODE *node, const YYLTYPE *loc)
18148{
18149 if (node) no_blockarg(p, node);
18150
18151 return NEW_YIELD(node, loc);
18152}
18153
18154static VALUE
18155negate_lit(struct parser_params *p, VALUE lit)
18156{
18157 if (FIXNUM_P(lit)) {
18158 return LONG2FIX(-FIX2LONG(lit));
18159 }
18160 if (SPECIAL_CONST_P(lit)) {
18161#if USE_FLONUM
18162 if (FLONUM_P(lit)) {
18163 return DBL2NUM(-RFLOAT_VALUE(lit));
18164 }
18165#endif
18166 goto unknown;
18167 }
18168 switch (BUILTIN_TYPE(lit)) {
18169 case T_BIGNUM:
18170 BIGNUM_NEGATE(lit);
18171 lit = rb_big_norm(lit);
18172 break;
18173 case T_RATIONAL:
18174 RRATIONAL_SET_NUM(lit, negate_lit(p, RRATIONAL(lit)->num));
18175 break;
18176 case T_COMPLEX:
18177 RCOMPLEX_SET_REAL(lit, negate_lit(p, RCOMPLEX(lit)->real));
18178 RCOMPLEX_SET_IMAG(lit, negate_lit(p, RCOMPLEX(lit)->imag));
18179 break;
18180 case T_FLOAT:
18181 RFLOAT(lit)->float_value = -RFLOAT_VALUE(lit);
18182 break;
18183 unknown:
18184 default:
18185 rb_parser_fatal(p, "unknown literal type (%s) passed to negate_lit",
18187 break;
18188 }
18189 return lit;
18190}
18191
18192static NODE *
18193arg_blk_pass(NODE *node1, NODE *node2)
18194{
18195 if (node2) {
18196 if (!node1) return node2;
18197 node2->nd_head = node1;
18198 nd_set_first_lineno(node2, nd_first_lineno(node1));
18199 nd_set_first_column(node2, nd_first_column(node1));
18200 return node2;
18201 }
18202 return node1;
18203}
18204
18205static bool
18206args_info_empty_p(struct rb_args_info *args)
18207{
18208 if (args->pre_args_num) return false;
18209 if (args->post_args_num) return false;
18210 if (args->rest_arg) return false;
18211 if (args->opt_args) return false;
18212 if (args->block_arg) return false;
18213 if (args->kw_args) return false;
18214 if (args->kw_rest_arg) return false;
18215 return true;
18216}
18217
18218static NODE*
18219new_args(struct parser_params *p, NODE *pre_args, NODE *opt_args, ID rest_arg, NODE *post_args, NODE *tail, const YYLTYPE *loc)
18220{
18221 int saved_line = p->ruby_sourceline;
18222 struct rb_args_info *args = tail->nd_ainfo;
18223
18224 args->pre_args_num = pre_args ? rb_long2int(pre_args->nd_plen) : 0;
18225 args->pre_init = pre_args ? pre_args->nd_next : 0;
18226
18227 args->post_args_num = post_args ? rb_long2int(post_args->nd_plen) : 0;
18228 args->post_init = post_args ? post_args->nd_next : 0;
18229 args->first_post_arg = post_args ? post_args->nd_pid : 0;
18230
18231 args->rest_arg = rest_arg;
18232
18233 args->opt_args = opt_args;
18234
18236
18237 p->ruby_sourceline = saved_line;
18238 nd_set_loc(tail, loc);
18239
18240 return tail;
18241}
18242
18243static NODE*
18244new_args_tail(struct parser_params *p, NODE *kw_args, ID kw_rest_arg, ID block, const YYLTYPE *loc)
18245{
18246 int saved_line = p->ruby_sourceline;
18247 NODE *node;
18249 struct rb_args_info *args = ZALLOC(struct rb_args_info);
18250 rb_imemo_tmpbuf_set_ptr(tmpbuf, args);
18251 args->imemo = tmpbuf;
18252 node = NEW_NODE(NODE_ARGS, 0, 0, args, &NULL_LOC);
18253 RB_OBJ_WRITTEN(p->ast, Qnil, tmpbuf);
18254 if (p->error_p) return node;
18255
18256 args->block_arg = block;
18257 args->kw_args = kw_args;
18258
18259 if (kw_args) {
18260 /*
18261 * def foo(k1: 1, kr1:, k2: 2, **krest, &b)
18262 * variable order: k1, kr1, k2, &b, internal_id, krest
18263 * #=> <reorder>
18264 * variable order: kr1, k1, k2, internal_id, krest, &b
18265 */
18266 ID kw_bits = internal_id(p), *required_kw_vars, *kw_vars;
18267 struct vtable *vtargs = p->lvtbl->args;
18268 NODE *kwn = kw_args;
18269
18270 vtable_pop(vtargs, !!block + !!kw_rest_arg);
18271 required_kw_vars = kw_vars = &vtargs->tbl[vtargs->pos];
18272 while (kwn) {
18273 if (!NODE_REQUIRED_KEYWORD_P(kwn->nd_body))
18274 --kw_vars;
18275 --required_kw_vars;
18276 kwn = kwn->nd_next;
18277 }
18278
18279 for (kwn = kw_args; kwn; kwn = kwn->nd_next) {
18280 ID vid = kwn->nd_body->nd_vid;
18281 if (NODE_REQUIRED_KEYWORD_P(kwn->nd_body)) {
18282 *required_kw_vars++ = vid;
18283 }
18284 else {
18285 *kw_vars++ = vid;
18286 }
18287 }
18288
18289 arg_var(p, kw_bits);
18290 if (kw_rest_arg) arg_var(p, kw_rest_arg);
18291 if (block) arg_var(p, block);
18292
18293 args->kw_rest_arg = NEW_DVAR(kw_rest_arg, loc);
18294 args->kw_rest_arg->nd_cflag = kw_bits;
18295 }
18296 else if (kw_rest_arg == idNil) {
18297 args->no_kwarg = 1;
18298 }
18299 else if (kw_rest_arg) {
18300 args->kw_rest_arg = NEW_DVAR(kw_rest_arg, loc);
18301 }
18302
18303 p->ruby_sourceline = saved_line;
18304 return node;
18305}
18306
18307static NODE *
18308args_with_numbered(struct parser_params *p, NODE *args, int max_numparam)
18309{
18310 if (max_numparam > NO_PARAM) {
18311 if (!args) {
18312 YYLTYPE loc = RUBY_INIT_YYLLOC();
18313 args = new_args_tail(p, 0, 0, 0, 0);
18314 nd_set_loc(args, &loc);
18315 }
18316 args->nd_ainfo->pre_args_num = max_numparam;
18317 }
18318 return args;
18319}
18320
18321static NODE*
18322new_array_pattern(struct parser_params *p, NODE *constant, NODE *pre_arg, NODE *aryptn, const YYLTYPE *loc)
18323{
18324 struct rb_ary_pattern_info *apinfo = aryptn->nd_apinfo;
18325
18326 aryptn->nd_pconst = constant;
18327
18328 if (pre_arg) {
18329 NODE *pre_args = NEW_LIST(pre_arg, loc);
18330 if (apinfo->pre_args) {
18331 apinfo->pre_args = list_concat(pre_args, apinfo->pre_args);
18332 }
18333 else {
18334 apinfo->pre_args = pre_args;
18335 }
18336 }
18337 return aryptn;
18338}
18339
18340static NODE*
18341new_array_pattern_tail(struct parser_params *p, NODE *pre_args, int has_rest, ID rest_arg, NODE *post_args, const YYLTYPE *loc)
18342{
18343 int saved_line = p->ruby_sourceline;
18344 NODE *node;
18346 struct rb_ary_pattern_info *apinfo = ZALLOC(struct rb_ary_pattern_info);
18347 rb_imemo_tmpbuf_set_ptr(tmpbuf, apinfo);
18348 node = NEW_NODE(NODE_ARYPTN, 0, 0, apinfo, loc);
18349 apinfo->imemo = tmpbuf;
18350 RB_OBJ_WRITTEN(p->ast, Qnil, tmpbuf);
18351
18352 apinfo->pre_args = pre_args;
18353
18354 if (has_rest) {
18355 if (rest_arg) {
18356 apinfo->rest_arg = assignable(p, rest_arg, 0, loc);
18357 }
18358 else {
18360 }
18361 }
18362 else {
18363 apinfo->rest_arg = NULL;
18364 }
18365
18366 apinfo->post_args = post_args;
18367
18368 p->ruby_sourceline = saved_line;
18369 return node;
18370}
18371
18372static NODE*
18373new_hash_pattern(struct parser_params *p, NODE *constant, NODE *hshptn, const YYLTYPE *loc)
18374{
18375 hshptn->nd_pconst = constant;
18376 return hshptn;
18377}
18378
18379static NODE*
18380new_hash_pattern_tail(struct parser_params *p, NODE *kw_args, ID kw_rest_arg, const YYLTYPE *loc)
18381{
18382 int saved_line = p->ruby_sourceline;
18383 NODE *node, *kw_rest_arg_node;
18384
18385 if (kw_rest_arg == idNil) {
18386 kw_rest_arg_node = NODE_SPECIAL_NO_REST_KEYWORD;
18387 }
18388 else if (kw_rest_arg) {
18389 kw_rest_arg_node = assignable(p, kw_rest_arg, 0, loc);
18390 }
18391 else {
18392 kw_rest_arg_node = NULL;
18393 }
18394
18395 node = NEW_NODE(NODE_HSHPTN, 0, kw_args, kw_rest_arg_node, loc);
18396
18397 p->ruby_sourceline = saved_line;
18398 return node;
18399}
18400
18401static NODE *
18402new_case3(struct parser_params *p, NODE *val, NODE *pat, const YYLTYPE *loc)
18403{
18404 NODE *node = NEW_CASE3(val, pat, loc);
18405
18407 rb_warn0L(nd_line(node), "Pattern matching is experimental, and the behavior may change in future versions of Ruby!");
18408 return node;
18409}
18410
18411static NODE*
18412dsym_node(struct parser_params *p, NODE *node, const YYLTYPE *loc)
18413{
18414 VALUE lit;
18415
18416 if (!node) {
18417 return NEW_LIT(ID2SYM(idNULL), loc);
18418 }
18419
18420 switch (nd_type(node)) {
18421 case NODE_DSTR:
18422 nd_set_type(node, NODE_DSYM);
18423 nd_set_loc(node, loc);
18424 break;
18425 case NODE_STR:
18426 lit = node->nd_lit;
18427 RB_OBJ_WRITTEN(p->ast, Qnil, node->nd_lit = ID2SYM(rb_intern_str(lit)));
18428 nd_set_type(node, NODE_LIT);
18429 nd_set_loc(node, loc);
18430 break;
18431 default:
18432 node = NEW_NODE(NODE_DSYM, Qnil, 1, NEW_LIST(node, loc), loc);
18433 break;
18434 }
18435 return node;
18436}
18437
18438static int
18439append_literal_keys(st_data_t k, st_data_t v, st_data_t h)
18440{
18441 NODE *node = (NODE *)v;
18442 NODE **result = (NODE **)h;
18443 node->nd_alen = 2;
18444 node->nd_next->nd_end = node->nd_next;
18445 node->nd_next->nd_next = 0;
18446 if (*result)
18447 list_concat(*result, node);
18448 else
18449 *result = node;
18450 return ST_CONTINUE;
18451}
18452
18453static NODE *
18454remove_duplicate_keys(struct parser_params *p, NODE *hash)
18455{
18456 st_table *literal_keys = st_init_numtable_with_size(hash->nd_alen / 2);
18457 NODE *result = 0;
18458 rb_code_location_t loc = hash->nd_loc;
18459 while (hash && hash->nd_head && hash->nd_next) {
18460 NODE *head = hash->nd_head;
18461 NODE *value = hash->nd_next;
18462 NODE *next = value->nd_next;
18463 VALUE key = (VALUE)head;
18464 st_data_t data;
18465 if (nd_type(head) == NODE_LIT &&
18466 st_lookup(literal_keys, (key = head->nd_lit), &data)) {
18468 "key %+"PRIsVALUE" is duplicated and overwritten on line %d",
18469 head->nd_lit, nd_line(head));
18470 head = ((NODE *)data)->nd_next;
18471 head->nd_head = block_append(p, head->nd_head, value->nd_head);
18472 }
18473 else {
18474 st_insert(literal_keys, (st_data_t)key, (st_data_t)hash);
18475 }
18476 hash = next;
18477 }
18478 st_foreach(literal_keys, append_literal_keys, (st_data_t)&result);
18479 st_free_table(literal_keys);
18480 if (hash) {
18481 if (!result) result = hash;
18482 else list_concat(result, hash);
18483 }
18484 result->nd_loc = loc;
18485 return result;
18486}
18487
18488static NODE *
18489new_hash(struct parser_params *p, NODE *hash, const YYLTYPE *loc)
18490{
18491 if (hash) hash = remove_duplicate_keys(p, hash);
18492 return NEW_HASH(hash, loc);
18493}
18494#endif
18495
18496static void
18497error_duplicate_pattern_variable(struct parser_params *p, ID id, const YYLTYPE *loc)
18498{
18499 if (is_private_local_id(id)) {
18500 return;
18501 }
18502 if (st_is_member(p->pvtbl, id)) {
18503 yyerror1(loc, "duplicated variable name");
18504 }
18505 else {
18506 st_insert(p->pvtbl, (st_data_t)id, 0);
18507 }
18508}
18509
18510static void
18511error_duplicate_pattern_key(struct parser_params *p, VALUE key, const YYLTYPE *loc)
18512{
18513 if (!p->pktbl) {
18514 p->pktbl = st_init_numtable();
18515 }
18516 else if (st_is_member(p->pktbl, key)) {
18517 yyerror1(loc, "duplicated key name");
18518 return;
18519 }
18520 st_insert(p->pktbl, (st_data_t)key, 0);
18521}
18522
18523#ifndef RIPPER
18524static NODE *
18525new_unique_key_hash(struct parser_params *p, NODE *hash, const YYLTYPE *loc)
18526{
18527 return NEW_HASH(hash, loc);
18528}
18529#endif /* !RIPPER */
18530
18531#ifndef RIPPER
18532static NODE *
18533new_op_assign(struct parser_params *p, NODE *lhs, ID op, NODE *rhs, const YYLTYPE *loc)
18534{
18535 NODE *asgn;
18536
18537 if (lhs) {
18538 ID vid = lhs->nd_vid;
18539 YYLTYPE lhs_loc = lhs->nd_loc;
18540 if (op == tOROP) {
18541 lhs->nd_value = rhs;
18542 nd_set_loc(lhs, loc);
18543 asgn = NEW_OP_ASGN_OR(gettable(p, vid, &lhs_loc), lhs, loc);
18544 if (is_notop_id(vid)) {
18545 switch (id_type(vid)) {
18546 case ID_GLOBAL:
18547 case ID_INSTANCE:
18548 case ID_CLASS:
18549 asgn->nd_aid = vid;
18550 }
18551 }
18552 }
18553 else if (op == tANDOP) {
18554 lhs->nd_value = rhs;
18555 nd_set_loc(lhs, loc);
18556 asgn = NEW_OP_ASGN_AND(gettable(p, vid, &lhs_loc), lhs, loc);
18557 }
18558 else {
18559 asgn = lhs;
18560 asgn->nd_value = NEW_CALL(gettable(p, vid, &lhs_loc), op, NEW_LIST(rhs, &rhs->nd_loc), loc);
18561 nd_set_loc(asgn, loc);
18562 }
18563 }
18564 else {
18565 asgn = NEW_BEGIN(0, loc);
18566 }
18567 return asgn;
18568}
18569
18570static NODE *
18571new_ary_op_assign(struct parser_params *p, NODE *ary,
18572 NODE *args, ID op, NODE *rhs, const YYLTYPE *args_loc, const YYLTYPE *loc)
18573{
18574 NODE *asgn;
18575
18576 args = make_list(args, args_loc);
18577 if (nd_type(args) == NODE_BLOCK_PASS) {
18578 args = NEW_ARGSCAT(args, rhs, loc);
18579 }
18580 else {
18581 args = arg_concat(p, args, rhs, loc);
18582 }
18583 asgn = NEW_OP_ASGN1(ary, op, args, loc);
18584 fixpos(asgn, ary);
18585 return asgn;
18586}
18587
18588static NODE *
18589new_attr_op_assign(struct parser_params *p, NODE *lhs,
18590 ID atype, ID attr, ID op, NODE *rhs, const YYLTYPE *loc)
18591{
18592 NODE *asgn;
18593
18594 asgn = NEW_OP_ASGN2(lhs, CALL_Q_P(atype), attr, op, rhs, loc);
18595 fixpos(asgn, lhs);
18596 return asgn;
18597}
18598
18599static NODE *
18600new_const_op_assign(struct parser_params *p, NODE *lhs, ID op, NODE *rhs, const YYLTYPE *loc)
18601{
18602 NODE *asgn;
18603
18604 if (lhs) {
18605 asgn = NEW_OP_CDECL(lhs, op, rhs, loc);
18606 }
18607 else {
18608 asgn = NEW_BEGIN(0, loc);
18609 }
18610 fixpos(asgn, lhs);
18611 return asgn;
18612}
18613
18614static NODE *
18615const_decl(struct parser_params *p, NODE *path, const YYLTYPE *loc)
18616{
18617 if (p->in_def) {
18618 yyerror1(loc, "dynamic constant assignment");
18619 }
18620 return NEW_CDECL(0, 0, (path), loc);
18621}
18622#else
18623static VALUE
18624const_decl(struct parser_params *p, VALUE path)
18625{
18626 if (p->in_def) {
18627 path = dispatch1(assign_error, path);
18628 ripper_error(p);
18629 }
18630 return path;
18631}
18632
18633static VALUE
18634assign_error(struct parser_params *p, VALUE a)
18635{
18636 a = dispatch1(assign_error, a);
18637 ripper_error(p);
18638 return a;
18639}
18640
18641static VALUE
18642var_field(struct parser_params *p, VALUE a)
18643{
18644 return ripper_new_yylval(p, get_id(a), dispatch1(var_field, a), 0);
18645}
18646#endif
18647
18648#ifndef RIPPER
18649static NODE *
18650new_bodystmt(struct parser_params *p, NODE *head, NODE *rescue, NODE *rescue_else, NODE *ensure, const YYLTYPE *loc)
18651{
18652 NODE *result = head;
18653 if (rescue) {
18654 NODE *tmp = rescue_else ? rescue_else : rescue;
18655 YYLTYPE rescue_loc = code_loc_gen(&head->nd_loc, &tmp->nd_loc);
18656
18657 result = NEW_RESCUE(head, rescue, rescue_else, &rescue_loc);
18658 nd_set_line(result, rescue->nd_loc.beg_pos.lineno);
18659 }
18660 else if (rescue_else) {
18661 result = block_append(p, result, rescue_else);
18662 }
18663 if (ensure) {
18664 result = NEW_ENSURE(result, ensure, loc);
18665 }
18666 fixpos(result, head);
18667 return result;
18668}
18669#endif
18670
18671static void
18672warn_unused_var(struct parser_params *p, struct local_vars *local)
18673{
18674 int cnt;
18675
18676 if (!local->used) return;
18677 cnt = local->used->pos;
18678 if (cnt != local->vars->pos) {
18679 rb_parser_fatal(p, "local->used->pos != local->vars->pos");
18680 }
18681#ifndef RIPPER
18682 ID *v = local->vars->tbl;
18683 ID *u = local->used->tbl;
18684 for (int i = 0; i < cnt; ++i) {
18685 if (!v[i] || (u[i] & LVAR_USED)) continue;
18686 if (is_private_local_id(v[i])) continue;
18687 rb_warn1L((int)u[i], "assigned but unused variable - %"PRIsWARN, rb_id2str(v[i]));
18688 }
18689#endif
18690}
18691
18692static void
18693local_push(struct parser_params *p, int toplevel_scope)
18694{
18695 struct local_vars *local;
18696 int inherits_dvars = toplevel_scope && compile_for_eval;
18697 int warn_unused_vars = RTEST(ruby_verbose);
18698
18699 local = ALLOC(struct local_vars);
18700 local->prev = p->lvtbl;
18701 local->args = vtable_alloc(0);
18702 local->vars = vtable_alloc(inherits_dvars ? DVARS_INHERIT : DVARS_TOPSCOPE);
18703#ifndef RIPPER
18704 if (toplevel_scope && compile_for_eval) warn_unused_vars = 0;
18705 if (toplevel_scope && e_option_supplied(p)) warn_unused_vars = 0;
18706 local->numparam.outer = 0;
18707 local->numparam.inner = 0;
18708 local->numparam.current = 0;
18709#endif
18710 local->used = warn_unused_vars ? vtable_alloc(0) : 0;
18711
18712# if WARN_PAST_SCOPE
18713 local->past = 0;
18714# endif
18715 CMDARG_PUSH(0);
18716 COND_PUSH(0);
18717 p->lvtbl = local;
18718}
18719
18720static void
18721local_pop(struct parser_params *p)
18722{
18723 struct local_vars *local = p->lvtbl->prev;
18724 if (p->lvtbl->used) {
18725 warn_unused_var(p, p->lvtbl);
18726 vtable_free(p->lvtbl->used);
18727 }
18728# if WARN_PAST_SCOPE
18729 while (p->lvtbl->past) {
18730 struct vtable *past = p->lvtbl->past;
18731 p->lvtbl->past = past->prev;
18732 vtable_free(past);
18733 }
18734# endif
18735 vtable_free(p->lvtbl->args);
18736 vtable_free(p->lvtbl->vars);
18737 CMDARG_POP();
18738 COND_POP();
18739 ruby_sized_xfree(p->lvtbl, sizeof(*p->lvtbl));
18740 p->lvtbl = local;
18741}
18742
18743#ifndef RIPPER
18744static ID*
18745local_tbl(struct parser_params *p)
18746{
18747 int cnt_args = vtable_size(p->lvtbl->args);
18748 int cnt_vars = vtable_size(p->lvtbl->vars);
18749 int cnt = cnt_args + cnt_vars;
18750 int i, j;
18751 ID *buf;
18752
18753 if (cnt <= 0) return 0;
18754 buf = ALLOC_N(ID, cnt + 2);
18755 MEMCPY(buf+1, p->lvtbl->args->tbl, ID, cnt_args);
18756 /* remove IDs duplicated to warn shadowing */
18757 for (i = 0, j = cnt_args+1; i < cnt_vars; ++i) {
18758 ID id = p->lvtbl->vars->tbl[i];
18759 if (!vtable_included(p->lvtbl->args, id)) {
18760 buf[j++] = id;
18761 }
18762 }
18763 if (--j < cnt) {
18764 REALLOC_N(buf, ID, (cnt = j) + 2);
18765 }
18766 buf[0] = cnt;
18768
18769 return buf;
18770}
18771
18772static NODE*
18773node_newnode_with_locals(struct parser_params *p, enum node_type type, VALUE a1, VALUE a2, const rb_code_location_t *loc)
18774{
18775 ID *a0;
18776 NODE *n;
18777
18778 a0 = local_tbl(p);
18779 n = NEW_NODE(type, a0, a1, a2, loc);
18780 return n;
18781}
18782
18783#endif
18784
18785static void
18786numparam_name(struct parser_params *p, ID id)
18787{
18788 if (!NUMPARAM_ID_P(id)) return;
18789 rb_warn1("`_%d' is reserved for numbered parameter; consider another name",
18791}
18792
18793static void
18794arg_var(struct parser_params *p, ID id)
18795{
18796 numparam_name(p, id);
18797 vtable_add(p->lvtbl->args, id);
18798}
18799
18800static void
18801local_var(struct parser_params *p, ID id)
18802{
18803 numparam_name(p, id);
18804 vtable_add(p->lvtbl->vars, id);
18805 if (p->lvtbl->used) {
18807 }
18808}
18809
18810static int
18811local_id_ref(struct parser_params *p, ID id, ID **vidrefp)
18812{
18813 struct vtable *vars, *args, *used;
18814
18815 vars = p->lvtbl->vars;
18816 args = p->lvtbl->args;
18817 used = p->lvtbl->used;
18818
18819 while (vars && !DVARS_TERMINAL_P(vars->prev)) {
18820 vars = vars->prev;
18821 args = args->prev;
18822 if (used) used = used->prev;
18823 }
18824
18825 if (vars && vars->prev == DVARS_INHERIT) {
18826 return rb_local_defined(id, p->parent_iseq);
18827 }
18828 else if (vtable_included(args, id)) {
18829 return 1;
18830 }
18831 else {
18832 int i = vtable_included(vars, id);
18833 if (i && used && vidrefp) *vidrefp = &used->tbl[i-1];
18834 return i != 0;
18835 }
18836}
18837
18838static int
18839local_id(struct parser_params *p, ID id)
18840{
18841 return local_id_ref(p, id, NULL);
18842}
18843
18844static NODE *
18845numparam_push(struct parser_params *p)
18846{
18847#ifndef RIPPER
18848 struct local_vars *local = p->lvtbl;
18849 NODE *inner = local->numparam.inner;
18850 if (!local->numparam.outer) {
18851 local->numparam.outer = local->numparam.current;
18852 }
18853 local->numparam.inner = 0;
18854 local->numparam.current = 0;
18855 return inner;
18856#else
18857 return 0;
18858#endif
18859}
18860
18861static void
18862numparam_pop(struct parser_params *p, NODE *prev_inner)
18863{
18864#ifndef RIPPER
18865 struct local_vars *local = p->lvtbl;
18866 if (prev_inner) {
18867 /* prefer first one */
18868 local->numparam.inner = prev_inner;
18869 }
18870 else if (local->numparam.current) {
18871 /* current and inner are exclusive */
18872 local->numparam.inner = local->numparam.current;
18873 }
18874 if (p->max_numparam > NO_PARAM) {
18875 /* current and outer are exclusive */
18876 local->numparam.current = local->numparam.outer;
18877 local->numparam.outer = 0;
18878 }
18879 else {
18880 /* no numbered parameter */
18881 local->numparam.current = 0;
18882 }
18883#endif
18884}
18885
18886static const struct vtable *
18887dyna_push(struct parser_params *p)
18888{
18889 p->lvtbl->args = vtable_alloc(p->lvtbl->args);
18890 p->lvtbl->vars = vtable_alloc(p->lvtbl->vars);
18891 if (p->lvtbl->used) {
18892 p->lvtbl->used = vtable_alloc(p->lvtbl->used);
18893 }
18894 return p->lvtbl->args;
18895}
18896
18897static void
18898dyna_pop_vtable(struct parser_params *p, struct vtable **vtblp)
18899{
18900 struct vtable *tmp = *vtblp;
18901 *vtblp = tmp->prev;
18902# if WARN_PAST_SCOPE
18903 if (p->past_scope_enabled) {
18904 tmp->prev = p->lvtbl->past;
18905 p->lvtbl->past = tmp;
18906 return;
18907 }
18908# endif
18909 vtable_free(tmp);
18910}
18911
18912static void
18913dyna_pop_1(struct parser_params *p)
18914{
18915 struct vtable *tmp;
18916
18917 if ((tmp = p->lvtbl->used) != 0) {
18918 warn_unused_var(p, p->lvtbl);
18919 p->lvtbl->used = p->lvtbl->used->prev;
18920 vtable_free(tmp);
18921 }
18922 dyna_pop_vtable(p, &p->lvtbl->args);
18923 dyna_pop_vtable(p, &p->lvtbl->vars);
18924}
18925
18926static void
18927dyna_pop(struct parser_params *p, const struct vtable *lvargs)
18928{
18929 while (p->lvtbl->args != lvargs) {
18930 dyna_pop_1(p);
18931 if (!p->lvtbl->args) {
18932 struct local_vars *local = p->lvtbl->prev;
18933 ruby_sized_xfree(p->lvtbl, sizeof(*p->lvtbl));
18934 p->lvtbl = local;
18935 }
18936 }
18937 dyna_pop_1(p);
18938}
18939
18940static int
18941dyna_in_block(struct parser_params *p)
18942{
18943 return !DVARS_TERMINAL_P(p->lvtbl->vars) && p->lvtbl->vars->prev != DVARS_TOPSCOPE;
18944}
18945
18946static int
18947dvar_defined_ref(struct parser_params *p, ID id, ID **vidrefp)
18948{
18949 struct vtable *vars, *args, *used;
18950 int i;
18951
18952 args = p->lvtbl->args;
18953 vars = p->lvtbl->vars;
18954 used = p->lvtbl->used;
18955
18956 while (!DVARS_TERMINAL_P(vars)) {
18957 if (vtable_included(args, id)) {
18958 return 1;
18959 }
18960 if ((i = vtable_included(vars, id)) != 0) {
18961 if (used && vidrefp) *vidrefp = &used->tbl[i-1];
18962 return 1;
18963 }
18964 args = args->prev;
18965 vars = vars->prev;
18966 if (!vidrefp) used = 0;
18967 if (used) used = used->prev;
18968 }
18969
18970 if (vars == DVARS_INHERIT) {
18971 return rb_dvar_defined(id, p->parent_iseq);
18972 }
18973
18974 return 0;
18975}
18976
18977static int
18978dvar_defined(struct parser_params *p, ID id)
18979{
18980 return dvar_defined_ref(p, id, NULL);
18981}
18982
18983static int
18984dvar_curr(struct parser_params *p, ID id)
18985{
18986 return (vtable_included(p->lvtbl->args, id) ||
18987 vtable_included(p->lvtbl->vars, id));
18988}
18989
18990static void
18991reg_fragment_enc_error(struct parser_params* p, VALUE str, int c)
18992{
18993 compile_error(p,
18994 "regexp encoding option '%c' differs from source encoding '%s'",
18996}
18997
18998#ifndef RIPPER
18999int
19001{
19002 int c = RE_OPTION_ENCODING_IDX(options);
19003
19004 if (c) {
19005 int opt, idx;
19006 rb_char_to_option_kcode(c, &opt, &idx);
19007 if (idx != ENCODING_GET(str) &&
19009 goto error;
19010 }
19011 ENCODING_SET(str, idx);
19012 }
19013 else if (RE_OPTION_ENCODING_NONE(options)) {
19014 if (!ENCODING_IS_ASCII8BIT(str) &&
19016 c = 'n';
19017 goto error;
19018 }
19020 }
19021 else if (p->enc == rb_usascii_encoding()) {
19023 /* raise in re.c */
19025 }
19026 else {
19028 }
19029 }
19030 return 0;
19031
19032 error:
19033 return c;
19034}
19035
19036static void
19037reg_fragment_setenc(struct parser_params* p, VALUE str, int options)
19038{
19039 int c = rb_reg_fragment_setenc(p, str, options);
19040 if (c) reg_fragment_enc_error(p, str, c);
19041}
19042
19043static int
19044reg_fragment_check(struct parser_params* p, VALUE str, int options)
19045{
19046 VALUE err;
19047 reg_fragment_setenc(p, str, options);
19049 if (err != Qnil) {
19051 compile_error(p, "%"PRIsVALUE, err);
19052 return 0;
19053 }
19054 return 1;
19055}
19056
19057typedef struct {
19058 struct parser_params* parser;
19060 NODE *succ_block;
19061 const YYLTYPE *loc;
19063
19064static int
19065reg_named_capture_assign_iter(const OnigUChar *name, const OnigUChar *name_end,
19066 int back_num, int *back_refs, OnigRegex regex, void *arg0)
19067{
19069 struct parser_params* p = arg->parser;
19070 rb_encoding *enc = arg->enc;
19071 long len = name_end - name;
19072 const char *s = (const char *)name;
19073 ID var;
19074 NODE *node, *succ;
19075
19076 if (!len) return ST_CONTINUE;
19077 if (rb_enc_symname_type(s, len, enc, (1U<<ID_LOCAL)) != ID_LOCAL)
19078 return ST_CONTINUE;
19079
19080 var = intern_cstr(s, len, enc);
19081 if (len < MAX_WORD_LENGTH && rb_reserved_word(s, (int)len)) {
19082 if (!lvar_defined(p, var)) return ST_CONTINUE;
19083 }
19084 node = node_assign(p, assignable(p, var, 0, arg->loc), NEW_LIT(ID2SYM(var), arg->loc), arg->loc);
19085 succ = arg->succ_block;
19086 if (!succ) succ = NEW_BEGIN(0, arg->loc);
19087 succ = block_append(p, succ, node);
19088 arg->succ_block = succ;
19089 return ST_CONTINUE;
19090}
19091
19092static NODE *
19093reg_named_capture_assign(struct parser_params* p, VALUE regexp, const YYLTYPE *loc)
19094{
19096
19097 arg.parser = p;
19098 arg.enc = rb_enc_get(regexp);
19099 arg.succ_block = 0;
19100 arg.loc = loc;
19101 onig_foreach_name(RREGEXP_PTR(regexp), reg_named_capture_assign_iter, &arg);
19102
19103 if (!arg.succ_block) return 0;
19104 return arg.succ_block->nd_next;
19105}
19106
19107static VALUE
19108parser_reg_compile(struct parser_params* p, VALUE str, int options)
19109{
19110 reg_fragment_setenc(p, str, options);
19111 return rb_parser_reg_compile(p, str, options);
19112}
19113
19114VALUE
19116{
19118}
19119
19120static VALUE
19121reg_compile(struct parser_params* p, VALUE str, int options)
19122{
19123 VALUE re;
19124 VALUE err;
19125
19126 err = rb_errinfo();
19127 re = parser_reg_compile(p, str, options);
19128 if (NIL_P(re)) {
19131 compile_error(p, "%"PRIsVALUE, m);
19132 return Qnil;
19133 }
19134 return re;
19135}
19136#else
19137static VALUE
19138parser_reg_compile(struct parser_params* p, VALUE str, int options, VALUE *errmsg)
19139{
19140 VALUE err = rb_errinfo();
19141 VALUE re;
19142 str = ripper_is_node_yylval(str) ? RNODE(str)->nd_cval : str;
19143 int c = rb_reg_fragment_setenc(p, str, options);
19144 if (c) reg_fragment_enc_error(p, str, c);
19145 re = rb_parser_reg_compile(p, str, options);
19146 if (NIL_P(re)) {
19147 *errmsg = rb_attr_get(rb_errinfo(), idMesg);
19149 }
19150 return re;
19151}
19152#endif
19153
19154#ifndef RIPPER
19155void
19156rb_parser_set_options(VALUE vparser, int print, int loop, int chomp, int split)
19157{
19158 struct parser_params *p;
19159 TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, p);
19160 p->do_print = print;
19161 p->do_loop = loop;
19162 p->do_chomp = chomp;
19163 p->do_split = split;
19164}
19165
19166void
19168{
19169 struct parser_params *p;
19170 TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, p);
19171 p->warn_location = warn;
19172}
19173
19174static NODE *
19175parser_append_options(struct parser_params *p, NODE *node)
19176{
19177 static const YYLTYPE default_location = {{1, 0}, {1, 0}};
19178 const YYLTYPE *const LOC = &default_location;
19179
19180 if (p->do_print) {
19181 NODE *print = NEW_FCALL(rb_intern("print"),
19182 NEW_LIST(NEW_GVAR(idLASTLINE, LOC), LOC),
19183 LOC);
19184 node = block_append(p, node, print);
19185 }
19186
19187 if (p->do_loop) {
19188 if (p->do_split) {
19189 NODE *args = NEW_LIST(NEW_GVAR(rb_intern("$;"), LOC), LOC);
19190 NODE *split = NEW_GASGN(rb_intern("$F"),
19192 rb_intern("split"), args, LOC),
19193 LOC);
19194 node = block_append(p, split, node);
19195 }
19196 if (p->do_chomp) {
19197 NODE *chomp = NEW_CALL(NEW_GVAR(idLASTLINE, LOC),
19198 rb_intern("chomp!"), 0, LOC);
19199 node = block_append(p, chomp, node);
19200 }
19201
19202 node = NEW_WHILE(NEW_VCALL(idGets, LOC), node, 1, LOC);
19203 }
19204
19205 return node;
19206}
19207
19208void
19210{
19211 /* just to suppress unused-function warnings */
19212 (void)nodetype;
19213 (void)nodeline;
19214}
19215
19216static ID
19217internal_id(struct parser_params *p)
19218{
19219 const ID max_id = RB_ID_SERIAL_MAX & ~0xffff;
19220 ID id = (ID)vtable_size(p->lvtbl->args) + (ID)vtable_size(p->lvtbl->vars);
19221 id = max_id - id;
19222 return ID_STATIC_SYM | ID_INTERNAL | (id << ID_SCOPE_SHIFT);
19223}
19224#endif /* !RIPPER */
19225
19226static void
19227parser_initialize(struct parser_params *p)
19228{
19229 /* note: we rely on TypedData_Make_Struct to set most fields to 0 */
19230 p->command_start = TRUE;
19232 p->lex.lpar_beg = -1; /* make lambda_beginning_p() == FALSE at first */
19233 p->node_id = 0;
19234#ifdef RIPPER
19235 p->delayed.token = Qnil;
19236 p->result = Qnil;
19237 p->parsing_thread = Qnil;
19238#else
19239 p->error_buffer = Qfalse;
19240#endif
19241 p->debug_buffer = Qnil;
19243 p->enc = rb_utf8_encoding();
19244}
19245
19246#ifdef RIPPER
19247#define parser_mark ripper_parser_mark
19248#define parser_free ripper_parser_free
19249#endif
19250
19251static void
19252parser_mark(void *ptr)
19253{
19254 struct parser_params *p = (struct parser_params*)ptr;
19255
19256 rb_gc_mark(p->lex.input);
19262 rb_gc_mark((VALUE)p->ast);
19264#ifndef RIPPER
19268#else
19269 rb_gc_mark(p->delayed.token);
19270 rb_gc_mark(p->value);
19271 rb_gc_mark(p->result);
19272 rb_gc_mark(p->parsing_thread);
19273#endif
19276#ifdef YYMALLOC
19277 rb_gc_mark((VALUE)p->heap);
19278#endif
19279}
19280
19281static void
19282parser_free(void *ptr)
19283{
19284 struct parser_params *p = (struct parser_params*)ptr;
19285 struct local_vars *local, *prev;
19286
19287 if (p->tokenbuf) {
19289 }
19290 for (local = p->lvtbl; local; local = prev) {
19291 if (local->vars) xfree(local->vars);
19292 prev = local->prev;
19293 xfree(local);
19294 }
19295 {
19296 token_info *ptinfo;
19297 while ((ptinfo = p->token_info) != 0) {
19298 p->token_info = ptinfo->next;
19299 xfree(ptinfo);
19300 }
19301 }
19302 xfree(ptr);
19303}
19304
19305static size_t
19306parser_memsize(const void *ptr)
19307{
19308 struct parser_params *p = (struct parser_params*)ptr;
19309 struct local_vars *local;
19310 size_t size = sizeof(*p);
19311
19312 size += p->toksiz;
19313 for (local = p->lvtbl; local; local = local->prev) {
19314 size += sizeof(*local);
19315 if (local->vars) size += local->vars->capa * sizeof(ID);
19316 }
19317 return size;
19318}
19319
19320static const rb_data_type_t parser_data_type = {
19321#ifndef RIPPER
19322 "parser",
19323#else
19324 "ripper",
19325#endif
19326 {
19327 parser_mark,
19328 parser_free,
19329 parser_memsize,
19330 },
19332};
19333
19334#ifndef RIPPER
19335#undef rb_reserved_word
19336
19337const struct kwtable *
19338rb_reserved_word(const char *str, unsigned int len)
19339{
19340 return reserved_word(str, len);
19341}
19342
19343VALUE
19345{
19346 struct parser_params *p;
19347 VALUE parser = TypedData_Make_Struct(0, struct parser_params,
19348 &parser_data_type, p);
19349 parser_initialize(p);
19350 return parser;
19351}
19352
19353VALUE
19354rb_parser_set_context(VALUE vparser, const struct rb_iseq_struct *base, int main)
19355{
19356 struct parser_params *p;
19357
19358 TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, p);
19359 p->error_buffer = main ? Qfalse : Qnil;
19360 p->parent_iseq = base;
19361 return vparser;
19362}
19363#endif
19364
19365#ifdef RIPPER
19366#define rb_parser_end_seen_p ripper_parser_end_seen_p
19367#define rb_parser_encoding ripper_parser_encoding
19368#define rb_parser_get_yydebug ripper_parser_get_yydebug
19369#define rb_parser_set_yydebug ripper_parser_set_yydebug
19370#define rb_parser_get_debug_output ripper_parser_get_debug_output
19371#define rb_parser_set_debug_output ripper_parser_set_debug_output
19372static VALUE ripper_parser_end_seen_p(VALUE vparser);
19373static VALUE ripper_parser_encoding(VALUE vparser);
19374static VALUE ripper_parser_get_yydebug(VALUE self);
19375static VALUE ripper_parser_set_yydebug(VALUE self, VALUE flag);
19376static VALUE ripper_parser_get_debug_output(VALUE self);
19377static VALUE ripper_parser_set_debug_output(VALUE self, VALUE output);
19378
19379/*
19380 * call-seq:
19381 * ripper.error? -> Boolean
19382 *
19383 * Return true if parsed source has errors.
19384 */
19385static VALUE
19386ripper_error_p(VALUE vparser)
19387{
19388 struct parser_params *p;
19389
19390 TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, p);
19391 return p->error_p ? Qtrue : Qfalse;
19392}
19393#endif
19394
19395/*
19396 * call-seq:
19397 * ripper.end_seen? -> Boolean
19398 *
19399 * Return true if parsed source ended by +\_\_END\_\_+.
19400 */
19401VALUE
19403{
19404 struct parser_params *p;
19405
19406 TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, p);
19407 return p->ruby__end__seen ? Qtrue : Qfalse;
19408}
19409
19410/*
19411 * call-seq:
19412 * ripper.encoding -> encoding
19413 *
19414 * Return encoding of the source.
19415 */
19416VALUE
19418{
19419 struct parser_params *p;
19420
19421 TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, p);
19422 return rb_enc_from_encoding(p->enc);
19423}
19424
19425#ifdef RIPPER
19426/*
19427 * call-seq:
19428 * ripper.yydebug -> true or false
19429 *
19430 * Get yydebug.
19431 */
19432VALUE
19433rb_parser_get_yydebug(VALUE self)
19434{
19435 struct parser_params *p;
19436
19437 TypedData_Get_Struct(self, struct parser_params, &parser_data_type, p);
19438 return p->debug ? Qtrue : Qfalse;
19439}
19440#endif
19441
19442/*
19443 * call-seq:
19444 * ripper.yydebug = flag
19445 *
19446 * Set yydebug.
19447 */
19448VALUE
19450{
19451 struct parser_params *p;
19452
19453 TypedData_Get_Struct(self, struct parser_params, &parser_data_type, p);
19454 p->debug = RTEST(flag);
19455 return flag;
19456}
19457
19458/*
19459 * call-seq:
19460 * ripper.debug_output -> obj
19461 *
19462 * Get debug output.
19463 */
19464VALUE
19466{
19467 struct parser_params *p;
19468
19469 TypedData_Get_Struct(self, struct parser_params, &parser_data_type, p);
19470 return p->debug_output;
19471}
19472
19473/*
19474 * call-seq:
19475 * ripper.debug_output = obj
19476 *
19477 * Set debug output.
19478 */
19479VALUE
19481{
19482 struct parser_params *p;
19483
19484 TypedData_Get_Struct(self, struct parser_params, &parser_data_type, p);
19485 return p->debug_output = output;
19486}
19487
19488#ifndef RIPPER
19489#ifdef YYMALLOC
19490#define HEAPCNT(n, size) ((n) * (size) / sizeof(YYSTYPE))
19491/* Keep the order; NEWHEAP then xmalloc and ADD2HEAP to get rid of
19492 * potential memory leak */
19493#define NEWHEAP() rb_imemo_tmpbuf_parser_heap(0, p->heap, 0)
19494#define ADD2HEAP(new, cnt, ptr) ((p->heap = (new))->ptr = (ptr), \
19495 (new)->cnt = (cnt), (ptr))
19496
19497void *
19499{
19500 size_t cnt = HEAPCNT(1, size);
19502 void *ptr = xmalloc(size);
19503
19504 return ADD2HEAP(n, cnt, ptr);
19505}
19506
19507void *
19508rb_parser_calloc(struct parser_params *p, size_t nelem, size_t size)
19509{
19510 size_t cnt = HEAPCNT(nelem, size);
19512 void *ptr = xcalloc(nelem, size);
19513
19514 return ADD2HEAP(n, cnt, ptr);
19515}
19516
19517void *
19518rb_parser_realloc(struct parser_params *p, void *ptr, size_t size)
19519{
19521 size_t cnt = HEAPCNT(1, size);
19522
19523 if (ptr && (n = p->heap) != NULL) {
19524 do {
19525 if (n->ptr == ptr) {
19526 n->ptr = ptr = xrealloc(ptr, size);
19527 if (n->cnt) n->cnt = cnt;
19528 return ptr;
19529 }
19530 } while ((n = n->next) != NULL);
19531 }
19532 n = NEWHEAP();
19533 ptr = xrealloc(ptr, size);
19534 return ADD2HEAP(n, cnt, ptr);
19535}
19536
19537void
19539{
19540 rb_imemo_tmpbuf_t **prev = &p->heap, *n;
19541
19542 while ((n = *prev) != NULL) {
19543 if (n->ptr == ptr) {
19544 *prev = n->next;
19546 break;
19547 }
19548 prev = &n->next;
19549 }
19550 xfree(ptr);
19551}
19552#endif
19553
19554void
19555rb_parser_printf(struct parser_params *p, const char *fmt, ...)
19556{
19557 va_list ap;
19558 VALUE mesg = p->debug_buffer;
19559
19560 if (NIL_P(mesg)) p->debug_buffer = mesg = rb_str_new(0, 0);
19561 va_start(ap, fmt);
19562 rb_str_vcatf(mesg, fmt, ap);
19563 va_end(ap);
19564 if (RSTRING_END(mesg)[-1] == '\n') {
19565 rb_io_write(p->debug_output, mesg);
19566 p->debug_buffer = Qnil;
19567 }
19568}
19569
19570static void
19571parser_compile_error(struct parser_params *p, const char *fmt, ...)
19572{
19573 va_list ap;
19574
19576 p->error_p = 1;
19577 va_start(ap, fmt);
19578 p->error_buffer =
19581 p->ruby_sourceline,
19582 rb_long2int(p->lex.pcur - p->lex.pbeg),
19583 p->enc, fmt, ap);
19584 va_end(ap);
19585}
19586
19587static size_t
19588count_char(const char *str, int c)
19589{
19590 int n = 0;
19591 while (str[n] == c) ++n;
19592 return n;
19593}
19594
19595/*
19596 * strip enclosing double-quotes, same as the default yytnamerr except
19597 * for that single-quotes matching back-quotes do not stop stripping.
19598 *
19599 * "\"`class' keyword\"" => "`class' keyword"
19600 */
19601RUBY_FUNC_EXPORTED size_t
19602rb_yytnamerr(struct parser_params *p, char *yyres, const char *yystr)
19603{
19604 if (*yystr == '"') {
19605 size_t yyn = 0, bquote = 0;
19606 const char *yyp = yystr;
19607
19608 while (*++yyp) {
19609 switch (*yyp) {
19610 case '`':
19611 if (!bquote) {
19612 bquote = count_char(yyp+1, '`') + 1;
19613 if (yyres) memcpy(&yyres[yyn], yyp, bquote);
19614 yyn += bquote;
19615 yyp += bquote - 1;
19616 break;
19617 }
19618 goto default_char;
19619
19620 case '\'':
19621 if (bquote && count_char(yyp+1, '\'') + 1 == bquote) {
19622 if (yyres) memcpy(yyres + yyn, yyp, bquote);
19623 yyn += bquote;
19624 yyp += bquote - 1;
19625 bquote = 0;
19626 break;
19627 }
19628 if (yyp[1] && yyp[1] != '\'' && yyp[2] == '\'') {
19629 if (yyres) memcpy(yyres + yyn, yyp, 3);
19630 yyn += 3;
19631 yyp += 2;
19632 break;
19633 }
19634 goto do_not_strip_quotes;
19635
19636 case ',':
19637 goto do_not_strip_quotes;
19638
19639 case '\\':
19640 if (*++yyp != '\\')
19641 goto do_not_strip_quotes;
19642 /* Fall through. */
19643 default_char:
19644 default:
19645 if (yyres)
19646 yyres[yyn] = *yyp;
19647 yyn++;
19648 break;
19649
19650 case '"':
19651 case '\0':
19652 if (yyres)
19653 yyres[yyn] = '\0';
19654 return yyn;
19655 }
19656 }
19657 do_not_strip_quotes: ;
19658 }
19659
19660 if (!yyres) return strlen(yystr);
19661
19662 return (YYSIZE_T)(yystpcpy(yyres, yystr) - yyres);
19663}
19664#endif
19665
19666#ifdef RIPPER
19667#ifdef RIPPER_DEBUG
19668/* :nodoc: */
19669static VALUE
19670ripper_validate_object(VALUE self, VALUE x)
19671{
19672 if (x == Qfalse) return x;
19673 if (x == Qtrue) return x;
19674 if (x == Qnil) return x;
19675 if (x == Qundef)
19676 rb_raise(rb_eArgError, "Qundef given");
19677 if (FIXNUM_P(x)) return x;
19678 if (SYMBOL_P(x)) return x;
19679 switch (BUILTIN_TYPE(x)) {
19680 case T_STRING:
19681 case T_OBJECT:
19682 case T_ARRAY:
19683 case T_BIGNUM:
19684 case T_FLOAT:
19685 case T_COMPLEX:
19686 case T_RATIONAL:
19687 break;
19688 case T_NODE:
19689 if (nd_type((NODE *)x) != NODE_RIPPER) {
19690 rb_raise(rb_eArgError, "NODE given: %p", (void *)x);
19691 }
19692 x = ((NODE *)x)->nd_rval;
19693 break;
19694 default:
19695 rb_raise(rb_eArgError, "wrong type of ruby object: %p (%s)",
19696 (void *)x, rb_obj_classname(x));
19697 }
19698 if (!RBASIC_CLASS(x)) {
19699 rb_raise(rb_eArgError, "hidden ruby object: %p (%s)",
19700 (void *)x, rb_builtin_type_name(TYPE(x)));
19701 }
19702 return x;
19703}
19704#endif
19705
19706#define validate(x) ((x) = get_value(x))
19707
19708static VALUE
19709ripper_dispatch0(struct parser_params *p, ID mid)
19710{
19711 return rb_funcall(p->value, mid, 0);
19712}
19713
19714static VALUE
19715ripper_dispatch1(struct parser_params *p, ID mid, VALUE a)
19716{
19717 validate(a);
19718 return rb_funcall(p->value, mid, 1, a);
19719}
19720
19721static VALUE
19722ripper_dispatch2(struct parser_params *p, ID mid, VALUE a, VALUE b)
19723{
19724 validate(a);
19725 validate(b);
19726 return rb_funcall(p->value, mid, 2, a, b);
19727}
19728
19729static VALUE
19730ripper_dispatch3(struct parser_params *p, ID mid, VALUE a, VALUE b, VALUE c)
19731{
19732 validate(a);
19733 validate(b);
19734 validate(c);
19735 return rb_funcall(p->value, mid, 3, a, b, c);
19736}
19737
19738static VALUE
19739ripper_dispatch4(struct parser_params *p, ID mid, VALUE a, VALUE b, VALUE c, VALUE d)
19740{
19741 validate(a);
19742 validate(b);
19743 validate(c);
19744 validate(d);
19745 return rb_funcall(p->value, mid, 4, a, b, c, d);
19746}
19747
19748static VALUE
19749ripper_dispatch5(struct parser_params *p, ID mid, VALUE a, VALUE b, VALUE c, VALUE d, VALUE e)
19750{
19751 validate(a);
19752 validate(b);
19753 validate(c);
19754 validate(d);
19755 validate(e);
19756 return rb_funcall(p->value, mid, 5, a, b, c, d, e);
19757}
19758
19759static VALUE
19760ripper_dispatch7(struct parser_params *p, ID mid, VALUE a, VALUE b, VALUE c, VALUE d, VALUE e, VALUE f, VALUE g)
19761{
19762 validate(a);
19763 validate(b);
19764 validate(c);
19765 validate(d);
19766 validate(e);
19767 validate(f);
19768 validate(g);
19769 return rb_funcall(p->value, mid, 7, a, b, c, d, e, f, g);
19770}
19771
19772static ID
19773ripper_get_id(VALUE v)
19774{
19775 NODE *nd;
19776 if (!RB_TYPE_P(v, T_NODE)) return 0;
19777 nd = (NODE *)v;
19778 if (nd_type(nd) != NODE_RIPPER) return 0;
19779 return nd->nd_vid;
19780}
19781
19782static VALUE
19783ripper_get_value(VALUE v)
19784{
19785 NODE *nd;
19786 if (v == Qundef) return Qnil;
19787 if (!RB_TYPE_P(v, T_NODE)) return v;
19788 nd = (NODE *)v;
19789 if (nd_type(nd) != NODE_RIPPER) return Qnil;
19790 return nd->nd_rval;
19791}
19792
19793static void
19794ripper_error(struct parser_params *p)
19795{
19796 p->error_p = TRUE;
19797}
19798
19799static void
19800ripper_compile_error(struct parser_params *p, const char *fmt, ...)
19801{
19802 VALUE str;
19803 va_list args;
19804
19805 va_start(args, fmt);
19806 str = rb_vsprintf(fmt, args);
19807 va_end(args);
19808 rb_funcall(p->value, rb_intern("compile_error"), 1, str);
19809 ripper_error(p);
19810}
19811
19812static VALUE
19813ripper_lex_get_generic(struct parser_params *p, VALUE src)
19814{
19815 VALUE line = rb_funcallv_public(src, id_gets, 0, 0);
19816 if (!NIL_P(line) && !RB_TYPE_P(line, T_STRING)) {
19818 "gets returned %"PRIsVALUE" (expected String or nil)",
19819 rb_obj_class(line));
19820 }
19821 return line;
19822}
19823
19824static VALUE
19825ripper_lex_io_get(struct parser_params *p, VALUE src)
19826{
19827 return rb_io_gets(src);
19828}
19829
19830static VALUE
19831ripper_s_allocate(VALUE klass)
19832{
19833 struct parser_params *p;
19835 &parser_data_type, p);
19836 p->value = self;
19837 return self;
19838}
19839
19840#define ripper_initialized_p(r) ((r)->lex.input != 0)
19841
19842/*
19843 * call-seq:
19844 * Ripper.new(src, filename="(ripper)", lineno=1) -> ripper
19845 *
19846 * Create a new Ripper object.
19847 * _src_ must be a String, an IO, or an Object which has #gets method.
19848 *
19849 * This method does not starts parsing.
19850 * See also Ripper#parse and Ripper.parse.
19851 */
19852static VALUE
19853ripper_initialize(int argc, VALUE *argv, VALUE self)
19854{
19855 struct parser_params *p;
19856 VALUE src, fname, lineno;
19857
19858 TypedData_Get_Struct(self, struct parser_params, &parser_data_type, p);
19859 rb_scan_args(argc, argv, "12", &src, &fname, &lineno);
19860 if (RB_TYPE_P(src, T_FILE)) {
19861 p->lex.gets = ripper_lex_io_get;
19862 }
19863 else if (rb_respond_to(src, id_gets)) {
19864 p->lex.gets = ripper_lex_get_generic;
19865 }
19866 else {
19868 p->lex.gets = lex_get_str;
19869 }
19870 p->lex.input = src;
19871 p->eofp = 0;
19872 if (NIL_P(fname)) {
19873 fname = STR_NEW2("(ripper)");
19874 OBJ_FREEZE(fname);
19875 }
19876 else {
19877 StringValueCStr(fname);
19878 fname = rb_str_new_frozen(fname);
19879 }
19880 parser_initialize(p);
19881
19882 p->ruby_sourcefile_string = fname;
19883 p->ruby_sourcefile = RSTRING_PTR(fname);
19884 p->ruby_sourceline = NIL_P(lineno) ? 0 : NUM2INT(lineno) - 1;
19885
19886 return Qnil;
19887}
19888
19889static VALUE
19890ripper_parse0(VALUE parser_v)
19891{
19892 struct parser_params *p;
19893
19894 TypedData_Get_Struct(parser_v, struct parser_params, &parser_data_type, p);
19895 parser_prepare(p);
19896 p->ast = rb_ast_new();
19897 ripper_yyparse((void*)p);
19898 rb_ast_dispose(p->ast);
19899 p->ast = 0;
19900 return p->result;
19901}
19902
19903static VALUE
19904ripper_ensure(VALUE parser_v)
19905{
19906 struct parser_params *p;
19907
19908 TypedData_Get_Struct(parser_v, struct parser_params, &parser_data_type, p);
19909 p->parsing_thread = Qnil;
19910 return Qnil;
19911}
19912
19913/*
19914 * call-seq:
19915 * ripper.parse
19916 *
19917 * Start parsing and returns the value of the root action.
19918 */
19919static VALUE
19920ripper_parse(VALUE self)
19921{
19922 struct parser_params *p;
19923
19924 TypedData_Get_Struct(self, struct parser_params, &parser_data_type, p);
19925 if (!ripper_initialized_p(p)) {
19926 rb_raise(rb_eArgError, "method called for uninitialized object");
19927 }
19928 if (!NIL_P(p->parsing_thread)) {
19929 if (p->parsing_thread == rb_thread_current())
19930 rb_raise(rb_eArgError, "Ripper#parse is not reentrant");
19931 else
19932 rb_raise(rb_eArgError, "Ripper#parse is not multithread-safe");
19933 }
19934 p->parsing_thread = rb_thread_current();
19935 rb_ensure(ripper_parse0, self, ripper_ensure, self);
19936
19937 return p->result;
19938}
19939
19940/*
19941 * call-seq:
19942 * ripper.column -> Integer
19943 *
19944 * Return column number of current parsing line.
19945 * This number starts from 0.
19946 */
19947static VALUE
19948ripper_column(VALUE self)
19949{
19950 struct parser_params *p;
19951 long col;
19952
19953 TypedData_Get_Struct(self, struct parser_params, &parser_data_type, p);
19954 if (!ripper_initialized_p(p)) {
19955 rb_raise(rb_eArgError, "method called for uninitialized object");
19956 }
19957 if (NIL_P(p->parsing_thread)) return Qnil;
19958 col = p->lex.ptok - p->lex.pbeg;
19959 return LONG2NUM(col);
19960}
19961
19962/*
19963 * call-seq:
19964 * ripper.filename -> String
19965 *
19966 * Return current parsing filename.
19967 */
19968static VALUE
19969ripper_filename(VALUE self)
19970{
19971 struct parser_params *p;
19972
19973 TypedData_Get_Struct(self, struct parser_params, &parser_data_type, p);
19974 if (!ripper_initialized_p(p)) {
19975 rb_raise(rb_eArgError, "method called for uninitialized object");
19976 }
19977 return p->ruby_sourcefile_string;
19978}
19979
19980/*
19981 * call-seq:
19982 * ripper.lineno -> Integer
19983 *
19984 * Return line number of current parsing line.
19985 * This number starts from 1.
19986 */
19987static VALUE
19988ripper_lineno(VALUE self)
19989{
19990 struct parser_params *p;
19991
19992 TypedData_Get_Struct(self, struct parser_params, &parser_data_type, p);
19993 if (!ripper_initialized_p(p)) {
19994 rb_raise(rb_eArgError, "method called for uninitialized object");
19995 }
19996 if (NIL_P(p->parsing_thread)) return Qnil;
19997 return INT2NUM(p->ruby_sourceline);
19998}
19999
20000/*
20001 * call-seq:
20002 * ripper.state -> Integer
20003 *
20004 * Return scanner state of current token.
20005 */
20006static VALUE
20007ripper_state(VALUE self)
20008{
20009 struct parser_params *p;
20010
20011 TypedData_Get_Struct(self, struct parser_params, &parser_data_type, p);
20012 if (!ripper_initialized_p(p)) {
20013 rb_raise(rb_eArgError, "method called for uninitialized object");
20014 }
20015 if (NIL_P(p->parsing_thread)) return Qnil;
20016 return INT2NUM(p->lex.state);
20017}
20018
20019/*
20020 * call-seq:
20021 * ripper.token -> String
20022 *
20023 * Return the current token string.
20024 */
20025static VALUE
20026ripper_token(VALUE self)
20027{
20028 struct parser_params *p;
20029 long pos, len;
20030
20031 TypedData_Get_Struct(self, struct parser_params, &parser_data_type, p);
20032 if (!ripper_initialized_p(p)) {
20033 rb_raise(rb_eArgError, "method called for uninitialized object");
20034 }
20035 if (NIL_P(p->parsing_thread)) return Qnil;
20036 pos = p->lex.ptok - p->lex.pbeg;
20037 len = p->lex.pcur - p->lex.ptok;
20038 return rb_str_subseq(p->lex.lastline, pos, len);
20039}
20040
20041#ifdef RIPPER_DEBUG
20042/* :nodoc: */
20043static VALUE
20044ripper_assert_Qundef(VALUE self, VALUE obj, VALUE msg)
20045{
20046 StringValue(msg);
20047 if (obj == Qundef) {
20049 }
20050 return Qnil;
20051}
20052
20053/* :nodoc: */
20054static VALUE
20055ripper_value(VALUE self, VALUE obj)
20056{
20057 return ULONG2NUM(obj);
20058}
20059#endif
20060
20061/*
20062 * call-seq:
20063 * Ripper.lex_state_name(integer) -> string
20064 *
20065 * Returns a string representation of lex_state.
20066 */
20067static VALUE
20068ripper_lex_state_name(VALUE self, VALUE state)
20069{
20071}
20072
20073void
20074Init_ripper(void)
20075{
20076 ripper_init_eventids1();
20077 ripper_init_eventids2();
20078 id_warn = rb_intern_const("warn");
20079 id_warning = rb_intern_const("warning");
20080 id_gets = rb_intern_const("gets");
20081 id_assoc = rb_intern_const("=>");
20082
20083 (void)yystpcpy; /* may not used in newer bison */
20084
20085 InitVM(ripper);
20086}
20087
20088void
20089InitVM_ripper(void)
20090{
20091 VALUE Ripper;
20092
20093 Ripper = rb_define_class("Ripper", rb_cObject);
20094 /* version of Ripper */
20095 rb_define_const(Ripper, "Version", rb_usascii_str_new2(RIPPER_VERSION));
20096 rb_define_alloc_func(Ripper, ripper_s_allocate);
20097 rb_define_method(Ripper, "initialize", ripper_initialize, -1);
20098 rb_define_method(Ripper, "parse", ripper_parse, 0);
20099 rb_define_method(Ripper, "column", ripper_column, 0);
20100 rb_define_method(Ripper, "filename", ripper_filename, 0);
20101 rb_define_method(Ripper, "lineno", ripper_lineno, 0);
20102 rb_define_method(Ripper, "state", ripper_state, 0);
20103 rb_define_method(Ripper, "token", ripper_token, 0);
20104 rb_define_method(Ripper, "end_seen?", rb_parser_end_seen_p, 0);
20105 rb_define_method(Ripper, "encoding", rb_parser_encoding, 0);
20106 rb_define_method(Ripper, "yydebug", rb_parser_get_yydebug, 0);
20107 rb_define_method(Ripper, "yydebug=", rb_parser_set_yydebug, 1);
20108 rb_define_method(Ripper, "debug_output", rb_parser_get_debug_output, 0);
20109 rb_define_method(Ripper, "debug_output=", rb_parser_set_debug_output, 1);
20110 rb_define_method(Ripper, "error?", ripper_error_p, 0);
20111#ifdef RIPPER_DEBUG
20112 rb_define_method(Ripper, "assert_Qundef", ripper_assert_Qundef, 2);
20113 rb_define_method(Ripper, "rawVALUE", ripper_value, 1);
20114 rb_define_method(Ripper, "validate_object", ripper_validate_object, 1);
20115#endif
20116
20117 rb_define_singleton_method(Ripper, "dedent_string", parser_dedent_string, 2);
20118 rb_define_private_method(Ripper, "dedent_string", parser_dedent_string, 2);
20119
20120 rb_define_singleton_method(Ripper, "lex_state_name", ripper_lex_state_name, 1);
20121
20122<% @exprs.each do |expr, desc| -%>
20123 /* <%=desc%> */
20124 rb_define_const(Ripper, "<%=expr%>", INT2NUM(<%=expr%>));
20125<% end %>
20126 ripper_init_eventids1_table(Ripper);
20127 ripper_init_eventids2_table(Ripper);
20128
20129# if 0
20130 /* Hack to let RDoc document SCRIPT_LINES__ */
20131
20132 /*
20133 * When a Hash is assigned to +SCRIPT_LINES__+ the contents of files loaded
20134 * after the assignment will be added as an Array of lines with the file
20135 * name as the key.
20136 */
20137 rb_define_global_const("SCRIPT_LINES__", Qnil);
20138#endif
20139
20140}
20141#endif /* RIPPER */
20142
20143/*
20144 * Local variables:
20145 * mode: c
20146 * c-file-style: "ruby"
20147 * End:
20148 */
int errno
#define END(name)
Definition: asm.h:115
int main(void)
Definition: closure_fn0.c:49
enum @73::@75::@76 mask
struct RIMemo * ptr
Definition: debug.c:65
#define free(x)
Definition: dln.c:52
struct rb_encoding_entry * list
Definition: encoding.c:56
int rb_enc_precise_mbclen(const char *p, const char *e, rb_encoding *enc)
Definition: encoding.c:1032
VALUE rb_enc_associate(VALUE obj, rb_encoding *enc)
Definition: encoding.c:866
rb_encoding * rb_utf8_encoding(void)
Definition: encoding.c:1328
rb_encoding * rb_ascii8bit_encoding(void)
Definition: encoding.c:1316
rb_encoding * rb_enc_from_index(int index)
Definition: encoding.c:609
rb_encoding * rb_enc_get(VALUE obj)
Definition: encoding.c:872
int rb_ascii8bit_encindex(void)
Definition: encoding.c:1322
rb_encoding * rb_enc_compatible(VALUE str1, VALUE str2)
Definition: encoding.c:974
rb_encoding * rb_usascii_encoding(void)
Definition: encoding.c:1340
VALUE rb_enc_from_encoding(rb_encoding *encoding)
Definition: encoding.c:116
VALUE rb_enc_associate_index(VALUE obj, int idx)
Definition: encoding.c:838
int rb_enc_find_index(const char *name)
Definition: encoding.c:693
int rb_enc_codelen(int c, rb_encoding *enc)
Definition: encoding.c:1089
#define ENC_CODERANGE_7BIT
Definition: encoding.h:104
#define rb_enc_mbcput(c, buf, enc)
Definition: encoding.h:217
#define rb_enc_prev_char(s, p, e, enc)
Definition: encoding.h:220
int rb_enc_str_coderange(VALUE)
Definition: string.c:657
#define ENC_CODERANGE_UNKNOWN
Definition: encoding.h:103
VALUE rb_enc_str_new(const char *, long, rb_encoding *)
Definition: string.c:796
#define rb_enc_name(enc)
Definition: encoding.h:177
#define ENCODING_GET(obj)
Definition: encoding.h:62
VALUE rb_enc_str_buf_cat(VALUE str, const char *ptr, long len, rb_encoding *enc)
Definition: string.c:2919
#define rb_enc_asciicompat(enc)
Definition: encoding.h:245
#define rb_enc_isalnum(c, enc)
Definition: encoding.h:235
int rb_char_to_option_kcode(int c, int *option, int *kcode)
Definition: re.c:319
long rb_str_coderange_scan_restartable(const char *, const char *, rb_encoding *, int *)
Definition: string.c:567
#define MBCLEN_CHARFOUND_P(ret)
Definition: encoding.h:191
#define ENCODING_SET(obj, i)
Definition: encoding.h:60
#define ENCODING_IS_ASCII8BIT(obj)
Definition: encoding.h:63
#define rb_enc_isspace(c, enc)
Definition: encoding.h:237
char str[HTML_ESCAPE_MAX_LEN+1]
Definition: escape.c:18
@ tHEREDOC_END
Definition: eventids2.c:8
@ tEMBDOC
Definition: eventids2.c:5
@ tEMBDOC_END
Definition: eventids2.c:6
@ tIGNORED_NL
Definition: eventids2.c:2
@ k__END__
Definition: eventids2.c:9
@ tHEREDOC_BEG
Definition: eventids2.c:7
@ tEMBDOC_BEG
Definition: eventids2.c:4
@ tCOMMENT
Definition: eventids2.c:3
#define rb_intern_str(string)
Definition: generator.h:16
VALUE rb_define_class(const char *, VALUE)
Defines a top-level class.
Definition: class.c:662
VALUE rb_cObject
Object class.
Definition: ruby.h:2012
VALUE rb_syntax_error_append(VALUE exc, VALUE file, int line, int column, rb_encoding *enc, const char *fmt, va_list args)
Definition: error.c:104
void rb_raise(VALUE exc, const char *fmt,...)
Definition: error.c:2671
_Bool rb_warning_category_enabled_p(rb_warning_category_t category)
Definition: error.c:166
void rb_exc_raise(VALUE mesg)
Raises an exception in the current thread.
Definition: eval.c:668
void rb_set_errinfo(VALUE err)
Sets the current exception ($!) to the given value.
Definition: eval.c:1896
const char * rb_builtin_type_name(int t)
Definition: error.c:763
VALUE rb_eTypeError
Definition: error.c:924
void rb_fatal(const char *fmt,...)
Definition: error.c:2722
const char * rb_builtin_class_name(VALUE x)
Definition: error.c:799
VALUE rb_make_exception(int, const VALUE *)
Make an Exception object from the list of arguments in a manner similar to Kernel#raise.
Definition: eval.c:851
VALUE rb_eRuntimeError
Definition: error.c:922
VALUE rb_eArgError
Definition: error.c:925
VALUE rb_ensure(VALUE(*)(VALUE), VALUE, VALUE(*)(VALUE), VALUE)
An equivalent to ensure clause.
Definition: eval.c:1115
VALUE rb_errinfo(void)
The current exception in the current thread.
Definition: eval.c:1882
VALUE rb_eSyntaxError
Definition: error.c:940
VALUE rb_class_new_instance(int, const VALUE *, VALUE)
Allocates and initializes an instance of klass.
Definition: object.c:1955
VALUE rb_obj_hide(VALUE obj)
Make the object invisible from Ruby code.
Definition: object.c:78
VALUE rb_obj_class(VALUE)
Equivalent to Object#class in Ruby.
Definition: object.c:217
VALUE rb_obj_freeze(VALUE)
Make the object unmodifiable.
Definition: object.c:1080
const char term
Definition: id.c:37
unsigned short token
Definition: id.c:36
VALUE type(ANYARGS)
ANYARGS-ed function type.
Definition: cxxanyargs.hpp:39
unsigned int input
Definition: nkf.c:4325
const char * name
Definition: nkf.c:208
unsigned int last
Definition: nkf.c:4324
unsigned char OnigUChar
Definition: onigmo.h:79
ONIG_EXTERN int onig_foreach_name(OnigRegex reg, int(*func)(const OnigUChar *, const OnigUChar *, int, int *, OnigRegex, void *), void *arg)
#define RE_OPTION_ENCODING(e)
Definition: parse.c:707
enum lex_state_e rb_parser_trace_lex_state(struct parser_params *, enum lex_state_e, enum lex_state_e, int)
Definition: parse.c:17209
#define NUM_SUFFIX_I
Definition: parse.c:14315
#define HERETERM_LENGTH_BITS
Definition: parse.c:733
#define Qnull
Definition: parse.c:946
void rb_parser_fatal(struct parser_params *p, const char *fmt,...)
Definition: parse.c:17252
#define yyerror0(msg)
Definition: parse.c:418
#define DEF_EXPR(n)
Definition: parse.c:156
#define dispatch_delayed_token(p, t)
Definition: parse.c:12407
#define IS_LABEL_POSSIBLE()
Definition: parse.c:13959
#define has_delayed_token(p)
Definition: parse.c:12408
#define set_yylval_name(x)
Definition: parse.c:12384
#define DVARS_TOPSCOPE
Definition: parse.c:252
#define idFWD_REST
Definition: parse.c:697
#define YY_LOCATION_PRINT(File, loc)
Definition: parse.c:108
#define IS_BEG()
Definition: parse.c:13957
#define DVARS_TERMINAL_P(tbl)
Definition: parse.c:253
#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
Definition: parse.c:1392
#define YYMAXDEPTH
Definition: parse.c:5482
#define STR_NEW2(ptr)
Definition: parse.c:383
VALUE rb_parser_new(void)
Definition: parse.c:19344
#define RUBY_DTRACE_PARSE_HOOK(name)
#define YYSTACK_FREE
Definition: parse.c:1454
#define YY_SYMBOL_PRINT(Title, Type, Value, Location)
Definition: parse.c:5350
#define STR_FUNC_QWORDS
Definition: parse.c:13068
#define DVARS_INHERIT
Definition: parse.c:251
#define LVAR_USED
Definition: parse.c:16434
#define yyerrok
Definition: parse.c:5230
#define add_delayed_token(p, tok, end)
Definition: parse.c:13128
#define STRTERM_HEREDOC
Definition: parse.c:757
#define YY_ASSERT(E)
Definition: parse.c:1412
#define NUMPARAM_ID_P(id)
Definition: parse.c:239
#define str_copy(_s, _p, _n)
#define YY_(Msgid)
Definition: parse.c:1353
#define get_value(val)
Definition: parse.c:592
#define SWITCH_BY_COND_TYPE(t, w, arg)
Definition: parse.c:17989
#define make_list(list, loc)
Definition: parse.c:571
#define rb_warn1L(l, fmt, a)
Definition: parse.c:965
void * rb_parser_malloc(struct parser_params *p, size_t size)
Definition: parse.c:19498
#define dispatch_heredoc_end(p)
Definition: parse.c:14386
#define YY_IGNORE_MAYBE_UNINITIALIZED_END
Definition: parse.c:1393
#define YYNSTATES
Definition: parse.c:1557
#define YYPRINT(out, tok, val)
Definition: parse.c:107
VALUE rb_io_gets_internal(VALUE io)
Definition: io.c:3583
rb_ast_t * rb_parser_compile_string(VALUE vparser, const char *f, VALUE s, int line)
Definition: parse.c:13009
void(* rb_magic_comment_setter_t)(struct parser_params *p, const char *name, const char *val)
Definition: parse.c:14673
#define NEW_STRTERM(func, term, paren)
Definition: parse.c:13870
STATIC_ASSERT(rb_strterm_heredoc_t, sizeof(rb_strterm_heredoc_t)<=4 *SIZEOF_VALUE)
#define YY_IGNORE_USELESS_CAST_END
Definition: parse.c:1408
#define lex_goto_eol(p)
Definition: parse.c:13104
short yytype_int16
Definition: parse.c:1277
@ NUMPARAM_MAX
Definition: parse.c:236
@ ORDINAL_PARAM
Definition: parse.c:234
@ NO_PARAM
Definition: parse.c:235
#define YYUSE(E)
Definition: parse.c:1375
#define literal_flush(p, ptr)
Definition: parse.c:12405
#define IS_END()
Definition: parse.c:13956
#define RE_OPTION_MASK
Definition: parse.c:710
#define yyerror(yylloc, p, msg)
Definition: parse.c:420
struct token_info token_info
void rb_parser_printf(struct parser_params *p, const char *fmt,...)
Definition: parse.c:19555
#define WARN_S(s)
Definition: parse.c:1000
#define tok(p)
Definition: parse.c:13214
#define KWD2EID(t, v)
Definition: parse.c:941
#define ESCAPE_CONTROL
Definition: parse.c:13420
#define YYEOF
Definition: parse.c:5233
#define YYABORT
Definition: parse.c:5236
#define idFWD_KWREST
Definition: parse.c:701
#define tokcopy(p, n)
Definition: parse.c:13284
#define PRIsWARN
Definition: parse.c:1004
#define YYSTACK_BYTES(N)
Definition: parse.c:1500
@ EXPR_END_ANY
Definition: parse.c:173
@ EXPR_VALUE
Definition: parse.c:170
@ EXPR_NONE
Definition: parse.c:174
@ EXPR_BEG_ANY
Definition: parse.c:171
@ EXPR_ARG_ANY
Definition: parse.c:172
#define IS_lex_state(ls)
Definition: parse.c:178
YYLTYPE * rb_parser_set_location(struct parser_params *p, YYLTYPE *yylloc)
Definition: parse.c:17303
yytype_int16 yy_state_t
Definition: parse.c:1340
#define WARN_SPACE_CHAR(c, prefix)
Definition: parse.c:13313
#define YYLLOC_DEFAULT(Current, Rhs, N)
Definition: parse.c:112
#define intern_cstr(n, l, en)
Definition: parse.c:379
#define TAB_WIDTH
Definition: parse.c:98
#define CMDARG_POP()
Definition: parse.c:207
#define YY_REDUCE_PRINT(Rule)
Definition: parse.c:5450
rb_ast_t * rb_parser_compile_string_path(VALUE vparser, VALUE f, VALUE s, int line)
Definition: parse.c:13015
#define YY_CAST(Type, Val)
Definition: parse.c:1033
void rb_parser_set_options(VALUE vparser, int print, int loop, int chomp, int split)
Definition: parse.c:19156
#define vtable_alloc(prev)
Definition: parse.c:12756
VALUE rb_parser_set_context(VALUE vparser, const struct rb_iseq_struct *base, int main)
Definition: parse.c:19354
RUBY_SYMBOL_EXPORT_BEGIN VALUE rb_parser_reg_compile(struct parser_params *p, VALUE str, int options)
Definition: parse.c:19115
#define was_bol(p)
Definition: parse.c:13211
#define IS_lex_state_for(x, ls)
Definition: parse.c:176
#define WARN_S_L(s, l)
Definition: parse.c:999
#define dispatch_scan_event(p, t)
Definition: parse.c:12406
#define YYCASE_(N, S)
#define set_yylval_id(x)
Definition: parse.c:12383
#define NUM_SUFFIX_R
Definition: parse.c:14314
#define NEW_QCALL(q, r, m, a, loc)
Definition: parse.c:433
long(* rb_magic_comment_length_t)(struct parser_params *p, const char *name, long len)
Definition: parse.c:14672
#define warn_balanced(tok, op, syn)
Definition: parse.c:14968
#define YY_NULLPTR
Definition: parse.c:1045
RUBY_FUNC_EXPORTED const unsigned int ruby_global_name_punct_bits[(0x7e - 0x20+31)/32]
Definition: parse.c:13898
#define RE_OPTION_ENCODING_NONE(o)
Definition: parse.c:709
YYLTYPE * rb_parser_set_location_from_strterm_heredoc(struct parser_params *p, rb_strterm_heredoc_t *here, YYLTYPE *yylloc)
Definition: parse.c:17278
#define STR_FUNC_TERM
Definition: parse.c:13073
#define set_yylval_literal(x)
Definition: parse.c:12377
#define set_yylval_str(x)
Definition: parse.c:12372
#define YYFINAL
Definition: parse.c:1546
#define WARN_LOCATION(type)
Definition: parse.c:16837
rb_ast_t * rb_parser_compile_generic(VALUE vparser, VALUE(*lex_gets)(VALUE, int), VALUE fname, VALUE input, int start)
Definition: parse.c:13050
#define RUBY_INIT_YYLLOC()
Definition: parse.c:132
void rb_init_parse(void)
Definition: parse.c:19209
#define YY_INITIAL_VALUE(Value)
Definition: parse.c:1389
#define TOK_INTERN()
Definition: parse.c:385
#define vtable_free(tbl)
Definition: parse.c:12774
#define CALL_Q_P(q)
Definition: parse.c:431
#define yyparse
Definition: parse.c:487
#define STR_NEW3(ptr, len, e, func)
Definition: parse.c:384
#define yylval
Definition: parse.c:12358
#define YYNTOKENS
Definition: parse.c:1551
VALUE rb_parser_encoding(VALUE vparser)
Definition: parse.c:19417
int rb_reg_fragment_setenc(struct parser_params *, VALUE, int)
Definition: parse.c:19000
#define yytnamerr(yyres, yystr)
Definition: parse.c:779
VALUE rb_parser_get_debug_output(VALUE self)
Definition: parse.c:19465
#define Qnone
Definition: parse.c:945
unsigned char yytype_uint8
Definition: parse.c:1286
#define peek(p, c)
Definition: parse.c:13107
#define YY_STACK_PRINT(Bottom, Top)
Definition: parse.c:5419
#define compile_for_eval
Definition: parse.c:426
const struct kwtable * rb_reserved_word(const char *str, unsigned int len)
Definition: parse.c:19338
@ EXPR_ENDARG_bit
Definition: parse.c:141
@ EXPR_ENDFN_bit
Definition: parse.c:142
@ EXPR_MAX_STATE
Definition: parse.c:152
@ EXPR_END_bit
Definition: parse.c:140
@ EXPR_FNAME_bit
Definition: parse.c:146
@ EXPR_LABEL_bit
Definition: parse.c:149
@ EXPR_FITEM_bit
Definition: parse.c:151
@ EXPR_CLASS_bit
Definition: parse.c:148
@ EXPR_MID_bit
Definition: parse.c:145
@ EXPR_CMDARG_bit
Definition: parse.c:144
@ EXPR_LABELED_bit
Definition: parse.c:150
@ EXPR_ARG_bit
Definition: parse.c:143
@ EXPR_DOT_bit
Definition: parse.c:147
@ EXPR_BEG_bit
Definition: parse.c:139
#define STR_NEW(ptr, len)
Definition: parse.c:381
#define lambda_beginning_p()
Definition: parse.c:435
#define YYSIZE_T
Definition: parse.c:1327
#define RUBY_SET_YYLLOC_FROM_STRTERM_HEREDOC(Current)
Definition: parse.c:126
#define YYSTACK_ALLOC_MAXIMUM
Definition: parse.c:1456
#define IS_lex_state_all(ls)
Definition: parse.c:179
#define yydebug
Definition: parse.c:100
#define NUMPARAM_IDX_TO_ID(idx)
Definition: parse.c:241
#define YY_IGNORE_USELESS_CAST_BEGIN
Definition: parse.c:1407
#define IS_SPCARG(c)
Definition: parse.c:13958
void rb_strterm_mark(VALUE obj)
Definition: parse.c:769
#define rb_warn2(fmt, a, b)
Definition: parse.c:956
void rb_parser_show_bitstack(struct parser_params *, stack_type, const char *, int)
Definition: parse.c:17242
#define IS_ARG()
Definition: parse.c:13955
#define value_expr(node)
Definition: parse.c:503
#define RE_OPTION_ONCE
Definition: parse.c:705
#define ADD2HEAP(new, cnt, ptr)
Definition: parse.c:19494
#define YYPTRDIFF_T
Definition: parse.c:1313
#define NEWHEAP()
Definition: parse.c:19493
#define WARN_EOL(tok)
Definition: parse.c:1020
#define mixed_escape(beg, enc1, enc2)
#define COND_POP()
Definition: parse.c:200
#define lex_eol_p(p)
Definition: parse.c:13105
#define RE_OPTION_ENCODING_IDX(o)
Definition: parse.c:708
#define vtable_pop(tbl, n)
Definition: parse.c:12813
#define WARN_ID(i)
Definition: parse.c:1002
#define set_yylval_noname()
Definition: parse.c:12402
size_t rb_yytnamerr(struct parser_params *p, char *yyres, const char *yystr)
Definition: parse.c:19602
void * rb_parser_realloc(struct parser_params *p, void *ptr, size_t size)
Definition: parse.c:19518
VALUE rb_parser_set_debug_output(VALUE self, VALUE output)
Definition: parse.c:19480
#define rb_warn1(fmt, a)
Definition: parse.c:955
#define set_yylval_node(x)
Definition: parse.c:12367
VALUE rb_parser_set_yydebug(VALUE self, VALUE flag)
Definition: parse.c:19449
VALUE rb_parser_end_seen_p(VALUE vparser)
Definition: parse.c:19402
#define RUBY_SET_YYLLOC(Current)
Definition: parse.c:130
#define WARN_IVAL(i)
Definition: parse.c:1003
#define YYACCEPT
Definition: parse.c:5235
#define ID2VAL(id)
Definition: parse.c:939
#define yytable_value_is_error(Yyn)
Definition: parse.c:1812
#define toklen(p)
Definition: parse.c:13215
#define new_nil(loc)
Definition: parse.c:491
struct rb_strterm_literal_struct rb_strterm_literal_t
#define YYTRANSLATE(YYX)
Definition: parse.c:1565
#define subnodes(n1, n2)
#define HERETERM_LENGTH_MAX
#define rb_warn0(fmt)
Definition: parse.c:954
YYLTYPE * rb_parser_set_location_of_none(struct parser_params *p, YYLTYPE *yylloc)
Definition: parse.c:17293
#define STR_FUNC_LIST
Definition: parse.c:13072
#define YY_ATTRIBUTE_UNUSED
Definition: parse.c:1369
#define STR_FUNC_ESCAPE
Definition: parse.c:13065
#define ifndef_ripper(x)
Definition: parse.c:947
#define STR_FUNC_SYMBOL
Definition: parse.c:13069
#define CMDARG_PUSH(n)
Definition: parse.c:206
void rb_parser_free(struct parser_params *p, void *ptr)
Definition: parse.c:19538
#define CMDARG_P()
Definition: parse.c:208
#define STR_FUNC_LABEL
Definition: parse.c:13071
#define rb_warning0(fmt)
Definition: parse.c:959
#define STR_FUNC_INDENT
Definition: parse.c:13070
#define peek_n(p, c, n)
Definition: parse.c:13108
#define COND_P()
Definition: parse.c:201
#define ESCAPE_META
Definition: parse.c:13421
PRINTF_ARGS(void rb_parser_fatal(struct parser_params *p, const char *fmt,...), 2, 3)
#define METHOD_NOT
Definition: parse.c:694
rb_ast_t * rb_parser_compile_file_path(VALUE vparser, VALUE fname, VALUE file, int start)
Definition: parse.c:13030
#define NUMPARAM_ID_TO_IDX(id)
Definition: parse.c:240
#define HEAPCNT(n, size)
Definition: parse.c:19490
void rb_parser_warn_location(VALUE vparser, int warn)
Definition: parse.c:19167
#define YYTERROR
Definition: parse.c:5260
#define YYPOPSTACK(N)
int yy_state_fast_t
Definition: parse.c:1343
#define SET_LEX_STATE(ls)
Definition: parse.c:181
#define STR_FUNC_REGEXP
Definition: parse.c:13067
#define RUBY_SET_YYLLOC_OF_NONE(Current)
Definition: parse.c:128
#define idFWD_BLOCK
Definition: parse.c:703
#define vtable_add(tbl, id)
Definition: parse.c:12796
#define WARN_I(i)
Definition: parse.c:1001
#define COND_PUSH(n)
Definition: parse.c:199
unsigned short yytype_uint16
Definition: parse.c:1297
#define token_flush(ptr)
Definition: parse.c:421
#define get_id(id)
Definition: parse.c:591
@ str_dsym
Definition: parse.c:13084
@ str_dword
Definition: parse.c:13082
@ str_label
Definition: parse.c:13076
@ str_ssym
Definition: parse.c:13083
@ str_xquote
Definition: parse.c:13079
@ str_dquote
Definition: parse.c:13078
@ str_regexp
Definition: parse.c:13080
@ str_squote
Definition: parse.c:13077
@ str_sword
Definition: parse.c:13081
#define mixed_error(enc1, enc2)
#define dyna_var(p, id)
Definition: parse.c:681
#define rb_node_newnode(type, a1, a2, a3, loc)
Definition: parse.c:463
#define IS_LABEL_SUFFIX(n)
Definition: parse.c:13962
#define nd_once_body(node)
Definition: parse.c:16775
#define yyerror1(loc, msg)
Definition: parse.c:419
#define YYEMPTY
Definition: parse.c:5232
#define tokfix(p)
Definition: parse.c:13213
#define YYLAST
Definition: parse.c:1548
#define NUM_SUFFIX_ALL
Definition: parse.c:14316
VALUE stack_type
Definition: parse.c:187
#define YYSTACK_RELOCATE(Stack_alloc, Stack)
Definition: parse.c:1512
#define yypact_value_is_default(Yyn)
Definition: parse.c:1807
@ COND_IN_COND
Definition: parse.c:17985
@ COND_IN_OP
Definition: parse.c:17984
@ COND_IN_FF
Definition: parse.c:17986
#define YYINITDEPTH
Definition: parse.c:5471
#define flush_string_content(p, enc)
Definition: parse.c:13895
#define rb_warn0L(l, fmt)
Definition: parse.c:964
#define CSI_BEGIN
#define STR_NEW0()
Definition: parse.c:382
signed char yytype_int8
Definition: parse.c:1269
#define rb_warn3L(l, fmt, a, b, c)
Definition: parse.c:967
#define CSI_SGR
#define STR_FUNC_EXPAND
Definition: parse.c:13066
#define rb_warning1(fmt, a)
Definition: parse.c:960
#define YYSYNTAX_ERROR
#define YYERROR
Definition: parse.c:5237
void * rb_parser_calloc(struct parser_params *p, size_t nelem, size_t size)
Definition: parse.c:19508
#define YYSIZEOF(X)
Definition: parse.c:1337
#define YYFPRINTF
Definition: parse.c:106
#define YYSTACK_ALLOC
Definition: parse.c:1453
#define YYDPRINTF(Args)
Definition: parse.c:5299
VALUE rb_parser_lex_state_name(enum lex_state_e state)
Definition: parse.c:17223
#define peekc_n(p, n)
Definition: parse.c:13110
#define compile_error
Definition: parse.c:1012
#define IS_AFTER_OPERATOR()
Definition: parse.c:13963
yytokentype
Definition: parse.h:51
@ tBACK_REF
Definition: parse.h:115
@ tGEQ
Definition: parse.h:126
@ keyword_alias
Definition: parse.h:95
@ tLPAREN_ARG
Definition: parse.h:146
@ tBDOT3
Definition: parse.h:135
@ tWORDS_BEG
Definition: parse.h:159
@ tAMPER
Definition: parse.h:153
@ keyword_do_cond
Definition: parse.h:77
@ END_OF_INPUT
Definition: parse.h:52
@ keyword_do_block
Definition: parse.h:78
@ keyword_defined
Definition: parse.h:96
@ tLPAREN
Definition: parse.h:145
@ tASET
Definition: parse.h:137
@ tSTRING_DEND
Definition: parse.h:164
@ tNMATCH
Definition: parse.h:131
@ tCHAR
Definition: parse.h:113
@ keyword_return
Definition: parse.h:80
@ tCONSTANT
Definition: parse.h:106
@ tMATCH
Definition: parse.h:130
@ tFLOAT
Definition: parse.h:110
@ tANDDOT
Definition: parse.h:140
@ tLABEL_END
Definition: parse.h:168
@ tNEQ
Definition: parse.h:125
@ tDOT2
Definition: parse.h:132
@ tEQ
Definition: parse.h:123
@ keyword_module
Definition: parse.h:54
@ tLAMBEG
Definition: parse.h:167
@ tCOLON2
Definition: parse.h:141
@ tCVAR
Definition: parse.h:107
@ tSTRING_DVAR
Definition: parse.h:166
@ keyword_undef
Definition: parse.h:56
@ tLEQ
Definition: parse.h:127
@ tLBRACE
Definition: parse.h:149
@ keyword_redo
Definition: parse.h:73
@ tSTRING_CONTENT
Definition: parse.h:116
@ keyword_false
Definition: parse.h:86
@ keyword_class
Definition: parse.h:53
@ keyword_ensure
Definition: parse.h:59
@ keyword_end
Definition: parse.h:60
@ keyword_and
Definition: parse.h:87
@ keyword_when
Definition: parse.h:67
@ tASSOC
Definition: parse.h:144
@ keyword_retry
Definition: parse.h:74
@ tSYMBOLS_BEG
Definition: parse.h:161
@ tLBRACE_ARG
Definition: parse.h:150
@ tREGEXP_END
Definition: parse.h:117
@ keyword_or
Definition: parse.h:88
@ keyword__ENCODING__
Definition: parse.h:101
@ keyword_do
Definition: parse.h:76
@ keyword_rescue
Definition: parse.h:58
@ keyword_END
Definition: parse.h:98
@ tLSHFT
Definition: parse.h:138
@ tUMINUS
Definition: parse.h:120
@ tBDOT2
Definition: parse.h:134
@ keyword_next
Definition: parse.h:72
@ modifier_if
Definition: parse.h:90
@ tLOWEST
Definition: parse.h:169
@ tSYMBEG
Definition: parse.h:155
@ keyword_nil
Definition: parse.h:84
@ tLABEL
Definition: parse.h:108
@ tSTAR
Definition: parse.h:151
@ tCMP
Definition: parse.h:122
@ keyword_if
Definition: parse.h:61
@ keyword_BEGIN
Definition: parse.h:97
@ tIMAGINARY
Definition: parse.h:112
@ tRSHFT
Definition: parse.h:139
@ tSTRING_DBEG
Definition: parse.h:165
@ tNTH_REF
Definition: parse.h:114
@ tINTEGER
Definition: parse.h:109
@ tSTRING_BEG
Definition: parse.h:156
@ tXSTRING_BEG
Definition: parse.h:157
@ tIVAR
Definition: parse.h:105
@ keyword_then
Definition: parse.h:63
@ modifier_while
Definition: parse.h:92
@ tQSYMBOLS_BEG
Definition: parse.h:162
@ keyword_def
Definition: parse.h:55
@ tDOT3
Definition: parse.h:133
@ keyword__FILE__
Definition: parse.h:100
@ tIDENTIFIER
Definition: parse.h:102
@ keyword_super
Definition: parse.h:82
@ tOP_ASGN
Definition: parse.h:143
@ keyword_while
Definition: parse.h:68
@ tGVAR
Definition: parse.h:104
@ tPOW
Definition: parse.h:121
@ keyword_true
Definition: parse.h:85
@ keyword__LINE__
Definition: parse.h:99
@ keyword_else
Definition: parse.h:65
@ tSTRING_END
Definition: parse.h:163
@ keyword_in
Definition: parse.h:75
@ modifier_unless
Definition: parse.h:91
@ tEQQ
Definition: parse.h:124
@ tRATIONAL
Definition: parse.h:111
@ tUMINUS_NUM
Definition: parse.h:170
@ keyword_unless
Definition: parse.h:62
@ tDSTAR
Definition: parse.h:152
@ tANDOP
Definition: parse.h:128
@ keyword_do_LAMBDA
Definition: parse.h:79
@ tCOLON3
Definition: parse.h:142
@ keyword_for
Definition: parse.h:70
@ modifier_rescue
Definition: parse.h:94
@ tFID
Definition: parse.h:103
@ keyword_not
Definition: parse.h:89
@ tAREF
Definition: parse.h:136
@ keyword_begin
Definition: parse.h:57
@ keyword_self
Definition: parse.h:83
@ tRPAREN
Definition: parse.h:147
@ keyword_break
Definition: parse.h:71
@ keyword_until
Definition: parse.h:69
@ keyword_case
Definition: parse.h:66
@ tSP
Definition: parse.h:118
@ tOROP
Definition: parse.h:129
@ keyword_yield
Definition: parse.h:81
@ tLBRACK
Definition: parse.h:148
@ tQWORDS_BEG
Definition: parse.h:160
@ tREGEXP_BEG
Definition: parse.h:158
@ modifier_until
Definition: parse.h:93
@ tLAST_TOKEN
Definition: parse.h:171
@ tLAMBDA
Definition: parse.h:154
@ keyword_elsif
Definition: parse.h:64
@ tUPLUS
Definition: parse.h:119
#define RARRAY_LEN(a)
void * memchr(const void *, int, size_t)
#define NEW_DSTR(s, loc)
VALUE rb_hash_lookup(VALUE, VALUE)
Definition: hash.c:2063
void rb_ast_dispose(rb_ast_t *)
Definition: node.c:1387
#define MEMCPY(p1, p2, type, n)
#define NEW_VCALL(m, loc)
#define T_COMPLEX
#define NULL
void rb_node_init(NODE *n, enum node_type type, VALUE a0, VALUE a1, VALUE a2)
Definition: node.c:1095
#define NEW_DEFS(r, i, a, d, loc)
const char *void void rb_compile_warning(const char *, int, const char *,...) __attribute__((format(printf
VALUE rb_str_resize(VALUE, long)
Definition: string.c:2709
#define NEW_ITER(a, b, loc)
#define T_FILE
@ RB_WARN_CATEGORY_EXPERIMENTAL
#define nd_state
use StringValue() instead")))
#define RSTRING_LEN(str)
#define NEW_BLOCK(a, loc)
#define NEW_POSTEXE(b, loc)
VALUE rb_reg_check_preprocess(VALUE)
Definition: re.c:2707
#define RTEST(v)
#define NEW_CVASGN(v, val, loc)
#define NEW_DOT2(b, e, loc)
#define ALLOCA_N(type, n)
NODE * rb_ast_newnode(rb_ast_t *, enum node_type type)
Definition: node.c:1198
#define NEW_UNLESS(c, t, e, loc)
#define NEW_DEFN(i, a, d, loc)
#define NEW_RETURN(s, loc)
unsigned long st_data_t
#define NEW_ALIAS(n, o, loc)
#define RBASIC(obj)
const VALUE int int int int int int VALUE * vars[]
void rb_compile_warn(const char *, int, const char *,...) __attribute__((format(printf
#define ID_GLOBAL
#define NEW_MODULE(n, b, loc)
size_t strlen(const char *)
int strcmp(const char *, const char *)
void rb_define_private_method(VALUE, const char *, VALUE(*)(), int)
#define T_STRING
#define nd_first_lineno(n)
long int ptrdiff_t
void * malloc(size_t) __attribute__((__malloc__)) __attribute__((__warn_unused_result__)) __attribute__((__alloc_size__(1)))
#define ID_CLASS
__uint8_t uint8_t
#define xfree
#define nd_set_type(n, t)
#define NEW_DOT3(b, e, loc)
#define LONG2FIX(i)
#define Qundef
const struct rb_call_cache * cc
#define NEW_HASH(a, loc)
#define NEW_BREAK(s, loc)
#define CHAR_BIT
#define MAYBE_UNUSED(x)
VALUE rb_big_norm(VALUE)
Definition: bignum.c:3152
#define NEW_EVSTR(n, loc)
#define RSTRING_END(str)
void rb_write_error_str(VALUE mesg)
Definition: io.c:7940
const VALUE VALUE obj
#define NEW_COLON2(c, i, loc)
#define TYPE(x)
#define T_FLOAT
#define st_is_member(table, key)
VALUE rb_suppress_tracing(VALUE(*func)(VALUE), VALUE arg)
Definition: vm_trace.c:415
#define RSTRING_PTR(str)
void rb_gc_register_mark_object(VALUE)
Definition: gc.c:7079
const rb_iseq_t const char * error
#define xrealloc
#define ISXDIGIT(c)
#define T_BIGNUM
#define NEW_IF(c, t, e, loc)
#define NEW_NIL(loc)
VALUE VALUE rb_str_vcatf(VALUE, const char *, va_list)
Definition: sprintf.c:1210
VALUE rb_ident_hash_new(void)
Definition: hash.c:4278
#define rb_str_new(str, len)
#define NIL_P(v)
#define rb_str_buf_cat
#define numberof(array)
#define ID_CONST
#define DBL2NUM(dbl)
#define nd_resq
VALUE rb_str_cat(VALUE, const char *, long)
Definition: string.c:2812
#define NEW_GASGN(v, val, loc)
rb_ast_t * rb_ast_new(void)
Definition: node.c:1235
#define ID2SYM(x)
VALUE rb_io_gets(VALUE)
Definition: io.c:3577
#define NEW_BEGIN(b, loc)
#define nd_end
const char * rb_id2name(ID)
Definition: symbol.c:801
#define ISCNTRL(c)
#define REALLOC_N(var, type, n)
#define NEW_OPT_ARG(i, v, loc)
#define nd_line(n)
const char size_t n
#define rb_usascii_str_new(str, len)
#define ruby_verbose
#define RUBY_SYMBOL_EXPORT_BEGIN
#define rb_intern_const(str)
#define NEW_SPLAT(a, loc)
VALUE rb_io_write(VALUE, VALUE)
Definition: io.c:1804
#define NEW_IASGN(v, val, loc)
#define EOF
void rb_define_global_const(const char *, VALUE)
Definition: variable.c:2903
#define NEW_ARGS_AUX(r, b, loc)
#define SYM2ID(x)
#define NEW_CDECL(v, val, path, loc)
void rb_str_set_len(VALUE, long)
Definition: string.c:2692
int rb_respond_to(VALUE, ID)
Definition: vm_method.c:2207
unsigned long VALUE
VALUE rb_ary_push(VALUE, VALUE)
Definition: array.c:1195
#define stderr
#define nd_ainfo
#define NEW_SELF(loc)
#define NEW_CALL(r, m, a, loc)
#define NEW_DASGN(v, val, loc)
#define T_NODE
#define BIGNUM_NEGATE(b)
#define nd_1st
__inline__ const void *__restrict__ src
#define NEW_ARGSPUSH(a, b, loc)
int rb_local_defined(ID, const struct rb_iseq_struct *)
#define NEW_FALSE(loc)
void rb_str_modify(VALUE)
Definition: string.c:2114
#define NEW_CASE(h, b, loc)
VALUE rb_str_buf_new(long)
Definition: string.c:1315
#define rb_sym_intern_ascii_cstr(ptr)
#define NEW_RETRY(loc)
#define nd_first_column(n)
#define rb_rational_raw1(x)
VALUE rb_int_positive_pow(long x, unsigned long y)
Definition: numeric.c:4038
int rb_const_defined_at(VALUE, ID)
Definition: variable.c:2692
VALUE rb_filesystem_str_new_cstr(const char *)
Definition: string.c:1117
#define nd_brace
#define xmalloc
VALUE rb_cstr_to_inum(const char *, int, int)
Definition: bignum.c:4012
void rb_define_alloc_func(VALUE, rb_alloc_func_t)
#define nd_2nd
uint32_t i
#define char
#define NEW_SUPER(a, loc)
#define nd_set_node_id(n, id)
VALUE rb_fstring(VALUE)
Definition: string.c:312
#define NUM2UINT(x)
#define RSTRING_GETMEM(str, ptrvar, lenvar)
int strncmp(const char *, const char *, size_t)
__inline__ const void *__restrict__ size_t len
const VALUE int int int int int int VALUE char * fmt
#define NEW_LASGN(v, val, loc)
VALUE rb_io_flush(VALUE)
Definition: io.c:1903
#define NEW_MATCH2(n1, n2, loc)
#define nd_set_last_loc(n, v)
const char * rb_obj_classname(VALUE)
Definition: variable.c:289
#define NEW_OPCALL(r, m, a, loc)
#define ALLOC_N(type, n)
#define NEW_SCOPE(a, b, loc)
void rb_ast_add_mark_object(rb_ast_t *, VALUE)
Definition: node.c:1393
#define NEW_MATCH3(r, n2, loc)
#define OBJ_FREEZE(x)
#define NEW_LIST(a, loc)
#define INT2NUM(x)
VALUE rb_stderr
#define NEW_XSTR(s, loc)
#define ZALLOC(type)
#define SIZED_REALLOC_N(var, type, n, old_n)
VALUE rb_complex_raw(VALUE, VALUE)
Definition: complex.c:1521
int strcasecmp(const char *, const char *) __attribute__((__pure__))
#define NEW_CASE2(b, loc)
#define T_RATIONAL
#define RNODE(obj)
#define RB_OBJ_WRITE(a, slot, b)
#define va_end(v)
VALUE rb_const_get_at(VALUE, ID)
Definition: variable.c:2397
#define FLONUM_P(x)
#define nd_last_loc(n)
#define T_HASH
#define LONG2NUM(x)
#define NEW_UNTIL(c, b, n, loc)
__int_least8_t int_least8_t
void rb_define_const(VALUE, const char *, VALUE)
Definition: variable.c:2891
__gnuc_va_list va_list
#define long
#define NUM2INT(x)
void rb_define_singleton_method(VALUE, const char *, VALUE(*)(), int)
#define NEW_OP_ASGN_OR(i, val, loc)
#define rb_long2int(n)
#define NEW_OP_ASGN1(p, id, a, loc)
#define RB_GC_GUARD(v)
#define RUBY_TYPED_FREE_IMMEDIATELY
#define NEW_SCLASS(r, b, loc)
#define nd_set_first_lineno(n, v)
#define ISALNUM(c)
#define RREGEXP_PTR(r)
#define NEW_DEFINED(e, loc)
#define NEW_REDO(loc)
#define RUBY_SYMBOL_EXPORT_END
#define NEW_CONST(v, loc)
#define TypedData_Get_Struct(obj, type, data_type, sval)
#define PRIsVALUE
#define NEW_DVAR(v, loc)
void * memset(void *, int, size_t)
#define NEW_FOR_MASGN(v, loc)
#define rb_funcall(recv, mid, argc,...)
#define NODE_SPECIAL_REQUIRED_KEYWORD
int VALUE v
VALUE rb_ary_new(void)
Definition: array.c:723
#define ID_SCOPE_SHIFT
#define rb_scan_args(argc, argvp, fmt,...)
__uint_least16_t uint_least16_t
#define nd_args
#define NEW_RESCUE(b, res, e, loc)
#define rb_usascii_str_new2
ID rb_intern2(const char *, long)
Definition: symbol.c:653
VALUE rb_rational_new(VALUE, VALUE)
Definition: rational.c:1957
#define rb_str_cat_cstr(str, ptr)
#define NEW_TRUE(loc)
void rb_gc_mark(VALUE)
Definition: gc.c:5228
#define rb_intern(str)
#define va_start(v, l)
#define ERANGE
int rb_memcicmp(const void *, const void *, long)
Definition: re.c:80
VALUE rb_str_catf(VALUE, const char *,...) __attribute__((format(printf
VALUE rb_node_case_when_optimizable_literal(const NODE *const node)
Definition: compile.c:4284
#define CONST_ID(var, str)
#define RRATIONAL(obj)
#define NEW_YIELD(a, loc)
#define RFLOAT_VALUE(v)
#define TRUE
#define FALSE
#define NEW_MASGN(l, r, loc)
#define rb_imemo_tmpbuf_auto_free_pointer()
#define NEW_NEXT(s, loc)
unsigned int size
#define RRATIONAL_SET_NUM(rat, n)
@ imemo_parser_strterm
#define Qtrue
#define MEMMOVE(p1, p2, type, n)
VALUE rb_str_subseq(VALUE, long, long)
Definition: string.c:2474
#define ruby_sized_xfree(ptr, size)
#define NEW_BLOCK_PASS(b, loc)
#define rb_strlen_lit(str)
#define UNLIKELY(x)
void rb_ast_add_local_table(rb_ast_t *, ID *buf)
Definition: node.c:1219
struct rb_call_cache buf
#define memmove(dst, src, len)
#define nd_else
#define NODE_SPECIAL_NO_REST_KEYWORD
#define NEW_FCALL(m, a, loc)
#define ISDIGIT(c)
VALUE rb_str_new_frozen(VALUE)
Definition: string.c:1203
VALUE rb_attr_get(VALUE, ID)
Definition: variable.c:1084
#define Qnil
#define Qfalse
#define NEW_OP_ASGN_AND(i, val, loc)
VALUE rb_io_puts(int, const VALUE *, VALUE)
Definition: io.c:7751
#define T_ARRAY
#define nd_lit
void * memcpy(void *__restrict__, const void *__restrict__, size_t)
VALUE rb_str_buf_append(VALUE, VALUE)
Definition: string.c:2950
#define ID_INSTANCE
#define T_OBJECT
VALUE rb_str_intern(VALUE)
Definition: symbol.c:710
int rb_stderr_tty_p(void)
Definition: io.c:7962
#define NEW_CLASS(n, b, s, loc)
__int_least16_t int_least16_t
VALUE rb_imemo_new(enum imemo_type type, VALUE v1, VALUE v2, VALUE v3, VALUE v0)
Definition: gc.c:2321
#define nd_head
#define ULONG2NUM(x)
VALUE rb_thread_current(void)
Definition: thread.c:2675
#define RB_TYPE_P(obj, type)
#define INT2FIX(i)
#define SPECIAL_CONST_P(x)
#define NEW_LVAR(v, loc)
#define nd_set_line(n, l)
#define ALLOC(type)
void rb_gc_force_recycle(VALUE)
Definition: gc.c:7027
#define NODE_FL_NEWLINE
#define NEW_LAMBDA(a, b, loc)
VALUE rb_ary_unshift(VALUE, VALUE)
Definition: array.c:1494
VALUE rb_obj_as_string(VALUE)
Definition: string.c:1440
#define TypedData_Make_Struct(klass, type, data_type, sval)
const VALUE * argv
#define NEW_WHILE(c, b, n, loc)
#define SYMBOL_P(x)
#define NODE_REQUIRED_KEYWORD_P(node)
__inline__ int
VALUE rb_reg_compile(VALUE str, int options, const char *sourcefile, int sourceline)
Definition: re.c:2953
#define NEW_FOR(i, b, loc)
#define FIXNUM_P(f)
#define NEW_RESBODY(a, ex, n, loc)
#define NEW_IN(c, t, e, loc)
__uint_least8_t uint_least8_t
#define nd_beg
#define RCOMPLEX_SET_IMAG(cmp, i)
#define NEW_ZSUPER(loc)
#define NEW_CASE3(h, b, loc)
#define NEW_WHEN(c, t, e, loc)
#define RCOMPLEX_SET_REAL(cmp, r)
if((__builtin_expect(!!(!me), 0)))
VALUE rb_hash_aset(VALUE, VALUE, VALUE)
Definition: hash.c:2852
unsigned long ruby_scan_digits(const char *str, ssize_t len, int base, size_t *retlen, int *overflow)
Definition: util.c:97
#define NEW_GVAR(v, loc)
#define nd_set_first_column(n, v)
#define ID_LOCAL
#define NEW_OP_CDECL(v, op, val, loc)
#define NEW_UNDEF(i, loc)
#define NEW_COLON3(i, loc)
#define NEW_BACK_REF(n, loc)
#define RFLOAT(obj)
#define nd_type(n)
ID rb_id_attrset(ID)
Definition: symbol.c:98
#define xcalloc
#define NEW_IVAR(v, loc)
VALUE rb_str_dup(VALUE)
Definition: string.c:1516
VALUE rb_sprintf(const char *,...) __attribute__((format(printf
#define RBASIC_CLASS(obj)
#define NEW_VALIAS(n, o, loc)
#define nd_set_first_loc(n, v)
unsigned long ID
#define nd_body
#define NEW_POSTARG(i, v, loc)
#define InitVM(ext)
#define nd_value
size_t st_index_t h
#define ISSPACE(c)
#define rb_ary_new_from_args(n,...)
#define RUBY_FUNC_EXPORTED
VALUE ID id
#define NEW_NODE(t, a0, a1, a2, loc)
#define FIX2LONG(x)
VALUE rb_hash_clear(VALUE)
Definition: hash.c:2769
#define NEW_ENSURE(b, en, loc)
#define NODE_SPECIAL_NO_NAME_REST
#define NEW_CVAR(v, loc)
#define ID_SCOPE_MASK
void rb_define_method(VALUE, const char *, VALUE(*)(), int)
#define NODE_SPECIAL_EXCESSIVE_COMMA
#define RARRAY_AREF(a, i)
#define BUILTIN_TYPE(x)
#define SIZEOF_VALUE
#define NEW_KW_ARG(i, v, loc)
#define NEW_STR(s, loc)
VALUE rb_stdout
#define nd_next
VALUE rb_make_backtrace(void)
Definition: vm_backtrace.c:872
VALUE rb_hash_new(void)
Definition: hash.c:1523
void rb_ast_delete_node(rb_ast_t *, NODE *n)
Definition: node.c:1227
#define NEW_ARGSCAT(a, b, loc)
#define rb_str_new_cstr(str)
#define RB_OBJ_WRITTEN(a, oldv, b)
VALUE VALUE rb_vsprintf(const char *, va_list)
Definition: sprintf.c:1191
VALUE rb_funcallv_public(VALUE, ID, int, const VALUE *)
Calls a method.
Definition: vm_eval.c:980
#define NEW_DASGN_CURR(v, val, loc)
#define ID_INTERNAL
#define ID_STATIC_SYM
#define ISASCII(c)
VALUE rb_ary_entry(VALUE, long)
Definition: array.c:1512
#define NEW_ATTRASGN(r, m, a, loc)
#define NEW_OP_ASGN2(r, t, i, o, val, loc)
#define StringValueCStr(v)
#define NEW_LIT(l, loc)
#define STRNCASECMP(s1, s2, n)
#define T_REGEXP
#define NEW_ERRINFO(loc)
#define RCOMPLEX(obj)
#define ISALPHA(c)
#define NEW_NTH_REF(n, loc)
int rb_dvar_defined(ID, const struct rb_iseq_struct *)
#define nd_plen
#define BEG(no)
Definition: re.c:25
short yytype_int16
Definition: ripper.c:1274
lex_state_e
Definition: ripper.c:155
yytype_int16 yy_state_t
Definition: ripper.c:1337
unsigned char yytype_uint8
Definition: ripper.c:1283
lex_state_bits
Definition: ripper.c:138
int yy_state_fast_t
Definition: ripper.c:1340
string_type
Definition: ripper.c:13120
VALUE stack_type
Definition: ripper.c:187
cond_type
Definition: ripper.c:18028
signed char yytype_int8
Definition: ripper.c:1266
rb_atomic_t cnt[RUBY_NSIG]
Definition: signal.c:503
#define f
void st_free_table(st_table *tab)
Definition: st.c:709
st_table * st_init_numtable_with_size(st_index_t size)
Definition: st.c:660
st_table * st_init_numtable(void)
Definition: st.c:653
int st_insert(st_table *tab, st_data_t key, st_data_t value)
Definition: st.c:1171
int st_lookup(st_table *tab, st_data_t key, st_data_t *value)
Definition: st.c:1101
int st_foreach(st_table *tab, st_foreach_callback_func *func, st_data_t arg)
Definition: st.c:1717
rb_code_location_t nd_loc
union RNode::@39 u2
union RNode::@40 u3
union RNode::@38 u1
Definition: parse.h:199
int last_line
Definition: parse.h:202
int first_column
Definition: parse.h:201
int first_line
Definition: parse.h:200
int last_column
Definition: parse.h:203
Definition: lex.c:34
short id[2]
Definition: lex.c:34
short state
Definition: lex.c:34
struct local_vars * prev
Definition: ripper.c:225
NODE * current
Definition: ripper.c:228
struct local_vars::@125 numparam
struct vtable * vars
Definition: ripper.c:220
NODE * outer
Definition: ripper.c:228
NODE * inner
Definition: ripper.c:228
struct vtable * args
Definition: ripper.c:219
struct vtable * used
Definition: ripper.c:221
rb_magic_comment_length_t length
Definition: ripper.c:14786
rb_magic_comment_setter_t func
Definition: ripper.c:14785
const char * name
Definition: ripper.c:14784
VALUE(* gets)(struct parser_params *, VALUE)
Definition: ripper.c:281
int brace_nest
Definition: ripper.c:300
struct parser_params::@126 lex
VALUE compile_option
Definition: ripper.c:321
rb_strterm_t * strterm
Definition: ripper.c:280
st_table * pktbl
Definition: ripper.c:313
const char * ruby_sourcefile
Definition: ripper.c:316
int heredoc_line_indent
Definition: ripper.c:309
unsigned int debug
Definition: ripper.c:336
unsigned int ruby__end__seen
Definition: ripper.c:335
YYSTYPE * lval
Definition: ripper.c:277
unsigned int has_shebang
Definition: ripper.c:337
VALUE(* call)(VALUE, int)
Definition: ripper.c:292
int lpar_beg
Definition: ripper.c:298
int heredoc_end
Definition: ripper.c:307
st_table * pvtbl
Definition: ripper.c:312
int tokline
Definition: ripper.c:306
int line_count
Definition: ripper.c:314
rb_encoding * enc
Definition: ripper.c:318
token_info * token_info
Definition: ripper.c:319
unsigned int do_chomp
Definition: ripper.c:355
VALUE input
Definition: ripper.c:282
char * tokenbuf
Definition: ripper.c:310
VALUE nextline
Definition: ripper.c:285
const char * ptok
Definition: ripper.c:289
rb_imemo_tmpbuf_t * heap
Definition: ripper.c:275
unsigned int token_seen
Definition: ripper.c:342
VALUE debug_lines
Definition: ripper.c:362
unsigned int command_start
Definition: ripper.c:333
unsigned int in_kwarg
Definition: ripper.c:339
enum lex_state_e state
Definition: ripper.c:294
unsigned int warn_location
Definition: ripper.c:357
unsigned int in_class
Definition: ripper.c:341
VALUE lastline
Definition: ripper.c:284
stack_type cond_stack
Definition: ripper.c:302
int node_id
Definition: ripper.c:329
NODE * eval_tree
Definition: ripper.c:360
const char * pend
Definition: ripper.c:288
unsigned int eofp
Definition: ripper.c:334
unsigned int error_p
Definition: ripper.c:347
int heredoc_indent
Definition: ripper.c:308
VALUE case_labels
Definition: ripper.c:320
unsigned int in_defined
Definition: ripper.c:338
int max_numparam
Definition: ripper.c:331
unsigned int do_loop
Definition: ripper.c:354
VALUE debug_buffer
Definition: ripper.c:323
const char * pbeg
Definition: ripper.c:286
long ptr
Definition: ripper.c:291
rb_ast_t * ast
Definition: ripper.c:328
const struct rb_iseq_struct * parent_iseq
Definition: ripper.c:363
int ruby_sourceline
Definition: ripper.c:315
unsigned int do_split
Definition: ripper.c:356
unsigned int do_print
Definition: ripper.c:353
NODE * eval_tree_begin
Definition: ripper.c:359
stack_type cmdarg_stack
Definition: ripper.c:303
VALUE error_buffer
Definition: ripper.c:361
unsigned int in_def
Definition: ripper.c:340
VALUE debug_output
Definition: ripper.c:324
unsigned int token_info_enabled
Definition: ripper.c:343
VALUE ruby_sourcefile_string
Definition: ripper.c:317
int paren_nest
Definition: ripper.c:296
union parser_params::@126::@127 gets_
int tokidx
Definition: ripper.c:304
const char * pcur
Definition: ripper.c:287
VALUE prevline
Definition: ripper.c:283
int toksiz
Definition: ripper.c:305
struct local_vars * lvtbl
Definition: ripper.c:311
unsigned int cr_seen
Definition: ripper.c:348
union rb_strterm_literal_struct::@130 u2
union rb_strterm_literal_struct::@128 u0
union rb_strterm_literal_struct::@131 u3
union rb_strterm_literal_struct::@129 u1
rb_strterm_literal_t literal
Definition: ripper.c:762
union rb_strterm_struct::@132 u
rb_strterm_heredoc_t heredoc
Definition: ripper.c:763
int nonspc
Definition: ripper.c:259
int indent
Definition: ripper.c:258
rb_code_position_t beg
Definition: ripper.c:257
const char * token
Definition: ripper.c:256
struct token_info * next
Definition: ripper.c:260
Definition: ripper.c:211
ID * tbl
Definition: ripper.c:212
int capa
Definition: ripper.c:214
struct vtable * prev
Definition: ripper.c:215
int pos
Definition: ripper.c:213
#define is_identchar(p, e, enc)
Definition: symbol.c:35
int rb_enc_symname_type(const char *name, long len, rb_encoding *enc, unsigned int allowed_attrset)
Definition: symbol.c:233
#define is_notop_id(id)
Definition: symbol.h:35
#define is_local_id(id)
Definition: symbol.h:36
Definition: parse.h:178
struct rb_strterm_struct * strterm
Definition: parse.h:186
ID id
Definition: parse.h:182
VALUE val
Definition: parse.h:180
int num
Definition: parse.h:183
NODE * node
Definition: parse.h:181
st_table * tbl
Definition: parse.h:184
const struct vtable * vars
Definition: parse.h:185
YYLTYPE yyls_alloc
Definition: ripper.c:1489
YYSTYPE yyvs_alloc
Definition: ripper.c:1488
yy_state_t yyss_alloc
Definition: ripper.c:1487
unsigned long ruby_scan_oct(const char *, size_t, size_t *)
Definition: util.c:34
#define strtod(s, e)
Definition: util.h:76
#define scan_hex(s, l, e)
Definition: util.h:55
#define scan_oct(s, l, e)
Definition: util.h:53
#define rb_id2str(id)
Definition: vm_backtrace.c:30
#define MAX_WORD_LENGTH
Definition: zonetab.h:45