Ruby 2.7.6p219 (2022-04-12 revision c9c2245c0a25176072e02db9254f0e0c84c805cd)
ripper.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 "ripper.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 {
213 int pos;
214 int capa;
215 struct vtable *prev;
216};
217
219 struct vtable *args;
220 struct vtable *vars;
221 struct vtable *used;
222# if WARN_PAST_SCOPE
223 struct vtable *past;
224# endif
226# ifndef RIPPER
227 struct {
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;
262
264
265/*
266 Structure of Lexer Buffer:
267
268 lex.pbeg lex.ptok lex.pcur lex.pend
269 | | | |
270 |------------+------------+------------|
271 |<---------->|
272 token
273*/
276
278
279 struct {
286 const char *pbeg;
287 const char *pcur;
288 const char *pend;
289 const char *ptok;
290 union {
291 long ptr;
295 /* track the nest level of any parens "()[]{}" */
297 /* keep p->lex.paren_nest at the beginning of lambda "->" to detect tLAMBEG and keyword_do_LAMBDA */
299 /* track the nest level of only braces "{}" */
310 char *tokenbuf;
315 int ruby_sourceline; /* current line no. */
316 const char *ruby_sourcefile; /* current source file */
322
325
327
330
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
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 */
715 union {
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
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 "ripper.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
1058/* Debug traces. */
1059#ifndef YYDEBUG
1060# define YYDEBUG 1
1061#endif
1062#if YYDEBUG
1063#ifndef yydebug
1064extern int yydebug;
1065#endif
1066#endif
1067
1068/* Token type. */
1069#ifndef YYTOKENTYPE
1070# define YYTOKENTYPE
1071 enum yytokentype
1072 {
1073 END_OF_INPUT = 0,
1074 keyword_class = 258,
1075 keyword_module = 259,
1076 keyword_def = 260,
1077 keyword_undef = 261,
1078 keyword_begin = 262,
1079 keyword_rescue = 263,
1080 keyword_ensure = 264,
1081 keyword_end = 265,
1082 keyword_if = 266,
1083 keyword_unless = 267,
1084 keyword_then = 268,
1085 keyword_elsif = 269,
1086 keyword_else = 270,
1087 keyword_case = 271,
1088 keyword_when = 272,
1089 keyword_while = 273,
1090 keyword_until = 274,
1091 keyword_for = 275,
1092 keyword_break = 276,
1093 keyword_next = 277,
1094 keyword_redo = 278,
1095 keyword_retry = 279,
1096 keyword_in = 280,
1097 keyword_do = 281,
1098 keyword_do_cond = 282,
1099 keyword_do_block = 283,
1100 keyword_do_LAMBDA = 284,
1101 keyword_return = 285,
1102 keyword_yield = 286,
1103 keyword_super = 287,
1104 keyword_self = 288,
1105 keyword_nil = 289,
1106 keyword_true = 290,
1107 keyword_false = 291,
1108 keyword_and = 292,
1109 keyword_or = 293,
1110 keyword_not = 294,
1111 modifier_if = 295,
1112 modifier_unless = 296,
1113 modifier_while = 297,
1114 modifier_until = 298,
1115 modifier_rescue = 299,
1116 keyword_alias = 300,
1117 keyword_defined = 301,
1118 keyword_BEGIN = 302,
1119 keyword_END = 303,
1120 keyword__LINE__ = 304,
1121 keyword__FILE__ = 305,
1122 keyword__ENCODING__ = 306,
1123 tIDENTIFIER = 307,
1124 tFID = 308,
1125 tGVAR = 309,
1126 tIVAR = 310,
1127 tCONSTANT = 311,
1128 tCVAR = 312,
1129 tLABEL = 313,
1130 tINTEGER = 314,
1131 tFLOAT = 315,
1132 tRATIONAL = 316,
1133 tIMAGINARY = 317,
1134 tCHAR = 318,
1135 tNTH_REF = 319,
1136 tBACK_REF = 320,
1137 tSTRING_CONTENT = 321,
1138 tREGEXP_END = 322,
1139 tSP = 323,
1140 tUPLUS = 132,
1141 tUMINUS = 133,
1142 tPOW = 134,
1143 tCMP = 135,
1144 tEQ = 140,
1145 tEQQ = 141,
1146 tNEQ = 142,
1147 tGEQ = 139,
1148 tLEQ = 138,
1149 tANDOP = 148,
1150 tOROP = 149,
1151 tMATCH = 143,
1152 tNMATCH = 144,
1153 tDOT2 = 128,
1154 tDOT3 = 129,
1155 tBDOT2 = 130,
1156 tBDOT3 = 131,
1157 tAREF = 145,
1158 tASET = 146,
1159 tLSHFT = 136,
1160 tRSHFT = 137,
1161 tANDDOT = 150,
1162 tCOLON2 = 147,
1163 tCOLON3 = 324,
1164 tOP_ASGN = 325,
1165 tASSOC = 326,
1166 tLPAREN = 327,
1167 tLPAREN_ARG = 328,
1168 tRPAREN = 329,
1169 tLBRACK = 330,
1170 tLBRACE = 331,
1171 tLBRACE_ARG = 332,
1172 tSTAR = 333,
1173 tDSTAR = 334,
1174 tAMPER = 335,
1175 tLAMBDA = 336,
1176 tSYMBEG = 337,
1177 tSTRING_BEG = 338,
1178 tXSTRING_BEG = 339,
1179 tREGEXP_BEG = 340,
1180 tWORDS_BEG = 341,
1181 tQWORDS_BEG = 342,
1182 tSYMBOLS_BEG = 343,
1183 tQSYMBOLS_BEG = 344,
1184 tSTRING_END = 345,
1185 tSTRING_DEND = 346,
1186 tSTRING_DBEG = 347,
1187 tSTRING_DVAR = 348,
1188 tLAMBEG = 349,
1189 tLABEL_END = 350,
1190 tLOWEST = 351,
1191 tUMINUS_NUM = 352,
1192 tLAST_TOKEN = 353
1193 };
1194#endif
1195
1196/* Value type. */
1197#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
1198union YYSTYPE
1199{
1200#line 979 "ripper.y"
1201
1202 VALUE val;
1203 NODE *node;
1204 ID id;
1205 int num;
1206 st_table *tbl;
1207 const struct vtable *vars;
1208 struct rb_strterm_struct *strterm;
1209
1210#line 1209 "ripper.c"
1211
1212};
1213typedef union YYSTYPE YYSTYPE;
1214# define YYSTYPE_IS_TRIVIAL 1
1215# define YYSTYPE_IS_DECLARED 1
1216#endif
1217
1218/* Location type. */
1219#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
1220typedef struct YYLTYPE YYLTYPE;
1221struct YYLTYPE
1222{
1223 int first_line;
1224 int first_column;
1225 int last_line;
1226 int last_column;
1227};
1228# define YYLTYPE_IS_DECLARED 1
1229# define YYLTYPE_IS_TRIVIAL 1
1230#endif
1231
1232
1233
1234int yyparse (struct parser_params *p);
1235
1236
1237
1238
1239
1240#ifdef short
1241# undef short
1242#endif
1243
1244/* On compilers that do not define __PTRDIFF_MAX__ etc., make sure
1245 <limits.h> and (if available) <stdint.h> are included
1246 so that the code can choose integer types of a good width. */
1247
1248#ifndef __PTRDIFF_MAX__
1249# include <limits.h> /* INFRINGES ON USER NAME SPACE */
1250# if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
1251# include <stdint.h> /* INFRINGES ON USER NAME SPACE */
1252# define YY_STDINT_H
1253# endif
1254#endif
1255
1256/* Narrow types that promote to a signed type and that can represent a
1257 signed or unsigned integer of at least N bits. In tables they can
1258 save space and decrease cache pressure. Promoting to a signed type
1259 helps avoid bugs in integer arithmetic. */
1260
1261#ifdef __INT_LEAST8_MAX__
1262typedef __INT_LEAST8_TYPE__ yytype_int8;
1263#elif defined YY_STDINT_H
1265#else
1266typedef signed char yytype_int8;
1267#endif
1268
1269#ifdef __INT_LEAST16_MAX__
1270typedef __INT_LEAST16_TYPE__ yytype_int16;
1271#elif defined YY_STDINT_H
1273#else
1274typedef short yytype_int16;
1275#endif
1276
1277#if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__
1278typedef __UINT_LEAST8_TYPE__ yytype_uint8;
1279#elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \
1280 && UINT_LEAST8_MAX <= INT_MAX)
1282#elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX
1283typedef unsigned char yytype_uint8;
1284#else
1285typedef short yytype_uint8;
1286#endif
1287
1288#if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__
1289typedef __UINT_LEAST16_TYPE__ yytype_uint16;
1290#elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \
1291 && UINT_LEAST16_MAX <= INT_MAX)
1293#elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX
1294typedef unsigned short yytype_uint16;
1295#else
1296typedef int yytype_uint16;
1297#endif
1298
1299#ifndef YYPTRDIFF_T
1300# if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__
1301# define YYPTRDIFF_T __PTRDIFF_TYPE__
1302# define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__
1303# elif defined PTRDIFF_MAX
1304# ifndef ptrdiff_t
1305# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
1306# endif
1307# define YYPTRDIFF_T ptrdiff_t
1308# define YYPTRDIFF_MAXIMUM PTRDIFF_MAX
1309# else
1310# define YYPTRDIFF_T long
1311# define YYPTRDIFF_MAXIMUM LONG_MAX
1312# endif
1313#endif
1314
1315#ifndef YYSIZE_T
1316# ifdef __SIZE_TYPE__
1317# define YYSIZE_T __SIZE_TYPE__
1318# elif defined size_t
1319# define YYSIZE_T size_t
1320# elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
1321# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
1322# define YYSIZE_T size_t
1323# else
1324# define YYSIZE_T unsigned
1325# endif
1326#endif
1327
1328#define YYSIZE_MAXIMUM \
1329 YY_CAST (YYPTRDIFF_T, \
1330 (YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1) \
1331 ? YYPTRDIFF_MAXIMUM \
1332 : YY_CAST (YYSIZE_T, -1)))
1333
1334#define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X))
1335
1336/* Stored state numbers (used for stacks). */
1338
1339/* State numbers in computations. */
1341
1342#ifndef YY_
1343# if defined YYENABLE_NLS && YYENABLE_NLS
1344# if ENABLE_NLS
1345# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
1346# define YY_(Msgid) dgettext ("bison-runtime", Msgid)
1347# endif
1348# endif
1349# ifndef YY_
1350# define YY_(Msgid) Msgid
1351# endif
1352#endif
1353
1354#ifndef YY_ATTRIBUTE_PURE
1355# if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__)
1356# define YY_ATTRIBUTE_PURE __attribute__ ((__pure__))
1357# else
1358# define YY_ATTRIBUTE_PURE
1359# endif
1360#endif
1361
1362#ifndef YY_ATTRIBUTE_UNUSED
1363# if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__)
1364# define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
1365# else
1366# define YY_ATTRIBUTE_UNUSED
1367# endif
1368#endif
1369
1370/* Suppress unused-variable warnings by "using" E. */
1371#if ! defined lint || defined __GNUC__
1372# define YYUSE(E) ((void) (E))
1373#else
1374# define YYUSE(E) /* empty */
1375#endif
1376
1377#if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
1378/* Suppress an incorrect diagnostic about yylval being uninitialized. */
1379# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
1380 _Pragma ("GCC diagnostic push") \
1381 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \
1382 _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
1383# define YY_IGNORE_MAYBE_UNINITIALIZED_END \
1384 _Pragma ("GCC diagnostic pop")
1385#else
1386# define YY_INITIAL_VALUE(Value) Value
1387#endif
1388#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1389# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1390# define YY_IGNORE_MAYBE_UNINITIALIZED_END
1391#endif
1392#ifndef YY_INITIAL_VALUE
1393# define YY_INITIAL_VALUE(Value) /* Nothing. */
1394#endif
1395
1396#if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__
1397# define YY_IGNORE_USELESS_CAST_BEGIN \
1398 _Pragma ("GCC diagnostic push") \
1399 _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"")
1400# define YY_IGNORE_USELESS_CAST_END \
1401 _Pragma ("GCC diagnostic pop")
1402#endif
1403#ifndef YY_IGNORE_USELESS_CAST_BEGIN
1404# define YY_IGNORE_USELESS_CAST_BEGIN
1405# define YY_IGNORE_USELESS_CAST_END
1406#endif
1407
1408
1409#define YY_ASSERT(E) ((void) (0 && (E)))
1410
1411#if ! defined yyoverflow || YYERROR_VERBOSE
1412
1413/* The parser invokes alloca or malloc; define the necessary symbols. */
1414
1415# ifdef YYSTACK_USE_ALLOCA
1416# if YYSTACK_USE_ALLOCA
1417# ifdef __GNUC__
1418# define YYSTACK_ALLOC __builtin_alloca
1419# elif defined __BUILTIN_VA_ARG_INCR
1420# include <alloca.h> /* INFRINGES ON USER NAME SPACE */
1421# elif defined _AIX
1422# define YYSTACK_ALLOC __alloca
1423# elif defined _MSC_VER
1424# include <malloc.h> /* INFRINGES ON USER NAME SPACE */
1425# define alloca _alloca
1426# else
1427# define YYSTACK_ALLOC alloca
1428# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
1429# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
1430 /* Use EXIT_SUCCESS as a witness for stdlib.h. */
1431# ifndef EXIT_SUCCESS
1432# define EXIT_SUCCESS 0
1433# endif
1434# endif
1435# endif
1436# endif
1437# endif
1438
1439# ifdef YYSTACK_ALLOC
1440 /* Pacify GCC's 'empty if-body' warning. */
1441# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
1442# ifndef YYSTACK_ALLOC_MAXIMUM
1443 /* The OS might guarantee only one guard page at the bottom of the stack,
1444 and a page size can be as small as 4096 bytes. So we cannot safely
1445 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
1446 to allow for a few compiler-allocated temporary stack slots. */
1447# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
1448# endif
1449# else
1450# define YYSTACK_ALLOC YYMALLOC
1451# define YYSTACK_FREE YYFREE
1452# ifndef YYSTACK_ALLOC_MAXIMUM
1453# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
1454# endif
1455# if (defined __cplusplus && ! defined EXIT_SUCCESS \
1456 && ! ((defined YYMALLOC || defined malloc) \
1457 && (defined YYFREE || defined free)))
1458# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
1459# ifndef EXIT_SUCCESS
1460# define EXIT_SUCCESS 0
1461# endif
1462# endif
1463# ifndef YYMALLOC
1464# define YYMALLOC malloc
1465# if ! defined malloc && ! defined EXIT_SUCCESS
1466void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
1467# endif
1468# endif
1469# ifndef YYFREE
1470# define YYFREE free
1471# if ! defined free && ! defined EXIT_SUCCESS
1472void free (void *); /* INFRINGES ON USER NAME SPACE */
1473# endif
1474# endif
1475# endif
1476#endif /* ! defined yyoverflow || YYERROR_VERBOSE */
1477
1478
1479#if (! defined yyoverflow \
1480 && (! defined __cplusplus \
1481 || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \
1482 && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
1483
1484/* A type that is properly aligned for any stack member. */
1486{
1490};
1491
1492/* The size of the maximum gap between one aligned stack and the next. */
1493# define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1)
1494
1495/* The size of an array large to enough to hold all stacks, each with
1496 N elements. */
1497# define YYSTACK_BYTES(N) \
1498 ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE) \
1499 + YYSIZEOF (YYLTYPE)) \
1500 + 2 * YYSTACK_GAP_MAXIMUM)
1501
1502# define YYCOPY_NEEDED 1
1503
1504/* Relocate STACK from its old location to the new one. The
1505 local variables YYSIZE and YYSTACKSIZE give the old and new number of
1506 elements in the stack, and YYPTR gives the new location of the
1507 stack. Advance YYPTR to a properly aligned location for the next
1508 stack. */
1509# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
1510 do \
1511 { \
1512 YYPTRDIFF_T yynewbytes; \
1513 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
1514 Stack = &yyptr->Stack_alloc; \
1515 yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \
1516 yyptr += yynewbytes / YYSIZEOF (*yyptr); \
1517 } \
1518 while (0)
1519
1520#endif
1521
1522#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
1523/* Copy COUNT objects from SRC to DST. The source and destination do
1524 not overlap. */
1525# ifndef YYCOPY
1526# if defined __GNUC__ && 1 < __GNUC__
1527# define YYCOPY(Dst, Src, Count) \
1528 __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src)))
1529# else
1530# define YYCOPY(Dst, Src, Count) \
1531 do \
1532 { \
1533 YYPTRDIFF_T yyi; \
1534 for (yyi = 0; yyi < (Count); yyi++) \
1535 (Dst)[yyi] = (Src)[yyi]; \
1536 } \
1537 while (0)
1538# endif
1539# endif
1540#endif /* !YYCOPY_NEEDED */
1541
1542/* YYFINAL -- State number of the termination state. */
1543#define YYFINAL 3
1544/* YYLAST -- Last index in YYTABLE. */
1545#define YYLAST 13883
1546
1547/* YYNTOKENS -- Number of terminals. */
1548#define YYNTOKENS 154
1549/* YYNNTS -- Number of nonterminals. */
1550#define YYNNTS 266
1551/* YYNRULES -- Number of rules. */
1552#define YYNRULES 761
1553/* YYNSTATES -- Number of states. */
1554#define YYNSTATES 1251
1555
1556#define YYUNDEFTOK 2
1557#define YYMAXUTOK 353
1558
1559
1560/* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM
1561 as returned by yylex, with out-of-bounds checking. */
1562#define YYTRANSLATE(YYX) \
1563 (0 <= (YYX) && (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
1564
1565/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
1566 as returned by yylex. */
1567static const yytype_uint8 yytranslate[] =
1568{
1569 0, 2, 2, 2, 2, 2, 2, 2, 2, 71,
1570 153, 74, 72, 73, 2, 2, 2, 2, 2, 2,
1571 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1572 2, 2, 152, 140, 2, 2, 2, 138, 133, 2,
1573 148, 149, 136, 134, 146, 135, 68, 137, 2, 2,
1574 2, 2, 2, 2, 2, 2, 2, 2, 128, 151,
1575 130, 126, 129, 127, 2, 2, 2, 2, 2, 2,
1576 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1577 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1578 2, 145, 69, 150, 132, 2, 147, 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, 2, 2, 143, 131, 144, 141, 2, 88, 89,
1582 90, 91, 75, 76, 77, 78, 94, 95, 83, 82,
1583 79, 80, 81, 86, 87, 92, 93, 97, 84, 85,
1584 96, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1585 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1586 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1587 2, 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, 1, 2, 3, 4,
1595 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
1596 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
1597 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
1598 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
1599 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
1600 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
1601 65, 66, 67, 70, 98, 99, 100, 101, 102, 103,
1602 104, 105, 106, 107, 108, 109, 110, 111, 112, 113,
1603 114, 115, 116, 117, 118, 119, 120, 121, 122, 123,
1604 124, 125, 139, 142
1605};
1606
1607#if YYDEBUG
1608 /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
1609static const yytype_int16 yyrline[] =
1610{
1611 0, 1177, 1177, 1177, 1203, 1209, 1216, 1223, 1230, 1236,
1612 1237, 1243, 1256, 1254, 1265, 1276, 1282, 1289, 1296, 1303,
1613 1309, 1314, 1313, 1323, 1323, 1330, 1337, 1347, 1355, 1362,
1614 1370, 1378, 1390, 1402, 1412, 1426, 1427, 1435, 1443, 1452,
1615 1459, 1462, 1469, 1476, 1484, 1491, 1498, 1506, 1513, 1523,
1616 1528, 1537, 1540, 1541, 1545, 1549, 1553, 1558, 1565, 1567,
1617 1557, 1575, 1578, 1585, 1585, 1585, 1591, 1592, 1595, 1596,
1618 1605, 1615, 1625, 1634, 1645, 1652, 1659, 1666, 1673, 1681,
1619 1689, 1696, 1703, 1712, 1713, 1722, 1723, 1732, 1739, 1746,
1620 1753, 1760, 1767, 1774, 1781, 1788, 1795, 1804, 1805, 1814,
1621 1821, 1830, 1837, 1846, 1853, 1860, 1867, 1877, 1884, 1894,
1622 1901, 1908, 1918, 1925, 1932, 1939, 1946, 1953, 1960, 1967,
1623 1974, 1984, 1991, 1994, 2001, 2008, 2017, 2018, 2019, 2020,
1624 2025, 2028, 2035, 2038, 2045, 2045, 2055, 2056, 2057, 2058,
1625 2059, 2060, 2061, 2062, 2063, 2064, 2065, 2066, 2067, 2068,
1626 2069, 2070, 2071, 2072, 2073, 2074, 2075, 2076, 2077, 2078,
1627 2079, 2080, 2081, 2082, 2083, 2084, 2087, 2087, 2087, 2088,
1628 2088, 2089, 2089, 2089, 2090, 2090, 2090, 2090, 2091, 2091,
1629 2091, 2091, 2092, 2092, 2092, 2093, 2093, 2093, 2093, 2094,
1630 2094, 2094, 2094, 2095, 2095, 2095, 2095, 2096, 2096, 2096,
1631 2096, 2097, 2097, 2097, 2097, 2098, 2098, 2101, 2108, 2115,
1632 2123, 2131, 2139, 2147, 2155, 2162, 2170, 2179, 2188, 2200,
1633 2212, 2224, 2236, 2240, 2244, 2248, 2252, 2256, 2260, 2264,
1634 2268, 2272, 2276, 2280, 2284, 2288, 2289, 2293, 2297, 2301,
1635 2305, 2309, 2313, 2317, 2321, 2325, 2329, 2333, 2333, 2338,
1636 2347, 2353, 2354, 2355, 2356, 2359, 2363, 2370, 2377, 2378,
1637 2382, 2389, 2398, 2403, 2414, 2421, 2447, 2476, 2477, 2480,
1638 2481, 2482, 2486, 2493, 2502, 2510, 2517, 2525, 2533, 2537,
1639 2537, 2574, 2583, 2587, 2593, 2600, 2607, 2614, 2623, 2624,
1640 2627, 2634, 2641, 2650, 2651, 2652, 2653, 2654, 2655, 2656,
1641 2657, 2658, 2659, 2660, 2668, 2667, 2682, 2682, 2689, 2689,
1642 2697, 2705, 2712, 2719, 2726, 2734, 2741, 2748, 2755, 2762,
1643 2762, 2767, 2771, 2775, 2782, 2783, 2792, 2791, 2802, 2813,
1644 2824, 2834, 2845, 2844, 2861, 2860, 2875, 2884, 2929, 2928,
1645 2952, 2951, 2974, 2973, 2997, 3003, 2996, 3023, 3024, 3023,
1646 3049, 3056, 3063, 3070, 3079, 3086, 3092, 3109, 3115, 3121,
1647 3127, 3133, 3139, 3145, 3151, 3157, 3163, 3169, 3175, 3181,
1648 3187, 3202, 3209, 3215, 3222, 3223, 3224, 3227, 3228, 3231,
1649 3232, 3244, 3245, 3254, 3255, 3258, 3266, 3275, 3282, 3291,
1650 3298, 3305, 3312, 3319, 3328, 3336, 3345, 3349, 3353, 3357,
1651 3361, 3367, 3372, 3377, 3381, 3385, 3389, 3393, 3397, 3405,
1652 3409, 3413, 3417, 3421, 3425, 3429, 3433, 3437, 3443, 3444,
1653 3450, 3459, 3471, 3475, 3484, 3486, 3490, 3495, 3501, 3504,
1654 3508, 3512, 3516, 3501, 3540, 3548, 3558, 3563, 3569, 3579,
1655 3593, 3600, 3607, 3616, 3625, 3633, 3641, 3648, 3656, 3664,
1656 3671, 3678, 3691, 3699, 3709, 3710, 3714, 3709, 3731, 3732,
1657 3736, 3731, 3755, 3763, 3770, 3778, 3787, 3799, 3800, 3804,
1658 3810, 3811, 3813, 3814, 3815, 3803, 3828, 3829, 3832, 3833,
1659 3841, 3851, 3852, 3857, 3865, 3869, 3875, 3878, 3887, 3890,
1660 3897, 3900, 3901, 3903, 3904, 3913, 3922, 3927, 3936, 3945,
1661 3950, 3950, 3955, 3961, 3960, 3972, 3977, 3977, 3984, 3993,
1662 3997, 4006, 4010, 4014, 4018, 4022, 4025, 4029, 4038, 4042,
1663 4046, 4050, 4056, 4057, 4066, 4075, 4079, 4083, 4087, 4091,
1664 4095, 4101, 4103, 4112, 4120, 4134, 4135, 4158, 4162, 4168,
1665 4174, 4175, 4184, 4193, 4205, 4217, 4218, 4219, 4220, 4232,
1666 4246, 4247, 4248, 4249, 4250, 4251, 4252, 4253, 4254, 4262,
1667 4261, 4274, 4284, 4297, 4304, 4311, 4320, 4332, 4335, 4342,
1668 4349, 4352, 4356, 4359, 4366, 4369, 4370, 4373, 4390, 4391,
1669 4392, 4401, 4411, 4420, 4426, 4436, 4442, 4451, 4453, 4462,
1670 4472, 4478, 4487, 4496, 4506, 4512, 4522, 4528, 4538, 4548,
1671 4567, 4573, 4583, 4593, 4634, 4637, 4636, 4653, 4657, 4662,
1672 4666, 4670, 4652, 4691, 4698, 4705, 4712, 4715, 4716, 4719,
1673 4729, 4730, 4731, 4732, 4735, 4745, 4746, 4756, 4757, 4758,
1674 4759, 4762, 4763, 4764, 4765, 4766, 4769, 4770, 4771, 4772,
1675 4773, 4774, 4775, 4778, 4791, 4800, 4807, 4816, 4817, 4821,
1676 4820, 4830, 4838, 4847, 4862, 4877, 4877, 4891, 4895, 4899,
1677 4903, 4907, 4913, 4918, 4923, 4927, 4931, 4935, 4939, 4943,
1678 4947, 4951, 4955, 4959, 4963, 4967, 4971, 4975, 4980, 4986,
1679 4995, 5003, 5011, 5019, 5029, 5030, 5038, 5047, 5055, 5076,
1680 5078, 5091, 5101, 5109, 5119, 5126, 5135, 5142, 5152, 5159,
1681 5168, 5169, 5172, 5180, 5188, 5198, 5208, 5218, 5225, 5234,
1682 5241, 5250, 5251, 5254, 5262, 5272, 5273, 5276, 5286, 5290,
1683 5296, 5301, 5301, 5325, 5326, 5335, 5337, 5360, 5371, 5378,
1684 5386, 5405, 5406, 5407, 5410, 5411, 5412, 5413, 5416, 5417,
1685 5418, 5421, 5422, 5425, 5426, 5429, 5430, 5433, 5434, 5437,
1686 5438, 5441, 5444, 5447, 5450, 5451, 5452, 5455, 5456, 5459,
1687 5460, 5464
1688};
1689#endif
1690
1691#if YYDEBUG || YYERROR_VERBOSE || 1
1692/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
1693 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
1694static const char *const yytname[] =
1695{
1696 "\"end-of-input\"", "error", "$undefined", "\"`class'\"",
1697 "\"`module'\"", "\"`def'\"", "\"`undef'\"", "\"`begin'\"",
1698 "\"`rescue'\"", "\"`ensure'\"", "\"`end'\"", "\"`if'\"", "\"`unless'\"",
1699 "\"`then'\"", "\"`elsif'\"", "\"`else'\"", "\"`case'\"", "\"`when'\"",
1700 "\"`while'\"", "\"`until'\"", "\"`for'\"", "\"`break'\"", "\"`next'\"",
1701 "\"`redo'\"", "\"`retry'\"", "\"`in'\"", "\"`do'\"",
1702 "\"`do' for condition\"", "\"`do' for block\"", "\"`do' for lambda\"",
1703 "\"`return'\"", "\"`yield'\"", "\"`super'\"", "\"`self'\"", "\"`nil'\"",
1704 "\"`true'\"", "\"`false'\"", "\"`and'\"", "\"`or'\"", "\"`not'\"",
1705 "\"`if' modifier\"", "\"`unless' modifier\"", "\"`while' modifier\"",
1706 "\"`until' modifier\"", "\"`rescue' modifier\"", "\"`alias'\"",
1707 "\"`defined?'\"", "\"`BEGIN'\"", "\"`END'\"", "\"`__LINE__'\"",
1708 "\"`__FILE__'\"", "\"`__ENCODING__'\"", "\"local variable or method\"",
1709 "\"method\"", "\"global variable\"", "\"instance variable\"",
1710 "\"constant\"", "\"class variable\"", "tLABEL", "\"integer literal\"",
1711 "\"float literal\"", "\"rational literal\"", "\"imaginary literal\"",
1712 "\"char literal\"", "\"numbered reference\"", "\"back reference\"",
1713 "\"literal content\"", "tREGEXP_END", "'.'", "\"backslash\"",
1714 "\"escaped space\"", "\"escaped horizontal tab\"",
1715 "\"escaped form feed\"", "\"escaped carriage return\"",
1716 "\"escaped vertical tab\"", "\"unary+\"", "\"unary-\"", "\"**\"",
1717 "\"<=>\"", "\"==\"", "\"===\"", "\"!=\"", "\">=\"", "\"<=\"", "\"&&\"",
1718 "\"||\"", "\"=~\"", "\"!~\"", "\"..\"", "\"...\"", "\"(..\"", "\"(...\"",
1719 "\"[]\"", "\"[]=\"", "\"<<\"", "\">>\"", "\"&.\"", "\"::\"",
1720 "\":: at EXPR_BEG\"", "\"operator-assignment\"", "\"=>\"", "\"(\"",
1721 "\"( arg\"", "\")\"", "\"[\"", "\"{\"", "\"{ arg\"", "\"*\"",
1722 "\"**arg\"", "\"&\"", "\"->\"", "\"symbol literal\"",
1723 "\"string literal\"", "\"backtick literal\"", "\"regexp literal\"",
1724 "\"word list\"", "\"verbatim word list\"", "\"symbol list\"",
1725 "\"verbatim symbol list\"", "\"terminator\"", "\"'}'\"", "tSTRING_DBEG",
1726 "tSTRING_DVAR", "tLAMBEG", "tLABEL_END", "tLOWEST", "'='", "'?'", "':'",
1727 "'>'", "'<'", "'|'", "'^'", "'&'", "'+'", "'-'", "'*'", "'/'", "'%'",
1728 "tUMINUS_NUM", "'!'", "'~'", "tLAST_TOKEN", "'{'", "'}'", "'['", "','",
1729 "'`'", "'('", "')'", "']'", "';'", "' '", "'\\n'", "$accept", "program",
1730 "$@1", "top_compstmt", "top_stmts", "top_stmt", "begin_block",
1731 "bodystmt", "$@2", "compstmt", "stmts", "stmt_or_begin", "$@3", "stmt",
1732 "$@4", "command_asgn", "command_rhs", "expr", "@5", "@6", "$@7",
1733 "expr_value", "expr_value_do", "$@8", "$@9", "command_call",
1734 "block_command", "cmd_brace_block", "fcall", "command", "mlhs",
1735 "mlhs_inner", "mlhs_basic", "mlhs_item", "mlhs_head", "mlhs_post",
1736 "mlhs_node", "lhs", "cname", "cpath", "fname", "fitem", "undef_list",
1737 "$@10", "op", "reswords", "arg", "$@11", "relop", "rel_expr",
1738 "arg_value", "aref_args", "arg_rhs", "paren_args", "opt_paren_args",
1739 "opt_call_args", "call_args", "command_args", "$@12", "block_arg",
1740 "opt_block_arg", "args", "mrhs_arg", "mrhs", "primary", "$@13", "$@14",
1741 "$@15", "$@16", "$@17", "@18", "@19", "$@20", "@21", "$@22", "@23",
1742 "@24", "@25", "@26", "primary_value", "k_begin", "k_if", "k_unless",
1743 "k_while", "k_until", "k_case", "k_for", "k_class", "k_module", "k_def",
1744 "k_do", "k_do_block", "k_rescue", "k_ensure", "k_when", "k_else",
1745 "k_elsif", "k_end", "k_return", "then", "do", "if_tail", "opt_else",
1746 "for_var", "f_marg", "f_marg_list", "f_margs", "f_rest_marg",
1747 "block_args_tail", "opt_block_args_tail", "block_param",
1748 "opt_block_param", "block_param_def", "opt_bv_decl", "bv_decls", "bvar",
1749 "lambda", "@27", "@28", "@29", "@30", "$@31", "f_larglist",
1750 "lambda_body", "do_block", "block_call", "method_call", "brace_block",
1751 "brace_body", "@32", "@33", "@34", "do_body", "@35", "@36", "@37",
1752 "case_args", "case_body", "cases", "p_case_body", "@38", "@39", "@40",
1753 "$@41", "$@42", "$@43", "p_cases", "p_top_expr", "p_top_expr_body",
1754 "p_expr", "p_as", "p_alt", "p_lparen", "p_lbracket", "p_expr_basic",
1755 "@44", "@45", "@46", "p_args", "p_args_head", "p_args_tail",
1756 "p_args_post", "p_arg", "p_kwargs", "p_kwarg", "p_kw", "p_kw_label",
1757 "p_kwrest", "p_kwnorest", "p_value", "p_primitive", "$@47", "p_variable",
1758 "p_var_ref", "p_const", "opt_rescue", "exc_list", "exc_var",
1759 "opt_ensure", "literal", "strings", "string", "string1", "xstring",
1760 "regexp", "words", "word_list", "word", "symbols", "symbol_list",
1761 "qwords", "qsymbols", "qword_list", "qsym_list", "string_contents",
1762 "xstring_contents", "regexp_contents", "string_content", "@48", "$@49",
1763 "@50", "@51", "@52", "@53", "string_dvar", "symbol", "ssym", "sym",
1764 "dsym", "numeric", "simple_numeric", "user_variable", "keyword_variable",
1765 "var_ref", "var_lhs", "backref", "superclass", "$@54", "f_arglist",
1766 "@55", "args_tail", "opt_args_tail", "f_args", "args_forward",
1767 "f_bad_arg", "f_norm_arg", "f_arg_asgn", "f_arg_item", "f_arg",
1768 "f_label", "f_kw", "f_block_kw", "f_block_kwarg", "f_kwarg",
1769 "kwrest_mark", "f_no_kwarg", "f_kwrest", "f_opt", "f_block_opt",
1770 "f_block_optarg", "f_optarg", "restarg_mark", "f_rest_arg",
1771 "blkarg_mark", "f_block_arg", "opt_f_block_arg", "singleton", "$@56",
1772 "assoc_list", "assocs", "assoc", "operation", "operation2", "operation3",
1773 "dot_or_colon", "call_op", "call_op2", "opt_terms", "opt_nl", "rparen",
1774 "rbracket", "rbrace", "trailer", "term", "terms", "none", YY_NULLPTR
1775};
1776#endif
1777
1778# ifdef YYPRINT
1779/* YYTOKNUM[NUM] -- (External) token number corresponding to the
1780 (internal) symbol number NUM (which must be that of a token). */
1781static const yytype_int16 yytoknum[] =
1782{
1783 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
1784 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
1785 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
1786 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
1787 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
1788 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
1789 315, 316, 317, 318, 319, 320, 321, 322, 46, 92,
1790 323, 9, 12, 13, 11, 132, 133, 134, 135, 140,
1791 141, 142, 139, 138, 148, 149, 143, 144, 128, 129,
1792 130, 131, 145, 146, 136, 137, 150, 147, 324, 325,
1793 326, 327, 328, 329, 330, 331, 332, 333, 334, 335,
1794 336, 337, 338, 339, 340, 341, 342, 343, 344, 345,
1795 346, 347, 348, 349, 350, 351, 61, 63, 58, 62,
1796 60, 124, 94, 38, 43, 45, 42, 47, 37, 352,
1797 33, 126, 353, 123, 125, 91, 44, 96, 40, 41,
1798 93, 59, 32, 10
1799};
1800# endif
1801
1802#define YYPACT_NINF (-1040)
1803
1804#define yypact_value_is_default(Yyn) \
1805 ((Yyn) == YYPACT_NINF)
1806
1807#define YYTABLE_NINF (-762)
1808
1809#define yytable_value_is_error(Yyn) \
1810 ((Yyn) == YYTABLE_NINF)
1811
1812 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
1813 STATE-NUM. */
1814static const yytype_int16 yypact[] =
1815{
1816 -1040, 114, 3745, -1040, 9167, -1040, -1040, -1040, 8625, -1040,
1817 -1040, -1040, -1040, -1040, -1040, -1040, 9293, 9293, -1040, -1040,
1818 -1040, 5085, 4644, -1040, -1040, -1040, -1040, 384, 8480, -27,
1819 236, 280, -1040, -1040, -1040, 3909, 4791, -1040, -1040, 4056,
1820 -1040, -1040, -1040, -1040, -1040, -1040, -1040, -1040, 11057, 11057,
1821 11057, 11057, 124, 6680, 9419, 9923, 10301, 8909, -1040, 8335,
1822 -1040, -1040, -1040, 282, 316, 388, 413, 996, 11183, 11057,
1823 -1040, 799, -1040, 1065, -1040, 374, -1040, -1040, 367, 549,
1824 495, -1040, 485, 11435, -1040, 520, 1591, 398, 65, 348,
1825 -1040, 11309, 11309, -1040, -1040, 7662, 11557, 11679, 11801, 8189,
1826 9293, 424, 95, -1040, -1040, 544, -1040, -1040, -1040, -1040,
1827 -1040, -1040, -1040, -1040, -1040, -1040, -1040, -1040, 323, 435,
1828 -1040, 570, 518, -1040, -1040, -1040, -1040, -1040, -1040, -1040,
1829 -1040, -1040, -1040, -1040, -1040, -1040, -1040, -1040, -1040, -1040,
1830 -1040, -1040, -1040, -1040, -1040, -1040, -1040, -1040, -1040, -1040,
1831 -1040, -1040, -1040, -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, 547, -1040, -1040, -1040, 580, 11057, 634, 6831,
1837 11057, 11057, 11057, -1040, 11057, -1040, 613, 4181, 679, -1040,
1838 -1040, 640, 496, 353, 453, 696, 553, 655, -1040, -1040,
1839 7536, -1040, 9293, 9545, -1040, -1040, 7788, -1040, 11309, 863,
1840 -1040, 671, 6982, -1040, 7133, -1040, -1040, 702, 708, 367,
1841 -1040, 531, -1040, 759, 4328, 4328, 551, 9419, -1040, 6680,
1842 713, 799, -1040, 1065, -27, 745, -1040, 1065, -27, 750,
1843 -33, 38, -1040, 679, 765, 38, -1040, -27, 838, 996,
1844 11923, 769, -1040, 536, 562, 605, 659, -1040, -1040, -1040,
1845 -1040, -1040, 600, -1040, 716, 911, 438, -1040, -1040, -1040,
1846 -1040, 843, -1040, -1040, -1040, -1040, -1040, -1040, -1040, 7914,
1847 11309, 11309, 11309, 11309, 9419, 11309, 11309, -1040, -1040, -1040,
1848 824, -1040, -1040, -1040, -1040, -1040, 10427, -1040, 6680, 9038,
1849 794, 10427, -1040, 11057, 11057, 11057, 11057, 11057, -1040, -1040,
1850 11057, 11057, 11057, 11057, 11057, 11057, 11057, 11057, 11057, -1040,
1851 -1040, 11057, 11057, 11057, 11057, 11057, 11057, 11057, 11057, 11057,
1852 11057, -1040, -1040, 12386, 9293, 12476, 5824, 374, 106, 106,
1853 7284, 11309, 7284, 799, -1040, 798, 885, -1040, -1040, 662,
1854 928, 117, 127, 141, 439, 670, 11309, 880, -1040, 832,
1855 701, -1040, -1040, -1040, -1040, 34, 78, 415, 543, 558,
1856 612, 626, 632, 720, -1040, -1040, -1040, 732, -1040, -1040,
1857 -1040, 13736, -1040, -1040, 11183, 11183, -1040, -1040, 585, -1040,
1858 -1040, -1040, 777, 11057, 11057, 9671, -1040, -1040, 12566, 9293,
1859 12656, 11057, 11057, 10049, -1040, -27, 826, -1040, -1040, 11057,
1860 -27, -1040, 836, -27, 842, -1040, 133, -1040, -1040, -1040,
1861 -1040, -1040, 8625, -1040, 11057, 834, 847, 12566, 12656, 11057,
1862 1065, 236, -27, -1040, -1040, 8040, 846, -27, -1040, -1040,
1863 10175, -1040, -1040, 10301, -1040, -1040, -1040, 671, 731, -1040,
1864 -1040, 850, 11923, 12746, 9293, 12836, -1040, -1040, -1040, -1040,
1865 -1040, -1040, -1040, -1040, -1040, -1040, -1040, -1040, 931, 59,
1866 960, 340, 11057, -1040, -1040, -1040, -1040, -1040, -1040, -1040,
1867 -1040, -1040, 851, -1040, -1040, -1040, 990, -1040, 990, 11057,
1868 -1040, 855, 857, 963, -1040, -27, 11923, 858, -1040, -1040,
1869 -1040, 966, 887, 3887, -1040, -1040, -1040, 737, 663, -1040,
1870 759, 4622, 4622, 4622, 4622, 4769, 4475, 4622, 4622, 4328,
1871 4328, 849, 849, 3200, 1162, 1162, 886, 436, 436, 759,
1872 759, 759, 1842, 1842, 5232, 4203, 5526, 4350, -1040, 708,
1873 -1040, -27, 866, 588, -1040, 666, -1040, -1040, 4938, 990,
1874 1010, -1040, 5975, 1012, 6428, 990, 54, 990, 1003, 1018,
1875 144, 12926, 9293, 13016, -1040, 374, -1040, 731, -1040, -1040,
1876 -1040, 13106, 9293, 13196, 5824, 11309, -1040, -1040, -1040, -1040,
1877 -1040, -1040, 3529, -1040, 4034, -1040, -1040, -1040, 8625, 11057,
1878 -1040, 11057, 679, -1040, 655, 3369, 4497, -27, 688, 722,
1879 -1040, -1040, -1040, -1040, 9797, -1040, 10049, -1040, -1040, 11309,
1880 4181, -1040, -1040, 708, 708, -1040, -1040, 345, -1040, -1040,
1881 38, 11923, 850, 37, 470, -27, 271, 349, -1040, -1040,
1882 1007, -1040, 487, -1040, 877, -1040, -1040, 491, 884, -1040,
1883 759, -1040, -1040, 893, -1040, -1040, -1040, -1040, 895, 10553,
1884 9419, -1040, 850, 11923, 9419, 11183, 11057, 13286, 9293, 13376,
1885 12319, 918, 11183, 11183, -1040, 824, 889, 727, 9671, 11183,
1886 11183, -1040, -1040, 824, -1040, -1040, -1040, 10679, 738, -1040,
1887 574, -1040, 1033, -1040, -1040, -1040, -1040, -1040, -1040, 1018,
1888 990, -1040, 10805, 990, 72, 235, -27, 156, 312, 7284,
1889 799, 11309, 5824, 897, 470, -1040, -27, 990, 133, 921,
1890 8770, 95, 549, -1040, -1040, -1040, -1040, 11057, 11057, 733,
1891 11057, 11057, -27, 920, 133, -1040, -1040, 350, -1040, -1040,
1892 -1040, -1040, -1040, -1040, -1040, -1040, -1040, -1040, -1040, -1040,
1893 939, -1040, 939, 11057, 927, -1040, 850, -1040, 4181, 5379,
1894 5673, -27, 753, 786, -1040, -1040, 2945, 2945, 881, -1040,
1895 356, 631, -1040, 1024, 978, -1040, 952, -1040, -1040, 742,
1896 -1040, -1040, 341, -1040, -1040, -1040, -1040, -1040, -1040, -1040,
1897 -1040, -1040, 11057, -1040, -1040, -1040, -1040, -1040, -1040, 11183,
1898 -1040, -1040, -1040, -1040, -1040, 855, -1040, 989, -1040, -1040,
1899 -1040, 7284, -1040, -1040, -1040, -1040, 7284, 11309, 990, -1040,
1900 -1040, 990, -1040, -1040, 990, -1040, 11057, -1040, 26, -1040,
1901 332, 990, 5824, 799, 990, -1040, -1040, -1040, 2196, 5824,
1902 2402, -1040, -1040, -1040, 11057, -1040, 10049, -1040, 1834, -1040,
1903 1556, 7133, -1040, -1040, 5824, 944, 787, -1040, -1040, -1040,
1904 -1040, 12319, 12200, -1040, 577, 949, -1040, -1040, -1040, 1043,
1905 -1040, 12319, 2945, 2945, 881, 356, 790, 3608, 3608, 4181,
1906 -1040, -1040, 12045, 106, -1040, -1040, 6554, -1040, 106, -1040,
1907 -1040, -1040, -1040, -1040, 10931, 6126, -1040, 990, -1040, -1040,
1908 -1040, -1040, -1040, -1040, -1040, -1040, -1040, -1040, 1151, -1040,
1909 -1040, -1040, -1040, -1040, -1040, -27, -27, -1040, -1040, 973,
1910 -1040, 954, 11057, -1040, 956, 546, 965, 965, -1040, 967,
1911 1049, 968, 1066, -1040, 990, 799, 974, 921, 2402, -1040,
1912 -1040, -1040, -1040, -27, 991, 995, 979, 12167, -1040, 981,
1913 965, 965, -1040, 982, 992, -1040, 999, -1040, -1040, 3,
1914 264, 355, -27, 12286, -1040, 1001, -1040, -1040, -27, 1011,
1915 -1040, 12319, -1040, -1040, 744, -1040, -1040, -1040, -1040, -1040,
1916 -1040, -1040, -1040, -1040, -1040, -27, -27, -27, -27, 1068,
1917 -1040, 743, 198, 203, 213, 5824, 1133, 5975, 3608, 11057,
1918 -1040, 955, -1040, 1151, 1079, -1040, 1022, -27, 1025, -1040,
1919 -1040, -1040, 11057, 2196, -1040, -1040, 714, -1040, -1040, -1040,
1920 -1040, 243, -1040, -1040, 2402, -1040, -1040, 1417, -1040, -1040,
1921 -1040, -1040, 2402, 5824, -27, 291, 7410, 1027, -1040, 12167,
1922 2402, -1040, 1108, 748, 714, -1040, -1040, -1040, 2402, -1040,
1923 1417, -1040, 1089, -1040, 1028, 12319, -1040, 307, 978, 1031,
1924 -1040, 652, -1040, 577, 978, -1040, -1040, 800, -1040, -1040,
1925 -1040, -1040, 248, 13466, 9293, 13556, 1010, -1040, 574, 106,
1926 801, 377, -1040, -1040, -1040, -1040, -1040, -1040, -27, -1040,
1927 1151, -1040, 1097, -1040, -1040, -27, -1040, 1032, 1037, -1040,
1928 1121, 965, -1040, 1040, -1040, 1041, -1040, 1040, 990, 1046,
1929 5824, 7133, -1040, 1069, -1040, 748, -1040, 1051, 1053, -1040,
1930 13646, -1040, 965, 1054, -1040, 1067, 1054, -1040, 542, -1040,
1931 -1040, 12319, 1071, -1040, 1072, 12319, -1040, -1040, -1040, -1040,
1932 -1040, 61, 202, -27, 286, 313, -1040, -1040, -1040, 11309,
1933 11309, 12200, -1040, -1040, 1073, 1074, -1040, 2402, -1040, 1417,
1934 -1040, -1040, 1417, -1040, 1417, -1040, -1040, -1040, -1040, 990,
1935 1048, -1040, 2402, -1040, 1417, -1040, 1075, 1076, -1040, 1417,
1936 -1040, 1417, -1040, -1040, 1089, -1040, 1071, 12319, 12319, 1071,
1937 321, -1040, -1040, -1040, -1040, 1097, 1097, 1040, 1080, 1040,
1938 1040, -1040, -1040, 1054, 1087, 1054, 1054, -1040, -1040, 1071,
1939 -1040, 1074, -1040, 1417, -1040, -1040, -1040, -1040, 1417, -1040,
1940 -1040, -1040, 6277, 1040, 1054, 576, -1040, -1040, -1040, -1040,
1941 -1040
1942};
1943
1944 /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
1945 Performed when YYTABLE does not specify something else to do. Zero
1946 means the default is an error. */
1947static const yytype_int16 yydefact[] =
1948{
1949 2, 0, 0, 1, 0, 362, 363, 364, 0, 355,
1950 356, 357, 360, 358, 359, 361, 350, 351, 352, 353,
1951 373, 279, 279, 637, 636, 638, 639, 749, 0, 749,
1952 0, 0, 641, 640, 642, 731, 733, 633, 632, 732,
1953 635, 627, 628, 629, 630, 578, 647, 648, 0, 0,
1954 0, 0, 0, 0, 306, 761, 761, 95, 326, 598,
1955 598, 600, 602, 0, 0, 0, 0, 0, 0, 0,
1956 3, 747, 6, 9, 35, 40, 52, 67, 279, 66,
1957 0, 83, 0, 87, 97, 0, 61, 235, 250, 0,
1958 304, 0, 0, 63, 63, 747, 0, 0, 0, 0,
1959 315, 68, 324, 293, 294, 577, 579, 295, 296, 297,
1960 299, 298, 300, 576, 617, 618, 575, 625, 643, 644,
1961 301, 0, 302, 71, 5, 8, 176, 187, 177, 200,
1962 173, 193, 183, 182, 203, 204, 198, 181, 180, 175,
1963 201, 205, 206, 185, 174, 188, 192, 194, 186, 179,
1964 195, 202, 197, 196, 189, 199, 184, 172, 191, 190,
1965 171, 178, 169, 170, 166, 167, 168, 126, 128, 127,
1966 161, 162, 157, 139, 140, 141, 148, 145, 147, 142,
1967 143, 163, 164, 149, 150, 154, 158, 144, 146, 136,
1968 137, 138, 151, 152, 153, 155, 156, 159, 160, 165,
1969 131, 133, 28, 129, 130, 132, 0, 0, 0, 0,
1970 0, 0, 0, 598, 0, 274, 0, 257, 284, 81,
1971 278, 761, 0, 643, 644, 0, 302, 761, 725, 82,
1972 749, 79, 0, 761, 449, 78, 749, 750, 0, 0,
1973 23, 247, 0, 10, 0, 350, 351, 318, 450, 0,
1974 229, 0, 315, 230, 220, 221, 312, 0, 21, 0,
1975 0, 747, 17, 20, 749, 85, 16, 308, 749, 0,
1976 754, 754, 258, 0, 0, 754, 723, 749, 0, 0,
1977 0, 93, 354, 0, 103, 104, 111, 428, 622, 621,
1978 623, 620, 0, 619, 0, 0, 0, 585, 594, 590,
1979 596, 626, 56, 241, 242, 757, 758, 4, 759, 748,
1980 0, 0, 0, 0, 0, 0, 0, 365, 454, 443,
1981 72, 458, 323, 366, 458, 439, 0, 99, 0, 91,
1982 88, 0, 57, 0, 0, 0, 0, 0, 253, 254,
1983 0, 0, 0, 0, 218, 219, 0, 0, 0, 251,
1984 252, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1985 0, 743, 744, 0, 761, 0, 0, 62, 0, 0,
1986 0, 0, 0, 747, 334, 748, 0, 384, 383, 0,
1987 0, 643, 644, 302, 121, 122, 0, 0, 124, 651,
1988 0, 643, 644, 302, 342, 196, 189, 199, 184, 166,
1989 167, 168, 126, 127, 721, 344, 720, 0, 80, 746,
1990 745, 0, 325, 580, 0, 0, 134, 728, 312, 285,
1991 730, 281, 0, 0, 0, 0, 275, 283, 0, 761,
1992 0, 0, 0, 0, 276, 749, 0, 317, 280, 679,
1993 749, 270, 761, 749, 761, 269, 749, 322, 55, 25,
1994 27, 26, 0, 319, 0, 0, 0, 0, 0, 0,
1995 19, 0, 749, 310, 15, 748, 84, 749, 307, 313,
1996 756, 755, 259, 756, 261, 314, 724, 0, 110, 626,
1997 101, 96, 0, 0, 761, 0, 327, 429, 604, 624,
1998 607, 605, 599, 581, 582, 601, 583, 603, 0, 0,
1999 0, 0, 0, 760, 7, 29, 30, 31, 32, 33,
2000 53, 54, 0, 455, 454, 73, 0, 459, 0, 0,
2001 36, 289, 0, 39, 288, 749, 0, 89, 100, 51,
2002 41, 49, 0, 262, 284, 207, 37, 0, 302, 58,
2003 227, 234, 236, 237, 238, 245, 246, 239, 240, 216,
2004 217, 243, 244, 749, 231, 232, 233, 222, 223, 224,
2005 225, 226, 255, 256, 734, 736, 735, 737, 448, 279,
2006 446, 749, 761, 734, 736, 735, 737, 447, 279, 0,
2007 761, 375, 0, 374, 0, 0, 0, 0, 332, 0,
2008 312, 0, 761, 0, 63, 340, 121, 122, 123, 649,
2009 338, 0, 761, 0, 0, 0, 345, 741, 742, 347,
2010 734, 735, 279, 42, 262, 208, 48, 215, 0, 0,
2011 727, 0, 286, 282, 761, 734, 735, 749, 734, 735,
2012 726, 316, 751, 264, 271, 266, 273, 321, 24, 0,
2013 248, 11, 34, 0, 761, 214, 22, 86, 18, 309,
2014 754, 0, 94, 738, 109, 749, 734, 735, 430, 608,
2015 0, 584, 0, 587, 0, 592, 589, 0, 0, 593,
2016 228, 452, 456, 0, 372, 453, 460, 438, 292, 0,
2017 0, 98, 92, 0, 0, 0, 0, 0, 761, 0,
2018 0, 0, 0, 0, 445, 76, 0, 451, 271, 0,
2019 0, 268, 444, 74, 267, 305, 367, 761, 761, 567,
2020 761, 376, 761, 330, 378, 64, 377, 331, 469, 0,
2021 0, 369, 0, 0, 738, 311, 749, 734, 735, 0,
2022 0, 0, 0, 121, 122, 125, 749, 0, 749, 655,
2023 0, 440, 69, 135, 729, 287, 277, 0, 0, 451,
2024 0, 0, 749, 761, 749, 260, 102, 451, 431, 609,
2025 613, 614, 615, 606, 616, 586, 588, 595, 591, 597,
2026 761, 70, 761, 0, 290, 38, 90, 50, 263, 734,
2027 735, 749, 734, 735, 561, 565, 0, 0, 0, 506,
2028 500, 503, 559, 0, 59, 486, 488, 490, 493, 540,
2029 545, 546, 547, 550, 551, 552, 553, 554, 556, 555,
2030 557, 558, 0, 47, 212, 46, 213, 77, 752, 0,
2031 44, 210, 45, 211, 75, 568, 569, 761, 570, 368,
2032 370, 0, 12, 14, 574, 371, 0, 0, 0, 379,
2033 381, 0, 65, 470, 0, 336, 0, 462, 0, 335,
2034 451, 0, 0, 0, 0, 451, 343, 722, 678, 0,
2035 678, 348, 441, 442, 0, 265, 272, 320, 678, 610,
2036 749, 0, 419, 418, 0, 291, 451, 548, 549, 122,
2037 563, 0, 0, 502, 0, 0, 505, 428, 562, 0,
2038 60, 0, 543, 544, 0, 492, 491, 0, 0, 249,
2039 43, 209, 0, 0, 572, 573, 0, 382, 0, 328,
2040 329, 471, 333, 463, 0, 0, 337, 0, 650, 339,
2041 685, 682, 681, 680, 683, 691, 700, 679, 0, 712,
2042 701, 716, 715, 711, 677, 749, 749, 684, 686, 687,
2043 689, 663, 693, 698, 761, 704, 761, 761, 709, 663,
2044 714, 663, 0, 661, 0, 0, 663, 655, 678, 432,
2045 435, 611, 417, 749, 0, 687, 402, 695, 696, 761,
2046 761, 761, 707, 402, 402, 400, 422, 457, 461, 749,
2047 520, 508, 749, 509, 515, 0, 535, 598, 749, 526,
2048 531, 534, 528, 530, 538, 753, 560, 487, 489, 541,
2049 542, 564, 499, 496, 598, 749, 749, 749, 749, 0,
2050 571, 0, 643, 644, 302, 0, 761, 0, 0, 0,
2051 464, 761, 341, 0, 395, 387, 389, 749, 392, 385,
2052 652, 654, 0, 0, 670, 692, 0, 658, 719, 702,
2053 703, 0, 660, 659, 0, 673, 713, 0, 675, 717,
2054 346, 656, 0, 0, 749, 0, 0, 0, 420, 0,
2055 408, 410, 0, 694, 0, 397, 399, 398, 0, 413,
2056 0, 415, 0, 507, 518, 0, 501, 513, 524, 510,
2057 516, 0, 504, 527, 533, 539, 537, 0, 494, 495,
2058 497, 498, 312, 0, 761, 0, 761, 13, 761, 0,
2059 478, 481, 484, 485, 465, 467, 468, 466, 749, 394,
2060 0, 688, 0, 705, 662, 749, 690, 663, 663, 699,
2061 704, 761, 718, 663, 710, 663, 687, 663, 0, 0,
2062 0, 0, 433, 0, 421, 706, 401, 402, 402, 312,
2063 0, 697, 761, 402, 708, 402, 402, 426, 749, 424,
2064 427, 0, 521, 522, 511, 0, 517, 536, 532, 525,
2065 529, 738, 311, 749, 734, 735, 566, 380, 472, 0,
2066 0, 482, 386, 388, 390, 393, 653, 0, 666, 0,
2067 668, 657, 0, 674, 0, 671, 676, 349, 434, 0,
2068 0, 612, 0, 405, 0, 407, 738, 311, 396, 0,
2069 414, 0, 411, 416, 0, 423, 519, 0, 0, 514,
2070 451, 473, 479, 480, 483, 0, 0, 663, 663, 663,
2071 663, 437, 436, 402, 402, 402, 402, 425, 523, 512,
2072 474, 391, 667, 0, 664, 669, 672, 406, 0, 403,
2073 409, 412, 0, 663, 402, 761, 665, 404, 476, 477,
2074 475
2075};
2076
2077 /* YYPGOTO[NTERM-NUM]. */
2078static const yytype_int16 yypgoto[] =
2079{
2080 -1040, -1040, -1040, 972, -1040, 19, 754, -545, -1040, -51,
2081 -1040, 756, -1040, 68, -1040, -264, -308, -83, -1040, -1040,
2082 -1040, -66, -75, -1040, -1040, -25, -1040, -323, 645, 4,
2083 1126, -154, 7, -26, -1040, -391, 11, 2057, -345, 1127,
2084 -58, -11, -1040, -1040, 2, -1040, 2889, -1040, 1147, -1040,
2085 1411, -1040, 110, 60, 630, -350, 100, -15, -1040, -381,
2086 -205, 39, -1040, -307, -32, -1040, -1040, -1040, -1040, -1040,
2087 -1040, -1040, -1040, -1040, -1040, -1040, -1040, -1040, -1040, 32,
2088 -1040, -1040, -1040, -1040, -1040, -1040, -1040, -1040, -1040, -1040,
2089 -1040, -1040, -1040, -1040, -1040, 538, -1040, 331, 1177, -364,
2090 -1040, 146, -694, -1040, -1027, -1039, 230, 152, 393, 308,
2091 -1040, 501, -1040, -886, -1040, 74, 389, -1040, -1040, -1040,
2092 -1040, -1040, -1040, -1040, 537, -1040, -1040, -96, 766, -1040,
2093 -1040, -1040, 962, -1040, -1040, -1040, -1040, -688, -1040, 42,
2094 -1040, -1040, -1040, -1040, -1040, -1040, -1040, -1040, -1040, -603,
2095 -1040, -1040, -1040, -1040, 399, -1040, -1040, -1040, -860, -1040,
2096 274, -991, -605, -822, -1040, 206, -1040, 210, 218, -1040,
2097 -643, -1040, 414, -1040, -1040, 208, -1040, -1040, 289, 373,
2098 675, -1040, 1197, 1459, 1483, 1523, -1040, 806, 1936, -1040,
2099 1965, 2010, -1040, -1040, -56, -1040, -1040, -200, -1040, -1040,
2100 -1040, -1040, -1040, -1040, -1040, 5, -1040, -1040, -1040, -1040,
2101 -21, 1967, 1113, 1209, 1908, 1709, -1040, -1040, 352, -1040,
2102 -770, 412, -776, -607, -1001, -829, 207, -915, -287, -62,
2103 275, 249, -1040, -1040, -489, -327, 168, -975, -957, 256,
2104 -879, -1040, -729, -1040, 120, -748, -1040, -1040, -1040, 92,
2105 -393, -1040, -318, -1040, -1040, -86, -1040, -37, 253, 848,
2106 -577, 329, -243, -60, -55, -2
2107};
2108
2109 /* YYDEFGOTO[NTERM-NUM]. */
2110static const yytype_int16 yydefgoto[] =
2111{
2112 -1, 1, 2, 70, 71, 72, 243, 579, 906, 580,
2113 261, 262, 461, 263, 452, 74, 530, 75, 539, 690,
2114 890, 368, 370, 371, 842, 76, 77, 515, 249, 79,
2115 80, 264, 81, 82, 83, 481, 84, 216, 388, 389,
2116 200, 201, 202, 618, 567, 204, 86, 454, 359, 87,
2117 218, 269, 535, 568, 702, 440, 441, 231, 232, 220,
2118 426, 572, 523, 524, 88, 366, 268, 467, 639, 287,
2119 719, 589, 732, 730, 604, 606, 739, 740, 957, 251,
2120 90, 91, 92, 93, 94, 95, 96, 97, 98, 99,
2121 321, 324, 707, 831, 722, 836, 837, 675, 252, 582,
2122 715, 838, 839, 380, 1025, 1026, 1027, 1028, 1136, 1061,
2123 963, 871, 872, 964, 1148, 1149, 486, 487, 658, 758,
2124 868, 1055, 959, 1132, 325, 101, 102, 322, 512, 513,
2125 672, 770, 516, 517, 676, 772, 848, 723, 1107, 720,
2126 843, 911, 1018, 1211, 1230, 1242, 1250, 1099, 1100, 1078,
2127 795, 796, 897, 898, 797, 882, 884, 881, 982, 983,
2128 984, 1152, 985, 988, 989, 990, 991, 992, 993, 798,
2129 799, 887, 800, 801, 802, 708, 827, 903, 833, 103,
2130 104, 105, 106, 107, 108, 109, 498, 662, 110, 500,
2131 111, 112, 499, 501, 292, 295, 296, 492, 660, 659,
2132 759, 869, 961, 1056, 763, 113, 114, 293, 115, 116,
2133 117, 223, 224, 120, 225, 226, 600, 731, 859, 860,
2134 1114, 1034, 935, 443, 937, 938, 1126, 940, 956, 942,
2135 943, 968, 969, 944, 945, 946, 947, 948, 972, 973,
2136 949, 950, 951, 952, 953, 1037, 407, 605, 274, 444,
2137 228, 123, 643, 570, 609, 603, 411, 307, 436, 437,
2138 697, 886, 472, 583, 375, 266
2139};
2140
2141 /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
2142 positive, shift that token. If negative, reduce the rule whose
2143 number is the opposite. If YYTABLE_NINF, syntax error. */
2144static const yytype_int16 yytable[] =
2145{
2146 124, 291, 260, 365, 294, 584, 412, 235, 367, 367,
2147 203, 308, 367, 205, 571, 410, 309, 240, 841, 372,
2148 215, 215, 434, 125, 536, 282, 369, 752, 474, 373,
2149 203, 844, 476, 205, 89, 308, 89, 1005, 1007, 581,
2150 630, 405, 598, 302, 623, 569, 301, 578, 222, 222,
2151 749, 282, 623, 272, 276, 221, 221, 330, 374, 737,
2152 265, 203, -107, 320, 282, 282, 282, 529, 281, 1124,
2153 73, 1150, 73, 1175, -116, 1006, 1008, 1057, 757, 627,
2154 630, 714, 234, 1173, 955, 89, 89, 794, 934, 283,
2155 934, 652, 960, 612, 270, 495, 497, -116, 934, 1029,
2156 222, 203, -637, 889, 215, 462, 613, 616, 227, 227,
2157 569, 1144, 578, 470, 3, 283, 219, 229, 1116, 581,
2158 471, 317, 267, 222, 222, 664, 237, 222, 379, 390,
2159 390, -637, 222, -354, 655, 682, 430, 1116, 319, 221,
2160 644, 974, -112, 877, 878, 1116, -636, 271, 275, 850,
2161 529, 529, -113, 446, 1117, 448, 237, 422, 260, 855,
2162 1206, -354, -354, -107, 1209, 458, -120, 644, 1129, -119,
2163 315, 316, 914, 1117, 525, -636, 1231, 305, 665, 306,
2164 256, -115, 1054, -107, 473, -734, -107, 854, 934, 1173,
2165 -107, 471, 227, 456, 1029, 1109, 1103, 485, 1042, 1043,
2166 408, 308, 1124, 1150, 876, 305, 465, 306, 260, -734,
2167 -354, -112, -116, 883, -116, -118, -113, 1229, -107, 427,
2168 -734, 1065, 1066, 1067, 464, 427, -120, 367, 367, 367,
2169 367, 445, 510, 511, 215, 1144, 215, 215, 318, 434,
2170 124, 89, 726, 630, 505, 506, 507, 508, 282, 999,
2171 1000, 936, 736, 623, 480, 623, 735, 305, 479, 306,
2172 -118, -119, 222, -103, 222, 222, 265, 1116, 222, 221,
2173 222, 221, 442, -104, 89, 644, 89, 260, 979, 981,
2174 238, 1029, 241, 1029, 1116, 644, 237, -111, 367, 89,
2175 -110, 89, 776, 593, 981, 981, -106, 282, 663, -115,
2176 663, 520, -106, 595, 1118, 586, 531, 917, 234, 319,
2177 73, 1214, 283, 308, 954, 1125, 1074, 623, 1002, 585,
2178 1130, 587, 227, 1118, 227, 460, -117, 1105, 504, 978,
2179 435, 1138, 438, 1106, -114, 265, 588, -117, 781, 1145,
2180 527, 89, 222, 222, 222, 222, 89, 222, 222, -112,
2181 -735, -112, 931, -118, -113, -118, -113, -114, 222, 1154,
2182 89, 283, 445, 537, -120, 522, -120, 576, 215, 569,
2183 522, 578, 817, 1181, -108, -105, 932, 73, 1079, 242,
2184 824, -109, 509, -735, 813, 815, 1029, 1029, 1084, 531,
2185 531, 820, 822, 317, 1198, 994, 222, -106, 89, -119,
2186 826, -119, 89, 222, 89, 1076, 668, 755, 994, 994,
2187 1075, 315, 316, 576, 1131, 1101, 361, -106, 222, 746,
2188 -106, 529, -645, 244, -106, 577, 1115, 445, 529, 529,
2189 1090, 1091, 576, 215, 297, 529, 529, -115, 894, -115,
2190 427, 638, 427, 880, 362, 363, 537, 537, 1218, -112,
2191 282, 689, -645, 1155, 203, 889, 480, 205, -108, 669,
2192 576, 222, 766, 1224, -117, -731, -117, 766, 298, -103,
2193 1153, -84, -114, 630, -114, -108, -105, 889, -105, -112,
2194 338, 339, 445, -638, 915, 623, 895, 576, 215, 896,
2195 577, -98, 361, 364, 282, -108, -105, 89, -108, -105,
2196 480, -524, -108, -105, 488, 496, -749, -631, 1128, 237,
2197 318, 900, -638, 333, 283, 233, 222, 624, 577, 729,
2198 362, 409, 738, 1171, 615, 617, 716, 349, 350, 994,
2199 477, 710, 236, 712, -646, -631, -631, 237, -311, 1015,
2200 299, 615, 617, 970, 1017, 577, 1153, 1120, 746, 1001,
2201 1153, 1248, -646, 488, 695, 529, 754, 488, 283, 490,
2202 491, -113, 650, 703, 361, 300, -311, -311, 981, 645,
2203 427, 941, 356, 357, 358, 1120, 704, 323, 709, -113,
2204 1039, -104, -731, 966, -631, 1189, 1210, -731, 835, 830,
2205 445, 830, 362, 428, 994, 576, 215, 742, 1040, 361,
2206 445, 718, 1228, 1153, 361, 576, 215, 743, 490, 491,
2207 704, -639, 490, 491, 89, -311, 89, 415, -735, 282,
2208 203, 326, 427, 205, 222, 756, -641, 362, 457, 694,
2209 -643, 327, 362, 483, 222, 986, 89, 222, 701, 765,
2210 -639, 429, 704, 768, -120, 862, 331, 78, 367, 78,
2211 459, 282, 432, 577, 926, -641, 60, 480, -643, -643,
2212 531, 78, 78, 577, -111, 853, 488, 531, 531, 414,
2213 852, 222, 701, -644, 531, 531, 429, -119, 851, -120,
2214 -640, 484, 861, 283, 459, 930, 445, 699, 1204, 987,
2215 418, 576, 215, 416, -642, 237, -732, -110, 78, 78,
2216 -631, -644, -644, 694, 701, 828, 834, -643, 840, -640,
2217 840, -119, 89, 78, -115, 283, 89, 537, 488, 489,
2218 222, 490, 491, -642, 537, 537, 753, -302, 236, -631,
2219 361, 537, 537, 970, -106, 1168, 78, 78, -634, 423,
2220 78, 970, 203, 970, 1163, 78, 522, 829, 775, 577,
2221 -644, 427, 777, 830, 367, -302, -302, 1123, 362, 591,
2222 1127, 89, 415, 222, 89, 700, -634, -634, 873, 361,
2223 873, 908, 925, 490, 491, -749, 1157, 644, 1085, 424,
2224 905, 1143, 488, 1146, 237, 907, 425, 750, -634, -120,
2225 753, 926, -117, 918, 531, 431, 1086, 362, 601, -312,
2226 607, 433, 814, 816, -302, 361, 691, 592, 967, 821,
2227 823, 361, -108, -732, -115, -634, 361, -634, -732, 453,
2228 977, 751, 930, 931, 696, 904, 819, -312, -312, 608,
2229 892, 893, 864, 362, 687, 493, 333, 490, 491, 362,
2230 1093, 1169, 1170, 488, 362, 1140, 602, 932, -117, 677,
2231 230, 537, 699, -114, 78, 1016, 233, 814, 816, -114,
2232 821, 823, 463, 89, 1021, 970, 488, 970, 89, 222,
2233 282, -83, 970, -105, 970, 78, -312, 78, 78, -115,
2234 696, 78, 688, 78, 89, 700, 819, 78, 1094, 78,
2235 1217, 89, 1219, 602, 478, 1051, 493, 1220, 490, 491,
2236 469, 619, 78, 89, 78, 1223, 89, 1225, 696, 475,
2237 705, 970, -117, -114, 1226, 482, 713, 449, 717, 493,
2238 502, 490, 491, -738, 1157, 1095, 333, 450, 451, 901,
2239 514, 1081, 596, 596, 1011, 282, 597, 879, 89, -749,
2240 528, 590, 1038, 237, 1038, 1038, 1243, 89, 1087, 503,
2241 305, 1244, 306, 594, 78, 78, 78, 78, 78, 78,
2242 78, 78, 599, 333, 1096, -738, 1098, 1038, 1038, 1038,
2243 830, 78, 721, 78, 901, 632, 78, 488, 641, 696,
2244 346, 347, 634, 354, 355, 356, 357, 358, 636, 696,
2245 975, 642, -98, -738, -738, 671, 651, 488, 967, 1063,
2246 674, -284, 967, 679, 683, 1133, 967, 680, 967, 78,
2247 684, 78, 698, 685, 834, 78, 78, 78, 706, 840,
2248 354, 355, 356, 357, 358, 711, 488, 282, 718, 767,
2249 494, 78, 490, 491, 696, 721, 769, 771, 971, 818,
2250 -738, -285, -738, 696, 885, -734, 812, 89, 830, 89,
2251 661, 845, 490, 491, 849, 41, 42, 43, 44, 78,
2252 78, 760, 761, 803, 762, 939, 866, 939, 856, 858,
2253 870, 46, 47, -286, 78, 939, 888, 965, 889, 666,
2254 1190, 490, 491, 891, 447, 89, 367, 367, 89, 902,
2255 -287, 1135, 445, 995, 709, 784, 840, 576, 215, 1032,
2256 1033, 1046, 1036, 1212, 1213, 310, 311, 312, 313, 314,
2257 78, 1041, 466, 1044, 1047, 119, 468, 119, 1049, 1038,
2258 1052, 1059, 1058, 976, 1092, 1060, 222, 1064, 1068, 78,
2259 967, 920, 967, 921, 922, 923, 924, 967, 1070, 967,
2260 1038, 1147, 829, 921, 922, 923, 924, 1080, 696, 920,
2261 1072, 921, 922, 923, 924, 577, 1122, 1083, 1134, 803,
2262 803, 1122, 89, 89, 1139, 939, 119, 119, 1110, 909,
2263 285, 1112, 910, 1040, 1151, 912, 967, 1156, 1177, 100,
2264 975, 100, 916, 1179, 1122, 919, 1182, 1184, 975, 1191,
2265 975, 1245, 1222, 100, 100, 1188, 285, 1192, 1023, 1194,
2266 1199, 222, 222, 920, 1121, 921, 922, 923, 924, 382,
2267 392, 392, 392, 1201, 455, 646, 976, 1207, 1208, 1215,
2268 1216, 648, 377, -734, -735, 394, 1233, 78, 971, 78,
2269 100, 100, 1142, 1238, 360, 696, 971, 78, 971, 333,
2270 939, 885, 741, 840, 1167, 100, 832, 78, 1022, 78,
2271 78, 939, 1023, 1108, 803, 803, 346, 347, 1024, 939,
2272 696, 696, 1174, 962, 803, 803, 803, 965, 100, 100,
2273 803, 803, 100, 874, 89, 965, 996, 100, 1227, 863,
2274 673, 1069, 1071, 631, 78, 1050, 518, 1249, 633, 1158,
2275 998, 635, 1102, 1159, 637, 353, 354, 355, 356, 357,
2276 358, 1160, 413, 997, 1166, 1097, 667, 976, 406, 1053,
2277 647, 1119, 975, 1141, 975, 649, 1137, 1082, 0, 975,
2278 0, 975, 119, 0, 0, 78, 0, 0, 0, 78,
2279 78, 0, 0, 78, 0, 0, 0, 78, 78, 0,
2280 0, 0, 0, 0, 78, 78, 0, 0, 0, 0,
2281 0, 0, 0, 0, 0, 119, 803, 119, 975, 0,
2282 971, 1045, 971, 1048, 803, 804, 0, 971, 0, 971,
2283 119, 0, 119, 681, 78, 0, 78, 78, 0, 0,
2284 0, 0, 0, 0, 939, 0, 100, 0, 0, 0,
2285 0, 803, 0, 285, 0, 0, 0, 0, 0, 965,
2286 0, 1205, 0, 0, 0, 0, 971, 100, 0, 100,
2287 100, 0, 0, 100, 0, 100, 696, 0, 0, 100,
2288 0, 100, 119, 0, 0, 0, 0, 119, 0, 0,
2289 0, 0, 0, 0, 100, 0, 100, 0, 0, 0,
2290 0, 119, 285, 0, 0, 1193, 1195, 0, 803, 0,
2291 0, 1200, 0, 1202, 1203, 0, 0, 0, 0, 1187,
2292 0, 804, 804, 0, 78, 0, 0, 273, 0, 920,
2293 0, 921, 922, 923, 924, 925, 78, 0, 0, 119,
2294 0, 78, 78, 119, 0, 119, 100, 100, 100, 100,
2295 100, 100, 100, 100, 926, 0, 0, 78, 0, 0,
2296 0, 0, 0, 100, 78, 100, 0, 0, 100, 0,
2297 0, 0, 0, 0, 0, 0, 78, 0, 928, 78,
2298 1221, 0, 0, 0, 803, 930, 931, 0, 803, 1178,
2299 1180, 1237, 1239, 1240, 1241, 1183, 0, 1185, 0, 1186,
2300 0, 100, 0, 100, 803, 0, 0, 100, 100, 100,
2301 932, 78, 1247, 0, 0, 0, 804, 804, 0, 0,
2302 78, 0, 0, 100, 0, 0, 804, 804, 804, 0,
2303 0, 0, 804, 804, 0, 0, 0, 0, 119, 0,
2304 803, 803, 0, 0, 0, 0, 857, 0, 0, 0,
2305 0, 100, 100, 0, 0, 285, 0, 0, 0, 0,
2306 865, 0, 867, 0, 0, 0, 100, 0, 920, 0,
2307 921, 922, 923, 924, 925, 0, 332, 0, 417, 0,
2308 0, 419, 420, 421, 0, 0, 0, 0, 0, 1232,
2309 1234, 1235, 1236, 926, 0, 0, 0, 0, 0, 285,
2310 0, 0, 100, 0, 0, 0, 0, 0, 0, 0,
2311 0, 0, 0, 0, 0, 1246, 0, 928, 804, 0,
2312 78, 100, 78, 929, 930, 931, 804, 0, 333, 334,
2313 335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
2314 345, 0, 0, 0, 0, 346, 347, 0, 0, 932,
2315 0, 0, 933, 804, 0, 119, 0, 119, 78, 0,
2316 0, 78, 0, 0, 0, 0, 0, 0, 0, 237,
2317 0, 122, 0, 122, 0, 0, 0, 119, 348, 0,
2318 349, 350, 351, 352, 353, 354, 355, 356, 357, 358,
2319 0, 0, 0, 0, 0, 0, 0, 521, 0, 78,
2320 0, 0, 534, 0, 1003, 0, 0, 0, 0, 0,
2321 804, 0, 0, 0, 0, 0, 0, 0, 0, 100,
2322 0, 100, 122, 122, 285, 0, 286, 0, 0, 100,
2323 0, 0, 0, 0, 0, 78, 78, 0, 0, 100,
2324 0, 100, 100, 1030, 1031, 0, 0, 0, 0, 0,
2325 0, 0, 286, 119, 0, 0, 285, 119, 0, 0,
2326 0, 0, 0, 811, 0, 383, 393, 393, 0, 0,
2327 0, 0, 0, 0, 78, 78, 100, 0, 0, 0,
2328 0, 0, 0, 0, 0, 0, 804, 1073, 0, 0,
2329 804, 0, 0, 0, 0, 620, 622, 0, 0, 0,
2330 0, 0, 119, 0, 273, 119, 804, 0, 0, 0,
2331 0, 0, 0, 1088, 1089, 0, 0, 100, 0, 0,
2332 0, 100, 100, 0, 0, 100, 0, 0, 0, 100,
2333 100, 0, 0, 0, 0, 1111, 100, 100, 0, 0,
2334 0, 622, 804, 804, 273, 0, 920, 78, 921, 922,
2335 923, 924, 925, 0, 0, 0, 0, 0, 0, 811,
2336 811, 0, 0, 0, 0, 0, 100, 0, 100, 100,
2337 121, 926, 121, 0, 0, 0, 0, 0, 122, 333,
2338 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2339 678, 0, 0, 0, 0, 928, 346, 347, 0, 0,
2340 0, 929, 930, 931, 119, 0, 0, 0, 0, 119,
2341 0, 122, 0, 122, 0, 0, 1172, 0, 0, 0,
2342 0, 121, 121, 1176, 0, 119, 122, 932, 122, 118,
2343 933, 118, 119, 351, 352, 353, 354, 355, 356, 357,
2344 358, 0, 958, 0, 119, 0, 0, 119, 0, 286,
2345 0, 0, 0, 0, 811, 811, 100, 0, 0, 0,
2346 0, 0, 0, 0, 811, 811, 811, 0, 100, 0,
2347 811, 811, 0, 100, 100, 1013, 0, 0, 122, 119,
2348 118, 118, 0, 122, 284, 0, 0, 0, 119, 100,
2349 744, 0, 745, 0, 0, 0, 100, 122, 286, 0,
2350 538, 0, 0, 0, 0, 622, 0, 273, 100, 0,
2351 284, 100, 0, 0, 0, 0, 0, 0, 0, 85,
2352 0, 85, 0, 381, 391, 391, 391, 0, 0, 0,
2353 0, 0, 0, 0, 0, 122, 0, 0, 0, 122,
2354 392, 122, 0, 100, 0, 0, 0, 0, 0, 0,
2355 774, 0, 100, 0, 0, 0, 811, 0, 0, 0,
2356 0, 0, 0, 0, 811, 0, 0, 0, 0, 622,
2357 85, 85, 0, 0, 0, 0, 0, 121, 825, 0,
2358 0, 0, 0, 538, 538, 0, 0, 0, 119, 0,
2359 119, 811, 0, 847, 0, 0, 0, 0, 0, 0,
2360 0, 0, 0, 0, 0, 0, 0, 0, 0, 805,
2361 121, 0, 121, 378, 0, 0, 0, 0, 0, 0,
2362 0, 0, 0, 0, 0, 121, 119, 121, 0, 119,
2363 0, 0, 392, 806, 122, 0, 118, 0, 0, 0,
2364 0, 0, 0, 0, 875, 0, 0, 0, 811, 0,
2365 0, 286, 100, 0, 100, 0, 0, 0, 0, 0,
2366 0, 0, 0, 0, 0, 0, 0, 0, 0, 118,
2367 0, 118, 0, 807, 0, 0, 0, 121, 0, 0,
2368 0, 0, 121, 0, 118, 0, 118, 0, 0, 0,
2369 100, 0, 0, 100, 0, 286, 121, 0, 0, 121,
2370 0, 0, 0, 119, 119, 805, 805, 284, 920, 0,
2371 921, 922, 923, 924, 925, 0, 0, 913, 0, 0,
2372 0, 0, 0, 0, 811, 0, 85, 0, 811, 806,
2373 806, 100, 0, 926, 121, 0, 118, 273, 121, 0,
2374 121, 118, 0, 0, 811, 0, 0, 927, 0, 0,
2375 0, 122, 0, 122, 0, 118, 284, 928, 0, 85,
2376 0, 85, 0, 929, 930, 931, 0, 100, 100, 807,
2377 807, 0, 0, 122, 85, 0, 85, 0, 0, 0,
2378 811, 811, 121, 121, 0, 1020, 0, 0, 0, 932,
2379 0, 0, 933, 118, 0, 0, 0, 118, 0, 118,
2380 805, 805, 0, 0, 0, 0, 100, 100, 0, 0,
2381 805, 805, 805, 1035, 0, 119, 805, 805, 0, 0,
2382 286, 0, 0, 0, 806, 806, 85, 0, 0, 764,
2383 0, 85, 0, 121, 806, 806, 806, 0, 0, 0,
2384 806, 806, 0, 0, 0, 85, 0, 0, 532, 122,
2385 0, 0, 286, 122, 538, 0, 0, 0, 0, 0,
2386 0, 538, 538, 0, 807, 807, 0, 0, 538, 538,
2387 0, 0, 0, 0, 807, 807, 807, 0, 0, 100,
2388 807, 807, 0, 85, 0, 0, 0, 85, 0, 85,
2389 1104, 0, 118, 0, 0, 0, 0, 0, 122, 0,
2390 0, 122, 805, 1113, 0, 0, 0, 0, 0, 284,
2391 805, 0, 0, 0, 920, 0, 921, 922, 923, 924,
2392 925, 0, 0, 0, 0, 0, 806, 0, 0, 0,
2393 0, 532, 532, 0, 806, 0, 0, 805, 0, 926,
2394 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2395 121, 0, 121, 284, 0, 0, 0, 0, 0, 0,
2396 0, 806, 0, 928, 0, 0, 807, 0, 0, 929,
2397 930, 931, 121, 0, 807, 0, 0, 0, 0, 0,
2398 0, 0, 85, 0, 0, 0, 0, 0, 538, 0,
2399 0, 0, 0, 0, 805, 932, 0, 0, 933, 0,
2400 122, 807, 0, 0, 0, 122, 0, 0, 0, 118,
2401 0, 118, 0, 0, 0, 0, 0, 0, 806, 0,
2402 0, 122, 0, 0, 0, 0, 0, 0, 122, 0,
2403 0, 118, 0, 0, 0, 0, 0, 0, 0, 0,
2404 122, 0, 0, 122, 0, 0, 0, 0, 121, 0,
2405 0, 0, 121, 121, 0, 0, 0, 0, 807, 0,
2406 121, 121, 0, 0, 0, 0, 0, 121, 121, 0,
2407 805, 1014, 0, 0, 805, 122, 0, 0, 284, 0,
2408 0, 0, 0, 0, 122, 0, 808, 0, 0, 0,
2409 805, 0, 0, 0, 806, 0, 0, 121, 806, 85,
2410 121, 85, 0, 0, 0, 0, 0, 118, 0, 0,
2411 284, 118, 0, 0, 806, 809, 0, 0, 0, 0,
2412 0, 85, 0, 0, 0, 0, 805, 805, 0, 0,
2413 0, 0, 0, 0, 807, 0, 393, 0, 807, 0,
2414 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2415 806, 806, 0, 0, 807, 0, 118, 0, 0, 118,
2416 810, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2417 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2418 0, 0, 808, 808, 122, 0, 122, 121, 0, 0,
2419 807, 807, 0, 0, 0, 0, 0, 85, 0, 121,
2420 0, 85, 532, 0, 121, 0, 0, 0, 0, 532,
2421 532, 809, 809, 0, 0, 0, 532, 532, 0, 0,
2422 121, 0, 122, 0, 0, 122, 0, 121, 393, 0,
2423 0, 0, 0, 0, 0, 0, 0, 0, 0, 121,
2424 0, 0, 121, 0, 0, 0, 85, 0, 0, 85,
2425 0, 0, 0, 0, 0, 0, 810, 810, 118, 0,
2426 0, 0, 0, 118, 0, 0, 0, 0, 0, 0,
2427 0, 0, 0, 0, 121, 0, 0, 808, 808, 118,
2428 0, 0, 0, 121, 0, 0, 118, 808, 808, 808,
2429 0, 0, 0, 808, 808, 0, 0, 0, 118, 122,
2430 122, 118, 0, 0, 0, 0, 809, 809, 0, 0,
2431 0, 0, 0, 0, 0, 0, 809, 809, 809, 0,
2432 0, 0, 809, 809, 0, 0, 0, 0, 0, 1012,
2433 0, 0, 0, 118, 0, 0, 532, 0, 0, 0,
2434 0, 0, 118, 0, 0, 0, 0, 0, 85, 0,
2435 0, 810, 810, 85, 0, 0, 0, 0, 0, 0,
2436 0, 810, 810, 810, 0, 217, 217, 810, 810, 85,
2437 0, 0, 0, 0, 0, 0, 85, 0, 0, 808,
2438 0, 0, 0, 121, 0, 121, 0, 808, 85, 0,
2439 0, 85, 0, 0, 391, 0, 0, 250, 253, 254,
2440 255, 0, 0, 0, 217, 217, 0, 0, 809, 0,
2441 0, 122, 0, 0, 808, 0, 809, 303, 304, 1010,
2442 0, 121, 0, 85, 121, 0, 0, 0, 0, 0,
2443 0, 0, 85, 0, 0, 0, 0, 0, 23, 24,
2444 25, 26, 118, 809, 118, 0, 0, 0, 0, 217,
2445 0, 0, 0, 810, 32, 33, 34, 0, 0, 0,
2446 0, 810, 0, 0, 41, 42, 43, 44, 45, 0,
2447 0, 808, 0, 0, 0, 0, 0, 0, 0, 0,
2448 118, 0, 0, 118, 0, 0, 391, 0, 810, 0,
2449 0, 0, 0, 0, 0, 0, 0, 0, 121, 121,
2450 809, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2451 0, 0, 0, 0, 0, 792, 59, 60, 61, 62,
2452 63, 64, 65, 66, 0, 0, 0, 0, 0, 0,
2453 0, 0, 85, 0, 85, 0, 0, 0, 0, 0,
2454 0, 0, 0, 0, 279, 810, 0, 808, 0, 0,
2455 0, 808, 0, 0, 0, 0, 217, 118, 118, 217,
2456 217, 217, 0, 303, 0, 0, 0, 808, 0, 0,
2457 85, 0, 0, 85, 0, 0, 809, 0, 0, 217,
2458 809, 217, 217, 0, 0, 0, 0, 0, 0, 0,
2459 0, 0, 0, 0, 0, 0, 809, 0, 0, 0,
2460 0, 0, 0, 808, 808, 0, 0, 0, 0, 0,
2461 121, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2462 0, 810, 0, 0, 0, 810, 0, 0, 0, 0,
2463 0, 0, 809, 809, 0, 0, 0, 0, 0, 0,
2464 0, 810, 0, 0, 0, 0, 0, 85, 85, 0,
2465 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2466 0, 0, 0, 0, 0, 0, 0, 0, 0, 118,
2467 0, 0, 0, 0, 0, 217, 0, 810, 810, 0,
2468 533, 0, 540, 541, 542, 543, 544, 0, 0, 545,
2469 546, 547, 548, 549, 550, 551, 552, 553, 0, 0,
2470 554, 555, 556, 557, 558, 559, 560, 561, 562, 563,
2471 0, 0, 0, 217, 0, 0, 0, 0, 0, 0,
2472 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2473 0, 0, 0, 0, 0, 0, 0, 333, 334, 335,
2474 336, 337, 338, 339, 340, 341, 342, 343, 344, 345,
2475 0, 0, 0, 0, 346, 347, 0, 0, 0, 85,
2476 0, 0, 0, 614, 614, 0, 0, 0, 0, 0,
2477 0, 0, 614, 217, 217, 0, 0, 0, 217, 0,
2478 614, 614, 217, 0, 0, 0, 0, 348, 255, 349,
2479 350, 351, 352, 353, 354, 355, 356, 357, 358, 0,
2480 0, 0, 0, 640, 0, 0, 0, 0, 614, 0,
2481 0, 0, 0, 237, 0, 0, 0, 0, 0, 217,
2482 0, 0, 217, 0, 0, 0, 0, 0, 0, -738,
2483 0, 0, 0, 217, 0, 0, 0, -738, -738, -738,
2484 0, 0, -738, -738, -738, 0, -738, 0, 0, 0,
2485 0, 670, 0, 0, -738, -738, -738, -738, -738, 0,
2486 0, 0, 0, 0, 0, 0, -738, -738, 217, -738,
2487 -738, -738, -738, -738, 0, 0, 0, 0, 0, 0,
2488 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2489 0, 0, 0, 0, 0, 0, 0, -738, 0, 0,
2490 0, 0, 0, 0, 0, 0, -738, -738, -738, -738,
2491 -738, -738, -738, -738, -738, -738, -738, -738, -738, 0,
2492 0, 0, 0, -738, -738, -738, -738, 0, 747, -738,
2493 0, 0, 0, 0, 0, -738, 0, 0, 0, 0,
2494 0, 217, 0, 0, 0, 0, 0, 0, 0, -738,
2495 0, 217, -738, 0, 0, -116, -738, -738, -738, -738,
2496 -738, -738, -738, -738, -738, -738, -738, -738, 217, 0,
2497 217, 0, -738, -738, -738, -738, 0, 0, -738, -738,
2498 -738, 0, -738, 217, 0, 217, 0, 0, 0, -761,
2499 0, 0, 0, 0, 0, 0, 0, -761, -761, -761,
2500 0, 0, -761, -761, -761, 0, -761, 0, 0, 0,
2501 0, 0, 0, 0, -761, -761, -761, 0, 0, 0,
2502 0, 0, 0, 0, 0, 0, -761, -761, 217, -761,
2503 -761, -761, -761, -761, 614, 778, 0, 217, 0, 0,
2504 0, 614, 614, 0, 0, 0, 0, 217, 614, 614,
2505 0, 0, 0, 0, 0, 0, 217, -761, 0, 0,
2506 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2507 0, 217, 0, 0, 0, 0, 0, 0, 0, 0,
2508 0, 0, 0, 0, 0, -761, -761, 0, 0, 0,
2509 0, 0, 0, 0, 0, 0, 614, 614, 0, 614,
2510 614, 23, 24, 25, 26, 0, 0, 0, 0, -761,
2511 0, 0, 0, 0, 0, 0, 0, 32, 33, 34,
2512 784, 0, 217, 0, 785, 0, 986, 41, 42, 43,
2513 44, 45, -761, -761, 0, 0, 0, 233, -761, 0,
2514 -761, 0, -761, 0, 0, 926, 0, 0, 0, 0,
2515 0, 0, 0, 0, 0, 0, 0, 0, 786, 787,
2516 0, 899, 0, 0, 0, 0, 788, 0, 614, 789,
2517 0, 0, 790, 791, 0, 980, 930, 0, 792, 59,
2518 1004, 61, 62, 63, 64, 65, 66, 0, 0, 0,
2519 0, 0, 0, 0, 0, 217, 0, 0, 0, 0,
2520 793, 0, 0, 0, 0, -761, 4, 279, 5, 6,
2521 7, 8, 9, 614, 0, 217, 10, 11, 0, 0,
2522 0, 12, 0, 13, 14, 15, 16, 17, 18, 19,
2523 0, 0, 0, 0, 0, 20, 21, 22, 23, 24,
2524 25, 26, 0, 0, 27, 0, 0, 0, 0, 0,
2525 28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
2526 38, 39, 40, 217, 41, 42, 43, 44, 45, 46,
2527 47, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2528 48, 49, 0, 0, 0, 0, 0, 0, 0, 0,
2529 0, 217, 0, 0, 0, 50, 51, 0, 0, 0,
2530 0, 0, 0, 52, 0, 0, 53, 54, 0, 55,
2531 56, 0, 57, 0, 0, 58, 59, 60, 61, 62,
2532 63, 64, 65, 66, 0, 0, 0, 0, 0, 0,
2533 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2534 0, 0, 0, 0, 67, 68, 69, 0, 0, 0,
2535 0, 0, 0, 0, 0, 0, -761, 0, -761, 0,
2536 0, 0, 0, 0, 0, 0, 0, 0, 217, -631,
2537 0, 0, 0, 0, 0, 0, 0, -631, -631, -631,
2538 0, 217, -631, -631, -631, 0, -631, 0, 0, 0,
2539 0, 686, 0, 0, -631, 0, -631, -631, -631, 0,
2540 0, 0, 0, 0, 0, 0, -631, -631, 0, -631,
2541 -631, -631, -631, -631, 0, 0, 0, 0, 0, 0,
2542 0, 0, 0, 0, 333, 334, 335, 336, 337, 338,
2543 339, 340, 341, 342, 343, 344, 345, -631, 0, 0,
2544 0, 346, 347, 217, 0, 0, -631, -631, -631, -631,
2545 -631, -631, -631, -631, -631, -631, -631, -631, -631, 0,
2546 0, 0, 0, -631, -631, -631, -631, 0, -631, -631,
2547 0, 0, 0, 0, 348, -631, 349, 350, 351, 352,
2548 353, 354, 355, 356, 357, 358, 0, 0, 0, -631,
2549 0, 0, -631, -257, 0, -631, -631, -631, -631, -631,
2550 -631, -631, -631, -631, -631, -631, -631, -631, 0, 0,
2551 0, 0, 0, -631, -631, -631, -634, 0, -631, -631,
2552 -631, 0, -631, 0, -634, -634, -634, 0, 0, -634,
2553 -634, -634, 0, -634, 0, 0, 0, 0, 686, 0,
2554 0, -634, 0, -634, -634, -634, 0, 0, 0, 0,
2555 0, 0, 0, -634, -634, 0, -634, -634, -634, -634,
2556 -634, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2557 0, 333, 334, 335, 336, 337, 338, 339, 340, 341,
2558 342, 343, 344, 345, -634, 0, 0, 0, 346, 347,
2559 0, 0, 0, -634, -634, -634, -634, -634, -634, -634,
2560 -634, -634, -634, -634, -634, -634, 0, 0, 0, 0,
2561 -634, -634, -634, -634, 0, -634, -634, 0, 0, 0,
2562 0, 348, -634, 349, 350, 351, 352, 353, 354, 355,
2563 356, 357, 358, 0, 0, 0, -634, 0, 0, -634,
2564 0, 0, -634, -634, -634, -634, -634, -634, -634, -634,
2565 -634, -634, -634, -634, -634, 0, 0, 0, 0, 0,
2566 -634, -634, -634, -739, 0, -634, -634, -634, 0, -634,
2567 0, -739, -739, -739, 0, 0, -739, -739, -739, 0,
2568 -739, 0, 0, 0, 0, 0, 0, 0, -739, -739,
2569 -739, -739, -739, 0, 0, 0, 0, 0, 0, 0,
2570 -739, -739, 0, -739, -739, -739, -739, -739, 0, 0,
2571 0, 0, 0, 0, 0, 0, 0, 0, 333, 334,
2572 335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
2573 345, -739, 0, 0, 0, 346, 347, 0, 0, 0,
2574 -739, -739, -739, -739, -739, -739, -739, -739, -739, -739,
2575 -739, -739, -739, 0, 0, 0, 0, -739, -739, -739,
2576 -739, 0, 0, -739, 0, 0, 0, 0, 348, -739,
2577 349, 350, 351, 352, 353, 354, 355, 356, 357, 358,
2578 0, 0, 0, -739, 0, 0, -739, 0, 0, 0,
2579 -739, -739, -739, -739, -739, -739, -739, -739, -739, -739,
2580 -739, -739, 0, 0, 0, 0, -739, -739, -739, -739,
2581 -740, 0, -739, -739, -739, 0, -739, 0, -740, -740,
2582 -740, 0, 0, -740, -740, -740, 0, -740, 0, 0,
2583 0, 0, 0, 0, 0, -740, -740, -740, -740, -740,
2584 0, 0, 0, 0, 0, 0, 0, -740, -740, 0,
2585 -740, -740, -740, -740, -740, 0, 0, 0, 0, 0,
2586 0, 0, 0, 0, 0, 333, 334, 335, 336, 337,
2587 338, 339, 340, 341, 342, 343, -762, -762, -740, 0,
2588 0, 0, 346, 347, 0, 0, 0, -740, -740, -740,
2589 -740, -740, -740, -740, -740, -740, -740, -740, -740, -740,
2590 0, 0, 0, 0, -740, -740, -740, -740, 0, 0,
2591 -740, 0, 0, 0, 0, 0, -740, 349, 350, 351,
2592 352, 353, 354, 355, 356, 357, 358, 0, 0, 0,
2593 -740, 0, 0, -740, 0, 0, 0, -740, -740, -740,
2594 -740, -740, -740, -740, -740, -740, -740, -740, -740, 0,
2595 0, 0, 0, -740, -740, -740, -740, -311, 0, -740,
2596 -740, -740, 0, -740, 0, -311, -311, -311, 0, 0,
2597 -311, -311, -311, 0, -311, 0, 0, 0, 0, 0,
2598 0, 0, -311, 0, -311, -311, -311, 0, 0, 0,
2599 0, 0, 0, 0, -311, -311, 0, -311, -311, -311,
2600 -311, -311, 0, 0, 0, 0, 0, 0, 0, 0,
2601 0, 0, 333, 334, 335, 336, 337, 338, 339, 340,
2602 0, 342, 343, 0, 0, -311, 0, 0, 0, 346,
2603 347, 0, 0, 0, -311, -311, -311, -311, -311, -311,
2604 -311, -311, -311, -311, -311, -311, -311, 0, 0, 0,
2605 0, -311, -311, -311, -311, 0, 748, -311, 0, 0,
2606 0, 0, 0, -311, 349, 350, 351, 352, 353, 354,
2607 355, 356, 357, 358, 0, 0, 0, -311, 0, 0,
2608 -311, 0, 0, -118, -311, -311, -311, -311, -311, -311,
2609 -311, -311, -311, -311, -311, -311, 0, 0, 0, 0,
2610 0, -311, -311, -311, -450, 0, -311, -311, -311, 0,
2611 -311, 0, -450, -450, -450, 0, 0, -450, -450, -450,
2612 0, -450, 0, 0, 0, 0, 0, 0, 0, -450,
2613 -450, -450, -450, 0, 0, 0, 0, 0, 0, 0,
2614 0, -450, -450, 0, -450, -450, -450, -450, -450, 0,
2615 0, 0, 0, 0, 0, 0, 0, 0, 0, 333,
2616 -762, -762, -762, -762, 338, 339, 0, 0, -762, -762,
2617 0, 0, -450, 0, 0, 0, 346, 347, 0, 0,
2618 0, -450, -450, -450, -450, -450, -450, -450, -450, -450,
2619 -450, -450, -450, -450, 0, 0, 0, 0, -450, -450,
2620 -450, -450, 0, 0, -450, 0, 0, 0, 0, 0,
2621 -450, 349, 350, 351, 352, 353, 354, 355, 356, 357,
2622 358, 0, 0, 0, -450, 0, 0, 0, 0, 0,
2623 0, -450, 0, -450, -450, -450, -450, -450, -450, -450,
2624 -450, -450, -450, 0, 0, 0, 0, -450, -450, -450,
2625 -450, -303, 233, -450, -450, -450, 0, -450, 0, -303,
2626 -303, -303, 0, 0, -303, -303, -303, 0, -303, 0,
2627 0, 0, 0, 0, 0, 0, -303, 0, -303, -303,
2628 -303, 0, 0, 0, 0, 0, 0, 0, -303, -303,
2629 0, -303, -303, -303, -303, -303, 0, 0, 0, 0,
2630 0, 0, 0, 0, 0, 0, 333, 334, 335, 336,
2631 337, 338, 339, 0, 0, 342, 343, 0, 0, -303,
2632 0, 0, 0, 346, 347, 0, 0, 0, -303, -303,
2633 -303, -303, -303, -303, -303, -303, -303, -303, -303, -303,
2634 -303, 0, 0, 0, 0, -303, -303, -303, -303, 0,
2635 0, -303, 0, 0, 0, 0, 0, -303, 349, 350,
2636 351, 352, 353, 354, 355, 356, 357, 358, 0, 0,
2637 0, -303, 0, 0, -303, 0, 0, 0, -303, -303,
2638 -303, -303, -303, -303, -303, -303, -303, -303, -303, -303,
2639 0, 0, 0, 0, 0, -303, -303, -303, -761, 0,
2640 -303, -303, -303, 0, -303, 0, -761, -761, -761, 0,
2641 0, -761, -761, -761, 0, -761, 0, 0, 0, 0,
2642 0, 0, 0, -761, -761, -761, -761, 0, 0, 0,
2643 0, 0, 0, 0, 0, -761, -761, 0, -761, -761,
2644 -761, -761, -761, 0, 0, 0, 0, 0, 0, 0,
2645 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2646 0, 0, 0, 0, 0, 0, -761, 0, 0, 0,
2647 0, 0, 0, 0, 0, -761, -761, -761, -761, -761,
2648 -761, -761, -761, -761, -761, -761, -761, -761, 0, 0,
2649 0, 0, -761, -761, -761, -761, 0, 0, -761, 0,
2650 0, 0, 0, 0, -761, 0, 0, 0, 0, 0,
2651 0, 0, 0, 0, 0, 0, 0, 0, -761, 0,
2652 0, 0, 0, 0, 0, -761, 0, -761, -761, -761,
2653 -761, -761, -761, -761, -761, -761, -761, 0, 0, 0,
2654 0, -761, -761, -761, -761, -318, 233, -761, -761, -761,
2655 0, -761, 0, -318, -318, -318, 0, 0, -318, -318,
2656 -318, 0, -318, 0, 0, 0, 0, 0, 0, 0,
2657 -318, 0, -318, -318, 0, 0, 0, 0, 0, 0,
2658 0, 0, -318, -318, 0, -318, -318, -318, -318, -318,
2659 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2660 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2661 0, 0, 0, -318, 0, 0, 0, 0, 0, 0,
2662 0, 0, -318, -318, -318, -318, -318, -318, -318, -318,
2663 -318, -318, -318, -318, -318, 0, 0, 0, 0, -318,
2664 -318, -318, -318, 0, 0, -318, 0, 0, 0, 0,
2665 0, -318, 0, 0, 0, 0, 0, 0, 0, 0,
2666 0, 0, 0, 0, 0, -318, 0, 0, 0, 0,
2667 0, 0, -318, 0, -318, -318, -318, -318, -318, -318,
2668 -318, -318, -318, -318, 0, 0, 0, 0, 0, -318,
2669 -318, -318, -738, 230, -318, -318, -318, 0, -318, 0,
2670 -738, -738, -738, 0, 0, 0, -738, -738, 0, -738,
2671 0, 0, 0, 0, 0, 0, 0, -738, -738, 0,
2672 0, 0, 0, 0, 0, 0, 0, 0, 0, -738,
2673 -738, 0, -738, -738, -738, -738, -738, 0, 0, 0,
2674 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2675 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2676 -738, 0, 0, 0, 0, 0, 0, 0, 0, -738,
2677 -738, -738, -738, -738, -738, -738, -738, -738, -738, -738,
2678 -738, -738, 0, 0, 0, 0, -738, -738, -738, -738,
2679 0, 692, 0, 0, 0, 0, 0, 0, 0, 0,
2680 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2681 0, 0, -738, 0, 0, 0, 0, 0, -116, -738,
2682 0, -738, -738, -738, -738, -738, -738, -738, -738, -738,
2683 -738, 0, 0, 0, 0, -738, -738, -738, -107, -738,
2684 0, -738, 0, -738, 0, -738, 0, -738, -738, -738,
2685 0, 0, 0, -738, -738, 0, -738, 0, 0, 0,
2686 0, 0, 0, 0, -738, -738, 0, 0, 0, 0,
2687 0, 0, 0, 0, 0, 0, -738, -738, 0, -738,
2688 -738, -738, -738, -738, 0, 0, 0, 0, 0, 0,
2689 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2690 0, 0, 0, 0, 0, 0, 0, -738, 0, 0,
2691 0, 0, 0, 0, 0, 0, -738, -738, -738, -738,
2692 -738, -738, -738, -738, -738, -738, -738, -738, -738, 0,
2693 0, 0, 0, -738, -738, -738, -738, 0, 692, 0,
2694 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2695 0, 0, 0, 0, 0, 0, 0, 0, 0, -738,
2696 0, 0, 0, 0, 0, -116, -738, 0, -738, -738,
2697 -738, -738, -738, -738, -738, -738, -738, -738, 0, 0,
2698 0, 0, -738, -738, -738, -738, -311, 0, -738, 0,
2699 -738, 0, -738, 0, -311, -311, -311, 0, 0, 0,
2700 -311, -311, 0, -311, 0, 0, 0, 0, 0, 0,
2701 0, -311, 0, 0, 0, 0, 0, 0, 0, 0,
2702 0, 0, 0, -311, -311, 0, -311, -311, -311, -311,
2703 -311, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2704 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2705 0, 0, 0, 0, -311, 0, 0, 0, 0, 0,
2706 0, 0, 0, -311, -311, -311, -311, -311, -311, -311,
2707 -311, -311, -311, -311, -311, -311, 0, 0, 0, 0,
2708 -311, -311, -311, -311, 0, 693, 0, 0, 0, 0,
2709 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2710 0, 0, 0, 0, 0, 0, -311, 0, 0, 0,
2711 0, 0, -118, -311, 0, -311, -311, -311, -311, -311,
2712 -311, -311, -311, -311, -311, 0, 0, 0, 0, 0,
2713 -311, -311, -109, -311, 0, -311, 0, -311, 0, -311,
2714 0, -311, -311, -311, 0, 0, 0, -311, -311, 0,
2715 -311, 0, 0, 0, 0, 0, 0, 0, -311, 0,
2716 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2717 -311, -311, 0, -311, -311, -311, -311, -311, 0, 0,
2718 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2719 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2720 0, -311, 0, 0, 0, 0, 0, 0, 0, 0,
2721 -311, -311, -311, -311, -311, -311, -311, -311, -311, -311,
2722 -311, -311, -311, 0, 0, 0, 0, -311, -311, -311,
2723 -311, 0, 693, 0, 0, 0, 0, 0, 0, 0,
2724 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2725 0, 0, 0, -311, 0, 0, 0, 0, 0, -118,
2726 -311, 0, -311, -311, -311, -311, -311, -311, -311, -311,
2727 -311, -311, 0, 0, 0, 0, 0, -311, -311, -311,
2728 0, 0, -311, 0, -311, 257, -311, 5, 6, 7,
2729 8, 9, -761, -761, -761, 10, 11, 0, 0, -761,
2730 12, 0, 13, 14, 15, 16, 17, 18, 19, 0,
2731 0, 0, 0, 0, 20, 21, 22, 23, 24, 25,
2732 26, 0, 0, 27, 0, 0, 0, 0, 0, 28,
2733 29, 258, 31, 32, 33, 34, 35, 36, 37, 38,
2734 39, 40, 0, 41, 42, 43, 44, 45, 46, 47,
2735 0, 0, 0, 0, 0, 0, 0, 0, 0, 48,
2736 49, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2737 0, 0, 0, 0, 50, 51, 0, 0, 0, 0,
2738 0, 0, 52, 0, 0, 53, 54, 0, 55, 56,
2739 0, 57, 0, 0, 58, 59, 60, 61, 62, 63,
2740 64, 65, 66, 0, 0, 0, 0, 0, 0, 0,
2741 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2742 0, 0, 0, 67, 68, 69, 0, 0, 0, 0,
2743 0, 0, 0, 0, 0, -761, 257, -761, 5, 6,
2744 7, 8, 9, 0, 0, -761, 10, 11, 0, -761,
2745 -761, 12, 0, 13, 14, 15, 16, 17, 18, 19,
2746 0, 0, 0, 0, 0, 20, 21, 22, 23, 24,
2747 25, 26, 0, 0, 27, 0, 0, 0, 0, 0,
2748 28, 29, 258, 31, 32, 33, 34, 35, 36, 37,
2749 38, 39, 40, 0, 41, 42, 43, 44, 45, 46,
2750 47, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2751 48, 49, 0, 0, 0, 0, 0, 0, 0, 0,
2752 0, 0, 0, 0, 0, 50, 51, 0, 0, 0,
2753 0, 0, 0, 52, 0, 0, 53, 54, 0, 55,
2754 56, 0, 57, 0, 0, 58, 59, 60, 61, 62,
2755 63, 64, 65, 66, 0, 0, 0, 0, 0, 0,
2756 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2757 0, 0, 0, 0, 67, 68, 69, 0, 0, 0,
2758 0, 0, 0, 0, 0, 0, -761, 257, -761, 5,
2759 6, 7, 8, 9, 0, 0, -761, 10, 11, 0,
2760 0, -761, 12, -761, 13, 14, 15, 16, 17, 18,
2761 19, 0, 0, 0, 0, 0, 20, 21, 22, 23,
2762 24, 25, 26, 0, 0, 27, 0, 0, 0, 0,
2763 0, 28, 29, 258, 31, 32, 33, 34, 35, 36,
2764 37, 38, 39, 40, 0, 41, 42, 43, 44, 45,
2765 46, 47, 0, 0, 0, 0, 0, 0, 0, 0,
2766 0, 48, 49, 0, 0, 0, 0, 0, 0, 0,
2767 0, 0, 0, 0, 0, 0, 50, 51, 0, 0,
2768 0, 0, 0, 0, 52, 0, 0, 53, 54, 0,
2769 55, 56, 0, 57, 0, 0, 58, 59, 60, 61,
2770 62, 63, 64, 65, 66, 0, 0, 0, 0, 0,
2771 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2772 0, 0, 0, 0, 0, 67, 68, 69, 0, 0,
2773 0, 0, 0, 0, 0, 0, 0, -761, 257, -761,
2774 5, 6, 7, 8, 9, 0, 0, -761, 10, 11,
2775 0, 0, -761, 12, 0, 13, 14, 15, 16, 17,
2776 18, 19, -761, 0, 0, 0, 0, 20, 21, 22,
2777 23, 24, 25, 26, 0, 0, 27, 0, 0, 0,
2778 0, 0, 28, 29, 258, 31, 32, 33, 34, 35,
2779 36, 37, 38, 39, 40, 0, 41, 42, 43, 44,
2780 45, 46, 47, 0, 0, 0, 0, 0, 0, 0,
2781 0, 0, 48, 49, 0, 0, 0, 0, 0, 0,
2782 0, 0, 0, 0, 0, 0, 0, 50, 51, 0,
2783 0, 0, 0, 0, 0, 52, 0, 0, 53, 54,
2784 0, 55, 56, 0, 57, 0, 0, 58, 59, 60,
2785 61, 62, 63, 64, 65, 66, 0, 0, 0, 0,
2786 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2787 0, 0, 0, 0, 0, 0, 67, 68, 69, 0,
2788 0, 0, 0, 0, 0, 0, 0, 0, -761, 257,
2789 -761, 5, 6, 7, 8, 9, 0, 0, -761, 10,
2790 11, 0, 0, -761, 12, 0, 13, 14, 15, 16,
2791 17, 18, 19, 0, 0, 0, 0, 0, 20, 21,
2792 22, 23, 24, 25, 26, 0, 0, 27, 0, 0,
2793 0, 0, 0, 28, 29, 258, 31, 32, 33, 34,
2794 35, 36, 37, 38, 39, 40, 0, 41, 42, 43,
2795 44, 45, 46, 47, 0, 0, 0, 0, 0, 0,
2796 0, 0, 0, 48, 49, 0, 0, 0, 0, 0,
2797 0, 0, 0, 0, 0, 0, 0, 0, 50, 51,
2798 0, 0, 0, 0, 0, 0, 52, 0, 0, 53,
2799 54, 0, 55, 56, 0, 57, 0, 0, 58, 59,
2800 60, 61, 62, 63, 64, 65, 66, 0, 0, 0,
2801 0, 0, 0, 0, 0, 257, 0, 5, 6, 7,
2802 8, 9, 0, -761, -761, 10, 11, 67, 68, 69,
2803 12, 0, 13, 14, 15, 16, 17, 18, 19, -761,
2804 0, -761, 0, 0, 20, 21, 22, 23, 24, 25,
2805 26, 0, 0, 27, 0, 0, 0, 0, 0, 28,
2806 29, 258, 31, 32, 33, 34, 35, 36, 37, 38,
2807 39, 40, 0, 41, 42, 43, 44, 45, 46, 47,
2808 0, 0, 0, 0, 0, 0, 0, 0, 0, 48,
2809 49, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2810 0, 0, 0, 0, 50, 51, 0, 0, 0, 0,
2811 0, 0, 52, 0, 0, 53, 54, 0, 55, 56,
2812 0, 57, 0, 0, 58, 59, 60, 61, 62, 63,
2813 64, 65, 66, 0, 0, 0, 0, 0, 0, 0,
2814 0, 257, 0, 5, 6, 7, 8, 9, 0, 0,
2815 0, 10, 11, 67, 68, 69, 12, 0, 13, 14,
2816 15, 16, 17, 18, 19, -761, 0, -761, 0, 0,
2817 20, 21, 22, 23, 24, 25, 26, 0, 0, 27,
2818 0, 0, 0, 0, 0, 28, 29, 258, 31, 32,
2819 33, 34, 35, 36, 37, 38, 39, 40, 0, 41,
2820 42, 43, 44, 45, 46, 47, 0, 0, 0, 0,
2821 0, 0, 0, 0, 0, 48, 49, 0, 0, 0,
2822 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2823 50, 51, 0, 0, 0, 0, 0, 0, 52, 0,
2824 0, 259, 54, 0, 55, 56, 0, 57, 0, 0,
2825 58, 59, 60, 61, 62, 63, 64, 65, 66, 0,
2826 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2827 0, 0, 0, 0, 0, 0, 0, 0, 0, 67,
2828 68, 69, 0, 0, 0, 0, 0, 0, 0, -761,
2829 0, -761, 257, -761, 5, 6, 7, 8, 9, 0,
2830 0, 0, 10, 11, 0, 0, 0, 12, 0, 13,
2831 14, 15, 16, 17, 18, 19, 0, 0, 0, 0,
2832 0, 20, 21, 22, 23, 24, 25, 26, 0, 0,
2833 27, 0, 0, 0, 0, 0, 28, 29, 258, 31,
2834 32, 33, 34, 35, 36, 37, 38, 39, 40, 0,
2835 41, 42, 43, 44, 45, 46, 47, 0, 0, 0,
2836 0, 0, 0, 0, 0, 0, 48, 49, 0, 0,
2837 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2838 0, 50, 51, 0, 0, 0, 0, 0, 0, 52,
2839 0, 0, 53, 54, 0, 55, 56, 0, 57, 0,
2840 0, 58, 59, 60, 61, 62, 63, 64, 65, 66,
2841 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2842 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2843 67, 68, 69, 0, 0, 0, 0, 0, 0, 0,
2844 -761, 0, -761, 4, -761, 5, 6, 7, 8, 9,
2845 0, 0, 0, 10, 11, 0, 0, 0, 12, 0,
2846 13, 14, 15, 16, 17, 18, 19, 0, 0, 0,
2847 0, 0, 20, 21, 22, 23, 24, 25, 26, 0,
2848 0, 27, 0, 0, 0, 0, 0, 28, 29, 30,
2849 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
2850 0, 41, 42, 43, 44, 45, 46, 47, 0, 0,
2851 0, 0, 0, 0, 0, 0, 0, 48, 49, 0,
2852 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2853 0, 0, 50, 51, 0, 0, 0, 0, 0, 0,
2854 52, 0, 0, 53, 54, 0, 55, 56, 0, 57,
2855 0, 0, 58, 59, 60, 61, 62, 63, 64, 65,
2856 66, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2857 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2858 0, 67, 68, 69, 0, 0, -761, 0, 0, 0,
2859 0, 0, 0, -761, 257, -761, 5, 6, 7, 8,
2860 9, 0, 0, 0, 10, 11, 0, 0, 0, 12,
2861 0, 13, 14, 15, 16, 17, 18, 19, 0, 0,
2862 0, 0, 0, 20, 21, 22, 23, 24, 25, 26,
2863 0, 0, 27, 0, 0, 0, 0, 0, 28, 29,
2864 258, 31, 32, 33, 34, 35, 36, 37, 38, 39,
2865 40, 0, 41, 42, 43, 44, 45, 46, 47, 0,
2866 0, 0, 0, 0, 0, 0, 0, 0, 48, 49,
2867 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2868 0, 0, 0, 50, 51, 0, 0, 0, 0, 0,
2869 0, 52, 0, 0, 53, 54, 0, 55, 56, 0,
2870 57, 0, 0, 58, 59, 60, 61, 62, 63, 64,
2871 65, 66, 0, 0, 0, 0, 0, 0, 0, 0,
2872 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2873 0, 0, 67, 68, 69, 0, 0, -761, 0, 0,
2874 0, 0, 0, 0, -761, 257, -761, 5, 6, 7,
2875 8, 9, 0, 0, -761, 10, 11, 0, 0, 0,
2876 12, 0, 13, 14, 15, 16, 17, 18, 19, 0,
2877 0, 0, 0, 0, 20, 21, 22, 23, 24, 25,
2878 26, 0, 0, 27, 0, 0, 0, 0, 0, 28,
2879 29, 258, 31, 32, 33, 34, 35, 36, 37, 38,
2880 39, 40, 0, 41, 42, 43, 44, 45, 46, 47,
2881 0, 0, 0, 0, 0, 0, 0, 0, 0, 48,
2882 49, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2883 0, 0, 0, 0, 50, 51, 0, 0, 0, 0,
2884 0, 0, 52, 0, 0, 53, 54, 0, 55, 56,
2885 0, 57, 0, 0, 58, 59, 60, 61, 62, 63,
2886 64, 65, 66, 0, 0, 0, 0, 0, 0, 0,
2887 0, 257, 0, 5, 6, 7, 8, 9, 0, 0,
2888 0, 10, 11, 67, 68, 69, 12, 0, 13, 14,
2889 15, 16, 17, 18, 19, -761, 0, -761, 0, 0,
2890 20, 21, 22, 23, 24, 25, 26, 0, 0, 27,
2891 0, 0, 0, 0, 0, 28, 29, 258, 31, 32,
2892 33, 34, 35, 36, 37, 38, 39, 40, 0, 41,
2893 42, 43, 44, 45, 46, 47, 0, 0, 0, 0,
2894 0, 0, 0, 0, 0, 48, 49, 0, 0, 0,
2895 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2896 50, 51, 0, 0, 0, 0, 0, 0, 52, 0,
2897 0, 53, 54, 0, 55, 56, 0, 57, 0, 0,
2898 58, 59, 60, 61, 62, 63, 64, 65, 66, 0,
2899 -761, 0, 0, 0, 0, 0, 0, 0, 0, 5,
2900 6, 7, 0, 9, 0, 0, 0, 10, 11, 67,
2901 68, 69, 12, 0, 13, 14, 15, 16, 17, 18,
2902 19, -761, 0, -761, 0, 0, 20, 21, 22, 23,
2903 24, 25, 26, 0, 0, 206, 0, 0, 0, 0,
2904 0, 0, 29, 0, 0, 32, 33, 34, 35, 36,
2905 37, 38, 39, 40, 207, 41, 42, 43, 44, 45,
2906 46, 47, 0, 0, 0, 0, 0, 0, 0, 0,
2907 0, 48, 49, 0, 0, 0, 0, 0, 0, 0,
2908 0, 0, 0, 0, 0, 0, 50, 51, 0, 0,
2909 0, 0, 0, 0, 208, 0, 0, 209, 54, 0,
2910 55, 56, 0, 210, 211, 212, 58, 59, 213, 61,
2911 62, 63, 64, 65, 66, 0, 0, 0, 0, 0,
2912 0, 0, 0, 0, 0, 5, 6, 7, 0, 9,
2913 0, 0, 0, 10, 11, 67, 214, 69, 12, 0,
2914 13, 14, 15, 16, 17, 18, 19, 0, 0, 237,
2915 0, 0, 20, 21, 22, 23, 24, 25, 26, 0,
2916 0, 27, 0, 0, 0, 0, 0, 0, 29, 0,
2917 0, 32, 33, 34, 35, 36, 37, 38, 39, 40,
2918 0, 41, 42, 43, 44, 45, 46, 47, 0, 0,
2919 0, 0, 0, 0, 0, 0, 0, 48, 49, 0,
2920 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2921 0, 0, 50, 51, 0, 0, 0, 0, 0, 0,
2922 208, 0, 0, 209, 54, 0, 55, 56, 0, 0,
2923 0, 0, 58, 59, 60, 61, 62, 63, 64, 65,
2924 66, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2925 0, 5, 6, 7, 0, 9, 0, 0, 0, 10,
2926 11, 67, 68, 69, 12, 0, 13, 14, 15, 16,
2927 17, 18, 19, 305, 0, 306, 0, 0, 20, 21,
2928 22, 23, 24, 25, 26, 0, 0, 27, 0, 0,
2929 0, 0, 0, 0, 29, 0, 0, 32, 33, 34,
2930 35, 36, 37, 38, 39, 40, 0, 41, 42, 43,
2931 44, 45, 46, 47, 0, 0, 0, 0, 0, 0,
2932 0, 0, 0, 48, 49, 0, 0, 0, 0, 0,
2933 0, 0, 0, 0, 0, 0, 0, 0, 50, 51,
2934 0, 0, 0, 0, 0, 0, 208, 0, 0, 209,
2935 54, 0, 55, 56, 0, 0, 0, 0, 58, 59,
2936 60, 61, 62, 63, 64, 65, 66, 0, 0, 0,
2937 0, 0, 0, 0, 0, 0, 0, 5, 6, 7,
2938 8, 9, 0, 0, 0, 10, 11, 67, 68, 69,
2939 12, 0, 13, 14, 15, 16, 17, 18, 19, 0,
2940 0, 237, 0, 0, 20, 21, 22, 23, 24, 25,
2941 26, 0, 0, 27, 0, 0, 0, 0, 0, 28,
2942 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
2943 39, 40, 0, 41, 42, 43, 44, 45, 46, 47,
2944 0, 0, 0, 0, 0, 0, 0, 0, 0, 48,
2945 49, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2946 0, 0, 0, 0, 50, 51, 0, 0, 0, 0,
2947 0, 0, 52, 0, 0, 53, 54, 0, 55, 56,
2948 0, 57, 0, 0, 58, 59, 60, 61, 62, 63,
2949 64, 65, 66, 0, 0, 0, 0, 0, 0, 0,
2950 0, 0, 0, 5, 6, 7, 8, 9, 0, 0,
2951 0, 10, 11, 67, 68, 69, 12, 0, 13, 14,
2952 15, 16, 17, 18, 19, 503, 0, 0, 0, 0,
2953 20, 21, 22, 23, 24, 25, 26, 0, 0, 27,
2954 0, 0, 0, 0, 0, 28, 29, 258, 31, 32,
2955 33, 34, 35, 36, 37, 38, 39, 40, 0, 41,
2956 42, 43, 44, 45, 46, 47, 0, 0, 0, 0,
2957 0, 0, 0, 0, 0, 48, 49, 0, 0, 0,
2958 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2959 50, 51, 0, 0, 0, 0, 0, 0, 52, 0,
2960 0, 53, 54, 0, 55, 56, 0, 57, 0, 0,
2961 58, 59, 60, 61, 62, 63, 64, 65, 66, 0,
2962 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2963 0, 0, 0, 0, 0, 0, 0, 0, 0, 67,
2964 68, 69, 0, 0, 0, 0, 0, 0, 0, 0,
2965 0, 503, 126, 127, 128, 129, 130, 131, 132, 133,
2966 134, 135, 136, 137, 138, 139, 140, 141, 142, 143,
2967 144, 145, 146, 147, 148, 149, 0, 0, 0, 150,
2968 151, 152, 395, 396, 397, 398, 157, 158, 159, 0,
2969 0, 0, 0, 0, 160, 161, 162, 163, 399, 400,
2970 401, 402, 168, 37, 38, 403, 40, 0, 0, 0,
2971 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2972 0, 0, 0, 0, 170, 171, 172, 173, 174, 175,
2973 176, 177, 178, 0, 0, 179, 180, 0, 0, 0,
2974 0, 181, 182, 183, 184, 0, 0, 0, 0, 0,
2975 0, 0, 0, 0, 0, 0, 185, 186, 0, 0,
2976 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2977 0, 0, 0, 0, 0, 0, 0, 0, 187, 188,
2978 189, 190, 191, 192, 193, 194, 195, 196, 0, 197,
2979 198, 0, 0, 0, 0, 0, 199, 404, 126, 127,
2980 128, 129, 130, 131, 132, 133, 134, 135, 136, 137,
2981 138, 139, 140, 141, 142, 143, 144, 145, 146, 147,
2982 148, 149, 0, 0, 0, 150, 151, 152, 153, 154,
2983 155, 156, 157, 158, 159, 0, 0, 0, 0, 0,
2984 160, 161, 162, 163, 164, 165, 166, 167, 168, 288,
2985 289, 169, 290, 0, 0, 0, 0, 0, 0, 0,
2986 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2987 170, 171, 172, 173, 174, 175, 176, 177, 178, 0,
2988 0, 179, 180, 0, 0, 0, 0, 181, 182, 183,
2989 184, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2990 0, 0, 185, 186, 0, 0, 0, 0, 0, 0,
2991 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2992 0, 0, 0, 0, 187, 188, 189, 190, 191, 192,
2993 193, 194, 195, 196, 0, 197, 198, 0, 0, 0,
2994 0, 0, 199, 126, 127, 128, 129, 130, 131, 132,
2995 133, 134, 135, 136, 137, 138, 139, 140, 141, 142,
2996 143, 144, 145, 146, 147, 148, 149, 0, 0, 0,
2997 150, 151, 152, 153, 154, 155, 156, 157, 158, 159,
2998 0, 0, 0, 0, 0, 160, 161, 162, 163, 164,
2999 165, 166, 167, 168, 239, 0, 169, 0, 0, 0,
3000 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3001 0, 0, 0, 0, 0, 170, 171, 172, 173, 174,
3002 175, 176, 177, 178, 0, 0, 179, 180, 0, 0,
3003 0, 0, 181, 182, 183, 184, 0, 0, 0, 0,
3004 0, 0, 0, 0, 0, 0, 0, 185, 186, 0,
3005 0, 59, 0, 0, 0, 0, 0, 0, 0, 0,
3006 0, 0, 0, 0, 0, 0, 0, 0, 0, 187,
3007 188, 189, 190, 191, 192, 193, 194, 195, 196, 0,
3008 197, 198, 0, 0, 0, 0, 0, 199, 126, 127,
3009 128, 129, 130, 131, 132, 133, 134, 135, 136, 137,
3010 138, 139, 140, 141, 142, 143, 144, 145, 146, 147,
3011 148, 149, 0, 0, 0, 150, 151, 152, 153, 154,
3012 155, 156, 157, 158, 159, 0, 0, 0, 0, 0,
3013 160, 161, 162, 163, 164, 165, 166, 167, 168, 0,
3014 0, 169, 0, 0, 0, 0, 0, 0, 0, 0,
3015 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3016 170, 171, 172, 173, 174, 175, 176, 177, 178, 0,
3017 0, 179, 180, 0, 0, 0, 0, 181, 182, 183,
3018 184, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3019 0, 0, 185, 186, 0, 0, 59, 0, 0, 0,
3020 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3021 0, 0, 0, 0, 187, 188, 189, 190, 191, 192,
3022 193, 194, 195, 196, 0, 197, 198, 0, 0, 0,
3023 0, 0, 199, 126, 127, 128, 129, 130, 131, 132,
3024 133, 134, 135, 136, 137, 138, 139, 140, 141, 142,
3025 143, 144, 145, 146, 147, 148, 149, 0, 0, 0,
3026 150, 151, 152, 153, 154, 155, 156, 157, 158, 159,
3027 0, 0, 0, 0, 0, 160, 161, 162, 163, 164,
3028 165, 166, 167, 168, 0, 0, 169, 0, 0, 0,
3029 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3030 0, 0, 0, 0, 0, 170, 171, 172, 173, 174,
3031 175, 176, 177, 178, 0, 0, 179, 180, 0, 0,
3032 0, 0, 181, 182, 183, 184, 0, 0, 0, 0,
3033 0, 0, 0, 0, 0, 0, 0, 185, 186, 0,
3034 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3035 0, 0, 0, 0, 0, 0, 0, 0, 0, 187,
3036 188, 189, 190, 191, 192, 193, 194, 195, 196, 0,
3037 197, 198, 5, 6, 7, 0, 9, 199, 0, 0,
3038 10, 11, 0, 0, 0, 12, 0, 13, 14, 15,
3039 245, 246, 18, 19, 0, 0, 0, 0, 0, 20,
3040 247, 248, 23, 24, 25, 26, 0, 0, 206, 0,
3041 0, 0, 0, 0, 0, 277, 0, 0, 32, 33,
3042 34, 35, 36, 37, 38, 39, 40, 0, 41, 42,
3043 43, 44, 45, 46, 47, 0, 0, 0, 0, 0,
3044 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3045 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3046 0, 0, 0, 0, 0, 0, 0, 278, 0, 0,
3047 209, 54, 0, 55, 56, 0, 0, 0, 0, 58,
3048 59, 60, 61, 62, 63, 64, 65, 66, 0, 0,
3049 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3050 0, 5, 6, 7, 0, 9, 0, 0, 279, 10,
3051 11, 0, 0, 0, 12, 280, 13, 14, 15, 245,
3052 246, 18, 19, 0, 0, 0, 0, 0, 20, 247,
3053 248, 23, 24, 25, 26, 0, 0, 206, 0, 0,
3054 0, 0, 0, 0, 277, 0, 0, 32, 33, 34,
3055 35, 36, 37, 38, 39, 40, 0, 41, 42, 43,
3056 44, 45, 46, 47, 0, 0, 0, 0, 0, 0,
3057 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3058 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3059 0, 0, 0, 0, 0, 0, 278, 0, 0, 209,
3060 54, 0, 55, 56, 0, 0, 0, 0, 58, 59,
3061 60, 61, 62, 63, 64, 65, 66, 0, 0, 0,
3062 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3063 5, 6, 7, 8, 9, 0, 0, 279, 10, 11,
3064 0, 0, 0, 12, 526, 13, 14, 15, 16, 17,
3065 18, 19, 0, 0, 0, 0, 0, 20, 21, 22,
3066 23, 24, 25, 26, 0, 0, 27, 0, 0, 0,
3067 0, 0, 28, 29, 30, 31, 32, 33, 34, 35,
3068 36, 37, 38, 39, 40, 0, 41, 42, 43, 44,
3069 45, 46, 47, 0, 0, 0, 0, 0, 0, 0,
3070 0, 0, 48, 49, 0, 0, 0, 0, 0, 0,
3071 0, 0, 0, 0, 0, 0, 0, 50, 51, 0,
3072 0, 0, 0, 0, 0, 52, 0, 0, 53, 54,
3073 0, 55, 56, 0, 57, 0, 0, 58, 59, 60,
3074 61, 62, 63, 64, 65, 66, 0, 0, 0, 0,
3075 0, 0, 0, 0, 0, 0, 5, 6, 7, 0,
3076 9, 0, 0, 0, 10, 11, 67, 68, 69, 12,
3077 0, 13, 14, 15, 16, 17, 18, 19, 0, 0,
3078 0, 0, 0, 20, 21, 22, 23, 24, 25, 26,
3079 0, 0, 206, 0, 0, 0, 0, 0, 0, 29,
3080 0, 0, 32, 33, 34, 35, 36, 37, 38, 39,
3081 40, 207, 41, 42, 43, 44, 45, 46, 47, 0,
3082 0, 0, 0, 0, 0, 0, 0, 0, 48, 49,
3083 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3084 0, 0, 0, 50, 51, 0, 0, 0, 0, 0,
3085 0, 208, 0, 0, 209, 54, 0, 55, 56, 0,
3086 210, 211, 212, 58, 59, 213, 61, 62, 63, 64,
3087 65, 66, 0, 0, 0, 0, 0, 0, 0, 0,
3088 0, 0, 5, 6, 7, 8, 9, 0, 0, 0,
3089 10, 11, 67, 214, 69, 12, 0, 13, 14, 15,
3090 16, 17, 18, 19, 0, 0, 0, 0, 0, 20,
3091 21, 22, 23, 24, 25, 26, 0, 0, 27, 0,
3092 0, 0, 0, 0, 28, 29, 0, 31, 32, 33,
3093 34, 35, 36, 37, 38, 39, 40, 0, 41, 42,
3094 43, 44, 45, 46, 47, 0, 0, 0, 0, 0,
3095 0, 0, 0, 0, 48, 49, 0, 0, 0, 0,
3096 0, 0, 0, 0, 0, 0, 0, 0, 0, 50,
3097 51, 0, 0, 0, 0, 0, 0, 52, 0, 0,
3098 53, 54, 0, 55, 56, 0, 57, 0, 0, 58,
3099 59, 60, 61, 62, 63, 64, 65, 66, 0, 0,
3100 0, 0, 0, 0, 0, 0, 0, 0, 5, 6,
3101 7, 0, 9, 0, 0, 0, 10, 11, 67, 68,
3102 69, 12, 0, 13, 14, 15, 16, 17, 18, 19,
3103 0, 0, 0, 0, 0, 20, 21, 22, 23, 24,
3104 25, 26, 0, 0, 206, 0, 0, 0, 0, 0,
3105 0, 29, 0, 0, 32, 33, 34, 35, 36, 37,
3106 38, 39, 40, 207, 41, 42, 43, 44, 45, 46,
3107 47, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3108 48, 49, 0, 0, 0, 0, 0, 0, 0, 0,
3109 0, 0, 0, 0, 0, 50, 439, 0, 0, 0,
3110 0, 0, 0, 208, 0, 0, 209, 54, 0, 55,
3111 56, 0, 210, 211, 212, 58, 59, 213, 61, 62,
3112 63, 64, 65, 66, 0, 0, 0, 0, 0, 0,
3113 0, 0, 0, 0, 5, 6, 7, 0, 9, 0,
3114 0, 0, 10, 11, 67, 214, 69, 12, 0, 13,
3115 14, 15, 245, 246, 18, 19, 0, 0, 0, 0,
3116 0, 20, 247, 248, 23, 24, 25, 26, 0, 0,
3117 206, 0, 0, 0, 0, 0, 0, 29, 0, 0,
3118 32, 33, 34, 35, 36, 37, 38, 39, 40, 207,
3119 41, 42, 43, 44, 45, 46, 47, 0, 0, 0,
3120 0, 0, 0, 0, 0, 0, 48, 49, 0, 0,
3121 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3122 0, 50, 51, 0, 0, 0, 0, 0, 0, 208,
3123 0, 0, 209, 54, 0, 55, 56, 0, 621, 211,
3124 212, 58, 59, 213, 61, 62, 63, 64, 65, 66,
3125 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3126 5, 6, 7, 0, 9, 0, 0, 0, 10, 11,
3127 67, 214, 69, 12, 0, 13, 14, 15, 245, 246,
3128 18, 19, 0, 0, 0, 0, 0, 20, 247, 248,
3129 23, 24, 25, 26, 0, 0, 206, 0, 0, 0,
3130 0, 0, 0, 29, 0, 0, 32, 33, 34, 35,
3131 36, 37, 38, 39, 40, 207, 41, 42, 43, 44,
3132 45, 46, 47, 0, 0, 0, 0, 0, 0, 0,
3133 0, 0, 48, 49, 0, 0, 0, 0, 0, 0,
3134 0, 0, 0, 0, 0, 0, 0, 50, 439, 0,
3135 0, 0, 0, 0, 0, 208, 0, 0, 209, 54,
3136 0, 55, 56, 0, 621, 211, 212, 58, 59, 213,
3137 61, 62, 63, 64, 65, 66, 0, 0, 0, 0,
3138 0, 0, 0, 0, 0, 0, 5, 6, 7, 0,
3139 9, 0, 0, 0, 10, 11, 67, 214, 69, 12,
3140 0, 13, 14, 15, 245, 246, 18, 19, 0, 0,
3141 0, 0, 0, 20, 247, 248, 23, 24, 25, 26,
3142 0, 0, 206, 0, 0, 0, 0, 0, 0, 29,
3143 0, 0, 32, 33, 34, 35, 36, 37, 38, 39,
3144 40, 207, 41, 42, 43, 44, 45, 46, 47, 0,
3145 0, 0, 0, 0, 0, 0, 0, 0, 48, 49,
3146 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3147 0, 0, 0, 50, 51, 0, 0, 0, 0, 0,
3148 0, 208, 0, 0, 209, 54, 0, 55, 56, 0,
3149 210, 211, 0, 58, 59, 213, 61, 62, 63, 64,
3150 65, 66, 0, 0, 0, 0, 0, 0, 0, 0,
3151 0, 0, 5, 6, 7, 0, 9, 0, 0, 0,
3152 10, 11, 67, 214, 69, 12, 0, 13, 14, 15,
3153 245, 246, 18, 19, 0, 0, 0, 0, 0, 20,
3154 247, 248, 23, 24, 25, 26, 0, 0, 206, 0,
3155 0, 0, 0, 0, 0, 29, 0, 0, 32, 33,
3156 34, 35, 36, 37, 38, 39, 40, 207, 41, 42,
3157 43, 44, 45, 46, 47, 0, 0, 0, 0, 0,
3158 0, 0, 0, 0, 48, 49, 0, 0, 0, 0,
3159 0, 0, 0, 0, 0, 0, 0, 0, 0, 50,
3160 51, 0, 0, 0, 0, 0, 0, 208, 0, 0,
3161 209, 54, 0, 55, 56, 0, 0, 211, 212, 58,
3162 59, 213, 61, 62, 63, 64, 65, 66, 0, 0,
3163 0, 0, 0, 0, 0, 0, 0, 0, 5, 6,
3164 7, 0, 9, 0, 0, 0, 10, 11, 67, 214,
3165 69, 12, 0, 13, 14, 15, 245, 246, 18, 19,
3166 0, 0, 0, 0, 0, 20, 247, 248, 23, 24,
3167 25, 26, 0, 0, 206, 0, 0, 0, 0, 0,
3168 0, 29, 0, 0, 32, 33, 34, 35, 36, 37,
3169 38, 39, 40, 207, 41, 42, 43, 44, 45, 46,
3170 47, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3171 48, 49, 0, 0, 0, 0, 0, 0, 0, 0,
3172 0, 0, 0, 0, 0, 50, 51, 0, 0, 0,
3173 0, 0, 0, 208, 0, 0, 209, 54, 0, 55,
3174 56, 0, 621, 211, 0, 58, 59, 213, 61, 62,
3175 63, 64, 65, 66, 0, 0, 0, 0, 0, 0,
3176 0, 0, 0, 0, 5, 6, 7, 0, 9, 0,
3177 0, 0, 10, 11, 67, 214, 69, 12, 0, 13,
3178 14, 15, 245, 246, 18, 19, 0, 0, 0, 0,
3179 0, 20, 247, 248, 23, 24, 25, 26, 0, 0,
3180 206, 0, 0, 0, 0, 0, 0, 29, 0, 0,
3181 32, 33, 34, 35, 36, 37, 38, 39, 40, 207,
3182 41, 42, 43, 44, 45, 46, 47, 0, 0, 0,
3183 0, 0, 0, 0, 0, 0, 48, 49, 0, 0,
3184 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3185 0, 50, 51, 0, 0, 0, 0, 0, 0, 208,
3186 0, 0, 209, 54, 0, 55, 56, 0, 0, 211,
3187 0, 58, 59, 213, 61, 62, 63, 64, 65, 66,
3188 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3189 5, 6, 7, 0, 9, 0, 0, 0, 10, 11,
3190 67, 214, 69, 12, 0, 13, 14, 15, 16, 17,
3191 18, 19, 0, 0, 0, 0, 0, 20, 21, 22,
3192 23, 24, 25, 26, 0, 0, 206, 0, 0, 0,
3193 0, 0, 0, 29, 0, 0, 32, 33, 34, 35,
3194 36, 37, 38, 39, 40, 0, 41, 42, 43, 44,
3195 45, 46, 47, 0, 0, 0, 0, 0, 0, 0,
3196 0, 0, 48, 49, 0, 0, 0, 0, 0, 0,
3197 0, 0, 0, 0, 0, 0, 0, 50, 51, 0,
3198 0, 0, 0, 0, 0, 208, 0, 0, 209, 54,
3199 0, 55, 56, 0, 519, 0, 0, 58, 59, 60,
3200 61, 62, 63, 64, 65, 66, 0, 0, 0, 0,
3201 0, 0, 0, 0, 0, 0, 5, 6, 7, 0,
3202 9, 0, 0, 0, 10, 11, 67, 214, 69, 12,
3203 0, 13, 14, 15, 245, 246, 18, 19, 0, 0,
3204 0, 0, 0, 20, 247, 248, 23, 24, 25, 26,
3205 0, 0, 206, 0, 0, 0, 0, 0, 0, 29,
3206 0, 0, 32, 33, 34, 35, 36, 37, 38, 39,
3207 40, 0, 41, 42, 43, 44, 45, 46, 47, 0,
3208 0, 0, 0, 0, 0, 0, 0, 0, 48, 49,
3209 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3210 0, 0, 0, 50, 51, 0, 0, 0, 0, 0,
3211 0, 208, 0, 0, 209, 54, 0, 55, 56, 0,
3212 773, 0, 0, 58, 59, 60, 61, 62, 63, 64,
3213 65, 66, 0, 0, 0, 0, 0, 0, 0, 0,
3214 0, 0, 5, 6, 7, 0, 9, 0, 0, 0,
3215 10, 11, 67, 214, 69, 12, 0, 13, 14, 15,
3216 245, 246, 18, 19, 0, 0, 0, 0, 0, 20,
3217 247, 248, 23, 24, 25, 26, 0, 0, 206, 0,
3218 0, 0, 0, 0, 0, 29, 0, 0, 32, 33,
3219 34, 35, 36, 37, 38, 39, 40, 0, 41, 42,
3220 43, 44, 45, 46, 47, 0, 0, 0, 0, 0,
3221 0, 0, 0, 0, 48, 49, 0, 0, 0, 0,
3222 0, 0, 0, 0, 0, 0, 0, 0, 0, 50,
3223 51, 0, 0, 0, 0, 0, 0, 208, 0, 0,
3224 209, 54, 0, 55, 56, 0, 519, 0, 0, 58,
3225 59, 60, 61, 62, 63, 64, 65, 66, 0, 0,
3226 0, 0, 0, 0, 0, 0, 0, 0, 5, 6,
3227 7, 0, 9, 0, 0, 0, 10, 11, 67, 214,
3228 69, 12, 0, 13, 14, 15, 245, 246, 18, 19,
3229 0, 0, 0, 0, 0, 20, 247, 248, 23, 24,
3230 25, 26, 0, 0, 206, 0, 0, 0, 0, 0,
3231 0, 29, 0, 0, 32, 33, 34, 35, 36, 37,
3232 38, 39, 40, 0, 41, 42, 43, 44, 45, 46,
3233 47, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3234 48, 49, 0, 0, 0, 0, 0, 0, 0, 0,
3235 0, 0, 0, 0, 0, 50, 51, 0, 0, 0,
3236 0, 0, 0, 208, 0, 0, 209, 54, 0, 55,
3237 56, 0, 846, 0, 0, 58, 59, 60, 61, 62,
3238 63, 64, 65, 66, 0, 0, 0, 0, 0, 0,
3239 0, 0, 0, 0, 5, 6, 7, 0, 9, 0,
3240 0, 0, 10, 11, 67, 214, 69, 12, 0, 13,
3241 14, 15, 245, 246, 18, 19, 0, 0, 0, 0,
3242 0, 20, 247, 248, 23, 24, 25, 26, 0, 0,
3243 206, 0, 0, 0, 0, 0, 0, 29, 0, 0,
3244 32, 33, 34, 35, 36, 37, 38, 39, 40, 0,
3245 41, 42, 43, 44, 45, 46, 47, 0, 0, 0,
3246 0, 0, 0, 0, 0, 0, 48, 49, 0, 0,
3247 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3248 0, 50, 51, 0, 0, 0, 0, 0, 0, 208,
3249 0, 0, 209, 54, 0, 55, 56, 0, 1019, 0,
3250 0, 58, 59, 60, 61, 62, 63, 64, 65, 66,
3251 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3252 5, 6, 7, 0, 9, 0, 0, 0, 10, 11,
3253 67, 214, 69, 12, 0, 13, 14, 15, 245, 246,
3254 18, 19, 0, 0, 0, 0, 0, 20, 247, 248,
3255 23, 24, 25, 26, 0, 0, 206, 0, 0, 0,
3256 0, 0, 0, 29, 0, 0, 32, 33, 34, 35,
3257 36, 37, 38, 39, 40, 0, 41, 42, 43, 44,
3258 45, 46, 47, 0, 0, 0, 0, 0, 0, 0,
3259 0, 0, 48, 49, 0, 0, 0, 0, 0, 0,
3260 0, 0, 0, 0, 0, 0, 0, 50, 51, 0,
3261 0, 0, 0, 0, 0, 208, 0, 0, 209, 54,
3262 0, 55, 56, 0, 0, 0, 0, 58, 59, 60,
3263 61, 62, 63, 64, 65, 66, 0, 0, 0, 0,
3264 0, 0, 0, 0, 0, 0, 5, 6, 7, 0,
3265 9, 0, 0, 0, 10, 11, 67, 214, 69, 12,
3266 0, 13, 14, 15, 16, 17, 18, 19, 0, 0,
3267 0, 0, 0, 20, 21, 22, 23, 24, 25, 26,
3268 0, 0, 206, 0, 0, 0, 0, 0, 0, 29,
3269 0, 0, 32, 33, 34, 35, 36, 37, 38, 39,
3270 40, 0, 41, 42, 43, 44, 45, 46, 47, 0,
3271 0, 0, 0, 0, 0, 0, 0, 0, 48, 49,
3272 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3273 0, 0, 0, 50, 51, 0, 0, 0, 0, 0,
3274 0, 208, 0, 0, 209, 54, 0, 55, 56, 0,
3275 0, 0, 0, 58, 59, 60, 61, 62, 63, 64,
3276 65, 66, 0, 0, 0, 0, 0, 0, 0, 0,
3277 0, 0, 5, 6, 7, 0, 9, 0, 0, 0,
3278 10, 11, 67, 214, 69, 12, 0, 13, 14, 15,
3279 16, 17, 18, 19, 0, 0, 0, 0, 0, 20,
3280 21, 22, 23, 24, 25, 26, 0, 0, 27, 0,
3281 0, 0, 0, 0, 0, 29, 0, 0, 32, 33,
3282 34, 35, 36, 37, 38, 39, 40, 0, 41, 42,
3283 43, 44, 45, 46, 47, 0, 0, 0, 0, 0,
3284 0, 0, 0, 0, 48, 49, 0, 0, 0, 0,
3285 0, 0, 0, 0, 0, 0, 0, 0, 0, 50,
3286 51, 0, 0, 0, 0, 0, 0, 208, 0, 0,
3287 209, 54, 0, 55, 56, 0, 0, 0, 0, 58,
3288 59, 60, 61, 62, 63, 64, 65, 66, 0, 0,
3289 0, 0, 0, 0, 0, 0, 0, 0, 5, 6,
3290 7, 0, 9, 0, 0, 0, 10, 11, 67, 68,
3291 69, 12, 0, 13, 14, 15, 245, 246, 18, 19,
3292 0, 0, 0, 0, 0, 20, 247, 248, 23, 24,
3293 25, 26, 0, 0, 206, 0, 0, 0, 0, 0,
3294 0, 277, 0, 0, 32, 33, 34, 35, 36, 37,
3295 38, 39, 40, 0, 41, 42, 43, 44, 45, 46,
3296 47, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3297 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3298 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3299 0, 0, 0, 278, 0, 0, 328, 54, 0, 55,
3300 56, 0, 329, 0, 0, 58, 59, 60, 61, 62,
3301 63, 64, 65, 66, 0, 0, 0, 0, 0, 0,
3302 5, 6, 7, 0, 9, 0, 0, 0, 10, 11,
3303 0, 0, 0, 12, 279, 13, 14, 15, 245, 246,
3304 18, 19, 0, 0, 0, 0, 0, 20, 247, 248,
3305 23, 24, 25, 26, 0, 0, 206, 0, 0, 0,
3306 0, 0, 0, 277, 0, 0, 32, 33, 34, 35,
3307 36, 37, 38, 39, 40, 0, 41, 42, 43, 44,
3308 45, 46, 47, 0, 0, 0, 0, 0, 0, 0,
3309 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3310 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3311 0, 0, 0, 0, 0, 376, 0, 0, 53, 54,
3312 0, 55, 56, 0, 57, 0, 0, 58, 59, 60,
3313 61, 62, 63, 64, 65, 66, 0, 0, 0, 0,
3314 0, 0, 5, 6, 7, 0, 9, 0, 0, 0,
3315 10, 11, 0, 0, 0, 12, 279, 13, 14, 15,
3316 245, 246, 18, 19, 0, 0, 0, 0, 0, 20,
3317 247, 248, 23, 24, 25, 26, 0, 0, 206, 0,
3318 0, 0, 0, 0, 0, 277, 0, 0, 32, 33,
3319 34, 384, 36, 37, 38, 385, 40, 0, 41, 42,
3320 43, 44, 45, 46, 47, 0, 0, 0, 0, 0,
3321 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3322 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3323 0, 0, 0, 386, 0, 0, 0, 387, 0, 0,
3324 209, 54, 0, 55, 56, 0, 0, 0, 0, 58,
3325 59, 60, 61, 62, 63, 64, 65, 66, 0, 0,
3326 0, 0, 0, 0, 5, 6, 7, 0, 9, 0,
3327 0, 0, 10, 11, 0, 0, 0, 12, 279, 13,
3328 14, 15, 245, 246, 18, 19, 0, 0, 0, 0,
3329 0, 20, 247, 248, 23, 24, 25, 26, 0, 0,
3330 206, 0, 0, 0, 0, 0, 0, 277, 0, 0,
3331 32, 33, 34, 384, 36, 37, 38, 385, 40, 0,
3332 41, 42, 43, 44, 45, 46, 47, 0, 0, 0,
3333 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3334 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3335 0, 0, 0, 0, 0, 0, 0, 0, 0, 387,
3336 0, 0, 209, 54, 0, 55, 56, 0, 0, 0,
3337 0, 58, 59, 60, 61, 62, 63, 64, 65, 66,
3338 0, 0, 0, 0, 0, 0, 5, 6, 7, 0,
3339 9, 0, 0, 0, 10, 11, 0, 0, 0, 12,
3340 279, 13, 14, 15, 245, 246, 18, 19, 0, 0,
3341 0, 0, 0, 20, 247, 248, 23, 24, 25, 26,
3342 0, 0, 206, 0, 0, 0, 0, 0, 0, 277,
3343 0, 0, 32, 33, 34, 35, 36, 37, 38, 39,
3344 40, 0, 41, 42, 43, 44, 45, 46, 47, 0,
3345 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3346 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3347 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3348 0, 278, 0, 0, 328, 54, 0, 55, 56, 0,
3349 0, 0, 0, 58, 59, 60, 61, 62, 63, 64,
3350 65, 66, 0, 0, 0, 0, 0, 0, 5, 6,
3351 7, 0, 9, 0, 0, 0, 10, 11, 0, 0,
3352 0, 12, 279, 13, 14, 15, 245, 246, 18, 19,
3353 0, 0, 0, 0, 0, 20, 247, 248, 23, 24,
3354 25, 26, 0, 0, 206, 0, 0, 0, 0, 0,
3355 0, 277, 0, 0, 32, 33, 34, 35, 36, 37,
3356 38, 39, 40, 0, 41, 42, 43, 44, 45, 46,
3357 47, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3358 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3359 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3360 0, 0, 0, 1009, 0, 0, 209, 54, 0, 55,
3361 56, 0, 0, 0, 0, 58, 59, 60, 61, 62,
3362 63, 64, 65, 66, 0, 0, 0, 0, 0, 0,
3363 5, 6, 7, 0, 9, 0, 0, 0, 10, 11,
3364 0, 0, 0, 12, 279, 13, 14, 15, 245, 246,
3365 18, 19, 0, 0, 0, 0, 0, 20, 247, 248,
3366 23, 24, 25, 26, 0, 0, 206, 0, 0, 0,
3367 0, 0, 0, 277, 0, 0, 32, 33, 34, 35,
3368 36, 37, 38, 39, 40, 0, 41, 42, 43, 44,
3369 45, 46, 47, 23, 24, 25, 26, 0, 0, 0,
3370 0, 0, 0, 0, 0, 0, 0, 0, 0, 32,
3371 33, 34, 784, 0, 0, 0, 785, 0, 0, 41,
3372 42, 43, 44, 45, 0, 1062, 0, 0, 209, 54,
3373 0, 55, 56, 0, 0, 0, 0, 58, 59, 60,
3374 61, 62, 63, 64, 65, 66, 0, 0, 0, 0,
3375 786, 787, 0, 0, 0, 0, 0, 0, 788, 0,
3376 0, 789, 0, 0, 790, 791, 279, 980, 0, 0,
3377 792, 59, 60, 61, 62, 63, 64, 65, 66, 23,
3378 24, 25, 26, 0, 0, 0, 0, 0, 0, 0,
3379 0, 0, 793, 0, 0, 32, 33, 34, 784, 279,
3380 0, 0, 785, 0, 0, 41, 42, 43, 44, 45,
3381 0, 0, 23, 24, 25, 26, 0, 0, 0, 0,
3382 0, 0, 0, 0, 0, 0, 0, 0, 32, 33,
3383 34, 784, 0, 0, 0, 785, 786, 787, 41, 42,
3384 43, 44, 45, 0, 788, 0, 0, 789, 0, 0,
3385 790, 791, 0, 1077, 0, 0, 792, 59, 60, 61,
3386 62, 63, 64, 65, 66, 0, 0, 0, 0, 786,
3387 787, 0, 0, 0, 0, 0, 0, 788, 793, 0,
3388 789, 0, 0, 790, 791, 279, 0, 0, 0, 792,
3389 59, 60, 61, 62, 63, 64, 65, 66, 564, 565,
3390 0, 0, 566, 0, 0, 0, 0, 0, 0, 0,
3391 0, 793, 0, 0, 0, 0, 0, 0, 279, 0,
3392 0, 170, 171, 172, 173, 174, 175, 176, 177, 178,
3393 0, 0, 179, 180, 0, 0, 0, 0, 181, 182,
3394 183, 184, 0, 0, 0, 0, 0, 0, 0, 0,
3395 0, 0, 0, 185, 186, 0, 0, 0, 0, 0,
3396 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3397 0, 0, 0, 0, 0, 187, 188, 189, 190, 191,
3398 192, 193, 194, 195, 196, 0, 197, 198, 573, 574,
3399 0, 0, 575, 199, 233, 0, 0, 0, 0, 0,
3400 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3401 0, 170, 171, 172, 173, 174, 175, 176, 177, 178,
3402 0, 0, 179, 180, 0, 0, 0, 0, 181, 182,
3403 183, 184, 0, 0, 0, 0, 0, 0, 0, 0,
3404 0, 0, 0, 185, 186, 0, 0, 0, 0, 0,
3405 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3406 0, 0, 0, 0, 0, 187, 188, 189, 190, 191,
3407 192, 193, 194, 195, 196, 0, 197, 198, 625, 565,
3408 0, 0, 626, 199, 233, 0, 0, 0, 0, 0,
3409 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3410 0, 170, 171, 172, 173, 174, 175, 176, 177, 178,
3411 0, 0, 179, 180, 0, 0, 0, 0, 181, 182,
3412 183, 184, 0, 0, 0, 0, 0, 0, 0, 0,
3413 0, 0, 0, 185, 186, 0, 0, 0, 0, 0,
3414 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3415 0, 0, 0, 0, 0, 187, 188, 189, 190, 191,
3416 192, 193, 194, 195, 196, 0, 197, 198, 628, 574,
3417 0, 0, 629, 199, 233, 0, 0, 0, 0, 0,
3418 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3419 0, 170, 171, 172, 173, 174, 175, 176, 177, 178,
3420 0, 0, 179, 180, 0, 0, 0, 0, 181, 182,
3421 183, 184, 0, 0, 0, 0, 0, 0, 0, 0,
3422 0, 0, 0, 185, 186, 0, 0, 0, 0, 0,
3423 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3424 0, 0, 0, 0, 0, 187, 188, 189, 190, 191,
3425 192, 193, 194, 195, 196, 0, 197, 198, 653, 565,
3426 0, 0, 654, 199, 233, 0, 0, 0, 0, 0,
3427 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3428 0, 170, 171, 172, 173, 174, 175, 176, 177, 178,
3429 0, 0, 179, 180, 0, 0, 0, 0, 181, 182,
3430 183, 184, 0, 0, 0, 0, 0, 0, 0, 0,
3431 0, 0, 0, 185, 186, 0, 0, 0, 0, 0,
3432 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3433 0, 0, 0, 0, 0, 187, 188, 189, 190, 191,
3434 192, 193, 194, 195, 196, 0, 197, 198, 656, 574,
3435 0, 0, 657, 199, 233, 0, 0, 0, 0, 0,
3436 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3437 0, 170, 171, 172, 173, 174, 175, 176, 177, 178,
3438 0, 0, 179, 180, 0, 0, 0, 0, 181, 182,
3439 183, 184, 0, 0, 0, 0, 0, 0, 0, 0,
3440 0, 0, 0, 185, 186, 0, 0, 0, 0, 0,
3441 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3442 0, 0, 0, 0, 0, 187, 188, 189, 190, 191,
3443 192, 193, 194, 195, 196, 0, 197, 198, 724, 565,
3444 0, 0, 725, 199, 233, 0, 0, 0, 0, 0,
3445 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3446 0, 170, 171, 172, 173, 174, 175, 176, 177, 178,
3447 0, 0, 179, 180, 0, 0, 0, 0, 181, 182,
3448 183, 184, 0, 0, 0, 0, 0, 0, 0, 0,
3449 0, 0, 0, 185, 186, 0, 0, 0, 0, 0,
3450 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3451 0, 0, 0, 0, 0, 187, 188, 189, 190, 191,
3452 192, 193, 194, 195, 196, 0, 197, 198, 727, 574,
3453 0, 0, 728, 199, 233, 0, 0, 0, 0, 0,
3454 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3455 0, 170, 171, 172, 173, 174, 175, 176, 177, 178,
3456 0, 0, 179, 180, 0, 0, 0, 0, 181, 182,
3457 183, 184, 0, 0, 0, 0, 0, 0, 0, 0,
3458 0, 0, 0, 185, 186, 0, 0, 0, 0, 0,
3459 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3460 0, 0, 0, 0, 0, 187, 188, 189, 190, 191,
3461 192, 193, 194, 195, 196, 0, 197, 198, 733, 565,
3462 0, 0, 734, 199, 233, 0, 0, 0, 0, 0,
3463 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3464 0, 170, 171, 172, 173, 174, 175, 176, 177, 178,
3465 0, 0, 179, 180, 0, 0, 0, 0, 181, 182,
3466 183, 184, 0, 0, 0, 0, 0, 0, 0, 0,
3467 0, 0, 0, 185, 186, 0, 0, 0, 0, 0,
3468 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3469 0, 0, 0, 0, 0, 187, 188, 189, 190, 191,
3470 192, 193, 194, 195, 196, 0, 197, 198, 610, 574,
3471 0, 0, 611, 199, 233, 0, 0, 0, 0, 0,
3472 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3473 0, 170, 171, 172, 173, 174, 175, 176, 177, 178,
3474 0, 0, 179, 180, 0, 0, 0, 0, 181, 182,
3475 183, 184, 0, 0, 0, 0, 0, 0, 0, 0,
3476 0, 0, 0, 185, 186, 0, 0, 0, 0, 0,
3477 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3478 0, 0, 0, 0, 0, 187, 188, 189, 190, 191,
3479 192, 193, 194, 195, 196, 0, 197, 198, 779, 565,
3480 0, 0, 780, 199, 233, 0, 0, 0, 0, 0,
3481 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3482 0, 170, 171, 172, 173, 174, 175, 176, 177, 178,
3483 0, 0, 179, 180, 0, 0, 0, 0, 181, 182,
3484 183, 184, 0, 0, 0, 0, 0, 0, 0, 0,
3485 0, 0, 0, 185, 186, 0, 0, 0, 0, 0,
3486 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3487 0, 0, 0, 0, 0, 187, 188, 189, 190, 191,
3488 192, 193, 194, 195, 196, 0, 197, 198, 782, 574,
3489 0, 0, 783, 199, 233, 0, 0, 0, 0, 0,
3490 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3491 0, 170, 171, 172, 173, 174, 175, 176, 177, 178,
3492 0, 0, 179, 180, 0, 0, 0, 0, 181, 182,
3493 183, 184, 0, 0, 0, 0, 0, 0, 0, 0,
3494 0, 0, 0, 185, 186, 0, 0, 0, 0, 0,
3495 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3496 0, 0, 0, 0, 0, 187, 188, 189, 190, 191,
3497 192, 193, 194, 195, 196, 0, 197, 198, 1161, 565,
3498 0, 0, 1162, 199, 233, 0, 0, 0, 0, 0,
3499 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3500 0, 170, 171, 172, 173, 174, 175, 176, 177, 178,
3501 0, 0, 179, 180, 0, 0, 0, 0, 181, 182,
3502 183, 184, 0, 0, 0, 0, 0, 0, 0, 0,
3503 0, 0, 0, 185, 186, 0, 0, 0, 0, 0,
3504 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3505 0, 0, 0, 0, 0, 187, 188, 189, 190, 191,
3506 192, 193, 194, 195, 196, 0, 197, 198, 1164, 574,
3507 0, 0, 1165, 199, 233, 0, 0, 0, 0, 0,
3508 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3509 0, 170, 171, 172, 173, 174, 175, 176, 177, 178,
3510 0, 0, 179, 180, 0, 0, 0, 0, 181, 182,
3511 183, 184, 0, 0, 0, 0, 0, 0, 0, 0,
3512 0, 0, 0, 185, 186, 0, 0, 0, 0, 0,
3513 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3514 0, 0, 0, 0, 0, 187, 188, 189, 190, 191,
3515 192, 193, 194, 195, 196, 0, 197, 198, 1196, 565,
3516 0, 0, 1197, 199, 233, 0, 0, 0, 0, 0,
3517 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3518 0, 170, 171, 172, 173, 174, 175, 176, 177, 178,
3519 0, 0, 179, 180, 0, 0, 0, 0, 181, 182,
3520 183, 184, 0, 0, 0, 0, 0, 0, 0, 0,
3521 0, 0, 0, 185, 186, 0, 0, 0, 0, 0,
3522 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3523 0, 0, 0, 0, 0, 187, 188, 189, 190, 191,
3524 192, 193, 194, 195, 196, 0, 197, 198, 610, 574,
3525 0, 0, 611, 199, 233, 0, 0, 0, 0, 0,
3526 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3527 0, 170, 171, 172, 173, 174, 175, 176, 177, 178,
3528 0, 0, 179, 180, 0, 0, 0, 0, 181, 182,
3529 183, 184, 0, 0, 0, 0, 0, 0, 0, 0,
3530 0, 0, 0, 185, 186, 0, 0, 0, 0, 0,
3531 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3532 0, 0, 0, 0, 0, 187, 188, 189, 190, 191,
3533 192, 193, 194, 195, 196, 0, 197, 198, 0, 0,
3534 0, 0, 0, 199
3535};
3536
3537static const yytype_int16 yycheck[] =
3538{
3539 2, 59, 53, 89, 60, 369, 102, 22, 91, 92,
3540 8, 71, 95, 8, 364, 101, 71, 28, 712, 94,
3541 16, 17, 227, 4, 331, 57, 92, 634, 271, 95,
3542 28, 719, 275, 28, 2, 95, 4, 897, 898, 13,
3543 433, 99, 387, 68, 425, 363, 67, 365, 16, 17,
3544 627, 83, 433, 55, 56, 16, 17, 83, 95, 604,
3545 53, 59, 25, 78, 96, 97, 98, 331, 57, 1044,
3546 2, 1072, 4, 1112, 13, 897, 898, 963, 655, 429,
3547 473, 27, 22, 1110, 860, 53, 54, 690, 858, 57,
3548 860, 482, 868, 411, 55, 295, 296, 25, 868, 928,
3549 68, 99, 68, 100, 100, 259, 414, 415, 16, 17,
3550 428, 1068, 430, 146, 0, 83, 16, 17, 1033, 13,
3551 153, 26, 54, 91, 92, 66, 153, 95, 96, 97,
3552 98, 97, 100, 68, 484, 526, 222, 1052, 78, 100,
3553 458, 870, 25, 786, 787, 1060, 68, 55, 56, 726,
3554 414, 415, 25, 236, 1033, 238, 153, 213, 209, 736,
3555 1151, 96, 97, 126, 1155, 251, 25, 485, 1054, 25,
3556 37, 38, 146, 1052, 328, 97, 1215, 151, 119, 153,
3557 56, 25, 958, 146, 146, 148, 149, 732, 958, 1216,
3558 153, 153, 100, 244, 1023, 1024, 1018, 283, 946, 947,
3559 100, 261, 1177, 1204, 781, 151, 261, 153, 259, 148,
3560 145, 13, 151, 790, 153, 13, 13, 1208, 146, 221,
3561 148, 969, 970, 971, 261, 227, 13, 310, 311, 312,
3562 313, 233, 315, 316, 230, 1192, 232, 233, 143, 444,
3563 242, 209, 592, 636, 310, 311, 312, 313, 280, 892,
3564 893, 858, 602, 634, 280, 636, 601, 151, 279, 153,
3565 25, 13, 230, 146, 232, 233, 259, 1182, 236, 230,
3566 238, 232, 233, 146, 242, 593, 244, 328, 881, 882,
3567 27, 1110, 29, 1112, 1199, 603, 153, 146, 371, 257,
3568 146, 259, 683, 379, 897, 898, 25, 329, 498, 13,
3569 500, 326, 146, 386, 1033, 371, 331, 852, 248, 249,
3570 242, 1171, 280, 373, 859, 1044, 52, 698, 895, 370,
3571 29, 372, 230, 1052, 232, 257, 13, 1021, 309, 874,
3572 230, 1060, 232, 1021, 13, 328, 373, 25, 688, 1068,
3573 329, 309, 310, 311, 312, 313, 314, 315, 316, 151,
3574 148, 153, 109, 151, 151, 153, 153, 25, 326, 52,
3575 328, 329, 364, 331, 151, 326, 153, 365, 364, 687,
3576 331, 689, 695, 1121, 25, 25, 133, 309, 983, 143,
3577 703, 146, 314, 148, 692, 693, 1215, 1216, 991, 414,
3578 415, 699, 700, 26, 1142, 884, 364, 126, 366, 151,
3579 707, 153, 370, 371, 372, 982, 66, 650, 897, 898,
3580 146, 37, 38, 411, 123, 1018, 68, 146, 386, 624,
3581 149, 685, 99, 143, 153, 365, 1033, 429, 692, 693,
3582 1007, 1008, 430, 429, 152, 699, 700, 151, 97, 153,
3583 442, 452, 444, 788, 96, 97, 414, 415, 1177, 126,
3584 482, 537, 99, 146, 452, 100, 482, 452, 146, 119,
3585 458, 429, 662, 1192, 151, 26, 153, 667, 152, 146,
3586 1075, 126, 151, 866, 153, 126, 126, 100, 146, 126,
3587 82, 83, 484, 68, 848, 866, 145, 485, 484, 148,
3588 430, 146, 68, 145, 526, 146, 146, 465, 149, 149,
3589 526, 146, 153, 153, 66, 67, 150, 68, 1053, 153,
3590 143, 819, 97, 77, 482, 148, 484, 425, 458, 594,
3591 96, 97, 605, 146, 414, 415, 586, 129, 130, 1018,
3592 277, 582, 148, 584, 99, 96, 97, 153, 68, 903,
3593 152, 431, 432, 870, 908, 485, 1151, 1036, 753, 894,
3594 1155, 1245, 99, 66, 569, 819, 639, 66, 526, 121,
3595 122, 126, 470, 578, 68, 152, 96, 97, 1171, 459,
3596 572, 858, 136, 137, 138, 1064, 578, 28, 580, 126,
3597 34, 146, 143, 870, 145, 1130, 1163, 148, 14, 15,
3598 592, 15, 96, 97, 1083, 593, 592, 612, 52, 68,
3599 602, 25, 1207, 1208, 68, 603, 602, 618, 121, 122,
3600 612, 68, 121, 122, 582, 145, 584, 99, 148, 651,
3601 618, 126, 624, 618, 592, 651, 68, 96, 97, 569,
3602 68, 146, 96, 97, 602, 58, 604, 605, 578, 152,
3603 97, 145, 644, 152, 126, 741, 126, 2, 731, 4,
3604 99, 683, 99, 593, 77, 97, 112, 683, 96, 97,
3605 685, 16, 17, 603, 146, 731, 66, 692, 693, 99,
3606 730, 639, 612, 68, 699, 700, 145, 126, 729, 126,
3607 68, 145, 740, 651, 99, 108, 688, 99, 146, 112,
3608 56, 689, 688, 146, 68, 153, 26, 146, 53, 54,
3609 68, 96, 97, 643, 644, 707, 708, 145, 710, 97,
3610 712, 126, 680, 68, 126, 683, 684, 685, 66, 119,
3611 688, 121, 122, 97, 692, 693, 634, 68, 148, 97,
3612 68, 699, 700, 1060, 146, 1099, 91, 92, 68, 126,
3613 95, 1068, 740, 1070, 1094, 100, 707, 9, 680, 689,
3614 145, 753, 684, 15, 837, 96, 97, 1044, 96, 97,
3615 1047, 729, 99, 731, 732, 99, 96, 97, 770, 68,
3616 772, 837, 58, 121, 122, 144, 124, 1095, 34, 100,
3617 831, 1068, 66, 1070, 153, 836, 146, 99, 68, 126,
3618 698, 77, 126, 853, 819, 99, 52, 96, 97, 68,
3619 68, 146, 692, 693, 145, 68, 553, 145, 870, 699,
3620 700, 68, 146, 143, 126, 145, 68, 97, 148, 148,
3621 871, 99, 108, 109, 571, 827, 99, 96, 97, 97,
3622 88, 89, 99, 96, 97, 119, 77, 121, 122, 96,
3623 97, 40, 41, 66, 96, 97, 145, 133, 126, 518,
3624 148, 819, 99, 126, 209, 906, 148, 747, 748, 126,
3625 750, 751, 149, 831, 915, 1192, 66, 1194, 836, 837,
3626 902, 126, 1199, 146, 1201, 230, 145, 232, 233, 126,
3627 627, 236, 145, 238, 852, 99, 99, 242, 145, 244,
3628 1177, 859, 1179, 145, 56, 955, 119, 1184, 121, 122,
3629 150, 124, 257, 871, 259, 1192, 874, 1194, 655, 144,
3630 579, 1238, 126, 126, 1201, 146, 585, 54, 587, 119,
3631 77, 121, 122, 26, 124, 1011, 77, 64, 65, 819,
3632 106, 987, 52, 52, 902, 967, 56, 56, 906, 149,
3633 146, 56, 944, 153, 946, 947, 1233, 915, 1004, 151,
3634 151, 1238, 153, 25, 309, 310, 311, 312, 313, 314,
3635 315, 316, 130, 77, 1015, 68, 1017, 969, 970, 971,
3636 15, 326, 17, 328, 864, 149, 331, 66, 144, 726,
3637 94, 95, 146, 134, 135, 136, 137, 138, 146, 736,
3638 870, 144, 146, 96, 97, 144, 146, 66, 1060, 967,
3639 10, 146, 1064, 146, 146, 1056, 1068, 44, 1070, 364,
3640 44, 366, 146, 126, 1016, 370, 371, 372, 8, 1021,
3641 134, 135, 136, 137, 138, 13, 66, 1059, 25, 152,
3642 119, 386, 121, 122, 781, 17, 152, 144, 870, 150,
3643 143, 146, 145, 790, 791, 148, 128, 1015, 15, 1017,
3644 119, 720, 121, 122, 723, 59, 60, 61, 62, 414,
3645 415, 54, 55, 690, 57, 858, 146, 860, 737, 148,
3646 131, 64, 65, 146, 429, 868, 52, 870, 100, 119,
3647 1131, 121, 122, 131, 236, 1053, 1169, 1170, 1056, 100,
3648 146, 1059, 1094, 144, 1096, 52, 1098, 1095, 1094, 126,
3649 146, 52, 146, 1169, 1170, 40, 41, 42, 43, 44,
3650 465, 146, 264, 146, 146, 2, 268, 4, 52, 1121,
3651 146, 126, 131, 870, 56, 146, 1094, 146, 146, 484,
3652 1192, 52, 1194, 54, 55, 56, 57, 1199, 146, 1201,
3653 1142, 52, 9, 54, 55, 56, 57, 146, 895, 52,
3654 151, 54, 55, 56, 57, 1095, 1036, 146, 131, 786,
3655 787, 1041, 1130, 1131, 56, 958, 53, 54, 146, 838,
3656 57, 146, 841, 52, 146, 844, 1238, 146, 146, 2,
3657 1060, 4, 851, 146, 1064, 854, 146, 146, 1068, 120,
3658 1070, 1242, 144, 16, 17, 149, 83, 146, 101, 146,
3659 146, 1169, 1170, 52, 1036, 54, 55, 56, 57, 96,
3660 97, 98, 99, 146, 242, 461, 963, 146, 146, 146,
3661 146, 465, 96, 148, 148, 98, 146, 582, 1060, 584,
3662 53, 54, 1064, 146, 87, 982, 1068, 592, 1070, 77,
3663 1033, 988, 612, 1245, 1098, 68, 708, 602, 917, 604,
3664 605, 1044, 101, 1023, 881, 882, 94, 95, 107, 1052,
3665 1007, 1008, 1110, 870, 891, 892, 893, 1060, 91, 92,
3666 897, 898, 95, 772, 1242, 1068, 887, 100, 1204, 742,
3667 514, 973, 974, 435, 639, 954, 324, 1245, 440, 1083,
3668 891, 443, 1018, 1083, 446, 133, 134, 135, 136, 137,
3669 138, 1083, 105, 889, 1096, 1016, 500, 1054, 99, 957,
3670 462, 1036, 1192, 1064, 1194, 467, 1060, 988, -1, 1199,
3671 -1, 1201, 209, -1, -1, 680, -1, -1, -1, 684,
3672 685, -1, -1, 688, -1, -1, -1, 692, 693, -1,
3673 -1, -1, -1, -1, 699, 700, -1, -1, -1, -1,
3674 -1, -1, -1, -1, -1, 242, 983, 244, 1238, -1,
3675 1192, 949, 1194, 951, 991, 690, -1, 1199, -1, 1201,
3676 257, -1, 259, 525, 729, -1, 731, 732, -1, -1,
3677 -1, -1, -1, -1, 1177, -1, 209, -1, -1, -1,
3678 -1, 1018, -1, 280, -1, -1, -1, -1, -1, 1192,
3679 -1, 1148, -1, -1, -1, -1, 1238, 230, -1, 232,
3680 233, -1, -1, 236, -1, 238, 1163, -1, -1, 242,
3681 -1, 244, 309, -1, -1, -1, -1, 314, -1, -1,
3682 -1, -1, -1, -1, 257, -1, 259, -1, -1, -1,
3683 -1, 328, 329, -1, -1, 1137, 1138, -1, 1075, -1,
3684 -1, 1143, -1, 1145, 1146, -1, -1, -1, -1, 1128,
3685 -1, 786, 787, -1, 819, -1, -1, 56, -1, 52,
3686 -1, 54, 55, 56, 57, 58, 831, -1, -1, 366,
3687 -1, 836, 837, 370, -1, 372, 309, 310, 311, 312,
3688 313, 314, 315, 316, 77, -1, -1, 852, -1, -1,
3689 -1, -1, -1, 326, 859, 328, -1, -1, 331, -1,
3690 -1, -1, -1, -1, -1, -1, 871, -1, 101, 874,
3691 1189, -1, -1, -1, 1151, 108, 109, -1, 1155, 1117,
3692 1118, 1223, 1224, 1225, 1226, 1123, -1, 1125, -1, 1127,
3693 -1, 364, -1, 366, 1171, -1, -1, 370, 371, 372,
3694 133, 906, 1244, -1, -1, -1, 881, 882, -1, -1,
3695 915, -1, -1, 386, -1, -1, 891, 892, 893, -1,
3696 -1, -1, 897, 898, -1, -1, -1, -1, 465, -1,
3697 1207, 1208, -1, -1, -1, -1, 738, -1, -1, -1,
3698 -1, 414, 415, -1, -1, 482, -1, -1, -1, -1,
3699 752, -1, 754, -1, -1, -1, 429, -1, 52, -1,
3700 54, 55, 56, 57, 58, -1, 25, -1, 207, -1,
3701 -1, 210, 211, 212, -1, -1, -1, -1, -1, 1217,
3702 1218, 1219, 1220, 77, -1, -1, -1, -1, -1, 526,
3703 -1, -1, 465, -1, -1, -1, -1, -1, -1, -1,
3704 -1, -1, -1, -1, -1, 1243, -1, 101, 983, -1,
3705 1015, 484, 1017, 107, 108, 109, 991, -1, 77, 78,
3706 79, 80, 81, 82, 83, 84, 85, 86, 87, 88,
3707 89, -1, -1, -1, -1, 94, 95, -1, -1, 133,
3708 -1, -1, 136, 1018, -1, 582, -1, 584, 1053, -1,
3709 -1, 1056, -1, -1, -1, -1, -1, -1, -1, 153,
3710 -1, 2, -1, 4, -1, -1, -1, 604, 127, -1,
3711 129, 130, 131, 132, 133, 134, 135, 136, 137, 138,
3712 -1, -1, -1, -1, -1, -1, -1, 326, -1, 1094,
3713 -1, -1, 331, -1, 896, -1, -1, -1, -1, -1,
3714 1075, -1, -1, -1, -1, -1, -1, -1, -1, 582,
3715 -1, 584, 53, 54, 651, -1, 57, -1, -1, 592,
3716 -1, -1, -1, -1, -1, 1130, 1131, -1, -1, 602,
3717 -1, 604, 605, 935, 936, -1, -1, -1, -1, -1,
3718 -1, -1, 83, 680, -1, -1, 683, 684, -1, -1,
3719 -1, -1, -1, 690, -1, 96, 97, 98, -1, -1,
3720 -1, -1, -1, -1, 1169, 1170, 639, -1, -1, -1,
3721 -1, -1, -1, -1, -1, -1, 1151, 979, -1, -1,
3722 1155, -1, -1, -1, -1, 424, 425, -1, -1, -1,
3723 -1, -1, 729, -1, 433, 732, 1171, -1, -1, -1,
3724 -1, -1, -1, 1005, 1006, -1, -1, 680, -1, -1,
3725 -1, 684, 685, -1, -1, 688, -1, -1, -1, 692,
3726 693, -1, -1, -1, -1, 1027, 699, 700, -1, -1,
3727 -1, 470, 1207, 1208, 473, -1, 52, 1242, 54, 55,
3728 56, 57, 58, -1, -1, -1, -1, -1, -1, 786,
3729 787, -1, -1, -1, -1, -1, 729, -1, 731, 732,
3730 2, 77, 4, -1, -1, -1, -1, -1, 209, 77,
3731 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3732 519, -1, -1, -1, -1, 101, 94, 95, -1, -1,
3733 -1, 107, 108, 109, 831, -1, -1, -1, -1, 836,
3734 -1, 242, -1, 244, -1, -1, 1108, -1, -1, -1,
3735 -1, 53, 54, 1115, -1, 852, 257, 133, 259, 2,
3736 136, 4, 859, 131, 132, 133, 134, 135, 136, 137,
3737 138, -1, 148, -1, 871, -1, -1, 874, -1, 280,
3738 -1, -1, -1, -1, 881, 882, 819, -1, -1, -1,
3739 -1, -1, -1, -1, 891, 892, 893, -1, 831, -1,
3740 897, 898, -1, 836, 837, 902, -1, -1, 309, 906,
3741 53, 54, -1, 314, 57, -1, -1, -1, 915, 852,
3742 619, -1, 621, -1, -1, -1, 859, 328, 329, -1,
3743 331, -1, -1, -1, -1, 634, -1, 636, 871, -1,
3744 83, 874, -1, -1, -1, -1, -1, -1, -1, 2,
3745 -1, 4, -1, 96, 97, 98, 99, -1, -1, -1,
3746 -1, -1, -1, -1, -1, 366, -1, -1, -1, 370,
3747 967, 372, -1, 906, -1, -1, -1, -1, -1, -1,
3748 679, -1, 915, -1, -1, -1, 983, -1, -1, -1,
3749 -1, -1, -1, -1, 991, -1, -1, -1, -1, 698,
3750 53, 54, -1, -1, -1, -1, -1, 209, 707, -1,
3751 -1, -1, -1, 414, 415, -1, -1, -1, 1015, -1,
3752 1017, 1018, -1, 722, -1, -1, -1, -1, -1, -1,
3753 -1, -1, -1, -1, -1, -1, -1, -1, -1, 690,
3754 242, -1, 244, 96, -1, -1, -1, -1, -1, -1,
3755 -1, -1, -1, -1, -1, 257, 1053, 259, -1, 1056,
3756 -1, -1, 1059, 690, 465, -1, 209, -1, -1, -1,
3757 -1, -1, -1, -1, 773, -1, -1, -1, 1075, -1,
3758 -1, 482, 1015, -1, 1017, -1, -1, -1, -1, -1,
3759 -1, -1, -1, -1, -1, -1, -1, -1, -1, 242,
3760 -1, 244, -1, 690, -1, -1, -1, 309, -1, -1,
3761 -1, -1, 314, -1, 257, -1, 259, -1, -1, -1,
3762 1053, -1, -1, 1056, -1, 526, 328, -1, -1, 331,
3763 -1, -1, -1, 1130, 1131, 786, 787, 280, 52, -1,
3764 54, 55, 56, 57, 58, -1, -1, 846, -1, -1,
3765 -1, -1, -1, -1, 1151, -1, 209, -1, 1155, 786,
3766 787, 1094, -1, 77, 366, -1, 309, 866, 370, -1,
3767 372, 314, -1, -1, 1171, -1, -1, 91, -1, -1,
3768 -1, 582, -1, 584, -1, 328, 329, 101, -1, 242,
3769 -1, 244, -1, 107, 108, 109, -1, 1130, 1131, 786,
3770 787, -1, -1, 604, 257, -1, 259, -1, -1, -1,
3771 1207, 1208, 414, 415, -1, 914, -1, -1, -1, 133,
3772 -1, -1, 136, 366, -1, -1, -1, 370, -1, 372,
3773 881, 882, -1, -1, -1, -1, 1169, 1170, -1, -1,
3774 891, 892, 893, 942, -1, 1242, 897, 898, -1, -1,
3775 651, -1, -1, -1, 881, 882, 309, -1, -1, 660,
3776 -1, 314, -1, 465, 891, 892, 893, -1, -1, -1,
3777 897, 898, -1, -1, -1, 328, -1, -1, 331, 680,
3778 -1, -1, 683, 684, 685, -1, -1, -1, -1, -1,
3779 -1, 692, 693, -1, 881, 882, -1, -1, 699, 700,
3780 -1, -1, -1, -1, 891, 892, 893, -1, -1, 1242,
3781 897, 898, -1, 366, -1, -1, -1, 370, -1, 372,
3782 1019, -1, 465, -1, -1, -1, -1, -1, 729, -1,
3783 -1, 732, 983, 1032, -1, -1, -1, -1, -1, 482,
3784 991, -1, -1, -1, 52, -1, 54, 55, 56, 57,
3785 58, -1, -1, -1, -1, -1, 983, -1, -1, -1,
3786 -1, 414, 415, -1, 991, -1, -1, 1018, -1, 77,
3787 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3788 582, -1, 584, 526, -1, -1, -1, -1, -1, -1,
3789 -1, 1018, -1, 101, -1, -1, 983, -1, -1, 107,
3790 108, 109, 604, -1, 991, -1, -1, -1, -1, -1,
3791 -1, -1, 465, -1, -1, -1, -1, -1, 819, -1,
3792 -1, -1, -1, -1, 1075, 133, -1, -1, 136, -1,
3793 831, 1018, -1, -1, -1, 836, -1, -1, -1, 582,
3794 -1, 584, -1, -1, -1, -1, -1, -1, 1075, -1,
3795 -1, 852, -1, -1, -1, -1, -1, -1, 859, -1,
3796 -1, 604, -1, -1, -1, -1, -1, -1, -1, -1,
3797 871, -1, -1, 874, -1, -1, -1, -1, 680, -1,
3798 -1, -1, 684, 685, -1, -1, -1, -1, 1075, -1,
3799 692, 693, -1, -1, -1, -1, -1, 699, 700, -1,
3800 1151, 902, -1, -1, 1155, 906, -1, -1, 651, -1,
3801 -1, -1, -1, -1, 915, -1, 690, -1, -1, -1,
3802 1171, -1, -1, -1, 1151, -1, -1, 729, 1155, 582,
3803 732, 584, -1, -1, -1, -1, -1, 680, -1, -1,
3804 683, 684, -1, -1, 1171, 690, -1, -1, -1, -1,
3805 -1, 604, -1, -1, -1, -1, 1207, 1208, -1, -1,
3806 -1, -1, -1, -1, 1151, -1, 967, -1, 1155, -1,
3807 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3808 1207, 1208, -1, -1, 1171, -1, 729, -1, -1, 732,
3809 690, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3810 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3811 -1, -1, 786, 787, 1015, -1, 1017, 819, -1, -1,
3812 1207, 1208, -1, -1, -1, -1, -1, 680, -1, 831,
3813 -1, 684, 685, -1, 836, -1, -1, -1, -1, 692,
3814 693, 786, 787, -1, -1, -1, 699, 700, -1, -1,
3815 852, -1, 1053, -1, -1, 1056, -1, 859, 1059, -1,
3816 -1, -1, -1, -1, -1, -1, -1, -1, -1, 871,
3817 -1, -1, 874, -1, -1, -1, 729, -1, -1, 732,
3818 -1, -1, -1, -1, -1, -1, 786, 787, 831, -1,
3819 -1, -1, -1, 836, -1, -1, -1, -1, -1, -1,
3820 -1, -1, -1, -1, 906, -1, -1, 881, 882, 852,
3821 -1, -1, -1, 915, -1, -1, 859, 891, 892, 893,
3822 -1, -1, -1, 897, 898, -1, -1, -1, 871, 1130,
3823 1131, 874, -1, -1, -1, -1, 881, 882, -1, -1,
3824 -1, -1, -1, -1, -1, -1, 891, 892, 893, -1,
3825 -1, -1, 897, 898, -1, -1, -1, -1, -1, 902,
3826 -1, -1, -1, 906, -1, -1, 819, -1, -1, -1,
3827 -1, -1, 915, -1, -1, -1, -1, -1, 831, -1,
3828 -1, 881, 882, 836, -1, -1, -1, -1, -1, -1,
3829 -1, 891, 892, 893, -1, 16, 17, 897, 898, 852,
3830 -1, -1, -1, -1, -1, -1, 859, -1, -1, 983,
3831 -1, -1, -1, 1015, -1, 1017, -1, 991, 871, -1,
3832 -1, 874, -1, -1, 967, -1, -1, 48, 49, 50,
3833 51, -1, -1, -1, 55, 56, -1, -1, 983, -1,
3834 -1, 1242, -1, -1, 1018, -1, 991, 68, 69, 902,
3835 -1, 1053, -1, 906, 1056, -1, -1, -1, -1, -1,
3836 -1, -1, 915, -1, -1, -1, -1, -1, 33, 34,
3837 35, 36, 1015, 1018, 1017, -1, -1, -1, -1, 100,
3838 -1, -1, -1, 983, 49, 50, 51, -1, -1, -1,
3839 -1, 991, -1, -1, 59, 60, 61, 62, 63, -1,
3840 -1, 1075, -1, -1, -1, -1, -1, -1, -1, -1,
3841 1053, -1, -1, 1056, -1, -1, 1059, -1, 1018, -1,
3842 -1, -1, -1, -1, -1, -1, -1, -1, 1130, 1131,
3843 1075, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3844 -1, -1, -1, -1, -1, 110, 111, 112, 113, 114,
3845 115, 116, 117, 118, -1, -1, -1, -1, -1, -1,
3846 -1, -1, 1015, -1, 1017, -1, -1, -1, -1, -1,
3847 -1, -1, -1, -1, 139, 1075, -1, 1151, -1, -1,
3848 -1, 1155, -1, -1, -1, -1, 207, 1130, 1131, 210,
3849 211, 212, -1, 214, -1, -1, -1, 1171, -1, -1,
3850 1053, -1, -1, 1056, -1, -1, 1151, -1, -1, 230,
3851 1155, 232, 233, -1, -1, -1, -1, -1, -1, -1,
3852 -1, -1, -1, -1, -1, -1, 1171, -1, -1, -1,
3853 -1, -1, -1, 1207, 1208, -1, -1, -1, -1, -1,
3854 1242, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3855 -1, 1151, -1, -1, -1, 1155, -1, -1, -1, -1,
3856 -1, -1, 1207, 1208, -1, -1, -1, -1, -1, -1,
3857 -1, 1171, -1, -1, -1, -1, -1, 1130, 1131, -1,
3858 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3859 -1, -1, -1, -1, -1, -1, -1, -1, -1, 1242,
3860 -1, -1, -1, -1, -1, 326, -1, 1207, 1208, -1,
3861 331, -1, 333, 334, 335, 336, 337, -1, -1, 340,
3862 341, 342, 343, 344, 345, 346, 347, 348, -1, -1,
3863 351, 352, 353, 354, 355, 356, 357, 358, 359, 360,
3864 -1, -1, -1, 364, -1, -1, -1, -1, -1, -1,
3865 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3866 -1, -1, -1, -1, -1, -1, -1, 77, 78, 79,
3867 80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
3868 -1, -1, -1, -1, 94, 95, -1, -1, -1, 1242,
3869 -1, -1, -1, 414, 415, -1, -1, -1, -1, -1,
3870 -1, -1, 423, 424, 425, -1, -1, -1, 429, -1,
3871 431, 432, 433, -1, -1, -1, -1, 127, 439, 129,
3872 130, 131, 132, 133, 134, 135, 136, 137, 138, -1,
3873 -1, -1, -1, 454, -1, -1, -1, -1, 459, -1,
3874 -1, -1, -1, 153, -1, -1, -1, -1, -1, 470,
3875 -1, -1, 473, -1, -1, -1, -1, -1, -1, 0,
3876 -1, -1, -1, 484, -1, -1, -1, 8, 9, 10,
3877 -1, -1, 13, 14, 15, -1, 17, -1, -1, -1,
3878 -1, 502, -1, -1, 25, 26, 27, 28, 29, -1,
3879 -1, -1, -1, -1, -1, -1, 37, 38, 519, 40,
3880 41, 42, 43, 44, -1, -1, -1, -1, -1, -1,
3881 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3882 -1, -1, -1, -1, -1, -1, -1, 68, -1, -1,
3883 -1, -1, -1, -1, -1, -1, 77, 78, 79, 80,
3884 81, 82, 83, 84, 85, 86, 87, 88, 89, -1,
3885 -1, -1, -1, 94, 95, 96, 97, -1, 99, 100,
3886 -1, -1, -1, -1, -1, 106, -1, -1, -1, -1,
3887 -1, 592, -1, -1, -1, -1, -1, -1, -1, 120,
3888 -1, 602, 123, -1, -1, 126, 127, 128, 129, 130,
3889 131, 132, 133, 134, 135, 136, 137, 138, 619, -1,
3890 621, -1, 143, 144, 145, 146, -1, -1, 149, 150,
3891 151, -1, 153, 634, -1, 636, -1, -1, -1, 0,
3892 -1, -1, -1, -1, -1, -1, -1, 8, 9, 10,
3893 -1, -1, 13, 14, 15, -1, 17, -1, -1, -1,
3894 -1, -1, -1, -1, 25, 26, 27, -1, -1, -1,
3895 -1, -1, -1, -1, -1, -1, 37, 38, 679, 40,
3896 41, 42, 43, 44, 685, 686, -1, 688, -1, -1,
3897 -1, 692, 693, -1, -1, -1, -1, 698, 699, 700,
3898 -1, -1, -1, -1, -1, -1, 707, 68, -1, -1,
3899 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3900 -1, 722, -1, -1, -1, -1, -1, -1, -1, -1,
3901 -1, -1, -1, -1, -1, 96, 97, -1, -1, -1,
3902 -1, -1, -1, -1, -1, -1, 747, 748, -1, 750,
3903 751, 33, 34, 35, 36, -1, -1, -1, -1, 120,
3904 -1, -1, -1, -1, -1, -1, -1, 49, 50, 51,
3905 52, -1, 773, -1, 56, -1, 58, 59, 60, 61,
3906 62, 63, 143, 144, -1, -1, -1, 148, 149, -1,
3907 151, -1, 153, -1, -1, 77, -1, -1, -1, -1,
3908 -1, -1, -1, -1, -1, -1, -1, -1, 90, 91,
3909 -1, 812, -1, -1, -1, -1, 98, -1, 819, 101,
3910 -1, -1, 104, 105, -1, 107, 108, -1, 110, 111,
3911 112, 113, 114, 115, 116, 117, 118, -1, -1, -1,
3912 -1, -1, -1, -1, -1, 846, -1, -1, -1, -1,
3913 132, -1, -1, -1, -1, 0, 1, 139, 3, 4,
3914 5, 6, 7, 864, -1, 866, 11, 12, -1, -1,
3915 -1, 16, -1, 18, 19, 20, 21, 22, 23, 24,
3916 -1, -1, -1, -1, -1, 30, 31, 32, 33, 34,
3917 35, 36, -1, -1, 39, -1, -1, -1, -1, -1,
3918 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
3919 55, 56, 57, 914, 59, 60, 61, 62, 63, 64,
3920 65, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3921 75, 76, -1, -1, -1, -1, -1, -1, -1, -1,
3922 -1, 942, -1, -1, -1, 90, 91, -1, -1, -1,
3923 -1, -1, -1, 98, -1, -1, 101, 102, -1, 104,
3924 105, -1, 107, -1, -1, 110, 111, 112, 113, 114,
3925 115, 116, 117, 118, -1, -1, -1, -1, -1, -1,
3926 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3927 -1, -1, -1, -1, 139, 140, 141, -1, -1, -1,
3928 -1, -1, -1, -1, -1, -1, 151, -1, 153, -1,
3929 -1, -1, -1, -1, -1, -1, -1, -1, 1019, 0,
3930 -1, -1, -1, -1, -1, -1, -1, 8, 9, 10,
3931 -1, 1032, 13, 14, 15, -1, 17, -1, -1, -1,
3932 -1, 44, -1, -1, 25, -1, 27, 28, 29, -1,
3933 -1, -1, -1, -1, -1, -1, 37, 38, -1, 40,
3934 41, 42, 43, 44, -1, -1, -1, -1, -1, -1,
3935 -1, -1, -1, -1, 77, 78, 79, 80, 81, 82,
3936 83, 84, 85, 86, 87, 88, 89, 68, -1, -1,
3937 -1, 94, 95, 1094, -1, -1, 77, 78, 79, 80,
3938 81, 82, 83, 84, 85, 86, 87, 88, 89, -1,
3939 -1, -1, -1, 94, 95, 96, 97, -1, 99, 100,
3940 -1, -1, -1, -1, 127, 106, 129, 130, 131, 132,
3941 133, 134, 135, 136, 137, 138, -1, -1, -1, 120,
3942 -1, -1, 123, 146, -1, 126, 127, 128, 129, 130,
3943 131, 132, 133, 134, 135, 136, 137, 138, -1, -1,
3944 -1, -1, -1, 144, 145, 146, 0, -1, 149, 150,
3945 151, -1, 153, -1, 8, 9, 10, -1, -1, 13,
3946 14, 15, -1, 17, -1, -1, -1, -1, 44, -1,
3947 -1, 25, -1, 27, 28, 29, -1, -1, -1, -1,
3948 -1, -1, -1, 37, 38, -1, 40, 41, 42, 43,
3949 44, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3950 -1, 77, 78, 79, 80, 81, 82, 83, 84, 85,
3951 86, 87, 88, 89, 68, -1, -1, -1, 94, 95,
3952 -1, -1, -1, 77, 78, 79, 80, 81, 82, 83,
3953 84, 85, 86, 87, 88, 89, -1, -1, -1, -1,
3954 94, 95, 96, 97, -1, 99, 100, -1, -1, -1,
3955 -1, 127, 106, 129, 130, 131, 132, 133, 134, 135,
3956 136, 137, 138, -1, -1, -1, 120, -1, -1, 123,
3957 -1, -1, 126, 127, 128, 129, 130, 131, 132, 133,
3958 134, 135, 136, 137, 138, -1, -1, -1, -1, -1,
3959 144, 145, 146, 0, -1, 149, 150, 151, -1, 153,
3960 -1, 8, 9, 10, -1, -1, 13, 14, 15, -1,
3961 17, -1, -1, -1, -1, -1, -1, -1, 25, 26,
3962 27, 28, 29, -1, -1, -1, -1, -1, -1, -1,
3963 37, 38, -1, 40, 41, 42, 43, 44, -1, -1,
3964 -1, -1, -1, -1, -1, -1, -1, -1, 77, 78,
3965 79, 80, 81, 82, 83, 84, 85, 86, 87, 88,
3966 89, 68, -1, -1, -1, 94, 95, -1, -1, -1,
3967 77, 78, 79, 80, 81, 82, 83, 84, 85, 86,
3968 87, 88, 89, -1, -1, -1, -1, 94, 95, 96,
3969 97, -1, -1, 100, -1, -1, -1, -1, 127, 106,
3970 129, 130, 131, 132, 133, 134, 135, 136, 137, 138,
3971 -1, -1, -1, 120, -1, -1, 123, -1, -1, -1,
3972 127, 128, 129, 130, 131, 132, 133, 134, 135, 136,
3973 137, 138, -1, -1, -1, -1, 143, 144, 145, 146,
3974 0, -1, 149, 150, 151, -1, 153, -1, 8, 9,
3975 10, -1, -1, 13, 14, 15, -1, 17, -1, -1,
3976 -1, -1, -1, -1, -1, 25, 26, 27, 28, 29,
3977 -1, -1, -1, -1, -1, -1, -1, 37, 38, -1,
3978 40, 41, 42, 43, 44, -1, -1, -1, -1, -1,
3979 -1, -1, -1, -1, -1, 77, 78, 79, 80, 81,
3980 82, 83, 84, 85, 86, 87, 88, 89, 68, -1,
3981 -1, -1, 94, 95, -1, -1, -1, 77, 78, 79,
3982 80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
3983 -1, -1, -1, -1, 94, 95, 96, 97, -1, -1,
3984 100, -1, -1, -1, -1, -1, 106, 129, 130, 131,
3985 132, 133, 134, 135, 136, 137, 138, -1, -1, -1,
3986 120, -1, -1, 123, -1, -1, -1, 127, 128, 129,
3987 130, 131, 132, 133, 134, 135, 136, 137, 138, -1,
3988 -1, -1, -1, 143, 144, 145, 146, 0, -1, 149,
3989 150, 151, -1, 153, -1, 8, 9, 10, -1, -1,
3990 13, 14, 15, -1, 17, -1, -1, -1, -1, -1,
3991 -1, -1, 25, -1, 27, 28, 29, -1, -1, -1,
3992 -1, -1, -1, -1, 37, 38, -1, 40, 41, 42,
3993 43, 44, -1, -1, -1, -1, -1, -1, -1, -1,
3994 -1, -1, 77, 78, 79, 80, 81, 82, 83, 84,
3995 -1, 86, 87, -1, -1, 68, -1, -1, -1, 94,
3996 95, -1, -1, -1, 77, 78, 79, 80, 81, 82,
3997 83, 84, 85, 86, 87, 88, 89, -1, -1, -1,
3998 -1, 94, 95, 96, 97, -1, 99, 100, -1, -1,
3999 -1, -1, -1, 106, 129, 130, 131, 132, 133, 134,
4000 135, 136, 137, 138, -1, -1, -1, 120, -1, -1,
4001 123, -1, -1, 126, 127, 128, 129, 130, 131, 132,
4002 133, 134, 135, 136, 137, 138, -1, -1, -1, -1,
4003 -1, 144, 145, 146, 0, -1, 149, 150, 151, -1,
4004 153, -1, 8, 9, 10, -1, -1, 13, 14, 15,
4005 -1, 17, -1, -1, -1, -1, -1, -1, -1, 25,
4006 26, 27, 28, -1, -1, -1, -1, -1, -1, -1,
4007 -1, 37, 38, -1, 40, 41, 42, 43, 44, -1,
4008 -1, -1, -1, -1, -1, -1, -1, -1, -1, 77,
4009 78, 79, 80, 81, 82, 83, -1, -1, 86, 87,
4010 -1, -1, 68, -1, -1, -1, 94, 95, -1, -1,
4011 -1, 77, 78, 79, 80, 81, 82, 83, 84, 85,
4012 86, 87, 88, 89, -1, -1, -1, -1, 94, 95,
4013 96, 97, -1, -1, 100, -1, -1, -1, -1, -1,
4014 106, 129, 130, 131, 132, 133, 134, 135, 136, 137,
4015 138, -1, -1, -1, 120, -1, -1, -1, -1, -1,
4016 -1, 127, -1, 129, 130, 131, 132, 133, 134, 135,
4017 136, 137, 138, -1, -1, -1, -1, 143, 144, 145,
4018 146, 0, 148, 149, 150, 151, -1, 153, -1, 8,
4019 9, 10, -1, -1, 13, 14, 15, -1, 17, -1,
4020 -1, -1, -1, -1, -1, -1, 25, -1, 27, 28,
4021 29, -1, -1, -1, -1, -1, -1, -1, 37, 38,
4022 -1, 40, 41, 42, 43, 44, -1, -1, -1, -1,
4023 -1, -1, -1, -1, -1, -1, 77, 78, 79, 80,
4024 81, 82, 83, -1, -1, 86, 87, -1, -1, 68,
4025 -1, -1, -1, 94, 95, -1, -1, -1, 77, 78,
4026 79, 80, 81, 82, 83, 84, 85, 86, 87, 88,
4027 89, -1, -1, -1, -1, 94, 95, 96, 97, -1,
4028 -1, 100, -1, -1, -1, -1, -1, 106, 129, 130,
4029 131, 132, 133, 134, 135, 136, 137, 138, -1, -1,
4030 -1, 120, -1, -1, 123, -1, -1, -1, 127, 128,
4031 129, 130, 131, 132, 133, 134, 135, 136, 137, 138,
4032 -1, -1, -1, -1, -1, 144, 145, 146, 0, -1,
4033 149, 150, 151, -1, 153, -1, 8, 9, 10, -1,
4034 -1, 13, 14, 15, -1, 17, -1, -1, -1, -1,
4035 -1, -1, -1, 25, 26, 27, 28, -1, -1, -1,
4036 -1, -1, -1, -1, -1, 37, 38, -1, 40, 41,
4037 42, 43, 44, -1, -1, -1, -1, -1, -1, -1,
4038 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4039 -1, -1, -1, -1, -1, -1, 68, -1, -1, -1,
4040 -1, -1, -1, -1, -1, 77, 78, 79, 80, 81,
4041 82, 83, 84, 85, 86, 87, 88, 89, -1, -1,
4042 -1, -1, 94, 95, 96, 97, -1, -1, 100, -1,
4043 -1, -1, -1, -1, 106, -1, -1, -1, -1, -1,
4044 -1, -1, -1, -1, -1, -1, -1, -1, 120, -1,
4045 -1, -1, -1, -1, -1, 127, -1, 129, 130, 131,
4046 132, 133, 134, 135, 136, 137, 138, -1, -1, -1,
4047 -1, 143, 144, 145, 146, 0, 148, 149, 150, 151,
4048 -1, 153, -1, 8, 9, 10, -1, -1, 13, 14,
4049 15, -1, 17, -1, -1, -1, -1, -1, -1, -1,
4050 25, -1, 27, 28, -1, -1, -1, -1, -1, -1,
4051 -1, -1, 37, 38, -1, 40, 41, 42, 43, 44,
4052 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4053 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4054 -1, -1, -1, 68, -1, -1, -1, -1, -1, -1,
4055 -1, -1, 77, 78, 79, 80, 81, 82, 83, 84,
4056 85, 86, 87, 88, 89, -1, -1, -1, -1, 94,
4057 95, 96, 97, -1, -1, 100, -1, -1, -1, -1,
4058 -1, 106, -1, -1, -1, -1, -1, -1, -1, -1,
4059 -1, -1, -1, -1, -1, 120, -1, -1, -1, -1,
4060 -1, -1, 127, -1, 129, 130, 131, 132, 133, 134,
4061 135, 136, 137, 138, -1, -1, -1, -1, -1, 144,
4062 145, 146, 0, 148, 149, 150, 151, -1, 153, -1,
4063 8, 9, 10, -1, -1, -1, 14, 15, -1, 17,
4064 -1, -1, -1, -1, -1, -1, -1, 25, 26, -1,
4065 -1, -1, -1, -1, -1, -1, -1, -1, -1, 37,
4066 38, -1, 40, 41, 42, 43, 44, -1, -1, -1,
4067 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4068 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4069 68, -1, -1, -1, -1, -1, -1, -1, -1, 77,
4070 78, 79, 80, 81, 82, 83, 84, 85, 86, 87,
4071 88, 89, -1, -1, -1, -1, 94, 95, 96, 97,
4072 -1, 99, -1, -1, -1, -1, -1, -1, -1, -1,
4073 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4074 -1, -1, 120, -1, -1, -1, -1, -1, 126, 127,
4075 -1, 129, 130, 131, 132, 133, 134, 135, 136, 137,
4076 138, -1, -1, -1, -1, 143, 144, 145, 146, 0,
4077 -1, 149, -1, 151, -1, 153, -1, 8, 9, 10,
4078 -1, -1, -1, 14, 15, -1, 17, -1, -1, -1,
4079 -1, -1, -1, -1, 25, 26, -1, -1, -1, -1,
4080 -1, -1, -1, -1, -1, -1, 37, 38, -1, 40,
4081 41, 42, 43, 44, -1, -1, -1, -1, -1, -1,
4082 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4083 -1, -1, -1, -1, -1, -1, -1, 68, -1, -1,
4084 -1, -1, -1, -1, -1, -1, 77, 78, 79, 80,
4085 81, 82, 83, 84, 85, 86, 87, 88, 89, -1,
4086 -1, -1, -1, 94, 95, 96, 97, -1, 99, -1,
4087 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4088 -1, -1, -1, -1, -1, -1, -1, -1, -1, 120,
4089 -1, -1, -1, -1, -1, 126, 127, -1, 129, 130,
4090 131, 132, 133, 134, 135, 136, 137, 138, -1, -1,
4091 -1, -1, 143, 144, 145, 146, 0, -1, 149, -1,
4092 151, -1, 153, -1, 8, 9, 10, -1, -1, -1,
4093 14, 15, -1, 17, -1, -1, -1, -1, -1, -1,
4094 -1, 25, -1, -1, -1, -1, -1, -1, -1, -1,
4095 -1, -1, -1, 37, 38, -1, 40, 41, 42, 43,
4096 44, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4097 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4098 -1, -1, -1, -1, 68, -1, -1, -1, -1, -1,
4099 -1, -1, -1, 77, 78, 79, 80, 81, 82, 83,
4100 84, 85, 86, 87, 88, 89, -1, -1, -1, -1,
4101 94, 95, 96, 97, -1, 99, -1, -1, -1, -1,
4102 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4103 -1, -1, -1, -1, -1, -1, 120, -1, -1, -1,
4104 -1, -1, 126, 127, -1, 129, 130, 131, 132, 133,
4105 134, 135, 136, 137, 138, -1, -1, -1, -1, -1,
4106 144, 145, 146, 0, -1, 149, -1, 151, -1, 153,
4107 -1, 8, 9, 10, -1, -1, -1, 14, 15, -1,
4108 17, -1, -1, -1, -1, -1, -1, -1, 25, -1,
4109 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4110 37, 38, -1, 40, 41, 42, 43, 44, -1, -1,
4111 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4112 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4113 -1, 68, -1, -1, -1, -1, -1, -1, -1, -1,
4114 77, 78, 79, 80, 81, 82, 83, 84, 85, 86,
4115 87, 88, 89, -1, -1, -1, -1, 94, 95, 96,
4116 97, -1, 99, -1, -1, -1, -1, -1, -1, -1,
4117 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4118 -1, -1, -1, 120, -1, -1, -1, -1, -1, 126,
4119 127, -1, 129, 130, 131, 132, 133, 134, 135, 136,
4120 137, 138, -1, -1, -1, -1, -1, 144, 145, 146,
4121 -1, -1, 149, -1, 151, 1, 153, 3, 4, 5,
4122 6, 7, 8, 9, 10, 11, 12, -1, -1, 15,
4123 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
4124 -1, -1, -1, -1, 30, 31, 32, 33, 34, 35,
4125 36, -1, -1, 39, -1, -1, -1, -1, -1, 45,
4126 46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
4127 56, 57, -1, 59, 60, 61, 62, 63, 64, 65,
4128 -1, -1, -1, -1, -1, -1, -1, -1, -1, 75,
4129 76, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4130 -1, -1, -1, -1, 90, 91, -1, -1, -1, -1,
4131 -1, -1, 98, -1, -1, 101, 102, -1, 104, 105,
4132 -1, 107, -1, -1, 110, 111, 112, 113, 114, 115,
4133 116, 117, 118, -1, -1, -1, -1, -1, -1, -1,
4134 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4135 -1, -1, -1, 139, 140, 141, -1, -1, -1, -1,
4136 -1, -1, -1, -1, -1, 151, 1, 153, 3, 4,
4137 5, 6, 7, -1, -1, 10, 11, 12, -1, 14,
4138 15, 16, -1, 18, 19, 20, 21, 22, 23, 24,
4139 -1, -1, -1, -1, -1, 30, 31, 32, 33, 34,
4140 35, 36, -1, -1, 39, -1, -1, -1, -1, -1,
4141 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
4142 55, 56, 57, -1, 59, 60, 61, 62, 63, 64,
4143 65, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4144 75, 76, -1, -1, -1, -1, -1, -1, -1, -1,
4145 -1, -1, -1, -1, -1, 90, 91, -1, -1, -1,
4146 -1, -1, -1, 98, -1, -1, 101, 102, -1, 104,
4147 105, -1, 107, -1, -1, 110, 111, 112, 113, 114,
4148 115, 116, 117, 118, -1, -1, -1, -1, -1, -1,
4149 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4150 -1, -1, -1, -1, 139, 140, 141, -1, -1, -1,
4151 -1, -1, -1, -1, -1, -1, 151, 1, 153, 3,
4152 4, 5, 6, 7, -1, -1, 10, 11, 12, -1,
4153 -1, 15, 16, 17, 18, 19, 20, 21, 22, 23,
4154 24, -1, -1, -1, -1, -1, 30, 31, 32, 33,
4155 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
4156 -1, 45, 46, 47, 48, 49, 50, 51, 52, 53,
4157 54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
4158 64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
4159 -1, 75, 76, -1, -1, -1, -1, -1, -1, -1,
4160 -1, -1, -1, -1, -1, -1, 90, 91, -1, -1,
4161 -1, -1, -1, -1, 98, -1, -1, 101, 102, -1,
4162 104, 105, -1, 107, -1, -1, 110, 111, 112, 113,
4163 114, 115, 116, 117, 118, -1, -1, -1, -1, -1,
4164 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4165 -1, -1, -1, -1, -1, 139, 140, 141, -1, -1,
4166 -1, -1, -1, -1, -1, -1, -1, 151, 1, 153,
4167 3, 4, 5, 6, 7, -1, -1, 10, 11, 12,
4168 -1, -1, 15, 16, -1, 18, 19, 20, 21, 22,
4169 23, 24, 25, -1, -1, -1, -1, 30, 31, 32,
4170 33, 34, 35, 36, -1, -1, 39, -1, -1, -1,
4171 -1, -1, 45, 46, 47, 48, 49, 50, 51, 52,
4172 53, 54, 55, 56, 57, -1, 59, 60, 61, 62,
4173 63, 64, 65, -1, -1, -1, -1, -1, -1, -1,
4174 -1, -1, 75, 76, -1, -1, -1, -1, -1, -1,
4175 -1, -1, -1, -1, -1, -1, -1, 90, 91, -1,
4176 -1, -1, -1, -1, -1, 98, -1, -1, 101, 102,
4177 -1, 104, 105, -1, 107, -1, -1, 110, 111, 112,
4178 113, 114, 115, 116, 117, 118, -1, -1, -1, -1,
4179 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4180 -1, -1, -1, -1, -1, -1, 139, 140, 141, -1,
4181 -1, -1, -1, -1, -1, -1, -1, -1, 151, 1,
4182 153, 3, 4, 5, 6, 7, -1, -1, 10, 11,
4183 12, -1, -1, 15, 16, -1, 18, 19, 20, 21,
4184 22, 23, 24, -1, -1, -1, -1, -1, 30, 31,
4185 32, 33, 34, 35, 36, -1, -1, 39, -1, -1,
4186 -1, -1, -1, 45, 46, 47, 48, 49, 50, 51,
4187 52, 53, 54, 55, 56, 57, -1, 59, 60, 61,
4188 62, 63, 64, 65, -1, -1, -1, -1, -1, -1,
4189 -1, -1, -1, 75, 76, -1, -1, -1, -1, -1,
4190 -1, -1, -1, -1, -1, -1, -1, -1, 90, 91,
4191 -1, -1, -1, -1, -1, -1, 98, -1, -1, 101,
4192 102, -1, 104, 105, -1, 107, -1, -1, 110, 111,
4193 112, 113, 114, 115, 116, 117, 118, -1, -1, -1,
4194 -1, -1, -1, -1, -1, 1, -1, 3, 4, 5,
4195 6, 7, -1, 9, 10, 11, 12, 139, 140, 141,
4196 16, -1, 18, 19, 20, 21, 22, 23, 24, 151,
4197 -1, 153, -1, -1, 30, 31, 32, 33, 34, 35,
4198 36, -1, -1, 39, -1, -1, -1, -1, -1, 45,
4199 46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
4200 56, 57, -1, 59, 60, 61, 62, 63, 64, 65,
4201 -1, -1, -1, -1, -1, -1, -1, -1, -1, 75,
4202 76, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4203 -1, -1, -1, -1, 90, 91, -1, -1, -1, -1,
4204 -1, -1, 98, -1, -1, 101, 102, -1, 104, 105,
4205 -1, 107, -1, -1, 110, 111, 112, 113, 114, 115,
4206 116, 117, 118, -1, -1, -1, -1, -1, -1, -1,
4207 -1, 1, -1, 3, 4, 5, 6, 7, -1, -1,
4208 -1, 11, 12, 139, 140, 141, 16, -1, 18, 19,
4209 20, 21, 22, 23, 24, 151, -1, 153, -1, -1,
4210 30, 31, 32, 33, 34, 35, 36, -1, -1, 39,
4211 -1, -1, -1, -1, -1, 45, 46, 47, 48, 49,
4212 50, 51, 52, 53, 54, 55, 56, 57, -1, 59,
4213 60, 61, 62, 63, 64, 65, -1, -1, -1, -1,
4214 -1, -1, -1, -1, -1, 75, 76, -1, -1, -1,
4215 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4216 90, 91, -1, -1, -1, -1, -1, -1, 98, -1,
4217 -1, 101, 102, -1, 104, 105, -1, 107, -1, -1,
4218 110, 111, 112, 113, 114, 115, 116, 117, 118, -1,
4219 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4220 -1, -1, -1, -1, -1, -1, -1, -1, -1, 139,
4221 140, 141, -1, -1, -1, -1, -1, -1, -1, 149,
4222 -1, 151, 1, 153, 3, 4, 5, 6, 7, -1,
4223 -1, -1, 11, 12, -1, -1, -1, 16, -1, 18,
4224 19, 20, 21, 22, 23, 24, -1, -1, -1, -1,
4225 -1, 30, 31, 32, 33, 34, 35, 36, -1, -1,
4226 39, -1, -1, -1, -1, -1, 45, 46, 47, 48,
4227 49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
4228 59, 60, 61, 62, 63, 64, 65, -1, -1, -1,
4229 -1, -1, -1, -1, -1, -1, 75, 76, -1, -1,
4230 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4231 -1, 90, 91, -1, -1, -1, -1, -1, -1, 98,
4232 -1, -1, 101, 102, -1, 104, 105, -1, 107, -1,
4233 -1, 110, 111, 112, 113, 114, 115, 116, 117, 118,
4234 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4235 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4236 139, 140, 141, -1, -1, -1, -1, -1, -1, -1,
4237 149, -1, 151, 1, 153, 3, 4, 5, 6, 7,
4238 -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
4239 18, 19, 20, 21, 22, 23, 24, -1, -1, -1,
4240 -1, -1, 30, 31, 32, 33, 34, 35, 36, -1,
4241 -1, 39, -1, -1, -1, -1, -1, 45, 46, 47,
4242 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
4243 -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
4244 -1, -1, -1, -1, -1, -1, -1, 75, 76, -1,
4245 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4246 -1, -1, 90, 91, -1, -1, -1, -1, -1, -1,
4247 98, -1, -1, 101, 102, -1, 104, 105, -1, 107,
4248 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
4249 118, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4250 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4251 -1, 139, 140, 141, -1, -1, 144, -1, -1, -1,
4252 -1, -1, -1, 151, 1, 153, 3, 4, 5, 6,
4253 7, -1, -1, -1, 11, 12, -1, -1, -1, 16,
4254 -1, 18, 19, 20, 21, 22, 23, 24, -1, -1,
4255 -1, -1, -1, 30, 31, 32, 33, 34, 35, 36,
4256 -1, -1, 39, -1, -1, -1, -1, -1, 45, 46,
4257 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
4258 57, -1, 59, 60, 61, 62, 63, 64, 65, -1,
4259 -1, -1, -1, -1, -1, -1, -1, -1, 75, 76,
4260 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4261 -1, -1, -1, 90, 91, -1, -1, -1, -1, -1,
4262 -1, 98, -1, -1, 101, 102, -1, 104, 105, -1,
4263 107, -1, -1, 110, 111, 112, 113, 114, 115, 116,
4264 117, 118, -1, -1, -1, -1, -1, -1, -1, -1,
4265 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4266 -1, -1, 139, 140, 141, -1, -1, 144, -1, -1,
4267 -1, -1, -1, -1, 151, 1, 153, 3, 4, 5,
4268 6, 7, -1, -1, 10, 11, 12, -1, -1, -1,
4269 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
4270 -1, -1, -1, -1, 30, 31, 32, 33, 34, 35,
4271 36, -1, -1, 39, -1, -1, -1, -1, -1, 45,
4272 46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
4273 56, 57, -1, 59, 60, 61, 62, 63, 64, 65,
4274 -1, -1, -1, -1, -1, -1, -1, -1, -1, 75,
4275 76, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4276 -1, -1, -1, -1, 90, 91, -1, -1, -1, -1,
4277 -1, -1, 98, -1, -1, 101, 102, -1, 104, 105,
4278 -1, 107, -1, -1, 110, 111, 112, 113, 114, 115,
4279 116, 117, 118, -1, -1, -1, -1, -1, -1, -1,
4280 -1, 1, -1, 3, 4, 5, 6, 7, -1, -1,
4281 -1, 11, 12, 139, 140, 141, 16, -1, 18, 19,
4282 20, 21, 22, 23, 24, 151, -1, 153, -1, -1,
4283 30, 31, 32, 33, 34, 35, 36, -1, -1, 39,
4284 -1, -1, -1, -1, -1, 45, 46, 47, 48, 49,
4285 50, 51, 52, 53, 54, 55, 56, 57, -1, 59,
4286 60, 61, 62, 63, 64, 65, -1, -1, -1, -1,
4287 -1, -1, -1, -1, -1, 75, 76, -1, -1, -1,
4288 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4289 90, 91, -1, -1, -1, -1, -1, -1, 98, -1,
4290 -1, 101, 102, -1, 104, 105, -1, 107, -1, -1,
4291 110, 111, 112, 113, 114, 115, 116, 117, 118, -1,
4292 120, -1, -1, -1, -1, -1, -1, -1, -1, 3,
4293 4, 5, -1, 7, -1, -1, -1, 11, 12, 139,
4294 140, 141, 16, -1, 18, 19, 20, 21, 22, 23,
4295 24, 151, -1, 153, -1, -1, 30, 31, 32, 33,
4296 34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
4297 -1, -1, 46, -1, -1, 49, 50, 51, 52, 53,
4298 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
4299 64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
4300 -1, 75, 76, -1, -1, -1, -1, -1, -1, -1,
4301 -1, -1, -1, -1, -1, -1, 90, 91, -1, -1,
4302 -1, -1, -1, -1, 98, -1, -1, 101, 102, -1,
4303 104, 105, -1, 107, 108, 109, 110, 111, 112, 113,
4304 114, 115, 116, 117, 118, -1, -1, -1, -1, -1,
4305 -1, -1, -1, -1, -1, 3, 4, 5, -1, 7,
4306 -1, -1, -1, 11, 12, 139, 140, 141, 16, -1,
4307 18, 19, 20, 21, 22, 23, 24, -1, -1, 153,
4308 -1, -1, 30, 31, 32, 33, 34, 35, 36, -1,
4309 -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
4310 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
4311 -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
4312 -1, -1, -1, -1, -1, -1, -1, 75, 76, -1,
4313 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4314 -1, -1, 90, 91, -1, -1, -1, -1, -1, -1,
4315 98, -1, -1, 101, 102, -1, 104, 105, -1, -1,
4316 -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
4317 118, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4318 -1, 3, 4, 5, -1, 7, -1, -1, -1, 11,
4319 12, 139, 140, 141, 16, -1, 18, 19, 20, 21,
4320 22, 23, 24, 151, -1, 153, -1, -1, 30, 31,
4321 32, 33, 34, 35, 36, -1, -1, 39, -1, -1,
4322 -1, -1, -1, -1, 46, -1, -1, 49, 50, 51,
4323 52, 53, 54, 55, 56, 57, -1, 59, 60, 61,
4324 62, 63, 64, 65, -1, -1, -1, -1, -1, -1,
4325 -1, -1, -1, 75, 76, -1, -1, -1, -1, -1,
4326 -1, -1, -1, -1, -1, -1, -1, -1, 90, 91,
4327 -1, -1, -1, -1, -1, -1, 98, -1, -1, 101,
4328 102, -1, 104, 105, -1, -1, -1, -1, 110, 111,
4329 112, 113, 114, 115, 116, 117, 118, -1, -1, -1,
4330 -1, -1, -1, -1, -1, -1, -1, 3, 4, 5,
4331 6, 7, -1, -1, -1, 11, 12, 139, 140, 141,
4332 16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
4333 -1, 153, -1, -1, 30, 31, 32, 33, 34, 35,
4334 36, -1, -1, 39, -1, -1, -1, -1, -1, 45,
4335 46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
4336 56, 57, -1, 59, 60, 61, 62, 63, 64, 65,
4337 -1, -1, -1, -1, -1, -1, -1, -1, -1, 75,
4338 76, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4339 -1, -1, -1, -1, 90, 91, -1, -1, -1, -1,
4340 -1, -1, 98, -1, -1, 101, 102, -1, 104, 105,
4341 -1, 107, -1, -1, 110, 111, 112, 113, 114, 115,
4342 116, 117, 118, -1, -1, -1, -1, -1, -1, -1,
4343 -1, -1, -1, 3, 4, 5, 6, 7, -1, -1,
4344 -1, 11, 12, 139, 140, 141, 16, -1, 18, 19,
4345 20, 21, 22, 23, 24, 151, -1, -1, -1, -1,
4346 30, 31, 32, 33, 34, 35, 36, -1, -1, 39,
4347 -1, -1, -1, -1, -1, 45, 46, 47, 48, 49,
4348 50, 51, 52, 53, 54, 55, 56, 57, -1, 59,
4349 60, 61, 62, 63, 64, 65, -1, -1, -1, -1,
4350 -1, -1, -1, -1, -1, 75, 76, -1, -1, -1,
4351 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4352 90, 91, -1, -1, -1, -1, -1, -1, 98, -1,
4353 -1, 101, 102, -1, 104, 105, -1, 107, -1, -1,
4354 110, 111, 112, 113, 114, 115, 116, 117, 118, -1,
4355 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4356 -1, -1, -1, -1, -1, -1, -1, -1, -1, 139,
4357 140, 141, -1, -1, -1, -1, -1, -1, -1, -1,
4358 -1, 151, 3, 4, 5, 6, 7, 8, 9, 10,
4359 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
4360 21, 22, 23, 24, 25, 26, -1, -1, -1, 30,
4361 31, 32, 33, 34, 35, 36, 37, 38, 39, -1,
4362 -1, -1, -1, -1, 45, 46, 47, 48, 49, 50,
4363 51, 52, 53, 54, 55, 56, 57, -1, -1, -1,
4364 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4365 -1, -1, -1, -1, 75, 76, 77, 78, 79, 80,
4366 81, 82, 83, -1, -1, 86, 87, -1, -1, -1,
4367 -1, 92, 93, 94, 95, -1, -1, -1, -1, -1,
4368 -1, -1, -1, -1, -1, -1, 107, 108, -1, -1,
4369 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4370 -1, -1, -1, -1, -1, -1, -1, -1, 129, 130,
4371 131, 132, 133, 134, 135, 136, 137, 138, -1, 140,
4372 141, -1, -1, -1, -1, -1, 147, 148, 3, 4,
4373 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
4374 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
4375 25, 26, -1, -1, -1, 30, 31, 32, 33, 34,
4376 35, 36, 37, 38, 39, -1, -1, -1, -1, -1,
4377 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
4378 55, 56, 57, -1, -1, -1, -1, -1, -1, -1,
4379 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4380 75, 76, 77, 78, 79, 80, 81, 82, 83, -1,
4381 -1, 86, 87, -1, -1, -1, -1, 92, 93, 94,
4382 95, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4383 -1, -1, 107, 108, -1, -1, -1, -1, -1, -1,
4384 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4385 -1, -1, -1, -1, 129, 130, 131, 132, 133, 134,
4386 135, 136, 137, 138, -1, 140, 141, -1, -1, -1,
4387 -1, -1, 147, 3, 4, 5, 6, 7, 8, 9,
4388 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
4389 20, 21, 22, 23, 24, 25, 26, -1, -1, -1,
4390 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
4391 -1, -1, -1, -1, -1, 45, 46, 47, 48, 49,
4392 50, 51, 52, 53, 54, -1, 56, -1, -1, -1,
4393 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4394 -1, -1, -1, -1, -1, 75, 76, 77, 78, 79,
4395 80, 81, 82, 83, -1, -1, 86, 87, -1, -1,
4396 -1, -1, 92, 93, 94, 95, -1, -1, -1, -1,
4397 -1, -1, -1, -1, -1, -1, -1, 107, 108, -1,
4398 -1, 111, -1, -1, -1, -1, -1, -1, -1, -1,
4399 -1, -1, -1, -1, -1, -1, -1, -1, -1, 129,
4400 130, 131, 132, 133, 134, 135, 136, 137, 138, -1,
4401 140, 141, -1, -1, -1, -1, -1, 147, 3, 4,
4402 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
4403 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
4404 25, 26, -1, -1, -1, 30, 31, 32, 33, 34,
4405 35, 36, 37, 38, 39, -1, -1, -1, -1, -1,
4406 45, 46, 47, 48, 49, 50, 51, 52, 53, -1,
4407 -1, 56, -1, -1, -1, -1, -1, -1, -1, -1,
4408 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4409 75, 76, 77, 78, 79, 80, 81, 82, 83, -1,
4410 -1, 86, 87, -1, -1, -1, -1, 92, 93, 94,
4411 95, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4412 -1, -1, 107, 108, -1, -1, 111, -1, -1, -1,
4413 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4414 -1, -1, -1, -1, 129, 130, 131, 132, 133, 134,
4415 135, 136, 137, 138, -1, 140, 141, -1, -1, -1,
4416 -1, -1, 147, 3, 4, 5, 6, 7, 8, 9,
4417 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
4418 20, 21, 22, 23, 24, 25, 26, -1, -1, -1,
4419 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
4420 -1, -1, -1, -1, -1, 45, 46, 47, 48, 49,
4421 50, 51, 52, 53, -1, -1, 56, -1, -1, -1,
4422 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4423 -1, -1, -1, -1, -1, 75, 76, 77, 78, 79,
4424 80, 81, 82, 83, -1, -1, 86, 87, -1, -1,
4425 -1, -1, 92, 93, 94, 95, -1, -1, -1, -1,
4426 -1, -1, -1, -1, -1, -1, -1, 107, 108, -1,
4427 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4428 -1, -1, -1, -1, -1, -1, -1, -1, -1, 129,
4429 130, 131, 132, 133, 134, 135, 136, 137, 138, -1,
4430 140, 141, 3, 4, 5, -1, 7, 147, -1, -1,
4431 11, 12, -1, -1, -1, 16, -1, 18, 19, 20,
4432 21, 22, 23, 24, -1, -1, -1, -1, -1, 30,
4433 31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
4434 -1, -1, -1, -1, -1, 46, -1, -1, 49, 50,
4435 51, 52, 53, 54, 55, 56, 57, -1, 59, 60,
4436 61, 62, 63, 64, 65, -1, -1, -1, -1, -1,
4437 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4438 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4439 -1, -1, -1, -1, -1, -1, -1, 98, -1, -1,
4440 101, 102, -1, 104, 105, -1, -1, -1, -1, 110,
4441 111, 112, 113, 114, 115, 116, 117, 118, -1, -1,
4442 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4443 -1, 3, 4, 5, -1, 7, -1, -1, 139, 11,
4444 12, -1, -1, -1, 16, 146, 18, 19, 20, 21,
4445 22, 23, 24, -1, -1, -1, -1, -1, 30, 31,
4446 32, 33, 34, 35, 36, -1, -1, 39, -1, -1,
4447 -1, -1, -1, -1, 46, -1, -1, 49, 50, 51,
4448 52, 53, 54, 55, 56, 57, -1, 59, 60, 61,
4449 62, 63, 64, 65, -1, -1, -1, -1, -1, -1,
4450 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4451 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4452 -1, -1, -1, -1, -1, -1, 98, -1, -1, 101,
4453 102, -1, 104, 105, -1, -1, -1, -1, 110, 111,
4454 112, 113, 114, 115, 116, 117, 118, -1, -1, -1,
4455 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4456 3, 4, 5, 6, 7, -1, -1, 139, 11, 12,
4457 -1, -1, -1, 16, 146, 18, 19, 20, 21, 22,
4458 23, 24, -1, -1, -1, -1, -1, 30, 31, 32,
4459 33, 34, 35, 36, -1, -1, 39, -1, -1, -1,
4460 -1, -1, 45, 46, 47, 48, 49, 50, 51, 52,
4461 53, 54, 55, 56, 57, -1, 59, 60, 61, 62,
4462 63, 64, 65, -1, -1, -1, -1, -1, -1, -1,
4463 -1, -1, 75, 76, -1, -1, -1, -1, -1, -1,
4464 -1, -1, -1, -1, -1, -1, -1, 90, 91, -1,
4465 -1, -1, -1, -1, -1, 98, -1, -1, 101, 102,
4466 -1, 104, 105, -1, 107, -1, -1, 110, 111, 112,
4467 113, 114, 115, 116, 117, 118, -1, -1, -1, -1,
4468 -1, -1, -1, -1, -1, -1, 3, 4, 5, -1,
4469 7, -1, -1, -1, 11, 12, 139, 140, 141, 16,
4470 -1, 18, 19, 20, 21, 22, 23, 24, -1, -1,
4471 -1, -1, -1, 30, 31, 32, 33, 34, 35, 36,
4472 -1, -1, 39, -1, -1, -1, -1, -1, -1, 46,
4473 -1, -1, 49, 50, 51, 52, 53, 54, 55, 56,
4474 57, 58, 59, 60, 61, 62, 63, 64, 65, -1,
4475 -1, -1, -1, -1, -1, -1, -1, -1, 75, 76,
4476 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4477 -1, -1, -1, 90, 91, -1, -1, -1, -1, -1,
4478 -1, 98, -1, -1, 101, 102, -1, 104, 105, -1,
4479 107, 108, 109, 110, 111, 112, 113, 114, 115, 116,
4480 117, 118, -1, -1, -1, -1, -1, -1, -1, -1,
4481 -1, -1, 3, 4, 5, 6, 7, -1, -1, -1,
4482 11, 12, 139, 140, 141, 16, -1, 18, 19, 20,
4483 21, 22, 23, 24, -1, -1, -1, -1, -1, 30,
4484 31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
4485 -1, -1, -1, -1, 45, 46, -1, 48, 49, 50,
4486 51, 52, 53, 54, 55, 56, 57, -1, 59, 60,
4487 61, 62, 63, 64, 65, -1, -1, -1, -1, -1,
4488 -1, -1, -1, -1, 75, 76, -1, -1, -1, -1,
4489 -1, -1, -1, -1, -1, -1, -1, -1, -1, 90,
4490 91, -1, -1, -1, -1, -1, -1, 98, -1, -1,
4491 101, 102, -1, 104, 105, -1, 107, -1, -1, 110,
4492 111, 112, 113, 114, 115, 116, 117, 118, -1, -1,
4493 -1, -1, -1, -1, -1, -1, -1, -1, 3, 4,
4494 5, -1, 7, -1, -1, -1, 11, 12, 139, 140,
4495 141, 16, -1, 18, 19, 20, 21, 22, 23, 24,
4496 -1, -1, -1, -1, -1, 30, 31, 32, 33, 34,
4497 35, 36, -1, -1, 39, -1, -1, -1, -1, -1,
4498 -1, 46, -1, -1, 49, 50, 51, 52, 53, 54,
4499 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
4500 65, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4501 75, 76, -1, -1, -1, -1, -1, -1, -1, -1,
4502 -1, -1, -1, -1, -1, 90, 91, -1, -1, -1,
4503 -1, -1, -1, 98, -1, -1, 101, 102, -1, 104,
4504 105, -1, 107, 108, 109, 110, 111, 112, 113, 114,
4505 115, 116, 117, 118, -1, -1, -1, -1, -1, -1,
4506 -1, -1, -1, -1, 3, 4, 5, -1, 7, -1,
4507 -1, -1, 11, 12, 139, 140, 141, 16, -1, 18,
4508 19, 20, 21, 22, 23, 24, -1, -1, -1, -1,
4509 -1, 30, 31, 32, 33, 34, 35, 36, -1, -1,
4510 39, -1, -1, -1, -1, -1, -1, 46, -1, -1,
4511 49, 50, 51, 52, 53, 54, 55, 56, 57, 58,
4512 59, 60, 61, 62, 63, 64, 65, -1, -1, -1,
4513 -1, -1, -1, -1, -1, -1, 75, 76, -1, -1,
4514 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4515 -1, 90, 91, -1, -1, -1, -1, -1, -1, 98,
4516 -1, -1, 101, 102, -1, 104, 105, -1, 107, 108,
4517 109, 110, 111, 112, 113, 114, 115, 116, 117, 118,
4518 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4519 3, 4, 5, -1, 7, -1, -1, -1, 11, 12,
4520 139, 140, 141, 16, -1, 18, 19, 20, 21, 22,
4521 23, 24, -1, -1, -1, -1, -1, 30, 31, 32,
4522 33, 34, 35, 36, -1, -1, 39, -1, -1, -1,
4523 -1, -1, -1, 46, -1, -1, 49, 50, 51, 52,
4524 53, 54, 55, 56, 57, 58, 59, 60, 61, 62,
4525 63, 64, 65, -1, -1, -1, -1, -1, -1, -1,
4526 -1, -1, 75, 76, -1, -1, -1, -1, -1, -1,
4527 -1, -1, -1, -1, -1, -1, -1, 90, 91, -1,
4528 -1, -1, -1, -1, -1, 98, -1, -1, 101, 102,
4529 -1, 104, 105, -1, 107, 108, 109, 110, 111, 112,
4530 113, 114, 115, 116, 117, 118, -1, -1, -1, -1,
4531 -1, -1, -1, -1, -1, -1, 3, 4, 5, -1,
4532 7, -1, -1, -1, 11, 12, 139, 140, 141, 16,
4533 -1, 18, 19, 20, 21, 22, 23, 24, -1, -1,
4534 -1, -1, -1, 30, 31, 32, 33, 34, 35, 36,
4535 -1, -1, 39, -1, -1, -1, -1, -1, -1, 46,
4536 -1, -1, 49, 50, 51, 52, 53, 54, 55, 56,
4537 57, 58, 59, 60, 61, 62, 63, 64, 65, -1,
4538 -1, -1, -1, -1, -1, -1, -1, -1, 75, 76,
4539 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4540 -1, -1, -1, 90, 91, -1, -1, -1, -1, -1,
4541 -1, 98, -1, -1, 101, 102, -1, 104, 105, -1,
4542 107, 108, -1, 110, 111, 112, 113, 114, 115, 116,
4543 117, 118, -1, -1, -1, -1, -1, -1, -1, -1,
4544 -1, -1, 3, 4, 5, -1, 7, -1, -1, -1,
4545 11, 12, 139, 140, 141, 16, -1, 18, 19, 20,
4546 21, 22, 23, 24, -1, -1, -1, -1, -1, 30,
4547 31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
4548 -1, -1, -1, -1, -1, 46, -1, -1, 49, 50,
4549 51, 52, 53, 54, 55, 56, 57, 58, 59, 60,
4550 61, 62, 63, 64, 65, -1, -1, -1, -1, -1,
4551 -1, -1, -1, -1, 75, 76, -1, -1, -1, -1,
4552 -1, -1, -1, -1, -1, -1, -1, -1, -1, 90,
4553 91, -1, -1, -1, -1, -1, -1, 98, -1, -1,
4554 101, 102, -1, 104, 105, -1, -1, 108, 109, 110,
4555 111, 112, 113, 114, 115, 116, 117, 118, -1, -1,
4556 -1, -1, -1, -1, -1, -1, -1, -1, 3, 4,
4557 5, -1, 7, -1, -1, -1, 11, 12, 139, 140,
4558 141, 16, -1, 18, 19, 20, 21, 22, 23, 24,
4559 -1, -1, -1, -1, -1, 30, 31, 32, 33, 34,
4560 35, 36, -1, -1, 39, -1, -1, -1, -1, -1,
4561 -1, 46, -1, -1, 49, 50, 51, 52, 53, 54,
4562 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
4563 65, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4564 75, 76, -1, -1, -1, -1, -1, -1, -1, -1,
4565 -1, -1, -1, -1, -1, 90, 91, -1, -1, -1,
4566 -1, -1, -1, 98, -1, -1, 101, 102, -1, 104,
4567 105, -1, 107, 108, -1, 110, 111, 112, 113, 114,
4568 115, 116, 117, 118, -1, -1, -1, -1, -1, -1,
4569 -1, -1, -1, -1, 3, 4, 5, -1, 7, -1,
4570 -1, -1, 11, 12, 139, 140, 141, 16, -1, 18,
4571 19, 20, 21, 22, 23, 24, -1, -1, -1, -1,
4572 -1, 30, 31, 32, 33, 34, 35, 36, -1, -1,
4573 39, -1, -1, -1, -1, -1, -1, 46, -1, -1,
4574 49, 50, 51, 52, 53, 54, 55, 56, 57, 58,
4575 59, 60, 61, 62, 63, 64, 65, -1, -1, -1,
4576 -1, -1, -1, -1, -1, -1, 75, 76, -1, -1,
4577 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4578 -1, 90, 91, -1, -1, -1, -1, -1, -1, 98,
4579 -1, -1, 101, 102, -1, 104, 105, -1, -1, 108,
4580 -1, 110, 111, 112, 113, 114, 115, 116, 117, 118,
4581 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4582 3, 4, 5, -1, 7, -1, -1, -1, 11, 12,
4583 139, 140, 141, 16, -1, 18, 19, 20, 21, 22,
4584 23, 24, -1, -1, -1, -1, -1, 30, 31, 32,
4585 33, 34, 35, 36, -1, -1, 39, -1, -1, -1,
4586 -1, -1, -1, 46, -1, -1, 49, 50, 51, 52,
4587 53, 54, 55, 56, 57, -1, 59, 60, 61, 62,
4588 63, 64, 65, -1, -1, -1, -1, -1, -1, -1,
4589 -1, -1, 75, 76, -1, -1, -1, -1, -1, -1,
4590 -1, -1, -1, -1, -1, -1, -1, 90, 91, -1,
4591 -1, -1, -1, -1, -1, 98, -1, -1, 101, 102,
4592 -1, 104, 105, -1, 107, -1, -1, 110, 111, 112,
4593 113, 114, 115, 116, 117, 118, -1, -1, -1, -1,
4594 -1, -1, -1, -1, -1, -1, 3, 4, 5, -1,
4595 7, -1, -1, -1, 11, 12, 139, 140, 141, 16,
4596 -1, 18, 19, 20, 21, 22, 23, 24, -1, -1,
4597 -1, -1, -1, 30, 31, 32, 33, 34, 35, 36,
4598 -1, -1, 39, -1, -1, -1, -1, -1, -1, 46,
4599 -1, -1, 49, 50, 51, 52, 53, 54, 55, 56,
4600 57, -1, 59, 60, 61, 62, 63, 64, 65, -1,
4601 -1, -1, -1, -1, -1, -1, -1, -1, 75, 76,
4602 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4603 -1, -1, -1, 90, 91, -1, -1, -1, -1, -1,
4604 -1, 98, -1, -1, 101, 102, -1, 104, 105, -1,
4605 107, -1, -1, 110, 111, 112, 113, 114, 115, 116,
4606 117, 118, -1, -1, -1, -1, -1, -1, -1, -1,
4607 -1, -1, 3, 4, 5, -1, 7, -1, -1, -1,
4608 11, 12, 139, 140, 141, 16, -1, 18, 19, 20,
4609 21, 22, 23, 24, -1, -1, -1, -1, -1, 30,
4610 31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
4611 -1, -1, -1, -1, -1, 46, -1, -1, 49, 50,
4612 51, 52, 53, 54, 55, 56, 57, -1, 59, 60,
4613 61, 62, 63, 64, 65, -1, -1, -1, -1, -1,
4614 -1, -1, -1, -1, 75, 76, -1, -1, -1, -1,
4615 -1, -1, -1, -1, -1, -1, -1, -1, -1, 90,
4616 91, -1, -1, -1, -1, -1, -1, 98, -1, -1,
4617 101, 102, -1, 104, 105, -1, 107, -1, -1, 110,
4618 111, 112, 113, 114, 115, 116, 117, 118, -1, -1,
4619 -1, -1, -1, -1, -1, -1, -1, -1, 3, 4,
4620 5, -1, 7, -1, -1, -1, 11, 12, 139, 140,
4621 141, 16, -1, 18, 19, 20, 21, 22, 23, 24,
4622 -1, -1, -1, -1, -1, 30, 31, 32, 33, 34,
4623 35, 36, -1, -1, 39, -1, -1, -1, -1, -1,
4624 -1, 46, -1, -1, 49, 50, 51, 52, 53, 54,
4625 55, 56, 57, -1, 59, 60, 61, 62, 63, 64,
4626 65, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4627 75, 76, -1, -1, -1, -1, -1, -1, -1, -1,
4628 -1, -1, -1, -1, -1, 90, 91, -1, -1, -1,
4629 -1, -1, -1, 98, -1, -1, 101, 102, -1, 104,
4630 105, -1, 107, -1, -1, 110, 111, 112, 113, 114,
4631 115, 116, 117, 118, -1, -1, -1, -1, -1, -1,
4632 -1, -1, -1, -1, 3, 4, 5, -1, 7, -1,
4633 -1, -1, 11, 12, 139, 140, 141, 16, -1, 18,
4634 19, 20, 21, 22, 23, 24, -1, -1, -1, -1,
4635 -1, 30, 31, 32, 33, 34, 35, 36, -1, -1,
4636 39, -1, -1, -1, -1, -1, -1, 46, -1, -1,
4637 49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
4638 59, 60, 61, 62, 63, 64, 65, -1, -1, -1,
4639 -1, -1, -1, -1, -1, -1, 75, 76, -1, -1,
4640 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4641 -1, 90, 91, -1, -1, -1, -1, -1, -1, 98,
4642 -1, -1, 101, 102, -1, 104, 105, -1, 107, -1,
4643 -1, 110, 111, 112, 113, 114, 115, 116, 117, 118,
4644 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4645 3, 4, 5, -1, 7, -1, -1, -1, 11, 12,
4646 139, 140, 141, 16, -1, 18, 19, 20, 21, 22,
4647 23, 24, -1, -1, -1, -1, -1, 30, 31, 32,
4648 33, 34, 35, 36, -1, -1, 39, -1, -1, -1,
4649 -1, -1, -1, 46, -1, -1, 49, 50, 51, 52,
4650 53, 54, 55, 56, 57, -1, 59, 60, 61, 62,
4651 63, 64, 65, -1, -1, -1, -1, -1, -1, -1,
4652 -1, -1, 75, 76, -1, -1, -1, -1, -1, -1,
4653 -1, -1, -1, -1, -1, -1, -1, 90, 91, -1,
4654 -1, -1, -1, -1, -1, 98, -1, -1, 101, 102,
4655 -1, 104, 105, -1, -1, -1, -1, 110, 111, 112,
4656 113, 114, 115, 116, 117, 118, -1, -1, -1, -1,
4657 -1, -1, -1, -1, -1, -1, 3, 4, 5, -1,
4658 7, -1, -1, -1, 11, 12, 139, 140, 141, 16,
4659 -1, 18, 19, 20, 21, 22, 23, 24, -1, -1,
4660 -1, -1, -1, 30, 31, 32, 33, 34, 35, 36,
4661 -1, -1, 39, -1, -1, -1, -1, -1, -1, 46,
4662 -1, -1, 49, 50, 51, 52, 53, 54, 55, 56,
4663 57, -1, 59, 60, 61, 62, 63, 64, 65, -1,
4664 -1, -1, -1, -1, -1, -1, -1, -1, 75, 76,
4665 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4666 -1, -1, -1, 90, 91, -1, -1, -1, -1, -1,
4667 -1, 98, -1, -1, 101, 102, -1, 104, 105, -1,
4668 -1, -1, -1, 110, 111, 112, 113, 114, 115, 116,
4669 117, 118, -1, -1, -1, -1, -1, -1, -1, -1,
4670 -1, -1, 3, 4, 5, -1, 7, -1, -1, -1,
4671 11, 12, 139, 140, 141, 16, -1, 18, 19, 20,
4672 21, 22, 23, 24, -1, -1, -1, -1, -1, 30,
4673 31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
4674 -1, -1, -1, -1, -1, 46, -1, -1, 49, 50,
4675 51, 52, 53, 54, 55, 56, 57, -1, 59, 60,
4676 61, 62, 63, 64, 65, -1, -1, -1, -1, -1,
4677 -1, -1, -1, -1, 75, 76, -1, -1, -1, -1,
4678 -1, -1, -1, -1, -1, -1, -1, -1, -1, 90,
4679 91, -1, -1, -1, -1, -1, -1, 98, -1, -1,
4680 101, 102, -1, 104, 105, -1, -1, -1, -1, 110,
4681 111, 112, 113, 114, 115, 116, 117, 118, -1, -1,
4682 -1, -1, -1, -1, -1, -1, -1, -1, 3, 4,
4683 5, -1, 7, -1, -1, -1, 11, 12, 139, 140,
4684 141, 16, -1, 18, 19, 20, 21, 22, 23, 24,
4685 -1, -1, -1, -1, -1, 30, 31, 32, 33, 34,
4686 35, 36, -1, -1, 39, -1, -1, -1, -1, -1,
4687 -1, 46, -1, -1, 49, 50, 51, 52, 53, 54,
4688 55, 56, 57, -1, 59, 60, 61, 62, 63, 64,
4689 65, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4690 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4691 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4692 -1, -1, -1, 98, -1, -1, 101, 102, -1, 104,
4693 105, -1, 107, -1, -1, 110, 111, 112, 113, 114,
4694 115, 116, 117, 118, -1, -1, -1, -1, -1, -1,
4695 3, 4, 5, -1, 7, -1, -1, -1, 11, 12,
4696 -1, -1, -1, 16, 139, 18, 19, 20, 21, 22,
4697 23, 24, -1, -1, -1, -1, -1, 30, 31, 32,
4698 33, 34, 35, 36, -1, -1, 39, -1, -1, -1,
4699 -1, -1, -1, 46, -1, -1, 49, 50, 51, 52,
4700 53, 54, 55, 56, 57, -1, 59, 60, 61, 62,
4701 63, 64, 65, -1, -1, -1, -1, -1, -1, -1,
4702 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4703 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4704 -1, -1, -1, -1, -1, 98, -1, -1, 101, 102,
4705 -1, 104, 105, -1, 107, -1, -1, 110, 111, 112,
4706 113, 114, 115, 116, 117, 118, -1, -1, -1, -1,
4707 -1, -1, 3, 4, 5, -1, 7, -1, -1, -1,
4708 11, 12, -1, -1, -1, 16, 139, 18, 19, 20,
4709 21, 22, 23, 24, -1, -1, -1, -1, -1, 30,
4710 31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
4711 -1, -1, -1, -1, -1, 46, -1, -1, 49, 50,
4712 51, 52, 53, 54, 55, 56, 57, -1, 59, 60,
4713 61, 62, 63, 64, 65, -1, -1, -1, -1, -1,
4714 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4715 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4716 -1, -1, -1, 94, -1, -1, -1, 98, -1, -1,
4717 101, 102, -1, 104, 105, -1, -1, -1, -1, 110,
4718 111, 112, 113, 114, 115, 116, 117, 118, -1, -1,
4719 -1, -1, -1, -1, 3, 4, 5, -1, 7, -1,
4720 -1, -1, 11, 12, -1, -1, -1, 16, 139, 18,
4721 19, 20, 21, 22, 23, 24, -1, -1, -1, -1,
4722 -1, 30, 31, 32, 33, 34, 35, 36, -1, -1,
4723 39, -1, -1, -1, -1, -1, -1, 46, -1, -1,
4724 49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
4725 59, 60, 61, 62, 63, 64, 65, -1, -1, -1,
4726 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4727 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4728 -1, -1, -1, -1, -1, -1, -1, -1, -1, 98,
4729 -1, -1, 101, 102, -1, 104, 105, -1, -1, -1,
4730 -1, 110, 111, 112, 113, 114, 115, 116, 117, 118,
4731 -1, -1, -1, -1, -1, -1, 3, 4, 5, -1,
4732 7, -1, -1, -1, 11, 12, -1, -1, -1, 16,
4733 139, 18, 19, 20, 21, 22, 23, 24, -1, -1,
4734 -1, -1, -1, 30, 31, 32, 33, 34, 35, 36,
4735 -1, -1, 39, -1, -1, -1, -1, -1, -1, 46,
4736 -1, -1, 49, 50, 51, 52, 53, 54, 55, 56,
4737 57, -1, 59, 60, 61, 62, 63, 64, 65, -1,
4738 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4739 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4740 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4741 -1, 98, -1, -1, 101, 102, -1, 104, 105, -1,
4742 -1, -1, -1, 110, 111, 112, 113, 114, 115, 116,
4743 117, 118, -1, -1, -1, -1, -1, -1, 3, 4,
4744 5, -1, 7, -1, -1, -1, 11, 12, -1, -1,
4745 -1, 16, 139, 18, 19, 20, 21, 22, 23, 24,
4746 -1, -1, -1, -1, -1, 30, 31, 32, 33, 34,
4747 35, 36, -1, -1, 39, -1, -1, -1, -1, -1,
4748 -1, 46, -1, -1, 49, 50, 51, 52, 53, 54,
4749 55, 56, 57, -1, 59, 60, 61, 62, 63, 64,
4750 65, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4751 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4752 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4753 -1, -1, -1, 98, -1, -1, 101, 102, -1, 104,
4754 105, -1, -1, -1, -1, 110, 111, 112, 113, 114,
4755 115, 116, 117, 118, -1, -1, -1, -1, -1, -1,
4756 3, 4, 5, -1, 7, -1, -1, -1, 11, 12,
4757 -1, -1, -1, 16, 139, 18, 19, 20, 21, 22,
4758 23, 24, -1, -1, -1, -1, -1, 30, 31, 32,
4759 33, 34, 35, 36, -1, -1, 39, -1, -1, -1,
4760 -1, -1, -1, 46, -1, -1, 49, 50, 51, 52,
4761 53, 54, 55, 56, 57, -1, 59, 60, 61, 62,
4762 63, 64, 65, 33, 34, 35, 36, -1, -1, -1,
4763 -1, -1, -1, -1, -1, -1, -1, -1, -1, 49,
4764 50, 51, 52, -1, -1, -1, 56, -1, -1, 59,
4765 60, 61, 62, 63, -1, 98, -1, -1, 101, 102,
4766 -1, 104, 105, -1, -1, -1, -1, 110, 111, 112,
4767 113, 114, 115, 116, 117, 118, -1, -1, -1, -1,
4768 90, 91, -1, -1, -1, -1, -1, -1, 98, -1,
4769 -1, 101, -1, -1, 104, 105, 139, 107, -1, -1,
4770 110, 111, 112, 113, 114, 115, 116, 117, 118, 33,
4771 34, 35, 36, -1, -1, -1, -1, -1, -1, -1,
4772 -1, -1, 132, -1, -1, 49, 50, 51, 52, 139,
4773 -1, -1, 56, -1, -1, 59, 60, 61, 62, 63,
4774 -1, -1, 33, 34, 35, 36, -1, -1, -1, -1,
4775 -1, -1, -1, -1, -1, -1, -1, -1, 49, 50,
4776 51, 52, -1, -1, -1, 56, 90, 91, 59, 60,
4777 61, 62, 63, -1, 98, -1, -1, 101, -1, -1,
4778 104, 105, -1, 107, -1, -1, 110, 111, 112, 113,
4779 114, 115, 116, 117, 118, -1, -1, -1, -1, 90,
4780 91, -1, -1, -1, -1, -1, -1, 98, 132, -1,
4781 101, -1, -1, 104, 105, 139, -1, -1, -1, 110,
4782 111, 112, 113, 114, 115, 116, 117, 118, 52, 53,
4783 -1, -1, 56, -1, -1, -1, -1, -1, -1, -1,
4784 -1, 132, -1, -1, -1, -1, -1, -1, 139, -1,
4785 -1, 75, 76, 77, 78, 79, 80, 81, 82, 83,
4786 -1, -1, 86, 87, -1, -1, -1, -1, 92, 93,
4787 94, 95, -1, -1, -1, -1, -1, -1, -1, -1,
4788 -1, -1, -1, 107, 108, -1, -1, -1, -1, -1,
4789 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4790 -1, -1, -1, -1, -1, 129, 130, 131, 132, 133,
4791 134, 135, 136, 137, 138, -1, 140, 141, 52, 53,
4792 -1, -1, 56, 147, 148, -1, -1, -1, -1, -1,
4793 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4794 -1, 75, 76, 77, 78, 79, 80, 81, 82, 83,
4795 -1, -1, 86, 87, -1, -1, -1, -1, 92, 93,
4796 94, 95, -1, -1, -1, -1, -1, -1, -1, -1,
4797 -1, -1, -1, 107, 108, -1, -1, -1, -1, -1,
4798 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4799 -1, -1, -1, -1, -1, 129, 130, 131, 132, 133,
4800 134, 135, 136, 137, 138, -1, 140, 141, 52, 53,
4801 -1, -1, 56, 147, 148, -1, -1, -1, -1, -1,
4802 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4803 -1, 75, 76, 77, 78, 79, 80, 81, 82, 83,
4804 -1, -1, 86, 87, -1, -1, -1, -1, 92, 93,
4805 94, 95, -1, -1, -1, -1, -1, -1, -1, -1,
4806 -1, -1, -1, 107, 108, -1, -1, -1, -1, -1,
4807 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4808 -1, -1, -1, -1, -1, 129, 130, 131, 132, 133,
4809 134, 135, 136, 137, 138, -1, 140, 141, 52, 53,
4810 -1, -1, 56, 147, 148, -1, -1, -1, -1, -1,
4811 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4812 -1, 75, 76, 77, 78, 79, 80, 81, 82, 83,
4813 -1, -1, 86, 87, -1, -1, -1, -1, 92, 93,
4814 94, 95, -1, -1, -1, -1, -1, -1, -1, -1,
4815 -1, -1, -1, 107, 108, -1, -1, -1, -1, -1,
4816 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4817 -1, -1, -1, -1, -1, 129, 130, 131, 132, 133,
4818 134, 135, 136, 137, 138, -1, 140, 141, 52, 53,
4819 -1, -1, 56, 147, 148, -1, -1, -1, -1, -1,
4820 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4821 -1, 75, 76, 77, 78, 79, 80, 81, 82, 83,
4822 -1, -1, 86, 87, -1, -1, -1, -1, 92, 93,
4823 94, 95, -1, -1, -1, -1, -1, -1, -1, -1,
4824 -1, -1, -1, 107, 108, -1, -1, -1, -1, -1,
4825 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4826 -1, -1, -1, -1, -1, 129, 130, 131, 132, 133,
4827 134, 135, 136, 137, 138, -1, 140, 141, 52, 53,
4828 -1, -1, 56, 147, 148, -1, -1, -1, -1, -1,
4829 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4830 -1, 75, 76, 77, 78, 79, 80, 81, 82, 83,
4831 -1, -1, 86, 87, -1, -1, -1, -1, 92, 93,
4832 94, 95, -1, -1, -1, -1, -1, -1, -1, -1,
4833 -1, -1, -1, 107, 108, -1, -1, -1, -1, -1,
4834 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4835 -1, -1, -1, -1, -1, 129, 130, 131, 132, 133,
4836 134, 135, 136, 137, 138, -1, 140, 141, 52, 53,
4837 -1, -1, 56, 147, 148, -1, -1, -1, -1, -1,
4838 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4839 -1, 75, 76, 77, 78, 79, 80, 81, 82, 83,
4840 -1, -1, 86, 87, -1, -1, -1, -1, 92, 93,
4841 94, 95, -1, -1, -1, -1, -1, -1, -1, -1,
4842 -1, -1, -1, 107, 108, -1, -1, -1, -1, -1,
4843 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4844 -1, -1, -1, -1, -1, 129, 130, 131, 132, 133,
4845 134, 135, 136, 137, 138, -1, 140, 141, 52, 53,
4846 -1, -1, 56, 147, 148, -1, -1, -1, -1, -1,
4847 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4848 -1, 75, 76, 77, 78, 79, 80, 81, 82, 83,
4849 -1, -1, 86, 87, -1, -1, -1, -1, 92, 93,
4850 94, 95, -1, -1, -1, -1, -1, -1, -1, -1,
4851 -1, -1, -1, 107, 108, -1, -1, -1, -1, -1,
4852 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4853 -1, -1, -1, -1, -1, 129, 130, 131, 132, 133,
4854 134, 135, 136, 137, 138, -1, 140, 141, 52, 53,
4855 -1, -1, 56, 147, 148, -1, -1, -1, -1, -1,
4856 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4857 -1, 75, 76, 77, 78, 79, 80, 81, 82, 83,
4858 -1, -1, 86, 87, -1, -1, -1, -1, 92, 93,
4859 94, 95, -1, -1, -1, -1, -1, -1, -1, -1,
4860 -1, -1, -1, 107, 108, -1, -1, -1, -1, -1,
4861 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4862 -1, -1, -1, -1, -1, 129, 130, 131, 132, 133,
4863 134, 135, 136, 137, 138, -1, 140, 141, 52, 53,
4864 -1, -1, 56, 147, 148, -1, -1, -1, -1, -1,
4865 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4866 -1, 75, 76, 77, 78, 79, 80, 81, 82, 83,
4867 -1, -1, 86, 87, -1, -1, -1, -1, 92, 93,
4868 94, 95, -1, -1, -1, -1, -1, -1, -1, -1,
4869 -1, -1, -1, 107, 108, -1, -1, -1, -1, -1,
4870 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4871 -1, -1, -1, -1, -1, 129, 130, 131, 132, 133,
4872 134, 135, 136, 137, 138, -1, 140, 141, 52, 53,
4873 -1, -1, 56, 147, 148, -1, -1, -1, -1, -1,
4874 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4875 -1, 75, 76, 77, 78, 79, 80, 81, 82, 83,
4876 -1, -1, 86, 87, -1, -1, -1, -1, 92, 93,
4877 94, 95, -1, -1, -1, -1, -1, -1, -1, -1,
4878 -1, -1, -1, 107, 108, -1, -1, -1, -1, -1,
4879 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4880 -1, -1, -1, -1, -1, 129, 130, 131, 132, 133,
4881 134, 135, 136, 137, 138, -1, 140, 141, 52, 53,
4882 -1, -1, 56, 147, 148, -1, -1, -1, -1, -1,
4883 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4884 -1, 75, 76, 77, 78, 79, 80, 81, 82, 83,
4885 -1, -1, 86, 87, -1, -1, -1, -1, 92, 93,
4886 94, 95, -1, -1, -1, -1, -1, -1, -1, -1,
4887 -1, -1, -1, 107, 108, -1, -1, -1, -1, -1,
4888 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4889 -1, -1, -1, -1, -1, 129, 130, 131, 132, 133,
4890 134, 135, 136, 137, 138, -1, 140, 141, 52, 53,
4891 -1, -1, 56, 147, 148, -1, -1, -1, -1, -1,
4892 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4893 -1, 75, 76, 77, 78, 79, 80, 81, 82, 83,
4894 -1, -1, 86, 87, -1, -1, -1, -1, 92, 93,
4895 94, 95, -1, -1, -1, -1, -1, -1, -1, -1,
4896 -1, -1, -1, 107, 108, -1, -1, -1, -1, -1,
4897 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4898 -1, -1, -1, -1, -1, 129, 130, 131, 132, 133,
4899 134, 135, 136, 137, 138, -1, 140, 141, 52, 53,
4900 -1, -1, 56, 147, 148, -1, -1, -1, -1, -1,
4901 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4902 -1, 75, 76, 77, 78, 79, 80, 81, 82, 83,
4903 -1, -1, 86, 87, -1, -1, -1, -1, 92, 93,
4904 94, 95, -1, -1, -1, -1, -1, -1, -1, -1,
4905 -1, -1, -1, 107, 108, -1, -1, -1, -1, -1,
4906 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4907 -1, -1, -1, -1, -1, 129, 130, 131, 132, 133,
4908 134, 135, 136, 137, 138, -1, 140, 141, 52, 53,
4909 -1, -1, 56, 147, 148, -1, -1, -1, -1, -1,
4910 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4911 -1, 75, 76, 77, 78, 79, 80, 81, 82, 83,
4912 -1, -1, 86, 87, -1, -1, -1, -1, 92, 93,
4913 94, 95, -1, -1, -1, -1, -1, -1, -1, -1,
4914 -1, -1, -1, 107, 108, -1, -1, -1, -1, -1,
4915 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4916 -1, -1, -1, -1, -1, 129, 130, 131, 132, 133,
4917 134, 135, 136, 137, 138, -1, 140, 141, 52, 53,
4918 -1, -1, 56, 147, 148, -1, -1, -1, -1, -1,
4919 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4920 -1, 75, 76, 77, 78, 79, 80, 81, 82, 83,
4921 -1, -1, 86, 87, -1, -1, -1, -1, 92, 93,
4922 94, 95, -1, -1, -1, -1, -1, -1, -1, -1,
4923 -1, -1, -1, 107, 108, -1, -1, -1, -1, -1,
4924 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4925 -1, -1, -1, -1, -1, 129, 130, 131, 132, 133,
4926 134, 135, 136, 137, 138, -1, 140, 141, -1, -1,
4927 -1, -1, -1, 147
4928};
4929
4930 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
4931 symbol of state STATE-NUM. */
4932static const yytype_int16 yystos[] =
4933{
4934 0, 155, 156, 0, 1, 3, 4, 5, 6, 7,
4935 11, 12, 16, 18, 19, 20, 21, 22, 23, 24,
4936 30, 31, 32, 33, 34, 35, 36, 39, 45, 46,
4937 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
4938 57, 59, 60, 61, 62, 63, 64, 65, 75, 76,
4939 90, 91, 98, 101, 102, 104, 105, 107, 110, 111,
4940 112, 113, 114, 115, 116, 117, 118, 139, 140, 141,
4941 157, 158, 159, 167, 169, 171, 179, 180, 182, 183,
4942 184, 186, 187, 188, 190, 191, 200, 203, 218, 233,
4943 234, 235, 236, 237, 238, 239, 240, 241, 242, 243,
4944 252, 279, 280, 333, 334, 335, 336, 337, 338, 339,
4945 342, 344, 345, 359, 360, 362, 363, 364, 365, 366,
4946 367, 368, 369, 405, 419, 159, 3, 4, 5, 6,
4947 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
4948 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
4949 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
4950 45, 46, 47, 48, 49, 50, 51, 52, 53, 56,
4951 75, 76, 77, 78, 79, 80, 81, 82, 83, 86,
4952 87, 92, 93, 94, 95, 107, 108, 129, 130, 131,
4953 132, 133, 134, 135, 136, 137, 138, 140, 141, 147,
4954 194, 195, 196, 198, 199, 359, 39, 58, 98, 101,
4955 107, 108, 109, 112, 140, 183, 191, 200, 204, 210,
4956 213, 215, 233, 365, 366, 368, 369, 403, 404, 210,
4957 148, 211, 212, 148, 207, 211, 148, 153, 412, 54,
4958 195, 412, 143, 160, 143, 21, 22, 31, 32, 182,
4959 200, 233, 252, 200, 200, 200, 56, 1, 47, 101,
4960 163, 164, 165, 167, 185, 186, 419, 167, 220, 205,
4961 215, 403, 419, 204, 402, 403, 419, 46, 98, 139,
4962 146, 190, 218, 233, 365, 366, 369, 223, 54, 55,
4963 57, 194, 348, 361, 348, 349, 350, 152, 152, 152,
4964 152, 364, 179, 200, 200, 151, 153, 411, 417, 418,
4965 40, 41, 42, 43, 44, 37, 38, 26, 143, 207,
4966 211, 244, 281, 28, 245, 278, 126, 146, 101, 107,
4967 187, 126, 25, 77, 78, 79, 80, 81, 82, 83,
4968 84, 85, 86, 87, 88, 89, 94, 95, 127, 129,
4969 130, 131, 132, 133, 134, 135, 136, 137, 138, 202,
4970 202, 68, 96, 97, 145, 409, 219, 171, 175, 175,
4971 176, 177, 176, 175, 411, 418, 98, 184, 191, 233,
4972 257, 365, 366, 369, 52, 56, 94, 98, 192, 193,
4973 233, 365, 366, 369, 193, 33, 34, 35, 36, 49,
4974 50, 51, 52, 56, 148, 194, 367, 400, 210, 97,
4975 409, 410, 281, 336, 99, 99, 146, 204, 56, 204,
4976 204, 204, 348, 126, 100, 146, 214, 419, 97, 145,
4977 409, 99, 99, 146, 214, 210, 412, 413, 210, 91,
4978 209, 210, 215, 377, 403, 419, 171, 413, 171, 54,
4979 64, 65, 168, 148, 201, 157, 163, 97, 409, 99,
4980 167, 166, 185, 149, 411, 418, 413, 221, 413, 150,
4981 146, 153, 416, 146, 416, 144, 416, 412, 56, 364,
4982 187, 189, 146, 97, 145, 409, 270, 271, 66, 119,
4983 121, 122, 351, 119, 119, 351, 67, 351, 340, 346,
4984 343, 347, 77, 151, 159, 175, 175, 175, 175, 167,
4985 171, 171, 282, 283, 106, 181, 286, 287, 286, 107,
4986 179, 204, 215, 216, 217, 185, 146, 190, 146, 169,
4987 170, 179, 191, 200, 204, 206, 217, 233, 369, 172,
4988 200, 200, 200, 200, 200, 200, 200, 200, 200, 200,
4989 200, 200, 200, 200, 200, 200, 200, 200, 200, 200,
4990 200, 200, 200, 200, 52, 53, 56, 198, 207, 406,
4991 407, 209, 215, 52, 53, 56, 198, 207, 406, 161,
4992 163, 13, 253, 417, 253, 163, 175, 163, 411, 225,
4993 56, 97, 145, 409, 25, 171, 52, 56, 192, 130,
4994 370, 97, 145, 409, 228, 401, 229, 68, 97, 408,
4995 52, 56, 406, 170, 200, 206, 170, 206, 197, 124,
4996 204, 107, 204, 213, 403, 52, 56, 209, 52, 56,
4997 404, 413, 149, 413, 146, 413, 146, 413, 195, 222,
4998 200, 144, 144, 406, 406, 206, 160, 413, 165, 413,
4999 403, 146, 189, 52, 56, 209, 52, 56, 272, 353,
5000 352, 119, 341, 351, 66, 119, 119, 341, 66, 119,
5001 200, 144, 284, 282, 10, 251, 288, 251, 204, 146,
5002 44, 413, 189, 146, 44, 126, 44, 97, 145, 409,
5003 173, 412, 99, 99, 207, 211, 412, 414, 146, 99,
5004 99, 207, 208, 211, 419, 251, 8, 246, 329, 419,
5005 163, 13, 163, 251, 27, 254, 417, 251, 25, 224,
5006 293, 17, 248, 291, 52, 56, 209, 52, 56, 176,
5007 227, 371, 226, 52, 56, 192, 209, 161, 171, 230,
5008 231, 208, 211, 195, 204, 204, 214, 99, 99, 414,
5009 99, 99, 377, 403, 171, 416, 187, 414, 273, 354,
5010 54, 55, 57, 358, 369, 152, 351, 152, 152, 152,
5011 285, 144, 289, 107, 204, 167, 189, 167, 200, 52,
5012 56, 209, 52, 56, 52, 56, 90, 91, 98, 101,
5013 104, 105, 110, 132, 303, 304, 305, 308, 323, 324,
5014 326, 327, 328, 333, 334, 337, 338, 339, 342, 344,
5015 345, 366, 128, 170, 206, 170, 206, 181, 150, 99,
5016 170, 206, 170, 206, 181, 204, 217, 330, 419, 9,
5017 15, 247, 249, 332, 419, 14, 249, 250, 255, 256,
5018 419, 256, 178, 294, 291, 251, 107, 204, 290, 251,
5019 414, 163, 417, 175, 161, 414, 251, 413, 148, 372,
5020 373, 194, 281, 278, 99, 413, 146, 413, 274, 355,
5021 131, 265, 266, 419, 265, 204, 414, 324, 324, 56,
5022 192, 311, 309, 414, 310, 412, 415, 325, 52, 100,
5023 174, 131, 88, 89, 97, 145, 148, 306, 307, 200,
5024 170, 206, 100, 331, 419, 163, 162, 163, 175, 251,
5025 251, 295, 251, 204, 146, 253, 251, 161, 417, 251,
5026 52, 54, 55, 56, 57, 58, 77, 91, 101, 107,
5027 108, 109, 133, 136, 374, 376, 377, 378, 379, 380,
5028 381, 382, 383, 384, 387, 388, 389, 390, 391, 394,
5029 395, 396, 397, 398, 161, 376, 382, 232, 148, 276,
5030 376, 356, 262, 264, 267, 380, 382, 383, 385, 386,
5031 389, 390, 392, 393, 396, 398, 412, 163, 161, 303,
5032 107, 303, 312, 313, 314, 316, 58, 112, 317, 318,
5033 319, 320, 321, 322, 388, 144, 270, 326, 308, 324,
5034 324, 192, 414, 413, 112, 312, 317, 312, 317, 98,
5035 191, 233, 365, 366, 369, 253, 163, 253, 296, 107,
5036 204, 163, 251, 101, 107, 258, 259, 260, 261, 379,
5037 413, 413, 126, 146, 375, 204, 146, 399, 419, 34,
5038 52, 146, 399, 399, 146, 375, 52, 146, 375, 52,
5039 251, 417, 146, 372, 376, 275, 357, 267, 131, 126,
5040 146, 263, 98, 233, 146, 399, 399, 399, 146, 263,
5041 146, 263, 151, 413, 52, 146, 414, 107, 303, 316,
5042 146, 348, 415, 146, 303, 34, 52, 348, 413, 413,
5043 414, 414, 56, 97, 145, 409, 163, 332, 163, 301,
5044 302, 303, 314, 317, 204, 256, 291, 292, 260, 379,
5045 146, 413, 146, 204, 374, 377, 381, 394, 396, 384,
5046 388, 390, 398, 382, 391, 396, 380, 382, 161, 267,
5047 29, 123, 277, 163, 131, 233, 262, 393, 396, 56,
5048 97, 385, 390, 382, 392, 396, 382, 52, 268, 269,
5049 378, 146, 315, 316, 52, 146, 146, 124, 319, 321,
5050 322, 52, 56, 209, 52, 56, 329, 255, 253, 40,
5051 41, 146, 413, 258, 261, 259, 413, 146, 375, 146,
5052 375, 399, 146, 375, 146, 375, 375, 251, 149, 161,
5053 163, 120, 146, 263, 146, 263, 52, 56, 399, 146,
5054 263, 146, 263, 263, 146, 412, 315, 146, 146, 315,
5055 414, 297, 175, 175, 312, 146, 146, 382, 396, 382,
5056 382, 251, 144, 382, 396, 382, 382, 269, 316, 315,
5057 298, 259, 375, 146, 375, 375, 375, 263, 146, 263,
5058 263, 263, 299, 382, 382, 163, 375, 263, 256, 293,
5059 300
5060};
5061
5062 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
5063static const yytype_int16 yyr1[] =
5064{
5065 0, 154, 156, 155, 157, 158, 158, 158, 158, 159,
5066 159, 160, 162, 161, 161, 163, 164, 164, 164, 164,
5067 165, 166, 165, 168, 167, 167, 167, 167, 167, 167,
5068 167, 167, 167, 167, 167, 167, 167, 167, 167, 167,
5069 167, 169, 169, 169, 169, 169, 169, 169, 169, 170,
5070 170, 170, 171, 171, 171, 171, 171, 172, 173, 174,
5071 171, 171, 175, 177, 178, 176, 179, 179, 180, 180,
5072 181, 182, 183, 183, 183, 183, 183, 183, 183, 183,
5073 183, 183, 183, 184, 184, 185, 185, 186, 186, 186,
5074 186, 186, 186, 186, 186, 186, 186, 187, 187, 188,
5075 188, 189, 189, 190, 190, 190, 190, 190, 190, 190,
5076 190, 190, 191, 191, 191, 191, 191, 191, 191, 191,
5077 191, 192, 192, 193, 193, 193, 194, 194, 194, 194,
5078 194, 195, 195, 196, 197, 196, 198, 198, 198, 198,
5079 198, 198, 198, 198, 198, 198, 198, 198, 198, 198,
5080 198, 198, 198, 198, 198, 198, 198, 198, 198, 198,
5081 198, 198, 198, 198, 198, 198, 199, 199, 199, 199,
5082 199, 199, 199, 199, 199, 199, 199, 199, 199, 199,
5083 199, 199, 199, 199, 199, 199, 199, 199, 199, 199,
5084 199, 199, 199, 199, 199, 199, 199, 199, 199, 199,
5085 199, 199, 199, 199, 199, 199, 199, 200, 200, 200,
5086 200, 200, 200, 200, 200, 200, 200, 200, 200, 200,
5087 200, 200, 200, 200, 200, 200, 200, 200, 200, 200,
5088 200, 200, 200, 200, 200, 200, 200, 200, 200, 200,
5089 200, 200, 200, 200, 200, 200, 200, 201, 200, 200,
5090 200, 202, 202, 202, 202, 203, 203, 204, 205, 205,
5091 205, 205, 206, 206, 207, 207, 207, 208, 208, 209,
5092 209, 209, 209, 209, 210, 210, 210, 210, 210, 212,
5093 211, 213, 214, 214, 215, 215, 215, 215, 216, 216,
5094 217, 217, 217, 218, 218, 218, 218, 218, 218, 218,
5095 218, 218, 218, 218, 219, 218, 220, 218, 221, 218,
5096 218, 218, 218, 218, 218, 218, 218, 218, 218, 222,
5097 218, 218, 218, 218, 218, 218, 223, 218, 218, 218,
5098 218, 218, 224, 218, 225, 218, 218, 218, 226, 218,
5099 227, 218, 228, 218, 229, 230, 218, 231, 232, 218,
5100 218, 218, 218, 218, 233, 234, 235, 236, 237, 238,
5101 239, 240, 241, 242, 243, 244, 245, 246, 247, 248,
5102 249, 250, 251, 252, 253, 253, 253, 254, 254, 255,
5103 255, 256, 256, 257, 257, 258, 258, 259, 259, 260,
5104 260, 260, 260, 260, 261, 261, 262, 262, 262, 262,
5105 262, 263, 263, 264, 264, 264, 264, 264, 264, 264,
5106 264, 264, 264, 264, 264, 264, 264, 264, 265, 265,
5107 266, 266, 267, 267, 268, 268, 269, 269, 271, 272,
5108 273, 274, 275, 270, 276, 276, 277, 277, 278, 279,
5109 279, 279, 279, 280, 280, 280, 280, 280, 280, 280,
5110 280, 280, 281, 281, 283, 284, 285, 282, 287, 288,
5111 289, 286, 290, 290, 290, 290, 291, 292, 292, 294,
5112 295, 296, 297, 298, 299, 293, 300, 300, 301, 301,
5113 301, 302, 302, 302, 302, 302, 303, 304, 304, 305,
5114 305, 306, 307, 308, 308, 308, 308, 308, 308, 308,
5115 309, 308, 308, 310, 308, 308, 311, 308, 312, 312,
5116 312, 312, 312, 312, 312, 312, 313, 313, 314, 314,
5117 314, 314, 315, 315, 316, 317, 317, 317, 317, 317,
5118 317, 318, 318, 319, 319, 320, 320, 321, 321, 322,
5119 323, 323, 323, 323, 323, 323, 323, 323, 323, 323,
5120 324, 324, 324, 324, 324, 324, 324, 324, 324, 325,
5121 324, 326, 327, 328, 328, 328, 329, 329, 330, 330,
5122 330, 331, 331, 332, 332, 333, 333, 334, 335, 335,
5123 335, 336, 337, 338, 339, 340, 340, 341, 341, 342,
5124 343, 343, 344, 345, 346, 346, 347, 347, 348, 348,
5125 349, 349, 350, 350, 351, 352, 351, 353, 354, 355,
5126 356, 357, 351, 358, 358, 358, 358, 359, 359, 360,
5127 361, 361, 361, 361, 362, 363, 363, 364, 364, 364,
5128 364, 365, 365, 365, 365, 365, 366, 366, 366, 366,
5129 366, 366, 366, 367, 367, 368, 368, 369, 369, 371,
5130 370, 370, 372, 372, 372, 373, 372, 374, 374, 374,
5131 374, 374, 375, 375, 376, 376, 376, 376, 376, 376,
5132 376, 376, 376, 376, 376, 376, 376, 376, 376, 377,
5133 378, 378, 378, 378, 379, 379, 380, 381, 381, 382,
5134 382, 383, 384, 384, 385, 385, 386, 386, 387, 387,
5135 388, 388, 389, 390, 390, 391, 392, 393, 393, 394,
5136 394, 395, 395, 396, 396, 397, 397, 398, 399, 399,
5137 400, 401, 400, 402, 402, 403, 403, 404, 404, 404,
5138 404, 405, 405, 405, 406, 406, 406, 406, 407, 407,
5139 407, 408, 408, 409, 409, 410, 410, 411, 411, 412,
5140 412, 413, 414, 415, 416, 416, 416, 417, 417, 418,
5141 418, 419
5142};
5143
5144 /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */
5145static const yytype_int8 yyr2[] =
5146{
5147 0, 2, 0, 2, 2, 1, 1, 3, 2, 1,
5148 2, 3, 0, 6, 3, 2, 1, 1, 3, 2,
5149 1, 0, 3, 0, 4, 3, 3, 3, 2, 3,
5150 3, 3, 3, 3, 4, 1, 3, 3, 5, 3,
5151 1, 3, 3, 6, 5, 5, 5, 5, 3, 1,
5152 3, 1, 1, 3, 3, 3, 2, 0, 0, 0,
5153 6, 1, 1, 0, 0, 4, 1, 1, 1, 4,
5154 3, 1, 2, 3, 4, 5, 4, 5, 2, 2,
5155 2, 2, 2, 1, 3, 1, 3, 1, 2, 3,
5156 5, 2, 4, 2, 4, 1, 3, 1, 3, 2,
5157 3, 1, 3, 1, 1, 4, 3, 3, 3, 3,
5158 2, 1, 1, 1, 4, 3, 3, 3, 3, 2,
5159 1, 1, 1, 2, 1, 3, 1, 1, 1, 1,
5160 1, 1, 1, 1, 0, 4, 1, 1, 1, 1,
5161 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
5162 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
5163 1, 1, 1, 1, 1, 1, 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, 3, 3, 6,
5168 5, 5, 5, 5, 4, 3, 3, 3, 2, 2,
5169 2, 2, 3, 3, 3, 3, 3, 3, 4, 2,
5170 2, 3, 3, 3, 3, 1, 3, 3, 3, 3,
5171 3, 2, 2, 3, 3, 3, 3, 0, 4, 6,
5172 1, 1, 1, 1, 1, 3, 3, 1, 1, 2,
5173 4, 2, 1, 3, 3, 5, 3, 1, 1, 1,
5174 1, 2, 4, 2, 1, 2, 2, 4, 1, 0,
5175 2, 2, 2, 1, 1, 2, 3, 4, 1, 1,
5176 3, 4, 2, 1, 1, 1, 1, 1, 1, 1,
5177 1, 1, 1, 1, 0, 4, 0, 3, 0, 4,
5178 3, 3, 2, 3, 3, 1, 4, 3, 1, 0,
5179 6, 4, 3, 2, 1, 2, 0, 3, 6, 6,
5180 4, 4, 0, 6, 0, 5, 5, 6, 0, 6,
5181 0, 7, 0, 5, 0, 0, 7, 0, 0, 9,
5182 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
5183 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
5184 1, 1, 1, 1, 1, 1, 2, 1, 1, 1,
5185 5, 1, 2, 1, 1, 1, 3, 1, 3, 1,
5186 3, 5, 1, 3, 2, 1, 4, 2, 2, 2,
5187 1, 2, 0, 6, 8, 4, 6, 4, 2, 6,
5188 2, 4, 6, 2, 4, 2, 4, 1, 1, 1,
5189 3, 4, 1, 4, 1, 3, 1, 1, 0, 0,
5190 0, 0, 0, 7, 4, 1, 3, 3, 3, 2,
5191 4, 5, 5, 2, 4, 4, 3, 3, 3, 2,
5192 1, 4, 3, 3, 0, 0, 0, 5, 0, 0,
5193 0, 5, 1, 2, 3, 4, 5, 1, 1, 0,
5194 0, 0, 0, 0, 0, 11, 1, 1, 1, 3,
5195 3, 1, 2, 3, 1, 1, 1, 3, 1, 3,
5196 1, 1, 1, 1, 4, 4, 3, 4, 4, 3,
5197 0, 4, 2, 0, 4, 2, 0, 4, 1, 1,
5198 2, 3, 5, 2, 4, 1, 2, 3, 2, 4,
5199 1, 3, 1, 3, 1, 3, 1, 2, 1, 3,
5200 1, 1, 3, 2, 1, 1, 3, 2, 1, 2,
5201 1, 3, 3, 2, 2, 1, 1, 1, 2, 2,
5202 1, 1, 1, 1, 1, 1, 1, 1, 1, 0,
5203 3, 1, 2, 2, 3, 1, 6, 1, 1, 1,
5204 1, 2, 1, 2, 1, 1, 1, 1, 1, 1,
5205 2, 3, 3, 3, 4, 0, 3, 1, 2, 4,
5206 0, 3, 4, 4, 0, 3, 0, 3, 0, 2,
5207 0, 2, 0, 2, 1, 0, 3, 0, 0, 0,
5208 0, 0, 8, 1, 1, 1, 1, 1, 1, 2,
5209 1, 1, 1, 1, 3, 1, 2, 1, 1, 1,
5210 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
5211 1, 1, 1, 1, 1, 1, 1, 1, 1, 0,
5212 4, 0, 3, 5, 3, 0, 3, 4, 2, 2,
5213 2, 1, 2, 0, 6, 8, 4, 6, 4, 6,
5214 2, 4, 6, 2, 4, 2, 4, 1, 0, 1,
5215 1, 1, 1, 1, 1, 1, 1, 1, 3, 1,
5216 3, 1, 2, 1, 2, 1, 1, 3, 1, 3,
5217 1, 1, 2, 2, 1, 3, 3, 1, 3, 1,
5218 3, 1, 1, 2, 1, 1, 1, 2, 2, 1,
5219 1, 0, 4, 1, 2, 1, 3, 3, 2, 4,
5220 2, 1, 1, 1, 1, 1, 1, 1, 1, 1,
5221 1, 1, 1, 1, 1, 1, 1, 0, 1, 0,
5222 1, 2, 2, 2, 0, 1, 1, 1, 1, 1,
5223 2, 0
5224};
5225
5226
5227#define yyerrok (yyerrstatus = 0)
5228#define yyclearin (yychar = YYEMPTY)
5229#define YYEMPTY (-2)
5230#define YYEOF 0
5231
5232#define YYACCEPT goto yyacceptlab
5233#define YYABORT goto yyabortlab
5234#define YYERROR goto yyerrorlab
5235
5236
5237#define YYRECOVERING() (!!yyerrstatus)
5238
5239#define YYBACKUP(Token, Value) \
5240 do \
5241 if (yychar == YYEMPTY) \
5242 { \
5243 yychar = (Token); \
5244 yylval = (Value); \
5245 YYPOPSTACK (yylen); \
5246 yystate = *yyssp; \
5247 goto yybackup; \
5248 } \
5249 else \
5250 { \
5251 yyerror (&yylloc, p, YY_("syntax error: cannot back up")); \
5252 YYERROR; \
5253 } \
5254 while (0)
5255
5256/* Error token number */
5257#define YYTERROR 1
5258#define YYERRCODE 256
5259
5260
5261/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
5262 If N is 0, then set CURRENT to the empty location which ends
5263 the previous symbol: RHS[0] (always defined). */
5264
5265#ifndef YYLLOC_DEFAULT
5266# define YYLLOC_DEFAULT(Current, Rhs, N) \
5267 do \
5268 if (N) \
5269 { \
5270 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
5271 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
5272 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
5273 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
5274 } \
5275 else \
5276 { \
5277 (Current).first_line = (Current).last_line = \
5278 YYRHSLOC (Rhs, 0).last_line; \
5279 (Current).first_column = (Current).last_column = \
5280 YYRHSLOC (Rhs, 0).last_column; \
5281 } \
5282 while (0)
5283#endif
5284
5285#define YYRHSLOC(Rhs, K) ((Rhs)[K])
5286
5287
5288/* Enable debugging if requested. */
5289#if YYDEBUG
5290
5291# ifndef YYFPRINTF
5292# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
5293# define YYFPRINTF fprintf
5294# endif
5295
5296# define YYDPRINTF(Args) \
5297do { \
5298 if (yydebug) \
5299 YYFPRINTF Args; \
5300} while (0)
5301
5302
5303/* YY_LOCATION_PRINT -- Print the location on the stream.
5304 This macro was not mandated originally: define only if we know
5305 we won't break user code: when these are the locations we know. */
5306
5307#ifndef YY_LOCATION_PRINT
5308# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
5309
5310/* Print *YYLOCP on YYO. Private, do not rely on its existence. */
5311
5313static int
5314yy_location_print_ (FILE *yyo, YYLTYPE const * const yylocp)
5315{
5316 int res = 0;
5317 int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0;
5318 if (0 <= yylocp->first_line)
5319 {
5320 res += YYFPRINTF (p, "%d", yylocp->first_line);
5321 if (0 <= yylocp->first_column)
5322 res += YYFPRINTF (p, ".%d", yylocp->first_column);
5323 }
5324 if (0 <= yylocp->last_line)
5325 {
5326 if (yylocp->first_line < yylocp->last_line)
5327 {
5328 res += YYFPRINTF (p, "-%d", yylocp->last_line);
5329 if (0 <= end_col)
5330 res += YYFPRINTF (p, ".%d", end_col);
5331 }
5332 else if (0 <= end_col && yylocp->first_column < end_col)
5333 res += YYFPRINTF (p, "-%d", end_col);
5334 }
5335 return res;
5336 }
5337
5338# define YY_LOCATION_PRINT(File, Loc) \
5339 yy_location_print_ (File, &(Loc))
5340
5341# else
5342# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
5343# endif
5344#endif
5345
5346
5347# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
5348do { \
5349 if (yydebug) \
5350 { \
5351 YYFPRINTF (p, "%s ", Title); \
5352 yy_symbol_print (stderr, \
5353 Type, Value, Location, p); \
5354 YYFPRINTF (p, "\n"); \
5355 } \
5356} while (0)
5357
5358
5359/*-----------------------------------.
5360| Print this symbol's value on YYO. |
5361`-----------------------------------*/
5362
5363static void
5364yy_symbol_value_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, struct parser_params *p)
5365{
5366 FILE *yyoutput = yyo;
5367 YYUSE (yyoutput);
5368 YYUSE (yylocationp);
5369 YYUSE (p);
5370 if (!yyvaluep)
5371 return;
5372# ifdef YYPRINT
5373 if (yytype < YYNTOKENS)
5374 YYPRINT (yyo, yytoknum[yytype], *yyvaluep);
5375# endif
5377 YYUSE (yytype);
5379}
5380
5381
5382/*---------------------------.
5383| Print this symbol on YYO. |
5384`---------------------------*/
5385
5386static void
5387yy_symbol_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, struct parser_params *p)
5388{
5389 YYFPRINTF (p, "%s %s (",
5390 yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]);
5391
5392 YY_LOCATION_PRINT (yyo, *yylocationp);
5393 YYFPRINTF (p, ": ");
5394 yy_symbol_value_print (yyo, yytype, yyvaluep, yylocationp, p);
5395 YYFPRINTF (p, ")");
5396}
5397
5398/*------------------------------------------------------------------.
5399| yy_stack_print -- Print the state stack from its BOTTOM up to its |
5400| TOP (included). |
5401`------------------------------------------------------------------*/
5402
5403static void
5404ruby_parser_yy_stack_print (yy_state_t *yybottom, yy_state_t *yytop, struct parser_params *p)
5405#define yy_stack_print(b, t) ruby_parser_yy_stack_print(b, t, p)
5406{
5407 YYFPRINTF (p, "Stack now");
5408 for (; yybottom <= yytop; yybottom++)
5409 {
5410 int yybot = *yybottom;
5411 YYFPRINTF (p, " %d", yybot);
5412 }
5413 YYFPRINTF (p, "\n");
5414}
5415
5416# define YY_STACK_PRINT(Bottom, Top) \
5417do { \
5418 if (yydebug) \
5419 yy_stack_print ((Bottom), (Top)); \
5420} while (0)
5421
5422
5423/*------------------------------------------------.
5424| Report that the YYRULE is going to be reduced. |
5425`------------------------------------------------*/
5426
5427static void
5428yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule, struct parser_params *p)
5429{
5430 int yylno = yyrline[yyrule];
5431 int yynrhs = yyr2[yyrule];
5432 int yyi;
5433 YYFPRINTF (p, "Reducing stack by rule %d (line %d):\n",
5434 yyrule - 1, yylno);
5435 /* The symbols being reduced. */
5436 for (yyi = 0; yyi < yynrhs; yyi++)
5437 {
5438 YYFPRINTF (p, " $%d = ", yyi + 1);
5439 yy_symbol_print (stderr,
5440 yystos[+yyssp[yyi + 1 - yynrhs]],
5441 &yyvsp[(yyi + 1) - (yynrhs)]
5442 , &(yylsp[(yyi + 1) - (yynrhs)]) , p);
5443 YYFPRINTF (p, "\n");
5444 }
5445}
5446
5447# define YY_REDUCE_PRINT(Rule) \
5448do { \
5449 if (yydebug) \
5450 yy_reduce_print (yyssp, yyvsp, yylsp, Rule, p); \
5451} while (0)
5452
5453/* Nonzero means print parse trace. It is left uninitialized so that
5454 multiple parsers can coexist. */
5455#ifndef yydebug
5456int yydebug;
5457#endif
5458#else /* !YYDEBUG */
5459# define YYDPRINTF(Args)
5460# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
5461# define YY_STACK_PRINT(Bottom, Top)
5462# define YY_REDUCE_PRINT(Rule)
5463#endif /* !YYDEBUG */
5464
5465
5466/* YYINITDEPTH -- initial size of the parser's stacks. */
5467#ifndef YYINITDEPTH
5468# define YYINITDEPTH 200
5469#endif
5470
5471/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
5472 if the built-in stack extension method is used).
5473
5474 Do not make this value too large; the results are undefined if
5475 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
5476 evaluated with infinite-precision integer arithmetic. */
5477
5478#ifndef YYMAXDEPTH
5479# define YYMAXDEPTH 10000
5480#endif
5481
5482
5483#if YYERROR_VERBOSE
5484
5485# ifndef yystrlen
5486# if defined __GLIBC__ && defined _STRING_H
5487# define yystrlen(S) (YY_CAST (YYPTRDIFF_T, strlen (S)))
5488# else
5489/* Return the length of YYSTR. */
5490static YYPTRDIFF_T
5491yystrlen (const char *yystr)
5492{
5493 YYPTRDIFF_T yylen;
5494 for (yylen = 0; yystr[yylen]; yylen++)
5495 continue;
5496 return yylen;
5497}
5498# endif
5499# endif
5500
5501# ifndef yystpcpy
5502# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
5503# define yystpcpy stpcpy
5504# else
5505/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
5506 YYDEST. */
5507static char *
5508yystpcpy (char *yydest, const char *yysrc)
5509{
5510 char *yyd = yydest;
5511 const char *yys = yysrc;
5512
5513 while ((*yyd++ = *yys++) != '\0')
5514 continue;
5515
5516 return yyd - 1;
5517}
5518# endif
5519# endif
5520
5521# ifndef yytnamerr
5522/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
5523 quotes and backslashes, so that it's suitable for yyerror. The
5524 heuristic is that double-quoting is unnecessary unless the string
5525 contains an apostrophe, a comma, or backslash (other than
5526 backslash-backslash). YYSTR is taken from yytname. If YYRES is
5527 null, do not copy; instead, return the length of what the result
5528 would have been. */
5529static YYPTRDIFF_T
5530yytnamerr (char *yyres, const char *yystr)
5531{
5532 if (*yystr == '"')
5533 {
5534 YYPTRDIFF_T yyn = 0;
5535 char const *yyp = yystr;
5536
5537 for (;;)
5538 switch (*++yyp)
5539 {
5540 case '\'':
5541 case ',':
5542 goto do_not_strip_quotes;
5543
5544 case '\\':
5545 if (*++yyp != '\\')
5546 goto do_not_strip_quotes;
5547 else
5548 goto append;
5549
5550 append:
5551 default:
5552 if (yyres)
5553 yyres[yyn] = *yyp;
5554 yyn++;
5555 break;
5556
5557 case '"':
5558 if (yyres)
5559 yyres[yyn] = '\0';
5560 return yyn;
5561 }
5562 do_not_strip_quotes: ;
5563 }
5564
5565 if (yyres)
5566 return yystpcpy (yyres, yystr) - yyres;
5567 else
5568 return yystrlen (yystr);
5569}
5570# endif
5571
5572/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
5573 about the unexpected token YYTOKEN for the state stack whose top is
5574 YYSSP.
5575
5576 Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is
5577 not large enough to hold the message. In that case, also set
5578 *YYMSG_ALLOC to the required number of bytes. Return 2 if the
5579 required number of bytes is too large to store. */
5580static int
5581yysyntax_error (struct parser_params *p, YYPTRDIFF_T *yymsg_alloc, char **yymsg,
5582 yy_state_t *yyssp, int yytoken)
5583{
5584 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
5585 /* Internationalized format string. */
5586 const char *yyformat = YY_NULLPTR;
5587 /* Arguments of yyformat: reported tokens (one for the "unexpected",
5588 one per "expected"). */
5589 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
5590 /* Actual size of YYARG. */
5591 int yycount = 0;
5592 /* Cumulated lengths of YYARG. */
5593 YYPTRDIFF_T yysize = 0;
5594
5595 /* There are many possibilities here to consider:
5596 - If this state is a consistent state with a default action, then
5597 the only way this function was invoked is if the default action
5598 is an error action. In that case, don't check for expected
5599 tokens because there are none.
5600 - The only way there can be no lookahead present (in yychar) is if
5601 this state is a consistent state with a default action. Thus,
5602 detecting the absence of a lookahead is sufficient to determine
5603 that there is no unexpected or expected token to report. In that
5604 case, just report a simple "syntax error".
5605 - Don't assume there isn't a lookahead just because this state is a
5606 consistent state with a default action. There might have been a
5607 previous inconsistent state, consistent state with a non-default
5608 action, or user semantic action that manipulated yychar.
5609 - Of course, the expected token list depends on states to have
5610 correct lookahead information, and it depends on the parser not
5611 to perform extra reductions after fetching a lookahead from the
5612 scanner and before detecting a syntax error. Thus, state merging
5613 (from LALR or IELR) and default reductions corrupt the expected
5614 token list. However, the list is correct for canonical LR with
5615 one exception: it will still contain any token that will not be
5616 accepted due to an error action in a later state.
5617 */
5618 if (yytoken != YYEMPTY)
5619 {
5620 int yyn = yypact[+*yyssp];
5621 YYPTRDIFF_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]);
5622 yysize = yysize0;
5623 yyarg[yycount++] = yytname[yytoken];
5624 if (!yypact_value_is_default (yyn))
5625 {
5626 /* Start YYX at -YYN if negative to avoid negative indexes in
5627 YYCHECK. In other words, skip the first -YYN actions for
5628 this state because they are default actions. */
5629 int yyxbegin = yyn < 0 ? -yyn : 0;
5630 /* Stay within bounds of both yycheck and yytname. */
5631 int yychecklim = YYLAST - yyn + 1;
5632 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
5633 int yyx;
5634
5635 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
5636 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
5637 && !yytable_value_is_error (yytable[yyx + yyn]))
5638 {
5639 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
5640 {
5641 yycount = 1;
5642 yysize = yysize0;
5643 break;
5644 }
5645 yyarg[yycount++] = yytname[yyx];
5646 {
5647 YYPTRDIFF_T yysize1
5648 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]);
5649 if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)
5650 yysize = yysize1;
5651 else
5652 return 2;
5653 }
5654 }
5655 }
5656 }
5657
5658 switch (yycount)
5659 {
5660# define YYCASE_(N, S) \
5661 case N: \
5662 yyformat = S; \
5663 break
5664 default: /* Avoid compiler warnings. */
5665 YYCASE_(0, YY_("syntax error"));
5666 YYCASE_(1, YY_("syntax error, unexpected %s"));
5667 YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
5668 YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
5669 YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
5670 YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
5671# undef YYCASE_
5672 }
5673
5674 {
5675 /* Don't count the "%s"s in the final size, but reserve room for
5676 the terminator. */
5677 YYPTRDIFF_T yysize1 = yysize + (yystrlen (yyformat) - 2 * yycount) + 1;
5678 if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)
5679 yysize = yysize1;
5680 else
5681 return 2;
5682 }
5683
5684 if (*yymsg_alloc < yysize)
5685 {
5686 *yymsg_alloc = 2 * yysize;
5687 if (! (yysize <= *yymsg_alloc
5688 && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
5689 *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
5690 return 1;
5691 }
5692
5693 /* Avoid sprintf, as that infringes on the user's name space.
5694 Don't have undefined behavior even if the translation
5695 produced a string with the wrong number of "%s"s. */
5696 {
5697 char *yyp = *yymsg;
5698 int yyi = 0;
5699 while ((*yyp = *yyformat) != '\0')
5700 if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
5701 {
5702 yyp += yytnamerr (yyp, yyarg[yyi++]);
5703 yyformat += 2;
5704 }
5705 else
5706 {
5707 ++yyp;
5708 ++yyformat;
5709 }
5710 }
5711 return 0;
5712}
5713#endif /* YYERROR_VERBOSE */
5714
5715/*-----------------------------------------------.
5716| Release the memory associated to this symbol. |
5717`-----------------------------------------------*/
5718
5719static void
5720yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, struct parser_params *p)
5721{
5722 YYUSE (yyvaluep);
5723 YYUSE (yylocationp);
5724 YYUSE (p);
5725 if (!yymsg)
5726 yymsg = "Deleting";
5727 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
5728
5730 YYUSE (yytype);
5732}
5733
5734
5735
5736
5737/*----------.
5738| yyparse. |
5739`----------*/
5740
5741int
5743{
5744/* The lookahead symbol. */
5745int yychar;
5746
5747
5748/* The semantic value of the lookahead symbol. */
5749/* Default value used for initialization, for pacifying older GCCs
5750 or non-GCC compilers. */
5751YY_INITIAL_VALUE (static YYSTYPE yyval_default;)
5752YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
5753
5754/* Location data for the lookahead symbol. */
5755static YYLTYPE yyloc_default
5756# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
5757 = { 1, 1, 1, 1 }
5758# endif
5759;
5760YYLTYPE yylloc = yyloc_default;
5761
5762 /* Number of syntax errors so far. */
5763 int yynerrs;
5764
5765 yy_state_fast_t yystate;
5766 /* Number of tokens to shift before error messages enabled. */
5767 int yyerrstatus;
5768
5769 /* The stacks and their tools:
5770 'yyss': related to states.
5771 'yyvs': related to semantic values.
5772 'yyls': related to locations.
5773
5774 Refer to the stacks through separate pointers, to allow yyoverflow
5775 to reallocate them elsewhere. */
5776
5777 /* The state stack. */
5778 yy_state_t yyssa[YYINITDEPTH];
5779 yy_state_t *yyss;
5780 yy_state_t *yyssp;
5781
5782 /* The semantic value stack. */
5783 YYSTYPE yyvsa[YYINITDEPTH];
5784 YYSTYPE *yyvs;
5785 YYSTYPE *yyvsp;
5786
5787 /* The location stack. */
5788 YYLTYPE yylsa[YYINITDEPTH];
5789 YYLTYPE *yyls;
5790 YYLTYPE *yylsp;
5791
5792 /* The locations where the error started and ended. */
5793 YYLTYPE yyerror_range[3];
5794
5795 YYPTRDIFF_T yystacksize;
5796
5797 int yyn;
5798 int yyresult;
5799 /* Lookahead token as an internal (translated) token number. */
5800 int yytoken = 0;
5801 /* The variables used to return semantic value and location from the
5802 action routines. */
5803 YYSTYPE yyval;
5804 YYLTYPE yyloc;
5805
5806#if YYERROR_VERBOSE
5807 /* Buffer for error messages, and its allocated size. */
5808 char yymsgbuf[128];
5809 char *yymsg = yymsgbuf;
5810 YYPTRDIFF_T yymsg_alloc = sizeof yymsgbuf;
5811#endif
5812
5813#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N))
5814
5815 /* The number of symbols on the RHS of the reduced rule.
5816 Keep to zero when no symbol should be popped. */
5817 int yylen = 0;
5818
5819 yyssp = yyss = yyssa;
5820 yyvsp = yyvs = yyvsa;
5821 yylsp = yyls = yylsa;
5822 yystacksize = YYINITDEPTH;
5823
5824 YYDPRINTF ((p, "Starting parse\n"));
5825
5826 yystate = 0;
5827 yyerrstatus = 0;
5828 yynerrs = 0;
5829 yychar = YYEMPTY; /* Cause a token to be read. */
5830
5831/* User initialization code. */
5832#line 975 "ripper.y"
5833{
5835}
5836
5837#line 5833 "ripper.c"
5838
5839 yylsp[0] = yylloc;
5840 goto yysetstate;
5841
5842
5843/*------------------------------------------------------------.
5844| yynewstate -- push a new state, which is found in yystate. |
5845`------------------------------------------------------------*/
5846yynewstate:
5847 /* In all cases, when you get here, the value and location stacks
5848 have just been pushed. So pushing a state here evens the stacks. */
5849 yyssp++;
5850
5851
5852/*--------------------------------------------------------------------.
5853| yysetstate -- set current state (the top of the stack) to yystate. |
5854`--------------------------------------------------------------------*/
5855yysetstate:
5856 YYDPRINTF ((p, "Entering state %d\n", yystate));
5857 YY_ASSERT (0 <= yystate && yystate < YYNSTATES);
5859 *yyssp = YY_CAST (yy_state_t, yystate);
5861
5862 if (yyss + yystacksize - 1 <= yyssp)
5863#if !defined yyoverflow && !defined YYSTACK_RELOCATE
5864 goto yyexhaustedlab;
5865#else
5866 {
5867 /* Get the current used size of the three stacks, in elements. */
5868 YYPTRDIFF_T yysize = yyssp - yyss + 1;
5869
5870# if defined yyoverflow
5871 {
5872 /* Give user a chance to reallocate the stack. Use copies of
5873 these so that the &'s don't force the real ones into
5874 memory. */
5875 yy_state_t *yyss1 = yyss;
5876 YYSTYPE *yyvs1 = yyvs;
5877 YYLTYPE *yyls1 = yyls;
5878
5879 /* Each stack pointer address is followed by the size of the
5880 data in use in that stack, in bytes. This used to be a
5881 conditional around just the two extra args, but that might
5882 be undefined if yyoverflow is a macro. */
5883 yyoverflow (YY_("memory exhausted"),
5884 &yyss1, yysize * YYSIZEOF (*yyssp),
5885 &yyvs1, yysize * YYSIZEOF (*yyvsp),
5886 &yyls1, yysize * YYSIZEOF (*yylsp),
5887 &yystacksize);
5888 yyss = yyss1;
5889 yyvs = yyvs1;
5890 yyls = yyls1;
5891 }
5892# else /* defined YYSTACK_RELOCATE */
5893 /* Extend the stack our own way. */
5894 if (YYMAXDEPTH <= yystacksize)
5895 goto yyexhaustedlab;
5896 yystacksize *= 2;
5897 if (YYMAXDEPTH < yystacksize)
5898 yystacksize = YYMAXDEPTH;
5899
5900 {
5901 yy_state_t *yyss1 = yyss;
5902 union yyalloc *yyptr =
5903 YY_CAST (union yyalloc *,
5904 YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize))));
5905 if (! yyptr)
5906 goto yyexhaustedlab;
5910# undef YYSTACK_RELOCATE
5911 if (yyss1 != yyssa)
5912 YYSTACK_FREE (yyss1);
5913 }
5914# endif
5915
5916 yyssp = yyss + yysize - 1;
5917 yyvsp = yyvs + yysize - 1;
5918 yylsp = yyls + yysize - 1;
5919
5921 YYDPRINTF ((p, "Stack size increased to %ld\n",
5922 YY_CAST (long, yystacksize)));
5924
5925 if (yyss + yystacksize - 1 <= yyssp)
5926 YYABORT;
5927 }
5928#endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */
5929
5930 if (yystate == YYFINAL)
5931 YYACCEPT;
5932
5933 goto yybackup;
5934
5935
5936/*-----------.
5937| yybackup. |
5938`-----------*/
5939yybackup:
5940 /* Do appropriate processing given the current state. Read a
5941 lookahead token if we need one and don't already have one. */
5942
5943 /* First try to decide what to do without reference to lookahead token. */
5944 yyn = yypact[yystate];
5945 if (yypact_value_is_default (yyn))
5946 goto yydefault;
5947
5948 /* Not known => get a lookahead token if don't already have one. */
5949
5950 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
5951 if (yychar == YYEMPTY)
5952 {
5953 YYDPRINTF ((p, "Reading a token: "));
5954 yychar = yylex (&yylval, &yylloc, p);
5955 }
5956
5957 if (yychar <= YYEOF)
5958 {
5959 yychar = yytoken = YYEOF;
5960 YYDPRINTF ((p, "Now at end of input.\n"));
5961 }
5962 else
5963 {
5964 yytoken = YYTRANSLATE (yychar);
5965 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
5966 }
5967
5968 /* If the proper action on seeing token YYTOKEN is to reduce or to
5969 detect an error, take that action. */
5970 yyn += yytoken;
5971 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
5972 goto yydefault;
5973 yyn = yytable[yyn];
5974 if (yyn <= 0)
5975 {
5976 if (yytable_value_is_error (yyn))
5977 goto yyerrlab;
5978 yyn = -yyn;
5979 goto yyreduce;
5980 }
5981
5982 /* Count tokens shifted since error; after three, turn off error
5983 status. */
5984 if (yyerrstatus)
5985 yyerrstatus--;
5986
5987 /* Shift the lookahead token. */
5988 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
5989 yystate = yyn;
5991 *++yyvsp = yylval;
5993 *++yylsp = yylloc;
5994
5995 /* Discard the shifted token. */
5996 yychar = YYEMPTY;
5997 goto yynewstate;
5998
5999
6000/*-----------------------------------------------------------.
6001| yydefault -- do the default action for the current state. |
6002`-----------------------------------------------------------*/
6003yydefault:
6004 yyn = yydefact[yystate];
6005 if (yyn == 0)
6006 goto yyerrlab;
6007 goto yyreduce;
6008
6009
6010/*-----------------------------.
6011| yyreduce -- do a reduction. |
6012`-----------------------------*/
6013yyreduce:
6014 /* yyn is the number of a rule to reduce with. */
6015 yylen = yyr2[yyn];
6016
6017 /* If YYLEN is nonzero, implement the default value of the action:
6018 '$$ = $1'.
6019
6020 Otherwise, the following line sets YYVAL to garbage.
6021 This behavior is undocumented and Bison
6022 users should not rely upon it. Assigning to YYVAL
6023 unconditionally makes the parser a bit smaller, and it avoids a
6024 GCC warning that YYVAL may be used uninitialized. */
6025 yyval = yyvsp[1-yylen];
6026
6027 /* Default location. */
6028 YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
6029 yyerror_range[1] = yyloc;
6030 YY_REDUCE_PRINT (yyn);
6031 switch (yyn)
6032 {
6033 case 2:
6034#line 1177 "ripper.y"
6035 {
6036 SET_LEX_STATE(EXPR_BEG);
6037 local_push(p, ifndef_ripper(1)+0);
6038 }
6039#line 6035 "ripper.c"
6040 break;
6041
6042 case 3:
6043#line 1182 "ripper.y"
6044 {
6045#if 0
6046 if ((yyvsp[0].val) && !compile_for_eval) {
6047 NODE *node = (yyvsp[0].val);
6048 /* last expression should not be void */
6049 if (nd_type(node) == NODE_BLOCK) {
6050 while (node->nd_next) {
6051 node = node->nd_next;
6052 }
6053 node = node->nd_head;
6054 }
6055 node = remove_begin(node);
6056 void_expr(p, node);
6057 }
6058 p->eval_tree = NEW_SCOPE(0, block_append(p, p->eval_tree, (yyvsp[0].val)), &(yyloc));
6059#endif
6060 {VALUE v1,v2;v1=(yyvsp[0].val);v2=dispatch1(program,v1);p->result=v2;}
6061 local_pop(p);
6062 }
6063#line 6059 "ripper.c"
6064 break;
6065
6066 case 4:
6067#line 1204 "ripper.y"
6068 {
6069 (yyval.val) = void_stmts(p, (yyvsp[-1].val));
6070 }
6071#line 6067 "ripper.c"
6072 break;
6073
6074 case 5:
6075#line 1210 "ripper.y"
6076 {
6077#if 0
6078 (yyval.val) = NEW_BEGIN(0, &(yyloc));
6079#endif
6080 {VALUE v1,v2,v3,v4,v5;v1=dispatch0(stmts_new);v2=dispatch0(void_stmt);v3=v1;v4=v2;v5=dispatch2(stmts_add,v3,v4);(yyval.val)=v5;}
6081 }
6082#line 6078 "ripper.c"
6083 break;
6084
6085 case 6:
6086#line 1217 "ripper.y"
6087 {
6088#if 0
6089 (yyval.val) = newline_node((yyvsp[0].val));
6090#endif
6091 {VALUE v1,v2,v3,v4;v1=dispatch0(stmts_new);v2=v1;v3=(yyvsp[0].val);v4=dispatch2(stmts_add,v2,v3);(yyval.val)=v4;}
6092 }
6093#line 6089 "ripper.c"
6094 break;
6095
6096 case 7:
6097#line 1224 "ripper.y"
6098 {
6099#if 0
6100 (yyval.val) = block_append(p, (yyvsp[-2].val), newline_node((yyvsp[0].val)));
6101#endif
6102 {VALUE v1,v2,v3;v1=(yyvsp[-2].val);v2=(yyvsp[0].val);v3=dispatch2(stmts_add,v1,v2);(yyval.val)=v3;}
6103 }
6104#line 6100 "ripper.c"
6105 break;
6106
6107 case 8:
6108#line 1231 "ripper.y"
6109 {
6110 (yyval.val) = remove_begin((yyvsp[0].val));
6111 }
6112#line 6108 "ripper.c"
6113 break;
6114
6115 case 10:
6116#line 1238 "ripper.y"
6117 {
6118 (yyval.val) = (yyvsp[0].val);
6119 }
6120#line 6116 "ripper.c"
6121 break;
6122
6123 case 11:
6124#line 1244 "ripper.y"
6125 {
6126#if 0
6127 p->eval_tree_begin = block_append(p, p->eval_tree_begin,
6128 NEW_BEGIN((yyvsp[-1].val), &(yyloc)));
6129 (yyval.val) = NEW_BEGIN(0, &(yyloc));
6130#endif
6131 {VALUE v1,v2;v1=(yyvsp[-1].val);v2=dispatch1(BEGIN,v1);(yyval.val)=v2;}
6132 }
6133#line 6129 "ripper.c"
6134 break;
6135
6136 case 12:
6137#line 1256 "ripper.y"
6138 {if (!(yyvsp[-1].val)) {yyerror1(&(yylsp[0]), "else without rescue is useless");}}
6139#line 6135 "ripper.c"
6140 break;
6141
6142 case 13:
6143#line 1259 "ripper.y"
6144 {
6145#if 0
6146 (yyval.val) = new_bodystmt(p, (yyvsp[-5].val), (yyvsp[-4].val), (yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
6147#endif
6148 {VALUE v1,v2,v3,v4,v5;v1=escape_Qundef((yyvsp[-5].val));v2=escape_Qundef((yyvsp[-4].val));v3=escape_Qundef((yyvsp[-1].val));v4=escape_Qundef((yyvsp[0].val));v5=dispatch4(bodystmt,v1,v2,v3,v4);(yyval.val)=v5;}
6149 }
6150#line 6146 "ripper.c"
6151 break;
6152
6153 case 14:
6154#line 1268 "ripper.y"
6155 {
6156#if 0
6157 (yyval.val) = new_bodystmt(p, (yyvsp[-2].val), (yyvsp[-1].val), 0, (yyvsp[0].val), &(yyloc));
6158#endif
6159 {VALUE v1,v2,v3,v4,v5;v1=escape_Qundef((yyvsp[-2].val));v2=escape_Qundef((yyvsp[-1].val));v3=Qnil;v4=escape_Qundef((yyvsp[0].val));v5=dispatch4(bodystmt,v1,v2,v3,v4);(yyval.val)=v5;}
6160 }
6161#line 6157 "ripper.c"
6162 break;
6163
6164 case 15:
6165#line 1277 "ripper.y"
6166 {
6167 (yyval.val) = void_stmts(p, (yyvsp[-1].val));
6168 }
6169#line 6165 "ripper.c"
6170 break;
6171
6172 case 16:
6173#line 1283 "ripper.y"
6174 {
6175#if 0
6176 (yyval.val) = NEW_BEGIN(0, &(yyloc));
6177#endif
6178 {VALUE v1,v2,v3,v4,v5;v1=dispatch0(stmts_new);v2=dispatch0(void_stmt);v3=v1;v4=v2;v5=dispatch2(stmts_add,v3,v4);(yyval.val)=v5;}
6179 }
6180#line 6176 "ripper.c"
6181 break;
6182
6183 case 17:
6184#line 1290 "ripper.y"
6185 {
6186#if 0
6187 (yyval.val) = newline_node((yyvsp[0].val));
6188#endif
6189 {VALUE v1,v2,v3,v4;v1=dispatch0(stmts_new);v2=v1;v3=(yyvsp[0].val);v4=dispatch2(stmts_add,v2,v3);(yyval.val)=v4;}
6190 }
6191#line 6187 "ripper.c"
6192 break;
6193
6194 case 18:
6195#line 1297 "ripper.y"
6196 {
6197#if 0
6198 (yyval.val) = block_append(p, (yyvsp[-2].val), newline_node((yyvsp[0].val)));
6199#endif
6200 {VALUE v1,v2,v3;v1=(yyvsp[-2].val);v2=(yyvsp[0].val);v3=dispatch2(stmts_add,v1,v2);(yyval.val)=v3;}
6201 }
6202#line 6198 "ripper.c"
6203 break;
6204
6205 case 19:
6206#line 1304 "ripper.y"
6207 {
6208 (yyval.val) = remove_begin((yyvsp[0].val));
6209 }
6210#line 6206 "ripper.c"
6211 break;
6212
6213 case 20:
6214#line 1310 "ripper.y"
6215 {
6216 (yyval.val) = (yyvsp[0].val);
6217 }
6218#line 6214 "ripper.c"
6219 break;
6220
6221 case 21:
6222#line 1314 "ripper.y"
6223 {
6224 yyerror1(&(yylsp[0]), "BEGIN is permitted only at toplevel");
6225 }
6226#line 6222 "ripper.c"
6227 break;
6228
6229 case 22:
6230#line 1318 "ripper.y"
6231 {
6232 (yyval.val) = (yyvsp[0].val);
6233 }
6234#line 6230 "ripper.c"
6235 break;
6236
6237 case 23:
6238#line 1323 "ripper.y"
6239 {SET_LEX_STATE(EXPR_FNAME|EXPR_FITEM);}
6240#line 6236 "ripper.c"
6241 break;
6242
6243 case 24:
6244#line 1324 "ripper.y"
6245 {
6246#if 0
6247 (yyval.val) = NEW_ALIAS((yyvsp[-2].val), (yyvsp[0].val), &(yyloc));
6248#endif
6249 {VALUE v1,v2,v3;v1=(yyvsp[-2].val);v2=(yyvsp[0].val);v3=dispatch2(alias,v1,v2);(yyval.val)=v3;}
6250 }
6251#line 6247 "ripper.c"
6252 break;
6253
6254 case 25:
6255#line 1331 "ripper.y"
6256 {
6257#if 0
6258 (yyval.val) = NEW_VALIAS((yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
6259#endif
6260 {VALUE v1,v2,v3;v1=(yyvsp[-1].val);v2=(yyvsp[0].val);v3=dispatch2(var_alias,v1,v2);(yyval.val)=v3;}
6261 }
6262#line 6258 "ripper.c"
6263 break;
6264
6265 case 26:
6266#line 1338 "ripper.y"
6267 {
6268#if 0
6269 char buf[2];
6270 buf[0] = '$';
6271 buf[1] = (char)(yyvsp[0].val)->nd_nth;
6272 (yyval.val) = NEW_VALIAS((yyvsp[-1].val), rb_intern2(buf, 2), &(yyloc));
6273#endif
6274 {VALUE v1,v2,v3;v1=(yyvsp[-1].val);v2=(yyvsp[0].val);v3=dispatch2(var_alias,v1,v2);(yyval.val)=v3;}
6275 }
6276#line 6272 "ripper.c"
6277 break;
6278
6279 case 27:
6280#line 1348 "ripper.y"
6281 {
6282#if 0
6283 yyerror1(&(yylsp[0]), "can't make alias for the number variables");
6284 (yyval.val) = NEW_BEGIN(0, &(yyloc));
6285#endif
6286 {VALUE v1,v2,v3,v4,v5;v1=(yyvsp[-1].val);v2=(yyvsp[0].val);v3=dispatch2(var_alias,v1,v2);v4=v3;v5=dispatch1(alias_error,v4);(yyval.val)=v5;}ripper_error(p);
6287 }
6288#line 6284 "ripper.c"
6289 break;
6290
6291 case 28:
6292#line 1356 "ripper.y"
6293 {
6294#if 0
6295 (yyval.val) = (yyvsp[0].val);
6296#endif
6297 {VALUE v1,v2;v1=(yyvsp[0].val);v2=dispatch1(undef,v1);(yyval.val)=v2;}
6298 }
6299#line 6295 "ripper.c"
6300 break;
6301
6302 case 29:
6303#line 1363 "ripper.y"
6304 {
6305#if 0
6306 (yyval.val) = new_if(p, (yyvsp[0].val), remove_begin((yyvsp[-2].val)), 0, &(yyloc));
6307 fixpos((yyval.val), (yyvsp[0].val));
6308#endif
6309 {VALUE v1,v2,v3;v1=(yyvsp[0].val);v2=(yyvsp[-2].val);v3=dispatch2(if_mod,v1,v2);(yyval.val)=v3;}
6310 }
6311#line 6307 "ripper.c"
6312 break;
6313
6314 case 30:
6315#line 1371 "ripper.y"
6316 {
6317#if 0
6318 (yyval.val) = new_unless(p, (yyvsp[0].val), remove_begin((yyvsp[-2].val)), 0, &(yyloc));
6319 fixpos((yyval.val), (yyvsp[0].val));
6320#endif
6321 {VALUE v1,v2,v3;v1=(yyvsp[0].val);v2=(yyvsp[-2].val);v3=dispatch2(unless_mod,v1,v2);(yyval.val)=v3;}
6322 }
6323#line 6319 "ripper.c"
6324 break;
6325
6326 case 31:
6327#line 1379 "ripper.y"
6328 {
6329#if 0
6330 if ((yyvsp[-2].val) && nd_type((yyvsp[-2].val)) == NODE_BEGIN) {
6331 (yyval.val) = NEW_WHILE(cond(p, (yyvsp[0].val), &(yylsp[0])), (yyvsp[-2].val)->nd_body, 0, &(yyloc));
6332 }
6333 else {
6334 (yyval.val) = NEW_WHILE(cond(p, (yyvsp[0].val), &(yylsp[0])), (yyvsp[-2].val), 1, &(yyloc));
6335 }
6336#endif
6337 {VALUE v1,v2,v3;v1=(yyvsp[0].val);v2=(yyvsp[-2].val);v3=dispatch2(while_mod,v1,v2);(yyval.val)=v3;}
6338 }
6339#line 6335 "ripper.c"
6340 break;
6341
6342 case 32:
6343#line 1391 "ripper.y"
6344 {
6345#if 0
6346 if ((yyvsp[-2].val) && nd_type((yyvsp[-2].val)) == NODE_BEGIN) {
6347 (yyval.val) = NEW_UNTIL(cond(p, (yyvsp[0].val), &(yylsp[0])), (yyvsp[-2].val)->nd_body, 0, &(yyloc));
6348 }
6349 else {
6350 (yyval.val) = NEW_UNTIL(cond(p, (yyvsp[0].val), &(yylsp[0])), (yyvsp[-2].val), 1, &(yyloc));
6351 }
6352#endif
6353 {VALUE v1,v2,v3;v1=(yyvsp[0].val);v2=(yyvsp[-2].val);v3=dispatch2(until_mod,v1,v2);(yyval.val)=v3;}
6354 }
6355#line 6351 "ripper.c"
6356 break;
6357
6358 case 33:
6359#line 1403 "ripper.y"
6360 {
6361#if 0
6362 NODE *resq;
6363 YYLTYPE loc = code_loc_gen(&(yylsp[-1]), &(yylsp[0]));
6364 resq = NEW_RESBODY(0, remove_begin((yyvsp[0].val)), 0, &loc);
6365 (yyval.val) = NEW_RESCUE(remove_begin((yyvsp[-2].val)), resq, 0, &(yyloc));
6366#endif
6367 {VALUE v1,v2,v3;v1=(yyvsp[-2].val);v2=(yyvsp[0].val);v3=dispatch2(rescue_mod,v1,v2);(yyval.val)=v3;}
6368 }
6369#line 6365 "ripper.c"
6370 break;
6371
6372 case 34:
6373#line 1413 "ripper.y"
6374 {
6375 if (p->in_def) {
6376 rb_warn0("END in method; use at_exit");
6377 }
6378#if 0
6379 {
6380 NODE *scope = NEW_NODE(
6381 NODE_SCOPE, 0 /* tbl */, (yyvsp[-1].val) /* body */, 0 /* args */, &(yyloc));
6382 (yyval.val) = NEW_POSTEXE(scope, &(yyloc));
6383 }
6384#endif
6385 {VALUE v1,v2;v1=(yyvsp[-1].val);v2=dispatch1(END,v1);(yyval.val)=v2;}
6386 }
6387#line 6383 "ripper.c"
6388 break;
6389
6390 case 36:
6391#line 1428 "ripper.y"
6392 {
6393#if 0
6394 value_expr((yyvsp[0].val));
6395 (yyval.val) = node_assign(p, (yyvsp[-2].val), (yyvsp[0].val), &(yyloc));
6396#endif
6397 {VALUE v1,v2,v3;v1=(yyvsp[-2].val);v2=(yyvsp[0].val);v3=dispatch2(massign,v1,v2);(yyval.val)=v3;}
6398 }
6399#line 6395 "ripper.c"
6400 break;
6401
6402 case 37:
6403#line 1436 "ripper.y"
6404 {
6405#if 0
6406 value_expr((yyvsp[0].val));
6407 (yyval.val) = node_assign(p, (yyvsp[-2].val), (yyvsp[0].val), &(yyloc));
6408#endif
6409 {VALUE v1,v2,v3;v1=(yyvsp[-2].val);v2=(yyvsp[0].val);v3=dispatch2(assign,v1,v2);(yyval.val)=v3;}
6410 }
6411#line 6407 "ripper.c"
6412 break;
6413
6414 case 38:
6415#line 1444 "ripper.y"
6416 {
6417#if 0
6418 YYLTYPE loc = code_loc_gen(&(yylsp[-1]), &(yylsp[0]));
6419 value_expr((yyvsp[-2].val));
6420 (yyval.val) = node_assign(p, (yyvsp[-4].val), NEW_RESCUE((yyvsp[-2].val), NEW_RESBODY(0, remove_begin((yyvsp[0].val)), 0, &loc), 0, &(yyloc)), &(yyloc));
6421#endif
6422 {VALUE v1,v2,v3,v4,v5,v6;v1=(yyvsp[-2].val);v2=(yyvsp[0].val);v3=dispatch2(rescue_mod,v1,v2);v4=(yyvsp[-4].val);v5=v3;v6=dispatch2(massign,v4,v5);(yyval.val)=v6;}
6423 }
6424#line 6420 "ripper.c"
6425 break;
6426
6427 case 39:
6428#line 1453 "ripper.y"
6429 {
6430#if 0
6431 (yyval.val) = node_assign(p, (yyvsp[-2].val), (yyvsp[0].val), &(yyloc));
6432#endif
6433 {VALUE v1,v2,v3;v1=(yyvsp[-2].val);v2=(yyvsp[0].val);v3=dispatch2(massign,v1,v2);(yyval.val)=v3;}
6434 }
6435#line 6431 "ripper.c"
6436 break;
6437
6438 case 41:
6439#line 1463 "ripper.y"
6440 {
6441#if 0
6442 (yyval.val) = node_assign(p, (yyvsp[-2].val), (yyvsp[0].val), &(yyloc));
6443#endif
6444 {VALUE v1,v2,v3;v1=(yyvsp[-2].val);v2=(yyvsp[0].val);v3=dispatch2(assign,v1,v2);(yyval.val)=v3;}
6445 }
6446#line 6442 "ripper.c"
6447 break;
6448
6449 case 42:
6450#line 1470 "ripper.y"
6451 {
6452#if 0
6453 (yyval.val) = new_op_assign(p, (yyvsp[-2].val), (yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
6454#endif
6455 {VALUE v1,v2,v3,v4;v1=(yyvsp[-2].val);v2=(yyvsp[-1].val);v3=(yyvsp[0].val);v4=dispatch3(opassign,v1,v2,v3);(yyval.val)=v4;}
6456 }
6457#line 6453 "ripper.c"
6458 break;
6459
6460 case 43:
6461#line 1477 "ripper.y"
6462 {
6463#if 0
6464 (yyval.val) = new_ary_op_assign(p, (yyvsp[-5].val), (yyvsp[-3].val), (yyvsp[-1].val), (yyvsp[0].val), &(yylsp[-3]), &(yyloc));
6465#endif
6466 {VALUE v1,v2,v3,v4,v5,v6,v7;v1=(yyvsp[-5].val);v2=escape_Qundef((yyvsp[-3].val));v3=dispatch2(aref_field,v1,v2);v4=v3;v5=(yyvsp[-1].val);v6=(yyvsp[0].val);v7=dispatch3(opassign,v4,v5,v6);(yyval.val)=v7;}
6467
6468 }
6469#line 6465 "ripper.c"
6470 break;
6471
6472 case 44:
6473#line 1485 "ripper.y"
6474 {
6475#if 0
6476 (yyval.val) = new_attr_op_assign(p, (yyvsp[-4].val), (yyvsp[-3].val), (yyvsp[-2].val), (yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
6477#endif
6478 {VALUE v1,v2,v3,v4,v5,v6,v7,v8;v1=(yyvsp[-4].val);v2=(yyvsp[-3].val);v3=(yyvsp[-2].val);v4=dispatch3(field,v1,v2,v3);v5=v4;v6=(yyvsp[-1].val);v7=(yyvsp[0].val);v8=dispatch3(opassign,v5,v6,v7);(yyval.val)=v8;}
6479 }
6480#line 6476 "ripper.c"
6481 break;
6482
6483 case 45:
6484#line 1492 "ripper.y"
6485 {
6486#if 0
6487 (yyval.val) = new_attr_op_assign(p, (yyvsp[-4].val), (yyvsp[-3].val), (yyvsp[-2].val), (yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
6488#endif
6489 {VALUE v1,v2,v3,v4,v5,v6,v7,v8;v1=(yyvsp[-4].val);v2=(yyvsp[-3].val);v3=(yyvsp[-2].val);v4=dispatch3(field,v1,v2,v3);v5=v4;v6=(yyvsp[-1].val);v7=(yyvsp[0].val);v8=dispatch3(opassign,v5,v6,v7);(yyval.val)=v8;}
6490 }
6491#line 6487 "ripper.c"
6492 break;
6493
6494 case 46:
6495#line 1499 "ripper.y"
6496 {
6497#if 0
6498 YYLTYPE loc = code_loc_gen(&(yylsp[-4]), &(yylsp[-2]));
6499 (yyval.val) = new_const_op_assign(p, NEW_COLON2((yyvsp[-4].val), (yyvsp[-2].val), &loc), (yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
6500#endif
6501 {VALUE v1,v2,v3,v4,v5,v6,v7;v1=(yyvsp[-4].val);v2=(yyvsp[-2].val);v3=dispatch2(const_path_field,v1,v2);v4=v3;v5=(yyvsp[-1].val);v6=(yyvsp[0].val);v7=dispatch3(opassign,v4,v5,v6);(yyval.val)=v7;}
6502 }
6503#line 6499 "ripper.c"
6504 break;
6505
6506 case 47:
6507#line 1507 "ripper.y"
6508 {
6509#if 0
6510 (yyval.val) = new_attr_op_assign(p, (yyvsp[-4].val), ID2VAL(idCOLON2), (yyvsp[-2].val), (yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
6511#endif
6512 {VALUE v1,v2,v3,v4,v5,v6,v7,v8;v1=(yyvsp[-4].val);v2=ID2VAL(idCOLON2);v3=(yyvsp[-2].val);v4=dispatch3(field,v1,v2,v3);v5=v4;v6=(yyvsp[-1].val);v7=(yyvsp[0].val);v8=dispatch3(opassign,v5,v6,v7);(yyval.val)=v8;}
6513 }
6514#line 6510 "ripper.c"
6515 break;
6516
6517 case 48:
6518#line 1514 "ripper.y"
6519 {
6520#if 0
6521 rb_backref_error(p, (yyvsp[-2].val));
6522 (yyval.val) = NEW_BEGIN(0, &(yyloc));
6523#endif
6524 {VALUE v1,v2,v3,v4,v5;v1=var_field(p, (yyvsp[-2].val));v2=(yyvsp[0].val);v3=dispatch2(assign,v1,v2);v4=v3;v5=dispatch1(assign_error,v4);(yyval.val)=v5;}ripper_error(p);
6525 }
6526#line 6522 "ripper.c"
6527 break;
6528
6529 case 49:
6530#line 1524 "ripper.y"
6531 {
6532 value_expr((yyvsp[0].val));
6533 (yyval.val) = (yyvsp[0].val);
6534 }
6535#line 6531 "ripper.c"
6536 break;
6537
6538 case 50:
6539#line 1529 "ripper.y"
6540 {
6541#if 0
6542 YYLTYPE loc = code_loc_gen(&(yylsp[-1]), &(yylsp[0]));
6543 value_expr((yyvsp[-2].val));
6544 (yyval.val) = NEW_RESCUE((yyvsp[-2].val), NEW_RESBODY(0, remove_begin((yyvsp[0].val)), 0, &loc), 0, &(yyloc));
6545#endif
6546 {VALUE v1,v2,v3;v1=(yyvsp[-2].val);v2=(yyvsp[0].val);v3=dispatch2(rescue_mod,v1,v2);(yyval.val)=v3;}
6547 }
6548#line 6544 "ripper.c"
6549 break;
6550
6551 case 53:
6552#line 1542 "ripper.y"
6553 {
6554 (yyval.val) = logop(p, idAND, (yyvsp[-2].val), (yyvsp[0].val), &(yylsp[-1]), &(yyloc));
6555 }
6556#line 6552 "ripper.c"
6557 break;
6558
6559 case 54:
6560#line 1546 "ripper.y"
6561 {
6562 (yyval.val) = logop(p, idOR, (yyvsp[-2].val), (yyvsp[0].val), &(yylsp[-1]), &(yyloc));
6563 }
6564#line 6560 "ripper.c"
6565 break;
6566
6567 case 55:
6568#line 1550 "ripper.y"
6569 {
6570 (yyval.val) = call_uni_op(p, method_cond(p, (yyvsp[0].val), &(yylsp[0])), METHOD_NOT, &(yylsp[-2]), &(yyloc));
6571 }
6572#line 6568 "ripper.c"
6573 break;
6574
6575 case 56:
6576#line 1554 "ripper.y"
6577 {
6578 (yyval.val) = call_uni_op(p, method_cond(p, (yyvsp[0].val), &(yylsp[0])), '!', &(yylsp[-1]), &(yyloc));
6579 }
6580#line 6576 "ripper.c"
6581 break;
6582
6583 case 57:
6584#line 1558 "ripper.y"
6585 {
6586 value_expr((yyvsp[-1].val));
6587 SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
6588 p->command_start = FALSE;
6589 (yyval.num) = p->in_kwarg;
6590 p->in_kwarg = 1;
6591 }
6592#line 6588 "ripper.c"
6593 break;
6594
6595 case 58:
6596#line 1565 "ripper.y"
6597 {(yyval.tbl) = push_pvtbl(p);}
6598#line 6594 "ripper.c"
6599 break;
6600
6601 case 59:
6602#line 1567 "ripper.y"
6603 {pop_pvtbl(p, (yyvsp[-1].tbl));}
6604#line 6600 "ripper.c"
6605 break;
6606
6607 case 60:
6608#line 1568 "ripper.y"
6609 {
6610 p->in_kwarg = !!(yyvsp[-3].num);
6611#if 0
6612 (yyval.val) = new_case3(p, (yyvsp[-5].val), NEW_IN((yyvsp[-1].val), 0, 0, &(yylsp[-1])), &(yyloc));
6613#endif
6614 {VALUE v1,v2,v3,v4,v5,v6,v7;v1=(yyvsp[-1].val);v2=Qnil;v3=Qnil;v4=dispatch3(in,v1,v2,v3);v5=(yyvsp[-5].val);v6=v4;v7=dispatch2(case,v5,v6);(yyval.val)=v7;}
6615 }
6616#line 6612 "ripper.c"
6617 break;
6618
6619 case 62:
6620#line 1579 "ripper.y"
6621 {
6622 value_expr((yyvsp[0].val));
6623 (yyval.val) = (yyvsp[0].val);
6624 }
6625#line 6621 "ripper.c"
6626 break;
6627
6628 case 63:
6629#line 1585 "ripper.y"
6630 {COND_PUSH(1);}
6631#line 6627 "ripper.c"
6632 break;
6633
6634 case 64:
6635#line 1585 "ripper.y"
6636 {COND_POP();}
6637#line 6633 "ripper.c"
6638 break;
6639
6640 case 65:
6641#line 1586 "ripper.y"
6642 {
6643 (yyval.val) = (yyvsp[-2].val);
6644 }
6645#line 6641 "ripper.c"
6646 break;
6647
6648 case 69:
6649#line 1597 "ripper.y"
6650 {
6651#if 0
6652 (yyval.val) = new_qcall(p, (yyvsp[-2].val), (yyvsp[-3].val), (yyvsp[-1].val), (yyvsp[0].val), &(yylsp[-1]), &(yyloc));
6653#endif
6654 {VALUE v1,v2,v3,v4,v5,v6,v7;v1=(yyvsp[-3].val);v2=(yyvsp[-2].val);v3=(yyvsp[-1].val);v4=dispatch3(call,v1,v2,v3);v5=v4;v6=(yyvsp[0].val);v7=dispatch2(method_add_arg,v5,v6);(yyval.val)=v7;}
6655 }
6656#line 6652 "ripper.c"
6657 break;
6658
6659 case 70:
6660#line 1606 "ripper.y"
6661 {
6662 (yyval.val) = (yyvsp[-1].val);
6663#if 0
6664 (yyval.val)->nd_body->nd_loc = code_loc_gen(&(yylsp[-2]), &(yylsp[0]));
6665 nd_set_line((yyval.val), (yylsp[-2]).end_pos.lineno);
6666#endif
6667 }
6668#line 6664 "ripper.c"
6669 break;
6670
6671 case 71:
6672#line 1616 "ripper.y"
6673 {
6674#if 0
6675 (yyval.val) = NEW_FCALL((yyvsp[0].val), 0, &(yyloc));
6676 nd_set_line((yyval.val), p->tokline);
6677#endif
6678 (yyval.val)=(yyvsp[0].val);
6679 }
6680#line 6676 "ripper.c"
6681 break;
6682
6683 case 72:
6684#line 1626 "ripper.y"
6685 {
6686#if 0
6687 (yyvsp[-1].val)->nd_args = (yyvsp[0].val);
6688 nd_set_last_loc((yyvsp[-1].val), (yylsp[0]).end_pos);
6689 (yyval.val) = (yyvsp[-1].val);
6690#endif
6691 {VALUE v1,v2,v3;v1=(yyvsp[-1].val);v2=(yyvsp[0].val);v3=dispatch2(command,v1,v2);(yyval.val)=v3;}
6692 }
6693#line 6689 "ripper.c"
6694 break;
6695
6696 case 73:
6697#line 1635 "ripper.y"
6698 {
6699#if 0
6700 block_dup_check(p, (yyvsp[-1].val), (yyvsp[0].val));
6701 (yyvsp[-2].val)->nd_args = (yyvsp[-1].val);
6702 (yyval.val) = method_add_block(p, (yyvsp[-2].val), (yyvsp[0].val), &(yyloc));
6703 fixpos((yyval.val), (yyvsp[-2].val));
6704 nd_set_last_loc((yyvsp[-2].val), (yylsp[-1]).end_pos);
6705#endif
6706 {VALUE v1,v2,v3,v4,v5,v6;v1=(yyvsp[-2].val);v2=(yyvsp[-1].val);v3=dispatch2(command,v1,v2);v4=v3;v5=(yyvsp[0].val);v6=dispatch2(method_add_block,v4,v5);(yyval.val)=v6;}
6707 }
6708#line 6704 "ripper.c"
6709 break;
6710
6711 case 74:
6712#line 1646 "ripper.y"
6713 {
6714#if 0
6715 (yyval.val) = new_command_qcall(p, (yyvsp[-2].val), (yyvsp[-3].val), (yyvsp[-1].val), (yyvsp[0].val), Qnull, &(yylsp[-1]), &(yyloc));
6716#endif
6717 {VALUE v1,v2,v3,v4,v5;v1=(yyvsp[-3].val);v2=(yyvsp[-2].val);v3=(yyvsp[-1].val);v4=(yyvsp[0].val);v5=dispatch4(command_call,v1,v2,v3,v4);(yyval.val)=v5;}
6718 }
6719#line 6715 "ripper.c"
6720 break;
6721
6722 case 75:
6723#line 1653 "ripper.y"
6724 {
6725#if 0
6726 (yyval.val) = new_command_qcall(p, (yyvsp[-3].val), (yyvsp[-4].val), (yyvsp[-2].val), (yyvsp[-1].val), (yyvsp[0].val), &(yylsp[-2]), &(yyloc));
6727#endif
6728 {VALUE v1,v2,v3,v4,v5,v6,v7,v8;v1=(yyvsp[-4].val);v2=(yyvsp[-3].val);v3=(yyvsp[-2].val);v4=(yyvsp[-1].val);v5=dispatch4(command_call,v1,v2,v3,v4);v6=v5;v7=(yyvsp[0].val);v8=dispatch2(method_add_block,v6,v7);(yyval.val)=v8;}
6729 }
6730#line 6726 "ripper.c"
6731 break;
6732
6733 case 76:
6734#line 1660 "ripper.y"
6735 {
6736#if 0
6737 (yyval.val) = new_command_qcall(p, ID2VAL(idCOLON2), (yyvsp[-3].val), (yyvsp[-1].val), (yyvsp[0].val), Qnull, &(yylsp[-1]), &(yyloc));
6738#endif
6739 {VALUE v1,v2,v3,v4,v5;v1=(yyvsp[-3].val);v2=ID2VAL(idCOLON2);v3=(yyvsp[-1].val);v4=(yyvsp[0].val);v5=dispatch4(command_call,v1,v2,v3,v4);(yyval.val)=v5;}
6740 }
6741#line 6737 "ripper.c"
6742 break;
6743
6744 case 77:
6745#line 1667 "ripper.y"
6746 {
6747#if 0
6748 (yyval.val) = new_command_qcall(p, ID2VAL(idCOLON2), (yyvsp[-4].val), (yyvsp[-2].val), (yyvsp[-1].val), (yyvsp[0].val), &(yylsp[-2]), &(yyloc));
6749#endif
6750 {VALUE v1,v2,v3,v4,v5,v6,v7,v8;v1=(yyvsp[-4].val);v2=ID2VAL(idCOLON2);v3=(yyvsp[-2].val);v4=(yyvsp[-1].val);v5=dispatch4(command_call,v1,v2,v3,v4);v6=v5;v7=(yyvsp[0].val);v8=dispatch2(method_add_block,v6,v7);(yyval.val)=v8;}
6751 }
6752#line 6748 "ripper.c"
6753 break;
6754
6755 case 78:
6756#line 1674 "ripper.y"
6757 {
6758#if 0
6759 (yyval.val) = NEW_SUPER((yyvsp[0].val), &(yyloc));
6760 fixpos((yyval.val), (yyvsp[0].val));
6761#endif
6762 {VALUE v1,v2;v1=(yyvsp[0].val);v2=dispatch1(super,v1);(yyval.val)=v2;}
6763 }
6764#line 6760 "ripper.c"
6765 break;
6766
6767 case 79:
6768#line 1682 "ripper.y"
6769 {
6770#if 0
6771 (yyval.val) = new_yield(p, (yyvsp[0].val), &(yyloc));
6772 fixpos((yyval.val), (yyvsp[0].val));
6773#endif
6774 {VALUE v1,v2;v1=(yyvsp[0].val);v2=dispatch1(yield,v1);(yyval.val)=v2;}
6775 }
6776#line 6772 "ripper.c"
6777 break;
6778
6779 case 80:
6780#line 1690 "ripper.y"
6781 {
6782#if 0
6783 (yyval.val) = NEW_RETURN(ret_args(p, (yyvsp[0].val)), &(yyloc));
6784#endif
6785 {VALUE v1,v2;v1=(yyvsp[0].val);v2=dispatch1(return,v1);(yyval.val)=v2;}
6786 }
6787#line 6783 "ripper.c"
6788 break;
6789
6790 case 81:
6791#line 1697 "ripper.y"
6792 {
6793#if 0
6794 (yyval.val) = NEW_BREAK(ret_args(p, (yyvsp[0].val)), &(yyloc));
6795#endif
6796 {VALUE v1,v2;v1=(yyvsp[0].val);v2=dispatch1(break,v1);(yyval.val)=v2;}
6797 }
6798#line 6794 "ripper.c"
6799 break;
6800
6801 case 82:
6802#line 1704 "ripper.y"
6803 {
6804#if 0
6805 (yyval.val) = NEW_NEXT(ret_args(p, (yyvsp[0].val)), &(yyloc));
6806#endif
6807 {VALUE v1,v2;v1=(yyvsp[0].val);v2=dispatch1(next,v1);(yyval.val)=v2;}
6808 }
6809#line 6805 "ripper.c"
6810 break;
6811
6812 case 84:
6813#line 1714 "ripper.y"
6814 {
6815#if 0
6816 (yyval.val) = (yyvsp[-1].val);
6817#endif
6818 {VALUE v1,v2;v1=(yyvsp[-1].val);v2=dispatch1(mlhs_paren,v1);(yyval.val)=v2;}
6819 }
6820#line 6816 "ripper.c"
6821 break;
6822
6823 case 86:
6824#line 1724 "ripper.y"
6825 {
6826#if 0
6827 (yyval.val) = NEW_MASGN(NEW_LIST((yyvsp[-1].val), &(yyloc)), 0, &(yyloc));
6828#endif
6829 {VALUE v1,v2;v1=(yyvsp[-1].val);v2=dispatch1(mlhs_paren,v1);(yyval.val)=v2;}
6830 }
6831#line 6827 "ripper.c"
6832 break;
6833
6834 case 87:
6835#line 1733 "ripper.y"
6836 {
6837#if 0
6838 (yyval.val) = NEW_MASGN((yyvsp[0].val), 0, &(yyloc));
6839#endif
6840 (yyval.val)=(yyvsp[0].val);
6841 }
6842#line 6838 "ripper.c"
6843 break;
6844
6845 case 88:
6846#line 1740 "ripper.y"
6847 {
6848#if 0
6849 (yyval.val) = NEW_MASGN(list_append(p, (yyvsp[-1].val),(yyvsp[0].val)), 0, &(yyloc));
6850#endif
6851 {VALUE v1,v2,v3;v1=(yyvsp[-1].val);v2=(yyvsp[0].val);v3=dispatch2(mlhs_add,v1,v2);(yyval.val)=v3;}
6852 }
6853#line 6849 "ripper.c"
6854 break;
6855
6856 case 89:
6857#line 1747 "ripper.y"
6858 {
6859#if 0
6860 (yyval.val) = NEW_MASGN((yyvsp[-2].val), (yyvsp[0].val), &(yyloc));
6861#endif
6862 {VALUE v1,v2,v3;v1=(yyvsp[-2].val);v2=(yyvsp[0].val);v3=dispatch2(mlhs_add_star,v1,v2);(yyval.val)=v3;}
6863 }
6864#line 6860 "ripper.c"
6865 break;
6866
6867 case 90:
6868#line 1754 "ripper.y"
6869 {
6870#if 0
6871 (yyval.val) = NEW_MASGN((yyvsp[-4].val), NEW_POSTARG((yyvsp[-2].val),(yyvsp[0].val),&(yyloc)), &(yyloc));
6872#endif
6873 {VALUE v1,v2,v3,v4,v5,v6;v1=(yyvsp[-4].val);v2=(yyvsp[-2].val);v3=dispatch2(mlhs_add_star,v1,v2);v4=v3;v5=(yyvsp[0].val);v6=dispatch2(mlhs_add_post,v4,v5);(yyval.val)=v6;}
6874 }
6875#line 6871 "ripper.c"
6876 break;
6877
6878 case 91:
6879#line 1761 "ripper.y"
6880 {
6881#if 0
6882 (yyval.val) = NEW_MASGN((yyvsp[-1].val), NODE_SPECIAL_NO_NAME_REST, &(yyloc));
6883#endif
6884 {VALUE v1,v2,v3;v1=(yyvsp[-1].val);v2=Qnil;v3=dispatch2(mlhs_add_star,v1,v2);(yyval.val)=v3;}
6885 }
6886#line 6882 "ripper.c"
6887 break;
6888
6889 case 92:
6890#line 1768 "ripper.y"
6891 {
6892#if 0
6893 (yyval.val) = NEW_MASGN((yyvsp[-3].val), NEW_POSTARG(NODE_SPECIAL_NO_NAME_REST, (yyvsp[0].val), &(yyloc)), &(yyloc));
6894#endif
6895 {VALUE v1,v2,v3,v4,v5,v6;v1=(yyvsp[-3].val);v2=Qnil;v3=dispatch2(mlhs_add_star,v1,v2);v4=v3;v5=(yyvsp[0].val);v6=dispatch2(mlhs_add_post,v4,v5);(yyval.val)=v6;}
6896 }
6897#line 6893 "ripper.c"
6898 break;
6899
6900 case 93:
6901#line 1775 "ripper.y"
6902 {
6903#if 0
6904 (yyval.val) = NEW_MASGN(0, (yyvsp[0].val), &(yyloc));
6905#endif
6906 {VALUE v1,v2,v3,v4;v1=dispatch0(mlhs_new);v2=v1;v3=(yyvsp[0].val);v4=dispatch2(mlhs_add_star,v2,v3);(yyval.val)=v4;}
6907 }
6908#line 6904 "ripper.c"
6909 break;
6910
6911 case 94:
6912#line 1782 "ripper.y"
6913 {
6914#if 0
6915 (yyval.val) = NEW_MASGN(0, NEW_POSTARG((yyvsp[-2].val),(yyvsp[0].val),&(yyloc)), &(yyloc));
6916#endif
6917 {VALUE v1,v2,v3,v4,v5,v6,v7;v1=dispatch0(mlhs_new);v2=v1;v3=(yyvsp[-2].val);v4=dispatch2(mlhs_add_star,v2,v3);v5=v4;v6=(yyvsp[0].val);v7=dispatch2(mlhs_add_post,v5,v6);(yyval.val)=v7;}
6918 }
6919#line 6915 "ripper.c"
6920 break;
6921
6922 case 95:
6923#line 1789 "ripper.y"
6924 {
6925#if 0
6926 (yyval.val) = NEW_MASGN(0, NODE_SPECIAL_NO_NAME_REST, &(yyloc));
6927#endif
6928 {VALUE v1,v2,v3,v4;v1=dispatch0(mlhs_new);v2=v1;v3=Qnil;v4=dispatch2(mlhs_add_star,v2,v3);(yyval.val)=v4;}
6929 }
6930#line 6926 "ripper.c"
6931 break;
6932
6933 case 96:
6934#line 1796 "ripper.y"
6935 {
6936#if 0
6937 (yyval.val) = NEW_MASGN(0, NEW_POSTARG(NODE_SPECIAL_NO_NAME_REST, (yyvsp[0].val), &(yyloc)), &(yyloc));
6938#endif
6939 {VALUE v1,v2,v3,v4,v5,v6,v7;v1=dispatch0(mlhs_new);v2=v1;v3=Qnil;v4=dispatch2(mlhs_add_star,v2,v3);v5=v4;v6=(yyvsp[0].val);v7=dispatch2(mlhs_add_post,v5,v6);(yyval.val)=v7;}
6940 }
6941#line 6937 "ripper.c"
6942 break;
6943
6944 case 98:
6945#line 1806 "ripper.y"
6946 {
6947#if 0
6948 (yyval.val) = (yyvsp[-1].val);
6949#endif
6950 {VALUE v1,v2;v1=(yyvsp[-1].val);v2=dispatch1(mlhs_paren,v1);(yyval.val)=v2;}
6951 }
6952#line 6948 "ripper.c"
6953 break;
6954
6955 case 99:
6956#line 1815 "ripper.y"
6957 {
6958#if 0
6959 (yyval.val) = NEW_LIST((yyvsp[-1].val), &(yylsp[-1]));
6960#endif
6961 {VALUE v1,v2,v3,v4;v1=dispatch0(mlhs_new);v2=v1;v3=(yyvsp[-1].val);v4=dispatch2(mlhs_add,v2,v3);(yyval.val)=v4;}
6962 }
6963#line 6959 "ripper.c"
6964 break;
6965
6966 case 100:
6967#line 1822 "ripper.y"
6968 {
6969#if 0
6970 (yyval.val) = list_append(p, (yyvsp[-2].val), (yyvsp[-1].val));
6971#endif
6972 {VALUE v1,v2,v3;v1=(yyvsp[-2].val);v2=(yyvsp[-1].val);v3=dispatch2(mlhs_add,v1,v2);(yyval.val)=v3;}
6973 }
6974#line 6970 "ripper.c"
6975 break;
6976
6977 case 101:
6978#line 1831 "ripper.y"
6979 {
6980#if 0
6981 (yyval.val) = NEW_LIST((yyvsp[0].val), &(yyloc));
6982#endif
6983 {VALUE v1,v2,v3,v4;v1=dispatch0(mlhs_new);v2=v1;v3=(yyvsp[0].val);v4=dispatch2(mlhs_add,v2,v3);(yyval.val)=v4;}
6984 }
6985#line 6981 "ripper.c"
6986 break;
6987
6988 case 102:
6989#line 1838 "ripper.y"
6990 {
6991#if 0
6992 (yyval.val) = list_append(p, (yyvsp[-2].val), (yyvsp[0].val));
6993#endif
6994 {VALUE v1,v2,v3;v1=(yyvsp[-2].val);v2=(yyvsp[0].val);v3=dispatch2(mlhs_add,v1,v2);(yyval.val)=v3;}
6995 }
6996#line 6992 "ripper.c"
6997 break;
6998
6999 case 103:
7000#line 1847 "ripper.y"
7001 {
7002#if 0
7003 (yyval.val) = assignable(p, (yyvsp[0].val), 0, &(yyloc));
7004#endif
7005 (yyval.val)=assignable(p, var_field(p, (yyvsp[0].val)));
7006 }
7007#line 7003 "ripper.c"
7008 break;
7009
7010 case 104:
7011#line 1854 "ripper.y"
7012 {
7013#if 0
7014 (yyval.val) = assignable(p, (yyvsp[0].val), 0, &(yyloc));
7015#endif
7016 (yyval.val)=assignable(p, var_field(p, (yyvsp[0].val)));
7017 }
7018#line 7014 "ripper.c"
7019 break;
7020
7021 case 105:
7022#line 1861 "ripper.y"
7023 {
7024#if 0
7025 (yyval.val) = aryset(p, (yyvsp[-3].val), (yyvsp[-1].val), &(yyloc));
7026#endif
7027 {VALUE v1,v2,v3;v1=(yyvsp[-3].val);v2=escape_Qundef((yyvsp[-1].val));v3=dispatch2(aref_field,v1,v2);(yyval.val)=v3;}
7028 }
7029#line 7025 "ripper.c"
7030 break;
7031
7032 case 106:
7033#line 1868 "ripper.y"
7034 {
7035 if ((yyvsp[-1].val) == tANDDOT) {
7036 yyerror1(&(yylsp[-1]), "&. inside multiple assignment destination");
7037 }
7038#if 0
7039 (yyval.val) = attrset(p, (yyvsp[-2].val), (yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
7040#endif
7041 {VALUE v1,v2,v3,v4;v1=(yyvsp[-2].val);v2=(yyvsp[-1].val);v3=(yyvsp[0].val);v4=dispatch3(field,v1,v2,v3);(yyval.val)=v4;}
7042 }
7043#line 7039 "ripper.c"
7044 break;
7045
7046 case 107:
7047#line 1878 "ripper.y"
7048 {
7049#if 0
7050 (yyval.val) = attrset(p, (yyvsp[-2].val), idCOLON2, (yyvsp[0].val), &(yyloc));
7051#endif
7052 {VALUE v1,v2,v3;v1=(yyvsp[-2].val);v2=(yyvsp[0].val);v3=dispatch2(const_path_field,v1,v2);(yyval.val)=v3;}
7053 }
7054#line 7050 "ripper.c"
7055 break;
7056
7057 case 108:
7058#line 1885 "ripper.y"
7059 {
7060 if ((yyvsp[-1].val) == tANDDOT) {
7061 yyerror1(&(yylsp[-1]), "&. inside multiple assignment destination");
7062 }
7063#if 0
7064 (yyval.val) = attrset(p, (yyvsp[-2].val), (yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
7065#endif
7066 {VALUE v1,v2,v3,v4;v1=(yyvsp[-2].val);v2=(yyvsp[-1].val);v3=(yyvsp[0].val);v4=dispatch3(field,v1,v2,v3);(yyval.val)=v4;}
7067 }
7068#line 7064 "ripper.c"
7069 break;
7070
7071 case 109:
7072#line 1895 "ripper.y"
7073 {
7074#if 0
7075 (yyval.val) = const_decl(p, NEW_COLON2((yyvsp[-2].val), (yyvsp[0].val), &(yyloc)), &(yyloc));
7076#endif
7077 {VALUE v1,v2,v3;v1=(yyvsp[-2].val);v2=(yyvsp[0].val);v3=dispatch2(const_path_field,v1,v2);(yyval.val)=const_decl(p, v3);}
7078 }
7079#line 7075 "ripper.c"
7080 break;
7081
7082 case 110:
7083#line 1902 "ripper.y"
7084 {
7085#if 0
7086 (yyval.val) = const_decl(p, NEW_COLON3((yyvsp[0].val), &(yyloc)), &(yyloc));
7087#endif
7088 {VALUE v1,v2;v1=(yyvsp[0].val);v2=dispatch1(top_const_field,v1);(yyval.val)=const_decl(p, v2);}
7089 }
7090#line 7086 "ripper.c"
7091 break;
7092
7093 case 111:
7094#line 1909 "ripper.y"
7095 {
7096#if 0
7097 rb_backref_error(p, (yyvsp[0].val));
7098 (yyval.val) = NEW_BEGIN(0, &(yyloc));
7099#endif
7100 {VALUE v1,v2;v1=var_field(p, (yyvsp[0].val));v2=dispatch1(assign_error,v1);(yyval.val)=v2;}ripper_error(p);
7101 }
7102#line 7098 "ripper.c"
7103 break;
7104
7105 case 112:
7106#line 1919 "ripper.y"
7107 {
7108#if 0
7109 (yyval.val) = assignable(p, (yyvsp[0].val), 0, &(yyloc));
7110#endif
7111 (yyval.val)=assignable(p, var_field(p, (yyvsp[0].val)));
7112 }
7113#line 7109 "ripper.c"
7114 break;
7115
7116 case 113:
7117#line 1926 "ripper.y"
7118 {
7119#if 0
7120 (yyval.val) = assignable(p, (yyvsp[0].val), 0, &(yyloc));
7121#endif
7122 (yyval.val)=assignable(p, var_field(p, (yyvsp[0].val)));
7123 }
7124#line 7120 "ripper.c"
7125 break;
7126
7127 case 114:
7128#line 1933 "ripper.y"
7129 {
7130#if 0
7131 (yyval.val) = aryset(p, (yyvsp[-3].val), (yyvsp[-1].val), &(yyloc));
7132#endif
7133 {VALUE v1,v2,v3;v1=(yyvsp[-3].val);v2=escape_Qundef((yyvsp[-1].val));v3=dispatch2(aref_field,v1,v2);(yyval.val)=v3;}
7134 }
7135#line 7131 "ripper.c"
7136 break;
7137
7138 case 115:
7139#line 1940 "ripper.y"
7140 {
7141#if 0
7142 (yyval.val) = attrset(p, (yyvsp[-2].val), (yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
7143#endif
7144 {VALUE v1,v2,v3,v4;v1=(yyvsp[-2].val);v2=(yyvsp[-1].val);v3=(yyvsp[0].val);v4=dispatch3(field,v1,v2,v3);(yyval.val)=v4;}
7145 }
7146#line 7142 "ripper.c"
7147 break;
7148
7149 case 116:
7150#line 1947 "ripper.y"
7151 {
7152#if 0
7153 (yyval.val) = attrset(p, (yyvsp[-2].val), idCOLON2, (yyvsp[0].val), &(yyloc));
7154#endif
7155 {VALUE v1,v2,v3,v4;v1=(yyvsp[-2].val);v2=ID2VAL(idCOLON2);v3=(yyvsp[0].val);v4=dispatch3(field,v1,v2,v3);(yyval.val)=v4;}
7156 }
7157#line 7153 "ripper.c"
7158 break;
7159
7160 case 117:
7161#line 1954 "ripper.y"
7162 {
7163#if 0
7164 (yyval.val) = attrset(p, (yyvsp[-2].val), (yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
7165#endif
7166 {VALUE v1,v2,v3,v4;v1=(yyvsp[-2].val);v2=(yyvsp[-1].val);v3=(yyvsp[0].val);v4=dispatch3(field,v1,v2,v3);(yyval.val)=v4;}
7167 }
7168#line 7164 "ripper.c"
7169 break;
7170
7171 case 118:
7172#line 1961 "ripper.y"
7173 {
7174#if 0
7175 (yyval.val) = const_decl(p, NEW_COLON2((yyvsp[-2].val), (yyvsp[0].val), &(yyloc)), &(yyloc));
7176#endif
7177 {VALUE v1,v2,v3;v1=(yyvsp[-2].val);v2=(yyvsp[0].val);v3=dispatch2(const_path_field,v1,v2);(yyval.val)=const_decl(p, v3);}
7178 }
7179#line 7175 "ripper.c"
7180 break;
7181
7182 case 119:
7183#line 1968 "ripper.y"
7184 {
7185#if 0
7186 (yyval.val) = const_decl(p, NEW_COLON3((yyvsp[0].val), &(yyloc)), &(yyloc));
7187#endif
7188 {VALUE v1,v2;v1=(yyvsp[0].val);v2=dispatch1(top_const_field,v1);(yyval.val)=const_decl(p, v2);}
7189 }
7190#line 7186 "ripper.c"
7191 break;
7192
7193 case 120:
7194#line 1975 "ripper.y"
7195 {
7196#if 0
7197 rb_backref_error(p, (yyvsp[0].val));
7198 (yyval.val) = NEW_BEGIN(0, &(yyloc));
7199#endif
7200 {VALUE v1,v2;v1=var_field(p, (yyvsp[0].val));v2=dispatch1(assign_error,v1);(yyval.val)=v2;}ripper_error(p);
7201 }
7202#line 7198 "ripper.c"
7203 break;
7204
7205 case 121:
7206#line 1985 "ripper.y"
7207 {
7208#if 0
7209 yyerror1(&(yylsp[0]), "class/module name must be CONSTANT");
7210#endif
7211 {VALUE v1,v2;v1=(yyvsp[0].val);v2=dispatch1(class_name_error,v1);(yyval.val)=v2;}ripper_error(p);
7212 }
7213#line 7209 "ripper.c"
7214 break;
7215
7216 case 123:
7217#line 1995 "ripper.y"
7218 {
7219#if 0
7220 (yyval.val) = NEW_COLON3((yyvsp[0].val), &(yyloc));
7221#endif
7222 {VALUE v1,v2;v1=(yyvsp[0].val);v2=dispatch1(top_const_ref,v1);(yyval.val)=v2;}
7223 }
7224#line 7220 "ripper.c"
7225 break;
7226
7227 case 124:
7228#line 2002 "ripper.y"
7229 {
7230#if 0
7231 (yyval.val) = NEW_COLON2(0, (yyval.val), &(yyloc));
7232#endif
7233 {VALUE v1,v2;v1=(yyvsp[0].val);v2=dispatch1(const_ref,v1);(yyval.val)=v2;}
7234 }
7235#line 7231 "ripper.c"
7236 break;
7237
7238 case 125:
7239#line 2009 "ripper.y"
7240 {
7241#if 0
7242 (yyval.val) = NEW_COLON2((yyvsp[-2].val), (yyvsp[0].val), &(yyloc));
7243#endif
7244 {VALUE v1,v2,v3;v1=(yyvsp[-2].val);v2=(yyvsp[0].val);v3=dispatch2(const_path_ref,v1,v2);(yyval.val)=v3;}
7245 }
7246#line 7242 "ripper.c"
7247 break;
7248
7249 case 129:
7250#line 2021 "ripper.y"
7251 {
7252 SET_LEX_STATE(EXPR_ENDFN);
7253 (yyval.val) = (yyvsp[0].val);
7254 }
7255#line 7251 "ripper.c"
7256 break;
7257
7258 case 131:
7259#line 2029 "ripper.y"
7260 {
7261#if 0
7262 (yyval.val) = NEW_LIT(ID2SYM((yyvsp[0].val)), &(yyloc));
7263#endif
7264 {VALUE v1,v2;v1=(yyvsp[0].val);v2=dispatch1(symbol_literal,v1);(yyval.val)=v2;}
7265 }
7266#line 7262 "ripper.c"
7267 break;
7268
7269 case 133:
7270#line 2039 "ripper.y"
7271 {
7272#if 0
7273 (yyval.val) = NEW_UNDEF((yyvsp[0].val), &(yyloc));
7274#endif
7275 (yyval.val)=rb_ary_new3(1, get_value((yyvsp[0].val)));
7276 }
7277#line 7273 "ripper.c"
7278 break;
7279
7280 case 134:
7281#line 2045 "ripper.y"
7282 {SET_LEX_STATE(EXPR_FNAME|EXPR_FITEM);}
7283#line 7279 "ripper.c"
7284 break;
7285
7286 case 135:
7287#line 2046 "ripper.y"
7288 {
7289#if 0
7290 NODE *undef = NEW_UNDEF((yyvsp[0].val), &(yylsp[0]));
7291 (yyval.val) = block_append(p, (yyvsp[-3].val), undef);
7292#endif
7293 (yyval.val)=rb_ary_push((yyvsp[-3].val), get_value((yyvsp[0].val)));
7294 }
7295#line 7291 "ripper.c"
7296 break;
7297
7298 case 136:
7299#line 2055 "ripper.y"
7300 { ifndef_ripper((yyval.val) = '|'); }
7301#line 7297 "ripper.c"
7302 break;
7303
7304 case 137:
7305#line 2056 "ripper.y"
7306 { ifndef_ripper((yyval.val) = '^'); }
7307#line 7303 "ripper.c"
7308 break;
7309
7310 case 138:
7311#line 2057 "ripper.y"
7312 { ifndef_ripper((yyval.val) = '&'); }
7313#line 7309 "ripper.c"
7314 break;
7315
7316 case 139:
7317#line 2058 "ripper.y"
7318 { ifndef_ripper((yyval.val) = tCMP); }
7319#line 7315 "ripper.c"
7320 break;
7321
7322 case 140:
7323#line 2059 "ripper.y"
7324 { ifndef_ripper((yyval.val) = tEQ); }
7325#line 7321 "ripper.c"
7326 break;
7327
7328 case 141:
7329#line 2060 "ripper.y"
7330 { ifndef_ripper((yyval.val) = tEQQ); }
7331#line 7327 "ripper.c"
7332 break;
7333
7334 case 142:
7335#line 2061 "ripper.y"
7336 { ifndef_ripper((yyval.val) = tMATCH); }
7337#line 7333 "ripper.c"
7338 break;
7339
7340 case 143:
7341#line 2062 "ripper.y"
7342 { ifndef_ripper((yyval.val) = tNMATCH); }
7343#line 7339 "ripper.c"
7344 break;
7345
7346 case 144:
7347#line 2063 "ripper.y"
7348 { ifndef_ripper((yyval.val) = '>'); }
7349#line 7345 "ripper.c"
7350 break;
7351
7352 case 145:
7353#line 2064 "ripper.y"
7354 { ifndef_ripper((yyval.val) = tGEQ); }
7355#line 7351 "ripper.c"
7356 break;
7357
7358 case 146:
7359#line 2065 "ripper.y"
7360 { ifndef_ripper((yyval.val) = '<'); }
7361#line 7357 "ripper.c"
7362 break;
7363
7364 case 147:
7365#line 2066 "ripper.y"
7366 { ifndef_ripper((yyval.val) = tLEQ); }
7367#line 7363 "ripper.c"
7368 break;
7369
7370 case 148:
7371#line 2067 "ripper.y"
7372 { ifndef_ripper((yyval.val) = tNEQ); }
7373#line 7369 "ripper.c"
7374 break;
7375
7376 case 149:
7377#line 2068 "ripper.y"
7378 { ifndef_ripper((yyval.val) = tLSHFT); }
7379#line 7375 "ripper.c"
7380 break;
7381
7382 case 150:
7383#line 2069 "ripper.y"
7384 { ifndef_ripper((yyval.val) = tRSHFT); }
7385#line 7381 "ripper.c"
7386 break;
7387
7388 case 151:
7389#line 2070 "ripper.y"
7390 { ifndef_ripper((yyval.val) = '+'); }
7391#line 7387 "ripper.c"
7392 break;
7393
7394 case 152:
7395#line 2071 "ripper.y"
7396 { ifndef_ripper((yyval.val) = '-'); }
7397#line 7393 "ripper.c"
7398 break;
7399
7400 case 153:
7401#line 2072 "ripper.y"
7402 { ifndef_ripper((yyval.val) = '*'); }
7403#line 7399 "ripper.c"
7404 break;
7405
7406 case 154:
7407#line 2073 "ripper.y"
7408 { ifndef_ripper((yyval.val) = '*'); }
7409#line 7405 "ripper.c"
7410 break;
7411
7412 case 155:
7413#line 2074 "ripper.y"
7414 { ifndef_ripper((yyval.val) = '/'); }
7415#line 7411 "ripper.c"
7416 break;
7417
7418 case 156:
7419#line 2075 "ripper.y"
7420 { ifndef_ripper((yyval.val) = '%'); }
7421#line 7417 "ripper.c"
7422 break;
7423
7424 case 157:
7425#line 2076 "ripper.y"
7426 { ifndef_ripper((yyval.val) = tPOW); }
7427#line 7423 "ripper.c"
7428 break;
7429
7430 case 158:
7431#line 2077 "ripper.y"
7432 { ifndef_ripper((yyval.val) = tDSTAR); }
7433#line 7429 "ripper.c"
7434 break;
7435
7436 case 159:
7437#line 2078 "ripper.y"
7438 { ifndef_ripper((yyval.val) = '!'); }
7439#line 7435 "ripper.c"
7440 break;
7441
7442 case 160:
7443#line 2079 "ripper.y"
7444 { ifndef_ripper((yyval.val) = '~'); }
7445#line 7441 "ripper.c"
7446 break;
7447
7448 case 161:
7449#line 2080 "ripper.y"
7450 { ifndef_ripper((yyval.val) = tUPLUS); }
7451#line 7447 "ripper.c"
7452 break;
7453
7454 case 162:
7455#line 2081 "ripper.y"
7456 { ifndef_ripper((yyval.val) = tUMINUS); }
7457#line 7453 "ripper.c"
7458 break;
7459
7460 case 163:
7461#line 2082 "ripper.y"
7462 { ifndef_ripper((yyval.val) = tAREF); }
7463#line 7459 "ripper.c"
7464 break;
7465
7466 case 164:
7467#line 2083 "ripper.y"
7468 { ifndef_ripper((yyval.val) = tASET); }
7469#line 7465 "ripper.c"
7470 break;
7471
7472 case 165:
7473#line 2084 "ripper.y"
7474 { ifndef_ripper((yyval.val) = '`'); }
7475#line 7471 "ripper.c"
7476 break;
7477
7478 case 207:
7479#line 2102 "ripper.y"
7480 {
7481#if 0
7482 (yyval.val) = node_assign(p, (yyvsp[-2].val), (yyvsp[0].val), &(yyloc));
7483#endif
7484 {VALUE v1,v2,v3;v1=(yyvsp[-2].val);v2=(yyvsp[0].val);v3=dispatch2(assign,v1,v2);(yyval.val)=v3;}
7485 }
7486#line 7482 "ripper.c"
7487 break;
7488
7489 case 208:
7490#line 2109 "ripper.y"
7491 {
7492#if 0
7493 (yyval.val) = new_op_assign(p, (yyvsp[-2].val), (yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
7494#endif
7495 {VALUE v1,v2,v3,v4;v1=(yyvsp[-2].val);v2=(yyvsp[-1].val);v3=(yyvsp[0].val);v4=dispatch3(opassign,v1,v2,v3);(yyval.val)=v4;}
7496 }
7497#line 7493 "ripper.c"
7498 break;
7499
7500 case 209:
7501#line 2116 "ripper.y"
7502 {
7503#if 0
7504 value_expr((yyvsp[0].val));
7505 (yyval.val) = new_ary_op_assign(p, (yyvsp[-5].val), (yyvsp[-3].val), (yyvsp[-1].val), (yyvsp[0].val), &(yylsp[-3]), &(yyloc));
7506#endif
7507 {VALUE v1,v2,v3,v4,v5,v6,v7;v1=(yyvsp[-5].val);v2=escape_Qundef((yyvsp[-3].val));v3=dispatch2(aref_field,v1,v2);v4=v3;v5=(yyvsp[-1].val);v6=(yyvsp[0].val);v7=dispatch3(opassign,v4,v5,v6);(yyval.val)=v7;}
7508 }
7509#line 7505 "ripper.c"
7510 break;
7511
7512 case 210:
7513#line 2124 "ripper.y"
7514 {
7515#if 0
7516 value_expr((yyvsp[0].val));
7517 (yyval.val) = new_attr_op_assign(p, (yyvsp[-4].val), (yyvsp[-3].val), (yyvsp[-2].val), (yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
7518#endif
7519 {VALUE v1,v2,v3,v4,v5,v6,v7,v8;v1=(yyvsp[-4].val);v2=(yyvsp[-3].val);v3=(yyvsp[-2].val);v4=dispatch3(field,v1,v2,v3);v5=v4;v6=(yyvsp[-1].val);v7=(yyvsp[0].val);v8=dispatch3(opassign,v5,v6,v7);(yyval.val)=v8;}
7520 }
7521#line 7517 "ripper.c"
7522 break;
7523
7524 case 211:
7525#line 2132 "ripper.y"
7526 {
7527#if 0
7528 value_expr((yyvsp[0].val));
7529 (yyval.val) = new_attr_op_assign(p, (yyvsp[-4].val), (yyvsp[-3].val), (yyvsp[-2].val), (yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
7530#endif
7531 {VALUE v1,v2,v3,v4,v5,v6,v7,v8;v1=(yyvsp[-4].val);v2=(yyvsp[-3].val);v3=(yyvsp[-2].val);v4=dispatch3(field,v1,v2,v3);v5=v4;v6=(yyvsp[-1].val);v7=(yyvsp[0].val);v8=dispatch3(opassign,v5,v6,v7);(yyval.val)=v8;}
7532 }
7533#line 7529 "ripper.c"
7534 break;
7535
7536 case 212:
7537#line 2140 "ripper.y"
7538 {
7539#if 0
7540 value_expr((yyvsp[0].val));
7541 (yyval.val) = new_attr_op_assign(p, (yyvsp[-4].val), ID2VAL(idCOLON2), (yyvsp[-2].val), (yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
7542#endif
7543 {VALUE v1,v2,v3,v4,v5,v6,v7,v8;v1=(yyvsp[-4].val);v2=ID2VAL(idCOLON2);v3=(yyvsp[-2].val);v4=dispatch3(field,v1,v2,v3);v5=v4;v6=(yyvsp[-1].val);v7=(yyvsp[0].val);v8=dispatch3(opassign,v5,v6,v7);(yyval.val)=v8;}
7544 }
7545#line 7541 "ripper.c"
7546 break;
7547
7548 case 213:
7549#line 2148 "ripper.y"
7550 {
7551#if 0
7552 YYLTYPE loc = code_loc_gen(&(yylsp[-4]), &(yylsp[-2]));
7553 (yyval.val) = new_const_op_assign(p, NEW_COLON2((yyvsp[-4].val), (yyvsp[-2].val), &loc), (yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
7554#endif
7555 {VALUE v1,v2,v3,v4,v5,v6,v7;v1=(yyvsp[-4].val);v2=(yyvsp[-2].val);v3=dispatch2(const_path_field,v1,v2);v4=v3;v5=(yyvsp[-1].val);v6=(yyvsp[0].val);v7=dispatch3(opassign,v4,v5,v6);(yyval.val)=v7;}
7556 }
7557#line 7553 "ripper.c"
7558 break;
7559
7560 case 214:
7561#line 2156 "ripper.y"
7562 {
7563#if 0
7564 (yyval.val) = new_const_op_assign(p, NEW_COLON3((yyvsp[-2].val), &(yyloc)), (yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
7565#endif
7566 {VALUE v1,v2,v3,v4,v5,v6;v1=(yyvsp[-2].val);v2=dispatch1(top_const_field,v1);v3=v2;v4=(yyvsp[-1].val);v5=(yyvsp[0].val);v6=dispatch3(opassign,v3,v4,v5);(yyval.val)=v6;}
7567 }
7568#line 7564 "ripper.c"
7569 break;
7570
7571 case 215:
7572#line 2163 "ripper.y"
7573 {
7574#if 0
7575 rb_backref_error(p, (yyvsp[-2].val));
7576 (yyval.val) = NEW_BEGIN(0, &(yyloc));
7577#endif
7578 {VALUE v1,v2,v3,v4,v5,v6;v1=var_field(p, (yyvsp[-2].val));v2=(yyvsp[-1].val);v3=(yyvsp[0].val);v4=dispatch3(opassign,v1,v2,v3);v5=v4;v6=dispatch1(assign_error,v5);(yyval.val)=v6;}ripper_error(p);
7579 }
7580#line 7576 "ripper.c"
7581 break;
7582
7583 case 216:
7584#line 2171 "ripper.y"
7585 {
7586#if 0
7587 value_expr((yyvsp[-2].val));
7588 value_expr((yyvsp[0].val));
7589 (yyval.val) = NEW_DOT2((yyvsp[-2].val), (yyvsp[0].val), &(yyloc));
7590#endif
7591 {VALUE v1,v2,v3;v1=(yyvsp[-2].val);v2=(yyvsp[0].val);v3=dispatch2(dot2,v1,v2);(yyval.val)=v3;}
7592 }
7593#line 7589 "ripper.c"
7594 break;
7595
7596 case 217:
7597#line 2180 "ripper.y"
7598 {
7599#if 0
7600 value_expr((yyvsp[-2].val));
7601 value_expr((yyvsp[0].val));
7602 (yyval.val) = NEW_DOT3((yyvsp[-2].val), (yyvsp[0].val), &(yyloc));
7603#endif
7604 {VALUE v1,v2,v3;v1=(yyvsp[-2].val);v2=(yyvsp[0].val);v3=dispatch2(dot3,v1,v2);(yyval.val)=v3;}
7605 }
7606#line 7602 "ripper.c"
7607 break;
7608
7609 case 218:
7610#line 2189 "ripper.y"
7611 {
7612#if 0
7613 YYLTYPE loc;
7614 loc.beg_pos = (yylsp[0]).end_pos;
7615 loc.end_pos = (yylsp[0]).end_pos;
7616
7617 value_expr((yyvsp[-1].val));
7618 (yyval.val) = NEW_DOT2((yyvsp[-1].val), new_nil(&loc), &(yyloc));
7619#endif
7620 {VALUE v1,v2,v3;v1=(yyvsp[-1].val);v2=Qnil;v3=dispatch2(dot2,v1,v2);(yyval.val)=v3;}
7621 }
7622#line 7618 "ripper.c"
7623 break;
7624
7625 case 219:
7626#line 2201 "ripper.y"
7627 {
7628#if 0
7629 YYLTYPE loc;
7630 loc.beg_pos = (yylsp[0]).end_pos;
7631 loc.end_pos = (yylsp[0]).end_pos;
7632
7633 value_expr((yyvsp[-1].val));
7634 (yyval.val) = NEW_DOT3((yyvsp[-1].val), new_nil(&loc), &(yyloc));
7635#endif
7636 {VALUE v1,v2,v3;v1=(yyvsp[-1].val);v2=Qnil;v3=dispatch2(dot3,v1,v2);(yyval.val)=v3;}
7637 }
7638#line 7634 "ripper.c"
7639 break;
7640
7641 case 220:
7642#line 2213 "ripper.y"
7643 {
7644#if 0
7645 YYLTYPE loc;
7646 loc.beg_pos = (yylsp[-1]).beg_pos;
7647 loc.end_pos = (yylsp[-1]).beg_pos;
7648
7649 value_expr((yyvsp[0].val));
7650 (yyval.val) = NEW_DOT2(new_nil(&loc), (yyvsp[0].val), &(yyloc));
7651#endif
7652 {VALUE v1,v2,v3;v1=Qnil;v2=(yyvsp[0].val);v3=dispatch2(dot2,v1,v2);(yyval.val)=v3;}
7653 }
7654#line 7650 "ripper.c"
7655 break;
7656
7657 case 221:
7658#line 2225 "ripper.y"
7659 {
7660#if 0
7661 YYLTYPE loc;
7662 loc.beg_pos = (yylsp[-1]).beg_pos;
7663 loc.end_pos = (yylsp[-1]).beg_pos;
7664
7665 value_expr((yyvsp[0].val));
7666 (yyval.val) = NEW_DOT3(new_nil(&loc), (yyvsp[0].val), &(yyloc));
7667#endif
7668 {VALUE v1,v2,v3;v1=Qnil;v2=(yyvsp[0].val);v3=dispatch2(dot3,v1,v2);(yyval.val)=v3;}
7669 }
7670#line 7666 "ripper.c"
7671 break;
7672
7673 case 222:
7674#line 2237 "ripper.y"
7675 {
7676 (yyval.val) = call_bin_op(p, (yyvsp[-2].val), '+', (yyvsp[0].val), &(yylsp[-1]), &(yyloc));
7677 }
7678#line 7674 "ripper.c"
7679 break;
7680
7681 case 223:
7682#line 2241 "ripper.y"
7683 {
7684 (yyval.val) = call_bin_op(p, (yyvsp[-2].val), '-', (yyvsp[0].val), &(yylsp[-1]), &(yyloc));
7685 }
7686#line 7682 "ripper.c"
7687 break;
7688
7689 case 224:
7690#line 2245 "ripper.y"
7691 {
7692 (yyval.val) = call_bin_op(p, (yyvsp[-2].val), '*', (yyvsp[0].val), &(yylsp[-1]), &(yyloc));
7693 }
7694#line 7690 "ripper.c"
7695 break;
7696
7697 case 225:
7698#line 2249 "ripper.y"
7699 {
7700 (yyval.val) = call_bin_op(p, (yyvsp[-2].val), '/', (yyvsp[0].val), &(yylsp[-1]), &(yyloc));
7701 }
7702#line 7698 "ripper.c"
7703 break;
7704
7705 case 226:
7706#line 2253 "ripper.y"
7707 {
7708 (yyval.val) = call_bin_op(p, (yyvsp[-2].val), '%', (yyvsp[0].val), &(yylsp[-1]), &(yyloc));
7709 }
7710#line 7706 "ripper.c"
7711 break;
7712
7713 case 227:
7714#line 2257 "ripper.y"
7715 {
7716 (yyval.val) = call_bin_op(p, (yyvsp[-2].val), idPow, (yyvsp[0].val), &(yylsp[-1]), &(yyloc));
7717 }
7718#line 7714 "ripper.c"
7719 break;
7720
7721 case 228:
7722#line 2261 "ripper.y"
7723 {
7724 (yyval.val) = call_uni_op(p, call_bin_op(p, (yyvsp[-2].val), idPow, (yyvsp[0].val), &(yylsp[-2]), &(yyloc)), idUMinus, &(yylsp[-3]), &(yyloc));
7725 }
7726#line 7722 "ripper.c"
7727 break;
7728
7729 case 229:
7730#line 2265 "ripper.y"
7731 {
7732 (yyval.val) = call_uni_op(p, (yyvsp[0].val), idUPlus, &(yylsp[-1]), &(yyloc));
7733 }
7734#line 7730 "ripper.c"
7735 break;
7736
7737 case 230:
7738#line 2269 "ripper.y"
7739 {
7740 (yyval.val) = call_uni_op(p, (yyvsp[0].val), idUMinus, &(yylsp[-1]), &(yyloc));
7741 }
7742#line 7738 "ripper.c"
7743 break;
7744
7745 case 231:
7746#line 2273 "ripper.y"
7747 {
7748 (yyval.val) = call_bin_op(p, (yyvsp[-2].val), '|', (yyvsp[0].val), &(yylsp[-1]), &(yyloc));
7749 }
7750#line 7746 "ripper.c"
7751 break;
7752
7753 case 232:
7754#line 2277 "ripper.y"
7755 {
7756 (yyval.val) = call_bin_op(p, (yyvsp[-2].val), '^', (yyvsp[0].val), &(yylsp[-1]), &(yyloc));
7757 }
7758#line 7754 "ripper.c"
7759 break;
7760
7761 case 233:
7762#line 2281 "ripper.y"
7763 {
7764 (yyval.val) = call_bin_op(p, (yyvsp[-2].val), '&', (yyvsp[0].val), &(yylsp[-1]), &(yyloc));
7765 }
7766#line 7762 "ripper.c"
7767 break;
7768
7769 case 234:
7770#line 2285 "ripper.y"
7771 {
7772 (yyval.val) = call_bin_op(p, (yyvsp[-2].val), idCmp, (yyvsp[0].val), &(yylsp[-1]), &(yyloc));
7773 }
7774#line 7770 "ripper.c"
7775 break;
7776
7777 case 236:
7778#line 2290 "ripper.y"
7779 {
7780 (yyval.val) = call_bin_op(p, (yyvsp[-2].val), idEq, (yyvsp[0].val), &(yylsp[-1]), &(yyloc));
7781 }
7782#line 7778 "ripper.c"
7783 break;
7784
7785 case 237:
7786#line 2294 "ripper.y"
7787 {
7788 (yyval.val) = call_bin_op(p, (yyvsp[-2].val), idEqq, (yyvsp[0].val), &(yylsp[-1]), &(yyloc));
7789 }
7790#line 7786 "ripper.c"
7791 break;
7792
7793 case 238:
7794#line 2298 "ripper.y"
7795 {
7796 (yyval.val) = call_bin_op(p, (yyvsp[-2].val), idNeq, (yyvsp[0].val), &(yylsp[-1]), &(yyloc));
7797 }
7798#line 7794 "ripper.c"
7799 break;
7800
7801 case 239:
7802#line 2302 "ripper.y"
7803 {
7804 (yyval.val) = match_op(p, (yyvsp[-2].val), (yyvsp[0].val), &(yylsp[-1]), &(yyloc));
7805 }
7806#line 7802 "ripper.c"
7807 break;
7808
7809 case 240:
7810#line 2306 "ripper.y"
7811 {
7812 (yyval.val) = call_bin_op(p, (yyvsp[-2].val), idNeqTilde, (yyvsp[0].val), &(yylsp[-1]), &(yyloc));
7813 }
7814#line 7810 "ripper.c"
7815 break;
7816
7817 case 241:
7818#line 2310 "ripper.y"
7819 {
7820 (yyval.val) = call_uni_op(p, method_cond(p, (yyvsp[0].val), &(yylsp[0])), '!', &(yylsp[-1]), &(yyloc));
7821 }
7822#line 7818 "ripper.c"
7823 break;
7824
7825 case 242:
7826#line 2314 "ripper.y"
7827 {
7828 (yyval.val) = call_uni_op(p, (yyvsp[0].val), '~', &(yylsp[-1]), &(yyloc));
7829 }
7830#line 7826 "ripper.c"
7831 break;
7832
7833 case 243:
7834#line 2318 "ripper.y"
7835 {
7836 (yyval.val) = call_bin_op(p, (yyvsp[-2].val), idLTLT, (yyvsp[0].val), &(yylsp[-1]), &(yyloc));
7837 }
7838#line 7834 "ripper.c"
7839 break;
7840
7841 case 244:
7842#line 2322 "ripper.y"
7843 {
7844 (yyval.val) = call_bin_op(p, (yyvsp[-2].val), idGTGT, (yyvsp[0].val), &(yylsp[-1]), &(yyloc));
7845 }
7846#line 7842 "ripper.c"
7847 break;
7848
7849 case 245:
7850#line 2326 "ripper.y"
7851 {
7852 (yyval.val) = logop(p, idANDOP, (yyvsp[-2].val), (yyvsp[0].val), &(yylsp[-1]), &(yyloc));
7853 }
7854#line 7850 "ripper.c"
7855 break;
7856
7857 case 246:
7858#line 2330 "ripper.y"
7859 {
7860 (yyval.val) = logop(p, idOROP, (yyvsp[-2].val), (yyvsp[0].val), &(yylsp[-1]), &(yyloc));
7861 }
7862#line 7858 "ripper.c"
7863 break;
7864
7865 case 247:
7866#line 2333 "ripper.y"
7867 {p->in_defined = 1;}
7868#line 7864 "ripper.c"
7869 break;
7870
7871 case 248:
7872#line 2334 "ripper.y"
7873 {
7874 p->in_defined = 0;
7875 (yyval.val) = new_defined(p, (yyvsp[0].val), &(yyloc));
7876 }
7877#line 7873 "ripper.c"
7878 break;
7879
7880 case 249:
7881#line 2339 "ripper.y"
7882 {
7883#if 0
7884 value_expr((yyvsp[-5].val));
7885 (yyval.val) = new_if(p, (yyvsp[-5].val), (yyvsp[-3].val), (yyvsp[0].val), &(yyloc));
7886 fixpos((yyval.val), (yyvsp[-5].val));
7887#endif
7888 {VALUE v1,v2,v3,v4;v1=(yyvsp[-5].val);v2=(yyvsp[-3].val);v3=(yyvsp[0].val);v4=dispatch3(ifop,v1,v2,v3);(yyval.val)=v4;}
7889 }
7890#line 7886 "ripper.c"
7891 break;
7892
7893 case 250:
7894#line 2348 "ripper.y"
7895 {
7896 (yyval.val) = (yyvsp[0].val);
7897 }
7898#line 7894 "ripper.c"
7899 break;
7900
7901 case 251:
7902#line 2353 "ripper.y"
7903 {(yyval.val) = '>';}
7904#line 7900 "ripper.c"
7905 break;
7906
7907 case 252:
7908#line 2354 "ripper.y"
7909 {(yyval.val) = '<';}
7910#line 7906 "ripper.c"
7911 break;
7912
7913 case 253:
7914#line 2355 "ripper.y"
7915 {(yyval.val) = idGE;}
7916#line 7912 "ripper.c"
7917 break;
7918
7919 case 254:
7920#line 2356 "ripper.y"
7921 {(yyval.val) = idLE;}
7922#line 7918 "ripper.c"
7923 break;
7924
7925 case 255:
7926#line 2360 "ripper.y"
7927 {
7928 (yyval.val) = call_bin_op(p, (yyvsp[-2].val), (yyvsp[-1].val), (yyvsp[0].val), &(yylsp[-1]), &(yyloc));
7929 }
7930#line 7926 "ripper.c"
7931 break;
7932
7933 case 256:
7934#line 2364 "ripper.y"
7935 {
7936 rb_warning1("comparison '%s' after comparison", WARN_ID((yyvsp[-1].val)));
7937 (yyval.val) = call_bin_op(p, (yyvsp[-2].val), (yyvsp[-1].val), (yyvsp[0].val), &(yylsp[-1]), &(yyloc));
7938 }
7939#line 7935 "ripper.c"
7940 break;
7941
7942 case 257:
7943#line 2371 "ripper.y"
7944 {
7945 value_expr((yyvsp[0].val));
7946 (yyval.val) = (yyvsp[0].val);
7947 }
7948#line 7944 "ripper.c"
7949 break;
7950
7951 case 259:
7952#line 2379 "ripper.y"
7953 {
7954 (yyval.val) = (yyvsp[-1].val);
7955 }
7956#line 7952 "ripper.c"
7957 break;
7958
7959 case 260:
7960#line 2383 "ripper.y"
7961 {
7962#if 0
7963 (yyval.val) = (yyvsp[-1].val) ? arg_append(p, (yyvsp[-3].val), new_hash(p, (yyvsp[-1].val), &(yylsp[-1])), &(yyloc)) : (yyvsp[-3].val);
7964#endif
7965 {VALUE v1,v2,v3,v4,v5;v1=(yyvsp[-1].val);v2=dispatch1(bare_assoc_hash,v1);v3=(yyvsp[-3].val);v4=v2;v5=dispatch2(args_add,v3,v4);(yyval.val)=v5;}
7966 }
7967#line 7963 "ripper.c"
7968 break;
7969
7970 case 261:
7971#line 2390 "ripper.y"
7972 {
7973#if 0
7974 (yyval.val) = (yyvsp[-1].val) ? NEW_LIST(new_hash(p, (yyvsp[-1].val), &(yylsp[-1])), &(yyloc)) : 0;
7975#endif
7976 {VALUE v1,v2,v3,v4,v5,v6;v1=dispatch0(args_new);v2=(yyvsp[-1].val);v3=dispatch1(bare_assoc_hash,v2);v4=v1;v5=v3;v6=dispatch2(args_add,v4,v5);(yyval.val)=v6;}
7977 }
7978#line 7974 "ripper.c"
7979 break;
7980
7981 case 262:
7982#line 2399 "ripper.y"
7983 {
7984 value_expr((yyvsp[0].val));
7985 (yyval.val) = (yyvsp[0].val);
7986 }
7987#line 7983 "ripper.c"
7988 break;
7989
7990 case 263:
7991#line 2404 "ripper.y"
7992 {
7993#if 0
7994 YYLTYPE loc = code_loc_gen(&(yylsp[-1]), &(yylsp[0]));
7995 value_expr((yyvsp[-2].val));
7996 (yyval.val) = NEW_RESCUE((yyvsp[-2].val), NEW_RESBODY(0, remove_begin((yyvsp[0].val)), 0, &loc), 0, &(yyloc));
7997#endif
7998 {VALUE v1,v2,v3;v1=(yyvsp[-2].val);v2=(yyvsp[0].val);v3=dispatch2(rescue_mod,v1,v2);(yyval.val)=v3;}
7999 }
8000#line 7996 "ripper.c"
8001 break;
8002
8003 case 264:
8004#line 2415 "ripper.y"
8005 {
8006#if 0
8007 (yyval.val) = (yyvsp[-1].val);
8008#endif
8009 {VALUE v1,v2;v1=escape_Qundef((yyvsp[-1].val));v2=dispatch1(arg_paren,v1);(yyval.val)=v2;}
8010 }
8011#line 8007 "ripper.c"
8012 break;
8013
8014 case 265:
8015#line 2422 "ripper.y"
8016 {
8017 if (!local_id(p, idFWD_REST) ||
8018#if idFWD_KWREST
8019 !local_id(p, idFWD_KWREST) ||
8020#endif
8021 !local_id(p, idFWD_BLOCK)) {
8022 compile_error(p, "unexpected ...");
8023 (yyval.val) = Qnone;
8024 }
8025 else {
8026#if 0
8027 NODE *splat = NEW_SPLAT(NEW_LVAR(idFWD_REST, &(yylsp[-1])), &(yylsp[-1]));
8028#if idFWD_KWREST
8029 NODE *kwrest = list_append(p, NEW_LIST(0, &(yylsp[-1])), NEW_LVAR(idFWD_KWREST, &(yylsp[-1])));
8030#endif
8031 NODE *block = NEW_BLOCK_PASS(NEW_LVAR(idFWD_BLOCK, &(yylsp[-1])), &(yylsp[-1]));
8032 (yyval.val) = rest_arg_append(p, (yyvsp[-3].val), splat, &(yyloc));
8033#if idFWD_KWREST
8034 (yyval.val) = arg_append(p, (yyval.val), new_hash(p, kwrest, &(yylsp[-1])), &(yylsp[-1]));
8035#endif
8036 (yyval.val) = arg_blk_pass((yyval.val), block);
8037#endif
8038 {VALUE v1,v2,v3,v4,v5;v1=(yyvsp[-3].val);v2=(yyvsp[-1].val);v3=dispatch2(args_add,v1,v2);v4=v3;v5=dispatch1(arg_paren,v4);(yyval.val)=v5;}
8039 }
8040 }
8041#line 8037 "ripper.c"
8042 break;
8043
8044 case 266:
8045#line 2448 "ripper.y"
8046 {
8047 if (!local_id(p, idFWD_REST) ||
8048#if idFWD_KWREST
8049 !local_id(p, idFWD_KWREST) ||
8050#endif
8051 !local_id(p, idFWD_BLOCK)) {
8052 compile_error(p, "unexpected ...");
8053 (yyval.val) = Qnone;
8054 }
8055 else {
8056#if 0
8057 NODE *splat = NEW_SPLAT(NEW_LVAR(idFWD_REST, &(yylsp[-1])), &(yylsp[-1]));
8058#if idFWD_KWREST
8059 NODE *kwrest = list_append(p, NEW_LIST(0, &(yylsp[-1])), NEW_LVAR(idFWD_KWREST, &(yylsp[-1])));
8060#endif
8061 NODE *block = NEW_BLOCK_PASS(NEW_LVAR(idFWD_BLOCK, &(yylsp[-1])), &(yylsp[-1]));
8062#if idFWD_KWREST
8063 (yyval.val) = arg_append(p, splat, new_hash(p, kwrest, &(yylsp[-1])), &(yylsp[-1]));
8064#else
8065 (yyval.val) = splat;
8066#endif
8067 (yyval.val) = arg_blk_pass((yyval.val), block);
8068#endif
8069 {VALUE v1,v2;v1=(yyvsp[-1].val);v2=dispatch1(arg_paren,v1);(yyval.val)=v2;}
8070 }
8071 }
8072#line 8068 "ripper.c"
8073 break;
8074
8075 case 271:
8076#line 2483 "ripper.y"
8077 {
8078 (yyval.val) = (yyvsp[-1].val);
8079 }
8080#line 8076 "ripper.c"
8081 break;
8082
8083 case 272:
8084#line 2487 "ripper.y"
8085 {
8086#if 0
8087 (yyval.val) = (yyvsp[-1].val) ? arg_append(p, (yyvsp[-3].val), new_hash(p, (yyvsp[-1].val), &(yylsp[-1])), &(yyloc)) : (yyvsp[-3].val);
8088#endif
8089 {VALUE v1,v2,v3,v4,v5;v1=(yyvsp[-1].val);v2=dispatch1(bare_assoc_hash,v1);v3=(yyvsp[-3].val);v4=v2;v5=dispatch2(args_add,v3,v4);(yyval.val)=v5;}
8090 }
8091#line 8087 "ripper.c"
8092 break;
8093
8094 case 273:
8095#line 2494 "ripper.y"
8096 {
8097#if 0
8098 (yyval.val) = (yyvsp[-1].val) ? NEW_LIST(new_hash(p, (yyvsp[-1].val), &(yylsp[-1])), &(yylsp[-1])) : 0;
8099#endif
8100 {VALUE v1,v2,v3,v4,v5,v6;v1=dispatch0(args_new);v2=(yyvsp[-1].val);v3=dispatch1(bare_assoc_hash,v2);v4=v1;v5=v3;v6=dispatch2(args_add,v4,v5);(yyval.val)=v6;}
8101 }
8102#line 8098 "ripper.c"
8103 break;
8104
8105 case 274:
8106#line 2503 "ripper.y"
8107 {
8108#if 0
8109 value_expr((yyvsp[0].val));
8110 (yyval.val) = NEW_LIST((yyvsp[0].val), &(yyloc));
8111#endif
8112 {VALUE v1,v2,v3,v4;v1=dispatch0(args_new);v2=v1;v3=(yyvsp[0].val);v4=dispatch2(args_add,v2,v3);(yyval.val)=v4;}
8113 }
8114#line 8110 "ripper.c"
8115 break;
8116
8117 case 275:
8118#line 2511 "ripper.y"
8119 {
8120#if 0
8121 (yyval.val) = arg_blk_pass((yyvsp[-1].val), (yyvsp[0].val));
8122#endif
8123 {VALUE v1,v2,v3;v1=(yyvsp[-1].val);v2=(yyvsp[0].val);v3=dispatch2(args_add_block,v1,v2);(yyval.val)=v3;}
8124 }
8125#line 8121 "ripper.c"
8126 break;
8127
8128 case 276:
8129#line 2518 "ripper.y"
8130 {
8131#if 0
8132 (yyval.val) = (yyvsp[-1].val) ? NEW_LIST(new_hash(p, (yyvsp[-1].val), &(yylsp[-1])), &(yylsp[-1])) : 0;
8133 (yyval.val) = arg_blk_pass((yyval.val), (yyvsp[0].val));
8134#endif
8135 {VALUE v1,v2,v3,v4,v5,v6,v7,v8,v9;v1=dispatch0(args_new);v2=(yyvsp[-1].val);v3=dispatch1(bare_assoc_hash,v2);v4=v1;v5=v3;v6=dispatch2(args_add,v4,v5);v7=v6;v8=(yyvsp[0].val);v9=dispatch2(args_add_block,v7,v8);(yyval.val)=v9;}
8136 }
8137#line 8133 "ripper.c"
8138 break;
8139
8140 case 277:
8141#line 2526 "ripper.y"
8142 {
8143#if 0
8144 (yyval.val) = (yyvsp[-1].val) ? arg_append(p, (yyvsp[-3].val), new_hash(p, (yyvsp[-1].val), &(yylsp[-1])), &(yyloc)) : (yyvsp[-3].val);
8145 (yyval.val) = arg_blk_pass((yyval.val), (yyvsp[0].val));
8146#endif
8147 {VALUE v1,v2,v3,v4,v5,v6,v7,v8;v1=(yyvsp[-1].val);v2=dispatch1(bare_assoc_hash,v1);v3=(yyvsp[-3].val);v4=v2;v5=dispatch2(args_add,v3,v4);v6=v5;v7=(yyvsp[0].val);v8=dispatch2(args_add_block,v6,v7);(yyval.val)=v8;}
8148 }
8149#line 8145 "ripper.c"
8150 break;
8151
8152 case 278:
8153#line 2534 "ripper.y"
8154 {{VALUE v1,v2,v3,v4;v1=dispatch0(args_new);v2=v1;v3=(yyvsp[0].val);v4=dispatch2(args_add_block,v2,v3);(yyval.val)=v4;}}
8155#line 8151 "ripper.c"
8156 break;
8157
8158 case 279:
8159#line 2537 "ripper.y"
8160 {
8161 /* If call_args starts with a open paren '(' or '[',
8162 * look-ahead reading of the letters calls CMDARG_PUSH(0),
8163 * but the push must be done after CMDARG_PUSH(1).
8164 * So this code makes them consistent by first cancelling
8165 * the premature CMDARG_PUSH(0), doing CMDARG_PUSH(1),
8166 * and finally redoing CMDARG_PUSH(0).
8167 */
8168 int lookahead = 0;
8169 switch (yychar) {
8170 case '(': case tLPAREN: case tLPAREN_ARG: case '[': case tLBRACK:
8171 lookahead = 1;
8172 }
8173 if (lookahead) CMDARG_POP();
8174 CMDARG_PUSH(1);
8175 if (lookahead) CMDARG_PUSH(0);
8176 }
8177#line 8173 "ripper.c"
8178 break;
8179
8180 case 280:
8181#line 2555 "ripper.y"
8182 {
8183 /* call_args can be followed by tLBRACE_ARG (that does CMDARG_PUSH(0) in the lexer)
8184 * but the push must be done after CMDARG_POP() in the parser.
8185 * So this code does CMDARG_POP() to pop 0 pushed by tLBRACE_ARG,
8186 * CMDARG_POP() to pop 1 pushed by command_args,
8187 * and CMDARG_PUSH(0) to restore back the flag set by tLBRACE_ARG.
8188 */
8189 int lookahead = 0;
8190 switch (yychar) {
8191 case tLBRACE_ARG:
8192 lookahead = 1;
8193 }
8194 if (lookahead) CMDARG_POP();
8195 CMDARG_POP();
8196 if (lookahead) CMDARG_PUSH(0);
8197 (yyval.val) = (yyvsp[0].val);
8198 }
8199#line 8195 "ripper.c"
8200 break;
8201
8202 case 281:
8203#line 2575 "ripper.y"
8204 {
8205#if 0
8206 (yyval.val) = NEW_BLOCK_PASS((yyvsp[0].val), &(yyloc));
8207#endif
8208 (yyval.val)=(yyvsp[0].val);
8209 }
8210#line 8206 "ripper.c"
8211 break;
8212
8213 case 282:
8214#line 2584 "ripper.y"
8215 {
8216 (yyval.val) = (yyvsp[0].val);
8217 }
8218#line 8214 "ripper.c"
8219 break;
8220
8221 case 283:
8222#line 2588 "ripper.y"
8223 {
8224 (yyval.val) = 0;
8225 }
8226#line 8222 "ripper.c"
8227 break;
8228
8229 case 284:
8230#line 2594 "ripper.y"
8231 {
8232#if 0
8233 (yyval.val) = NEW_LIST((yyvsp[0].val), &(yyloc));
8234#endif
8235 {VALUE v1,v2,v3,v4;v1=dispatch0(args_new);v2=v1;v3=(yyvsp[0].val);v4=dispatch2(args_add,v2,v3);(yyval.val)=v4;}
8236 }
8237#line 8233 "ripper.c"
8238 break;
8239
8240 case 285:
8241#line 2601 "ripper.y"
8242 {
8243#if 0
8244 (yyval.val) = NEW_SPLAT((yyvsp[0].val), &(yyloc));
8245#endif
8246 {VALUE v1,v2,v3,v4;v1=dispatch0(args_new);v2=v1;v3=(yyvsp[0].val);v4=dispatch2(args_add_star,v2,v3);(yyval.val)=v4;}
8247 }
8248#line 8244 "ripper.c"
8249 break;
8250
8251 case 286:
8252#line 2608 "ripper.y"
8253 {
8254#if 0
8255 (yyval.val) = last_arg_append(p, (yyvsp[-2].val), (yyvsp[0].val), &(yyloc));
8256#endif
8257 {VALUE v1,v2,v3;v1=(yyvsp[-2].val);v2=(yyvsp[0].val);v3=dispatch2(args_add,v1,v2);(yyval.val)=v3;}
8258 }
8259#line 8255 "ripper.c"
8260 break;
8261
8262 case 287:
8263#line 2615 "ripper.y"
8264 {
8265#if 0
8266 (yyval.val) = rest_arg_append(p, (yyvsp[-3].val), (yyvsp[0].val), &(yyloc));
8267#endif
8268 {VALUE v1,v2,v3;v1=(yyvsp[-3].val);v2=(yyvsp[0].val);v3=dispatch2(args_add_star,v1,v2);(yyval.val)=v3;}
8269 }
8270#line 8266 "ripper.c"
8271 break;
8272
8273 case 290:
8274#line 2628 "ripper.y"
8275 {
8276#if 0
8277 (yyval.val) = last_arg_append(p, (yyvsp[-2].val), (yyvsp[0].val), &(yyloc));
8278#endif
8279 {VALUE v1,v2,v3,v4,v5;v1=(yyvsp[-2].val);v2=dispatch1(mrhs_new_from_args,v1);v3=v2;v4=(yyvsp[0].val);v5=dispatch2(mrhs_add,v3,v4);(yyval.val)=v5;}
8280 }
8281#line 8277 "ripper.c"
8282 break;
8283
8284 case 291:
8285#line 2635 "ripper.y"
8286 {
8287#if 0
8288 (yyval.val) = rest_arg_append(p, (yyvsp[-3].val), (yyvsp[0].val), &(yyloc));
8289#endif
8290 {VALUE v1,v2,v3,v4,v5;v1=(yyvsp[-3].val);v2=dispatch1(mrhs_new_from_args,v1);v3=v2;v4=(yyvsp[0].val);v5=dispatch2(mrhs_add_star,v3,v4);(yyval.val)=v5;}
8291 }
8292#line 8288 "ripper.c"
8293 break;
8294
8295 case 292:
8296#line 2642 "ripper.y"
8297 {
8298#if 0
8299 (yyval.val) = NEW_SPLAT((yyvsp[0].val), &(yyloc));
8300#endif
8301 {VALUE v1,v2,v3,v4;v1=dispatch0(mrhs_new);v2=v1;v3=(yyvsp[0].val);v4=dispatch2(mrhs_add_star,v2,v3);(yyval.val)=v4;}
8302 }
8303#line 8299 "ripper.c"
8304 break;
8305
8306 case 303:
8307#line 2661 "ripper.y"
8308 {
8309#if 0
8310 (yyval.val) = NEW_FCALL((yyvsp[0].val), 0, &(yyloc));
8311#endif
8312 {VALUE v1,v2,v3,v4,v5,v6;v1=(yyvsp[0].val);v2=dispatch1(fcall,v1);v3=dispatch0(args_new);v4=v2;v5=v3;v6=dispatch2(method_add_arg,v4,v5);(yyval.val)=v6;}
8313 }
8314#line 8310 "ripper.c"
8315 break;
8316
8317 case 304:
8318#line 2668 "ripper.y"
8319 {
8320 CMDARG_PUSH(0);
8321 }
8322#line 8318 "ripper.c"
8323 break;
8324
8325 case 305:
8326#line 2673 "ripper.y"
8327 {
8328 CMDARG_POP();
8329#if 0
8330 set_line_body((yyvsp[-1].val), (yylsp[-3]).end_pos.lineno);
8331 (yyval.val) = NEW_BEGIN((yyvsp[-1].val), &(yyloc));
8332 nd_set_line((yyval.val), (yylsp[-3]).end_pos.lineno);
8333#endif
8334 {VALUE v1,v2;v1=(yyvsp[-1].val);v2=dispatch1(begin,v1);(yyval.val)=v2;}
8335 }
8336#line 8332 "ripper.c"
8337 break;
8338
8339 case 306:
8340#line 2682 "ripper.y"
8341 {SET_LEX_STATE(EXPR_ENDARG);}
8342#line 8338 "ripper.c"
8343 break;
8344
8345 case 307:
8346#line 2683 "ripper.y"
8347 {
8348#if 0
8349 (yyval.val) = NEW_BEGIN(0, &(yyloc));
8350#endif
8351 {VALUE v1,v2;v1=0;v2=dispatch1(paren,v1);(yyval.val)=v2;}
8352 }
8353#line 8349 "ripper.c"
8354 break;
8355
8356 case 308:
8357#line 2689 "ripper.y"
8358 {SET_LEX_STATE(EXPR_ENDARG);}
8359#line 8355 "ripper.c"
8360 break;
8361
8362 case 309:
8363#line 2690 "ripper.y"
8364 {
8365#if 0
8366 if (nd_type((yyvsp[-2].val)) == NODE_SELF) (yyvsp[-2].val)->nd_state = 0;
8367 (yyval.val) = (yyvsp[-2].val);
8368#endif
8369 {VALUE v1,v2;v1=(yyvsp[-2].val);v2=dispatch1(paren,v1);(yyval.val)=v2;}
8370 }
8371#line 8367 "ripper.c"
8372 break;
8373
8374 case 310:
8375#line 2698 "ripper.y"
8376 {
8377#if 0
8378 if (nd_type((yyvsp[-1].val)) == NODE_SELF) (yyvsp[-1].val)->nd_state = 0;
8379 (yyval.val) = (yyvsp[-1].val);
8380#endif
8381 {VALUE v1,v2;v1=(yyvsp[-1].val);v2=dispatch1(paren,v1);(yyval.val)=v2;}
8382 }
8383#line 8379 "ripper.c"
8384 break;
8385
8386 case 311:
8387#line 2706 "ripper.y"
8388 {
8389#if 0
8390 (yyval.val) = NEW_COLON2((yyvsp[-2].val), (yyvsp[0].val), &(yyloc));
8391#endif
8392 {VALUE v1,v2,v3;v1=(yyvsp[-2].val);v2=(yyvsp[0].val);v3=dispatch2(const_path_ref,v1,v2);(yyval.val)=v3;}
8393 }
8394#line 8390 "ripper.c"
8395 break;
8396
8397 case 312:
8398#line 2713 "ripper.y"
8399 {
8400#if 0
8401 (yyval.val) = NEW_COLON3((yyvsp[0].val), &(yyloc));
8402#endif
8403 {VALUE v1,v2;v1=(yyvsp[0].val);v2=dispatch1(top_const_ref,v1);(yyval.val)=v2;}
8404 }
8405#line 8401 "ripper.c"
8406 break;
8407
8408 case 313:
8409#line 2720 "ripper.y"
8410 {
8411#if 0
8412 (yyval.val) = make_list((yyvsp[-1].val), &(yyloc));
8413#endif
8414 {VALUE v1,v2;v1=escape_Qundef((yyvsp[-1].val));v2=dispatch1(array,v1);(yyval.val)=v2;}
8415 }
8416#line 8412 "ripper.c"
8417 break;
8418
8419 case 314:
8420#line 2727 "ripper.y"
8421 {
8422#if 0
8423 (yyval.val) = new_hash(p, (yyvsp[-1].val), &(yyloc));
8424 (yyval.val)->nd_brace = TRUE;
8425#endif
8426 {VALUE v1,v2;v1=escape_Qundef((yyvsp[-1].val));v2=dispatch1(hash,v1);(yyval.val)=v2;}
8427 }
8428#line 8424 "ripper.c"
8429 break;
8430
8431 case 315:
8432#line 2735 "ripper.y"
8433 {
8434#if 0
8435 (yyval.val) = NEW_RETURN(0, &(yyloc));
8436#endif
8437 {VALUE v1;v1=dispatch0(return0);(yyval.val)=v1;}
8438 }
8439#line 8435 "ripper.c"
8440 break;
8441
8442 case 316:
8443#line 2742 "ripper.y"
8444 {
8445#if 0
8446 (yyval.val) = new_yield(p, (yyvsp[-1].val), &(yyloc));
8447#endif
8448 {VALUE v1,v2,v3,v4;v1=(yyvsp[-1].val);v2=dispatch1(paren,v1);v3=v2;v4=dispatch1(yield,v3);(yyval.val)=v4;}
8449 }
8450#line 8446 "ripper.c"
8451 break;
8452
8453 case 317:
8454#line 2749 "ripper.y"
8455 {
8456#if 0
8457 (yyval.val) = NEW_YIELD(0, &(yyloc));
8458#endif
8459 {VALUE v1,v2,v3,v4,v5;v1=dispatch0(args_new);v2=v1;v3=dispatch1(paren,v2);v4=v3;v5=dispatch1(yield,v4);(yyval.val)=v5;}
8460 }
8461#line 8457 "ripper.c"
8462 break;
8463
8464 case 318:
8465#line 2756 "ripper.y"
8466 {
8467#if 0
8468 (yyval.val) = NEW_YIELD(0, &(yyloc));
8469#endif
8470 {VALUE v1;v1=dispatch0(yield0);(yyval.val)=v1;}
8471 }
8472#line 8468 "ripper.c"
8473 break;
8474
8475 case 319:
8476#line 2762 "ripper.y"
8477 {p->in_defined = 1;}
8478#line 8474 "ripper.c"
8479 break;
8480
8481 case 320:
8482#line 2763 "ripper.y"
8483 {
8484 p->in_defined = 0;
8485 (yyval.val) = new_defined(p, (yyvsp[-1].val), &(yyloc));
8486 }
8487#line 8483 "ripper.c"
8488 break;
8489
8490 case 321:
8491#line 2768 "ripper.y"
8492 {
8493 (yyval.val) = call_uni_op(p, method_cond(p, (yyvsp[-1].val), &(yylsp[-1])), METHOD_NOT, &(yylsp[-3]), &(yyloc));
8494 }
8495#line 8491 "ripper.c"
8496 break;
8497
8498 case 322:
8499#line 2772 "ripper.y"
8500 {
8501 (yyval.val) = call_uni_op(p, method_cond(p, new_nil(&(yylsp[-1])), &(yylsp[-1])), METHOD_NOT, &(yylsp[-2]), &(yyloc));
8502 }
8503#line 8499 "ripper.c"
8504 break;
8505
8506 case 323:
8507#line 2776 "ripper.y"
8508 {
8509#if 0
8510 (yyval.val) = method_add_block(p, (yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
8511#endif
8512 {VALUE v1,v2,v3,v4,v5,v6,v7,v8,v9;v1=(yyvsp[-1].val);v2=dispatch1(fcall,v1);v3=dispatch0(args_new);v4=v2;v5=v3;v6=dispatch2(method_add_arg,v4,v5);v7=v6;v8=(yyvsp[0].val);v9=dispatch2(method_add_block,v7,v8);(yyval.val)=v9;}
8513 }
8514#line 8510 "ripper.c"
8515 break;
8516
8517 case 325:
8518#line 2784 "ripper.y"
8519 {
8520#if 0
8521 block_dup_check(p, (yyvsp[-1].val)->nd_args, (yyvsp[0].val));
8522 (yyval.val) = method_add_block(p, (yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
8523#endif
8524 {VALUE v1,v2,v3;v1=(yyvsp[-1].val);v2=(yyvsp[0].val);v3=dispatch2(method_add_block,v1,v2);(yyval.val)=v3;}
8525 }
8526#line 8522 "ripper.c"
8527 break;
8528
8529 case 326:
8530#line 2792 "ripper.y"
8531 {
8532 token_info_push(p, "->", &(yylsp[0]));
8533 }
8534#line 8530 "ripper.c"
8535 break;
8536
8537 case 327:
8538#line 2796 "ripper.y"
8539 {
8540 (yyval.val) = (yyvsp[0].val);
8541#if 0
8542 nd_set_first_loc((yyval.val), (yylsp[-2]).beg_pos);
8543#endif
8544 }
8545#line 8541 "ripper.c"
8546 break;
8547
8548 case 328:
8549#line 2806 "ripper.y"
8550 {
8551#if 0
8552 (yyval.val) = new_if(p, (yyvsp[-4].val), (yyvsp[-2].val), (yyvsp[-1].val), &(yyloc));
8553 fixpos((yyval.val), (yyvsp[-4].val));
8554#endif
8555 {VALUE v1,v2,v3,v4;v1=(yyvsp[-4].val);v2=(yyvsp[-2].val);v3=escape_Qundef((yyvsp[-1].val));v4=dispatch3(if,v1,v2,v3);(yyval.val)=v4;}
8556 }
8557#line 8553 "ripper.c"
8558 break;
8559
8560 case 329:
8561#line 2817 "ripper.y"
8562 {
8563#if 0
8564 (yyval.val) = new_unless(p, (yyvsp[-4].val), (yyvsp[-2].val), (yyvsp[-1].val), &(yyloc));
8565 fixpos((yyval.val), (yyvsp[-4].val));
8566#endif
8567 {VALUE v1,v2,v3,v4;v1=(yyvsp[-4].val);v2=(yyvsp[-2].val);v3=escape_Qundef((yyvsp[-1].val));v4=dispatch3(unless,v1,v2,v3);(yyval.val)=v4;}
8568 }
8569#line 8565 "ripper.c"
8570 break;
8571
8572 case 330:
8573#line 2827 "ripper.y"
8574 {
8575#if 0
8576 (yyval.val) = NEW_WHILE(cond(p, (yyvsp[-2].val), &(yylsp[-2])), (yyvsp[-1].val), 1, &(yyloc));
8577 fixpos((yyval.val), (yyvsp[-2].val));
8578#endif
8579 {VALUE v1,v2,v3;v1=(yyvsp[-2].val);v2=(yyvsp[-1].val);v3=dispatch2(while,v1,v2);(yyval.val)=v3;}
8580 }
8581#line 8577 "ripper.c"
8582 break;
8583
8584 case 331:
8585#line 2837 "ripper.y"
8586 {
8587#if 0
8588 (yyval.val) = NEW_UNTIL(cond(p, (yyvsp[-2].val), &(yylsp[-2])), (yyvsp[-1].val), 1, &(yyloc));
8589 fixpos((yyval.val), (yyvsp[-2].val));
8590#endif
8591 {VALUE v1,v2,v3;v1=(yyvsp[-2].val);v2=(yyvsp[-1].val);v3=dispatch2(until,v1,v2);(yyval.val)=v3;}
8592 }
8593#line 8589 "ripper.c"
8594 break;
8595
8596 case 332:
8597#line 2845 "ripper.y"
8598 {
8599 (yyval.val) = p->case_labels;
8600 p->case_labels = Qnil;
8601 }
8602#line 8598 "ripper.c"
8603 break;
8604
8605 case 333:
8606#line 2851 "ripper.y"
8607 {
8609 p->case_labels = (yyvsp[-2].val);
8610#if 0
8611 (yyval.val) = NEW_CASE((yyvsp[-4].val), (yyvsp[-1].val), &(yyloc));
8612 fixpos((yyval.val), (yyvsp[-4].val));
8613#endif
8614 {VALUE v1,v2,v3;v1=(yyvsp[-4].val);v2=(yyvsp[-1].val);v3=dispatch2(case,v1,v2);(yyval.val)=v3;}
8615 }
8616#line 8612 "ripper.c"
8617 break;
8618
8619 case 334:
8620#line 2861 "ripper.y"
8621 {
8622 (yyval.val) = p->case_labels;
8623 p->case_labels = 0;
8624 }
8625#line 8621 "ripper.c"
8626 break;
8627
8628 case 335:
8629#line 2867 "ripper.y"
8630 {
8632 p->case_labels = (yyvsp[-2].val);
8633#if 0
8634 (yyval.val) = NEW_CASE2((yyvsp[-1].val), &(yyloc));
8635#endif
8636 {VALUE v1,v2,v3;v1=Qnil;v2=(yyvsp[-1].val);v3=dispatch2(case,v1,v2);(yyval.val)=v3;}
8637 }
8638#line 8634 "ripper.c"
8639 break;
8640
8641 case 336:
8642#line 2878 "ripper.y"
8643 {
8644#if 0
8645 (yyval.val) = new_case3(p, (yyvsp[-3].val), (yyvsp[-1].val), &(yyloc));
8646#endif
8647 {VALUE v1,v2,v3;v1=(yyvsp[-3].val);v2=(yyvsp[-1].val);v3=dispatch2(case,v1,v2);(yyval.val)=v3;}
8648 }
8649#line 8645 "ripper.c"
8650 break;
8651
8652 case 337:
8653#line 2887 "ripper.y"
8654 {
8655#if 0
8656 /*
8657 * for a, b, c in e
8658 * #=>
8659 * e.each{|*x| a, b, c = x}
8660 *
8661 * for a in e
8662 * #=>
8663 * e.each{|x| a, = x}
8664 */
8665 ID id = internal_id(p);
8666 NODE *m = NEW_ARGS_AUX(0, 0, &NULL_LOC);
8667 NODE *args, *scope, *internal_var = NEW_DVAR(id, &(yylsp[-4]));
8668 ID *tbl = ALLOC_N(ID, 3);
8669 tbl[0] = 1 /* length of local var table */; tbl[1] = id /* internal id */;
8670 rb_ast_add_local_table(p->ast, tbl);
8671
8672 switch (nd_type((yyvsp[-4].val))) {
8673 case NODE_LASGN:
8674 case NODE_DASGN:
8675 case NODE_DASGN_CURR: /* e.each {|internal_var| a = internal_var; ... } */
8676 (yyvsp[-4].val)->nd_value = internal_var;
8677 id = 0;
8678 m->nd_plen = 1;
8679 m->nd_next = (yyvsp[-4].val);
8680 break;
8681 case NODE_MASGN: /* e.each {|*internal_var| a, b, c = (internal_var.length == 1 && Array === (tmp = internal_var[0]) ? tmp : internal_var); ... } */
8682 m->nd_next = node_assign(p, (yyvsp[-4].val), NEW_FOR_MASGN(internal_var, &(yylsp[-4])), &(yylsp[-4]));
8683 break;
8684 default: /* e.each {|*internal_var| @a, B, c[1], d.attr = internal_val; ... } */
8685 m->nd_next = node_assign(p, NEW_MASGN(NEW_LIST((yyvsp[-4].val), &(yylsp[-4])), 0, &(yylsp[-4])), internal_var, &(yylsp[-4]));
8686 }
8687 /* {|*internal_id| <m> = internal_id; ... } */
8688 args = new_args(p, m, 0, id, 0, new_args_tail(p, 0, 0, 0, &(yylsp[-4])), &(yylsp[-4]));
8689 scope = NEW_NODE(NODE_SCOPE, tbl, (yyvsp[-1].val), args, &(yyloc));
8690 (yyval.val) = NEW_FOR((yyvsp[-2].val), scope, &(yyloc));
8691 fixpos((yyval.val), (yyvsp[-4].val));
8692#endif
8693 {VALUE v1,v2,v3,v4;v1=(yyvsp[-4].val);v2=(yyvsp[-2].val);v3=(yyvsp[-1].val);v4=dispatch3(for,v1,v2,v3);(yyval.val)=v4;}
8694 }
8695#line 8691 "ripper.c"
8696 break;
8697
8698 case 338:
8699#line 2929 "ripper.y"
8700 {
8701 if (p->in_def) {
8702 YYLTYPE loc = code_loc_gen(&(yylsp[-2]), &(yylsp[-1]));
8703 yyerror1(&loc, "class definition in method body");
8704 }
8705 (yyvsp[-2].num) = p->in_class;
8706 p->in_class = 1;
8707 local_push(p, 0);
8708 }
8709#line 8705 "ripper.c"
8710 break;
8711
8712 case 339:
8713#line 2940 "ripper.y"
8714 {
8715#if 0
8716 (yyval.val) = NEW_CLASS((yyvsp[-4].val), (yyvsp[-1].val), (yyvsp[-3].val), &(yyloc));
8717 nd_set_line((yyval.val)->nd_body, (yylsp[0]).end_pos.lineno);
8718 set_line_body((yyvsp[-1].val), (yylsp[-3]).end_pos.lineno);
8719 nd_set_line((yyval.val), (yylsp[-3]).end_pos.lineno);
8720#endif
8721 {VALUE v1,v2,v3,v4;v1=(yyvsp[-4].val);v2=(yyvsp[-3].val);v3=(yyvsp[-1].val);v4=dispatch3(class,v1,v2,v3);(yyval.val)=v4;}
8722 local_pop(p);
8723 p->in_class = (yyvsp[-5].num) & 1;
8724 }
8725#line 8721 "ripper.c"
8726 break;
8727
8728 case 340:
8729#line 2952 "ripper.y"
8730 {
8731 (yyval.num) = (p->in_class << 1) | p->in_def;
8732 p->in_def = 0;
8733 p->in_class = 0;
8734 local_push(p, 0);
8735 }
8736#line 8732 "ripper.c"
8737 break;
8738
8739 case 341:
8740#line 2961 "ripper.y"
8741 {
8742#if 0
8743 (yyval.val) = NEW_SCLASS((yyvsp[-4].val), (yyvsp[-1].val), &(yyloc));
8744 nd_set_line((yyval.val)->nd_body, (yylsp[0]).end_pos.lineno);
8745 set_line_body((yyvsp[-1].val), nd_line((yyvsp[-4].val)));
8746 fixpos((yyval.val), (yyvsp[-4].val));
8747#endif
8748 {VALUE v1,v2,v3;v1=(yyvsp[-4].val);v2=(yyvsp[-1].val);v3=dispatch2(sclass,v1,v2);(yyval.val)=v3;}
8749 local_pop(p);
8750 p->in_def = (yyvsp[-3].num) & 1;
8751 p->in_class = ((yyvsp[-3].num) >> 1) & 1;
8752 }
8753#line 8749 "ripper.c"
8754 break;
8755
8756 case 342:
8757#line 2974 "ripper.y"
8758 {
8759 if (p->in_def) {
8760 YYLTYPE loc = code_loc_gen(&(yylsp[-1]), &(yylsp[0]));
8761 yyerror1(&loc, "module definition in method body");
8762 }
8763 (yyvsp[-1].num) = p->in_class;
8764 p->in_class = 1;
8765 local_push(p, 0);
8766 }
8767#line 8763 "ripper.c"
8768 break;
8769
8770 case 343:
8771#line 2985 "ripper.y"
8772 {
8773#if 0
8774 (yyval.val) = NEW_MODULE((yyvsp[-3].val), (yyvsp[-1].val), &(yyloc));
8775 nd_set_line((yyval.val)->nd_body, (yylsp[0]).end_pos.lineno);
8776 set_line_body((yyvsp[-1].val), (yylsp[-3]).end_pos.lineno);
8777 nd_set_line((yyval.val), (yylsp[-3]).end_pos.lineno);
8778#endif
8779 {VALUE v1,v2,v3;v1=(yyvsp[-3].val);v2=(yyvsp[-1].val);v3=dispatch2(module,v1,v2);(yyval.val)=v3;}
8780 local_pop(p);
8781 p->in_class = (yyvsp[-4].num) & 1;
8782 }
8783#line 8779 "ripper.c"
8784 break;
8785
8786 case 344:
8787#line 2997 "ripper.y"
8788 {
8789 numparam_name(p, get_id((yyvsp[0].val)));
8790 local_push(p, 0);
8791 (yyval.id) = p->cur_arg;
8792 p->cur_arg = 0;
8793 }
8794#line 8790 "ripper.c"
8795 break;
8796
8797 case 345:
8798#line 3003 "ripper.y"
8799 {
8800 (yyval.num) = p->in_def;
8801 p->in_def = 1;
8802 }
8803#line 8799 "ripper.c"
8804 break;
8805
8806 case 346:
8807#line 3010 "ripper.y"
8808 {
8809#if 0
8810 NODE *body = remove_begin((yyvsp[-1].val));
8811 reduce_nodes(p, &body);
8812 (yyval.val) = NEW_DEFN((yyvsp[-5].val), (yyvsp[-2].val), body, &(yyloc));
8813 nd_set_line((yyval.val)->nd_defn, (yylsp[0]).end_pos.lineno);
8814 set_line_body(body, (yylsp[-6]).beg_pos.lineno);
8815#endif
8816 {VALUE v1,v2,v3,v4;v1=(yyvsp[-5].val);v2=(yyvsp[-2].val);v3=(yyvsp[-1].val);v4=dispatch3(def,v1,v2,v3);(yyval.val)=v4;}
8817 local_pop(p);
8818 p->in_def = (yyvsp[-3].num) & 1;
8819 p->cur_arg = (yyvsp[-4].id);
8820 }
8821#line 8817 "ripper.c"
8822 break;
8823
8824 case 347:
8825#line 3023 "ripper.y"
8826 {SET_LEX_STATE(EXPR_FNAME);}
8827#line 8823 "ripper.c"
8828 break;
8829
8830 case 348:
8831#line 3024 "ripper.y"
8832 {
8833 numparam_name(p, get_id((yyvsp[0].val)));
8834 (yyvsp[-1].num) = p->in_def;
8835 p->in_def = 1;
8836 SET_LEX_STATE(EXPR_ENDFN|EXPR_LABEL); /* force for args */
8837 local_push(p, 0);
8838 (yyval.id) = p->cur_arg;
8839 p->cur_arg = 0;
8840 }
8841#line 8837 "ripper.c"
8842 break;
8843
8844 case 349:
8845#line 3036 "ripper.y"
8846 {
8847#if 0
8848 NODE *body = remove_begin((yyvsp[-1].val));
8849 reduce_nodes(p, &body);
8850 (yyval.val) = NEW_DEFS((yyvsp[-7].val), (yyvsp[-4].val), (yyvsp[-2].val), body, &(yyloc));
8851 nd_set_line((yyval.val)->nd_defn, (yylsp[0]).end_pos.lineno);
8852 set_line_body(body, (yylsp[-8]).beg_pos.lineno);
8853#endif
8854 {VALUE v1,v2,v3,v4,v5,v6;v1=(yyvsp[-7].val);v2=(yyvsp[-6].val);v3=(yyvsp[-4].val);v4=(yyvsp[-2].val);v5=(yyvsp[-1].val);v6=dispatch5(defs,v1,v2,v3,v4,v5);(yyval.val)=v6;}
8855 local_pop(p);
8856 p->in_def = (yyvsp[-5].num) & 1;
8857 p->cur_arg = (yyvsp[-3].id);
8858 }
8859#line 8855 "ripper.c"
8860 break;
8861
8862 case 350:
8863#line 3050 "ripper.y"
8864 {
8865#if 0
8866 (yyval.val) = NEW_BREAK(0, &(yyloc));
8867#endif
8868 {VALUE v1,v2,v3;v1=dispatch0(args_new);v2=v1;v3=dispatch1(break,v2);(yyval.val)=v3;}
8869 }
8870#line 8866 "ripper.c"
8871 break;
8872
8873 case 351:
8874#line 3057 "ripper.y"
8875 {
8876#if 0
8877 (yyval.val) = NEW_NEXT(0, &(yyloc));
8878#endif
8879 {VALUE v1,v2,v3;v1=dispatch0(args_new);v2=v1;v3=dispatch1(next,v2);(yyval.val)=v3;}
8880 }
8881#line 8877 "ripper.c"
8882 break;
8883
8884 case 352:
8885#line 3064 "ripper.y"
8886 {
8887#if 0
8888 (yyval.val) = NEW_REDO(&(yyloc));
8889#endif
8890 {VALUE v1;v1=dispatch0(redo);(yyval.val)=v1;}
8891 }
8892#line 8888 "ripper.c"
8893 break;
8894
8895 case 353:
8896#line 3071 "ripper.y"
8897 {
8898#if 0
8899 (yyval.val) = NEW_RETRY(&(yyloc));
8900#endif
8901 {VALUE v1;v1=dispatch0(retry);(yyval.val)=v1;}
8902 }
8903#line 8899 "ripper.c"
8904 break;
8905
8906 case 354:
8907#line 3080 "ripper.y"
8908 {
8909 value_expr((yyvsp[0].val));
8910 (yyval.val) = (yyvsp[0].val);
8911 }
8912#line 8908 "ripper.c"
8913 break;
8914
8915 case 355:
8916#line 3087 "ripper.y"
8917 {
8918 token_info_push(p, "begin", &(yyloc));
8919 }
8920#line 8916 "ripper.c"
8921 break;
8922
8923 case 356:
8924#line 3093 "ripper.y"
8925 {
8926 WARN_EOL("if");
8927 token_info_push(p, "if", &(yyloc));
8928 if (p->token_info && p->token_info->nonspc &&
8929 p->token_info->next && !strcmp(p->token_info->next->token, "else")) {
8930 const char *tok = p->lex.ptok;
8931 const char *beg = p->lex.pbeg + p->token_info->next->beg.column;
8932 beg += rb_strlen_lit("else");
8933 while (beg < tok && ISSPACE(*beg)) beg++;
8934 if (beg == tok) {
8935 p->token_info->nonspc = 0;
8936 }
8937 }
8938 }
8939#line 8935 "ripper.c"
8940 break;
8941
8942 case 357:
8943#line 3110 "ripper.y"
8944 {
8945 token_info_push(p, "unless", &(yyloc));
8946 }
8947#line 8943 "ripper.c"
8948 break;
8949
8950 case 358:
8951#line 3116 "ripper.y"
8952 {
8953 token_info_push(p, "while", &(yyloc));
8954 }
8955#line 8951 "ripper.c"
8956 break;
8957
8958 case 359:
8959#line 3122 "ripper.y"
8960 {
8961 token_info_push(p, "until", &(yyloc));
8962 }
8963#line 8959 "ripper.c"
8964 break;
8965
8966 case 360:
8967#line 3128 "ripper.y"
8968 {
8969 token_info_push(p, "case", &(yyloc));
8970 }
8971#line 8967 "ripper.c"
8972 break;
8973
8974 case 361:
8975#line 3134 "ripper.y"
8976 {
8977 token_info_push(p, "for", &(yyloc));
8978 }
8979#line 8975 "ripper.c"
8980 break;
8981
8982 case 362:
8983#line 3140 "ripper.y"
8984 {
8985 token_info_push(p, "class", &(yyloc));
8986 }
8987#line 8983 "ripper.c"
8988 break;
8989
8990 case 363:
8991#line 3146 "ripper.y"
8992 {
8993 token_info_push(p, "module", &(yyloc));
8994 }
8995#line 8991 "ripper.c"
8996 break;
8997
8998 case 364:
8999#line 3152 "ripper.y"
9000 {
9001 token_info_push(p, "def", &(yyloc));
9002 }
9003#line 8999 "ripper.c"
9004 break;
9005
9006 case 365:
9007#line 3158 "ripper.y"
9008 {
9009 token_info_push(p, "do", &(yyloc));
9010 }
9011#line 9007 "ripper.c"
9012 break;
9013
9014 case 366:
9015#line 3164 "ripper.y"
9016 {
9017 token_info_push(p, "do", &(yyloc));
9018 }
9019#line 9015 "ripper.c"
9020 break;
9021
9022 case 367:
9023#line 3170 "ripper.y"
9024 {
9025 token_info_warn(p, "rescue", p->token_info, 1, &(yyloc));
9026 }
9027#line 9023 "ripper.c"
9028 break;
9029
9030 case 368:
9031#line 3176 "ripper.y"
9032 {
9033 token_info_warn(p, "ensure", p->token_info, 1, &(yyloc));
9034 }
9035#line 9031 "ripper.c"
9036 break;
9037
9038 case 369:
9039#line 3182 "ripper.y"
9040 {
9041 token_info_warn(p, "when", p->token_info, 0, &(yyloc));
9042 }
9043#line 9039 "ripper.c"
9044 break;
9045
9046 case 370:
9047#line 3188 "ripper.y"
9048 {
9049 token_info *ptinfo_beg = p->token_info;
9050 int same = ptinfo_beg && strcmp(ptinfo_beg->token, "case") != 0;
9051 token_info_warn(p, "else", p->token_info, same, &(yyloc));
9052 if (same) {
9053 token_info e;
9054 e.next = ptinfo_beg->next;
9055 e.token = "else";
9056 token_info_setup(&e, p->lex.pbeg, &(yyloc));
9057 if (!e.nonspc) *ptinfo_beg = e;
9058 }
9059 }
9060#line 9056 "ripper.c"
9061 break;
9062
9063 case 371:
9064#line 3203 "ripper.y"
9065 {
9066 WARN_EOL("elsif");
9067 token_info_warn(p, "elsif", p->token_info, 1, &(yyloc));
9068 }
9069#line 9065 "ripper.c"
9070 break;
9071
9072 case 372:
9073#line 3210 "ripper.y"
9074 {
9075 token_info_pop(p, "end", &(yyloc));
9076 }
9077#line 9073 "ripper.c"
9078 break;
9079
9080 case 373:
9081#line 3216 "ripper.y"
9082 {
9083 if (p->in_class && !p->in_def && !dyna_in_block(p))
9084 yyerror1(&(yylsp[0]), "Invalid return in class/module body");
9085 }
9086#line 9082 "ripper.c"
9087 break;
9088
9089 case 380:
9090#line 3235 "ripper.y"
9091 {
9092#if 0
9093 (yyval.val) = new_if(p, (yyvsp[-3].val), (yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
9094 fixpos((yyval.val), (yyvsp[-3].val));
9095#endif
9096 {VALUE v1,v2,v3,v4;v1=(yyvsp[-3].val);v2=(yyvsp[-1].val);v3=escape_Qundef((yyvsp[0].val));v4=dispatch3(elsif,v1,v2,v3);(yyval.val)=v4;}
9097 }
9098#line 9094 "ripper.c"
9099 break;
9100
9101 case 382:
9102#line 3246 "ripper.y"
9103 {
9104#if 0
9105 (yyval.val) = (yyvsp[0].val);
9106#endif
9107 {VALUE v1,v2;v1=(yyvsp[0].val);v2=dispatch1(else,v1);(yyval.val)=v2;}
9108 }
9109#line 9105 "ripper.c"
9110 break;
9111
9112 case 385:
9113#line 3259 "ripper.y"
9114 {
9115#if 0
9116 (yyval.val) = assignable(p, (yyvsp[0].val), 0, &(yyloc));
9117 mark_lvar_used(p, (yyval.val));
9118#endif
9119 (yyval.val)=assignable(p, (yyvsp[0].val));
9120 }
9121#line 9117 "ripper.c"
9122 break;
9123
9124 case 386:
9125#line 3267 "ripper.y"
9126 {
9127#if 0
9128 (yyval.val) = (yyvsp[-1].val);
9129#endif
9130 {VALUE v1,v2;v1=(yyvsp[-1].val);v2=dispatch1(mlhs_paren,v1);(yyval.val)=v2;}
9131 }
9132#line 9128 "ripper.c"
9133 break;
9134
9135 case 387:
9136#line 3276 "ripper.y"
9137 {
9138#if 0
9139 (yyval.val) = NEW_LIST((yyvsp[0].val), &(yyloc));
9140#endif
9141 {VALUE v1,v2,v3,v4;v1=dispatch0(mlhs_new);v2=v1;v3=(yyvsp[0].val);v4=dispatch2(mlhs_add,v2,v3);(yyval.val)=v4;}
9142 }
9143#line 9139 "ripper.c"
9144 break;
9145
9146 case 388:
9147#line 3283 "ripper.y"
9148 {
9149#if 0
9150 (yyval.val) = list_append(p, (yyvsp[-2].val), (yyvsp[0].val));
9151#endif
9152 {VALUE v1,v2,v3;v1=(yyvsp[-2].val);v2=(yyvsp[0].val);v3=dispatch2(mlhs_add,v1,v2);(yyval.val)=v3;}
9153 }
9154#line 9150 "ripper.c"
9155 break;
9156
9157 case 389:
9158#line 3292 "ripper.y"
9159 {
9160#if 0
9161 (yyval.val) = NEW_MASGN((yyvsp[0].val), 0, &(yyloc));
9162#endif
9163 (yyval.val)=(yyvsp[0].val);
9164 }
9165#line 9161 "ripper.c"
9166 break;
9167
9168 case 390:
9169#line 3299 "ripper.y"
9170 {
9171#if 0
9172 (yyval.val) = NEW_MASGN((yyvsp[-2].val), (yyvsp[0].val), &(yyloc));
9173#endif
9174 {VALUE v1,v2,v3;v1=(yyvsp[-2].val);v2=(yyvsp[0].val);v3=dispatch2(mlhs_add_star,v1,v2);(yyval.val)=v3;}
9175 }
9176#line 9172 "ripper.c"
9177 break;
9178
9179 case 391:
9180#line 3306 "ripper.y"
9181 {
9182#if 0
9183 (yyval.val) = NEW_MASGN((yyvsp[-4].val), NEW_POSTARG((yyvsp[-2].val), (yyvsp[0].val), &(yyloc)), &(yyloc));
9184#endif
9185 {VALUE v1,v2,v3,v4,v5,v6;v1=(yyvsp[-4].val);v2=(yyvsp[-2].val);v3=dispatch2(mlhs_add_star,v1,v2);v4=v3;v5=(yyvsp[0].val);v6=dispatch2(mlhs_add_post,v4,v5);(yyval.val)=v6;}
9186 }
9187#line 9183 "ripper.c"
9188 break;
9189
9190 case 392:
9191#line 3313 "ripper.y"
9192 {
9193#if 0
9194 (yyval.val) = NEW_MASGN(0, (yyvsp[0].val), &(yyloc));
9195#endif
9196 {VALUE v1,v2,v3,v4;v1=dispatch0(mlhs_new);v2=v1;v3=(yyvsp[0].val);v4=dispatch2(mlhs_add_star,v2,v3);(yyval.val)=v4;}
9197 }
9198#line 9194 "ripper.c"
9199 break;
9200
9201 case 393:
9202#line 3320 "ripper.y"
9203 {
9204#if 0
9205 (yyval.val) = NEW_MASGN(0, NEW_POSTARG((yyvsp[-2].val), (yyvsp[0].val), &(yyloc)), &(yyloc));
9206#endif
9207 {VALUE v1,v2,v3,v4,v5,v6,v7;v1=dispatch0(mlhs_new);v2=v1;v3=(yyvsp[-2].val);v4=dispatch2(mlhs_add_star,v2,v3);v5=v4;v6=(yyvsp[0].val);v7=dispatch2(mlhs_add_post,v5,v6);(yyval.val)=v7;}
9208 }
9209#line 9205 "ripper.c"
9210 break;
9211
9212 case 394:
9213#line 3329 "ripper.y"
9214 {
9215#if 0
9216 (yyval.val) = assignable(p, (yyvsp[0].val), 0, &(yyloc));
9217 mark_lvar_used(p, (yyval.val));
9218#endif
9219 (yyval.val)=assignable(p, (yyvsp[0].val));
9220 }
9221#line 9217 "ripper.c"
9222 break;
9223
9224 case 395:
9225#line 3337 "ripper.y"
9226 {
9227#if 0
9229#endif
9230 (yyval.val)=Qnil;
9231 }
9232#line 9228 "ripper.c"
9233 break;
9234
9235 case 396:
9236#line 3346 "ripper.y"
9237 {
9238 (yyval.val) = new_args_tail(p, (yyvsp[-3].val), (yyvsp[-1].val), (yyvsp[0].val), &(yylsp[-1]));
9239 }
9240#line 9236 "ripper.c"
9241 break;
9242
9243 case 397:
9244#line 3350 "ripper.y"
9245 {
9246 (yyval.val) = new_args_tail(p, (yyvsp[-1].val), Qnone, (yyvsp[0].val), &(yylsp[-1]));
9247 }
9248#line 9244 "ripper.c"
9249 break;
9250
9251 case 398:
9252#line 3354 "ripper.y"
9253 {
9254 (yyval.val) = new_args_tail(p, Qnone, (yyvsp[-1].val), (yyvsp[0].val), &(yylsp[-1]));
9255 }
9256#line 9252 "ripper.c"
9257 break;
9258
9259 case 399:
9260#line 3358 "ripper.y"
9261 {
9262 (yyval.val) = new_args_tail(p, Qnone, ID2VAL(idNil), (yyvsp[0].val), &(yylsp[-1]));
9263 }
9264#line 9260 "ripper.c"
9265 break;
9266
9267 case 400:
9268#line 3362 "ripper.y"
9269 {
9270 (yyval.val) = new_args_tail(p, Qnone, Qnone, (yyvsp[0].val), &(yylsp[0]));
9271 }
9272#line 9268 "ripper.c"
9273 break;
9274
9275 case 401:
9276#line 3368 "ripper.y"
9277 {
9278 (yyval.val) = (yyvsp[0].val);
9279 }
9280#line 9276 "ripper.c"
9281 break;
9282
9283 case 402:
9284#line 3372 "ripper.y"
9285 {
9286 (yyval.val) = new_args_tail(p, Qnone, Qnone, Qnone, &(yylsp[0]));
9287 }
9288#line 9284 "ripper.c"
9289 break;
9290
9291 case 403:
9292#line 3378 "ripper.y"
9293 {
9294 (yyval.val) = new_args(p, (yyvsp[-5].val), (yyvsp[-3].val), (yyvsp[-1].val), Qnone, (yyvsp[0].val), &(yyloc));
9295 }
9296#line 9292 "ripper.c"
9297 break;
9298
9299 case 404:
9300#line 3382 "ripper.y"
9301 {
9302 (yyval.val) = new_args(p, (yyvsp[-7].val), (yyvsp[-5].val), (yyvsp[-3].val), (yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
9303 }
9304#line 9300 "ripper.c"
9305 break;
9306
9307 case 405:
9308#line 3386 "ripper.y"
9309 {
9310 (yyval.val) = new_args(p, (yyvsp[-3].val), (yyvsp[-1].val), Qnone, Qnone, (yyvsp[0].val), &(yyloc));
9311 }
9312#line 9308 "ripper.c"
9313 break;
9314
9315 case 406:
9316#line 3390 "ripper.y"
9317 {
9318 (yyval.val) = new_args(p, (yyvsp[-5].val), (yyvsp[-3].val), Qnone, (yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
9319 }
9320#line 9316 "ripper.c"
9321 break;
9322
9323 case 407:
9324#line 3394 "ripper.y"
9325 {
9326 (yyval.val) = new_args(p, (yyvsp[-3].val), Qnone, (yyvsp[-1].val), Qnone, (yyvsp[0].val), &(yyloc));
9327 }
9328#line 9324 "ripper.c"
9329 break;
9330
9331 case 408:
9332#line 3398 "ripper.y"
9333 {
9334#if 0
9335 /* magic number for rest_id in iseq_set_arguments() */
9336 (yyval.val) = new_args(p, (yyvsp[-1].val), Qnone, NODE_SPECIAL_EXCESSIVE_COMMA, Qnone, new_args_tail(p, Qnone, Qnone, Qnone, &(yylsp[-1])), &(yyloc));
9337#endif
9338 {VALUE v1;v1=dispatch0(excessed_comma);(yyval.val)=new_args(p, (yyvsp[-1].val), Qnone, v1, Qnone, new_args_tail(p, Qnone, Qnone, Qnone, NULL), NULL);}
9339 }
9340#line 9336 "ripper.c"
9341 break;
9342
9343 case 409:
9344#line 3406 "ripper.y"
9345 {
9346 (yyval.val) = new_args(p, (yyvsp[-5].val), Qnone, (yyvsp[-3].val), (yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
9347 }
9348#line 9344 "ripper.c"
9349 break;
9350
9351 case 410:
9352#line 3410 "ripper.y"
9353 {
9354 (yyval.val) = new_args(p, (yyvsp[-1].val), Qnone, Qnone, Qnone, (yyvsp[0].val), &(yyloc));
9355 }
9356#line 9352 "ripper.c"
9357 break;
9358
9359 case 411:
9360#line 3414 "ripper.y"
9361 {
9362 (yyval.val) = new_args(p, Qnone, (yyvsp[-3].val), (yyvsp[-1].val), Qnone, (yyvsp[0].val), &(yyloc));
9363 }
9364#line 9360 "ripper.c"
9365 break;
9366
9367 case 412:
9368#line 3418 "ripper.y"
9369 {
9370 (yyval.val) = new_args(p, Qnone, (yyvsp[-5].val), (yyvsp[-3].val), (yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
9371 }
9372#line 9368 "ripper.c"
9373 break;
9374
9375 case 413:
9376#line 3422 "ripper.y"
9377 {
9378 (yyval.val) = new_args(p, Qnone, (yyvsp[-1].val), Qnone, Qnone, (yyvsp[0].val), &(yyloc));
9379 }
9380#line 9376 "ripper.c"
9381 break;
9382
9383 case 414:
9384#line 3426 "ripper.y"
9385 {
9386 (yyval.val) = new_args(p, Qnone, (yyvsp[-3].val), Qnone, (yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
9387 }
9388#line 9384 "ripper.c"
9389 break;
9390
9391 case 415:
9392#line 3430 "ripper.y"
9393 {
9394 (yyval.val) = new_args(p, Qnone, Qnone, (yyvsp[-1].val), Qnone, (yyvsp[0].val), &(yyloc));
9395 }
9396#line 9392 "ripper.c"
9397 break;
9398
9399 case 416:
9400#line 3434 "ripper.y"
9401 {
9402 (yyval.val) = new_args(p, Qnone, Qnone, (yyvsp[-3].val), (yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
9403 }
9404#line 9400 "ripper.c"
9405 break;
9406
9407 case 417:
9408#line 3438 "ripper.y"
9409 {
9410 (yyval.val) = new_args(p, Qnone, Qnone, Qnone, Qnone, (yyvsp[0].val), &(yyloc));
9411 }
9412#line 9408 "ripper.c"
9413 break;
9414
9415 case 419:
9416#line 3445 "ripper.y"
9417 {
9418 p->command_start = TRUE;
9419 }
9420#line 9416 "ripper.c"
9421 break;
9422
9423 case 420:
9424#line 3451 "ripper.y"
9425 {
9426 p->cur_arg = 0;
9428#if 0
9429 (yyval.val) = 0;
9430#endif
9431 {VALUE v1,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11;v1=Qnil;v2=Qnil;v3=Qnil;v4=Qnil;v5=Qnil;v6=Qnil;v7=Qnil;v8=dispatch7(params,v1,v2,v3,v4,v5,v6,v7);v9=v8;v10=escape_Qundef((yyvsp[-1].val));v11=dispatch2(block_var,v9,v10);(yyval.val)=v11;}
9432 }
9433#line 9429 "ripper.c"
9434 break;
9435
9436 case 421:
9437#line 3460 "ripper.y"
9438 {
9439 p->cur_arg = 0;
9441#if 0
9442 (yyval.val) = (yyvsp[-2].val);
9443#endif
9444 {VALUE v1,v2,v3;v1=escape_Qundef((yyvsp[-2].val));v2=escape_Qundef((yyvsp[-1].val));v3=dispatch2(block_var,v1,v2);(yyval.val)=v3;}
9445 }
9446#line 9442 "ripper.c"
9447 break;
9448
9449 case 422:
9450#line 3472 "ripper.y"
9451 {
9452 (yyval.val) = 0;
9453 }
9454#line 9450 "ripper.c"
9455 break;
9456
9457 case 423:
9458#line 3476 "ripper.y"
9459 {
9460#if 0
9461 (yyval.val) = 0;
9462#endif
9463 (yyval.val)=(yyvsp[-1].val);
9464 }
9465#line 9461 "ripper.c"
9466 break;
9467
9468 case 424:
9469#line 3485 "ripper.y"
9470 {(yyval.val)=rb_ary_new3(1, get_value((yyvsp[0].val)));}
9471#line 9467 "ripper.c"
9472 break;
9473
9474 case 425:
9475#line 3487 "ripper.y"
9476 {(yyval.val)=rb_ary_push((yyvsp[-2].val), get_value((yyvsp[0].val)));}
9477#line 9473 "ripper.c"
9478 break;
9479
9480 case 426:
9481#line 3491 "ripper.y"
9482 {
9483 new_bv(p, get_id((yyvsp[0].val)));
9484 (yyval.val)=get_value((yyvsp[0].val));
9485 }
9486#line 9482 "ripper.c"
9487 break;
9488
9489 case 427:
9490#line 3496 "ripper.y"
9491 {
9492 (yyval.val) = 0;
9493 }
9494#line 9490 "ripper.c"
9495 break;
9496
9497 case 428:
9498#line 3501 "ripper.y"
9499 {
9500 (yyval.vars) = dyna_push(p);
9501 }
9502#line 9498 "ripper.c"
9503 break;
9504
9505 case 429:
9506#line 3504 "ripper.y"
9507 {
9508 (yyval.num) = p->lex.lpar_beg;
9509 p->lex.lpar_beg = p->lex.paren_nest;
9510 }
9511#line 9507 "ripper.c"
9512 break;
9513
9514 case 430:
9515#line 3508 "ripper.y"
9516 {
9517 (yyval.num) = p->max_numparam;
9518 p->max_numparam = 0;
9519 }
9520#line 9516 "ripper.c"
9521 break;
9522
9523 case 431:
9524#line 3512 "ripper.y"
9525 {
9526 (yyval.node) = numparam_push(p);
9527 }
9528#line 9524 "ripper.c"
9529 break;
9530
9531 case 432:
9532#line 3516 "ripper.y"
9533 {
9534 CMDARG_PUSH(0);
9535 }
9536#line 9532 "ripper.c"
9537 break;
9538
9539 case 433:
9540#line 3520 "ripper.y"
9541 {
9542 int max_numparam = p->max_numparam;
9543 p->lex.lpar_beg = (yyvsp[-5].num);
9544 p->max_numparam = (yyvsp[-4].num);
9545 CMDARG_POP();
9546 (yyvsp[-2].val) = args_with_numbered(p, (yyvsp[-2].val), max_numparam);
9547#if 0
9548 {
9549 YYLTYPE loc = code_loc_gen(&(yylsp[-2]), &(yylsp[0]));
9550 (yyval.val) = NEW_LAMBDA((yyvsp[-2].val), (yyvsp[0].val), &loc);
9551 nd_set_line((yyval.val)->nd_body, (yylsp[0]).end_pos.lineno);
9552 nd_set_line((yyval.val), (yylsp[-2]).end_pos.lineno);
9553 }
9554#endif
9555 {VALUE v1,v2,v3;v1=(yyvsp[-2].val);v2=(yyvsp[0].val);v3=dispatch2(lambda,v1,v2);(yyval.val)=v3;}
9556 numparam_pop(p, (yyvsp[-3].node));
9557 dyna_pop(p, (yyvsp[-6].vars));
9558 }
9559#line 9555 "ripper.c"
9560 break;
9561
9562 case 434:
9563#line 3541 "ripper.y"
9564 {
9565#if 0
9566 (yyval.val) = (yyvsp[-2].val);
9568#endif
9569 {VALUE v1,v2;v1=(yyvsp[-2].val);v2=dispatch1(paren,v1);(yyval.val)=v2;}
9570 }
9571#line 9567 "ripper.c"
9572 break;
9573
9574 case 435:
9575#line 3549 "ripper.y"
9576 {
9577#if 0
9578 if (!args_info_empty_p((yyvsp[0].val)->nd_ainfo))
9580#endif
9581 (yyval.val) = (yyvsp[0].val);
9582 }
9583#line 9579 "ripper.c"
9584 break;
9585
9586 case 436:
9587#line 3559 "ripper.y"
9588 {
9589 token_info_pop(p, "}", &(yylsp[0]));
9590 (yyval.val) = (yyvsp[-1].val);
9591 }
9592#line 9588 "ripper.c"
9593 break;
9594
9595 case 437:
9596#line 3564 "ripper.y"
9597 {
9598 (yyval.val) = (yyvsp[-1].val);
9599 }
9600#line 9596 "ripper.c"
9601 break;
9602
9603 case 438:
9604#line 3570 "ripper.y"
9605 {
9606 (yyval.val) = (yyvsp[-1].val);
9607#if 0
9608 (yyval.val)->nd_body->nd_loc = code_loc_gen(&(yylsp[-2]), &(yylsp[0]));
9609 nd_set_line((yyval.val), (yylsp[-2]).end_pos.lineno);
9610#endif
9611 }
9612#line 9608 "ripper.c"
9613 break;
9614
9615 case 439:
9616#line 3580 "ripper.y"
9617 {
9618#if 0
9619 if (nd_type((yyvsp[-1].val)) == NODE_YIELD) {
9620 compile_error(p, "block given to yield");
9621 }
9622 else {
9623 block_dup_check(p, (yyvsp[-1].val)->nd_args, (yyvsp[0].val));
9624 }
9625 (yyval.val) = method_add_block(p, (yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
9626 fixpos((yyval.val), (yyvsp[-1].val));
9627#endif
9628 {VALUE v1,v2,v3;v1=(yyvsp[-1].val);v2=(yyvsp[0].val);v3=dispatch2(method_add_block,v1,v2);(yyval.val)=v3;}
9629 }
9630#line 9626 "ripper.c"
9631 break;
9632
9633 case 440:
9634#line 3594 "ripper.y"
9635 {
9636#if 0
9637 (yyval.val) = new_qcall(p, (yyvsp[-2].val), (yyvsp[-3].val), (yyvsp[-1].val), (yyvsp[0].val), &(yylsp[-1]), &(yyloc));
9638#endif
9639 {VALUE v1,v2,v3,v4,v5,v6,v7;v1=(yyvsp[-3].val);v2=(yyvsp[-2].val);v3=(yyvsp[-1].val);v4=dispatch3(call,v1,v2,v3);v5=v4;v6=(yyvsp[0].val);v7=v6==Qundef ? v5 : dispatch2(method_add_arg,v5,v6);(yyval.val)=v7;}
9640 }
9641#line 9637 "ripper.c"
9642 break;
9643
9644 case 441:
9645#line 3601 "ripper.y"
9646 {
9647#if 0
9648 (yyval.val) = new_command_qcall(p, (yyvsp[-3].val), (yyvsp[-4].val), (yyvsp[-2].val), (yyvsp[-1].val), (yyvsp[0].val), &(yylsp[-2]), &(yyloc));
9649#endif
9650 {VALUE v1,v2,v3,v4,v5,v6,v7,v8;v1=(yyvsp[-4].val);v2=(yyvsp[-3].val);v3=(yyvsp[-2].val);v4=(yyvsp[-1].val);v5=dispatch4(command_call,v1,v2,v3,v4);v6=v5;v7=(yyvsp[0].val);v8=v7==Qundef ? v6 : dispatch2(method_add_block,v6,v7);(yyval.val)=v8;}
9651 }
9652#line 9648 "ripper.c"
9653 break;
9654
9655 case 442:
9656#line 3608 "ripper.y"
9657 {
9658#if 0
9659 (yyval.val) = new_command_qcall(p, (yyvsp[-3].val), (yyvsp[-4].val), (yyvsp[-2].val), (yyvsp[-1].val), (yyvsp[0].val), &(yylsp[-2]), &(yyloc));
9660#endif
9661 {VALUE v1,v2,v3,v4,v5,v6,v7,v8;v1=(yyvsp[-4].val);v2=(yyvsp[-3].val);v3=(yyvsp[-2].val);v4=(yyvsp[-1].val);v5=dispatch4(command_call,v1,v2,v3,v4);v6=v5;v7=(yyvsp[0].val);v8=dispatch2(method_add_block,v6,v7);(yyval.val)=v8;}
9662 }
9663#line 9659 "ripper.c"
9664 break;
9665
9666 case 443:
9667#line 3617 "ripper.y"
9668 {
9669#if 0
9670 (yyval.val) = (yyvsp[-1].val);
9671 (yyval.val)->nd_args = (yyvsp[0].val);
9672 nd_set_last_loc((yyvsp[-1].val), (yylsp[0]).end_pos);
9673#endif
9674 {VALUE v1,v2,v3,v4,v5;v1=(yyvsp[-1].val);v2=dispatch1(fcall,v1);v3=v2;v4=(yyvsp[0].val);v5=dispatch2(method_add_arg,v3,v4);(yyval.val)=v5;}
9675 }
9676#line 9672 "ripper.c"
9677 break;
9678
9679 case 444:
9680#line 3626 "ripper.y"
9681 {
9682#if 0
9683 (yyval.val) = new_qcall(p, (yyvsp[-2].val), (yyvsp[-3].val), (yyvsp[-1].val), (yyvsp[0].val), &(yylsp[-1]), &(yyloc));
9684 nd_set_line((yyval.val), (yylsp[-1]).end_pos.lineno);
9685#endif
9686 {VALUE v1,v2,v3,v4,v5,v6,v7;v1=(yyvsp[-3].val);v2=(yyvsp[-2].val);v3=(yyvsp[-1].val);v4=dispatch3(call,v1,v2,v3);v5=v4;v6=(yyvsp[0].val);v7=v6==Qundef ? v5 : dispatch2(method_add_arg,v5,v6);(yyval.val)=v7;}
9687 }
9688#line 9684 "ripper.c"
9689 break;
9690
9691 case 445:
9692#line 3634 "ripper.y"
9693 {
9694#if 0
9695 (yyval.val) = new_qcall(p, ID2VAL(idCOLON2), (yyvsp[-3].val), (yyvsp[-1].val), (yyvsp[0].val), &(yylsp[-1]), &(yyloc));
9696 nd_set_line((yyval.val), (yylsp[-1]).end_pos.lineno);
9697#endif
9698 {VALUE v1,v2,v3,v4,v5,v6,v7;v1=(yyvsp[-3].val);v2=ID2VAL(idCOLON2);v3=(yyvsp[-1].val);v4=dispatch3(call,v1,v2,v3);v5=v4;v6=(yyvsp[0].val);v7=dispatch2(method_add_arg,v5,v6);(yyval.val)=v7;}
9699 }
9700#line 9696 "ripper.c"
9701 break;
9702
9703 case 446:
9704#line 3642 "ripper.y"
9705 {
9706#if 0
9707 (yyval.val) = new_qcall(p, ID2VAL(idCOLON2), (yyvsp[-2].val), (yyvsp[0].val), Qnull, &(yylsp[0]), &(yyloc));
9708#endif
9709 {VALUE v1,v2,v3,v4;v1=(yyvsp[-2].val);v2=ID2VAL(idCOLON2);v3=(yyvsp[0].val);v4=dispatch3(call,v1,v2,v3);(yyval.val)=v4;}
9710 }
9711#line 9707 "ripper.c"
9712 break;
9713
9714 case 447:
9715#line 3649 "ripper.y"
9716 {
9717#if 0
9718 (yyval.val) = new_qcall(p, (yyvsp[-1].val), (yyvsp[-2].val), ID2VAL(idCall), (yyvsp[0].val), &(yylsp[-1]), &(yyloc));
9719 nd_set_line((yyval.val), (yylsp[-1]).end_pos.lineno);
9720#endif
9721 {VALUE v1,v2,v3,v4,v5,v6,v7;v1=(yyvsp[-2].val);v2=(yyvsp[-1].val);v3=ID2VAL(idCall);v4=dispatch3(call,v1,v2,v3);v5=v4;v6=(yyvsp[0].val);v7=dispatch2(method_add_arg,v5,v6);(yyval.val)=v7;}
9722 }
9723#line 9719 "ripper.c"
9724 break;
9725
9726 case 448:
9727#line 3657 "ripper.y"
9728 {
9729#if 0
9730 (yyval.val) = new_qcall(p, ID2VAL(idCOLON2), (yyvsp[-2].val), ID2VAL(idCall), (yyvsp[0].val), &(yylsp[-1]), &(yyloc));
9731 nd_set_line((yyval.val), (yylsp[-1]).end_pos.lineno);
9732#endif
9733 {VALUE v1,v2,v3,v4,v5,v6,v7;v1=(yyvsp[-2].val);v2=ID2VAL(idCOLON2);v3=ID2VAL(idCall);v4=dispatch3(call,v1,v2,v3);v5=v4;v6=(yyvsp[0].val);v7=dispatch2(method_add_arg,v5,v6);(yyval.val)=v7;}
9734 }
9735#line 9731 "ripper.c"
9736 break;
9737
9738 case 449:
9739#line 3665 "ripper.y"
9740 {
9741#if 0
9742 (yyval.val) = NEW_SUPER((yyvsp[0].val), &(yyloc));
9743#endif
9744 {VALUE v1,v2;v1=(yyvsp[0].val);v2=dispatch1(super,v1);(yyval.val)=v2;}
9745 }
9746#line 9742 "ripper.c"
9747 break;
9748
9749 case 450:
9750#line 3672 "ripper.y"
9751 {
9752#if 0
9753 (yyval.val) = NEW_ZSUPER(&(yyloc));
9754#endif
9755 {VALUE v1;v1=dispatch0(zsuper);(yyval.val)=v1;}
9756 }
9757#line 9753 "ripper.c"
9758 break;
9759
9760 case 451:
9761#line 3679 "ripper.y"
9762 {
9763#if 0
9764 if ((yyvsp[-3].val) && nd_type((yyvsp[-3].val)) == NODE_SELF)
9765 (yyval.val) = NEW_FCALL(tAREF, (yyvsp[-1].val), &(yyloc));
9766 else
9767 (yyval.val) = NEW_CALL((yyvsp[-3].val), tAREF, (yyvsp[-1].val), &(yyloc));
9768 fixpos((yyval.val), (yyvsp[-3].val));
9769#endif
9770 {VALUE v1,v2,v3;v1=(yyvsp[-3].val);v2=escape_Qundef((yyvsp[-1].val));v3=dispatch2(aref,v1,v2);(yyval.val)=v3;}
9771 }
9772#line 9768 "ripper.c"
9773 break;
9774
9775 case 452:
9776#line 3692 "ripper.y"
9777 {
9778 (yyval.val) = (yyvsp[-1].val);
9779#if 0
9780 (yyval.val)->nd_body->nd_loc = code_loc_gen(&(yylsp[-2]), &(yylsp[0]));
9781 nd_set_line((yyval.val), (yylsp[-2]).end_pos.lineno);
9782#endif
9783 }
9784#line 9780 "ripper.c"
9785 break;
9786
9787 case 453:
9788#line 3700 "ripper.y"
9789 {
9790 (yyval.val) = (yyvsp[-1].val);
9791#if 0
9792 (yyval.val)->nd_body->nd_loc = code_loc_gen(&(yylsp[-2]), &(yylsp[0]));
9793 nd_set_line((yyval.val), (yylsp[-2]).end_pos.lineno);
9794#endif
9795 }
9796#line 9792 "ripper.c"
9797 break;
9798
9799 case 454:
9800#line 3709 "ripper.y"
9801 {(yyval.vars) = dyna_push(p);}
9802#line 9798 "ripper.c"
9803 break;
9804
9805 case 455:
9806#line 3710 "ripper.y"
9807 {
9808 (yyval.num) = p->max_numparam;
9809 p->max_numparam = 0;
9810 }
9811#line 9807 "ripper.c"
9812 break;
9813
9814 case 456:
9815#line 3714 "ripper.y"
9816 {
9817 (yyval.node) = numparam_push(p);
9818 }
9819#line 9815 "ripper.c"
9820 break;
9821
9822 case 457:
9823#line 3718 "ripper.y"
9824 {
9825 int max_numparam = p->max_numparam;
9826 p->max_numparam = (yyvsp[-3].num);
9827 (yyvsp[-1].val) = args_with_numbered(p, (yyvsp[-1].val), max_numparam);
9828#if 0
9829 (yyval.val) = NEW_ITER((yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
9830#endif
9831 {VALUE v1,v2,v3;v1=escape_Qundef((yyvsp[-1].val));v2=(yyvsp[0].val);v3=dispatch2(brace_block,v1,v2);(yyval.val)=v3;}
9832 numparam_pop(p, (yyvsp[-2].node));
9833 dyna_pop(p, (yyvsp[-4].vars));
9834 }
9835#line 9831 "ripper.c"
9836 break;
9837
9838 case 458:
9839#line 3731 "ripper.y"
9840 {(yyval.vars) = dyna_push(p);}
9841#line 9837 "ripper.c"
9842 break;
9843
9844 case 459:
9845#line 3732 "ripper.y"
9846 {
9847 (yyval.num) = p->max_numparam;
9848 p->max_numparam = 0;
9849 }
9850#line 9846 "ripper.c"
9851 break;
9852
9853 case 460:
9854#line 3736 "ripper.y"
9855 {
9856 (yyval.node) = numparam_push(p);
9857 CMDARG_PUSH(0);
9858 }
9859#line 9855 "ripper.c"
9860 break;
9861
9862 case 461:
9863#line 3741 "ripper.y"
9864 {
9865 int max_numparam = p->max_numparam;
9866 p->max_numparam = (yyvsp[-3].num);
9867 (yyvsp[-1].val) = args_with_numbered(p, (yyvsp[-1].val), max_numparam);
9868#if 0
9869 (yyval.val) = NEW_ITER((yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
9870#endif
9871 {VALUE v1,v2,v3;v1=escape_Qundef((yyvsp[-1].val));v2=(yyvsp[0].val);v3=dispatch2(do_block,v1,v2);(yyval.val)=v3;}
9872 CMDARG_POP();
9873 numparam_pop(p, (yyvsp[-2].node));
9874 dyna_pop(p, (yyvsp[-4].vars));
9875 }
9876#line 9872 "ripper.c"
9877 break;
9878
9879 case 462:
9880#line 3756 "ripper.y"
9881 {
9882#if 0
9883 check_literal_when(p, (yyvsp[0].val), &(yylsp[0]));
9884 (yyval.val) = NEW_LIST((yyvsp[0].val), &(yyloc));
9885#endif
9886 {VALUE v1,v2,v3,v4;v1=dispatch0(args_new);v2=v1;v3=(yyvsp[0].val);v4=dispatch2(args_add,v2,v3);(yyval.val)=v4;}
9887 }
9888#line 9884 "ripper.c"
9889 break;
9890
9891 case 463:
9892#line 3764 "ripper.y"
9893 {
9894#if 0
9895 (yyval.val) = NEW_SPLAT((yyvsp[0].val), &(yyloc));
9896#endif
9897 {VALUE v1,v2,v3,v4;v1=dispatch0(args_new);v2=v1;v3=(yyvsp[0].val);v4=dispatch2(args_add_star,v2,v3);(yyval.val)=v4;}
9898 }
9899#line 9895 "ripper.c"
9900 break;
9901
9902 case 464:
9903#line 3771 "ripper.y"
9904 {
9905#if 0
9906 check_literal_when(p, (yyvsp[0].val), &(yylsp[0]));
9907 (yyval.val) = last_arg_append(p, (yyvsp[-2].val), (yyvsp[0].val), &(yyloc));
9908#endif
9909 {VALUE v1,v2,v3;v1=(yyvsp[-2].val);v2=(yyvsp[0].val);v3=dispatch2(args_add,v1,v2);(yyval.val)=v3;}
9910 }
9911#line 9907 "ripper.c"
9912 break;
9913
9914 case 465:
9915#line 3779 "ripper.y"
9916 {
9917#if 0
9918 (yyval.val) = rest_arg_append(p, (yyvsp[-3].val), (yyvsp[0].val), &(yyloc));
9919#endif
9920 {VALUE v1,v2,v3;v1=(yyvsp[-3].val);v2=(yyvsp[0].val);v3=dispatch2(args_add_star,v1,v2);(yyval.val)=v3;}
9921 }
9922#line 9918 "ripper.c"
9923 break;
9924
9925 case 466:
9926#line 3790 "ripper.y"
9927 {
9928#if 0
9929 (yyval.val) = NEW_WHEN((yyvsp[-3].val), (yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
9930 fixpos((yyval.val), (yyvsp[-3].val));
9931#endif
9932 {VALUE v1,v2,v3,v4;v1=(yyvsp[-3].val);v2=(yyvsp[-1].val);v3=escape_Qundef((yyvsp[0].val));v4=dispatch3(when,v1,v2,v3);(yyval.val)=v4;}
9933 }
9934#line 9930 "ripper.c"
9935 break;
9936
9937 case 469:
9938#line 3804 "ripper.y"
9939 {
9940 SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
9941 p->command_start = FALSE;
9942 (yyval.num) = p->in_kwarg;
9943 p->in_kwarg = 1;
9944 }
9945#line 9941 "ripper.c"
9946 break;
9947
9948 case 470:
9949#line 3810 "ripper.y"
9950 {(yyval.tbl) = push_pvtbl(p);}
9951#line 9947 "ripper.c"
9952 break;
9953
9954 case 471:
9955#line 3811 "ripper.y"
9956 {(yyval.tbl) = push_pktbl(p);}
9957#line 9953 "ripper.c"
9958 break;
9959
9960 case 472:
9961#line 3813 "ripper.y"
9962 {pop_pktbl(p, (yyvsp[-2].tbl));}
9963#line 9959 "ripper.c"
9964 break;
9965
9966 case 473:
9967#line 3814 "ripper.y"
9968 {pop_pvtbl(p, (yyvsp[-4].tbl));}
9969#line 9965 "ripper.c"
9970 break;
9971
9972 case 474:
9973#line 3815 "ripper.y"
9974 {
9975 p->in_kwarg = !!(yyvsp[-6].num);
9976 }
9977#line 9973 "ripper.c"
9978 break;
9979
9980 case 475:
9981#line 3820 "ripper.y"
9982 {
9983#if 0
9984 (yyval.val) = NEW_IN((yyvsp[-6].val), (yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
9985#endif
9986 {VALUE v1,v2,v3,v4;v1=(yyvsp[-6].val);v2=(yyvsp[-1].val);v3=escape_Qundef((yyvsp[0].val));v4=dispatch3(in,v1,v2,v3);(yyval.val)=v4;}
9987 }
9988#line 9984 "ripper.c"
9989 break;
9990
9991 case 479:
9992#line 3834 "ripper.y"
9993 {
9994#if 0
9995 (yyval.val) = new_if(p, (yyvsp[0].val), remove_begin((yyvsp[-2].val)), 0, &(yyloc));
9996 fixpos((yyval.val), (yyvsp[0].val));
9997#endif
9998 {VALUE v1,v2,v3;v1=(yyvsp[0].val);v2=(yyvsp[-2].val);v3=dispatch2(if_mod,v1,v2);(yyval.val)=v3;}
9999 }
10000#line 9996 "ripper.c"
10001 break;
10002
10003 case 480:
10004#line 3842 "ripper.y"
10005 {
10006#if 0
10007 (yyval.val) = new_unless(p, (yyvsp[0].val), remove_begin((yyvsp[-2].val)), 0, &(yyloc));
10008 fixpos((yyval.val), (yyvsp[0].val));
10009#endif
10010 {VALUE v1,v2,v3;v1=(yyvsp[0].val);v2=(yyvsp[-2].val);v3=dispatch2(unless_mod,v1,v2);(yyval.val)=v3;}
10011 }
10012#line 10008 "ripper.c"
10013 break;
10014
10015 case 482:
10016#line 3853 "ripper.y"
10017 {
10018 (yyval.val) = new_array_pattern_tail(p, Qnone, 1, 0, Qnone, &(yyloc));
10019 (yyval.val) = new_array_pattern(p, Qnone, get_value((yyvsp[-1].val)), (yyval.val), &(yyloc));
10020 }
10021#line 10017 "ripper.c"
10022 break;
10023
10024 case 483:
10025#line 3858 "ripper.y"
10026 {
10027 (yyval.val) = new_array_pattern(p, Qnone, get_value((yyvsp[-2].val)), (yyvsp[0].val), &(yyloc));
10028#if 0
10029 nd_set_first_loc((yyval.val), (yylsp[-2]).beg_pos);
10030#endif
10031
10032 }
10033#line 10029 "ripper.c"
10034 break;
10035
10036 case 484:
10037#line 3866 "ripper.y"
10038 {
10039 (yyval.val) = new_array_pattern(p, Qnone, Qnone, (yyvsp[0].val), &(yyloc));
10040 }
10041#line 10037 "ripper.c"
10042 break;
10043
10044 case 485:
10045#line 3870 "ripper.y"
10046 {
10047 (yyval.val) = new_hash_pattern(p, Qnone, (yyvsp[0].val), &(yyloc));
10048 }
10049#line 10045 "ripper.c"
10050 break;
10051
10052 case 487:
10053#line 3879 "ripper.y"
10054 {
10055#if 0
10056 NODE *n = NEW_LIST((yyvsp[-2].val), &(yyloc));
10057 n = list_append(p, n, (yyvsp[0].val));
10058 (yyval.val) = new_hash(p, n, &(yyloc));
10059#endif
10060 {VALUE v1,v2,v3,v4;v1=(yyvsp[-2].val);v2=STATIC_ID2SYM(id_assoc);v3=(yyvsp[0].val);v4=dispatch3(binary,v1,v2,v3);(yyval.val)=v4;}
10061 }
10062#line 10058 "ripper.c"
10063 break;
10064
10065 case 489:
10066#line 3891 "ripper.y"
10067 {
10068#if 0
10069 (yyval.val) = NEW_NODE(NODE_OR, (yyvsp[-2].val), (yyvsp[0].val), 0, &(yyloc));
10070#endif
10071 {VALUE v1,v2,v3,v4;v1=(yyvsp[-2].val);v2=STATIC_ID2SYM(idOr);v3=(yyvsp[0].val);v4=dispatch3(binary,v1,v2,v3);(yyval.val)=v4;}
10072 }
10073#line 10069 "ripper.c"
10074 break;
10075
10076 case 491:
10077#line 3900 "ripper.y"
10078 {(yyval.tbl) = push_pktbl(p);}
10079#line 10075 "ripper.c"
10080 break;
10081
10082 case 492:
10083#line 3901 "ripper.y"
10084 {(yyval.tbl) = push_pktbl(p);}
10085#line 10081 "ripper.c"
10086 break;
10087
10088 case 494:
10089#line 3905 "ripper.y"
10090 {
10091 pop_pktbl(p, (yyvsp[-2].tbl));
10092 (yyval.val) = new_array_pattern(p, (yyvsp[-3].val), Qnone, (yyvsp[-1].val), &(yyloc));
10093#if 0
10094 nd_set_first_loc((yyval.val), (yylsp[-3]).beg_pos);
10095#endif
10096
10097 }
10098#line 10094 "ripper.c"
10099 break;
10100
10101 case 495:
10102#line 3914 "ripper.y"
10103 {
10104 pop_pktbl(p, (yyvsp[-2].tbl));
10105 (yyval.val) = new_hash_pattern(p, (yyvsp[-3].val), (yyvsp[-1].val), &(yyloc));
10106#if 0
10107 nd_set_first_loc((yyval.val), (yylsp[-3]).beg_pos);
10108#endif
10109
10110 }
10111#line 10107 "ripper.c"
10112 break;
10113
10114 case 496:
10115#line 3923 "ripper.y"
10116 {
10117 (yyval.val) = new_array_pattern_tail(p, Qnone, 0, 0, Qnone, &(yyloc));
10118 (yyval.val) = new_array_pattern(p, (yyvsp[-2].val), Qnone, (yyval.val), &(yyloc));
10119 }
10120#line 10116 "ripper.c"
10121 break;
10122
10123 case 497:
10124#line 3928 "ripper.y"
10125 {
10126 pop_pktbl(p, (yyvsp[-2].tbl));
10127 (yyval.val) = new_array_pattern(p, (yyvsp[-3].val), Qnone, (yyvsp[-1].val), &(yyloc));
10128#if 0
10129 nd_set_first_loc((yyval.val), (yylsp[-3]).beg_pos);
10130#endif
10131
10132 }
10133#line 10129 "ripper.c"
10134 break;
10135
10136 case 498:
10137#line 3937 "ripper.y"
10138 {
10139 pop_pktbl(p, (yyvsp[-2].tbl));
10140 (yyval.val) = new_hash_pattern(p, (yyvsp[-3].val), (yyvsp[-1].val), &(yyloc));
10141#if 0
10142 nd_set_first_loc((yyval.val), (yylsp[-3]).beg_pos);
10143#endif
10144
10145 }
10146#line 10142 "ripper.c"
10147 break;
10148
10149 case 499:
10150#line 3946 "ripper.y"
10151 {
10152 (yyval.val) = new_array_pattern_tail(p, Qnone, 0, 0, Qnone, &(yyloc));
10153 (yyval.val) = new_array_pattern(p, (yyvsp[-2].val), Qnone, (yyval.val), &(yyloc));
10154 }
10155#line 10151 "ripper.c"
10156 break;
10157
10158 case 500:
10159#line 3950 "ripper.y"
10160 {(yyval.tbl) = push_pktbl(p);}
10161#line 10157 "ripper.c"
10162 break;
10163
10164 case 501:
10165#line 3951 "ripper.y"
10166 {
10167 pop_pktbl(p, (yyvsp[-2].tbl));
10168 (yyval.val) = new_array_pattern(p, Qnone, Qnone, (yyvsp[-1].val), &(yyloc));
10169 }
10170#line 10166 "ripper.c"
10171 break;
10172
10173 case 502:
10174#line 3956 "ripper.y"
10175 {
10176 (yyval.val) = new_array_pattern_tail(p, Qnone, 0, 0, Qnone, &(yyloc));
10177 (yyval.val) = new_array_pattern(p, Qnone, Qnone, (yyval.val), &(yyloc));
10178 }
10179#line 10175 "ripper.c"
10180 break;
10181
10182 case 503:
10183#line 3961 "ripper.y"
10184 {
10185 (yyval.tbl) = push_pktbl(p);
10186 (yyvsp[0].num) = p->in_kwarg;
10187 p->in_kwarg = 0;
10188 }
10189#line 10185 "ripper.c"
10190 break;
10191
10192 case 504:
10193#line 3967 "ripper.y"
10194 {
10195 pop_pktbl(p, (yyvsp[-2].tbl));
10196 p->in_kwarg = (yyvsp[-3].num);
10197 (yyval.val) = new_hash_pattern(p, Qnone, (yyvsp[-1].val), &(yyloc));
10198 }
10199#line 10195 "ripper.c"
10200 break;
10201
10202 case 505:
10203#line 3973 "ripper.y"
10204 {
10205 (yyval.val) = new_hash_pattern_tail(p, Qnone, 0, &(yyloc));
10206 (yyval.val) = new_hash_pattern(p, Qnone, (yyval.val), &(yyloc));
10207 }
10208#line 10204 "ripper.c"
10209 break;
10210
10211 case 506:
10212#line 3977 "ripper.y"
10213 {(yyval.tbl) = push_pktbl(p);}
10214#line 10210 "ripper.c"
10215 break;
10216
10217 case 507:
10218#line 3978 "ripper.y"
10219 {
10220 pop_pktbl(p, (yyvsp[-2].tbl));
10221 (yyval.val) = (yyvsp[-1].val);
10222 }
10223#line 10219 "ripper.c"
10224 break;
10225
10226 case 508:
10227#line 3985 "ripper.y"
10228 {
10229#if 0
10230 NODE *pre_args = NEW_LIST((yyvsp[0].val), &(yyloc));
10231 (yyval.val) = new_array_pattern_tail(p, pre_args, 0, 0, Qnone, &(yyloc));
10232#endif
10233 (yyval.val) = new_array_pattern_tail(p, rb_ary_new_from_args(1, get_value((yyvsp[0].val))), 0, 0, Qnone, &(yyloc));
10234
10235 }
10236#line 10232 "ripper.c"
10237 break;
10238
10239 case 509:
10240#line 3994 "ripper.y"
10241 {
10242 (yyval.val) = new_array_pattern_tail(p, (yyvsp[0].val), 1, 0, Qnone, &(yyloc));
10243 }
10244#line 10240 "ripper.c"
10245 break;
10246
10247 case 510:
10248#line 3998 "ripper.y"
10249 {
10250#if 0
10251 (yyval.val) = new_array_pattern_tail(p, list_concat((yyvsp[-1].val), (yyvsp[0].val)), 0, 0, Qnone, &(yyloc));
10252#endif
10253 VALUE pre_args = rb_ary_concat((yyvsp[-1].val), get_value((yyvsp[0].val)));
10254 (yyval.val) = new_array_pattern_tail(p, pre_args, 0, 0, Qnone, &(yyloc));
10255
10256 }
10257#line 10253 "ripper.c"
10258 break;
10259
10260 case 511:
10261#line 4007 "ripper.y"
10262 {
10263 (yyval.val) = new_array_pattern_tail(p, (yyvsp[-2].val), 1, (yyvsp[0].val), Qnone, &(yyloc));
10264 }
10265#line 10261 "ripper.c"
10266 break;
10267
10268 case 512:
10269#line 4011 "ripper.y"
10270 {
10271 (yyval.val) = new_array_pattern_tail(p, (yyvsp[-4].val), 1, (yyvsp[-2].val), (yyvsp[0].val), &(yyloc));
10272 }
10273#line 10269 "ripper.c"
10274 break;
10275
10276 case 513:
10277#line 4015 "ripper.y"
10278 {
10279 (yyval.val) = new_array_pattern_tail(p, (yyvsp[-1].val), 1, 0, Qnone, &(yyloc));
10280 }
10281#line 10277 "ripper.c"
10282 break;
10283
10284 case 514:
10285#line 4019 "ripper.y"
10286 {
10287 (yyval.val) = new_array_pattern_tail(p, (yyvsp[-3].val), 1, 0, (yyvsp[0].val), &(yyloc));
10288 }
10289#line 10285 "ripper.c"
10290 break;
10291
10292 case 516:
10293#line 4026 "ripper.y"
10294 {
10295 (yyval.val) = (yyvsp[-1].val);
10296 }
10297#line 10293 "ripper.c"
10298 break;
10299
10300 case 517:
10301#line 4030 "ripper.y"
10302 {
10303#if 0
10304 (yyval.val) = list_concat((yyvsp[-2].val), (yyvsp[-1].val));
10305#endif
10306 (yyval.val)=rb_ary_concat((yyvsp[-2].val), get_value((yyvsp[-1].val)));
10307 }
10308#line 10304 "ripper.c"
10309 break;
10310
10311 case 518:
10312#line 4039 "ripper.y"
10313 {
10314 (yyval.val) = new_array_pattern_tail(p, Qnone, 1, (yyvsp[0].val), Qnone, &(yyloc));
10315 }
10316#line 10312 "ripper.c"
10317 break;
10318
10319 case 519:
10320#line 4043 "ripper.y"
10321 {
10322 (yyval.val) = new_array_pattern_tail(p, Qnone, 1, (yyvsp[-2].val), (yyvsp[0].val), &(yyloc));
10323 }
10324#line 10320 "ripper.c"
10325 break;
10326
10327 case 520:
10328#line 4047 "ripper.y"
10329 {
10330 (yyval.val) = new_array_pattern_tail(p, Qnone, 1, 0, Qnone, &(yyloc));
10331 }
10332#line 10328 "ripper.c"
10333 break;
10334
10335 case 521:
10336#line 4051 "ripper.y"
10337 {
10338 (yyval.val) = new_array_pattern_tail(p, Qnone, 1, 0, (yyvsp[0].val), &(yyloc));
10339 }
10340#line 10336 "ripper.c"
10341 break;
10342
10343 case 523:
10344#line 4058 "ripper.y"
10345 {
10346#if 0
10347 (yyval.val) = list_concat((yyvsp[-2].val), (yyvsp[0].val));
10348#endif
10349 (yyval.val)=rb_ary_concat((yyvsp[-2].val), get_value((yyvsp[0].val)));
10350 }
10351#line 10347 "ripper.c"
10352 break;
10353
10354 case 524:
10355#line 4067 "ripper.y"
10356 {
10357#if 0
10358 (yyval.val) = NEW_LIST((yyvsp[0].val), &(yyloc));
10359#endif
10360 (yyval.val)=rb_ary_new_from_args(1, get_value((yyvsp[0].val)));
10361 }
10362#line 10358 "ripper.c"
10363 break;
10364
10365 case 525:
10366#line 4076 "ripper.y"
10367 {
10368 (yyval.val) = new_hash_pattern_tail(p, new_unique_key_hash(p, (yyvsp[-2].val), &(yyloc)), (yyvsp[0].val), &(yyloc));
10369 }
10370#line 10366 "ripper.c"
10371 break;
10372
10373 case 526:
10374#line 4080 "ripper.y"
10375 {
10376 (yyval.val) = new_hash_pattern_tail(p, new_unique_key_hash(p, (yyvsp[0].val), &(yyloc)), 0, &(yyloc));
10377 }
10378#line 10374 "ripper.c"
10379 break;
10380
10381 case 527:
10382#line 4084 "ripper.y"
10383 {
10384 (yyval.val) = new_hash_pattern_tail(p, new_unique_key_hash(p, (yyvsp[-1].val), &(yyloc)), 0, &(yyloc));
10385 }
10386#line 10382 "ripper.c"
10387 break;
10388
10389 case 528:
10390#line 4088 "ripper.y"
10391 {
10392 (yyval.val) = new_hash_pattern_tail(p, new_hash(p, Qnone, &(yyloc)), (yyvsp[0].val), &(yyloc));
10393 }
10394#line 10390 "ripper.c"
10395 break;
10396
10397 case 529:
10398#line 4092 "ripper.y"
10399 {
10400 (yyval.val) = new_hash_pattern_tail(p, new_unique_key_hash(p, (yyvsp[-2].val), &(yyloc)), ID2VAL(idNil), &(yyloc));
10401 }
10402#line 10398 "ripper.c"
10403 break;
10404
10405 case 530:
10406#line 4096 "ripper.y"
10407 {
10408 (yyval.val) = new_hash_pattern_tail(p, new_hash(p, Qnone, &(yyloc)), ID2VAL(idNil), &(yyloc));
10409 }
10410#line 10406 "ripper.c"
10411 break;
10412
10413 case 531:
10414#line 4102 "ripper.y"
10415 {(yyval.val)=rb_ary_new_from_args(1, (yyvsp[0].val));}
10416#line 10412 "ripper.c"
10417 break;
10418
10419 case 532:
10420#line 4104 "ripper.y"
10421 {
10422#if 0
10423 (yyval.val) = list_concat((yyvsp[-2].val), (yyvsp[0].val));
10424#endif
10425 (yyval.val)=rb_ary_push((yyvsp[-2].val), (yyvsp[0].val));
10426 }
10427#line 10423 "ripper.c"
10428 break;
10429
10430 case 533:
10431#line 4113 "ripper.y"
10432 {
10433 error_duplicate_pattern_key(p, get_id((yyvsp[-1].val)), &(yylsp[-1]));
10434#if 0
10435 (yyval.val) = list_append(p, NEW_LIST(NEW_LIT(ID2SYM((yyvsp[-1].val)), &(yyloc)), &(yyloc)), (yyvsp[0].val));
10436#endif
10437 (yyval.val)=rb_ary_new_from_args(2, get_value((yyvsp[-1].val)), get_value((yyvsp[0].val)));
10438 }
10439#line 10435 "ripper.c"
10440 break;
10441
10442 case 534:
10443#line 4121 "ripper.y"
10444 {
10445 error_duplicate_pattern_key(p, get_id((yyvsp[0].val)), &(yylsp[0]));
10446 if ((yyvsp[0].val) && !is_local_id(get_id((yyvsp[0].val)))) {
10447 yyerror1(&(yylsp[0]), "key must be valid as local variables");
10448 }
10449 error_duplicate_pattern_variable(p, get_id((yyvsp[0].val)), &(yylsp[0]));
10450#if 0
10451 (yyval.val) = list_append(p, NEW_LIST(NEW_LIT(ID2SYM((yyvsp[0].val)), &(yyloc)), &(yyloc)), assignable(p, (yyvsp[0].val), 0, &(yyloc)));
10452#endif
10453 (yyval.val)=rb_ary_new_from_args(2, get_value((yyvsp[0].val)), Qnil);
10454 }
10455#line 10451 "ripper.c"
10456 break;
10457
10458 case 536:
10459#line 4136 "ripper.y"
10460 {
10461 YYLTYPE loc = code_loc_gen(&(yylsp[-2]), &(yylsp[0]));
10462#if 0
10463 if (!(yyvsp[-1].val) || nd_type((yyvsp[-1].val)) == NODE_STR) {
10464 NODE *node = dsym_node(p, (yyvsp[-1].val), &loc);
10465 (yyval.val) = SYM2ID(node->nd_lit);
10466 }
10467#endif
10468 if (ripper_is_node_yylval((yyvsp[-1].val)) && RNODE((yyvsp[-1].val))->nd_cval) {
10469 VALUE label = RNODE((yyvsp[-1].val))->nd_cval;
10470 VALUE rval = RNODE((yyvsp[-1].val))->nd_rval;
10471 (yyval.val) = ripper_new_yylval(p, rb_intern_str(label), rval, label);
10472 RNODE((yyval.val))->nd_loc = loc;
10473 }
10474
10475 else {
10476 yyerror1(&loc, "symbol literal with interpolation is not allowed");
10477 (yyval.val) = 0;
10478 }
10479 }
10480#line 10476 "ripper.c"
10481 break;
10482
10483 case 537:
10484#line 4159 "ripper.y"
10485 {
10486 (yyval.val) = (yyvsp[0].val);
10487 }
10488#line 10484 "ripper.c"
10489 break;
10490
10491 case 538:
10492#line 4163 "ripper.y"
10493 {
10494 (yyval.val) = 0;
10495 }
10496#line 10492 "ripper.c"
10497 break;
10498
10499 case 539:
10500#line 4169 "ripper.y"
10501 {
10502 (yyval.val) = 0;
10503 }
10504#line 10500 "ripper.c"
10505 break;
10506
10507 case 541:
10508#line 4176 "ripper.y"
10509 {
10510#if 0
10511 value_expr((yyvsp[-2].val));
10512 value_expr((yyvsp[0].val));
10513 (yyval.val) = NEW_DOT2((yyvsp[-2].val), (yyvsp[0].val), &(yyloc));
10514#endif
10515 {VALUE v1,v2,v3;v1=(yyvsp[-2].val);v2=(yyvsp[0].val);v3=dispatch2(dot2,v1,v2);(yyval.val)=v3;}
10516 }
10517#line 10513 "ripper.c"
10518 break;
10519
10520 case 542:
10521#line 4185 "ripper.y"
10522 {
10523#if 0
10524 value_expr((yyvsp[-2].val));
10525 value_expr((yyvsp[0].val));
10526 (yyval.val) = NEW_DOT3((yyvsp[-2].val), (yyvsp[0].val), &(yyloc));
10527#endif
10528 {VALUE v1,v2,v3;v1=(yyvsp[-2].val);v2=(yyvsp[0].val);v3=dispatch2(dot3,v1,v2);(yyval.val)=v3;}
10529 }
10530#line 10526 "ripper.c"
10531 break;
10532
10533 case 543:
10534#line 4194 "ripper.y"
10535 {
10536#if 0
10537 YYLTYPE loc;
10538 loc.beg_pos = (yylsp[0]).end_pos;
10539 loc.end_pos = (yylsp[0]).end_pos;
10540
10541 value_expr((yyvsp[-1].val));
10542 (yyval.val) = NEW_DOT2((yyvsp[-1].val), new_nil(&loc), &(yyloc));
10543#endif
10544 {VALUE v1,v2,v3;v1=(yyvsp[-1].val);v2=Qnil;v3=dispatch2(dot2,v1,v2);(yyval.val)=v3;}
10545 }
10546#line 10542 "ripper.c"
10547 break;
10548
10549 case 544:
10550#line 4206 "ripper.y"
10551 {
10552#if 0
10553 YYLTYPE loc;
10554 loc.beg_pos = (yylsp[0]).end_pos;
10555 loc.end_pos = (yylsp[0]).end_pos;
10556
10557 value_expr((yyvsp[-1].val));
10558 (yyval.val) = NEW_DOT3((yyvsp[-1].val), new_nil(&loc), &(yyloc));
10559#endif
10560 {VALUE v1,v2,v3;v1=(yyvsp[-1].val);v2=Qnil;v3=dispatch2(dot3,v1,v2);(yyval.val)=v3;}
10561 }
10562#line 10558 "ripper.c"
10563 break;
10564
10565 case 548:
10566#line 4221 "ripper.y"
10567 {
10568#if 0
10569 YYLTYPE loc;
10570 loc.beg_pos = (yylsp[-1]).beg_pos;
10571 loc.end_pos = (yylsp[-1]).beg_pos;
10572
10573 value_expr((yyvsp[0].val));
10574 (yyval.val) = NEW_DOT2(new_nil(&loc), (yyvsp[0].val), &(yyloc));
10575#endif
10576 {VALUE v1,v2,v3;v1=Qnil;v2=(yyvsp[0].val);v3=dispatch2(dot2,v1,v2);(yyval.val)=v3;}
10577 }
10578#line 10574 "ripper.c"
10579 break;
10580
10581 case 549:
10582#line 4233 "ripper.y"
10583 {
10584#if 0
10585 YYLTYPE loc;
10586 loc.beg_pos = (yylsp[-1]).beg_pos;
10587 loc.end_pos = (yylsp[-1]).beg_pos;
10588
10589 value_expr((yyvsp[0].val));
10590 (yyval.val) = NEW_DOT3(new_nil(&loc), (yyvsp[0].val), &(yyloc));
10591#endif
10592 {VALUE v1,v2,v3;v1=Qnil;v2=(yyvsp[0].val);v3=dispatch2(dot3,v1,v2);(yyval.val)=v3;}
10593 }
10594#line 10590 "ripper.c"
10595 break;
10596
10597 case 558:
10598#line 4255 "ripper.y"
10599 {
10600#if 0
10601 if (!((yyval.val) = gettable(p, (yyvsp[0].val), &(yyloc)))) (yyval.val) = NEW_BEGIN(0, &(yyloc));
10602#endif
10603 {VALUE v1,v2;v1=(yyvsp[0].val);v2=dispatch1(var_ref,v1);(yyval.val)=v2;}
10604 }
10605#line 10601 "ripper.c"
10606 break;
10607
10608 case 559:
10609#line 4262 "ripper.y"
10610 {
10611 token_info_push(p, "->", &(yylsp[0]));
10612 }
10613#line 10609 "ripper.c"
10614 break;
10615
10616 case 560:
10617#line 4266 "ripper.y"
10618 {
10619 (yyval.val) = (yyvsp[0].val);
10620#if 0
10621 nd_set_first_loc((yyval.val), (yylsp[-2]).beg_pos);
10622#endif
10623 }
10624#line 10620 "ripper.c"
10625 break;
10626
10627 case 561:
10628#line 4275 "ripper.y"
10629 {
10630#if 0
10631 error_duplicate_pattern_variable(p, (yyvsp[0].val), &(yylsp[0]));
10632 (yyval.val) = assignable(p, (yyvsp[0].val), 0, &(yyloc));
10633#endif
10634 (yyval.val)=assignable(p, var_field(p, (yyvsp[0].val)));
10635 }
10636#line 10632 "ripper.c"
10637 break;
10638
10639 case 562:
10640#line 4285 "ripper.y"
10641 {
10642#if 0
10643 NODE *n = gettable(p, (yyvsp[0].val), &(yyloc));
10644 if (!(nd_type(n) == NODE_LVAR || nd_type(n) == NODE_DVAR)) {
10645 compile_error(p, "%"PRIsVALUE": no such local variable", rb_id2str((yyvsp[0].val)));
10646 }
10647 (yyval.val) = n;
10648#endif
10649 {VALUE v1,v2;v1=(yyvsp[0].val);v2=dispatch1(var_ref,v1);(yyval.val)=v2;}
10650 }
10651#line 10647 "ripper.c"
10652 break;
10653
10654 case 563:
10655#line 4298 "ripper.y"
10656 {
10657#if 0
10658 (yyval.val) = NEW_COLON3((yyvsp[0].val), &(yyloc));
10659#endif
10660 {VALUE v1,v2;v1=(yyvsp[0].val);v2=dispatch1(top_const_ref,v1);(yyval.val)=v2;}
10661 }
10662#line 10658 "ripper.c"
10663 break;
10664
10665 case 564:
10666#line 4305 "ripper.y"
10667 {
10668#if 0
10669 (yyval.val) = NEW_COLON2((yyvsp[-2].val), (yyvsp[0].val), &(yyloc));
10670#endif
10671 {VALUE v1,v2,v3;v1=(yyvsp[-2].val);v2=(yyvsp[0].val);v3=dispatch2(const_path_ref,v1,v2);(yyval.val)=v3;}
10672 }
10673#line 10669 "ripper.c"
10674 break;
10675
10676 case 565:
10677#line 4312 "ripper.y"
10678 {
10679#if 0
10680 (yyval.val) = gettable(p, (yyvsp[0].val), &(yyloc));
10681#endif
10682 {VALUE v1,v2;v1=(yyvsp[0].val);v2=dispatch1(var_ref,v1);(yyval.val)=v2;}
10683 }
10684#line 10680 "ripper.c"
10685 break;
10686
10687 case 566:
10688#line 4323 "ripper.y"
10689 {
10690#if 0
10691 (yyval.val) = NEW_RESBODY((yyvsp[-4].val),
10692 (yyvsp[-3].val) ? block_append(p, node_assign(p, (yyvsp[-3].val), NEW_ERRINFO(&(yylsp[-3])), &(yylsp[-3])), (yyvsp[-1].val)) : (yyvsp[-1].val),
10693 (yyvsp[0].val), &(yyloc));
10694 fixpos((yyval.val), (yyvsp[-4].val)?(yyvsp[-4].val):(yyvsp[-1].val));
10695#endif
10696 {VALUE v1,v2,v3,v4,v5;v1=escape_Qundef((yyvsp[-4].val));v2=escape_Qundef((yyvsp[-3].val));v3=escape_Qundef((yyvsp[-1].val));v4=escape_Qundef((yyvsp[0].val));v5=dispatch4(rescue,v1,v2,v3,v4);(yyval.val)=v5;}
10697 }
10698#line 10694 "ripper.c"
10699 break;
10700
10701 case 568:
10702#line 4336 "ripper.y"
10703 {
10704#if 0
10705 (yyval.val) = NEW_LIST((yyvsp[0].val), &(yyloc));
10706#endif
10707 (yyval.val)=rb_ary_new3(1, get_value((yyvsp[0].val)));
10708 }
10709#line 10705 "ripper.c"
10710 break;
10711
10712 case 569:
10713#line 4343 "ripper.y"
10714 {
10715#if 0
10716 if (!((yyval.val) = splat_array((yyvsp[0].val)))) (yyval.val) = (yyvsp[0].val);
10717#endif
10718 (yyval.val)=(yyvsp[0].val);
10719 }
10720#line 10716 "ripper.c"
10721 break;
10722
10723 case 571:
10724#line 4353 "ripper.y"
10725 {
10726 (yyval.val) = (yyvsp[0].val);
10727 }
10728#line 10724 "ripper.c"
10729 break;
10730
10731 case 573:
10732#line 4360 "ripper.y"
10733 {
10734#if 0
10735 (yyval.val) = (yyvsp[0].val);
10736#endif
10737 {VALUE v1,v2;v1=(yyvsp[0].val);v2=dispatch1(ensure,v1);(yyval.val)=v2;}
10738 }
10739#line 10735 "ripper.c"
10740 break;
10741
10742 case 577:
10743#line 4374 "ripper.y"
10744 {
10745#if 0
10746 NODE *node = (yyvsp[0].val);
10747 if (!node) {
10748 node = NEW_STR(STR_NEW0(), &(yyloc));
10749 RB_OBJ_WRITTEN(p->ast, Qnil, node->nd_lit);
10750 }
10751 else {
10752 node = evstr2dstr(p, node);
10753 }
10754 (yyval.val) = node;
10755#endif
10756 (yyval.val)=(yyvsp[0].val);
10757 }
10758#line 10754 "ripper.c"
10759 break;
10760
10761 case 580:
10762#line 4393 "ripper.y"
10763 {
10764#if 0
10765 (yyval.val) = literal_concat(p, (yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
10766#endif
10767 {VALUE v1,v2,v3;v1=(yyvsp[-1].val);v2=(yyvsp[0].val);v3=dispatch2(string_concat,v1,v2);(yyval.val)=v3;}
10768 }
10769#line 10765 "ripper.c"
10770 break;
10771
10772 case 581:
10773#line 4402 "ripper.y"
10774 {
10775#if 0
10776 (yyval.val) = heredoc_dedent(p, (yyvsp[-1].val));
10777 if ((yyval.val)) nd_set_loc((yyval.val), &(yyloc));
10778#endif
10779 {VALUE v1,v2;v1=heredoc_dedent(p, (yyvsp[-1].val));v2=dispatch1(string_literal,v1);(yyval.val)=v2;}
10780 }
10781#line 10777 "ripper.c"
10782 break;
10783
10784 case 582:
10785#line 4412 "ripper.y"
10786 {
10787#if 0
10788 (yyval.val) = new_xstring(p, heredoc_dedent(p, (yyvsp[-1].val)), &(yyloc));
10789#endif
10790 {VALUE v1,v2;v1=heredoc_dedent(p, (yyvsp[-1].val));v2=dispatch1(xstring_literal,v1);(yyval.val)=v2;}
10791 }
10792#line 10788 "ripper.c"
10793 break;
10794
10795 case 583:
10796#line 4421 "ripper.y"
10797 {
10798 (yyval.val) = new_regexp(p, (yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
10799 }
10800#line 10796 "ripper.c"
10801 break;
10802
10803 case 584:
10804#line 4427 "ripper.y"
10805 {
10806#if 0
10807 (yyval.val) = make_list((yyvsp[-1].val), &(yyloc));
10808#endif
10809 {VALUE v1,v2;v1=(yyvsp[-1].val);v2=dispatch1(array,v1);(yyval.val)=v2;}
10810 }
10811#line 10807 "ripper.c"
10812 break;
10813
10814 case 585:
10815#line 4436 "ripper.y"
10816 {
10817#if 0
10818 (yyval.val) = 0;
10819#endif
10820 {VALUE v1;v1=dispatch0(words_new);(yyval.val)=v1;}
10821 }
10822#line 10818 "ripper.c"
10823 break;
10824
10825 case 586:
10826#line 4443 "ripper.y"
10827 {
10828#if 0
10829 (yyval.val) = list_append(p, (yyvsp[-2].val), evstr2dstr(p, (yyvsp[-1].val)));
10830#endif
10831 {VALUE v1,v2,v3;v1=(yyvsp[-2].val);v2=(yyvsp[-1].val);v3=dispatch2(words_add,v1,v2);(yyval.val)=v3;}
10832 }
10833#line 10829 "ripper.c"
10834 break;
10835
10836 case 587:
10837#line 4452 "ripper.y"
10838 {{VALUE v1,v2,v3,v4;v1=dispatch0(word_new);v2=v1;v3=(yyvsp[0].val);v4=dispatch2(word_add,v2,v3);(yyval.val)=v4;}}
10839#line 10835 "ripper.c"
10840 break;
10841
10842 case 588:
10843#line 4454 "ripper.y"
10844 {
10845#if 0
10846 (yyval.val) = literal_concat(p, (yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
10847#endif
10848 {VALUE v1,v2,v3;v1=(yyvsp[-1].val);v2=(yyvsp[0].val);v3=dispatch2(word_add,v1,v2);(yyval.val)=v3;}
10849 }
10850#line 10846 "ripper.c"
10851 break;
10852
10853 case 589:
10854#line 4463 "ripper.y"
10855 {
10856#if 0
10857 (yyval.val) = make_list((yyvsp[-1].val), &(yyloc));
10858#endif
10859 {VALUE v1,v2;v1=(yyvsp[-1].val);v2=dispatch1(array,v1);(yyval.val)=v2;}
10860 }
10861#line 10857 "ripper.c"
10862 break;
10863
10864 case 590:
10865#line 4472 "ripper.y"
10866 {
10867#if 0
10868 (yyval.val) = 0;
10869#endif
10870 {VALUE v1;v1=dispatch0(symbols_new);(yyval.val)=v1;}
10871 }
10872#line 10868 "ripper.c"
10873 break;
10874
10875 case 591:
10876#line 4479 "ripper.y"
10877 {
10878#if 0
10879 (yyval.val) = symbol_append(p, (yyvsp[-2].val), evstr2dstr(p, (yyvsp[-1].val)));
10880#endif
10881 {VALUE v1,v2,v3;v1=(yyvsp[-2].val);v2=(yyvsp[-1].val);v3=dispatch2(symbols_add,v1,v2);(yyval.val)=v3;}
10882 }
10883#line 10879 "ripper.c"
10884 break;
10885
10886 case 592:
10887#line 4488 "ripper.y"
10888 {
10889#if 0
10890 (yyval.val) = make_list((yyvsp[-1].val), &(yyloc));
10891#endif
10892 {VALUE v1,v2;v1=(yyvsp[-1].val);v2=dispatch1(array,v1);(yyval.val)=v2;}
10893 }
10894#line 10890 "ripper.c"
10895 break;
10896
10897 case 593:
10898#line 4497 "ripper.y"
10899 {
10900#if 0
10901 (yyval.val) = make_list((yyvsp[-1].val), &(yyloc));
10902#endif
10903 {VALUE v1,v2;v1=(yyvsp[-1].val);v2=dispatch1(array,v1);(yyval.val)=v2;}
10904 }
10905#line 10901 "ripper.c"
10906 break;
10907
10908 case 594:
10909#line 4506 "ripper.y"
10910 {
10911#if 0
10912 (yyval.val) = 0;
10913#endif
10914 {VALUE v1;v1=dispatch0(qwords_new);(yyval.val)=v1;}
10915 }
10916#line 10912 "ripper.c"
10917 break;
10918
10919 case 595:
10920#line 4513 "ripper.y"
10921 {
10922#if 0
10923 (yyval.val) = list_append(p, (yyvsp[-2].val), (yyvsp[-1].val));
10924#endif
10925 {VALUE v1,v2,v3;v1=(yyvsp[-2].val);v2=(yyvsp[-1].val);v3=dispatch2(qwords_add,v1,v2);(yyval.val)=v3;}
10926 }
10927#line 10923 "ripper.c"
10928 break;
10929
10930 case 596:
10931#line 4522 "ripper.y"
10932 {
10933#if 0
10934 (yyval.val) = 0;
10935#endif
10936 {VALUE v1;v1=dispatch0(qsymbols_new);(yyval.val)=v1;}
10937 }
10938#line 10934 "ripper.c"
10939 break;
10940
10941 case 597:
10942#line 4529 "ripper.y"
10943 {
10944#if 0
10945 (yyval.val) = symbol_append(p, (yyvsp[-2].val), (yyvsp[-1].val));
10946#endif
10947 {VALUE v1,v2,v3;v1=(yyvsp[-2].val);v2=(yyvsp[-1].val);v3=dispatch2(qsymbols_add,v1,v2);(yyval.val)=v3;}
10948 }
10949#line 10945 "ripper.c"
10950 break;
10951
10952 case 598:
10953#line 4538 "ripper.y"
10954 {
10955#if 0
10956 (yyval.val) = 0;
10957#endif
10958 {VALUE v1;v1=dispatch0(string_content);(yyval.val)=v1;}
10959#if 0
10960#endif
10961 (yyval.val) = ripper_new_yylval(p, 0, (yyval.val), 0);
10962
10963 }
10964#line 10960 "ripper.c"
10965 break;
10966
10967 case 599:
10968#line 4549 "ripper.y"
10969 {
10970#if 0
10971 (yyval.val) = literal_concat(p, (yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
10972#endif
10973 {VALUE v1,v2,v3;v1=(yyvsp[-1].val);v2=(yyvsp[0].val);v3=dispatch2(string_add,v1,v2);(yyval.val)=v3;}
10974#if 0
10975#endif
10976 if (ripper_is_node_yylval((yyvsp[-1].val)) && ripper_is_node_yylval((yyvsp[0].val)) &&
10977 !RNODE((yyvsp[-1].val))->nd_cval) {
10978 RNODE((yyvsp[-1].val))->nd_cval = RNODE((yyvsp[0].val))->nd_cval;
10979 RNODE((yyvsp[-1].val))->nd_rval = add_mark_object(p, (yyval.val));
10980 (yyval.val) = (yyvsp[-1].val);
10981 }
10982
10983 }
10984#line 10980 "ripper.c"
10985 break;
10986
10987 case 600:
10988#line 4567 "ripper.y"
10989 {
10990#if 0
10991 (yyval.val) = 0;
10992#endif
10993 {VALUE v1;v1=dispatch0(xstring_new);(yyval.val)=v1;}
10994 }
10995#line 10991 "ripper.c"
10996 break;
10997
10998 case 601:
10999#line 4574 "ripper.y"
11000 {
11001#if 0
11002 (yyval.val) = literal_concat(p, (yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
11003#endif
11004 {VALUE v1,v2,v3;v1=(yyvsp[-1].val);v2=(yyvsp[0].val);v3=dispatch2(xstring_add,v1,v2);(yyval.val)=v3;}
11005 }
11006#line 11002 "ripper.c"
11007 break;
11008
11009 case 602:
11010#line 4583 "ripper.y"
11011 {
11012#if 0
11013 (yyval.val) = 0;
11014#endif
11015 {VALUE v1;v1=dispatch0(regexp_new);(yyval.val)=v1;}
11016#if 0
11017#endif
11018 (yyval.val) = ripper_new_yylval(p, 0, (yyval.val), 0);
11019
11020 }
11021#line 11017 "ripper.c"
11022 break;
11023
11024 case 603:
11025#line 4594 "ripper.y"
11026 {
11027#if 0
11028 NODE *head = (yyvsp[-1].val), *tail = (yyvsp[0].val);
11029 if (!head) {
11030 (yyval.val) = tail;
11031 }
11032 else if (!tail) {
11033 (yyval.val) = head;
11034 }
11035 else {
11036 switch (nd_type(head)) {
11037 case NODE_STR:
11038 nd_set_type(head, NODE_DSTR);
11039 break;
11040 case NODE_DSTR:
11041 break;
11042 default:
11043 head = list_append(p, NEW_DSTR(Qnil, &(yyloc)), head);
11044 break;
11045 }
11046 (yyval.val) = list_append(p, head, tail);
11047 }
11048#endif
11049 VALUE s1 = 1, s2 = 0, n1 = (yyvsp[-1].val), n2 = (yyvsp[0].val);
11050 if (ripper_is_node_yylval(n1)) {
11051 s1 = RNODE(n1)->nd_cval;
11052 n1 = RNODE(n1)->nd_rval;
11053 }
11054 if (ripper_is_node_yylval(n2)) {
11055 s2 = RNODE(n2)->nd_cval;
11056 n2 = RNODE(n2)->nd_rval;
11057 }
11058 (yyval.val) = dispatch2(regexp_add, n1, n2);
11059 if (!s1 && s2) {
11060 (yyval.val) = ripper_new_yylval(p, 0, (yyval.val), s2);
11061 }
11062
11063 }
11064#line 11060 "ripper.c"
11065 break;
11066
11067 case 604:
11068#line 4635 "ripper.y"
11069 {(yyval.val)=ripper_new_yylval(p, 0, get_value((yyvsp[0].val)), (yyvsp[0].val));}
11070#line 11066 "ripper.c"
11071 break;
11072
11073 case 605:
11074#line 4637 "ripper.y"
11075 {
11076 /* need to backup p->lex.strterm so that a string literal `%&foo,#$&,bar&` can be parsed */
11077 (yyval.strterm) = p->lex.strterm;
11078 p->lex.strterm = 0;
11079 SET_LEX_STATE(EXPR_BEG);
11080 }
11081#line 11077 "ripper.c"
11082 break;
11083
11084 case 606:
11085#line 4644 "ripper.y"
11086 {
11087 p->lex.strterm = (yyvsp[-1].strterm);
11088#if 0
11089 (yyval.val) = NEW_EVSTR((yyvsp[0].val), &(yyloc));
11090 nd_set_line((yyval.val), (yylsp[0]).end_pos.lineno);
11091#endif
11092 {VALUE v1,v2;v1=(yyvsp[0].val);v2=dispatch1(string_dvar,v1);(yyval.val)=v2;}
11093 }
11094#line 11090 "ripper.c"
11095 break;
11096
11097 case 607:
11098#line 4653 "ripper.y"
11099 {
11100 CMDARG_PUSH(0);
11101 COND_PUSH(0);
11102 }
11103#line 11099 "ripper.c"
11104 break;
11105
11106 case 608:
11107#line 4657 "ripper.y"
11108 {
11109 /* need to backup p->lex.strterm so that a string literal `%!foo,#{ !0 },bar!` can be parsed */
11110 (yyval.strterm) = p->lex.strterm;
11111 p->lex.strterm = 0;
11112 }
11113#line 11109 "ripper.c"
11114 break;
11115
11116 case 609:
11117#line 4662 "ripper.y"
11118 {
11119 (yyval.num) = p->lex.state;
11120 SET_LEX_STATE(EXPR_BEG);
11121 }
11122#line 11118 "ripper.c"
11123 break;
11124
11125 case 610:
11126#line 4666 "ripper.y"
11127 {
11128 (yyval.num) = p->lex.brace_nest;
11129 p->lex.brace_nest = 0;
11130 }
11131#line 11127 "ripper.c"
11132 break;
11133
11134 case 611:
11135#line 4670 "ripper.y"
11136 {
11137 (yyval.num) = p->heredoc_indent;
11138 p->heredoc_indent = 0;
11139 }
11140#line 11136 "ripper.c"
11141 break;
11142
11143 case 612:
11144#line 4675 "ripper.y"
11145 {
11146 COND_POP();
11147 CMDARG_POP();
11148 p->lex.strterm = (yyvsp[-5].strterm);
11149 SET_LEX_STATE((yyvsp[-4].num));
11150 p->lex.brace_nest = (yyvsp[-3].num);
11151 p->heredoc_indent = (yyvsp[-2].num);
11152 p->heredoc_line_indent = -1;
11153#if 0
11154 if ((yyvsp[-1].val)) (yyvsp[-1].val)->flags &= ~NODE_FL_NEWLINE;
11155 (yyval.val) = new_evstr(p, (yyvsp[-1].val), &(yyloc));
11156#endif
11157 {VALUE v1,v2;v1=(yyvsp[-1].val);v2=dispatch1(string_embexpr,v1);(yyval.val)=v2;}
11158 }
11159#line 11155 "ripper.c"
11160 break;
11161
11162 case 613:
11163#line 4692 "ripper.y"
11164 {
11165#if 0
11166 (yyval.val) = NEW_GVAR((yyvsp[0].val), &(yyloc));
11167#endif
11168 {VALUE v1,v2;v1=(yyvsp[0].val);v2=dispatch1(var_ref,v1);(yyval.val)=v2;}
11169 }
11170#line 11166 "ripper.c"
11171 break;
11172
11173 case 614:
11174#line 4699 "ripper.y"
11175 {
11176#if 0
11177 (yyval.val) = NEW_IVAR((yyvsp[0].val), &(yyloc));
11178#endif
11179 {VALUE v1,v2;v1=(yyvsp[0].val);v2=dispatch1(var_ref,v1);(yyval.val)=v2;}
11180 }
11181#line 11177 "ripper.c"
11182 break;
11183
11184 case 615:
11185#line 4706 "ripper.y"
11186 {
11187#if 0
11188 (yyval.val) = NEW_CVAR((yyvsp[0].val), &(yyloc));
11189#endif
11190 {VALUE v1,v2;v1=(yyvsp[0].val);v2=dispatch1(var_ref,v1);(yyval.val)=v2;}
11191 }
11192#line 11188 "ripper.c"
11193 break;
11194
11195 case 619:
11196#line 4720 "ripper.y"
11197 {
11198 SET_LEX_STATE(EXPR_END);
11199#if 0
11200 (yyval.val) = NEW_LIT(ID2SYM((yyvsp[0].val)), &(yyloc));
11201#endif
11202 {VALUE v1,v2,v3,v4;v1=(yyvsp[0].val);v2=dispatch1(symbol,v1);v3=v2;v4=dispatch1(symbol_literal,v3);(yyval.val)=v4;}
11203 }
11204#line 11200 "ripper.c"
11205 break;
11206
11207 case 624:
11208#line 4736 "ripper.y"
11209 {
11210 SET_LEX_STATE(EXPR_END);
11211#if 0
11212 (yyval.val) = dsym_node(p, (yyvsp[-1].val), &(yyloc));
11213#endif
11214 {VALUE v1,v2;v1=(yyvsp[-1].val);v2=dispatch1(dyna_symbol,v1);(yyval.val)=v2;}
11215 }
11216#line 11212 "ripper.c"
11217 break;
11218
11219 case 626:
11220#line 4747 "ripper.y"
11221 {
11222#if 0
11223 (yyval.val) = (yyvsp[0].val);
11224 RB_OBJ_WRITE(p->ast, &(yyval.val)->nd_lit, negate_lit(p, (yyval.val)->nd_lit));
11225#endif
11226 {VALUE v1,v2,v3;v1=ID2VAL(idUMinus);v2=(yyvsp[0].val);v3=dispatch2(unary,v1,v2);(yyval.val)=v3;}
11227 }
11228#line 11224 "ripper.c"
11229 break;
11230
11231 case 636:
11232#line 4769 "ripper.y"
11233 {(yyval.val) = KWD2EID(nil, (yyvsp[0].val));}
11234#line 11230 "ripper.c"
11235 break;
11236
11237 case 637:
11238#line 4770 "ripper.y"
11239 {(yyval.val) = KWD2EID(self, (yyvsp[0].val));}
11240#line 11236 "ripper.c"
11241 break;
11242
11243 case 638:
11244#line 4771 "ripper.y"
11245 {(yyval.val) = KWD2EID(true, (yyvsp[0].val));}
11246#line 11242 "ripper.c"
11247 break;
11248
11249 case 639:
11250#line 4772 "ripper.y"
11251 {(yyval.val) = KWD2EID(false, (yyvsp[0].val));}
11252#line 11248 "ripper.c"
11253 break;
11254
11255 case 640:
11256#line 4773 "ripper.y"
11257 {(yyval.val) = KWD2EID(_FILE__, (yyvsp[0].val));}
11258#line 11254 "ripper.c"
11259 break;
11260
11261 case 641:
11262#line 4774 "ripper.y"
11263 {(yyval.val) = KWD2EID(_LINE__, (yyvsp[0].val));}
11264#line 11260 "ripper.c"
11265 break;
11266
11267 case 642:
11268#line 4775 "ripper.y"
11269 {(yyval.val) = KWD2EID(_ENCODING__, (yyvsp[0].val));}
11270#line 11266 "ripper.c"
11271 break;
11272
11273 case 643:
11274#line 4779 "ripper.y"
11275 {
11276#if 0
11277 if (!((yyval.val) = gettable(p, (yyvsp[0].val), &(yyloc)))) (yyval.val) = NEW_BEGIN(0, &(yyloc));
11278#endif
11279 if (id_is_var(p, get_id((yyvsp[0].val)))) {
11280 (yyval.val) = dispatch1(var_ref, (yyvsp[0].val));
11281 }
11282 else {
11283 (yyval.val) = dispatch1(vcall, (yyvsp[0].val));
11284 }
11285
11286 }
11287#line 11283 "ripper.c"
11288 break;
11289
11290 case 644:
11291#line 4792 "ripper.y"
11292 {
11293#if 0
11294 if (!((yyval.val) = gettable(p, (yyvsp[0].val), &(yyloc)))) (yyval.val) = NEW_BEGIN(0, &(yyloc));
11295#endif
11296 {VALUE v1,v2;v1=(yyvsp[0].val);v2=dispatch1(var_ref,v1);(yyval.val)=v2;}
11297 }
11298#line 11294 "ripper.c"
11299 break;
11300
11301 case 645:
11302#line 4801 "ripper.y"
11303 {
11304#if 0
11305 (yyval.val) = assignable(p, (yyvsp[0].val), 0, &(yyloc));
11306#endif
11307 (yyval.val)=assignable(p, var_field(p, (yyvsp[0].val)));
11308 }
11309#line 11305 "ripper.c"
11310 break;
11311
11312 case 646:
11313#line 4808 "ripper.y"
11314 {
11315#if 0
11316 (yyval.val) = assignable(p, (yyvsp[0].val), 0, &(yyloc));
11317#endif
11318 (yyval.val)=assignable(p, var_field(p, (yyvsp[0].val)));
11319 }
11320#line 11316 "ripper.c"
11321 break;
11322
11323 case 649:
11324#line 4821 "ripper.y"
11325 {
11326 SET_LEX_STATE(EXPR_BEG);
11327 p->command_start = TRUE;
11328 }
11329#line 11325 "ripper.c"
11330 break;
11331
11332 case 650:
11333#line 4826 "ripper.y"
11334 {
11335 (yyval.val) = (yyvsp[-1].val);
11336 }
11337#line 11333 "ripper.c"
11338 break;
11339
11340 case 651:
11341#line 4830 "ripper.y"
11342 {
11343#if 0
11344 (yyval.val) = 0;
11345#endif
11346 (yyval.val)=Qnil;
11347 }
11348#line 11344 "ripper.c"
11349 break;
11350
11351 case 652:
11352#line 4839 "ripper.y"
11353 {
11354#if 0
11355 (yyval.val) = (yyvsp[-1].val);
11356#endif
11357 {VALUE v1,v2;v1=(yyvsp[-1].val);v2=dispatch1(paren,v1);(yyval.val)=v2;}
11358 SET_LEX_STATE(EXPR_BEG);
11359 p->command_start = TRUE;
11360 }
11361#line 11357 "ripper.c"
11362 break;
11363
11364 case 653:
11365#line 4848 "ripper.y"
11366 {
11367 arg_var(p, idFWD_REST);
11368#if idFWD_KWREST
11369 arg_var(p, idFWD_KWREST);
11370#endif
11371 arg_var(p, idFWD_BLOCK);
11372#if 0
11373 (yyval.val) = new_args_tail(p, Qnone, idFWD_KWREST, idFWD_BLOCK, &(yylsp[-1]));
11374 (yyval.val) = new_args(p, (yyvsp[-3].val), Qnone, idFWD_REST, Qnone, (yyval.val), &(yylsp[-1]));
11375#endif
11376 {VALUE v1,v2;v1=params_new((yyvsp[-3].val), Qnone, (yyvsp[-1].val), Qnone, Qnone, Qnone, Qnone);v2=dispatch1(paren,v1);(yyval.val)=v2;}
11377 SET_LEX_STATE(EXPR_BEG);
11378 p->command_start = TRUE;
11379 }
11380#line 11376 "ripper.c"
11381 break;
11382
11383 case 654:
11384#line 4863 "ripper.y"
11385 {
11386 arg_var(p, idFWD_REST);
11387#if idFWD_KWREST
11388 arg_var(p, idFWD_KWREST);
11389#endif
11390 arg_var(p, idFWD_BLOCK);
11391#if 0
11392 (yyval.val) = new_args_tail(p, Qnone, idFWD_KWREST, idFWD_BLOCK, &(yylsp[-1]));
11393 (yyval.val) = new_args(p, Qnone, Qnone, idFWD_REST, Qnone, (yyval.val), &(yylsp[-1]));
11394#endif
11395 {VALUE v1,v2;v1=params_new(Qnone, Qnone, (yyvsp[-1].val), Qnone, Qnone, Qnone, Qnone);v2=dispatch1(paren,v1);(yyval.val)=v2;}
11396 SET_LEX_STATE(EXPR_BEG);
11397 p->command_start = TRUE;
11398 }
11399#line 11395 "ripper.c"
11400 break;
11401
11402 case 655:
11403#line 4877 "ripper.y"
11404 {
11405 (yyval.num) = p->in_kwarg;
11406 p->in_kwarg = 1;
11407 SET_LEX_STATE(p->lex.state|EXPR_LABEL); /* force for args */
11408 }
11409#line 11405 "ripper.c"
11410 break;
11411
11412 case 656:
11413#line 4883 "ripper.y"
11414 {
11415 p->in_kwarg = !!(yyvsp[-2].num);
11416 (yyval.val) = (yyvsp[-1].val);
11417 SET_LEX_STATE(EXPR_BEG);
11418 p->command_start = TRUE;
11419 }
11420#line 11416 "ripper.c"
11421 break;
11422
11423 case 657:
11424#line 4892 "ripper.y"
11425 {
11426 (yyval.val) = new_args_tail(p, (yyvsp[-3].val), (yyvsp[-1].val), (yyvsp[0].val), &(yylsp[-1]));
11427 }
11428#line 11424 "ripper.c"
11429 break;
11430
11431 case 658:
11432#line 4896 "ripper.y"
11433 {
11434 (yyval.val) = new_args_tail(p, (yyvsp[-1].val), Qnone, (yyvsp[0].val), &(yylsp[-1]));
11435 }
11436#line 11432 "ripper.c"
11437 break;
11438
11439 case 659:
11440#line 4900 "ripper.y"
11441 {
11442 (yyval.val) = new_args_tail(p, Qnone, (yyvsp[-1].val), (yyvsp[0].val), &(yylsp[-1]));
11443 }
11444#line 11440 "ripper.c"
11445 break;
11446
11447 case 660:
11448#line 4904 "ripper.y"
11449 {
11450 (yyval.val) = new_args_tail(p, Qnone, ID2VAL(idNil), (yyvsp[0].val), &(yylsp[-1]));
11451 }
11452#line 11448 "ripper.c"
11453 break;
11454
11455 case 661:
11456#line 4908 "ripper.y"
11457 {
11458 (yyval.val) = new_args_tail(p, Qnone, Qnone, (yyvsp[0].val), &(yylsp[0]));
11459 }
11460#line 11456 "ripper.c"
11461 break;
11462
11463 case 662:
11464#line 4914 "ripper.y"
11465 {
11466 (yyval.val) = (yyvsp[0].val);
11467 }
11468#line 11464 "ripper.c"
11469 break;
11470
11471 case 663:
11472#line 4918 "ripper.y"
11473 {
11474 (yyval.val) = new_args_tail(p, Qnone, Qnone, Qnone, &(yylsp[0]));
11475 }
11476#line 11472 "ripper.c"
11477 break;
11478
11479 case 664:
11480#line 4924 "ripper.y"
11481 {
11482 (yyval.val) = new_args(p, (yyvsp[-5].val), (yyvsp[-3].val), (yyvsp[-1].val), Qnone, (yyvsp[0].val), &(yyloc));
11483 }
11484#line 11480 "ripper.c"
11485 break;
11486
11487 case 665:
11488#line 4928 "ripper.y"
11489 {
11490 (yyval.val) = new_args(p, (yyvsp[-7].val), (yyvsp[-5].val), (yyvsp[-3].val), (yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
11491 }
11492#line 11488 "ripper.c"
11493 break;
11494
11495 case 666:
11496#line 4932 "ripper.y"
11497 {
11498 (yyval.val) = new_args(p, (yyvsp[-3].val), (yyvsp[-1].val), Qnone, Qnone, (yyvsp[0].val), &(yyloc));
11499 }
11500#line 11496 "ripper.c"
11501 break;
11502
11503 case 667:
11504#line 4936 "ripper.y"
11505 {
11506 (yyval.val) = new_args(p, (yyvsp[-5].val), (yyvsp[-3].val), Qnone, (yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
11507 }
11508#line 11504 "ripper.c"
11509 break;
11510
11511 case 668:
11512#line 4940 "ripper.y"
11513 {
11514 (yyval.val) = new_args(p, (yyvsp[-3].val), Qnone, (yyvsp[-1].val), Qnone, (yyvsp[0].val), &(yyloc));
11515 }
11516#line 11512 "ripper.c"
11517 break;
11518
11519 case 669:
11520#line 4944 "ripper.y"
11521 {
11522 (yyval.val) = new_args(p, (yyvsp[-5].val), Qnone, (yyvsp[-3].val), (yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
11523 }
11524#line 11520 "ripper.c"
11525 break;
11526
11527 case 670:
11528#line 4948 "ripper.y"
11529 {
11530 (yyval.val) = new_args(p, (yyvsp[-1].val), Qnone, Qnone, Qnone, (yyvsp[0].val), &(yyloc));
11531 }
11532#line 11528 "ripper.c"
11533 break;
11534
11535 case 671:
11536#line 4952 "ripper.y"
11537 {
11538 (yyval.val) = new_args(p, Qnone, (yyvsp[-3].val), (yyvsp[-1].val), Qnone, (yyvsp[0].val), &(yyloc));
11539 }
11540#line 11536 "ripper.c"
11541 break;
11542
11543 case 672:
11544#line 4956 "ripper.y"
11545 {
11546 (yyval.val) = new_args(p, Qnone, (yyvsp[-5].val), (yyvsp[-3].val), (yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
11547 }
11548#line 11544 "ripper.c"
11549 break;
11550
11551 case 673:
11552#line 4960 "ripper.y"
11553 {
11554 (yyval.val) = new_args(p, Qnone, (yyvsp[-1].val), Qnone, Qnone, (yyvsp[0].val), &(yyloc));
11555 }
11556#line 11552 "ripper.c"
11557 break;
11558
11559 case 674:
11560#line 4964 "ripper.y"
11561 {
11562 (yyval.val) = new_args(p, Qnone, (yyvsp[-3].val), Qnone, (yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
11563 }
11564#line 11560 "ripper.c"
11565 break;
11566
11567 case 675:
11568#line 4968 "ripper.y"
11569 {
11570 (yyval.val) = new_args(p, Qnone, Qnone, (yyvsp[-1].val), Qnone, (yyvsp[0].val), &(yyloc));
11571 }
11572#line 11568 "ripper.c"
11573 break;
11574
11575 case 676:
11576#line 4972 "ripper.y"
11577 {
11578 (yyval.val) = new_args(p, Qnone, Qnone, (yyvsp[-3].val), (yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
11579 }
11580#line 11576 "ripper.c"
11581 break;
11582
11583 case 677:
11584#line 4976 "ripper.y"
11585 {
11586 (yyval.val) = new_args(p, Qnone, Qnone, Qnone, Qnone, (yyvsp[0].val), &(yyloc));
11587 }
11588#line 11584 "ripper.c"
11589 break;
11590
11591 case 678:
11592#line 4980 "ripper.y"
11593 {
11594 (yyval.val) = new_args_tail(p, Qnone, Qnone, Qnone, &(yylsp[0]));
11595 (yyval.val) = new_args(p, Qnone, Qnone, Qnone, Qnone, (yyval.val), &(yylsp[0]));
11596 }
11597#line 11593 "ripper.c"
11598 break;
11599
11600 case 679:
11601#line 4987 "ripper.y"
11602 {
11603#if 0
11604 (yyval.val) = idDot3;
11605#endif
11606 {VALUE v1;v1=dispatch0(args_forward);(yyval.val)=v1;}
11607 }
11608#line 11604 "ripper.c"
11609 break;
11610
11611 case 680:
11612#line 4996 "ripper.y"
11613 {
11614#if 0
11615 yyerror1(&(yylsp[0]), "formal argument cannot be a constant");
11616 (yyval.val) = 0;
11617#endif
11618 {VALUE v1,v2;v1=(yyvsp[0].val);v2=dispatch1(param_error,v1);(yyval.val)=v2;}ripper_error(p);
11619 }
11620#line 11616 "ripper.c"
11621 break;
11622
11623 case 681:
11624#line 5004 "ripper.y"
11625 {
11626#if 0
11627 yyerror1(&(yylsp[0]), "formal argument cannot be an instance variable");
11628 (yyval.val) = 0;
11629#endif
11630 {VALUE v1,v2;v1=(yyvsp[0].val);v2=dispatch1(param_error,v1);(yyval.val)=v2;}ripper_error(p);
11631 }
11632#line 11628 "ripper.c"
11633 break;
11634
11635 case 682:
11636#line 5012 "ripper.y"
11637 {
11638#if 0
11639 yyerror1(&(yylsp[0]), "formal argument cannot be a global variable");
11640 (yyval.val) = 0;
11641#endif
11642 {VALUE v1,v2;v1=(yyvsp[0].val);v2=dispatch1(param_error,v1);(yyval.val)=v2;}ripper_error(p);
11643 }
11644#line 11640 "ripper.c"
11645 break;
11646
11647 case 683:
11648#line 5020 "ripper.y"
11649 {
11650#if 0
11651 yyerror1(&(yylsp[0]), "formal argument cannot be a class variable");
11652 (yyval.val) = 0;
11653#endif
11654 {VALUE v1,v2;v1=(yyvsp[0].val);v2=dispatch1(param_error,v1);(yyval.val)=v2;}ripper_error(p);
11655 }
11656#line 11652 "ripper.c"
11657 break;
11658
11659 case 685:
11660#line 5031 "ripper.y"
11661 {
11662 formal_argument(p, get_id((yyvsp[0].val)));
11664 (yyval.val) = (yyvsp[0].val);
11665 }
11666#line 11662 "ripper.c"
11667 break;
11668
11669 case 686:
11670#line 5039 "ripper.y"
11671 {
11672 ID id = get_id((yyvsp[0].val));
11673 arg_var(p, id);
11674 p->cur_arg = id;
11675 (yyval.val) = (yyvsp[0].val);
11676 }
11677#line 11673 "ripper.c"
11678 break;
11679
11680 case 687:
11681#line 5048 "ripper.y"
11682 {
11683 p->cur_arg = 0;
11684#if 0
11685 (yyval.val) = NEW_ARGS_AUX((yyvsp[0].val), 1, &NULL_LOC);
11686#endif
11687 (yyval.val)=get_value((yyvsp[0].val));
11688 }
11689#line 11685 "ripper.c"
11690 break;
11691
11692 case 688:
11693#line 5056 "ripper.y"
11694 {
11695#if 0
11696 ID tid = internal_id(p);
11697 YYLTYPE loc;
11698 loc.beg_pos = (yylsp[-1]).beg_pos;
11699 loc.end_pos = (yylsp[-1]).beg_pos;
11700 arg_var(p, tid);
11701 if (dyna_in_block(p)) {
11702 (yyvsp[-1].val)->nd_value = NEW_DVAR(tid, &loc);
11703 }
11704 else {
11705 (yyvsp[-1].val)->nd_value = NEW_LVAR(tid, &loc);
11706 }
11707 (yyval.val) = NEW_ARGS_AUX(tid, 1, &NULL_LOC);
11708 (yyval.val)->nd_next = (yyvsp[-1].val);
11709#endif
11710 {VALUE v1,v2;v1=(yyvsp[-1].val);v2=dispatch1(mlhs_paren,v1);(yyval.val)=v2;}
11711 }
11712#line 11708 "ripper.c"
11713 break;
11714
11715 case 689:
11716#line 5077 "ripper.y"
11717 {(yyval.val)=rb_ary_new3(1, get_value((yyvsp[0].val)));}
11718#line 11714 "ripper.c"
11719 break;
11720
11721 case 690:
11722#line 5079 "ripper.y"
11723 {
11724#if 0
11725 (yyval.val) = (yyvsp[-2].val);
11726 (yyval.val)->nd_plen++;
11727 (yyval.val)->nd_next = block_append(p, (yyval.val)->nd_next, (yyvsp[0].val)->nd_next);
11728 rb_discard_node(p, (yyvsp[0].val));
11729#endif
11730 (yyval.val)=rb_ary_push((yyvsp[-2].val), get_value((yyvsp[0].val)));
11731 }
11732#line 11728 "ripper.c"
11733 break;
11734
11735 case 691:
11736#line 5092 "ripper.y"
11737 {
11738 ID id = get_id((yyvsp[0].val));
11739 arg_var(p, formal_argument(p, id));
11740 p->cur_arg = id;
11742 (yyval.val) = (yyvsp[0].val);
11743 }
11744#line 11740 "ripper.c"
11745 break;
11746
11747 case 692:
11748#line 5102 "ripper.y"
11749 {
11750 p->cur_arg = 0;
11751#if 0
11752 (yyval.val) = new_kw_arg(p, assignable(p, (yyvsp[-1].val), (yyvsp[0].val), &(yyloc)), &(yyloc));
11753#endif
11754 (yyval.val)=rb_assoc_new(get_value(assignable(p, (yyvsp[-1].val))), get_value((yyvsp[0].val)));
11755 }
11756#line 11752 "ripper.c"
11757 break;
11758
11759 case 693:
11760#line 5110 "ripper.y"
11761 {
11762 p->cur_arg = 0;
11763#if 0
11764 (yyval.val) = new_kw_arg(p, assignable(p, (yyvsp[0].val), NODE_SPECIAL_REQUIRED_KEYWORD, &(yyloc)), &(yyloc));
11765#endif
11766 (yyval.val)=rb_assoc_new(get_value(assignable(p, (yyvsp[0].val))), 0);
11767 }
11768#line 11764 "ripper.c"
11769 break;
11770
11771 case 694:
11772#line 5120 "ripper.y"
11773 {
11774#if 0
11775 (yyval.val) = new_kw_arg(p, assignable(p, (yyvsp[-1].val), (yyvsp[0].val), &(yyloc)), &(yyloc));
11776#endif
11777 (yyval.val)=rb_assoc_new(get_value(assignable(p, (yyvsp[-1].val))), get_value((yyvsp[0].val)));
11778 }
11779#line 11775 "ripper.c"
11780 break;
11781
11782 case 695:
11783#line 5127 "ripper.y"
11784 {
11785#if 0
11786 (yyval.val) = new_kw_arg(p, assignable(p, (yyvsp[0].val), NODE_SPECIAL_REQUIRED_KEYWORD, &(yyloc)), &(yyloc));
11787#endif
11788 (yyval.val)=rb_assoc_new(get_value(assignable(p, (yyvsp[0].val))), 0);
11789 }
11790#line 11786 "ripper.c"
11791 break;
11792
11793 case 696:
11794#line 5136 "ripper.y"
11795 {
11796#if 0
11797 (yyval.val) = (yyvsp[0].val);
11798#endif
11799 (yyval.val)=rb_ary_new3(1, get_value((yyvsp[0].val)));
11800 }
11801#line 11797 "ripper.c"
11802 break;
11803
11804 case 697:
11805#line 5143 "ripper.y"
11806 {
11807#if 0
11808 (yyval.val) = kwd_append((yyvsp[-2].val), (yyvsp[0].val));
11809#endif
11810 (yyval.val)=rb_ary_push((yyvsp[-2].val), get_value((yyvsp[0].val)));
11811 }
11812#line 11808 "ripper.c"
11813 break;
11814
11815 case 698:
11816#line 5153 "ripper.y"
11817 {
11818#if 0
11819 (yyval.val) = (yyvsp[0].val);
11820#endif
11821 (yyval.val)=rb_ary_new3(1, get_value((yyvsp[0].val)));
11822 }
11823#line 11819 "ripper.c"
11824 break;
11825
11826 case 699:
11827#line 5160 "ripper.y"
11828 {
11829#if 0
11830 (yyval.val) = kwd_append((yyvsp[-2].val), (yyvsp[0].val));
11831#endif
11832 (yyval.val)=rb_ary_push((yyvsp[-2].val), get_value((yyvsp[0].val)));
11833 }
11834#line 11830 "ripper.c"
11835 break;
11836
11837 case 702:
11838#line 5173 "ripper.y"
11839 {
11840#if 0
11841#endif
11842 {VALUE v1,v2;v1=Qnil;v2=dispatch1(nokw_param,v1);(yyval.val)=v2;}
11843 }
11844#line 11840 "ripper.c"
11845 break;
11846
11847 case 703:
11848#line 5181 "ripper.y"
11849 {
11850 arg_var(p, shadowing_lvar(p, get_id((yyvsp[0].val))));
11851#if 0
11852 (yyval.val) = (yyvsp[0].val);
11853#endif
11854 {VALUE v1,v2;v1=(yyvsp[0].val);v2=dispatch1(kwrest_param,v1);(yyval.val)=v2;}
11855 }
11856#line 11852 "ripper.c"
11857 break;
11858
11859 case 704:
11860#line 5189 "ripper.y"
11861 {
11862#if 0
11863 (yyval.val) = internal_id(p);
11864 arg_var(p, (yyval.val));
11865#endif
11866 {VALUE v1,v2;v1=Qnil;v2=dispatch1(kwrest_param,v1);(yyval.val)=v2;}
11867 }
11868#line 11864 "ripper.c"
11869 break;
11870
11871 case 705:
11872#line 5199 "ripper.y"
11873 {
11874 p->cur_arg = 0;
11875#if 0
11876 (yyval.val) = NEW_OPT_ARG(0, assignable(p, (yyvsp[-2].val), (yyvsp[0].val), &(yyloc)), &(yyloc));
11877#endif
11878 (yyval.val)=rb_assoc_new(get_value(assignable(p, (yyvsp[-2].val))), get_value((yyvsp[0].val)));
11879 }
11880#line 11876 "ripper.c"
11881 break;
11882
11883 case 706:
11884#line 5209 "ripper.y"
11885 {
11886 p->cur_arg = 0;
11887#if 0
11888 (yyval.val) = NEW_OPT_ARG(0, assignable(p, (yyvsp[-2].val), (yyvsp[0].val), &(yyloc)), &(yyloc));
11889#endif
11890 (yyval.val)=rb_assoc_new(get_value(assignable(p, (yyvsp[-2].val))), get_value((yyvsp[0].val)));
11891 }
11892#line 11888 "ripper.c"
11893 break;
11894
11895 case 707:
11896#line 5219 "ripper.y"
11897 {
11898#if 0
11899 (yyval.val) = (yyvsp[0].val);
11900#endif
11901 (yyval.val)=rb_ary_new3(1, get_value((yyvsp[0].val)));
11902 }
11903#line 11899 "ripper.c"
11904 break;
11905
11906 case 708:
11907#line 5226 "ripper.y"
11908 {
11909#if 0
11910 (yyval.val) = opt_arg_append((yyvsp[-2].val), (yyvsp[0].val));
11911#endif
11912 (yyval.val)=rb_ary_push((yyvsp[-2].val), get_value((yyvsp[0].val)));
11913 }
11914#line 11910 "ripper.c"
11915 break;
11916
11917 case 709:
11918#line 5235 "ripper.y"
11919 {
11920#if 0
11921 (yyval.val) = (yyvsp[0].val);
11922#endif
11923 (yyval.val)=rb_ary_new3(1, get_value((yyvsp[0].val)));
11924 }
11925#line 11921 "ripper.c"
11926 break;
11927
11928 case 710:
11929#line 5242 "ripper.y"
11930 {
11931#if 0
11932 (yyval.val) = opt_arg_append((yyvsp[-2].val), (yyvsp[0].val));
11933#endif
11934 (yyval.val)=rb_ary_push((yyvsp[-2].val), get_value((yyvsp[0].val)));
11935 }
11936#line 11932 "ripper.c"
11937 break;
11938
11939 case 713:
11940#line 5255 "ripper.y"
11941 {
11942 arg_var(p, shadowing_lvar(p, get_id((yyvsp[0].val))));
11943#if 0
11944 (yyval.val) = (yyvsp[0].val);
11945#endif
11946 {VALUE v1,v2;v1=(yyvsp[0].val);v2=dispatch1(rest_param,v1);(yyval.val)=v2;}
11947 }
11948#line 11944 "ripper.c"
11949 break;
11950
11951 case 714:
11952#line 5263 "ripper.y"
11953 {
11954#if 0
11955 (yyval.val) = internal_id(p);
11956 arg_var(p, (yyval.val));
11957#endif
11958 {VALUE v1,v2;v1=Qnil;v2=dispatch1(rest_param,v1);(yyval.val)=v2;}
11959 }
11960#line 11956 "ripper.c"
11961 break;
11962
11963 case 717:
11964#line 5277 "ripper.y"
11965 {
11966 arg_var(p, shadowing_lvar(p, get_id((yyvsp[0].val))));
11967#if 0
11968 (yyval.val) = (yyvsp[0].val);
11969#endif
11970 {VALUE v1,v2;v1=(yyvsp[0].val);v2=dispatch1(blockarg,v1);(yyval.val)=v2;}
11971 }
11972#line 11968 "ripper.c"
11973 break;
11974
11975 case 718:
11976#line 5287 "ripper.y"
11977 {
11978 (yyval.val) = (yyvsp[0].val);
11979 }
11980#line 11976 "ripper.c"
11981 break;
11982
11983 case 719:
11984#line 5291 "ripper.y"
11985 {
11986 (yyval.val) = Qnull;
11987 }
11988#line 11984 "ripper.c"
11989 break;
11990
11991 case 720:
11992#line 5297 "ripper.y"
11993 {
11994 value_expr((yyvsp[0].val));
11995 (yyval.val) = (yyvsp[0].val);
11996 }
11997#line 11993 "ripper.c"
11998 break;
11999
12000 case 721:
12001#line 5301 "ripper.y"
12002 {SET_LEX_STATE(EXPR_BEG);}
12003#line 11999 "ripper.c"
12004 break;
12005
12006 case 722:
12007#line 5302 "ripper.y"
12008 {
12009#if 0
12010 switch (nd_type((yyvsp[-1].val))) {
12011 case NODE_STR:
12012 case NODE_DSTR:
12013 case NODE_XSTR:
12014 case NODE_DXSTR:
12015 case NODE_DREGX:
12016 case NODE_LIT:
12017 case NODE_LIST:
12018 case NODE_ZLIST:
12019 yyerror1(&(yylsp[-1]), "can't define singleton method for literals");
12020 break;
12021 default:
12022 value_expr((yyvsp[-1].val));
12023 break;
12024 }
12025 (yyval.val) = (yyvsp[-1].val);
12026#endif
12027 {VALUE v1,v2;v1=(yyvsp[-1].val);v2=dispatch1(paren,v1);(yyval.val)=v2;}
12028 }
12029#line 12025 "ripper.c"
12030 break;
12031
12032 case 724:
12033#line 5327 "ripper.y"
12034 {
12035#if 0
12036 (yyval.val) = (yyvsp[-1].val);
12037#endif
12038 {VALUE v1,v2;v1=(yyvsp[-1].val);v2=dispatch1(assoclist_from_args,v1);(yyval.val)=v2;}
12039 }
12040#line 12036 "ripper.c"
12041 break;
12042
12043 case 725:
12044#line 5336 "ripper.y"
12045 {(yyval.val)=rb_ary_new3(1, get_value((yyvsp[0].val)));}
12046#line 12042 "ripper.c"
12047 break;
12048
12049 case 726:
12050#line 5338 "ripper.y"
12051 {
12052#if 0
12053 NODE *assocs = (yyvsp[-2].val);
12054 NODE *tail = (yyvsp[0].val);
12055 if (!assocs) {
12056 assocs = tail;
12057 }
12058 else if (tail) {
12059 if (assocs->nd_head &&
12060 !tail->nd_head && nd_type(tail->nd_next) == NODE_LIST &&
12061 nd_type(tail->nd_next->nd_head) == NODE_HASH) {
12062 /* DSTAR */
12063 tail = tail->nd_next->nd_head->nd_head;
12064 }
12065 assocs = list_concat(assocs, tail);
12066 }
12067 (yyval.val) = assocs;
12068#endif
12069 (yyval.val)=rb_ary_push((yyvsp[-2].val), get_value((yyvsp[0].val)));
12070 }
12071#line 12067 "ripper.c"
12072 break;
12073
12074 case 727:
12075#line 5361 "ripper.y"
12076 {
12077#if 0
12078 if (nd_type((yyvsp[-2].val)) == NODE_STR) {
12079 nd_set_type((yyvsp[-2].val), NODE_LIT);
12080 RB_OBJ_WRITE(p->ast, &(yyvsp[-2].val)->nd_lit, rb_fstring((yyvsp[-2].val)->nd_lit));
12081 }
12082 (yyval.val) = list_append(p, NEW_LIST((yyvsp[-2].val), &(yyloc)), (yyvsp[0].val));
12083#endif
12084 {VALUE v1,v2,v3;v1=(yyvsp[-2].val);v2=(yyvsp[0].val);v3=dispatch2(assoc_new,v1,v2);(yyval.val)=v3;}
12085 }
12086#line 12082 "ripper.c"
12087 break;
12088
12089 case 728:
12090#line 5372 "ripper.y"
12091 {
12092#if 0
12093 (yyval.val) = list_append(p, NEW_LIST(NEW_LIT(ID2SYM((yyvsp[-1].val)), &(yylsp[-1])), &(yyloc)), (yyvsp[0].val));
12094#endif
12095 {VALUE v1,v2,v3;v1=(yyvsp[-1].val);v2=(yyvsp[0].val);v3=dispatch2(assoc_new,v1,v2);(yyval.val)=v3;}
12096 }
12097#line 12093 "ripper.c"
12098 break;
12099
12100 case 729:
12101#line 5379 "ripper.y"
12102 {
12103#if 0
12104 YYLTYPE loc = code_loc_gen(&(yylsp[-3]), &(yylsp[-1]));
12105 (yyval.val) = list_append(p, NEW_LIST(dsym_node(p, (yyvsp[-2].val), &loc), &loc), (yyvsp[0].val));
12106#endif
12107 {VALUE v1,v2,v3,v4,v5;v1=(yyvsp[-2].val);v2=dispatch1(dyna_symbol,v1);v3=v2;v4=(yyvsp[0].val);v5=dispatch2(assoc_new,v3,v4);(yyval.val)=v5;}
12108 }
12109#line 12105 "ripper.c"
12110 break;
12111
12112 case 730:
12113#line 5387 "ripper.y"
12114 {
12115#if 0
12116 if (nd_type((yyvsp[0].val)) == NODE_HASH &&
12117 !((yyvsp[0].val)->nd_head && (yyvsp[0].val)->nd_head->nd_alen)) {
12118 static VALUE empty_hash;
12119 if (!empty_hash) {
12120 empty_hash = rb_obj_freeze(rb_hash_new());
12121 rb_gc_register_mark_object(empty_hash);
12122 }
12123 (yyval.val) = list_append(p, NEW_LIST(0, &(yyloc)), NEW_LIT(empty_hash, &(yyloc)));
12124 }
12125 else
12126 (yyval.val) = list_append(p, NEW_LIST(0, &(yyloc)), (yyvsp[0].val));
12127#endif
12128 {VALUE v1,v2;v1=(yyvsp[0].val);v2=dispatch1(assoc_splat,v1);(yyval.val)=v2;}
12129 }
12130#line 12126 "ripper.c"
12131 break;
12132
12133 case 757:
12134#line 5455 "ripper.y"
12135 {yyerrok;token_flush(p);}
12136#line 12132 "ripper.c"
12137 break;
12138
12139 case 758:
12140#line 5456 "ripper.y"
12141 {token_flush(p);}
12142#line 12138 "ripper.c"
12143 break;
12144
12145 case 760:
12146#line 5460 "ripper.y"
12147 {yyerrok;}
12148#line 12144 "ripper.c"
12149 break;
12150
12151 case 761:
12152#line 5464 "ripper.y"
12153 {
12154 (yyval.val) = Qnull;
12155 }
12156#line 12152 "ripper.c"
12157 break;
12158
12159
12160#line 12156 "ripper.c"
12161
12162 default: break;
12163 }
12164 /* User semantic actions sometimes alter yychar, and that requires
12165 that yytoken be updated with the new translation. We take the
12166 approach of translating immediately before every use of yytoken.
12167 One alternative is translating here after every semantic action,
12168 but that translation would be missed if the semantic action invokes
12169 YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
12170 if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
12171 incorrect destructor might then be invoked immediately. In the
12172 case of YYERROR or YYBACKUP, subsequent parser actions might lead
12173 to an incorrect destructor call or verbose syntax error message
12174 before the lookahead is translated. */
12175 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
12176
12177 YYPOPSTACK (yylen);
12178 yylen = 0;
12179 YY_STACK_PRINT (yyss, yyssp);
12180
12181 *++yyvsp = yyval;
12182 *++yylsp = yyloc;
12183
12184 /* Now 'shift' the result of the reduction. Determine what state
12185 that goes to, based on the state we popped back to and the rule
12186 number reduced by. */
12187 {
12188 const int yylhs = yyr1[yyn] - YYNTOKENS;
12189 const int yyi = yypgoto[yylhs] + *yyssp;
12190 yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp
12191 ? yytable[yyi]
12192 : yydefgoto[yylhs]);
12193 }
12194
12195 goto yynewstate;
12196
12197
12198/*--------------------------------------.
12199| yyerrlab -- here on detecting error. |
12200`--------------------------------------*/
12201yyerrlab:
12202 /* Make sure we have latest lookahead translation. See comments at
12203 user semantic actions for why this is necessary. */
12204 yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
12205
12206 /* If not already recovering from an error, report this error. */
12207 if (!yyerrstatus)
12208 {
12209 ++yynerrs;
12210#if ! YYERROR_VERBOSE
12211 yyerror (&yylloc, p, YY_("syntax error"));
12212#else
12213# define YYSYNTAX_ERROR yysyntax_error (p, &yymsg_alloc, &yymsg, \
12214 yyssp, yytoken)
12215 {
12216 char const *yymsgp = YY_("syntax error");
12217 int yysyntax_error_status;
12218 yysyntax_error_status = YYSYNTAX_ERROR;
12219 if (yysyntax_error_status == 0)
12220 yymsgp = yymsg;
12221 else if (yysyntax_error_status == 1)
12222 {
12223 if (yymsg != yymsgbuf)
12224 YYSTACK_FREE (yymsg);
12225 yymsg = YY_CAST (char *, YYSTACK_ALLOC (YY_CAST (YYSIZE_T, yymsg_alloc)));
12226 if (!yymsg)
12227 {
12228 yymsg = yymsgbuf;
12229 yymsg_alloc = sizeof yymsgbuf;
12230 yysyntax_error_status = 2;
12231 }
12232 else
12233 {
12234 yysyntax_error_status = YYSYNTAX_ERROR;
12235 yymsgp = yymsg;
12236 }
12237 }
12238 yyerror (&yylloc, p, yymsgp);
12239 if (yysyntax_error_status == 2)
12240 goto yyexhaustedlab;
12241 }
12242# undef YYSYNTAX_ERROR
12243#endif
12244 }
12245
12246 yyerror_range[1] = yylloc;
12247
12248 if (yyerrstatus == 3)
12249 {
12250 /* If just tried and failed to reuse lookahead token after an
12251 error, discard it. */
12252
12253 if (yychar <= YYEOF)
12254 {
12255 /* Return failure if at end of input. */
12256 if (yychar == YYEOF)
12257 YYABORT;
12258 }
12259 else
12260 {
12261 yydestruct ("Error: discarding",
12262 yytoken, &yylval, &yylloc, p);
12263 yychar = YYEMPTY;
12264 }
12265 }
12266
12267 /* Else will try to reuse lookahead token after shifting the error
12268 token. */
12269 goto yyerrlab1;
12270
12271
12272/*---------------------------------------------------.
12273| yyerrorlab -- error raised explicitly by YYERROR. |
12274`---------------------------------------------------*/
12275yyerrorlab:
12276 /* Pacify compilers when the user code never invokes YYERROR and the
12277 label yyerrorlab therefore never appears in user code. */
12278 if (0)
12279 YYERROR;
12280
12281 /* Do not reclaim the symbols of the rule whose action triggered
12282 this YYERROR. */
12283 YYPOPSTACK (yylen);
12284 yylen = 0;
12285 YY_STACK_PRINT (yyss, yyssp);
12286 yystate = *yyssp;
12287 goto yyerrlab1;
12288
12289
12290/*-------------------------------------------------------------.
12291| yyerrlab1 -- common code for both syntax error and YYERROR. |
12292`-------------------------------------------------------------*/
12293yyerrlab1:
12294 yyerrstatus = 3; /* Each real token shifted decrements this. */
12295
12296 for (;;)
12297 {
12298 yyn = yypact[yystate];
12299 if (!yypact_value_is_default (yyn))
12300 {
12301 yyn += YYTERROR;
12302 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
12303 {
12304 yyn = yytable[yyn];
12305 if (0 < yyn)
12306 break;
12307 }
12308 }
12309
12310 /* Pop the current state because it cannot handle the error token. */
12311 if (yyssp == yyss)
12312 YYABORT;
12313
12314 yyerror_range[1] = *yylsp;
12315 yydestruct ("Error: popping",
12316 yystos[yystate], yyvsp, yylsp, p);
12317 YYPOPSTACK (1);
12318 yystate = *yyssp;
12319 YY_STACK_PRINT (yyss, yyssp);
12320 }
12321
12323 *++yyvsp = yylval;
12325
12326 yyerror_range[2] = yylloc;
12327 /* Using YYLLOC is tempting, but would change the location of
12328 the lookahead. YYLOC is available though. */
12329 YYLLOC_DEFAULT (yyloc, yyerror_range, 2);
12330 *++yylsp = yyloc;
12331
12332 /* Shift the error token. */
12333 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
12334
12335 yystate = yyn;
12336 goto yynewstate;
12337
12338
12339/*-------------------------------------.
12340| yyacceptlab -- YYACCEPT comes here. |
12341`-------------------------------------*/
12342yyacceptlab:
12343 yyresult = 0;
12344 goto yyreturn;
12345
12346
12347/*-----------------------------------.
12348| yyabortlab -- YYABORT comes here. |
12349`-----------------------------------*/
12350yyabortlab:
12351 yyresult = 1;
12352 goto yyreturn;
12353
12354
12355#if !defined yyoverflow || YYERROR_VERBOSE
12356/*-------------------------------------------------.
12357| yyexhaustedlab -- memory exhaustion comes here. |
12358`-------------------------------------------------*/
12359yyexhaustedlab:
12360 yyerror (&yylloc, p, YY_("memory exhausted"));
12361 yyresult = 2;
12362 /* Fall through. */
12363#endif
12364
12365
12366/*-----------------------------------------------------.
12367| yyreturn -- parsing is finished, return the result. |
12368`-----------------------------------------------------*/
12369yyreturn:
12370 if (yychar != YYEMPTY)
12371 {
12372 /* Make sure we have latest lookahead translation. See comments at
12373 user semantic actions for why this is necessary. */
12374 yytoken = YYTRANSLATE (yychar);
12375 yydestruct ("Cleanup: discarding lookahead",
12376 yytoken, &yylval, &yylloc, p);
12377 }
12378 /* Do not reclaim the symbols of the rule whose action triggered
12379 this YYABORT or YYACCEPT. */
12380 YYPOPSTACK (yylen);
12381 YY_STACK_PRINT (yyss, yyssp);
12382 while (yyssp != yyss)
12383 {
12384 yydestruct ("Cleanup: popping",
12385 yystos[+*yyssp], yyvsp, yylsp, p);
12386 YYPOPSTACK (1);
12387 }
12388#ifndef yyoverflow
12389 if (yyss != yyssa)
12390 YYSTACK_FREE (yyss);
12391#endif
12392#if YYERROR_VERBOSE
12393 if (yymsg != yymsgbuf)
12394 YYSTACK_FREE (yymsg);
12395#endif
12396 return yyresult;
12397}
12398#line 5468 "ripper.y"
12399
12400# undef p
12401# undef yylex
12402# undef yylval
12403# define yylval (*p->lval)
12404
12405static int regx_options(struct parser_params*);
12406static int tokadd_string(struct parser_params*,int,int,int,long*,rb_encoding**,rb_encoding**);
12407static void tokaddmbc(struct parser_params *p, int c, rb_encoding *enc);
12408static enum yytokentype parse_string(struct parser_params*,rb_strterm_literal_t*);
12409static enum yytokentype here_document(struct parser_params*,rb_strterm_heredoc_t*);
12410
12411#ifndef RIPPER
12412# define set_yylval_node(x) { \
12413 YYLTYPE _cur_loc; \
12414 rb_parser_set_location(p, &_cur_loc); \
12415 yylval.node = (x); \
12416}
12417# define set_yylval_str(x) \
12418do { \
12419 set_yylval_node(NEW_STR(x, &_cur_loc)); \
12420 RB_OBJ_WRITTEN(p->ast, Qnil, x); \
12421} while(0)
12422# define set_yylval_literal(x) \
12423do { \
12424 set_yylval_node(NEW_LIT(x, &_cur_loc)); \
12425 RB_OBJ_WRITTEN(p->ast, Qnil, x); \
12426} while(0)
12427# define set_yylval_num(x) (yylval.num = (x))
12428# define set_yylval_id(x) (yylval.id = (x))
12429# define set_yylval_name(x) (yylval.id = (x))
12430# define yylval_id() (yylval.id)
12431#else
12432static inline VALUE
12433ripper_yylval_id(struct parser_params *p, ID x)
12434{
12435 return ripper_new_yylval(p, x, ID2SYM(x), 0);
12436}
12437# define set_yylval_str(x) (yylval.val = add_mark_object(p, (x)))
12438# define set_yylval_num(x) (yylval.val = ripper_new_yylval(p, (x), 0, 0))
12439# define set_yylval_id(x) (void)(x)
12440# define set_yylval_name(x) (void)(yylval.val = ripper_yylval_id(p, x))
12441# define set_yylval_literal(x) add_mark_object(p, (x))
12442# define set_yylval_node(x) (void)(x)
12443# define yylval_id() yylval.id
12444# define _cur_loc NULL_LOC /* dummy */
12445#endif
12446
12447#define set_yylval_noname() set_yylval_id(keyword_nil)
12448
12449#ifndef RIPPER
12450#define literal_flush(p, ptr) ((p)->lex.ptok = (ptr))
12451#define dispatch_scan_event(p, t) ((void)0)
12452#define dispatch_delayed_token(p, t) ((void)0)
12453#define has_delayed_token(p) (0)
12454#else
12455#define literal_flush(p, ptr) ((void)(ptr))
12456
12457#define yylval_rval (*(RB_TYPE_P(yylval.val, T_NODE) ? &yylval.node->nd_rval : &yylval.val))
12458
12459static inline VALUE
12460intern_sym(const char *name)
12461{
12462 ID id = rb_intern_const(name);
12463 return ID2SYM(id);
12464}
12465
12466static int
12467ripper_has_scan_event(struct parser_params *p)
12468{
12469 if (p->lex.pcur < p->lex.ptok) rb_raise(rb_eRuntimeError, "lex.pcur < lex.ptok");
12470 return p->lex.pcur > p->lex.ptok;
12471}
12472
12473static VALUE
12474ripper_scan_event_val(struct parser_params *p, enum yytokentype t)
12475{
12476 VALUE str = STR_NEW(p->lex.ptok, p->lex.pcur - p->lex.ptok);
12477 VALUE rval = ripper_dispatch1(p, ripper_token2eventid(t), str);
12478 token_flush(p);
12479 return rval;
12480}
12481
12482static void
12483ripper_dispatch_scan_event(struct parser_params *p, enum yytokentype t)
12484{
12485 if (!ripper_has_scan_event(p)) return;
12486 add_mark_object(p, yylval_rval = ripper_scan_event_val(p, t));
12487}
12488#define dispatch_scan_event(p, t) ripper_dispatch_scan_event(p, t)
12489
12490static void
12491ripper_dispatch_delayed_token(struct parser_params *p, enum yytokentype t)
12492{
12493 int saved_line = p->ruby_sourceline;
12494 const char *saved_tokp = p->lex.ptok;
12495
12496 if (NIL_P(p->delayed.token)) return;
12497 p->ruby_sourceline = p->delayed.line;
12498 p->lex.ptok = p->lex.pbeg + p->delayed.col;
12499 add_mark_object(p, yylval_rval = ripper_dispatch1(p, ripper_token2eventid(t), p->delayed.token));
12500 p->delayed.token = Qnil;
12501 p->ruby_sourceline = saved_line;
12502 p->lex.ptok = saved_tokp;
12503}
12504#define dispatch_delayed_token(p, t) ripper_dispatch_delayed_token(p, t)
12505#define has_delayed_token(p) (!NIL_P(p->delayed.token))
12506#endif /* RIPPER */
12507
12508#include "ruby/regex.h"
12509#include "ruby/util.h"
12510
12511static inline int
12512is_identchar(const char *ptr, const char *MAYBE_UNUSED(ptr_end), rb_encoding *enc)
12513{
12514 return rb_enc_isalnum((unsigned char)*ptr, enc) || *ptr == '_' || !ISASCII(*ptr);
12515}
12516
12517static inline int
12518parser_is_identchar(struct parser_params *p)
12519{
12520 return !(p)->eofp && is_identchar(p->lex.pcur-1, p->lex.pend, p->enc);
12521}
12522
12523static inline int
12524parser_isascii(struct parser_params *p)
12525{
12526 return ISASCII(*(p->lex.pcur-1));
12527}
12528
12529static void
12530token_info_setup(token_info *ptinfo, const char *ptr, const rb_code_location_t *loc)
12531{
12532 int column = 1, nonspc = 0, i;
12533 for (i = 0; i < loc->beg_pos.column; i++, ptr++) {
12534 if (*ptr == '\t') {
12535 column = (((column - 1) / TAB_WIDTH) + 1) * TAB_WIDTH;
12536 }
12537 column++;
12538 if (*ptr != ' ' && *ptr != '\t') {
12539 nonspc = 1;
12540 }
12541 }
12542
12543 ptinfo->beg = loc->beg_pos;
12544 ptinfo->indent = column;
12545 ptinfo->nonspc = nonspc;
12546}
12547
12548static void
12549token_info_push(struct parser_params *p, const char *token, const rb_code_location_t *loc)
12550{
12551 token_info *ptinfo;
12552
12553 if (!p->token_info_enabled) return;
12554 ptinfo = ALLOC(token_info);
12555 ptinfo->token = token;
12556 ptinfo->next = p->token_info;
12557 token_info_setup(ptinfo, p->lex.pbeg, loc);
12558
12559 p->token_info = ptinfo;
12560}
12561
12562static void
12563token_info_pop(struct parser_params *p, const char *token, const rb_code_location_t *loc)
12564{
12565 token_info *ptinfo_beg = p->token_info;
12566
12567 if (!ptinfo_beg) return;
12568 p->token_info = ptinfo_beg->next;
12569
12570 /* indentation check of matched keywords (begin..end, if..end, etc.) */
12571 token_info_warn(p, token, ptinfo_beg, 1, loc);
12572 ruby_sized_xfree(ptinfo_beg, sizeof(*ptinfo_beg));
12573}
12574
12575static void
12576token_info_warn(struct parser_params *p, const char *token, token_info *ptinfo_beg, int same, const rb_code_location_t *loc)
12577{
12578 token_info ptinfo_end_body, *ptinfo_end = &ptinfo_end_body;
12579 if (!p->token_info_enabled) return;
12580 if (!ptinfo_beg) return;
12581 token_info_setup(ptinfo_end, p->lex.pbeg, loc);
12582 if (ptinfo_beg->beg.lineno == ptinfo_end->beg.lineno) return; /* ignore one-line block */
12583 if (ptinfo_beg->nonspc || ptinfo_end->nonspc) return; /* ignore keyword in the middle of a line */
12584 if (ptinfo_beg->indent == ptinfo_end->indent) return; /* the indents are matched */
12585 if (!same && ptinfo_beg->indent < ptinfo_end->indent) return;
12586 rb_warn3L(ptinfo_end->beg.lineno,
12587 "mismatched indentations at '%s' with '%s' at %d",
12588 WARN_S(token), WARN_S(ptinfo_beg->token), WARN_I(ptinfo_beg->beg.lineno));
12589}
12590
12591static int
12592parser_precise_mbclen(struct parser_params *p, const char *ptr)
12593{
12594 int len = rb_enc_precise_mbclen(ptr, p->lex.pend, p->enc);
12595 if (!MBCLEN_CHARFOUND_P(len)) {
12596 compile_error(p, "invalid multibyte char (%s)", rb_enc_name(p->enc));
12597 return -1;
12598 }
12599 return len;
12600}
12601
12602#ifndef RIPPER
12603static void ruby_show_error_line(VALUE errbuf, const YYLTYPE *yylloc, int lineno, VALUE str);
12604
12605static inline void
12606parser_show_error_line(struct parser_params *p, const YYLTYPE *yylloc)
12607{
12608 VALUE str;
12609 int lineno = p->ruby_sourceline;
12610 if (!yylloc) {
12611 return;
12612 }
12613 else if (yylloc->beg_pos.lineno == lineno) {
12614 str = p->lex.lastline;
12615 }
12616 else {
12617 return;
12618 }
12619 ruby_show_error_line(p->error_buffer, yylloc, lineno, str);
12620}
12621
12622static int
12623parser_yyerror(struct parser_params *p, const YYLTYPE *yylloc, const char *msg)
12624{
12625 YYLTYPE current;
12626
12627 if (!yylloc) {
12628 yylloc = RUBY_SET_YYLLOC(current);
12629 }
12630 else if ((p->ruby_sourceline != yylloc->beg_pos.lineno &&
12631 p->ruby_sourceline != yylloc->end_pos.lineno) ||
12632 (yylloc->beg_pos.lineno == yylloc->end_pos.lineno &&
12633 yylloc->beg_pos.column == yylloc->end_pos.column)) {
12634 yylloc = 0;
12635 }
12636 compile_error(p, "%s", msg);
12637 parser_show_error_line(p, yylloc);
12638 return 0;
12639}
12640
12641static void
12642ruby_show_error_line(VALUE errbuf, const YYLTYPE *yylloc, int lineno, VALUE str)
12643{
12644 VALUE mesg;
12645 const int max_line_margin = 30;
12646 const char *ptr, *ptr_end, *pt, *pb;
12647 const char *pre = "", *post = "", *pend;
12648 const char *code = "", *caret = "";
12649 const char *lim;
12650 const char *const pbeg = RSTRING_PTR(str);
12651 char *buf;
12652 long len;
12653 int i;
12654
12655 if (!yylloc) return;
12656 pend = RSTRING_END(str);
12657 if (pend > pbeg && pend[-1] == '\n') {
12658 if (--pend > pbeg && pend[-1] == '\r') --pend;
12659 }
12660
12661 pt = pend;
12662 if (lineno == yylloc->end_pos.lineno &&
12663 (pend - pbeg) > yylloc->end_pos.column) {
12664 pt = pbeg + yylloc->end_pos.column;
12665 }
12666
12667 ptr = ptr_end = pt;
12668 lim = ptr - pbeg > max_line_margin ? ptr - max_line_margin : pbeg;
12669 while ((lim < ptr) && (*(ptr-1) != '\n')) ptr--;
12670
12671 lim = pend - ptr_end > max_line_margin ? ptr_end + max_line_margin : pend;
12672 while ((ptr_end < lim) && (*ptr_end != '\n') && (*ptr_end != '\r')) ptr_end++;
12673
12674 len = ptr_end - ptr;
12675 if (len > 4) {
12676 if (ptr > pbeg) {
12677 ptr = rb_enc_prev_char(pbeg, ptr, pt, rb_enc_get(str));
12678 if (ptr > pbeg) pre = "...";
12679 }
12680 if (ptr_end < pend) {
12681 ptr_end = rb_enc_prev_char(pt, ptr_end, pend, rb_enc_get(str));
12682 if (ptr_end < pend) post = "...";
12683 }
12684 }
12685 pb = pbeg;
12686 if (lineno == yylloc->beg_pos.lineno) {
12687 pb += yylloc->beg_pos.column;
12688 if (pb > pt) pb = pt;
12689 }
12690 if (pb < ptr) pb = ptr;
12691 if (len <= 4 && yylloc->beg_pos.lineno == yylloc->end_pos.lineno) {
12692 return;
12693 }
12694 if (RTEST(errbuf)) {
12695 mesg = rb_attr_get(errbuf, idMesg);
12696 if (RSTRING_LEN(mesg) > 0 && *(RSTRING_END(mesg)-1) != '\n')
12697 rb_str_cat_cstr(mesg, "\n");
12698 }
12699 else {
12700 mesg = rb_enc_str_new(0, 0, rb_enc_get(str));
12701 }
12702 if (!errbuf && rb_stderr_tty_p()) {
12703#define CSI_BEGIN "\033["
12704#define CSI_SGR "m"
12705 rb_str_catf(mesg,
12706 CSI_BEGIN""CSI_SGR"%s" /* pre */
12707 CSI_BEGIN"1"CSI_SGR"%.*s"
12708 CSI_BEGIN"1;4"CSI_SGR"%.*s"
12709 CSI_BEGIN";1"CSI_SGR"%.*s"
12710 CSI_BEGIN""CSI_SGR"%s" /* post */
12711 "\n",
12712 pre,
12713 (int)(pb - ptr), ptr,
12714 (int)(pt - pb), pb,
12715 (int)(ptr_end - pt), pt,
12716 post);
12717 }
12718 else {
12719 char *p2;
12720
12721 len = ptr_end - ptr;
12722 lim = pt < pend ? pt : pend;
12723 i = (int)(lim - ptr);
12724 buf = ALLOCA_N(char, i+2);
12725 code = ptr;
12726 caret = p2 = buf;
12727 if (ptr <= pb) {
12728 while (ptr < pb) {
12729 *p2++ = *ptr++ == '\t' ? '\t' : ' ';
12730 }
12731 *p2++ = '^';
12732 ptr++;
12733 }
12734 if (lim > ptr) {
12735 memset(p2, '~', (lim - ptr));
12736 p2 += (lim - ptr);
12737 }
12738 *p2 = '\0';
12739 rb_str_catf(mesg, "%s%.*s%s\n""%s%s\n",
12740 pre, (int)len, code, post,
12741 pre, caret);
12742 }
12743 if (!errbuf) rb_write_error_str(mesg);
12744}
12745#else
12746static int
12747parser_yyerror(struct parser_params *p, const YYLTYPE *yylloc, const char *msg)
12748{
12749 const char *pcur = 0, *ptok = 0;
12750 if (yylloc &&
12751 p->ruby_sourceline == yylloc->beg_pos.lineno &&
12752 p->ruby_sourceline == yylloc->end_pos.lineno) {
12753 pcur = p->lex.pcur;
12754 ptok = p->lex.ptok;
12755 p->lex.ptok = p->lex.pbeg + yylloc->beg_pos.column;
12756 p->lex.pcur = p->lex.pbeg + yylloc->end_pos.column;
12757 }
12758 dispatch1(parse_error, STR_NEW2(msg));
12759 ripper_error(p);
12760 if (pcur) {
12761 p->lex.ptok = ptok;
12762 p->lex.pcur = pcur;
12763 }
12764 return 0;
12765}
12766
12767static inline void
12768parser_show_error_line(struct parser_params *p, const YYLTYPE *yylloc)
12769{
12770}
12771#endif /* !RIPPER */
12772
12773#ifndef RIPPER
12774static int
12775vtable_size(const struct vtable *tbl)
12776{
12777 if (!DVARS_TERMINAL_P(tbl)) {
12778 return tbl->pos;
12779 }
12780 else {
12781 return 0;
12782 }
12783}
12784#endif
12785
12786static struct vtable *
12787vtable_alloc_gen(struct parser_params *p, int line, struct vtable *prev)
12788{
12789 struct vtable *tbl = ALLOC(struct vtable);
12790 tbl->pos = 0;
12791 tbl->capa = 8;
12792 tbl->tbl = ALLOC_N(ID, tbl->capa);
12793 tbl->prev = prev;
12794#ifndef RIPPER
12795 if (p->debug) {
12796 rb_parser_printf(p, "vtable_alloc:%d: %p\n", line, (void *)tbl);
12797 }
12798#endif
12799 return tbl;
12800}
12801#define vtable_alloc(prev) vtable_alloc_gen(p, __LINE__, prev)
12802
12803static void
12804vtable_free_gen(struct parser_params *p, int line, const char *name,
12805 struct vtable *tbl)
12806{
12807#ifndef RIPPER
12808 if (p->debug) {
12809 rb_parser_printf(p, "vtable_free:%d: %s(%p)\n", line, name, (void *)tbl);
12810 }
12811#endif
12812 if (!DVARS_TERMINAL_P(tbl)) {
12813 if (tbl->tbl) {
12814 ruby_sized_xfree(tbl->tbl, tbl->capa * sizeof(ID));
12815 }
12816 ruby_sized_xfree(tbl, sizeof(tbl));
12817 }
12818}
12819#define vtable_free(tbl) vtable_free_gen(p, __LINE__, #tbl, tbl)
12820
12821static void
12822vtable_add_gen(struct parser_params *p, int line, const char *name,
12823 struct vtable *tbl, ID id)
12824{
12825#ifndef RIPPER
12826 if (p->debug) {
12827 rb_parser_printf(p, "vtable_add:%d: %s(%p), %s\n",
12828 line, name, (void *)tbl, rb_id2name(id));
12829 }
12830#endif
12831 if (DVARS_TERMINAL_P(tbl)) {
12832 rb_parser_fatal(p, "vtable_add: vtable is not allocated (%p)", (void *)tbl);
12833 return;
12834 }
12835 if (tbl->pos == tbl->capa) {
12836 tbl->capa = tbl->capa * 2;
12837 SIZED_REALLOC_N(tbl->tbl, ID, tbl->capa, tbl->pos);
12838 }
12839 tbl->tbl[tbl->pos++] = id;
12840}
12841#define vtable_add(tbl, id) vtable_add_gen(p, __LINE__, #tbl, tbl, id)
12842
12843#ifndef RIPPER
12844static void
12845vtable_pop_gen(struct parser_params *p, int line, const char *name,
12846 struct vtable *tbl, int n)
12847{
12848 if (p->debug) {
12849 rb_parser_printf(p, "vtable_pop:%d: %s(%p), %d\n",
12850 line, name, (void *)tbl, n);
12851 }
12852 if (tbl->pos < n) {
12853 rb_parser_fatal(p, "vtable_pop: unreachable (%d < %d)", tbl->pos, n);
12854 return;
12855 }
12856 tbl->pos -= n;
12857}
12858#define vtable_pop(tbl, n) vtable_pop_gen(p, __LINE__, #tbl, tbl, n)
12859#endif
12860
12861static int
12862vtable_included(const struct vtable * tbl, ID id)
12863{
12864 int i;
12865
12866 if (!DVARS_TERMINAL_P(tbl)) {
12867 for (i = 0; i < tbl->pos; i++) {
12868 if (tbl->tbl[i] == id) {
12869 return i+1;
12870 }
12871 }
12872 }
12873 return 0;
12874}
12875
12876static void parser_prepare(struct parser_params *p);
12877
12878#ifndef RIPPER
12879static NODE *parser_append_options(struct parser_params *p, NODE *node);
12880
12881static VALUE
12882debug_lines(VALUE fname)
12883{
12884 ID script_lines;
12885 CONST_ID(script_lines, "SCRIPT_LINES__");
12886 if (rb_const_defined_at(rb_cObject, script_lines)) {
12887 VALUE hash = rb_const_get_at(rb_cObject, script_lines);
12888 if (RB_TYPE_P(hash, T_HASH)) {
12889 VALUE lines = rb_ary_new();
12890 rb_hash_aset(hash, fname, lines);
12891 return lines;
12892 }
12893 }
12894 return 0;
12895}
12896
12897static int
12898e_option_supplied(struct parser_params *p)
12899{
12900 return strcmp(p->ruby_sourcefile, "-e") == 0;
12901}
12902
12903static VALUE
12904yycompile0(VALUE arg)
12905{
12906 int n;
12907 NODE *tree;
12908 struct parser_params *p = (struct parser_params *)arg;
12909 VALUE cov = Qfalse;
12910
12913 if (p->debug_lines && p->ruby_sourceline > 0) {
12914 VALUE str = STR_NEW0();
12915 n = p->ruby_sourceline;
12916 do {
12918 } while (--n);
12919 }
12920
12921 if (!e_option_supplied(p)) {
12922 cov = Qtrue;
12923 }
12924 }
12925
12926 parser_prepare(p);
12927#define RUBY_DTRACE_PARSE_HOOK(name) \
12928 if (RUBY_DTRACE_PARSE_##name##_ENABLED()) { \
12929 RUBY_DTRACE_PARSE_##name(p->ruby_sourcefile, p->ruby_sourceline); \
12930 }
12932 n = yyparse(p);
12934 p->debug_lines = 0;
12935
12936 p->lex.strterm = 0;
12937 p->lex.pcur = p->lex.pbeg = p->lex.pend = 0;
12938 p->lex.prevline = p->lex.lastline = p->lex.nextline = 0;
12939 if (n || p->error_p) {
12940 VALUE mesg = p->error_buffer;
12941 if (!mesg) {
12943 }
12944 rb_set_errinfo(mesg);
12945 return FALSE;
12946 }
12947 tree = p->eval_tree;
12948 if (!tree) {
12949 tree = NEW_NIL(&NULL_LOC);
12950 }
12951 else {
12952 VALUE opt = p->compile_option;
12953 NODE *prelude;
12954 NODE *body = parser_append_options(p, tree->nd_body);
12955 if (!opt) opt = rb_obj_hide(rb_ident_hash_new());
12956 rb_hash_aset(opt, rb_sym_intern_ascii_cstr("coverage_enabled"), cov);
12957 prelude = block_append(p, p->eval_tree_begin, body);
12958 tree->nd_body = prelude;
12959 RB_OBJ_WRITE(p->ast, &p->ast->body.compile_option, opt);
12960 }
12961 p->ast->body.root = tree;
12962 p->ast->body.line_count = p->line_count;
12963 return TRUE;
12964}
12965
12966static rb_ast_t *
12967yycompile(VALUE vparser, struct parser_params *p, VALUE fname, int line)
12968{
12969 rb_ast_t *ast;
12970 if (NIL_P(fname)) {
12972 p->ruby_sourcefile = "(none)";
12973 }
12974 else {
12976 p->ruby_sourcefile = StringValueCStr(fname);
12977 }
12978 p->ruby_sourceline = line - 1;
12979
12980 p->ast = ast = rb_ast_new();
12981 rb_suppress_tracing(yycompile0, (VALUE)p);
12982 p->ast = 0;
12983 RB_GC_GUARD(vparser); /* prohibit tail call optimization */
12984
12985 return ast;
12986}
12987#endif /* !RIPPER */
12988
12989static rb_encoding *
12990must_be_ascii_compatible(VALUE s)
12991{
12993 if (!rb_enc_asciicompat(enc)) {
12994 rb_raise(rb_eArgError, "invalid source encoding");
12995 }
12996 return enc;
12997}
12998
12999static VALUE
13000lex_get_str(struct parser_params *p, VALUE s)
13001{
13002 char *beg, *end, *start;
13003 long len;
13004
13005 beg = RSTRING_PTR(s);
13006 len = RSTRING_LEN(s);
13007 start = beg;
13008 if (p->lex.gets_.ptr) {
13009 if (len == p->lex.gets_.ptr) return Qnil;
13010 beg += p->lex.gets_.ptr;
13011 len -= p->lex.gets_.ptr;
13012 }
13013 end = memchr(beg, '\n', len);
13014 if (end) len = ++end - beg;
13015 p->lex.gets_.ptr += len;
13016 return rb_str_subseq(s, beg - start, len);
13017}
13018
13019static VALUE
13020lex_getline(struct parser_params *p)
13021{
13022 VALUE line = (*p->lex.gets)(p, p->lex.input);
13023 if (NIL_P(line)) return line;
13024 must_be_ascii_compatible(line);
13025#ifndef RIPPER
13026 if (p->debug_lines) {
13027 rb_enc_associate(line, p->enc);
13028 rb_ary_push(p->debug_lines, line);
13029 }
13030#endif
13031 p->line_count++;
13032 return line;
13033}
13034
13035static const rb_data_type_t parser_data_type;
13036
13037#ifndef RIPPER
13038static rb_ast_t*
13039parser_compile_string(VALUE vparser, VALUE fname, VALUE s, int line)
13040{
13041 struct parser_params *p;
13042
13043 TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, p);
13044
13045 p->lex.gets = lex_get_str;
13046 p->lex.gets_.ptr = 0;
13047 p->lex.input = rb_str_new_frozen(s);
13048 p->lex.pbeg = p->lex.pcur = p->lex.pend = 0;
13049
13050 return yycompile(vparser, p, fname, line);
13051}
13052
13053rb_ast_t*
13054rb_parser_compile_string(VALUE vparser, const char *f, VALUE s, int line)
13055{
13057}
13058
13059rb_ast_t*
13061{
13062 must_be_ascii_compatible(s);
13063 return parser_compile_string(vparser, f, s, line);
13064}
13065
13067
13068static VALUE
13069lex_io_gets(struct parser_params *p, VALUE io)
13070{
13071 return rb_io_gets_internal(io);
13072}
13073
13074rb_ast_t*
13075rb_parser_compile_file_path(VALUE vparser, VALUE fname, VALUE file, int start)
13076{
13077 struct parser_params *p;
13078
13079 TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, p);
13080
13081 p->lex.gets = lex_io_gets;
13082 p->lex.input = file;
13083 p->lex.pbeg = p->lex.pcur = p->lex.pend = 0;
13084
13085 return yycompile(vparser, p, fname, start);
13086}
13087
13088static VALUE
13089lex_generic_gets(struct parser_params *p, VALUE input)
13090{
13091 return (*p->lex.gets_.call)(input, p->line_count);
13092}
13093
13094rb_ast_t*
13095rb_parser_compile_generic(VALUE vparser, VALUE (*lex_gets)(VALUE, int), VALUE fname, VALUE input, int start)
13096{
13097 struct parser_params *p;
13098
13099 TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, p);
13100
13101 p->lex.gets = lex_generic_gets;
13102 p->lex.gets_.call = lex_gets;
13103 p->lex.input = input;
13104 p->lex.pbeg = p->lex.pcur = p->lex.pend = 0;
13105
13106 return yycompile(vparser, p, fname, start);
13107}
13108#endif /* !RIPPER */
13109
13110#define STR_FUNC_ESCAPE 0x01
13111#define STR_FUNC_EXPAND 0x02
13112#define STR_FUNC_REGEXP 0x04
13113#define STR_FUNC_QWORDS 0x08
13114#define STR_FUNC_SYMBOL 0x10
13115#define STR_FUNC_INDENT 0x20
13116#define STR_FUNC_LABEL 0x40
13117#define STR_FUNC_LIST 0x4000
13118#define STR_FUNC_TERM 0x8000
13119
13131
13132static VALUE
13133parser_str_new(const char *ptr, long len, rb_encoding *enc, int func, rb_encoding *enc0)
13134{
13135 VALUE str;
13136
13138 if (!(func & STR_FUNC_REGEXP) && rb_enc_asciicompat(enc)) {
13140 }
13141 else if (enc0 == rb_usascii_encoding() && enc != rb_utf8_encoding()) {
13143 }
13144 }
13145
13146 return str;
13147}
13148
13149#define lex_goto_eol(p) ((p)->lex.pcur = (p)->lex.pend)
13150#define lex_eol_p(p) ((p)->lex.pcur >= (p)->lex.pend)
13151#define lex_eol_n_p(p,n) ((p)->lex.pcur+(n) >= (p)->lex.pend)
13152#define peek(p,c) peek_n(p, (c), 0)
13153#define peek_n(p,c,n) (!lex_eol_n_p(p, n) && (c) == (unsigned char)(p)->lex.pcur[n])
13154#define peekc(p) peekc_n(p, 0)
13155#define peekc_n(p,n) (lex_eol_n_p(p, n) ? -1 : (unsigned char)(p)->lex.pcur[n])
13156
13157#ifdef RIPPER
13158static void
13159add_delayed_token(struct parser_params *p, const char *tok, const char *end)
13160{
13161 if (tok < end) {
13162 if (!has_delayed_token(p)) {
13163 p->delayed.token = rb_str_buf_new(end - tok);
13164 rb_enc_associate(p->delayed.token, p->enc);
13165 p->delayed.line = p->ruby_sourceline;
13166 p->delayed.col = rb_long2int(tok - p->lex.pbeg);
13167 }
13168 rb_str_buf_cat(p->delayed.token, tok, end - tok);
13169 p->lex.ptok = end;
13170 }
13171}
13172#else
13173#define add_delayed_token(p, tok, end) ((void)(tok), (void)(end))
13174#endif
13175
13176static int
13177nextline(struct parser_params *p)
13178{
13179 VALUE v = p->lex.nextline;
13180 p->lex.nextline = 0;
13181 if (!v) {
13182 if (p->eofp)
13183 return -1;
13184
13185 if (p->lex.pend > p->lex.pbeg && *(p->lex.pend-1) != '\n') {
13186 goto end_of_input;
13187 }
13188
13189 if (!p->lex.input || NIL_P(v = lex_getline(p))) {
13190 end_of_input:
13191 p->eofp = 1;
13192 lex_goto_eol(p);
13193 return -1;
13194 }
13195 p->cr_seen = FALSE;
13196 }
13197 else if (NIL_P(v)) {
13198 /* after here-document without terminator */
13199 goto end_of_input;
13200 }
13201 add_delayed_token(p, p->lex.ptok, p->lex.pend);
13202 if (p->heredoc_end > 0) {
13204 p->heredoc_end = 0;
13205 }
13206 p->ruby_sourceline++;
13207 p->lex.pbeg = p->lex.pcur = RSTRING_PTR(v);
13208 p->lex.pend = p->lex.pcur + RSTRING_LEN(v);
13209 token_flush(p);
13210 p->lex.prevline = p->lex.lastline;
13211 p->lex.lastline = v;
13212 return 0;
13213}
13214
13215static int
13216parser_cr(struct parser_params *p, int c)
13217{
13218 if (peek(p, '\n')) {
13219 p->lex.pcur++;
13220 c = '\n';
13221 }
13222 else if (!p->cr_seen) {
13223 p->cr_seen = TRUE;
13224 /* carried over with p->lex.nextline for nextc() */
13225 rb_warn0("encountered \\r in middle of line, treated as a mere space");
13226 }
13227 return c;
13228}
13229
13230static inline int
13231nextc(struct parser_params *p)
13232{
13233 int c;
13234
13235 if (UNLIKELY((p->lex.pcur == p->lex.pend) || p->eofp || RTEST(p->lex.nextline))) {
13236 if (nextline(p)) return -1;
13237 }
13238 c = (unsigned char)*p->lex.pcur++;
13239 if (UNLIKELY(c == '\r')) {
13240 c = parser_cr(p, c);
13241 }
13242
13243 return c;
13244}
13245
13246static void
13247pushback(struct parser_params *p, int c)
13248{
13249 if (c == -1) return;
13250 p->lex.pcur--;
13251 if (p->lex.pcur > p->lex.pbeg && p->lex.pcur[0] == '\n' && p->lex.pcur[-1] == '\r') {
13252 p->lex.pcur--;
13253 }
13254}
13255
13256#define was_bol(p) ((p)->lex.pcur == (p)->lex.pbeg + 1)
13257
13258#define tokfix(p) ((p)->tokenbuf[(p)->tokidx]='\0')
13259#define tok(p) (p)->tokenbuf
13260#define toklen(p) (p)->tokidx
13261
13262static int
13263looking_at_eol_p(struct parser_params *p)
13264{
13265 const char *ptr = p->lex.pcur;
13266 while (ptr < p->lex.pend) {
13267 int c = (unsigned char)*ptr++;
13268 int eol = (c == '\n' || c == '#');
13269 if (eol || !ISSPACE(c)) {
13270 return eol;
13271 }
13272 }
13273 return TRUE;
13274}
13275
13276static char*
13277newtok(struct parser_params *p)
13278{
13279 p->tokidx = 0;
13280 p->tokline = p->ruby_sourceline;
13281 if (!p->tokenbuf) {
13282 p->toksiz = 60;
13283 p->tokenbuf = ALLOC_N(char, 60);
13284 }
13285 if (p->toksiz > 4096) {
13286 p->toksiz = 60;
13287 REALLOC_N(p->tokenbuf, char, 60);
13288 }
13289 return p->tokenbuf;
13290}
13291
13292static char *
13293tokspace(struct parser_params *p, int n)
13294{
13295 p->tokidx += n;
13296
13297 if (p->tokidx >= p->toksiz) {
13298 do {p->toksiz *= 2;} while (p->toksiz < p->tokidx);
13299 REALLOC_N(p->tokenbuf, char, p->toksiz);
13300 }
13301 return &p->tokenbuf[p->tokidx-n];
13302}
13303
13304static void
13305tokadd(struct parser_params *p, int c)
13306{
13307 p->tokenbuf[p->tokidx++] = (char)c;
13308 if (p->tokidx >= p->toksiz) {
13309 p->toksiz *= 2;
13310 REALLOC_N(p->tokenbuf, char, p->toksiz);
13311 }
13312}
13313
13314static int
13315tok_hex(struct parser_params *p, size_t *numlen)
13316{
13317 int c;
13318
13319 c = scan_hex(p->lex.pcur, 2, numlen);
13320 if (!*numlen) {
13321 yyerror0("invalid hex escape");
13322 token_flush(p);
13323 return 0;
13324 }
13325 p->lex.pcur += *numlen;
13326 return c;
13327}
13328
13329#define tokcopy(p, n) memcpy(tokspace(p, n), (p)->lex.pcur - (n), (n))
13330
13331static int
13332escaped_control_code(int c)
13333{
13334 int c2 = 0;
13335 switch (c) {
13336 case ' ':
13337 c2 = 's';
13338 break;
13339 case '\n':
13340 c2 = 'n';
13341 break;
13342 case '\t':
13343 c2 = 't';
13344 break;
13345 case '\v':
13346 c2 = 'v';
13347 break;
13348 case '\r':
13349 c2 = 'r';
13350 break;
13351 case '\f':
13352 c2 = 'f';
13353 break;
13354 }
13355 return c2;
13356}
13357
13358#define WARN_SPACE_CHAR(c, prefix) \
13359 rb_warn1("invalid character syntax; use "prefix"\\%c", WARN_I(c2))
13360
13361static int
13362tokadd_codepoint(struct parser_params *p, rb_encoding **encp,
13363 int regexp_literal, int wide)
13364{
13365 size_t numlen;
13366 int codepoint = scan_hex(p->lex.pcur, wide ? p->lex.pend - p->lex.pcur : 4, &numlen);
13367 literal_flush(p, p->lex.pcur);
13368 p->lex.pcur += numlen;
13369 if (wide ? (numlen == 0 || numlen > 6) : (numlen < 4)) {
13370 yyerror0("invalid Unicode escape");
13371 return wide && numlen > 0;
13372 }
13373 if (codepoint > 0x10ffff) {
13374 yyerror0("invalid Unicode codepoint (too large)");
13375 return wide;
13376 }
13377 if ((codepoint & 0xfffff800) == 0xd800) {
13378 yyerror0("invalid Unicode codepoint");
13379 return wide;
13380 }
13381 if (regexp_literal) {
13382 tokcopy(p, (int)numlen);
13383 }
13384 else if (codepoint >= 0x80) {
13385 rb_encoding *utf8 = rb_utf8_encoding();
13386 if (*encp && utf8 != *encp) {
13387 YYLTYPE loc = RUBY_INIT_YYLLOC();
13388 compile_error(p, "UTF-8 mixed within %s source", rb_enc_name(*encp));
13389 parser_show_error_line(p, &loc);
13390 return wide;
13391 }
13392 *encp = utf8;
13393 tokaddmbc(p, codepoint, *encp);
13394 }
13395 else {
13396 tokadd(p, codepoint);
13397 }
13398 return TRUE;
13399}
13400
13401/* return value is for ?\u3042 */
13402static void
13403tokadd_utf8(struct parser_params *p, rb_encoding **encp,
13404 int term, int symbol_literal, int regexp_literal)
13405{
13406 /*
13407 * If `term` is not -1, then we allow multiple codepoints in \u{}
13408 * upto `term` byte, otherwise we're parsing a character literal.
13409 * And then add the codepoints to the current token.
13410 */
13411 static const char multiple_codepoints[] = "Multiple codepoints at single character literal";
13412
13413 const int open_brace = '{', close_brace = '}';
13414
13415 if (regexp_literal) { tokadd(p, '\\'); tokadd(p, 'u'); }
13416
13417 if (peek(p, open_brace)) { /* handle \u{...} form */
13418 const char *second = NULL;
13419 int c, last = nextc(p);
13420 if (p->lex.pcur >= p->lex.pend) goto unterminated;
13421 while (ISSPACE(c = *p->lex.pcur) && ++p->lex.pcur < p->lex.pend);
13422 while (c != close_brace) {
13423 if (c == term) goto unterminated;
13424 if (second == multiple_codepoints)
13425 second = p->lex.pcur;
13426 if (regexp_literal) tokadd(p, last);
13427 if (!tokadd_codepoint(p, encp, regexp_literal, TRUE)) {
13428 break;
13429 }
13430 while (ISSPACE(c = *p->lex.pcur)) {
13431 if (++p->lex.pcur >= p->lex.pend) goto unterminated;
13432 last = c;
13433 }
13434 if (term == -1 && !second)
13435 second = multiple_codepoints;
13436 }
13437
13438 if (c != close_brace) {
13439 unterminated:
13440 token_flush(p);
13441 yyerror0("unterminated Unicode escape");
13442 return;
13443 }
13444 if (second && second != multiple_codepoints) {
13445 const char *pcur = p->lex.pcur;
13446 p->lex.pcur = second;
13448 token_flush(p);
13449 p->lex.pcur = pcur;
13450 yyerror0(multiple_codepoints);
13451 token_flush(p);
13452 }
13453
13454 if (regexp_literal) tokadd(p, close_brace);
13455 nextc(p);
13456 }
13457 else { /* handle \uxxxx form */
13458 if (!tokadd_codepoint(p, encp, regexp_literal, FALSE)) {
13459 token_flush(p);
13460 return;
13461 }
13462 }
13463}
13464
13465#define ESCAPE_CONTROL 1
13466#define ESCAPE_META 2
13467
13468static int
13469read_escape(struct parser_params *p, int flags, rb_encoding **encp)
13470{
13471 int c;
13472 size_t numlen;
13473
13474 switch (c = nextc(p)) {
13475 case '\\': /* Backslash */
13476 return c;
13477
13478 case 'n': /* newline */
13479 return '\n';
13480
13481 case 't': /* horizontal tab */
13482 return '\t';
13483
13484 case 'r': /* carriage-return */
13485 return '\r';
13486
13487 case 'f': /* form-feed */
13488 return '\f';
13489
13490 case 'v': /* vertical tab */
13491 return '\13';
13492
13493 case 'a': /* alarm(bell) */
13494 return '\007';
13495
13496 case 'e': /* escape */
13497 return 033;
13498
13499 case '0': case '1': case '2': case '3': /* octal constant */
13500 case '4': case '5': case '6': case '7':
13501 pushback(p, c);
13502 c = scan_oct(p->lex.pcur, 3, &numlen);
13503 p->lex.pcur += numlen;
13504 return c;
13505
13506 case 'x': /* hex constant */
13507 c = tok_hex(p, &numlen);
13508 if (numlen == 0) return 0;
13509 return c;
13510
13511 case 'b': /* backspace */
13512 return '\010';
13513
13514 case 's': /* space */
13515 return ' ';
13516
13517 case 'M':
13518 if (flags & ESCAPE_META) goto eof;
13519 if ((c = nextc(p)) != '-') {
13520 goto eof;
13521 }
13522 if ((c = nextc(p)) == '\\') {
13523 if (peek(p, 'u')) goto eof;
13524 return read_escape(p, flags|ESCAPE_META, encp) | 0x80;
13525 }
13526 else if (c == -1 || !ISASCII(c)) goto eof;
13527 else {
13528 int c2 = escaped_control_code(c);
13529 if (c2) {
13530 if (ISCNTRL(c) || !(flags & ESCAPE_CONTROL)) {
13531 WARN_SPACE_CHAR(c2, "\\M-");
13532 }
13533 else {
13534 WARN_SPACE_CHAR(c2, "\\C-\\M-");
13535 }
13536 }
13537 else if (ISCNTRL(c)) goto eof;
13538 return ((c & 0xff) | 0x80);
13539 }
13540
13541 case 'C':
13542 if ((c = nextc(p)) != '-') {
13543 goto eof;
13544 }
13545 case 'c':
13546 if (flags & ESCAPE_CONTROL) goto eof;
13547 if ((c = nextc(p))== '\\') {
13548 if (peek(p, 'u')) goto eof;
13549 c = read_escape(p, flags|ESCAPE_CONTROL, encp);
13550 }
13551 else if (c == '?')
13552 return 0177;
13553 else if (c == -1 || !ISASCII(c)) goto eof;
13554 else {
13555 int c2 = escaped_control_code(c);
13556 if (c2) {
13557 if (ISCNTRL(c)) {
13558 if (flags & ESCAPE_META) {
13559 WARN_SPACE_CHAR(c2, "\\M-");
13560 }
13561 else {
13562 WARN_SPACE_CHAR(c2, "");
13563 }
13564 }
13565 else {
13566 if (flags & ESCAPE_META) {
13567 WARN_SPACE_CHAR(c2, "\\M-\\C-");
13568 }
13569 else {
13570 WARN_SPACE_CHAR(c2, "\\C-");
13571 }
13572 }
13573 }
13574 else if (ISCNTRL(c)) goto eof;
13575 }
13576 return c & 0x9f;
13577
13578 eof:
13579 case -1:
13580 yyerror0("Invalid escape character syntax");
13581 token_flush(p);
13582 return '\0';
13583
13584 default:
13585 return c;
13586 }
13587}
13588
13589static void
13590tokaddmbc(struct parser_params *p, int c, rb_encoding *enc)
13591{
13592 int len = rb_enc_codelen(c, enc);
13593 rb_enc_mbcput(c, tokspace(p, len), enc);
13594}
13595
13596static int
13597tokadd_escape(struct parser_params *p, rb_encoding **encp)
13598{
13599 int c;
13600 int flags = 0;
13601 size_t numlen;
13602
13603 first:
13604 switch (c = nextc(p)) {
13605 case '\n':
13606 return 0; /* just ignore */
13607
13608 case '0': case '1': case '2': case '3': /* octal constant */
13609 case '4': case '5': case '6': case '7':
13610 {
13611 ruby_scan_oct(--p->lex.pcur, 3, &numlen);
13612 if (numlen == 0) goto eof;
13613 p->lex.pcur += numlen;
13614 tokcopy(p, (int)numlen + 1);
13615 }
13616 return 0;
13617
13618 case 'x': /* hex constant */
13619 {
13620 tok_hex(p, &numlen);
13621 if (numlen == 0) return -1;
13622 tokcopy(p, (int)numlen + 2);
13623 }
13624 return 0;
13625
13626 case 'M':
13627 if (flags & ESCAPE_META) goto eof;
13628 if ((c = nextc(p)) != '-') {
13629 pushback(p, c);
13630 goto eof;
13631 }
13632 tokcopy(p, 3);
13633 flags |= ESCAPE_META;
13634 goto escaped;
13635
13636 case 'C':
13637 if (flags & ESCAPE_CONTROL) goto eof;
13638 if ((c = nextc(p)) != '-') {
13639 pushback(p, c);
13640 goto eof;
13641 }
13642 tokcopy(p, 3);
13643 goto escaped;
13644
13645 case 'c':
13646 if (flags & ESCAPE_CONTROL) goto eof;
13647 tokcopy(p, 2);
13648 flags |= ESCAPE_CONTROL;
13649 escaped:
13650 if ((c = nextc(p)) == '\\') {
13651 goto first;
13652 }
13653 else if (c == -1) goto eof;
13654 tokadd(p, c);
13655 return 0;
13656
13657 eof:
13658 case -1:
13659 yyerror0("Invalid escape character syntax");
13660 token_flush(p);
13661 return -1;
13662
13663 default:
13664 tokadd(p, '\\');
13665 tokadd(p, c);
13666 }
13667 return 0;
13668}
13669
13670static int
13671regx_options(struct parser_params *p)
13672{
13673 int kcode = 0;
13674 int kopt = 0;
13675 int options = 0;
13676 int c, opt, kc;
13677
13678 newtok(p);
13679 while (c = nextc(p), ISALPHA(c)) {
13680 if (c == 'o') {
13681 options |= RE_OPTION_ONCE;
13682 }
13683 else if (rb_char_to_option_kcode(c, &opt, &kc)) {
13684 if (kc >= 0) {
13685 if (kc != rb_ascii8bit_encindex()) kcode = c;
13686 kopt = opt;
13687 }
13688 else {
13689 options |= opt;
13690 }
13691 }
13692 else {
13693 tokadd(p, c);
13694 }
13695 }
13696 options |= kopt;
13697 pushback(p, c);
13698 if (toklen(p)) {
13699 YYLTYPE loc = RUBY_INIT_YYLLOC();
13700 tokfix(p);
13701 compile_error(p, "unknown regexp option%s - %*s",
13702 toklen(p) > 1 ? "s" : "", toklen(p), tok(p));
13703 parser_show_error_line(p, &loc);
13704 }
13705 return options | RE_OPTION_ENCODING(kcode);
13706}
13707
13708static int
13709tokadd_mbchar(struct parser_params *p, int c)
13710{
13711 int len = parser_precise_mbclen(p, p->lex.pcur-1);
13712 if (len < 0) return -1;
13713 tokadd(p, c);
13714 p->lex.pcur += --len;
13715 if (len > 0) tokcopy(p, len);
13716 return c;
13717}
13718
13719static inline int
13720simple_re_meta(int c)
13721{
13722 switch (c) {
13723 case '$': case '*': case '+': case '.':
13724 case '?': case '^': case '|':
13725 case ')': case ']': case '}': case '>':
13726 return TRUE;
13727 default:
13728 return FALSE;
13729 }
13730}
13731
13732static int
13733parser_update_heredoc_indent(struct parser_params *p, int c)
13734{
13735 if (p->heredoc_line_indent == -1) {
13736 if (c == '\n') p->heredoc_line_indent = 0;
13737 }
13738 else {
13739 if (c == ' ') {
13741 return TRUE;
13742 }
13743 else if (c == '\t') {
13744 int w = (p->heredoc_line_indent / TAB_WIDTH) + 1;
13746 return TRUE;
13747 }
13748 else if (c != '\n') {
13749 if (p->heredoc_indent > p->heredoc_line_indent) {
13751 }
13752 p->heredoc_line_indent = -1;
13753 }
13754 }
13755 return FALSE;
13756}
13757
13758static void
13759parser_mixed_error(struct parser_params *p, rb_encoding *enc1, rb_encoding *enc2)
13760{
13761 YYLTYPE loc = RUBY_INIT_YYLLOC();
13762 const char *n1 = rb_enc_name(enc1), *n2 = rb_enc_name(enc2);
13763 compile_error(p, "%s mixed within %s source", n1, n2);
13764 parser_show_error_line(p, &loc);
13765}
13766
13767static void
13768parser_mixed_escape(struct parser_params *p, const char *beg, rb_encoding *enc1, rb_encoding *enc2)
13769{
13770 const char *pos = p->lex.pcur;
13771 p->lex.pcur = beg;
13772 parser_mixed_error(p, enc1, enc2);
13773 p->lex.pcur = pos;
13774}
13775
13776static int
13777tokadd_string(struct parser_params *p,
13778 int func, int term, int paren, long *nest,
13779 rb_encoding **encp, rb_encoding **enc)
13780{
13781 int c;
13782 bool erred = false;
13783
13784#define mixed_error(enc1, enc2) \
13785 (void)(erred || (parser_mixed_error(p, enc1, enc2), erred = true))
13786#define mixed_escape(beg, enc1, enc2) \
13787 (void)(erred || (parser_mixed_escape(p, beg, enc1, enc2), erred = true))
13788
13789 while ((c = nextc(p)) != -1) {
13790 if (p->heredoc_indent > 0) {
13791 parser_update_heredoc_indent(p, c);
13792 }
13793
13794 if (paren && c == paren) {
13795 ++*nest;
13796 }
13797 else if (c == term) {
13798 if (!nest || !*nest) {
13799 pushback(p, c);
13800 break;
13801 }
13802 --*nest;
13803 }
13804 else if ((func & STR_FUNC_EXPAND) && c == '#' && p->lex.pcur < p->lex.pend) {
13805 int c2 = *p->lex.pcur;
13806 if (c2 == '$' || c2 == '@' || c2 == '{') {
13807 pushback(p, c);
13808 break;
13809 }
13810 }
13811 else if (c == '\\') {
13812 literal_flush(p, p->lex.pcur - 1);
13813 c = nextc(p);
13814 switch (c) {
13815 case '\n':
13816 if (func & STR_FUNC_QWORDS) break;
13817 if (func & STR_FUNC_EXPAND) {
13818 if (!(func & STR_FUNC_INDENT) || (p->heredoc_indent < 0))
13819 continue;
13820 if (c == term) {
13821 c = '\\';
13822 goto terminate;
13823 }
13824 }
13825 tokadd(p, '\\');
13826 break;
13827
13828 case '\\':
13829 if (func & STR_FUNC_ESCAPE) tokadd(p, c);
13830 break;
13831
13832 case 'u':
13833 if ((func & STR_FUNC_EXPAND) == 0) {
13834 tokadd(p, '\\');
13835 break;
13836 }
13837 tokadd_utf8(p, enc, term,
13838 func & STR_FUNC_SYMBOL,
13839 func & STR_FUNC_REGEXP);
13840 continue;
13841
13842 default:
13843 if (c == -1) return -1;
13844 if (!ISASCII(c)) {
13845 if ((func & STR_FUNC_EXPAND) == 0) tokadd(p, '\\');
13846 goto non_ascii;
13847 }
13848 if (func & STR_FUNC_REGEXP) {
13849 if (c == term && !simple_re_meta(c)) {
13850 tokadd(p, c);
13851 continue;
13852 }
13853 pushback(p, c);
13854 if ((c = tokadd_escape(p, enc)) < 0)
13855 return -1;
13856 if (*enc && *enc != *encp) {
13857 mixed_escape(p->lex.ptok+2, *enc, *encp);
13858 }
13859 continue;
13860 }
13861 else if (func & STR_FUNC_EXPAND) {
13862 pushback(p, c);
13863 if (func & STR_FUNC_ESCAPE) tokadd(p, '\\');
13864 c = read_escape(p, 0, enc);
13865 }
13866 else if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) {
13867 /* ignore backslashed spaces in %w */
13868 }
13869 else if (c != term && !(paren && c == paren)) {
13870 tokadd(p, '\\');
13871 pushback(p, c);
13872 continue;
13873 }
13874 }
13875 }
13876 else if (!parser_isascii(p)) {
13877 non_ascii:
13878 if (!*enc) {
13879 *enc = *encp;
13880 }
13881 else if (*enc != *encp) {
13882 mixed_error(*enc, *encp);
13883 continue;
13884 }
13885 if (tokadd_mbchar(p, c) == -1) return -1;
13886 continue;
13887 }
13888 else if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) {
13889 pushback(p, c);
13890 break;
13891 }
13892 if (c & 0x80) {
13893 if (!*enc) {
13894 *enc = *encp;
13895 }
13896 else if (*enc != *encp) {
13897 mixed_error(*enc, *encp);
13898 continue;
13899 }
13900 }
13901 tokadd(p, c);
13902 }
13903 terminate:
13904 if (*enc) *encp = *enc;
13905 return c;
13906}
13907
13908static inline rb_strterm_t *
13909new_strterm(VALUE v1, VALUE v2, VALUE v3, VALUE v0)
13910{
13911 return (rb_strterm_t*)rb_imemo_new(imemo_parser_strterm, v1, v2, v3, v0);
13912}
13913
13914/* imemo_parser_strterm for literal */
13915#define NEW_STRTERM(func, term, paren) \
13916 new_strterm((VALUE)(func), (VALUE)(paren), (VALUE)(term), 0)
13917
13918#ifdef RIPPER
13919static void
13921{
13922 VALUE content = yylval.val;
13923 if (!ripper_is_node_yylval(content))
13924 content = ripper_new_yylval(p, 0, 0, content);
13925 if (has_delayed_token(p)) {
13926 ptrdiff_t len = p->lex.pcur - p->lex.ptok;
13927 if (len > 0) {
13928 rb_enc_str_buf_cat(p->delayed.token, p->lex.ptok, len, enc);
13929 }
13931 p->lex.ptok = p->lex.pcur;
13932 RNODE(content)->nd_rval = yylval.val;
13933 }
13935 if (yylval.val != content)
13936 RNODE(content)->nd_rval = yylval.val;
13937 yylval.val = content;
13938}
13939#else
13940#define flush_string_content(p, enc) ((void)(enc))
13941#endif
13942
13943RUBY_FUNC_EXPORTED const unsigned int ruby_global_name_punct_bits[(0x7e - 0x20 + 31) / 32];
13944/* this can be shared with ripper, since it's independent from struct
13945 * parser_params. */
13946#ifndef RIPPER
13947#define BIT(c, idx) (((c) / 32 - 1 == idx) ? (1U << ((c) % 32)) : 0)
13948#define SPECIAL_PUNCT(idx) ( \
13949 BIT('~', idx) | BIT('*', idx) | BIT('$', idx) | BIT('?', idx) | \
13950 BIT('!', idx) | BIT('@', idx) | BIT('/', idx) | BIT('\\', idx) | \
13951 BIT(';', idx) | BIT(',', idx) | BIT('.', idx) | BIT('=', idx) | \
13952 BIT(':', idx) | BIT('<', idx) | BIT('>', idx) | BIT('\"', idx) | \
13953 BIT('&', idx) | BIT('`', idx) | BIT('\'', idx) | BIT('+', idx) | \
13954 BIT('0', idx))
13955const unsigned int ruby_global_name_punct_bits[] = {
13956 SPECIAL_PUNCT(0),
13957 SPECIAL_PUNCT(1),
13958 SPECIAL_PUNCT(2),
13959};
13960#undef BIT
13961#undef SPECIAL_PUNCT
13962#endif
13963
13964static enum yytokentype
13965parser_peek_variable_name(struct parser_params *p)
13966{
13967 int c;
13968 const char *ptr = p->lex.pcur;
13969
13970 if (ptr + 1 >= p->lex.pend) return 0;
13971 c = *ptr++;
13972 switch (c) {
13973 case '$':
13974 if ((c = *ptr) == '-') {
13975 if (++ptr >= p->lex.pend) return 0;
13976 c = *ptr;
13977 }
13978 else if (is_global_name_punct(c) || ISDIGIT(c)) {
13979 return tSTRING_DVAR;
13980 }
13981 break;
13982 case '@':
13983 if ((c = *ptr) == '@') {
13984 if (++ptr >= p->lex.pend) return 0;
13985 c = *ptr;
13986 }
13987 break;
13988 case '{':
13989 p->lex.pcur = ptr;
13990 p->command_start = TRUE;
13991 return tSTRING_DBEG;
13992 default:
13993 return 0;
13994 }
13995 if (!ISASCII(c) || c == '_' || ISALPHA(c))
13996 return tSTRING_DVAR;
13997 return 0;
13998}
13999
14000#define IS_ARG() IS_lex_state(EXPR_ARG_ANY)
14001#define IS_END() IS_lex_state(EXPR_END_ANY)
14002#define IS_BEG() (IS_lex_state(EXPR_BEG_ANY) || IS_lex_state_all(EXPR_ARG|EXPR_LABELED))
14003#define IS_SPCARG(c) (IS_ARG() && space_seen && !ISSPACE(c))
14004#define IS_LABEL_POSSIBLE() (\
14005 (IS_lex_state(EXPR_LABEL|EXPR_ENDFN) && !cmd_state) || \
14006 IS_ARG())
14007#define IS_LABEL_SUFFIX(n) (peek_n(p, ':',(n)) && !peek_n(p, ':', (n)+1))
14008#define IS_AFTER_OPERATOR() IS_lex_state(EXPR_FNAME | EXPR_DOT)
14009
14010static inline enum yytokentype
14011parser_string_term(struct parser_params *p, int func)
14012{
14013 p->lex.strterm = 0;
14014 if (func & STR_FUNC_REGEXP) {
14015 set_yylval_num(regx_options(p));
14016 dispatch_scan_event(p, tREGEXP_END);
14017 SET_LEX_STATE(EXPR_END);
14018 return tREGEXP_END;
14019 }
14020 if ((func & STR_FUNC_LABEL) && IS_LABEL_SUFFIX(0)) {
14021 nextc(p);
14022 SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
14023 return tLABEL_END;
14024 }
14025 SET_LEX_STATE(EXPR_END);
14026 return tSTRING_END;
14027}
14028
14029static enum yytokentype
14030parse_string(struct parser_params *p, rb_strterm_literal_t *quote)
14031{
14032 int func = (int)quote->u1.func;
14033 int term = (int)quote->u3.term;
14034 int paren = (int)quote->u2.paren;
14035 int c, space = 0;
14036 rb_encoding *enc = p->enc;
14037 rb_encoding *base_enc = 0;
14038 VALUE lit;
14039
14040 if (func & STR_FUNC_TERM) {
14041 if (func & STR_FUNC_QWORDS) nextc(p); /* delayed term */
14042 SET_LEX_STATE(EXPR_END);
14043 p->lex.strterm = 0;
14044 return func & STR_FUNC_REGEXP ? tREGEXP_END : tSTRING_END;
14045 }
14046 c = nextc(p);
14047 if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) {
14048 do {c = nextc(p);} while (ISSPACE(c));
14049 space = 1;
14050 }
14051 if (func & STR_FUNC_LIST) {
14052 quote->u1.func &= ~STR_FUNC_LIST;
14053 space = 1;
14054 }
14055 if (c == term && !quote->u0.nest) {
14056 if (func & STR_FUNC_QWORDS) {
14057 quote->u1.func |= STR_FUNC_TERM;
14058 pushback(p, c); /* dispatch the term at tSTRING_END */
14059 add_delayed_token(p, p->lex.ptok, p->lex.pcur);
14060 return ' ';
14061 }
14062 return parser_string_term(p, func);
14063 }
14064 if (space) {
14065 pushback(p, c);
14066 add_delayed_token(p, p->lex.ptok, p->lex.pcur);
14067 return ' ';
14068 }
14069 newtok(p);
14070 if ((func & STR_FUNC_EXPAND) && c == '#') {
14071 int t = parser_peek_variable_name(p);
14072 if (t) return t;
14073 tokadd(p, '#');
14074 c = nextc(p);
14075 }
14076 pushback(p, c);
14077 if (tokadd_string(p, func, term, paren, &quote->u0.nest,
14078 &enc, &base_enc) == -1) {
14079 if (p->eofp) {
14080#ifndef RIPPER
14081# define unterminated_literal(mesg) yyerror0(mesg)
14082#else
14083# define unterminated_literal(mesg) compile_error(p, mesg)
14084#endif
14085 literal_flush(p, p->lex.pcur);
14086 if (func & STR_FUNC_QWORDS) {
14087 /* no content to add, bailing out here */
14088 unterminated_literal("unterminated list meets end of file");
14089 p->lex.strterm = 0;
14090 return tSTRING_END;
14091 }
14092 if (func & STR_FUNC_REGEXP) {
14093 unterminated_literal("unterminated regexp meets end of file");
14094 }
14095 else {
14096 unterminated_literal("unterminated string meets end of file");
14097 }
14098 quote->u1.func |= STR_FUNC_TERM;
14099 }
14100 }
14101
14102 tokfix(p);
14103 lit = STR_NEW3(tok(p), toklen(p), enc, func);
14104 set_yylval_str(lit);
14105 flush_string_content(p, enc);
14106
14107 return tSTRING_CONTENT;
14108}
14109
14110static enum yytokentype
14111heredoc_identifier(struct parser_params *p)
14112{
14113 /*
14114 * term_len is length of `<<"END"` except `END`,
14115 * in this case term_len is 4 (<, <, " and ").
14116 */
14117 long len, offset = p->lex.pcur - p->lex.pbeg;
14118 int c = nextc(p), term, func = 0, quote = 0;
14119 enum yytokentype token = tSTRING_BEG;
14120 int indent = 0;
14121
14122 if (c == '-') {
14123 c = nextc(p);
14124 func = STR_FUNC_INDENT;
14125 offset++;
14126 }
14127 else if (c == '~') {
14128 c = nextc(p);
14129 func = STR_FUNC_INDENT;
14130 offset++;
14131 indent = INT_MAX;
14132 }
14133 switch (c) {
14134 case '\'':
14135 func |= str_squote; goto quoted;
14136 case '"':
14137 func |= str_dquote; goto quoted;
14138 case '`':
14140 func |= str_xquote; goto quoted;
14141
14142 quoted:
14143 quote++;
14144 offset++;
14145 term = c;
14146 len = 0;
14147 while ((c = nextc(p)) != term) {
14148 if (c == -1 || c == '\r' || c == '\n') {
14149 yyerror(NULL, p, "unterminated here document identifier");
14150 return -1;
14151 }
14152 }
14153 break;
14154
14155 default:
14156 if (!parser_is_identchar(p)) {
14157 pushback(p, c);
14158 if (func & STR_FUNC_INDENT) {
14159 pushback(p, indent > 0 ? '~' : '-');
14160 }
14161 return 0;
14162 }
14163 func |= str_dquote;
14164 do {
14165 int n = parser_precise_mbclen(p, p->lex.pcur-1);
14166 if (n < 0) return 0;
14167 p->lex.pcur += --n;
14168 } while ((c = nextc(p)) != -1 && parser_is_identchar(p));
14169 pushback(p, c);
14170 break;
14171 }
14172
14173 len = p->lex.pcur - (p->lex.pbeg + offset) - quote;
14174 if ((unsigned long)len >= HERETERM_LENGTH_MAX)
14175 yyerror(NULL, p, "too long here document identifier");
14177 lex_goto_eol(p);
14178
14179 p->lex.strterm = new_strterm(0, 0, 0, p->lex.lastline);
14182 here->offset = offset;
14183 here->sourceline = p->ruby_sourceline;
14184 here->length = (int)len;
14185 here->quote = quote;
14186 here->func = func;
14187
14188 token_flush(p);
14189 p->heredoc_indent = indent;
14190 p->heredoc_line_indent = 0;
14191 return token;
14192}
14193
14194static void
14195heredoc_restore(struct parser_params *p, rb_strterm_heredoc_t *here)
14196{
14197 VALUE line;
14198
14199 p->lex.strterm = 0;
14200 line = here->lastline;
14201 p->lex.lastline = line;
14202 p->lex.pbeg = RSTRING_PTR(line);
14203 p->lex.pend = p->lex.pbeg + RSTRING_LEN(line);
14204 p->lex.pcur = p->lex.pbeg + here->offset + here->length + here->quote;
14205 p->lex.ptok = p->lex.pbeg + here->offset - here->quote;
14207 p->ruby_sourceline = (int)here->sourceline;
14208 if (p->eofp) p->lex.nextline = Qnil;
14209 p->eofp = 0;
14210}
14211
14212static int
14213dedent_string(VALUE string, int width)
14214{
14215 char *str;
14216 long len;
14217 int i, col = 0;
14218
14219 RSTRING_GETMEM(string, str, len);
14220 for (i = 0; i < len && col < width; i++) {
14221 if (str[i] == ' ') {
14222 col++;
14223 }
14224 else if (str[i] == '\t') {
14225 int n = TAB_WIDTH * (col / TAB_WIDTH + 1);
14226 if (n > width) break;
14227 col = n;
14228 }
14229 else {
14230 break;
14231 }
14232 }
14233 if (!i) return 0;
14234 rb_str_modify(string);
14235 str = RSTRING_PTR(string);
14236 if (RSTRING_LEN(string) != len)
14237 rb_fatal("literal string changed: %+"PRIsVALUE, string);
14238 MEMMOVE(str, str + i, char, len - i);
14239 rb_str_set_len(string, len - i);
14240 return i;
14241}
14242
14243#ifndef RIPPER
14244static NODE *
14245heredoc_dedent(struct parser_params *p, NODE *root)
14246{
14247 NODE *node, *str_node, *prev_node;
14248 int indent = p->heredoc_indent;
14249 VALUE prev_lit = 0;
14250
14251 if (indent <= 0) return root;
14252 p->heredoc_indent = 0;
14253 if (!root) return root;
14254
14255 prev_node = node = str_node = root;
14256 if (nd_type(root) == NODE_LIST) str_node = root->nd_head;
14257
14258 while (str_node) {
14259 VALUE lit = str_node->nd_lit;
14260 if (str_node->flags & NODE_FL_NEWLINE) {
14261 dedent_string(lit, indent);
14262 }
14263 if (!prev_lit) {
14264 prev_lit = lit;
14265 }
14266 else if (!literal_concat0(p, prev_lit, lit)) {
14267 return 0;
14268 }
14269 else {
14270 NODE *end = node->nd_end;
14271 node = prev_node->nd_next = node->nd_next;
14272 if (!node) {
14273 if (nd_type(prev_node) == NODE_DSTR)
14274 nd_set_type(prev_node, NODE_STR);
14275 break;
14276 }
14277 node->nd_end = end;
14278 goto next_str;
14279 }
14280
14281 str_node = 0;
14282 while ((node = (prev_node = node)->nd_next) != 0) {
14283 next_str:
14284 if (nd_type(node) != NODE_LIST) break;
14285 if ((str_node = node->nd_head) != 0) {
14286 enum node_type type = nd_type(str_node);
14287 if (type == NODE_STR || type == NODE_DSTR) break;
14288 prev_lit = 0;
14289 str_node = 0;
14290 }
14291 }
14292 }
14293 return root;
14294}
14295#else /* RIPPER */
14296static VALUE
14297heredoc_dedent(struct parser_params *p, VALUE array)
14298{
14299 int indent = p->heredoc_indent;
14300
14301 if (indent <= 0) return array;
14302 p->heredoc_indent = 0;
14303 dispatch2(heredoc_dedent, array, INT2NUM(indent));
14304 return array;
14305}
14306
14307/*
14308 * call-seq:
14309 * Ripper.dedent_string(input, width) -> Integer
14310 *
14311 * USE OF RIPPER LIBRARY ONLY.
14312 *
14313 * Strips up to +width+ leading whitespaces from +input+,
14314 * and returns the stripped column width.
14315 */
14316static VALUE
14317parser_dedent_string(VALUE self, VALUE input, VALUE width)
14318{
14319 int wid, col;
14320
14322 wid = NUM2UINT(width);
14323 col = dedent_string(input, wid);
14324 return INT2NUM(col);
14325}
14326#endif
14327
14328static int
14329whole_match_p(struct parser_params *p, const char *eos, long len, int indent)
14330{
14331 const char *ptr = p->lex.pbeg;
14332 long n;
14333
14334 if (indent) {
14335 while (*ptr && ISSPACE(*ptr)) ptr++;
14336 }
14337 n = p->lex.pend - (ptr + len);
14338 if (n < 0) return FALSE;
14339 if (n > 0 && ptr[len] != '\n') {
14340 if (ptr[len] != '\r') return FALSE;
14341 if (n <= 1 || ptr[len+1] != '\n') return FALSE;
14342 }
14343 return strncmp(eos, ptr, len) == 0;
14344}
14345
14346static int
14347word_match_p(struct parser_params *p, const char *word, long len)
14348{
14349 if (strncmp(p->lex.pcur, word, len)) return 0;
14350 if (p->lex.pcur + len == p->lex.pend) return 1;
14351 int c = (unsigned char)p->lex.pcur[len];
14352 if (ISSPACE(c)) return 1;
14353 switch (c) {
14354 case '\0': case '\004': case '\032': return 1;
14355 }
14356 return 0;
14357}
14358
14359#define NUM_SUFFIX_R (1<<0)
14360#define NUM_SUFFIX_I (1<<1)
14361#define NUM_SUFFIX_ALL 3
14362
14363static int
14364number_literal_suffix(struct parser_params *p, int mask)
14365{
14366 int c, result = 0;
14367 const char *lastp = p->lex.pcur;
14368
14369 while ((c = nextc(p)) != -1) {
14370 if ((mask & NUM_SUFFIX_I) && c == 'i') {
14371 result |= (mask & NUM_SUFFIX_I);
14372 mask &= ~NUM_SUFFIX_I;
14373 /* r after i, rational of complex is disallowed */
14374 mask &= ~NUM_SUFFIX_R;
14375 continue;
14376 }
14377 if ((mask & NUM_SUFFIX_R) && c == 'r') {
14378 result |= (mask & NUM_SUFFIX_R);
14379 mask &= ~NUM_SUFFIX_R;
14380 continue;
14381 }
14382 if (!ISASCII(c) || ISALPHA(c) || c == '_') {
14383 p->lex.pcur = lastp;
14384 literal_flush(p, p->lex.pcur);
14385 return 0;
14386 }
14387 pushback(p, c);
14388 break;
14389 }
14390 return result;
14391}
14392
14393static enum yytokentype
14394set_number_literal(struct parser_params *p, VALUE v,
14395 enum yytokentype type, int suffix)
14396{
14397 if (suffix & NUM_SUFFIX_I) {
14398 v = rb_complex_raw(INT2FIX(0), v);
14399 type = tIMAGINARY;
14400 }
14402 SET_LEX_STATE(EXPR_END);
14403 return type;
14404}
14405
14406static enum yytokentype
14407set_integer_literal(struct parser_params *p, VALUE v, int suffix)
14408{
14409 enum yytokentype type = tINTEGER;
14410 if (suffix & NUM_SUFFIX_R) {
14411 v = rb_rational_raw1(v);
14412 type = tRATIONAL;
14413 }
14414 return set_number_literal(p, v, type, suffix);
14415}
14416
14417#ifdef RIPPER
14418static void
14420{
14421 VALUE str;
14422 if (has_delayed_token(p))
14424 str = STR_NEW(p->lex.ptok, p->lex.pend - p->lex.ptok);
14425 ripper_dispatch1(p, ripper_token2eventid(tHEREDOC_END), str);
14426 lex_goto_eol(p);
14427 token_flush(p);
14428}
14429
14430#else
14431#define dispatch_heredoc_end(p) ((void)0)
14432#endif
14433
14434static enum yytokentype
14435here_document(struct parser_params *p, rb_strterm_heredoc_t *here)
14436{
14437 int c, func, indent = 0;
14438 const char *eos, *ptr, *ptr_end;
14439 long len;
14440 VALUE str = 0;
14441 rb_encoding *enc = p->enc;
14442 rb_encoding *base_enc = 0;
14443 int bol;
14444
14445 eos = RSTRING_PTR(here->lastline) + here->offset;
14446 len = here->length;
14447 indent = (func = here->func) & STR_FUNC_INDENT;
14448
14449 if ((c = nextc(p)) == -1) {
14450 error:
14451#ifdef RIPPER
14452 if (!has_delayed_token(p)) {
14454 }
14455 else {
14456 if ((len = p->lex.pcur - p->lex.ptok) > 0) {
14457 if (!(func & STR_FUNC_REGEXP) && rb_enc_asciicompat(enc)) {
14458 int cr = ENC_CODERANGE_UNKNOWN;
14460 if (cr != ENC_CODERANGE_7BIT &&
14461 p->enc == rb_usascii_encoding() &&
14462 enc != rb_utf8_encoding()) {
14464 }
14465 }
14466 rb_enc_str_buf_cat(p->delayed.token, p->lex.ptok, len, enc);
14467 }
14469 }
14470 lex_goto_eol(p);
14471#endif
14472 heredoc_restore(p, &p->lex.strterm->u.heredoc);
14473 compile_error(p, "can't find string \"%.*s\" anywhere before EOF",
14474 (int)len, eos);
14475 token_flush(p);
14476 p->lex.strterm = 0;
14477 SET_LEX_STATE(EXPR_END);
14478 return tSTRING_END;
14479 }
14480 bol = was_bol(p);
14481 if (!bol) {
14482 /* not beginning of line, cannot be the terminator */
14483 }
14484 else if (p->heredoc_line_indent == -1) {
14485 /* `heredoc_line_indent == -1` means
14486 * - "after an interpolation in the same line", or
14487 * - "in a continuing line"
14488 */
14489 p->heredoc_line_indent = 0;
14490 }
14491 else if (whole_match_p(p, eos, len, indent)) {
14493 restore:
14494 heredoc_restore(p, &p->lex.strterm->u.heredoc);
14495 token_flush(p);
14496 p->lex.strterm = 0;
14497 SET_LEX_STATE(EXPR_END);
14498 return tSTRING_END;
14499 }
14500
14501 if (!(func & STR_FUNC_EXPAND)) {
14502 do {
14504 ptr_end = p->lex.pend;
14505 if (ptr_end > ptr) {
14506 switch (ptr_end[-1]) {
14507 case '\n':
14508 if (--ptr_end == ptr || ptr_end[-1] != '\r') {
14509 ptr_end++;
14510 break;
14511 }
14512 case '\r':
14513 --ptr_end;
14514 }
14515 }
14516
14517 if (p->heredoc_indent > 0) {
14518 long i = 0;
14519 while (ptr + i < ptr_end && parser_update_heredoc_indent(p, ptr[i]))
14520 i++;
14521 p->heredoc_line_indent = 0;
14522 }
14523
14524 if (str)
14525 rb_str_cat(str, ptr, ptr_end - ptr);
14526 else
14527 str = STR_NEW(ptr, ptr_end - ptr);
14528 if (ptr_end < p->lex.pend) rb_str_cat(str, "\n", 1);
14529 lex_goto_eol(p);
14530 if (p->heredoc_indent > 0) {
14531 goto flush_str;
14532 }
14533 if (nextc(p) == -1) {
14534 if (str) {
14535 str = 0;
14536 }
14537 goto error;
14538 }
14539 } while (!whole_match_p(p, eos, len, indent));
14540 }
14541 else {
14542 /* int mb = ENC_CODERANGE_7BIT, *mbp = &mb;*/
14543 newtok(p);
14544 if (c == '#') {
14545 int t = parser_peek_variable_name(p);
14546 if (p->heredoc_line_indent != -1) {
14547 if (p->heredoc_indent > p->heredoc_line_indent) {
14549 }
14550 p->heredoc_line_indent = -1;
14551 }
14552 if (t) return t;
14553 tokadd(p, '#');
14554 c = nextc(p);
14555 }
14556 do {
14557 pushback(p, c);
14558 enc = p->enc;
14559 if ((c = tokadd_string(p, func, '\n', 0, NULL, &enc, &base_enc)) == -1) {
14560 if (p->eofp) goto error;
14561 goto restore;
14562 }
14563 if (c != '\n') {
14564 if (c == '\\') p->heredoc_line_indent = -1;
14565 flush:
14566 str = STR_NEW3(tok(p), toklen(p), enc, func);
14567 flush_str:
14569#ifndef RIPPER
14570 if (bol) yylval.node->flags |= NODE_FL_NEWLINE;
14571#endif
14573 return tSTRING_CONTENT;
14574 }
14575 tokadd(p, nextc(p));
14576 if (p->heredoc_indent > 0) {
14577 lex_goto_eol(p);
14578 goto flush;
14579 }
14580 /* if (mbp && mb == ENC_CODERANGE_UNKNOWN) mbp = 0;*/
14581 if ((c = nextc(p)) == -1) goto error;
14582 } while (!whole_match_p(p, eos, len, indent));
14583 str = STR_NEW3(tok(p), toklen(p), enc, func);
14584 }
14586#ifdef RIPPER
14587 str = ripper_new_yylval(p, ripper_token2eventid(tSTRING_CONTENT),
14588 yylval.val, str);
14589#endif
14590 heredoc_restore(p, &p->lex.strterm->u.heredoc);
14591 token_flush(p);
14592 p->lex.strterm = NEW_STRTERM(func | STR_FUNC_TERM, 0, 0);
14594#ifndef RIPPER
14595 if (bol) yylval.node->flags |= NODE_FL_NEWLINE;
14596#endif
14597 return tSTRING_CONTENT;
14598}
14599
14600#include "lex.c"
14601
14602static int
14603arg_ambiguous(struct parser_params *p, char c)
14604{
14605#ifndef RIPPER
14606 rb_warning1("ambiguous first argument; put parentheses or a space even after `%c' operator", WARN_I(c));
14607#else
14608 dispatch1(arg_ambiguous, rb_usascii_str_new(&c, 1));
14609#endif
14610 return TRUE;
14611}
14612
14613static ID
14614formal_argument(struct parser_params *p, ID lhs)
14615{
14616 switch (id_type(lhs)) {
14617 case ID_LOCAL:
14618 break;
14619#ifndef RIPPER
14620 case ID_CONST:
14621 yyerror0("formal argument cannot be a constant");
14622 return 0;
14623 case ID_INSTANCE:
14624 yyerror0("formal argument cannot be an instance variable");
14625 return 0;
14626 case ID_GLOBAL:
14627 yyerror0("formal argument cannot be a global variable");
14628 return 0;
14629 case ID_CLASS:
14630 yyerror0("formal argument cannot be a class variable");
14631 return 0;
14632 default:
14633 yyerror0("formal argument must be local variable");
14634 return 0;
14635#else
14636 default:
14637 lhs = dispatch1(param_error, lhs);
14638 ripper_error(p);
14639 return 0;
14640#endif
14641 }
14642 shadowing_lvar(p, lhs);
14643 return lhs;
14644}
14645
14646static int
14647lvar_defined(struct parser_params *p, ID id)
14648{
14649 return (dyna_in_block(p) && dvar_defined(p, id)) || local_id(p, id);
14650}
14651
14652/* emacsen -*- hack */
14653static long
14654parser_encode_length(struct parser_params *p, const char *name, long len)
14655{
14656 long nlen;
14657
14658 if (len > 5 && name[nlen = len - 5] == '-') {
14659 if (rb_memcicmp(name + nlen + 1, "unix", 4) == 0)
14660 return nlen;
14661 }
14662 if (len > 4 && name[nlen = len - 4] == '-') {
14663 if (rb_memcicmp(name + nlen + 1, "dos", 3) == 0)
14664 return nlen;
14665 if (rb_memcicmp(name + nlen + 1, "mac", 3) == 0 &&
14666 !(len == 8 && rb_memcicmp(name, "utf8-mac", len) == 0))
14667 /* exclude UTF8-MAC because the encoding named "UTF8" doesn't exist in Ruby */
14668 return nlen;
14669 }
14670 return len;
14671}
14672
14673static void
14674parser_set_encode(struct parser_params *p, const char *name)
14675{
14676 int idx = rb_enc_find_index(name);
14678 VALUE excargs[3];
14679
14680 if (idx < 0) {
14681 excargs[1] = rb_sprintf("unknown encoding name: %s", name);
14682 error:
14683 excargs[0] = rb_eArgError;
14684 excargs[2] = rb_make_backtrace();
14686 rb_exc_raise(rb_make_exception(3, excargs));
14687 }
14688 enc = rb_enc_from_index(idx);
14689 if (!rb_enc_asciicompat(enc)) {
14690 excargs[1] = rb_sprintf("%s is not ASCII compatible", rb_enc_name(enc));
14691 goto error;
14692 }
14693 p->enc = enc;
14694#ifndef RIPPER
14695 if (p->debug_lines) {
14696 VALUE lines = p->debug_lines;
14697 long i, n = RARRAY_LEN(lines);
14698 for (i = 0; i < n; ++i) {
14699 rb_enc_associate_index(RARRAY_AREF(lines, i), idx);
14700 }
14701 }
14702#endif
14703}
14704
14705static int
14706comment_at_top(struct parser_params *p)
14707{
14708 const char *ptr = p->lex.pbeg, *ptr_end = p->lex.pcur - 1;
14709 if (p->line_count != (p->has_shebang ? 2 : 1)) return 0;
14710 while (ptr < ptr_end) {
14711 if (!ISSPACE(*ptr)) return 0;
14712 ptr++;
14713 }
14714 return 1;
14715}
14716
14717typedef long (*rb_magic_comment_length_t)(struct parser_params *p, const char *name, long len);
14718typedef void (*rb_magic_comment_setter_t)(struct parser_params *p, const char *name, const char *val);
14719
14720static void
14721magic_comment_encoding(struct parser_params *p, const char *name, const char *val)
14722{
14723 if (!comment_at_top(p)) {
14724 return;
14725 }
14726 parser_set_encode(p, val);
14727}
14728
14729static int
14730parser_get_bool(struct parser_params *p, const char *name, const char *val)
14731{
14732 switch (*val) {
14733 case 't': case 'T':
14734 if (strcasecmp(val, "true") == 0) {
14735 return TRUE;
14736 }
14737 break;
14738 case 'f': case 'F':
14739 if (strcasecmp(val, "false") == 0) {
14740 return FALSE;
14741 }
14742 break;
14743 }
14744 rb_compile_warning(p->ruby_sourcefile, p->ruby_sourceline, "invalid value for %s: %s", name, val);
14745 return -1;
14746}
14747
14748static void
14749parser_set_token_info(struct parser_params *p, const char *name, const char *val)
14750{
14751 int b = parser_get_bool(p, name, val);
14752 if (b >= 0) p->token_info_enabled = b;
14753}
14754
14755static void
14756parser_set_compile_option_flag(struct parser_params *p, const char *name, const char *val)
14757{
14758 int b;
14759
14760 if (p->token_seen) {
14761 rb_warning1("`%s' is ignored after any tokens", WARN_S(name));
14762 return;
14763 }
14764
14765 b = parser_get_bool(p, name, val);
14766 if (b < 0) return;
14767
14768 if (!p->compile_option)
14771 (b ? Qtrue : Qfalse));
14772}
14773
14774# if WARN_PAST_SCOPE
14775static void
14776parser_set_past_scope(struct parser_params *p, const char *name, const char *val)
14777{
14778 int b = parser_get_bool(p, name, val);
14779 if (b >= 0) p->past_scope_enabled = b;
14780}
14781# endif
14782
14784 const char *name;
14787};
14788
14789static const struct magic_comment magic_comments[] = {
14790 {"coding", magic_comment_encoding, parser_encode_length},
14791 {"encoding", magic_comment_encoding, parser_encode_length},
14792 {"frozen_string_literal", parser_set_compile_option_flag},
14793 {"warn_indent", parser_set_token_info},
14794# if WARN_PAST_SCOPE
14795 {"warn_past_scope", parser_set_past_scope},
14796# endif
14797};
14798
14799static const char *
14800magic_comment_marker(const char *str, long len)
14801{
14802 long i = 2;
14803
14804 while (i < len) {
14805 switch (str[i]) {
14806 case '-':
14807 if (str[i-1] == '*' && str[i-2] == '-') {
14808 return str + i + 1;
14809 }
14810 i += 2;
14811 break;
14812 case '*':
14813 if (i + 1 >= len) return 0;
14814 if (str[i+1] != '-') {
14815 i += 4;
14816 }
14817 else if (str[i-1] != '-') {
14818 i += 2;
14819 }
14820 else {
14821 return str + i + 2;
14822 }
14823 break;
14824 default:
14825 i += 3;
14826 break;
14827 }
14828 }
14829 return 0;
14830}
14831
14832static int
14833parser_magic_comment(struct parser_params *p, const char *str, long len)
14834{
14835 int indicator = 0;
14836 VALUE name = 0, val = 0;
14837 const char *beg, *end, *vbeg, *vend;
14838#define str_copy(_s, _p, _n) ((_s) \
14839 ? (void)(rb_str_resize((_s), (_n)), \
14840 MEMCPY(RSTRING_PTR(_s), (_p), char, (_n)), (_s)) \
14841 : (void)((_s) = STR_NEW((_p), (_n))))
14842
14843 if (len <= 7) return FALSE;
14844 if (!!(beg = magic_comment_marker(str, len))) {
14845 if (!(end = magic_comment_marker(beg, str + len - beg)))
14846 return FALSE;
14847 indicator = TRUE;
14848 str = beg;
14849 len = end - beg - 3;
14850 }
14851
14852 /* %r"([^\\s\'\":;]+)\\s*:\\s*(\"(?:\\\\.|[^\"])*\"|[^\"\\s;]+)[\\s;]*" */
14853 while (len > 0) {
14854 const struct magic_comment *mc = magic_comments;
14855 char *s;
14856 int i;
14857 long n = 0;
14858
14859 for (; len > 0 && *str; str++, --len) {
14860 switch (*str) {
14861 case '\'': case '"': case ':': case ';':
14862 continue;
14863 }
14864 if (!ISSPACE(*str)) break;
14865 }
14866 for (beg = str; len > 0; str++, --len) {
14867 switch (*str) {
14868 case '\'': case '"': case ':': case ';':
14869 break;
14870 default:
14871 if (ISSPACE(*str)) break;
14872 continue;
14873 }
14874 break;
14875 }
14876 for (end = str; len > 0 && ISSPACE(*str); str++, --len);
14877 if (!len) break;
14878 if (*str != ':') {
14879 if (!indicator) return FALSE;
14880 continue;
14881 }
14882
14883 do str++; while (--len > 0 && ISSPACE(*str));
14884 if (!len) break;
14885 if (*str == '"') {
14886 for (vbeg = ++str; --len > 0 && *str != '"'; str++) {
14887 if (*str == '\\') {
14888 --len;
14889 ++str;
14890 }
14891 }
14892 vend = str;
14893 if (len) {
14894 --len;
14895 ++str;
14896 }
14897 }
14898 else {
14899 for (vbeg = str; len > 0 && *str != '"' && *str != ';' && !ISSPACE(*str); --len, str++);
14900 vend = str;
14901 }
14902 if (indicator) {
14903 while (len > 0 && (*str == ';' || ISSPACE(*str))) --len, str++;
14904 }
14905 else {
14906 while (len > 0 && (ISSPACE(*str))) --len, str++;
14907 if (len) return FALSE;
14908 }
14909
14910 n = end - beg;
14911 str_copy(name, beg, n);
14912 s = RSTRING_PTR(name);
14913 for (i = 0; i < n; ++i) {
14914 if (s[i] == '-') s[i] = '_';
14915 }
14916 do {
14917 if (STRNCASECMP(mc->name, s, n) == 0 && !mc->name[n]) {
14918 n = vend - vbeg;
14919 if (mc->length) {
14920 n = (*mc->length)(p, vbeg, n);
14921 }
14922 str_copy(val, vbeg, n);
14923 (*mc->func)(p, mc->name, RSTRING_PTR(val));
14924 break;
14925 }
14926 } while (++mc < magic_comments + numberof(magic_comments));
14927#ifdef RIPPER
14928 str_copy(val, vbeg, vend - vbeg);
14929 dispatch2(magic_comment, name, val);
14930#endif
14931 }
14932
14933 return TRUE;
14934}
14935
14936static void
14937set_file_encoding(struct parser_params *p, const char *str, const char *send)
14938{
14939 int sep = 0;
14940 const char *beg = str;
14941 VALUE s;
14942
14943 for (;;) {
14944 if (send - str <= 6) return;
14945 switch (str[6]) {
14946 case 'C': case 'c': str += 6; continue;
14947 case 'O': case 'o': str += 5; continue;
14948 case 'D': case 'd': str += 4; continue;
14949 case 'I': case 'i': str += 3; continue;
14950 case 'N': case 'n': str += 2; continue;
14951 case 'G': case 'g': str += 1; continue;
14952 case '=': case ':':
14953 sep = 1;
14954 str += 6;
14955 break;
14956 default:
14957 str += 6;
14958 if (ISSPACE(*str)) break;
14959 continue;
14960 }
14961 if (STRNCASECMP(str-6, "coding", 6) == 0) break;
14962 }
14963 for (;;) {
14964 do {
14965 if (++str >= send) return;
14966 } while (ISSPACE(*str));
14967 if (sep) break;
14968 if (*str != '=' && *str != ':') return;
14969 sep = 1;
14970 str++;
14971 }
14972 beg = str;
14973 while ((*str == '-' || *str == '_' || ISALNUM(*str)) && ++str < send);
14974 s = rb_str_new(beg, parser_encode_length(p, beg, str - beg));
14975 parser_set_encode(p, RSTRING_PTR(s));
14976 rb_str_resize(s, 0);
14977}
14978
14979static void
14980parser_prepare(struct parser_params *p)
14981{
14982 int c = nextc(p);
14984 switch (c) {
14985 case '#':
14986 if (peek(p, '!')) p->has_shebang = 1;
14987 break;
14988 case 0xef: /* UTF-8 BOM marker */
14989 if (p->lex.pend - p->lex.pcur >= 2 &&
14990 (unsigned char)p->lex.pcur[0] == 0xbb &&
14991 (unsigned char)p->lex.pcur[1] == 0xbf) {
14992 p->enc = rb_utf8_encoding();
14993 p->lex.pcur += 2;
14994 p->lex.pbeg = p->lex.pcur;
14995 return;
14996 }
14997 break;
14998 case EOF:
14999 return;
15000 }
15001 pushback(p, c);
15002 p->enc = rb_enc_get(p->lex.lastline);
15003}
15004
15005#ifndef RIPPER
15006#define ambiguous_operator(tok, op, syn) ( \
15007 rb_warning0("`"op"' after local variable or literal is interpreted as binary operator"), \
15008 rb_warning0("even though it seems like "syn""))
15009#else
15010#define ambiguous_operator(tok, op, syn) \
15011 dispatch2(operator_ambiguous, TOKEN2VAL(tok), rb_str_new_cstr(syn))
15012#endif
15013#define warn_balanced(tok, op, syn) ((void) \
15014 (!IS_lex_state_for(last_state, EXPR_CLASS|EXPR_DOT|EXPR_FNAME|EXPR_ENDFN) && \
15015 space_seen && !ISSPACE(c) && \
15016 (ambiguous_operator(tok, op, syn), 0)), \
15017 (enum yytokentype)(tok))
15018
15019static VALUE
15020parse_rational(struct parser_params *p, char *str, int len, int seen_point)
15021{
15022 VALUE v;
15023 char *point = &str[seen_point];
15024 size_t fraclen = len-seen_point-1;
15025 memmove(point, point+1, fraclen+1);
15026 v = rb_cstr_to_inum(str, 10, FALSE);
15027 return rb_rational_new(v, rb_int_positive_pow(10, fraclen));
15028}
15029
15030static enum yytokentype
15031no_digits(struct parser_params *p)
15032{
15033 yyerror0("numeric literal without digits");
15034 if (peek(p, '_')) nextc(p);
15035 /* dummy 0, for tUMINUS_NUM at numeric */
15036 return set_integer_literal(p, INT2FIX(0), 0);
15037}
15038
15039static enum yytokentype
15040parse_numeric(struct parser_params *p, int c)
15041{
15042 int is_float, seen_point, seen_e, nondigit;
15043 int suffix;
15044
15045 is_float = seen_point = seen_e = nondigit = 0;
15046 SET_LEX_STATE(EXPR_END);
15047 newtok(p);
15048 if (c == '-' || c == '+') {
15049 tokadd(p, c);
15050 c = nextc(p);
15051 }
15052 if (c == '0') {
15053 int start = toklen(p);
15054 c = nextc(p);
15055 if (c == 'x' || c == 'X') {
15056 /* hexadecimal */
15057 c = nextc(p);
15058 if (c != -1 && ISXDIGIT(c)) {
15059 do {
15060 if (c == '_') {
15061 if (nondigit) break;
15062 nondigit = c;
15063 continue;
15064 }
15065 if (!ISXDIGIT(c)) break;
15066 nondigit = 0;
15067 tokadd(p, c);
15068 } while ((c = nextc(p)) != -1);
15069 }
15070 pushback(p, c);
15071 tokfix(p);
15072 if (toklen(p) == start) {
15073 return no_digits(p);
15074 }
15075 else if (nondigit) goto trailing_uc;
15076 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
15077 return set_integer_literal(p, rb_cstr_to_inum(tok(p), 16, FALSE), suffix);
15078 }
15079 if (c == 'b' || c == 'B') {
15080 /* binary */
15081 c = nextc(p);
15082 if (c == '0' || c == '1') {
15083 do {
15084 if (c == '_') {
15085 if (nondigit) break;
15086 nondigit = c;
15087 continue;
15088 }
15089 if (c != '0' && c != '1') break;
15090 nondigit = 0;
15091 tokadd(p, c);
15092 } while ((c = nextc(p)) != -1);
15093 }
15094 pushback(p, c);
15095 tokfix(p);
15096 if (toklen(p) == start) {
15097 return no_digits(p);
15098 }
15099 else if (nondigit) goto trailing_uc;
15100 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
15101 return set_integer_literal(p, rb_cstr_to_inum(tok(p), 2, FALSE), suffix);
15102 }
15103 if (c == 'd' || c == 'D') {
15104 /* decimal */
15105 c = nextc(p);
15106 if (c != -1 && ISDIGIT(c)) {
15107 do {
15108 if (c == '_') {
15109 if (nondigit) break;
15110 nondigit = c;
15111 continue;
15112 }
15113 if (!ISDIGIT(c)) break;
15114 nondigit = 0;
15115 tokadd(p, c);
15116 } while ((c = nextc(p)) != -1);
15117 }
15118 pushback(p, c);
15119 tokfix(p);
15120 if (toklen(p) == start) {
15121 return no_digits(p);
15122 }
15123 else if (nondigit) goto trailing_uc;
15124 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
15125 return set_integer_literal(p, rb_cstr_to_inum(tok(p), 10, FALSE), suffix);
15126 }
15127 if (c == '_') {
15128 /* 0_0 */
15129 goto octal_number;
15130 }
15131 if (c == 'o' || c == 'O') {
15132 /* prefixed octal */
15133 c = nextc(p);
15134 if (c == -1 || c == '_' || !ISDIGIT(c)) {
15135 return no_digits(p);
15136 }
15137 }
15138 if (c >= '0' && c <= '7') {
15139 /* octal */
15140 octal_number:
15141 do {
15142 if (c == '_') {
15143 if (nondigit) break;
15144 nondigit = c;
15145 continue;
15146 }
15147 if (c < '0' || c > '9') break;
15148 if (c > '7') goto invalid_octal;
15149 nondigit = 0;
15150 tokadd(p, c);
15151 } while ((c = nextc(p)) != -1);
15152 if (toklen(p) > start) {
15153 pushback(p, c);
15154 tokfix(p);
15155 if (nondigit) goto trailing_uc;
15156 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
15157 return set_integer_literal(p, rb_cstr_to_inum(tok(p), 8, FALSE), suffix);
15158 }
15159 if (nondigit) {
15160 pushback(p, c);
15161 goto trailing_uc;
15162 }
15163 }
15164 if (c > '7' && c <= '9') {
15165 invalid_octal:
15166 yyerror0("Invalid octal digit");
15167 }
15168 else if (c == '.' || c == 'e' || c == 'E') {
15169 tokadd(p, '0');
15170 }
15171 else {
15172 pushback(p, c);
15173 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
15174 return set_integer_literal(p, INT2FIX(0), suffix);
15175 }
15176 }
15177
15178 for (;;) {
15179 switch (c) {
15180 case '0': case '1': case '2': case '3': case '4':
15181 case '5': case '6': case '7': case '8': case '9':
15182 nondigit = 0;
15183 tokadd(p, c);
15184 break;
15185
15186 case '.':
15187 if (nondigit) goto trailing_uc;
15188 if (seen_point || seen_e) {
15189 goto decode_num;
15190 }
15191 else {
15192 int c0 = nextc(p);
15193 if (c0 == -1 || !ISDIGIT(c0)) {
15194 pushback(p, c0);
15195 goto decode_num;
15196 }
15197 c = c0;
15198 }
15199 seen_point = toklen(p);
15200 tokadd(p, '.');
15201 tokadd(p, c);
15202 is_float++;
15203 nondigit = 0;
15204 break;
15205
15206 case 'e':
15207 case 'E':
15208 if (nondigit) {
15209 pushback(p, c);
15210 c = nondigit;
15211 goto decode_num;
15212 }
15213 if (seen_e) {
15214 goto decode_num;
15215 }
15216 nondigit = c;
15217 c = nextc(p);
15218 if (c != '-' && c != '+' && !ISDIGIT(c)) {
15219 pushback(p, c);
15220 nondigit = 0;
15221 goto decode_num;
15222 }
15223 tokadd(p, nondigit);
15224 seen_e++;
15225 is_float++;
15226 tokadd(p, c);
15227 nondigit = (c == '-' || c == '+') ? c : 0;
15228 break;
15229
15230 case '_': /* `_' in number just ignored */
15231 if (nondigit) goto decode_num;
15232 nondigit = c;
15233 break;
15234
15235 default:
15236 goto decode_num;
15237 }
15238 c = nextc(p);
15239 }
15240
15241 decode_num:
15242 pushback(p, c);
15243 if (nondigit) {
15244 trailing_uc:
15245 literal_flush(p, p->lex.pcur - 1);
15246 YYLTYPE loc = RUBY_INIT_YYLLOC();
15247 compile_error(p, "trailing `%c' in number", nondigit);
15248 parser_show_error_line(p, &loc);
15249 }
15250 tokfix(p);
15251 if (is_float) {
15252 enum yytokentype type = tFLOAT;
15253 VALUE v;
15254
15255 suffix = number_literal_suffix(p, seen_e ? NUM_SUFFIX_I : NUM_SUFFIX_ALL);
15256 if (suffix & NUM_SUFFIX_R) {
15257 type = tRATIONAL;
15258 v = parse_rational(p, tok(p), toklen(p), seen_point);
15259 }
15260 else {
15261 double d = strtod(tok(p), 0);
15262 if (errno == ERANGE) {
15263 rb_warning1("Float %s out of range", WARN_S(tok(p)));
15264 errno = 0;
15265 }
15266 v = DBL2NUM(d);
15267 }
15268 return set_number_literal(p, v, type, suffix);
15269 }
15270 suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
15271 return set_integer_literal(p, rb_cstr_to_inum(tok(p), 10, FALSE), suffix);
15272}
15273
15274static enum yytokentype
15275parse_qmark(struct parser_params *p, int space_seen)
15276{
15277 rb_encoding *enc;
15278 register int c;
15279 VALUE lit;
15280
15281 if (IS_END()) {
15283 return '?';
15284 }
15285 c = nextc(p);
15286 if (c == -1) {
15287 compile_error(p, "incomplete character syntax");
15288 return 0;
15289 }
15290 if (rb_enc_isspace(c, p->enc)) {
15291 if (!IS_ARG()) {
15292 int c2 = escaped_control_code(c);
15293 if (c2) {
15294 WARN_SPACE_CHAR(c2, "?");
15295 }
15296 }
15297 ternary:
15298 pushback(p, c);
15300 return '?';
15301 }
15302 newtok(p);
15303 enc = p->enc;
15304 if (!parser_isascii(p)) {
15305 if (tokadd_mbchar(p, c) == -1) return 0;
15306 }
15307 else if ((rb_enc_isalnum(c, p->enc) || c == '_') &&
15308 p->lex.pcur < p->lex.pend && is_identchar(p->lex.pcur, p->lex.pend, p->enc)) {
15309 if (space_seen) {
15310 const char *start = p->lex.pcur - 1, *ptr = start;
15311 do {
15312 int n = parser_precise_mbclen(p, ptr);
15313 if (n < 0) return -1;
15314 ptr += n;
15315 } while (ptr < p->lex.pend && is_identchar(ptr, p->lex.pend, p->enc));
15316 rb_warn2("`?' just followed by `%.*s' is interpreted as" \
15317 " a conditional operator, put a space after `?'",
15318 WARN_I((int)(ptr - start)), WARN_S_L(start, (ptr - start)));
15319 }
15320 goto ternary;
15321 }
15322 else if (c == '\\') {
15323 if (peek(p, 'u')) {
15324 nextc(p);
15325 enc = rb_utf8_encoding();
15326 tokadd_utf8(p, &enc, -1, 0, 0);
15327 }
15328 else if (!lex_eol_p(p) && !(c = *p->lex.pcur, ISASCII(c))) {
15329 nextc(p);
15330 if (tokadd_mbchar(p, c) == -1) return 0;
15331 }
15332 else {
15333 c = read_escape(p, 0, &enc);
15334 tokadd(p, c);
15335 }
15336 }
15337 else {
15338 tokadd(p, c);
15339 }
15340 tokfix(p);
15341 lit = STR_NEW3(tok(p), toklen(p), enc, 0);
15342 set_yylval_str(lit);
15343 SET_LEX_STATE(EXPR_END);
15344 return tCHAR;
15345}
15346
15347static enum yytokentype
15348parse_percent(struct parser_params *p, const int space_seen, const enum lex_state_e last_state)
15349{
15350 register int c;
15351 const char *ptok = p->lex.pcur;
15352
15353 if (IS_BEG()) {
15354 int term;
15355 int paren;
15356
15357 c = nextc(p);
15358 quotation:
15359 if (c == -1 || !ISALNUM(c)) {
15360 term = c;
15361 c = 'Q';
15362 }
15363 else {
15364 term = nextc(p);
15365 if (rb_enc_isalnum(term, p->enc) || !parser_isascii(p)) {
15366 yyerror0("unknown type of %string");
15367 return 0;
15368 }
15369 }
15370 if (c == -1 || term == -1) {
15371 compile_error(p, "unterminated quoted string meets end of file");
15372 return 0;
15373 }
15374 paren = term;
15375 if (term == '(') term = ')';
15376 else if (term == '[') term = ']';
15377 else if (term == '{') term = '}';
15378 else if (term == '<') term = '>';
15379 else paren = 0;
15380
15381 p->lex.ptok = ptok-1;
15382 switch (c) {
15383 case 'Q':
15384 p->lex.strterm = NEW_STRTERM(str_dquote, term, paren);
15385 return tSTRING_BEG;
15386
15387 case 'q':
15388 p->lex.strterm = NEW_STRTERM(str_squote, term, paren);
15389 return tSTRING_BEG;
15390
15391 case 'W':
15392 p->lex.strterm = NEW_STRTERM(str_dword, term, paren);
15393 return tWORDS_BEG;
15394
15395 case 'w':
15396 p->lex.strterm = NEW_STRTERM(str_sword, term, paren);
15397 return tQWORDS_BEG;
15398
15399 case 'I':
15400 p->lex.strterm = NEW_STRTERM(str_dword, term, paren);
15401 return tSYMBOLS_BEG;
15402
15403 case 'i':
15404 p->lex.strterm = NEW_STRTERM(str_sword, term, paren);
15405 return tQSYMBOLS_BEG;
15406
15407 case 'x':
15408 p->lex.strterm = NEW_STRTERM(str_xquote, term, paren);
15409 return tXSTRING_BEG;
15410
15411 case 'r':
15412 p->lex.strterm = NEW_STRTERM(str_regexp, term, paren);
15413 return tREGEXP_BEG;
15414
15415 case 's':
15416 p->lex.strterm = NEW_STRTERM(str_ssym, term, paren);
15417 SET_LEX_STATE(EXPR_FNAME|EXPR_FITEM);
15418 return tSYMBEG;
15419
15420 default:
15421 yyerror0("unknown type of %string");
15422 return 0;
15423 }
15424 }
15425 if ((c = nextc(p)) == '=') {
15426 set_yylval_id('%');
15427 SET_LEX_STATE(EXPR_BEG);
15428 return tOP_ASGN;
15429 }
15430 if (IS_SPCARG(c) || (IS_lex_state(EXPR_FITEM) && c == 's')) {
15431 goto quotation;
15432 }
15433 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
15434 pushback(p, c);
15435 return warn_balanced('%', "%%", "string literal");
15436}
15437
15438static int
15439tokadd_ident(struct parser_params *p, int c)
15440{
15441 do {
15442 if (tokadd_mbchar(p, c) == -1) return -1;
15443 c = nextc(p);
15444 } while (parser_is_identchar(p));
15445 pushback(p, c);
15446 return 0;
15447}
15448
15449static ID
15450tokenize_ident(struct parser_params *p, const enum lex_state_e last_state)
15451{
15452 ID ident = TOK_INTERN();
15453
15454 set_yylval_name(ident);
15455
15456 return ident;
15457}
15458
15459static int
15460parse_numvar(struct parser_params *p)
15461{
15462 size_t len;
15463 int overflow;
15464 unsigned long n = ruby_scan_digits(tok(p)+1, toklen(p)-1, 10, &len, &overflow);
15465 const unsigned long nth_ref_max =
15466 ((FIXNUM_MAX < INT_MAX) ? FIXNUM_MAX : INT_MAX) >> 1;
15467 /* NTH_REF is left-shifted to be ORed with back-ref flag and
15468 * turned into a Fixnum, in compile.c */
15469
15470 if (overflow || n > nth_ref_max) {
15471 /* compile_error()? */
15472 rb_warn1("`%s' is too big for a number variable, always nil", WARN_S(tok(p)));
15473 return 0; /* $0 is $PROGRAM_NAME, not NTH_REF */
15474 }
15475 else {
15476 return (int)n;
15477 }
15478}
15479
15480static enum yytokentype
15481parse_gvar(struct parser_params *p, const enum lex_state_e last_state)
15482{
15483 const char *ptr = p->lex.pcur;
15484 register int c;
15485
15486 SET_LEX_STATE(EXPR_END);
15487 p->lex.ptok = ptr - 1; /* from '$' */
15488 newtok(p);
15489 c = nextc(p);
15490 switch (c) {
15491 case '_': /* $_: last read line string */
15492 c = nextc(p);
15493 if (parser_is_identchar(p)) {
15494 tokadd(p, '$');
15495 tokadd(p, '_');
15496 break;
15497 }
15498 pushback(p, c);
15499 c = '_';
15500 /* fall through */
15501 case '~': /* $~: match-data */
15502 case '*': /* $*: argv */
15503 case '$': /* $$: pid */
15504 case '?': /* $?: last status */
15505 case '!': /* $!: error string */
15506 case '@': /* $@: error position */
15507 case '/': /* $/: input record separator */
15508 case '\\': /* $\: output record separator */
15509 case ';': /* $;: field separator */
15510 case ',': /* $,: output field separator */
15511 case '.': /* $.: last read line number */
15512 case '=': /* $=: ignorecase */
15513 case ':': /* $:: load path */
15514 case '<': /* $<: reading filename */
15515 case '>': /* $>: default output handle */
15516 case '\"': /* $": already loaded files */
15517 tokadd(p, '$');
15518 tokadd(p, c);
15519 goto gvar;
15520
15521 case '-':
15522 tokadd(p, '$');
15523 tokadd(p, c);
15524 c = nextc(p);
15525 if (parser_is_identchar(p)) {
15526 if (tokadd_mbchar(p, c) == -1) return 0;
15527 }
15528 else {
15529 pushback(p, c);
15530 pushback(p, '-');
15531 return '$';
15532 }
15533 gvar:
15535 return tGVAR;
15536
15537 case '&': /* $&: last match */
15538 case '`': /* $`: string before last match */
15539 case '\'': /* $': string after last match */
15540 case '+': /* $+: string matches last paren. */
15541 if (IS_lex_state_for(last_state, EXPR_FNAME)) {
15542 tokadd(p, '$');
15543 tokadd(p, c);
15544 goto gvar;
15545 }
15546 set_yylval_node(NEW_BACK_REF(c, &_cur_loc));
15547 return tBACK_REF;
15548
15549 case '1': case '2': case '3':
15550 case '4': case '5': case '6':
15551 case '7': case '8': case '9':
15552 tokadd(p, '$');
15553 do {
15554 tokadd(p, c);
15555 c = nextc(p);
15556 } while (c != -1 && ISDIGIT(c));
15557 pushback(p, c);
15558 if (IS_lex_state_for(last_state, EXPR_FNAME)) goto gvar;
15559 tokfix(p);
15560 set_yylval_node(NEW_NTH_REF(parse_numvar(p), &_cur_loc));
15561 return tNTH_REF;
15562
15563 default:
15564 if (!parser_is_identchar(p)) {
15565 YYLTYPE loc = RUBY_INIT_YYLLOC();
15566 if (c == -1 || ISSPACE(c)) {
15567 compile_error(p, "`$' without identifiers is not allowed as a global variable name");
15568 }
15569 else {
15570 pushback(p, c);
15571 compile_error(p, "`$%c' is not allowed as a global variable name", c);
15572 }
15573 parser_show_error_line(p, &loc);
15575 return tGVAR;
15576 }
15577 /* fall through */
15578 case '0':
15579 tokadd(p, '$');
15580 }
15581
15582 if (tokadd_ident(p, c)) return 0;
15583 SET_LEX_STATE(EXPR_END);
15584 tokenize_ident(p, last_state);
15585 return tGVAR;
15586}
15587
15588#ifndef RIPPER
15589static bool
15590parser_numbered_param(struct parser_params *p, int n)
15591{
15592 if (n < 0) return false;
15593
15595 return false;
15596 }
15597 if (p->max_numparam == ORDINAL_PARAM) {
15598 compile_error(p, "ordinary parameter is defined");
15599 return false;
15600 }
15601 struct vtable *args = p->lvtbl->args;
15602 if (p->max_numparam < n) {
15603 p->max_numparam = n;
15604 }
15605 while (n > args->pos) {
15606 vtable_add(args, NUMPARAM_IDX_TO_ID(args->pos+1));
15607 }
15608 return true;
15609}
15610#endif
15611
15612static enum yytokentype
15613parse_atmark(struct parser_params *p, const enum lex_state_e last_state)
15614{
15615 const char *ptr = p->lex.pcur;
15616 enum yytokentype result = tIVAR;
15617 register int c = nextc(p);
15618 YYLTYPE loc;
15619
15620 p->lex.ptok = ptr - 1; /* from '@' */
15621 newtok(p);
15622 tokadd(p, '@');
15623 if (c == '@') {
15624 result = tCVAR;
15625 tokadd(p, '@');
15626 c = nextc(p);
15627 }
15628 SET_LEX_STATE(IS_lex_state_for(last_state, EXPR_FNAME) ? EXPR_ENDFN : EXPR_END);
15629 if (c == -1 || !parser_is_identchar(p)) {
15630 pushback(p, c);
15631 RUBY_SET_YYLLOC(loc);
15632 if (result == tIVAR) {
15633 compile_error(p, "`@' without identifiers is not allowed as an instance variable name");
15634 }
15635 else {
15636 compile_error(p, "`@@' without identifiers is not allowed as a class variable name");
15637 }
15638 parser_show_error_line(p, &loc);
15640 SET_LEX_STATE(EXPR_END);
15641 return result;
15642 }
15643 else if (ISDIGIT(c)) {
15644 pushback(p, c);
15645 RUBY_SET_YYLLOC(loc);
15646 if (result == tIVAR) {
15647 compile_error(p, "`@%c' is not allowed as an instance variable name", c);
15648 }
15649 else {
15650 compile_error(p, "`@@%c' is not allowed as a class variable name", c);
15651 }
15652 parser_show_error_line(p, &loc);
15654 SET_LEX_STATE(EXPR_END);
15655 return result;
15656 }
15657
15658 if (tokadd_ident(p, c)) return 0;
15659 tokenize_ident(p, last_state);
15660 return result;
15661}
15662
15663static enum yytokentype
15664parse_ident(struct parser_params *p, int c, int cmd_state)
15665{
15666 enum yytokentype result;
15667 int mb = ENC_CODERANGE_7BIT;
15668 const enum lex_state_e last_state = p->lex.state;
15669 ID ident;
15670
15671 do {
15672 if (!ISASCII(c)) mb = ENC_CODERANGE_UNKNOWN;
15673 if (tokadd_mbchar(p, c) == -1) return 0;
15674 c = nextc(p);
15675 } while (parser_is_identchar(p));
15676 if ((c == '!' || c == '?') && !peek(p, '=')) {
15677 result = tFID;
15678 tokadd(p, c);
15679 }
15680 else if (c == '=' && IS_lex_state(EXPR_FNAME) &&
15681 (!peek(p, '~') && !peek(p, '>') && (!peek(p, '=') || (peek_n(p, '>', 1))))) {
15682 result = tIDENTIFIER;
15683 tokadd(p, c);
15684 }
15685 else {
15686 result = tCONSTANT; /* assume provisionally */
15687 pushback(p, c);
15688 }
15689 tokfix(p);
15690
15691 if (IS_LABEL_POSSIBLE()) {
15692 if (IS_LABEL_SUFFIX(0)) {
15693 SET_LEX_STATE(EXPR_ARG|EXPR_LABELED);
15694 nextc(p);
15696 return tLABEL;
15697 }
15698 }
15699 if (mb == ENC_CODERANGE_7BIT && !IS_lex_state(EXPR_DOT)) {
15700 const struct kwtable *kw;
15701
15702 /* See if it is a reserved word. */
15703 kw = rb_reserved_word(tok(p), toklen(p));
15704 if (kw) {
15705 enum lex_state_e state = p->lex.state;
15706 if (IS_lex_state_for(state, EXPR_FNAME)) {
15707 SET_LEX_STATE(EXPR_ENDFN);
15709 return kw->id[0];
15710 }
15711 SET_LEX_STATE(kw->state);
15712 if (IS_lex_state(EXPR_BEG)) {
15713 p->command_start = TRUE;
15714 }
15715 if (kw->id[0] == keyword_do) {
15716 if (lambda_beginning_p()) {
15717 p->lex.lpar_beg = -1; /* make lambda_beginning_p() == FALSE in the body of "-> do ... end" */
15718 return keyword_do_LAMBDA;
15719 }
15720 if (COND_P()) return keyword_do_cond;
15721 if (CMDARG_P() && !IS_lex_state_for(state, EXPR_CMDARG))
15722 return keyword_do_block;
15723 return keyword_do;
15724 }
15725 if (IS_lex_state_for(state, (EXPR_BEG | EXPR_LABELED)))
15726 return kw->id[0];
15727 else {
15728 if (kw->id[0] != kw->id[1])
15729 SET_LEX_STATE(EXPR_BEG | EXPR_LABEL);
15730 return kw->id[1];
15731 }
15732 }
15733 }
15734
15735 if (IS_lex_state(EXPR_BEG_ANY | EXPR_ARG_ANY | EXPR_DOT)) {
15736 if (cmd_state) {
15737 SET_LEX_STATE(EXPR_CMDARG);
15738 }
15739 else {
15740 SET_LEX_STATE(EXPR_ARG);
15741 }
15742 }
15743 else if (p->lex.state == EXPR_FNAME) {
15744 SET_LEX_STATE(EXPR_ENDFN);
15745 }
15746 else {
15747 SET_LEX_STATE(EXPR_END);
15748 }
15749
15750 ident = tokenize_ident(p, last_state);
15751 if (result == tCONSTANT && is_local_id(ident)) result = tIDENTIFIER;
15752 if (!IS_lex_state_for(last_state, EXPR_DOT|EXPR_FNAME) &&
15753 (result == tIDENTIFIER) && /* not EXPR_FNAME, not attrasgn */
15754 lvar_defined(p, ident)) {
15755 SET_LEX_STATE(EXPR_END|EXPR_LABEL);
15756 }
15757 return result;
15758}
15759
15760static enum yytokentype
15761parser_yylex(struct parser_params *p)
15762{
15763 register int c;
15764 int space_seen = 0;
15765 int cmd_state;
15766 int label;
15767 enum lex_state_e last_state;
15768 int fallthru = FALSE;
15769 int token_seen = p->token_seen;
15770
15771 if (p->lex.strterm) {
15772 if (p->lex.strterm->flags & STRTERM_HEREDOC) {
15773 return here_document(p, &p->lex.strterm->u.heredoc);
15774 }
15775 else {
15776 token_flush(p);
15777 return parse_string(p, &p->lex.strterm->u.literal);
15778 }
15779 }
15780 cmd_state = p->command_start;
15781 p->command_start = FALSE;
15782 p->token_seen = TRUE;
15783 retry:
15784 last_state = p->lex.state;
15785#ifndef RIPPER
15786 token_flush(p);
15787#endif
15788 switch (c = nextc(p)) {
15789 case '\0': /* NUL */
15790 case '\004': /* ^D */
15791 case '\032': /* ^Z */
15792 case -1: /* end of script. */
15793 return 0;
15794
15795 /* white spaces */
15796 case ' ': case '\t': case '\f': case '\r':
15797 case '\13': /* '\v' */
15798 space_seen = 1;
15799#ifdef RIPPER
15800 while ((c = nextc(p))) {
15801 switch (c) {
15802 case ' ': case '\t': case '\f': case '\r':
15803 case '\13': /* '\v' */
15804 break;
15805 default:
15806 goto outofloop;
15807 }
15808 }
15809 outofloop:
15810 pushback(p, c);
15812#endif
15813 goto retry;
15814
15815 case '#': /* it's a comment */
15816 p->token_seen = token_seen;
15817 /* no magic_comment in shebang line */
15818 if (!parser_magic_comment(p, p->lex.pcur, p->lex.pend - p->lex.pcur)) {
15819 if (comment_at_top(p)) {
15820 set_file_encoding(p, p->lex.pcur, p->lex.pend);
15821 }
15822 }
15823 lex_goto_eol(p);
15825 fallthru = TRUE;
15826 /* fall through */
15827 case '\n':
15828 p->token_seen = token_seen;
15829 c = (IS_lex_state(EXPR_BEG|EXPR_CLASS|EXPR_FNAME|EXPR_DOT) &&
15830 !IS_lex_state(EXPR_LABELED));
15831 if (c || IS_lex_state_all(EXPR_ARG|EXPR_LABELED)) {
15832 if (!fallthru) {
15834 }
15835 fallthru = FALSE;
15836 if (!c && p->in_kwarg) {
15837 goto normal_newline;
15838 }
15839 goto retry;
15840 }
15841 while (1) {
15842 switch (c = nextc(p)) {
15843 case ' ': case '\t': case '\f': case '\r':
15844 case '\13': /* '\v' */
15845 space_seen = 1;
15846 break;
15847 case '#':
15848 pushback(p, c);
15849 if (space_seen) dispatch_scan_event(p, tSP);
15850 goto retry;
15851 case '&':
15852 case '.': {
15854 if (peek(p, '.') == (c == '&')) {
15855 pushback(p, c);
15857 goto retry;
15858 }
15859 }
15860 default:
15861 p->ruby_sourceline--;
15862 p->lex.nextline = p->lex.lastline;
15863 case -1: /* EOF no decrement*/
15864#ifndef RIPPER
15865 if (p->lex.prevline && !p->eofp) p->lex.lastline = p->lex.prevline;
15866 p->lex.pbeg = RSTRING_PTR(p->lex.lastline);
15867 p->lex.pend = p->lex.pcur = p->lex.pbeg + RSTRING_LEN(p->lex.lastline);
15868 pushback(p, 1); /* always pushback */
15869 p->lex.ptok = p->lex.pcur;
15870#else
15871 lex_goto_eol(p);
15872 if (c != -1) {
15873 p->lex.ptok = p->lex.pcur;
15874 }
15875#endif
15876 goto normal_newline;
15877 }
15878 }
15879 normal_newline:
15880 p->command_start = TRUE;
15881 SET_LEX_STATE(EXPR_BEG);
15882 return '\n';
15883
15884 case '*':
15885 if ((c = nextc(p)) == '*') {
15886 if ((c = nextc(p)) == '=') {
15888 SET_LEX_STATE(EXPR_BEG);
15889 return tOP_ASGN;
15890 }
15891 pushback(p, c);
15892 if (IS_SPCARG(c)) {
15893 rb_warning0("`**' interpreted as argument prefix");
15894 c = tDSTAR;
15895 }
15896 else if (IS_BEG()) {
15897 c = tDSTAR;
15898 }
15899 else {
15900 c = warn_balanced((enum ruby_method_ids)tPOW, "**", "argument prefix");
15901 }
15902 }
15903 else {
15904 if (c == '=') {
15905 set_yylval_id('*');
15906 SET_LEX_STATE(EXPR_BEG);
15907 return tOP_ASGN;
15908 }
15909 pushback(p, c);
15910 if (IS_SPCARG(c)) {
15911 rb_warning0("`*' interpreted as argument prefix");
15912 c = tSTAR;
15913 }
15914 else if (IS_BEG()) {
15915 c = tSTAR;
15916 }
15917 else {
15918 c = warn_balanced('*', "*", "argument prefix");
15919 }
15920 }
15921 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
15922 return c;
15923
15924 case '!':
15925 c = nextc(p);
15926 if (IS_AFTER_OPERATOR()) {
15927 SET_LEX_STATE(EXPR_ARG);
15928 if (c == '@') {
15929 return '!';
15930 }
15931 }
15932 else {
15933 SET_LEX_STATE(EXPR_BEG);
15934 }
15935 if (c == '=') {
15936 return tNEQ;
15937 }
15938 if (c == '~') {
15939 return tNMATCH;
15940 }
15941 pushback(p, c);
15942 return '!';
15943
15944 case '=':
15945 if (was_bol(p)) {
15946 /* skip embedded rd document */
15947 if (word_match_p(p, "begin", 5)) {
15948 int first_p = TRUE;
15949
15950 lex_goto_eol(p);
15952 for (;;) {
15953 lex_goto_eol(p);
15954 if (!first_p) {
15956 }
15957 first_p = FALSE;
15958 c = nextc(p);
15959 if (c == -1) {
15960 compile_error(p, "embedded document meets end of file");
15961 return 0;
15962 }
15963 if (c == '=' && word_match_p(p, "end", 3)) {
15964 break;
15965 }
15966 pushback(p, c);
15967 }
15968 lex_goto_eol(p);
15970 goto retry;
15971 }
15972 }
15973
15974 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
15975 if ((c = nextc(p)) == '=') {
15976 if ((c = nextc(p)) == '=') {
15977 return tEQQ;
15978 }
15979 pushback(p, c);
15980 return tEQ;
15981 }
15982 if (c == '~') {
15983 return tMATCH;
15984 }
15985 else if (c == '>') {
15986 return tASSOC;
15987 }
15988 pushback(p, c);
15989 return '=';
15990
15991 case '<':
15992 c = nextc(p);
15993 if (c == '<' &&
15994 !IS_lex_state(EXPR_DOT | EXPR_CLASS) &&
15995 !IS_END() &&
15996 (!IS_ARG() || IS_lex_state(EXPR_LABELED) || space_seen)) {
15997 int token = heredoc_identifier(p);
15998 if (token) return token < 0 ? 0 : token;
15999 }
16000 if (IS_AFTER_OPERATOR()) {
16001 SET_LEX_STATE(EXPR_ARG);
16002 }
16003 else {
16004 if (IS_lex_state(EXPR_CLASS))
16005 p->command_start = TRUE;
16006 SET_LEX_STATE(EXPR_BEG);
16007 }
16008 if (c == '=') {
16009 if ((c = nextc(p)) == '>') {
16010 return tCMP;
16011 }
16012 pushback(p, c);
16013 return tLEQ;
16014 }
16015 if (c == '<') {
16016 if ((c = nextc(p)) == '=') {
16018 SET_LEX_STATE(EXPR_BEG);
16019 return tOP_ASGN;
16020 }
16021 pushback(p, c);
16022 return warn_balanced((enum ruby_method_ids)tLSHFT, "<<", "here document");
16023 }
16024 pushback(p, c);
16025 return '<';
16026
16027 case '>':
16028 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
16029 if ((c = nextc(p)) == '=') {
16030 return tGEQ;
16031 }
16032 if (c == '>') {
16033 if ((c = nextc(p)) == '=') {
16035 SET_LEX_STATE(EXPR_BEG);
16036 return tOP_ASGN;
16037 }
16038 pushback(p, c);
16039 return tRSHFT;
16040 }
16041 pushback(p, c);
16042 return '>';
16043
16044 case '"':
16045 label = (IS_LABEL_POSSIBLE() ? str_label : 0);
16046 p->lex.strterm = NEW_STRTERM(str_dquote | label, '"', 0);
16047 p->lex.ptok = p->lex.pcur-1;
16048 return tSTRING_BEG;
16049
16050 case '`':
16051 if (IS_lex_state(EXPR_FNAME)) {
16052 SET_LEX_STATE(EXPR_ENDFN);
16053 return c;
16054 }
16055 if (IS_lex_state(EXPR_DOT)) {
16056 if (cmd_state)
16057 SET_LEX_STATE(EXPR_CMDARG);
16058 else
16059 SET_LEX_STATE(EXPR_ARG);
16060 return c;
16061 }
16062 p->lex.strterm = NEW_STRTERM(str_xquote, '`', 0);
16063 return tXSTRING_BEG;
16064
16065 case '\'':
16066 label = (IS_LABEL_POSSIBLE() ? str_label : 0);
16067 p->lex.strterm = NEW_STRTERM(str_squote | label, '\'', 0);
16068 p->lex.ptok = p->lex.pcur-1;
16069 return tSTRING_BEG;
16070
16071 case '?':
16072 return parse_qmark(p, space_seen);
16073
16074 case '&':
16075 if ((c = nextc(p)) == '&') {
16076 SET_LEX_STATE(EXPR_BEG);
16077 if ((c = nextc(p)) == '=') {
16079 SET_LEX_STATE(EXPR_BEG);
16080 return tOP_ASGN;
16081 }
16082 pushback(p, c);
16083 return tANDOP;
16084 }
16085 else if (c == '=') {
16086 set_yylval_id('&');
16087 SET_LEX_STATE(EXPR_BEG);
16088 return tOP_ASGN;
16089 }
16090 else if (c == '.') {
16092 SET_LEX_STATE(EXPR_DOT);
16093 return tANDDOT;
16094 }
16095 pushback(p, c);
16096 if (IS_SPCARG(c)) {
16097 if ((c != ':') ||
16098 (c = peekc_n(p, 1)) == -1 ||
16099 !(c == '\'' || c == '"' ||
16100 is_identchar((p->lex.pcur+1), p->lex.pend, p->enc))) {
16101 rb_warning0("`&' interpreted as argument prefix");
16102 }
16103 c = tAMPER;
16104 }
16105 else if (IS_BEG()) {
16106 c = tAMPER;
16107 }
16108 else {
16109 c = warn_balanced('&', "&", "argument prefix");
16110 }
16111 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
16112 return c;
16113
16114 case '|':
16115 if ((c = nextc(p)) == '|') {
16116 SET_LEX_STATE(EXPR_BEG);
16117 if ((c = nextc(p)) == '=') {
16119 SET_LEX_STATE(EXPR_BEG);
16120 return tOP_ASGN;
16121 }
16122 pushback(p, c);
16123 if (IS_lex_state_for(last_state, EXPR_BEG)) {
16124 c = '|';
16125 pushback(p, '|');
16126 return c;
16127 }
16128 return tOROP;
16129 }
16130 if (c == '=') {
16131 set_yylval_id('|');
16132 SET_LEX_STATE(EXPR_BEG);
16133 return tOP_ASGN;
16134 }
16135 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG|EXPR_LABEL);
16136 pushback(p, c);
16137 return '|';
16138
16139 case '+':
16140 c = nextc(p);
16141 if (IS_AFTER_OPERATOR()) {
16142 SET_LEX_STATE(EXPR_ARG);
16143 if (c == '@') {
16144 return tUPLUS;
16145 }
16146 pushback(p, c);
16147 return '+';
16148 }
16149 if (c == '=') {
16150 set_yylval_id('+');
16151 SET_LEX_STATE(EXPR_BEG);
16152 return tOP_ASGN;
16153 }
16154 if (IS_BEG() || (IS_SPCARG(c) && arg_ambiguous(p, '+'))) {
16155 SET_LEX_STATE(EXPR_BEG);
16156 pushback(p, c);
16157 if (c != -1 && ISDIGIT(c)) {
16158 return parse_numeric(p, '+');
16159 }
16160 return tUPLUS;
16161 }
16162 SET_LEX_STATE(EXPR_BEG);
16163 pushback(p, c);
16164 return warn_balanced('+', "+", "unary operator");
16165
16166 case '-':
16167 c = nextc(p);
16168 if (IS_AFTER_OPERATOR()) {
16169 SET_LEX_STATE(EXPR_ARG);
16170 if (c == '@') {
16171 return tUMINUS;
16172 }
16173 pushback(p, c);
16174 return '-';
16175 }
16176 if (c == '=') {
16177 set_yylval_id('-');
16178 SET_LEX_STATE(EXPR_BEG);
16179 return tOP_ASGN;
16180 }
16181 if (c == '>') {
16182 SET_LEX_STATE(EXPR_ENDFN);
16183 return tLAMBDA;
16184 }
16185 if (IS_BEG() || (IS_SPCARG(c) && arg_ambiguous(p, '-'))) {
16186 SET_LEX_STATE(EXPR_BEG);
16187 pushback(p, c);
16188 if (c != -1 && ISDIGIT(c)) {
16189 return tUMINUS_NUM;
16190 }
16191 return tUMINUS;
16192 }
16193 SET_LEX_STATE(EXPR_BEG);
16194 pushback(p, c);
16195 return warn_balanced('-', "-", "unary operator");
16196
16197 case '.': {
16198 int is_beg = IS_BEG();
16199 SET_LEX_STATE(EXPR_BEG);
16200 if ((c = nextc(p)) == '.') {
16201 if ((c = nextc(p)) == '.') {
16202 if (p->lex.paren_nest == 0 && looking_at_eol_p(p)) {
16203 rb_warn0("... at EOL, should be parenthesized?");
16204 }
16205 return is_beg ? tBDOT3 : tDOT3;
16206 }
16207 pushback(p, c);
16208 return is_beg ? tBDOT2 : tDOT2;
16209 }
16210 pushback(p, c);
16211 if (c != -1 && ISDIGIT(c)) {
16212 char prev = p->lex.pcur-1 > p->lex.pbeg ? *(p->lex.pcur-2) : 0;
16213 parse_numeric(p, '.');
16214 if (ISDIGIT(prev)) {
16215 yyerror0("unexpected fraction part after numeric literal");
16216 }
16217 else {
16218 yyerror0("no .<digit> floating literal anymore; put 0 before dot");
16219 }
16220 SET_LEX_STATE(EXPR_END);
16221 p->lex.ptok = p->lex.pcur;
16222 goto retry;
16223 }
16224 set_yylval_id('.');
16225 SET_LEX_STATE(EXPR_DOT);
16226 return '.';
16227 }
16228
16229 case '0': case '1': case '2': case '3': case '4':
16230 case '5': case '6': case '7': case '8': case '9':
16231 return parse_numeric(p, c);
16232
16233 case ')':
16234 COND_POP();
16235 CMDARG_POP();
16236 SET_LEX_STATE(EXPR_ENDFN);
16237 p->lex.paren_nest--;
16238 return c;
16239
16240 case ']':
16241 COND_POP();
16242 CMDARG_POP();
16243 SET_LEX_STATE(EXPR_END);
16244 p->lex.paren_nest--;
16245 return c;
16246
16247 case '}':
16248 /* tSTRING_DEND does COND_POP and CMDARG_POP in the yacc's rule */
16249 if (!p->lex.brace_nest--) return tSTRING_DEND;
16250 COND_POP();
16251 CMDARG_POP();
16252 SET_LEX_STATE(EXPR_END);
16253 p->lex.paren_nest--;
16254 return c;
16255
16256 case ':':
16257 c = nextc(p);
16258 if (c == ':') {
16259 if (IS_BEG() || IS_lex_state(EXPR_CLASS) || IS_SPCARG(-1)) {
16260 SET_LEX_STATE(EXPR_BEG);
16261 return tCOLON3;
16262 }
16264 SET_LEX_STATE(EXPR_DOT);
16265 return tCOLON2;
16266 }
16267 if (IS_END() || ISSPACE(c) || c == '#') {
16268 pushback(p, c);
16269 c = warn_balanced(':', ":", "symbol literal");
16270 SET_LEX_STATE(EXPR_BEG);
16271 return c;
16272 }
16273 switch (c) {
16274 case '\'':
16275 p->lex.strterm = NEW_STRTERM(str_ssym, c, 0);
16276 break;
16277 case '"':
16278 p->lex.strterm = NEW_STRTERM(str_dsym, c, 0);
16279 break;
16280 default:
16281 pushback(p, c);
16282 break;
16283 }
16284 SET_LEX_STATE(EXPR_FNAME);
16285 return tSYMBEG;
16286
16287 case '/':
16288 if (IS_BEG()) {
16289 p->lex.strterm = NEW_STRTERM(str_regexp, '/', 0);
16290 return tREGEXP_BEG;
16291 }
16292 if ((c = nextc(p)) == '=') {
16293 set_yylval_id('/');
16294 SET_LEX_STATE(EXPR_BEG);
16295 return tOP_ASGN;
16296 }
16297 pushback(p, c);
16298 if (IS_SPCARG(c)) {
16299 arg_ambiguous(p, '/');
16300 p->lex.strterm = NEW_STRTERM(str_regexp, '/', 0);
16301 return tREGEXP_BEG;
16302 }
16303 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
16304 return warn_balanced('/', "/", "regexp literal");
16305
16306 case '^':
16307 if ((c = nextc(p)) == '=') {
16308 set_yylval_id('^');
16309 SET_LEX_STATE(EXPR_BEG);
16310 return tOP_ASGN;
16311 }
16312 SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
16313 pushback(p, c);
16314 return '^';
16315
16316 case ';':
16317 SET_LEX_STATE(EXPR_BEG);
16318 p->command_start = TRUE;
16319 return ';';
16320
16321 case ',':
16322 SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
16323 return ',';
16324
16325 case '~':
16326 if (IS_AFTER_OPERATOR()) {
16327 if ((c = nextc(p)) != '@') {
16328 pushback(p, c);
16329 }
16330 SET_LEX_STATE(EXPR_ARG);
16331 }
16332 else {
16333 SET_LEX_STATE(EXPR_BEG);
16334 }
16335 return '~';
16336
16337 case '(':
16338 if (IS_BEG()) {
16339 c = tLPAREN;
16340 }
16341 else if (!space_seen) {
16342 /* foo( ... ) => method call, no ambiguity */
16343 }
16344 else if (IS_ARG() || IS_lex_state_all(EXPR_END|EXPR_LABEL)) {
16345 c = tLPAREN_ARG;
16346 }
16347 else if (IS_lex_state(EXPR_ENDFN) && !lambda_beginning_p()) {
16348 rb_warning0("parentheses after method name is interpreted as "
16349 "an argument list, not a decomposed argument");
16350 }
16351 p->lex.paren_nest++;
16352 COND_PUSH(0);
16353 CMDARG_PUSH(0);
16354 SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
16355 return c;
16356
16357 case '[':
16358 p->lex.paren_nest++;
16359 if (IS_AFTER_OPERATOR()) {
16360 if ((c = nextc(p)) == ']') {
16361 SET_LEX_STATE(EXPR_ARG);
16362 if ((c = nextc(p)) == '=') {
16363 return tASET;
16364 }
16365 pushback(p, c);
16366 return tAREF;
16367 }
16368 pushback(p, c);
16369 SET_LEX_STATE(EXPR_ARG|EXPR_LABEL);
16370 return '[';
16371 }
16372 else if (IS_BEG()) {
16373 c = tLBRACK;
16374 }
16375 else if (IS_ARG() && (space_seen || IS_lex_state(EXPR_LABELED))) {
16376 c = tLBRACK;
16377 }
16378 SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
16379 COND_PUSH(0);
16380 CMDARG_PUSH(0);
16381 return c;
16382
16383 case '{':
16384 ++p->lex.brace_nest;
16385 if (lambda_beginning_p())
16386 c = tLAMBEG;
16387 else if (IS_lex_state(EXPR_LABELED))
16388 c = tLBRACE; /* hash */
16389 else if (IS_lex_state(EXPR_ARG_ANY | EXPR_END | EXPR_ENDFN))
16390 c = '{'; /* block (primary) */
16391 else if (IS_lex_state(EXPR_ENDARG))
16392 c = tLBRACE_ARG; /* block (expr) */
16393 else
16394 c = tLBRACE; /* hash */
16395 if (c != tLBRACE) {
16396 p->command_start = TRUE;
16397 SET_LEX_STATE(EXPR_BEG);
16398 }
16399 else {
16400 SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
16401 }
16402 ++p->lex.paren_nest; /* after lambda_beginning_p() */
16403 COND_PUSH(0);
16404 CMDARG_PUSH(0);
16405 return c;
16406
16407 case '\\':
16408 c = nextc(p);
16409 if (c == '\n') {
16410 space_seen = 1;
16412 goto retry; /* skip \\n */
16413 }
16414 if (c == ' ') return tSP;
16415 if (ISSPACE(c)) return c;
16416 pushback(p, c);
16417 return '\\';
16418
16419 case '%':
16420 return parse_percent(p, space_seen, last_state);
16421
16422 case '$':
16423 return parse_gvar(p, last_state);
16424
16425 case '@':
16426 return parse_atmark(p, last_state);
16427
16428 case '_':
16429 if (was_bol(p) && whole_match_p(p, "__END__", 7, 0)) {
16430 p->ruby__end__seen = 1;
16431 p->eofp = 1;
16432#ifndef RIPPER
16433 return -1;
16434#else
16435 lex_goto_eol(p);
16437 return 0;
16438#endif
16439 }
16440 newtok(p);
16441 break;
16442
16443 default:
16444 if (!parser_is_identchar(p)) {
16445 compile_error(p, "Invalid char `\\x%02X' in expression", c);
16446 token_flush(p);
16447 goto retry;
16448 }
16449
16450 newtok(p);
16451 break;
16452 }
16453
16454 return parse_ident(p, c, cmd_state);
16455}
16456
16457static enum yytokentype
16458yylex(YYSTYPE *lval, YYLTYPE *yylloc, struct parser_params *p)
16459{
16460 enum yytokentype t;
16461
16462 p->lval = lval;
16463 lval->val = Qundef;
16464 t = parser_yylex(p);
16465
16466 if (p->lex.strterm && (p->lex.strterm->flags & STRTERM_HEREDOC))
16468 else
16469 RUBY_SET_YYLLOC(*yylloc);
16470
16471 if (has_delayed_token(p))
16473 else if (t != 0)
16474 dispatch_scan_event(p, t);
16475
16476 return t;
16477}
16478
16479#define LVAR_USED ((ID)1 << (sizeof(ID) * CHAR_BIT - 1))
16480
16481static NODE*
16482node_newnode(struct parser_params *p, enum node_type type, VALUE a0, VALUE a1, VALUE a2, const rb_code_location_t *loc)
16483{
16484 NODE *n = rb_ast_newnode(p->ast, type);
16485
16486 rb_node_init(n, type, a0, a1, a2);
16487
16488 nd_set_loc(n, loc);
16489 nd_set_node_id(n, parser_get_node_id(p));
16490 return n;
16491}
16492
16493static NODE *
16494nd_set_loc(NODE *nd, const YYLTYPE *loc)
16495{
16496 nd->nd_loc = *loc;
16497 nd_set_line(nd, loc->beg_pos.lineno);
16498 return nd;
16499}
16500
16501#ifndef RIPPER
16502static enum node_type
16503nodetype(NODE *node) /* for debug */
16504{
16505 return (enum node_type)nd_type(node);
16506}
16507
16508static int
16509nodeline(NODE *node)
16510{
16511 return nd_line(node);
16512}
16513
16514static NODE*
16515newline_node(NODE *node)
16516{
16517 if (node) {
16518 node = remove_begin(node);
16519 node->flags |= NODE_FL_NEWLINE;
16520 }
16521 return node;
16522}
16523
16524static void
16525fixpos(NODE *node, NODE *orig)
16526{
16527 if (!node) return;
16528 if (!orig) return;
16529 nd_set_line(node, nd_line(orig));
16530}
16531
16532static void
16533parser_warning(struct parser_params *p, NODE *node, const char *mesg)
16534{
16535 rb_compile_warning(p->ruby_sourcefile, nd_line(node), "%s", mesg);
16536}
16537
16538static void
16539parser_warn(struct parser_params *p, NODE *node, const char *mesg)
16540{
16541 rb_compile_warn(p->ruby_sourcefile, nd_line(node), "%s", mesg);
16542}
16543
16544static NODE*
16545block_append(struct parser_params *p, NODE *head, NODE *tail)
16546{
16547 NODE *end, *h = head, *nd;
16548
16549 if (tail == 0) return head;
16550
16551 if (h == 0) return tail;
16552 switch (nd_type(h)) {
16553 case NODE_LIT:
16554 case NODE_STR:
16555 case NODE_SELF:
16556 case NODE_TRUE:
16557 case NODE_FALSE:
16558 case NODE_NIL:
16559 parser_warning(p, h, "unused literal ignored");
16560 return tail;
16561 default:
16562 h = end = NEW_BLOCK(head, &head->nd_loc);
16563 end->nd_end = end;
16564 head = end;
16565 break;
16566 case NODE_BLOCK:
16567 end = h->nd_end;
16568 break;
16569 }
16570
16571 nd = end->nd_head;
16572 switch (nd_type(nd)) {
16573 case NODE_RETURN:
16574 case NODE_BREAK:
16575 case NODE_NEXT:
16576 case NODE_REDO:
16577 case NODE_RETRY:
16578 if (RTEST(ruby_verbose)) {
16579 parser_warning(p, tail, "statement not reached");
16580 }
16581 break;
16582
16583 default:
16584 break;
16585 }
16586
16587 if (nd_type(tail) != NODE_BLOCK) {
16588 tail = NEW_BLOCK(tail, &tail->nd_loc);
16589 tail->nd_end = tail;
16590 }
16591 end->nd_next = tail;
16592 h->nd_end = tail->nd_end;
16593 nd_set_last_loc(head, nd_last_loc(tail));
16594 return head;
16595}
16596
16597/* append item to the list */
16598static NODE*
16599list_append(struct parser_params *p, NODE *list, NODE *item)
16600{
16601 NODE *last;
16602
16603 if (list == 0) return NEW_LIST(item, &item->nd_loc);
16604 if (list->nd_next) {
16605 last = list->nd_next->nd_end;
16606 }
16607 else {
16608 last = list;
16609 }
16610
16611 list->nd_alen += 1;
16612 last->nd_next = NEW_LIST(item, &item->nd_loc);
16613 list->nd_next->nd_end = last->nd_next;
16614
16616
16617 return list;
16618}
16619
16620/* concat two lists */
16621static NODE*
16622list_concat(NODE *head, NODE *tail)
16623{
16624 NODE *last;
16625
16626 if (head->nd_next) {
16627 last = head->nd_next->nd_end;
16628 }
16629 else {
16630 last = head;
16631 }
16632
16633 head->nd_alen += tail->nd_alen;
16634 last->nd_next = tail;
16635 if (tail->nd_next) {
16636 head->nd_next->nd_end = tail->nd_next->nd_end;
16637 }
16638 else {
16639 head->nd_next->nd_end = tail;
16640 }
16641
16642 nd_set_last_loc(head, nd_last_loc(tail));
16643
16644 return head;
16645}
16646
16647static int
16648literal_concat0(struct parser_params *p, VALUE head, VALUE tail)
16649{
16650 if (NIL_P(tail)) return 1;
16651 if (!rb_enc_compatible(head, tail)) {
16652 compile_error(p, "string literal encodings differ (%s / %s)",
16653 rb_enc_name(rb_enc_get(head)),
16654 rb_enc_name(rb_enc_get(tail)));
16655 rb_str_resize(head, 0);
16656 rb_str_resize(tail, 0);
16657 return 0;
16658 }
16659 rb_str_buf_append(head, tail);
16660 return 1;
16661}
16662
16663/* concat two string literals */
16664static NODE *
16665literal_concat(struct parser_params *p, NODE *head, NODE *tail, const YYLTYPE *loc)
16666{
16667 enum node_type htype;
16668 NODE *headlast;
16669 VALUE lit;
16670
16671 if (!head) return tail;
16672 if (!tail) return head;
16673
16674 htype = nd_type(head);
16675 if (htype == NODE_EVSTR) {
16676 NODE *node = NEW_DSTR(STR_NEW0(), loc);
16677 RB_OBJ_WRITTEN(p->ast, Qnil, node->nd_lit);
16678 head = list_append(p, node, head);
16679 htype = NODE_DSTR;
16680 }
16681 if (p->heredoc_indent > 0) {
16682 switch (htype) {
16683 case NODE_STR:
16684 nd_set_type(head, NODE_DSTR);
16685 case NODE_DSTR:
16686 return list_append(p, head, tail);
16687 default:
16688 break;
16689 }
16690 }
16691 switch (nd_type(tail)) {
16692 case NODE_STR:
16693 if (htype == NODE_DSTR && (headlast = head->nd_next->nd_end->nd_head) &&
16694 nd_type(headlast) == NODE_STR) {
16695 htype = NODE_STR;
16696 lit = headlast->nd_lit;
16697 }
16698 else {
16699 lit = head->nd_lit;
16700 }
16701 if (htype == NODE_STR) {
16702 if (!literal_concat0(p, lit, tail->nd_lit)) {
16703 error:
16704 rb_discard_node(p, head);
16705 rb_discard_node(p, tail);
16706 return 0;
16707 }
16708 rb_discard_node(p, tail);
16709 }
16710 else {
16711 list_append(p, head, tail);
16712 }
16713 break;
16714
16715 case NODE_DSTR:
16716 if (htype == NODE_STR) {
16717 if (!literal_concat0(p, head->nd_lit, tail->nd_lit))
16718 goto error;
16719 tail->nd_lit = head->nd_lit;
16720 rb_discard_node(p, head);
16721 head = tail;
16722 }
16723 else if (NIL_P(tail->nd_lit)) {
16724 append:
16725 head->nd_alen += tail->nd_alen - 1;
16726 head->nd_next->nd_end->nd_next = tail->nd_next;
16727 head->nd_next->nd_end = tail->nd_next->nd_end;
16728 rb_discard_node(p, tail);
16729 }
16730 else if (htype == NODE_DSTR && (headlast = head->nd_next->nd_end->nd_head) &&
16731 nd_type(headlast) == NODE_STR) {
16732 lit = headlast->nd_lit;
16733 if (!literal_concat0(p, lit, tail->nd_lit))
16734 goto error;
16735 tail->nd_lit = Qnil;
16736 goto append;
16737 }
16738 else {
16739 list_concat(head, NEW_NODE(NODE_LIST, NEW_STR(tail->nd_lit, loc), tail->nd_alen, tail->nd_next, loc));
16740 }
16741 break;
16742
16743 case NODE_EVSTR:
16744 if (htype == NODE_STR) {
16745 nd_set_type(head, NODE_DSTR);
16746 head->nd_alen = 1;
16747 }
16748 list_append(p, head, tail);
16749 break;
16750 }
16751 return head;
16752}
16753
16754static NODE *
16755evstr2dstr(struct parser_params *p, NODE *node)
16756{
16757 if (nd_type(node) == NODE_EVSTR) {
16758 NODE * dstr = NEW_DSTR(STR_NEW0(), &node->nd_loc);
16759 RB_OBJ_WRITTEN(p->ast, Qnil, dstr->nd_lit);
16760 node = list_append(p, dstr, node);
16761 }
16762 return node;
16763}
16764
16765static NODE *
16766new_evstr(struct parser_params *p, NODE *node, const YYLTYPE *loc)
16767{
16768 NODE *head = node;
16769
16770 if (node) {
16771 switch (nd_type(node)) {
16772 case NODE_STR: case NODE_DSTR: case NODE_EVSTR:
16773 return node;
16774 }
16775 }
16776 return NEW_EVSTR(head, loc);
16777}
16778
16779static NODE *
16780call_bin_op(struct parser_params *p, NODE *recv, ID id, NODE *arg1,
16781 const YYLTYPE *op_loc, const YYLTYPE *loc)
16782{
16783 NODE *expr;
16784 value_expr(recv);
16785 value_expr(arg1);
16786 expr = NEW_OPCALL(recv, id, NEW_LIST(arg1, &arg1->nd_loc), loc);
16787 nd_set_line(expr, op_loc->beg_pos.lineno);
16788 return expr;
16789}
16790
16791static NODE *
16792call_uni_op(struct parser_params *p, NODE *recv, ID id, const YYLTYPE *op_loc, const YYLTYPE *loc)
16793{
16794 NODE *opcall;
16795 value_expr(recv);
16796 opcall = NEW_OPCALL(recv, id, 0, loc);
16797 nd_set_line(opcall, op_loc->beg_pos.lineno);
16798 return opcall;
16799}
16800
16801static NODE *
16802new_qcall(struct parser_params* p, ID atype, NODE *recv, ID mid, NODE *args, const YYLTYPE *op_loc, const YYLTYPE *loc)
16803{
16804 NODE *qcall = NEW_QCALL(atype, recv, mid, args, loc);
16805 nd_set_line(qcall, op_loc->beg_pos.lineno);
16806 return qcall;
16807}
16808
16809static NODE*
16810new_command_qcall(struct parser_params* p, ID atype, NODE *recv, ID mid, NODE *args, NODE *block, const YYLTYPE *op_loc, const YYLTYPE *loc)
16811{
16812 NODE *ret;
16813 if (block) block_dup_check(p, args, block);
16814 ret = new_qcall(p, atype, recv, mid, args, op_loc, loc);
16815 if (block) ret = method_add_block(p, ret, block, loc);
16816 fixpos(ret, recv);
16817 return ret;
16818}
16819
16820#define nd_once_body(node) (nd_type(node) == NODE_ONCE ? (node)->nd_body : node)
16821static NODE*
16822match_op(struct parser_params *p, NODE *node1, NODE *node2, const YYLTYPE *op_loc, const YYLTYPE *loc)
16823{
16824 NODE *n;
16825 int line = op_loc->beg_pos.lineno;
16826
16827 value_expr(node1);
16828 value_expr(node2);
16829 if (node1 && (n = nd_once_body(node1)) != 0) {
16830 switch (nd_type(n)) {
16831 case NODE_DREGX:
16832 {
16833 NODE *match = NEW_MATCH2(node1, node2, loc);
16834 nd_set_line(match, line);
16835 return match;
16836 }
16837
16838 case NODE_LIT:
16839 if (RB_TYPE_P(n->nd_lit, T_REGEXP)) {
16840 const VALUE lit = n->nd_lit;
16841 NODE *match = NEW_MATCH2(node1, node2, loc);
16842 match->nd_args = reg_named_capture_assign(p, lit, loc);
16843 nd_set_line(match, line);
16844 return match;
16845 }
16846 }
16847 }
16848
16849 if (node2 && (n = nd_once_body(node2)) != 0) {
16850 NODE *match3;
16851
16852 switch (nd_type(n)) {
16853 case NODE_LIT:
16854 if (!RB_TYPE_P(n->nd_lit, T_REGEXP)) break;
16855 /* fallthru */
16856 case NODE_DREGX:
16857 match3 = NEW_MATCH3(node2, node1, loc);
16858 return match3;
16859 }
16860 }
16861
16862 n = NEW_CALL(node1, tMATCH, NEW_LIST(node2, &node2->nd_loc), loc);
16863 nd_set_line(n, line);
16864 return n;
16865}
16866
16867# if WARN_PAST_SCOPE
16868static int
16869past_dvar_p(struct parser_params *p, ID id)
16870{
16871 struct vtable *past = p->lvtbl->past;
16872 while (past) {
16873 if (vtable_included(past, id)) return 1;
16874 past = past->prev;
16875 }
16876 return 0;
16877}
16878# endif
16879
16880/* As Ripper#warn does not have arguments for the location, so the
16881 * following messages cannot be separated */
16882#define WARN_LOCATION(type) do { \
16883 if (p->warn_location) { \
16884 int line; \
16885 VALUE file = rb_source_location(&line); \
16886 rb_warn3(type" in eval may not return location in binding;" \
16887 " use Binding#source_location instead\n" \
16888 "%"PRIsWARN":%d: warning: in `%"PRIsWARN"'", \
16889 file, WARN_I(line), rb_id2str(rb_frame_this_func())); \
16890 } \
16891} while (0)
16892
16893static int
16894numparam_nested_p(struct parser_params *p)
16895{
16896 struct local_vars *local = p->lvtbl;
16897 NODE *outer = local->numparam.outer;
16898 NODE *inner = local->numparam.inner;
16899 if (outer || inner) {
16900 NODE *used = outer ? outer : inner;
16901 compile_error(p, "numbered parameter is already used in\n"
16902 "%s:%d: %s block here",
16904 outer ? "outer" : "inner");
16905 parser_show_error_line(p, &used->nd_loc);
16906 return 1;
16907 }
16908 return 0;
16909}
16910
16911static NODE*
16912gettable(struct parser_params *p, ID id, const YYLTYPE *loc)
16913{
16914 ID *vidp = NULL;
16915 NODE *node;
16916 switch (id) {
16917 case keyword_self:
16918 return NEW_SELF(loc);
16919 case keyword_nil:
16920 return NEW_NIL(loc);
16921 case keyword_true:
16922 return NEW_TRUE(loc);
16923 case keyword_false:
16924 return NEW_FALSE(loc);
16925 case keyword__FILE__:
16926 WARN_LOCATION("__FILE__");
16927 {
16928 VALUE file = p->ruby_sourcefile_string;
16929 if (NIL_P(file))
16930 file = rb_str_new(0, 0);
16931 else
16932 file = rb_str_dup(file);
16933 node = NEW_STR(file, loc);
16934 RB_OBJ_WRITTEN(p->ast, Qnil, file);
16935 }
16936 return node;
16937 case keyword__LINE__:
16938 WARN_LOCATION("__LINE__");
16939 return NEW_LIT(INT2FIX(p->tokline), loc);
16941 node = NEW_LIT(rb_enc_from_encoding(p->enc), loc);
16942 RB_OBJ_WRITTEN(p->ast, Qnil, node->nd_lit);
16943 return node;
16944
16945 }
16946 switch (id_type(id)) {
16947 case ID_LOCAL:
16948 if (dyna_in_block(p) && dvar_defined_ref(p, id, &vidp)) {
16949 if (NUMPARAM_ID_P(id) && numparam_nested_p(p)) return 0;
16950 if (id == p->cur_arg) {
16951 compile_error(p, "circular argument reference - %"PRIsWARN, rb_id2str(id));
16952 return 0;
16953 }
16954 if (vidp) *vidp |= LVAR_USED;
16955 node = NEW_DVAR(id, loc);
16956 return node;
16957 }
16958 if (local_id_ref(p, id, &vidp)) {
16959 if (id == p->cur_arg) {
16960 compile_error(p, "circular argument reference - %"PRIsWARN, rb_id2str(id));
16961 return 0;
16962 }
16963 if (vidp) *vidp |= LVAR_USED;
16964 node = NEW_LVAR(id, loc);
16965 return node;
16966 }
16967 if (dyna_in_block(p) && NUMPARAM_ID_P(id) &&
16968 parser_numbered_param(p, NUMPARAM_ID_TO_IDX(id))) {
16969 if (numparam_nested_p(p)) return 0;
16970 node = NEW_DVAR(id, loc);
16971 struct local_vars *local = p->lvtbl;
16972 if (!local->numparam.current) local->numparam.current = node;
16973 return node;
16974 }
16975# if WARN_PAST_SCOPE
16976 if (!p->in_defined && RTEST(ruby_verbose) && past_dvar_p(p, id)) {
16977 rb_warning1("possible reference to past scope - %"PRIsWARN, rb_id2str(id));
16978 }
16979# endif
16980 /* method call without arguments */
16981 return NEW_VCALL(id, loc);
16982 case ID_GLOBAL:
16983 return NEW_GVAR(id, loc);
16984 case ID_INSTANCE:
16985 return NEW_IVAR(id, loc);
16986 case ID_CONST:
16987 return NEW_CONST(id, loc);
16988 case ID_CLASS:
16989 return NEW_CVAR(id, loc);
16990 }
16991 compile_error(p, "identifier %"PRIsVALUE" is not valid to get", rb_id2str(id));
16992 return 0;
16993}
16994
16995static NODE *
16996opt_arg_append(NODE *opt_list, NODE *opt)
16997{
16998 NODE *opts = opt_list;
16999 opts->nd_loc.end_pos = opt->nd_loc.end_pos;
17000
17001 while (opts->nd_next) {
17002 opts = opts->nd_next;
17003 opts->nd_loc.end_pos = opt->nd_loc.end_pos;
17004 }
17005 opts->nd_next = opt;
17006
17007 return opt_list;
17008}
17009
17010static NODE *
17011kwd_append(NODE *kwlist, NODE *kw)
17012{
17013 if (kwlist) {
17014 NODE *kws = kwlist;
17015 kws->nd_loc.end_pos = kw->nd_loc.end_pos;
17016 while (kws->nd_next) {
17017 kws = kws->nd_next;
17018 kws->nd_loc.end_pos = kw->nd_loc.end_pos;
17019 }
17020 kws->nd_next = kw;
17021 }
17022 return kwlist;
17023}
17024
17025static NODE *
17026new_defined(struct parser_params *p, NODE *expr, const YYLTYPE *loc)
17027{
17028 return NEW_DEFINED(remove_begin_all(expr), loc);
17029}
17030
17031static NODE*
17032symbol_append(struct parser_params *p, NODE *symbols, NODE *symbol)
17033{
17034 if (nd_type(symbol) == NODE_DSTR) {
17035 nd_set_type(symbol, NODE_DSYM);
17036 }
17037 else {
17038 nd_set_type(symbol, NODE_LIT);
17039 RB_OBJ_WRITTEN(p->ast, Qnil, symbol->nd_lit = rb_str_intern(symbol->nd_lit));
17040 }
17041 return list_append(p, symbols, symbol);
17042}
17043
17044static NODE *
17045new_regexp(struct parser_params *p, NODE *node, int options, const YYLTYPE *loc)
17046{
17047 NODE *list, *prev;
17048 VALUE lit;
17049
17050 if (!node) {
17051 node = NEW_LIT(reg_compile(p, STR_NEW0(), options), loc);
17052 RB_OBJ_WRITTEN(p->ast, Qnil, node->nd_lit);
17053 return node;
17054 }
17055 switch (nd_type(node)) {
17056 case NODE_STR:
17057 {
17058 VALUE src = node->nd_lit;
17059 nd_set_type(node, NODE_LIT);
17060 nd_set_loc(node, loc);
17061 RB_OBJ_WRITTEN(p->ast, Qnil, node->nd_lit = reg_compile(p, src, options));
17062 }
17063 break;
17064 default:
17065 lit = STR_NEW0();
17066 node = NEW_NODE(NODE_DSTR, lit, 1, NEW_LIST(node, loc), loc);
17067 RB_OBJ_WRITTEN(p->ast, Qnil, lit);
17068 /* fall through */
17069 case NODE_DSTR:
17070 nd_set_type(node, NODE_DREGX);
17071 nd_set_loc(node, loc);
17072 node->nd_cflag = options & RE_OPTION_MASK;
17073 if (!NIL_P(node->nd_lit)) reg_fragment_check(p, node->nd_lit, options);
17074 for (list = (prev = node)->nd_next; list; list = list->nd_next) {
17075 if (nd_type(list->nd_head) == NODE_STR) {
17076 VALUE tail = list->nd_head->nd_lit;
17077 if (reg_fragment_check(p, tail, options) && prev && !NIL_P(prev->nd_lit)) {
17078 VALUE lit = prev == node ? prev->nd_lit : prev->nd_head->nd_lit;
17079 if (!literal_concat0(p, lit, tail)) {
17080 return NEW_NIL(loc); /* dummy node on error */
17081 }
17082 rb_str_resize(tail, 0);
17083 prev->nd_next = list->nd_next;
17084 rb_discard_node(p, list->nd_head);
17085 rb_discard_node(p, list);
17086 list = prev;
17087 }
17088 else {
17089 prev = list;
17090 }
17091 }
17092 else {
17093 prev = 0;
17094 }
17095 }
17096 if (!node->nd_next) {
17097 VALUE src = node->nd_lit;
17098 nd_set_type(node, NODE_LIT);
17099 RB_OBJ_WRITTEN(p->ast, Qnil, node->nd_lit = reg_compile(p, src, options));
17100 }
17101 if (options & RE_OPTION_ONCE) {
17102 node = NEW_NODE(NODE_ONCE, 0, node, 0, loc);
17103 }
17104 break;
17105 }
17106 return node;
17107}
17108
17109static NODE *
17110new_kw_arg(struct parser_params *p, NODE *k, const YYLTYPE *loc)
17111{
17112 if (!k) return 0;
17113 return NEW_KW_ARG(0, (k), loc);
17114}
17115
17116static NODE *
17117new_xstring(struct parser_params *p, NODE *node, const YYLTYPE *loc)
17118{
17119 if (!node) {
17120 VALUE lit = STR_NEW0();
17121 NODE *xstr = NEW_XSTR(lit, loc);
17122 RB_OBJ_WRITTEN(p->ast, Qnil, lit);
17123 return xstr;
17124 }
17125 switch (nd_type(node)) {
17126 case NODE_STR:
17127 nd_set_type(node, NODE_XSTR);
17128 nd_set_loc(node, loc);
17129 break;
17130 case NODE_DSTR:
17131 nd_set_type(node, NODE_DXSTR);
17132 nd_set_loc(node, loc);
17133 break;
17134 default:
17135 node = NEW_NODE(NODE_DXSTR, Qnil, 1, NEW_LIST(node, loc), loc);
17136 break;
17137 }
17138 return node;
17139}
17140
17141static void
17142check_literal_when(struct parser_params *p, NODE *arg, const YYLTYPE *loc)
17143{
17144 VALUE lit;
17145
17146 if (!arg || !p->case_labels) return;
17147
17149 if (lit == Qundef) return;
17150 if (nd_type(arg) == NODE_STR) {
17151 RB_OBJ_WRITTEN(p->ast, Qnil, arg->nd_lit = lit);
17152 }
17153
17154 if (NIL_P(p->case_labels)) {
17156 }
17157 else {
17158 VALUE line = rb_hash_lookup(p->case_labels, lit);
17159 if (!NIL_P(line)) {
17160 rb_warning1("duplicated `when' clause with line %d is ignored",
17161 WARN_IVAL(line));
17162 return;
17163 }
17164 }
17166}
17167
17168#else /* !RIPPER */
17169static int
17170id_is_var(struct parser_params *p, ID id)
17171{
17172 if (is_notop_id(id)) {
17173 switch (id & ID_SCOPE_MASK) {
17174 case ID_GLOBAL: case ID_INSTANCE: case ID_CONST: case ID_CLASS:
17175 return 1;
17176 case ID_LOCAL:
17177 if (dyna_in_block(p)) {
17178 if (NUMPARAM_ID_P(id) || dvar_defined(p, id)) return 1;
17179 }
17180 if (local_id(p, id)) return 1;
17181 /* method call without arguments */
17182 return 0;
17183 }
17184 }
17185 compile_error(p, "identifier %"PRIsVALUE" is not valid to get", rb_id2str(id));
17186 return 0;
17187}
17188
17189static VALUE
17190new_regexp(struct parser_params *p, VALUE re, VALUE opt, const YYLTYPE *loc)
17191{
17192 VALUE src = 0, err;
17193 int options = 0;
17194 if (ripper_is_node_yylval(re)) {
17195 src = RNODE(re)->nd_cval;
17196 re = RNODE(re)->nd_rval;
17197 }
17198 if (ripper_is_node_yylval(opt)) {
17199 options = (int)RNODE(opt)->nd_tag;
17200 opt = RNODE(opt)->nd_rval;
17201 }
17202 if (src && NIL_P(parser_reg_compile(p, src, options, &err))) {
17203 compile_error(p, "%"PRIsVALUE, err);
17204 }
17205 return dispatch2(regexp_literal, re, opt);
17206}
17207#endif /* !RIPPER */
17208
17209
17210#ifndef RIPPER
17211static const char rb_parser_lex_state_names[][8] = {
17212 "BEG", "END", "ENDARG", "ENDFN", "ARG",
17213 "CMDARG", "MID", "FNAME", "DOT", "CLASS",
17214 "LABEL", "LABELED","FITEM",
17215};
17216
17217static VALUE
17218append_lex_state_name(enum lex_state_e state, VALUE buf)
17219{
17220 int i, sep = 0;
17221 unsigned int mask = 1;
17222 static const char none[] = "NONE";
17223
17224 for (i = 0; i < EXPR_MAX_STATE; ++i, mask <<= 1) {
17225 if ((unsigned)state & mask) {
17226 if (sep) {
17227 rb_str_cat(buf, "|", 1);
17228 }
17229 sep = 1;
17230 rb_str_cat_cstr(buf, rb_parser_lex_state_names[i]);
17231 }
17232 }
17233 if (!sep) {
17234 rb_str_cat(buf, none, sizeof(none)-1);
17235 }
17236 return buf;
17237}
17238
17239static void
17240flush_debug_buffer(struct parser_params *p, VALUE out, VALUE str)
17241{
17242 VALUE mesg = p->debug_buffer;
17243
17244 if (!NIL_P(mesg) && RSTRING_LEN(mesg)) {
17245 p->debug_buffer = Qnil;
17246 rb_io_puts(1, &mesg, out);
17247 }
17248 if (!NIL_P(str) && RSTRING_LEN(str)) {
17250 }
17251}
17252
17253enum lex_state_e
17255 enum lex_state_e to, int line)
17256{
17257 VALUE mesg;
17258 mesg = rb_str_new_cstr("lex_state: ");
17259 append_lex_state_name(from, mesg);
17260 rb_str_cat_cstr(mesg, " -> ");
17261 append_lex_state_name(to, mesg);
17262 rb_str_catf(mesg, " at line %d\n", line);
17263 flush_debug_buffer(p, p->debug_output, mesg);
17264 return to;
17265}
17266
17267VALUE
17269{
17270 return rb_fstring(append_lex_state_name(state, rb_str_new(0, 0)));
17271}
17272
17273static void
17274append_bitstack_value(stack_type stack, VALUE mesg)
17275{
17276 if (stack == 0) {
17277 rb_str_cat_cstr(mesg, "0");
17278 }
17279 else {
17280 stack_type mask = (stack_type)1U << (CHAR_BIT * sizeof(stack_type) - 1);
17281 for (; mask && !(stack & mask); mask >>= 1) continue;
17282 for (; mask; mask >>= 1) rb_str_cat(mesg, stack & mask ? "1" : "0", 1);
17283 }
17284}
17285
17286void
17288 const char *name, int line)
17289{
17290 VALUE mesg = rb_sprintf("%s: ", name);
17291 append_bitstack_value(stack, mesg);
17292 rb_str_catf(mesg, " at line %d\n", line);
17293 flush_debug_buffer(p, p->debug_output, mesg);
17294}
17295
17296void
17297rb_parser_fatal(struct parser_params *p, const char *fmt, ...)
17298{
17299 va_list ap;
17300 VALUE mesg = rb_str_new_cstr("internal parser error: ");
17301
17302 va_start(ap, fmt);
17303 rb_str_vcatf(mesg, fmt, ap);
17304 va_end(ap);
17305 parser_yyerror(p, NULL, RSTRING_PTR(mesg));
17306 RB_GC_GUARD(mesg);
17307
17308 mesg = rb_str_new(0, 0);
17309 append_lex_state_name(p->lex.state, mesg);
17310 compile_error(p, "lex.state: %"PRIsVALUE, mesg);
17311 rb_str_resize(mesg, 0);
17312 append_bitstack_value(p->cond_stack, mesg);
17313 compile_error(p, "cond_stack: %"PRIsVALUE, mesg);
17314 rb_str_resize(mesg, 0);
17315 append_bitstack_value(p->cmdarg_stack, mesg);
17316 compile_error(p, "cmdarg_stack: %"PRIsVALUE, mesg);
17317 if (p->debug_output == rb_stdout)
17319 p->debug = TRUE;
17320}
17321
17322YYLTYPE *
17324{
17325 int sourceline = here->sourceline;
17326 int beg_pos = (int)here->offset - here->quote
17327 - (rb_strlen_lit("<<-") - !(here->func & STR_FUNC_INDENT));
17328 int end_pos = (int)here->offset + here->length + here->quote;
17329
17330 yylloc->beg_pos.lineno = sourceline;
17331 yylloc->beg_pos.column = beg_pos;
17332 yylloc->end_pos.lineno = sourceline;
17333 yylloc->end_pos.column = end_pos;
17334 return yylloc;
17335}
17336
17337YYLTYPE *
17339{
17340 yylloc->beg_pos.lineno = p->ruby_sourceline;
17341 yylloc->beg_pos.column = (int)(p->lex.ptok - p->lex.pbeg);
17342 yylloc->end_pos.lineno = p->ruby_sourceline;
17343 yylloc->end_pos.column = (int)(p->lex.ptok - p->lex.pbeg);
17344 return yylloc;
17345}
17346
17347YYLTYPE *
17349{
17350 yylloc->beg_pos.lineno = p->ruby_sourceline;
17351 yylloc->beg_pos.column = (int)(p->lex.ptok - p->lex.pbeg);
17352 yylloc->end_pos.lineno = p->ruby_sourceline;
17353 yylloc->end_pos.column = (int)(p->lex.pcur - p->lex.pbeg);
17354 return yylloc;
17355}
17356#endif /* !RIPPER */
17357
17358static void
17359parser_token_value_print(struct parser_params *p, enum yytokentype type, const YYSTYPE *valp)
17360{
17361 VALUE v;
17362
17363 switch (type) {
17364 case tIDENTIFIER: case tFID: case tGVAR: case tIVAR:
17365 case tCONSTANT: case tCVAR: case tLABEL: case tOP_ASGN:
17366#ifndef RIPPER
17367 v = rb_id2str(valp->id);
17368#else
17369 v = valp->node->nd_rval;
17370#endif
17372 break;
17373 case tINTEGER: case tFLOAT: case tRATIONAL: case tIMAGINARY:
17374 case tSTRING_CONTENT: case tCHAR:
17375#ifndef RIPPER
17376 v = valp->node->nd_lit;
17377#else
17378 v = valp->val;
17379#endif
17380 rb_parser_printf(p, "%+"PRIsVALUE, v);
17381 break;
17382 case tNTH_REF:
17383#ifndef RIPPER
17384 rb_parser_printf(p, "$%ld", valp->node->nd_nth);
17385#else
17386 rb_parser_printf(p, "%"PRIsVALUE, valp->val);
17387#endif
17388 break;
17389 case tBACK_REF:
17390#ifndef RIPPER
17391 rb_parser_printf(p, "$%c", (int)valp->node->nd_nth);
17392#else
17393 rb_parser_printf(p, "%"PRIsVALUE, valp->val);
17394#endif
17395 break;
17396 default:
17397 break;
17398 }
17399}
17400
17401static int
17402assignable0(struct parser_params *p, ID id, const char **err)
17403{
17404 if (!id) return -1;
17405 switch (id) {
17406 case keyword_self:
17407 *err = "Can't change the value of self";
17408 return -1;
17409 case keyword_nil:
17410 *err = "Can't assign to nil";
17411 return -1;
17412 case keyword_true:
17413 *err = "Can't assign to true";
17414 return -1;
17415 case keyword_false:
17416 *err = "Can't assign to false";
17417 return -1;
17418 case keyword__FILE__:
17419 *err = "Can't assign to __FILE__";
17420 return -1;
17421 case keyword__LINE__:
17422 *err = "Can't assign to __LINE__";
17423 return -1;
17425 *err = "Can't assign to __ENCODING__";
17426 return -1;
17427 }
17428 switch (id_type(id)) {
17429 case ID_LOCAL:
17430 if (dyna_in_block(p)) {
17431 if (p->max_numparam > NO_PARAM && NUMPARAM_ID_P(id)) {
17432 compile_error(p, "Can't assign to numbered parameter _%d",
17433 NUMPARAM_ID_TO_IDX(id));
17434 return -1;
17435 }
17436 if (dvar_curr(p, id)) return NODE_DASGN_CURR;
17437 if (dvar_defined(p, id)) return NODE_DASGN;
17438 if (local_id(p, id)) return NODE_LASGN;
17439 dyna_var(p, id);
17440 return NODE_DASGN_CURR;
17441 }
17442 else {
17443 if (!local_id(p, id)) local_var(p, id);
17444 return NODE_LASGN;
17445 }
17446 break;
17447 case ID_GLOBAL: return NODE_GASGN;
17448 case ID_INSTANCE: return NODE_IASGN;
17449 case ID_CONST:
17450 if (!p->in_def) return NODE_CDECL;
17451 *err = "dynamic constant assignment";
17452 return -1;
17453 case ID_CLASS: return NODE_CVASGN;
17454 default:
17455 compile_error(p, "identifier %"PRIsVALUE" is not valid to set", rb_id2str(id));
17456 }
17457 return -1;
17458}
17459
17460#ifndef RIPPER
17461static NODE*
17462assignable(struct parser_params *p, ID id, NODE *val, const YYLTYPE *loc)
17463{
17464 const char *err = 0;
17465 int node_type = assignable0(p, id, &err);
17466 switch (node_type) {
17467 case NODE_DASGN_CURR: return NEW_DASGN_CURR(id, val, loc);
17468 case NODE_DASGN: return NEW_DASGN(id, val, loc);
17469 case NODE_LASGN: return NEW_LASGN(id, val, loc);
17470 case NODE_GASGN: return NEW_GASGN(id, val, loc);
17471 case NODE_IASGN: return NEW_IASGN(id, val, loc);
17472 case NODE_CDECL: return NEW_CDECL(id, val, 0, loc);
17473 case NODE_CVASGN: return NEW_CVASGN(id, val, loc);
17474 }
17475 if (err) yyerror1(loc, err);
17476 return NEW_BEGIN(0, loc);
17477}
17478#else
17479static VALUE
17480assignable(struct parser_params *p, VALUE lhs)
17481{
17482 const char *err = 0;
17483 assignable0(p, get_id(lhs), &err);
17484 if (err) lhs = assign_error(p, lhs);
17485 return lhs;
17486}
17487#endif
17488
17489static int
17490is_private_local_id(ID name)
17491{
17492 VALUE s;
17493 if (name == idUScore) return 1;
17494 if (!is_local_id(name)) return 0;
17495 s = rb_id2str(name);
17496 if (!s) return 0;
17497 return RSTRING_PTR(s)[0] == '_';
17498}
17499
17500static int
17501shadowing_lvar_0(struct parser_params *p, ID name)
17502{
17503 if (is_private_local_id(name)) return 1;
17504 if (dyna_in_block(p)) {
17505 if (dvar_curr(p, name)) {
17506 yyerror0("duplicated argument name");
17507 }
17508 else if (dvar_defined(p, name) || local_id(p, name)) {
17509 vtable_add(p->lvtbl->vars, name);
17510 if (p->lvtbl->used) {
17512 }
17513 return 0;
17514 }
17515 }
17516 else {
17517 if (local_id(p, name)) {
17518 yyerror0("duplicated argument name");
17519 }
17520 }
17521 return 1;
17522}
17523
17524static ID
17525shadowing_lvar(struct parser_params *p, ID name)
17526{
17527 shadowing_lvar_0(p, name);
17528 return name;
17529}
17530
17531static void
17532new_bv(struct parser_params *p, ID name)
17533{
17534 if (!name) return;
17535 if (!is_local_id(name)) {
17536 compile_error(p, "invalid local variable - %"PRIsVALUE,
17537 rb_id2str(name));
17538 return;
17539 }
17540 if (!shadowing_lvar_0(p, name)) return;
17541 dyna_var(p, name);
17542}
17543
17544#ifndef RIPPER
17545static NODE *
17546aryset(struct parser_params *p, NODE *recv, NODE *idx, const YYLTYPE *loc)
17547{
17548 return NEW_ATTRASGN(recv, tASET, idx, loc);
17549}
17550
17551static void
17552block_dup_check(struct parser_params *p, NODE *node1, NODE *node2)
17553{
17554 if (node2 && node1 && nd_type(node1) == NODE_BLOCK_PASS) {
17555 compile_error(p, "both block arg and actual block given");
17556 }
17557}
17558
17559static NODE *
17560attrset(struct parser_params *p, NODE *recv, ID atype, ID id, const YYLTYPE *loc)
17561{
17562 if (!CALL_Q_P(atype)) id = rb_id_attrset(id);
17563 return NEW_ATTRASGN(recv, id, 0, loc);
17564}
17565
17566static void
17567rb_backref_error(struct parser_params *p, NODE *node)
17568{
17569 switch (nd_type(node)) {
17570 case NODE_NTH_REF:
17571 compile_error(p, "Can't set variable $%ld", node->nd_nth);
17572 break;
17573 case NODE_BACK_REF:
17574 compile_error(p, "Can't set variable $%c", (int)node->nd_nth);
17575 break;
17576 }
17577}
17578
17579static NODE *
17580arg_append(struct parser_params *p, NODE *node1, NODE *node2, const YYLTYPE *loc)
17581{
17582 if (!node1) return NEW_LIST(node2, &node2->nd_loc);
17583 switch (nd_type(node1)) {
17584 case NODE_LIST:
17585 return list_append(p, node1, node2);
17586 case NODE_BLOCK_PASS:
17587 node1->nd_head = arg_append(p, node1->nd_head, node2, loc);
17588 node1->nd_loc.end_pos = node1->nd_head->nd_loc.end_pos;
17589 return node1;
17590 case NODE_ARGSPUSH:
17591 node1->nd_body = list_append(p, NEW_LIST(node1->nd_body, &node1->nd_body->nd_loc), node2);
17592 node1->nd_loc.end_pos = node1->nd_body->nd_loc.end_pos;
17593 nd_set_type(node1, NODE_ARGSCAT);
17594 return node1;
17595 case NODE_ARGSCAT:
17596 if (nd_type(node1->nd_body) != NODE_LIST) break;
17597 node1->nd_body = list_append(p, node1->nd_body, node2);
17598 node1->nd_loc.end_pos = node1->nd_body->nd_loc.end_pos;
17599 return node1;
17600 }
17601 return NEW_ARGSPUSH(node1, node2, loc);
17602}
17603
17604static NODE *
17605arg_concat(struct parser_params *p, NODE *node1, NODE *node2, const YYLTYPE *loc)
17606{
17607 if (!node2) return node1;
17608 switch (nd_type(node1)) {
17609 case NODE_BLOCK_PASS:
17610 if (node1->nd_head)
17611 node1->nd_head = arg_concat(p, node1->nd_head, node2, loc);
17612 else
17613 node1->nd_head = NEW_LIST(node2, loc);
17614 return node1;
17615 case NODE_ARGSPUSH:
17616 if (nd_type(node2) != NODE_LIST) break;
17617 node1->nd_body = list_concat(NEW_LIST(node1->nd_body, loc), node2);
17618 nd_set_type(node1, NODE_ARGSCAT);
17619 return node1;
17620 case NODE_ARGSCAT:
17621 if (nd_type(node2) != NODE_LIST ||
17622 nd_type(node1->nd_body) != NODE_LIST) break;
17623 node1->nd_body = list_concat(node1->nd_body, node2);
17624 return node1;
17625 }
17626 return NEW_ARGSCAT(node1, node2, loc);
17627}
17628
17629static NODE *
17630last_arg_append(struct parser_params *p, NODE *args, NODE *last_arg, const YYLTYPE *loc)
17631{
17632 NODE *n1;
17633 if ((n1 = splat_array(args)) != 0) {
17634 return list_append(p, n1, last_arg);
17635 }
17636 return arg_append(p, args, last_arg, loc);
17637}
17638
17639static NODE *
17640rest_arg_append(struct parser_params *p, NODE *args, NODE *rest_arg, const YYLTYPE *loc)
17641{
17642 NODE *n1;
17643 if ((nd_type(rest_arg) == NODE_LIST) && (n1 = splat_array(args)) != 0) {
17644 return list_concat(n1, rest_arg);
17645 }
17646 return arg_concat(p, args, rest_arg, loc);
17647}
17648
17649static NODE *
17650splat_array(NODE* node)
17651{
17652 if (nd_type(node) == NODE_SPLAT) node = node->nd_head;
17653 if (nd_type(node) == NODE_LIST) return node;
17654 return 0;
17655}
17656
17657static void
17658mark_lvar_used(struct parser_params *p, NODE *rhs)
17659{
17660 ID *vidp = NULL;
17661 if (!rhs) return;
17662 switch (nd_type(rhs)) {
17663 case NODE_LASGN:
17664 if (local_id_ref(p, rhs->nd_vid, &vidp)) {
17665 if (vidp) *vidp |= LVAR_USED;
17666 }
17667 break;
17668 case NODE_DASGN:
17669 case NODE_DASGN_CURR:
17670 if (dvar_defined_ref(p, rhs->nd_vid, &vidp)) {
17671 if (vidp) *vidp |= LVAR_USED;
17672 }
17673 break;
17674#if 0
17675 case NODE_MASGN:
17676 for (rhs = rhs->nd_head; rhs; rhs = rhs->nd_next) {
17677 mark_lvar_used(p, rhs->nd_head);
17678 }
17679 break;
17680#endif
17681 }
17682}
17683
17684static NODE *
17685node_assign(struct parser_params *p, NODE *lhs, NODE *rhs, const YYLTYPE *loc)
17686{
17687 if (!lhs) return 0;
17688
17689 switch (nd_type(lhs)) {
17690 case NODE_GASGN:
17691 case NODE_IASGN:
17692 case NODE_LASGN:
17693 case NODE_DASGN:
17694 case NODE_DASGN_CURR:
17695 case NODE_MASGN:
17696 case NODE_CDECL:
17697 case NODE_CVASGN:
17698 lhs->nd_value = rhs;
17699 nd_set_loc(lhs, loc);
17700 break;
17701
17702 case NODE_ATTRASGN:
17703 lhs->nd_args = arg_append(p, lhs->nd_args, rhs, loc);
17704 nd_set_loc(lhs, loc);
17705 break;
17706
17707 default:
17708 /* should not happen */
17709 break;
17710 }
17711
17712 return lhs;
17713}
17714
17715static NODE *
17716value_expr_check(struct parser_params *p, NODE *node)
17717{
17718 NODE *void_node = 0, *vn;
17719
17720 if (!node) {
17721 rb_warning0("empty expression");
17722 }
17723 while (node) {
17724 switch (nd_type(node)) {
17725 case NODE_RETURN:
17726 case NODE_BREAK:
17727 case NODE_NEXT:
17728 case NODE_REDO:
17729 case NODE_RETRY:
17730 return void_node ? void_node : node;
17731
17732 case NODE_CASE3:
17733 if (!node->nd_body || nd_type(node->nd_body) != NODE_IN) {
17734 compile_error(p, "unexpected node");
17735 return NULL;
17736 }
17737 if (node->nd_body->nd_body) {
17738 return NULL;
17739 }
17740 /* single line pattern matching */
17741 return void_node ? void_node : node;
17742
17743 case NODE_BLOCK:
17744 while (node->nd_next) {
17745 node = node->nd_next;
17746 }
17747 node = node->nd_head;
17748 break;
17749
17750 case NODE_BEGIN:
17751 node = node->nd_body;
17752 break;
17753
17754 case NODE_IF:
17755 case NODE_UNLESS:
17756 if (!node->nd_body) {
17757 return NULL;
17758 }
17759 else if (!node->nd_else) {
17760 return NULL;
17761 }
17762 vn = value_expr_check(p, node->nd_body);
17763 if (!vn) return NULL;
17764 if (!void_node) void_node = vn;
17765 node = node->nd_else;
17766 break;
17767
17768 case NODE_AND:
17769 case NODE_OR:
17770 node = node->nd_1st;
17771 break;
17772
17773 case NODE_LASGN:
17774 case NODE_DASGN:
17775 case NODE_DASGN_CURR:
17776 case NODE_MASGN:
17777 mark_lvar_used(p, node);
17778 return NULL;
17779
17780 default:
17781 return NULL;
17782 }
17783 }
17784
17785 return NULL;
17786}
17787
17788static int
17789value_expr_gen(struct parser_params *p, NODE *node)
17790{
17791 NODE *void_node = value_expr_check(p, node);
17792 if (void_node) {
17793 yyerror1(&void_node->nd_loc, "void value expression");
17794 /* or "control never reach"? */
17795 return FALSE;
17796 }
17797 return TRUE;
17798}
17799static void
17800void_expr(struct parser_params *p, NODE *node)
17801{
17802 const char *useless = 0;
17803
17804 if (!RTEST(ruby_verbose)) return;
17805
17806 if (!node || !(node = nd_once_body(node))) return;
17807 switch (nd_type(node)) {
17808 case NODE_OPCALL:
17809 switch (node->nd_mid) {
17810 case '+':
17811 case '-':
17812 case '*':
17813 case '/':
17814 case '%':
17815 case tPOW:
17816 case tUPLUS:
17817 case tUMINUS:
17818 case '|':
17819 case '^':
17820 case '&':
17821 case tCMP:
17822 case '>':
17823 case tGEQ:
17824 case '<':
17825 case tLEQ:
17826 case tEQ:
17827 case tNEQ:
17828 useless = rb_id2name(node->nd_mid);
17829 break;
17830 }
17831 break;
17832
17833 case NODE_LVAR:
17834 case NODE_DVAR:
17835 case NODE_GVAR:
17836 case NODE_IVAR:
17837 case NODE_CVAR:
17838 case NODE_NTH_REF:
17839 case NODE_BACK_REF:
17840 useless = "a variable";
17841 break;
17842 case NODE_CONST:
17843 useless = "a constant";
17844 break;
17845 case NODE_LIT:
17846 case NODE_STR:
17847 case NODE_DSTR:
17848 case NODE_DREGX:
17849 useless = "a literal";
17850 break;
17851 case NODE_COLON2:
17852 case NODE_COLON3:
17853 useless = "::";
17854 break;
17855 case NODE_DOT2:
17856 useless = "..";
17857 break;
17858 case NODE_DOT3:
17859 useless = "...";
17860 break;
17861 case NODE_SELF:
17862 useless = "self";
17863 break;
17864 case NODE_NIL:
17865 useless = "nil";
17866 break;
17867 case NODE_TRUE:
17868 useless = "true";
17869 break;
17870 case NODE_FALSE:
17871 useless = "false";
17872 break;
17873 case NODE_DEFINED:
17874 useless = "defined?";
17875 break;
17876 }
17877
17878 if (useless) {
17879 rb_warn1L(nd_line(node), "possibly useless use of %s in void context", WARN_S(useless));
17880 }
17881}
17882
17883static NODE *
17884void_stmts(struct parser_params *p, NODE *node)
17885{
17886 NODE *const n = node;
17887 if (!RTEST(ruby_verbose)) return n;
17888 if (!node) return n;
17889 if (nd_type(node) != NODE_BLOCK) return n;
17890
17891 while (node->nd_next) {
17892 void_expr(p, node->nd_head);
17893 node = node->nd_next;
17894 }
17895 return n;
17896}
17897
17898static NODE *
17899remove_begin(NODE *node)
17900{
17901 NODE **n = &node, *n1 = node;
17902 while (n1 && nd_type(n1) == NODE_BEGIN && n1->nd_body) {
17903 *n = n1 = n1->nd_body;
17904 }
17905 return node;
17906}
17907
17908static NODE *
17909remove_begin_all(NODE *node)
17910{
17911 NODE **n = &node, *n1 = node;
17912 while (n1 && nd_type(n1) == NODE_BEGIN) {
17913 *n = n1 = n1->nd_body;
17914 }
17915 return node;
17916}
17917
17918static void
17919reduce_nodes(struct parser_params *p, NODE **body)
17920{
17921 NODE *node = *body;
17922
17923 if (!node) {
17924 *body = NEW_NIL(&NULL_LOC);
17925 return;
17926 }
17927#define subnodes(n1, n2) \
17928 ((!node->n1) ? (node->n2 ? (body = &node->n2, 1) : 0) : \
17929 (!node->n2) ? (body = &node->n1, 1) : \
17930 (reduce_nodes(p, &node->n1), body = &node->n2, 1))
17931
17932 while (node) {
17933 int newline = (int)(node->flags & NODE_FL_NEWLINE);
17934 switch (nd_type(node)) {
17935 end:
17936 case NODE_NIL:
17937 *body = 0;
17938 return;
17939 case NODE_RETURN:
17940 *body = node = node->nd_stts;
17941 if (newline && node) node->flags |= NODE_FL_NEWLINE;
17942 continue;
17943 case NODE_BEGIN:
17944 *body = node = node->nd_body;
17945 if (newline && node) node->flags |= NODE_FL_NEWLINE;
17946 continue;
17947 case NODE_BLOCK:
17948 body = &node->nd_end->nd_head;
17949 break;
17950 case NODE_IF:
17951 case NODE_UNLESS:
17952 if (subnodes(nd_body, nd_else)) break;
17953 return;
17954 case NODE_CASE:
17955 body = &node->nd_body;
17956 break;
17957 case NODE_WHEN:
17958 if (!subnodes(nd_body, nd_next)) goto end;
17959 break;
17960 case NODE_ENSURE:
17961 if (!subnodes(nd_head, nd_resq)) goto end;
17962 break;
17963 case NODE_RESCUE:
17964 if (node->nd_else) {
17965 body = &node->nd_resq;
17966 break;
17967 }
17968 if (!subnodes(nd_head, nd_resq)) goto end;
17969 break;
17970 default:
17971 return;
17972 }
17973 node = *body;
17974 if (newline && node) node->flags |= NODE_FL_NEWLINE;
17975 }
17976
17977#undef subnodes
17978}
17979
17980static int
17981is_static_content(NODE *node)
17982{
17983 if (!node) return 1;
17984 switch (nd_type(node)) {
17985 case NODE_HASH:
17986 if (!(node = node->nd_head)) break;
17987 case NODE_LIST:
17988 do {
17989 if (!is_static_content(node->nd_head)) return 0;
17990 } while ((node = node->nd_next) != 0);
17991 case NODE_LIT:
17992 case NODE_STR:
17993 case NODE_NIL:
17994 case NODE_TRUE:
17995 case NODE_FALSE:
17996 case NODE_ZLIST:
17997 break;
17998 default:
17999 return 0;
18000 }
18001 return 1;
18002}
18003
18004static int
18005assign_in_cond(struct parser_params *p, NODE *node)
18006{
18007 switch (nd_type(node)) {
18008 case NODE_MASGN:
18009 case NODE_LASGN:
18010 case NODE_DASGN:
18011 case NODE_DASGN_CURR:
18012 case NODE_GASGN:
18013 case NODE_IASGN:
18014 break;
18015
18016 default:
18017 return 0;
18018 }
18019
18020 if (!node->nd_value) return 1;
18021 if (is_static_content(node->nd_value)) {
18022 /* reports always */
18023 parser_warn(p, node->nd_value, "found `= literal' in conditional, should be ==");
18024 }
18025 return 1;
18026}
18027
18033
18034#define SWITCH_BY_COND_TYPE(t, w, arg) \
18035 switch (t) { \
18036 case COND_IN_OP: break; \
18037 case COND_IN_COND: rb_##w##0(arg "literal in condition"); break; \
18038 case COND_IN_FF: rb_##w##0(arg "literal in flip-flop"); break; \
18039 }
18040
18041static NODE *cond0(struct parser_params*,NODE*,enum cond_type,const YYLTYPE*);
18042
18043static NODE*
18044range_op(struct parser_params *p, NODE *node, const YYLTYPE *loc)
18045{
18046 enum node_type type;
18047
18048 if (node == 0) return 0;
18049
18050 type = nd_type(node);
18051 value_expr(node);
18052 if (type == NODE_LIT && FIXNUM_P(node->nd_lit)) {
18053 if (!e_option_supplied(p)) parser_warn(p, node, "integer literal in flip-flop");
18054 return NEW_CALL(node, tEQ, NEW_LIST(NEW_GVAR(rb_intern("$."), loc), loc), loc);
18055 }
18056 return cond0(p, node, COND_IN_FF, loc);
18057}
18058
18059static NODE*
18060cond0(struct parser_params *p, NODE *node, enum cond_type type, const YYLTYPE *loc)
18061{
18062 if (node == 0) return 0;
18063 if (!(node = nd_once_body(node))) return 0;
18064 assign_in_cond(p, node);
18065
18066 switch (nd_type(node)) {
18067 case NODE_DSTR:
18068 case NODE_EVSTR:
18069 case NODE_STR:
18070 SWITCH_BY_COND_TYPE(type, warn, "string ")
18071 break;
18072
18073 case NODE_DREGX:
18074 if (!e_option_supplied(p)) SWITCH_BY_COND_TYPE(type, warning, "regex ")
18075
18076 return NEW_MATCH2(node, NEW_GVAR(idLASTLINE, loc), loc);
18077
18078 case NODE_AND:
18079 case NODE_OR:
18080 node->nd_1st = cond0(p, node->nd_1st, COND_IN_COND, loc);
18081 node->nd_2nd = cond0(p, node->nd_2nd, COND_IN_COND, loc);
18082 break;
18083
18084 case NODE_DOT2:
18085 case NODE_DOT3:
18086 node->nd_beg = range_op(p, node->nd_beg, loc);
18087 node->nd_end = range_op(p, node->nd_end, loc);
18088 if (nd_type(node) == NODE_DOT2) nd_set_type(node,NODE_FLIP2);
18089 else if (nd_type(node) == NODE_DOT3) nd_set_type(node, NODE_FLIP3);
18090 break;
18091
18092 case NODE_DSYM:
18093 SWITCH_BY_COND_TYPE(type, warning, "string ")
18094 break;
18095
18096 case NODE_LIT:
18097 if (RB_TYPE_P(node->nd_lit, T_REGEXP)) {
18098 if (!e_option_supplied(p)) SWITCH_BY_COND_TYPE(type, warn, "regex ")
18099 nd_set_type(node, NODE_MATCH);
18100 }
18101 else if (node->nd_lit == Qtrue ||
18102 node->nd_lit == Qfalse) {
18103 /* booleans are OK, e.g., while true */
18104 }
18105 else {
18106 SWITCH_BY_COND_TYPE(type, warning, "")
18107 }
18108 default:
18109 break;
18110 }
18111 return node;
18112}
18113
18114static NODE*
18115cond(struct parser_params *p, NODE *node, const YYLTYPE *loc)
18116{
18117 if (node == 0) return 0;
18118 return cond0(p, node, COND_IN_COND, loc);
18119}
18120
18121static NODE*
18122method_cond(struct parser_params *p, NODE *node, const YYLTYPE *loc)
18123{
18124 if (node == 0) return 0;
18125 return cond0(p, node, COND_IN_OP, loc);
18126}
18127
18128static NODE*
18129new_if(struct parser_params *p, NODE *cc, NODE *left, NODE *right, const YYLTYPE *loc)
18130{
18131 if (!cc) return right;
18132 cc = cond0(p, cc, COND_IN_COND, loc);
18133 return newline_node(NEW_IF(cc, left, right, loc));
18134}
18135
18136static NODE*
18137new_unless(struct parser_params *p, NODE *cc, NODE *left, NODE *right, const YYLTYPE *loc)
18138{
18139 if (!cc) return right;
18140 cc = cond0(p, cc, COND_IN_COND, loc);
18141 return newline_node(NEW_UNLESS(cc, left, right, loc));
18142}
18143
18144static NODE*
18145logop(struct parser_params *p, ID id, NODE *left, NODE *right,
18146 const YYLTYPE *op_loc, const YYLTYPE *loc)
18147{
18148 enum node_type type = id == idAND || id == idANDOP ? NODE_AND : NODE_OR;
18149 NODE *op;
18150 value_expr(left);
18151 if (left && (enum node_type)nd_type(left) == type) {
18152 NODE *node = left, *second;
18153 while ((second = node->nd_2nd) != 0 && (enum node_type)nd_type(second) == type) {
18154 node = second;
18155 }
18156 node->nd_2nd = NEW_NODE(type, second, right, 0, loc);
18157 nd_set_line(node->nd_2nd, op_loc->beg_pos.lineno);
18158 left->nd_loc.end_pos = loc->end_pos;
18159 return left;
18160 }
18161 op = NEW_NODE(type, left, right, 0, loc);
18162 nd_set_line(op, op_loc->beg_pos.lineno);
18163 return op;
18164}
18165
18166static void
18167no_blockarg(struct parser_params *p, NODE *node)
18168{
18169 if (node && nd_type(node) == NODE_BLOCK_PASS) {
18170 compile_error(p, "block argument should not be given");
18171 }
18172}
18173
18174static NODE *
18175ret_args(struct parser_params *p, NODE *node)
18176{
18177 if (node) {
18178 no_blockarg(p, node);
18179 if (nd_type(node) == NODE_LIST) {
18180 if (node->nd_next == 0) {
18181 node = node->nd_head;
18182 }
18183 else {
18184 nd_set_type(node, NODE_VALUES);
18185 }
18186 }
18187 }
18188 return node;
18189}
18190
18191static NODE *
18192new_yield(struct parser_params *p, NODE *node, const YYLTYPE *loc)
18193{
18194 if (node) no_blockarg(p, node);
18195
18196 return NEW_YIELD(node, loc);
18197}
18198
18199static VALUE
18200negate_lit(struct parser_params *p, VALUE lit)
18201{
18202 if (FIXNUM_P(lit)) {
18203 return LONG2FIX(-FIX2LONG(lit));
18204 }
18205 if (SPECIAL_CONST_P(lit)) {
18206#if USE_FLONUM
18207 if (FLONUM_P(lit)) {
18208 return DBL2NUM(-RFLOAT_VALUE(lit));
18209 }
18210#endif
18211 goto unknown;
18212 }
18213 switch (BUILTIN_TYPE(lit)) {
18214 case T_BIGNUM:
18215 BIGNUM_NEGATE(lit);
18216 lit = rb_big_norm(lit);
18217 break;
18218 case T_RATIONAL:
18219 RRATIONAL_SET_NUM(lit, negate_lit(p, RRATIONAL(lit)->num));
18220 break;
18221 case T_COMPLEX:
18222 RCOMPLEX_SET_REAL(lit, negate_lit(p, RCOMPLEX(lit)->real));
18223 RCOMPLEX_SET_IMAG(lit, negate_lit(p, RCOMPLEX(lit)->imag));
18224 break;
18225 case T_FLOAT:
18226 RFLOAT(lit)->float_value = -RFLOAT_VALUE(lit);
18227 break;
18228 unknown:
18229 default:
18230 rb_parser_fatal(p, "unknown literal type (%s) passed to negate_lit",
18232 break;
18233 }
18234 return lit;
18235}
18236
18237static NODE *
18238arg_blk_pass(NODE *node1, NODE *node2)
18239{
18240 if (node2) {
18241 if (!node1) return node2;
18242 node2->nd_head = node1;
18243 nd_set_first_lineno(node2, nd_first_lineno(node1));
18244 nd_set_first_column(node2, nd_first_column(node1));
18245 return node2;
18246 }
18247 return node1;
18248}
18249
18250static bool
18251args_info_empty_p(struct rb_args_info *args)
18252{
18253 if (args->pre_args_num) return false;
18254 if (args->post_args_num) return false;
18255 if (args->rest_arg) return false;
18256 if (args->opt_args) return false;
18257 if (args->block_arg) return false;
18258 if (args->kw_args) return false;
18259 if (args->kw_rest_arg) return false;
18260 return true;
18261}
18262
18263static NODE*
18264new_args(struct parser_params *p, NODE *pre_args, NODE *opt_args, ID rest_arg, NODE *post_args, NODE *tail, const YYLTYPE *loc)
18265{
18266 int saved_line = p->ruby_sourceline;
18267 struct rb_args_info *args = tail->nd_ainfo;
18268
18269 args->pre_args_num = pre_args ? rb_long2int(pre_args->nd_plen) : 0;
18270 args->pre_init = pre_args ? pre_args->nd_next : 0;
18271
18272 args->post_args_num = post_args ? rb_long2int(post_args->nd_plen) : 0;
18273 args->post_init = post_args ? post_args->nd_next : 0;
18274 args->first_post_arg = post_args ? post_args->nd_pid : 0;
18275
18276 args->rest_arg = rest_arg;
18277
18278 args->opt_args = opt_args;
18279
18281
18282 p->ruby_sourceline = saved_line;
18283 nd_set_loc(tail, loc);
18284
18285 return tail;
18286}
18287
18288static NODE*
18289new_args_tail(struct parser_params *p, NODE *kw_args, ID kw_rest_arg, ID block, const YYLTYPE *loc)
18290{
18291 int saved_line = p->ruby_sourceline;
18292 NODE *node;
18294 struct rb_args_info *args = ZALLOC(struct rb_args_info);
18295 rb_imemo_tmpbuf_set_ptr(tmpbuf, args);
18296 args->imemo = tmpbuf;
18297 node = NEW_NODE(NODE_ARGS, 0, 0, args, &NULL_LOC);
18298 RB_OBJ_WRITTEN(p->ast, Qnil, tmpbuf);
18299 if (p->error_p) return node;
18300
18301 args->block_arg = block;
18302 args->kw_args = kw_args;
18303
18304 if (kw_args) {
18305 /*
18306 * def foo(k1: 1, kr1:, k2: 2, **krest, &b)
18307 * variable order: k1, kr1, k2, &b, internal_id, krest
18308 * #=> <reorder>
18309 * variable order: kr1, k1, k2, internal_id, krest, &b
18310 */
18311 ID kw_bits = internal_id(p), *required_kw_vars, *kw_vars;
18312 struct vtable *vtargs = p->lvtbl->args;
18313 NODE *kwn = kw_args;
18314
18315 vtable_pop(vtargs, !!block + !!kw_rest_arg);
18316 required_kw_vars = kw_vars = &vtargs->tbl[vtargs->pos];
18317 while (kwn) {
18318 if (!NODE_REQUIRED_KEYWORD_P(kwn->nd_body))
18319 --kw_vars;
18320 --required_kw_vars;
18321 kwn = kwn->nd_next;
18322 }
18323
18324 for (kwn = kw_args; kwn; kwn = kwn->nd_next) {
18325 ID vid = kwn->nd_body->nd_vid;
18326 if (NODE_REQUIRED_KEYWORD_P(kwn->nd_body)) {
18327 *required_kw_vars++ = vid;
18328 }
18329 else {
18330 *kw_vars++ = vid;
18331 }
18332 }
18333
18334 arg_var(p, kw_bits);
18335 if (kw_rest_arg) arg_var(p, kw_rest_arg);
18336 if (block) arg_var(p, block);
18337
18338 args->kw_rest_arg = NEW_DVAR(kw_rest_arg, loc);
18339 args->kw_rest_arg->nd_cflag = kw_bits;
18340 }
18341 else if (kw_rest_arg == idNil) {
18342 args->no_kwarg = 1;
18343 }
18344 else if (kw_rest_arg) {
18345 args->kw_rest_arg = NEW_DVAR(kw_rest_arg, loc);
18346 }
18347
18348 p->ruby_sourceline = saved_line;
18349 return node;
18350}
18351
18352static NODE *
18353args_with_numbered(struct parser_params *p, NODE *args, int max_numparam)
18354{
18355 if (max_numparam > NO_PARAM) {
18356 if (!args) {
18357 YYLTYPE loc = RUBY_INIT_YYLLOC();
18358 args = new_args_tail(p, 0, 0, 0, 0);
18359 nd_set_loc(args, &loc);
18360 }
18361 args->nd_ainfo->pre_args_num = max_numparam;
18362 }
18363 return args;
18364}
18365
18366static NODE*
18367new_array_pattern(struct parser_params *p, NODE *constant, NODE *pre_arg, NODE *aryptn, const YYLTYPE *loc)
18368{
18369 struct rb_ary_pattern_info *apinfo = aryptn->nd_apinfo;
18370
18371 aryptn->nd_pconst = constant;
18372
18373 if (pre_arg) {
18374 NODE *pre_args = NEW_LIST(pre_arg, loc);
18375 if (apinfo->pre_args) {
18376 apinfo->pre_args = list_concat(pre_args, apinfo->pre_args);
18377 }
18378 else {
18379 apinfo->pre_args = pre_args;
18380 }
18381 }
18382 return aryptn;
18383}
18384
18385static NODE*
18386new_array_pattern_tail(struct parser_params *p, NODE *pre_args, int has_rest, ID rest_arg, NODE *post_args, const YYLTYPE *loc)
18387{
18388 int saved_line = p->ruby_sourceline;
18389 NODE *node;
18391 struct rb_ary_pattern_info *apinfo = ZALLOC(struct rb_ary_pattern_info);
18392 rb_imemo_tmpbuf_set_ptr(tmpbuf, apinfo);
18393 node = NEW_NODE(NODE_ARYPTN, 0, 0, apinfo, loc);
18394 apinfo->imemo = tmpbuf;
18395 RB_OBJ_WRITTEN(p->ast, Qnil, tmpbuf);
18396
18397 apinfo->pre_args = pre_args;
18398
18399 if (has_rest) {
18400 if (rest_arg) {
18401 apinfo->rest_arg = assignable(p, rest_arg, 0, loc);
18402 }
18403 else {
18405 }
18406 }
18407 else {
18408 apinfo->rest_arg = NULL;
18409 }
18410
18411 apinfo->post_args = post_args;
18412
18413 p->ruby_sourceline = saved_line;
18414 return node;
18415}
18416
18417static NODE*
18418new_hash_pattern(struct parser_params *p, NODE *constant, NODE *hshptn, const YYLTYPE *loc)
18419{
18420 hshptn->nd_pconst = constant;
18421 return hshptn;
18422}
18423
18424static NODE*
18425new_hash_pattern_tail(struct parser_params *p, NODE *kw_args, ID kw_rest_arg, const YYLTYPE *loc)
18426{
18427 int saved_line = p->ruby_sourceline;
18428 NODE *node, *kw_rest_arg_node;
18429
18430 if (kw_rest_arg == idNil) {
18431 kw_rest_arg_node = NODE_SPECIAL_NO_REST_KEYWORD;
18432 }
18433 else if (kw_rest_arg) {
18434 kw_rest_arg_node = assignable(p, kw_rest_arg, 0, loc);
18435 }
18436 else {
18437 kw_rest_arg_node = NULL;
18438 }
18439
18440 node = NEW_NODE(NODE_HSHPTN, 0, kw_args, kw_rest_arg_node, loc);
18441
18442 p->ruby_sourceline = saved_line;
18443 return node;
18444}
18445
18446static NODE *
18447new_case3(struct parser_params *p, NODE *val, NODE *pat, const YYLTYPE *loc)
18448{
18449 NODE *node = NEW_CASE3(val, pat, loc);
18450
18452 rb_warn0L(nd_line(node), "Pattern matching is experimental, and the behavior may change in future versions of Ruby!");
18453 return node;
18454}
18455
18456static NODE*
18457dsym_node(struct parser_params *p, NODE *node, const YYLTYPE *loc)
18458{
18459 VALUE lit;
18460
18461 if (!node) {
18462 return NEW_LIT(ID2SYM(idNULL), loc);
18463 }
18464
18465 switch (nd_type(node)) {
18466 case NODE_DSTR:
18467 nd_set_type(node, NODE_DSYM);
18468 nd_set_loc(node, loc);
18469 break;
18470 case NODE_STR:
18471 lit = node->nd_lit;
18472 RB_OBJ_WRITTEN(p->ast, Qnil, node->nd_lit = ID2SYM(rb_intern_str(lit)));
18473 nd_set_type(node, NODE_LIT);
18474 nd_set_loc(node, loc);
18475 break;
18476 default:
18477 node = NEW_NODE(NODE_DSYM, Qnil, 1, NEW_LIST(node, loc), loc);
18478 break;
18479 }
18480 return node;
18481}
18482
18483static int
18484append_literal_keys(st_data_t k, st_data_t v, st_data_t h)
18485{
18486 NODE *node = (NODE *)v;
18487 NODE **result = (NODE **)h;
18488 node->nd_alen = 2;
18489 node->nd_next->nd_end = node->nd_next;
18490 node->nd_next->nd_next = 0;
18491 if (*result)
18492 list_concat(*result, node);
18493 else
18494 *result = node;
18495 return ST_CONTINUE;
18496}
18497
18498static NODE *
18499remove_duplicate_keys(struct parser_params *p, NODE *hash)
18500{
18501 st_table *literal_keys = st_init_numtable_with_size(hash->nd_alen / 2);
18502 NODE *result = 0;
18503 rb_code_location_t loc = hash->nd_loc;
18504 while (hash && hash->nd_head && hash->nd_next) {
18505 NODE *head = hash->nd_head;
18506 NODE *value = hash->nd_next;
18507 NODE *next = value->nd_next;
18508 VALUE key = (VALUE)head;
18509 st_data_t data;
18510 if (nd_type(head) == NODE_LIT &&
18511 st_lookup(literal_keys, (key = head->nd_lit), &data)) {
18513 "key %+"PRIsVALUE" is duplicated and overwritten on line %d",
18514 head->nd_lit, nd_line(head));
18515 head = ((NODE *)data)->nd_next;
18516 head->nd_head = block_append(p, head->nd_head, value->nd_head);
18517 }
18518 else {
18519 st_insert(literal_keys, (st_data_t)key, (st_data_t)hash);
18520 }
18521 hash = next;
18522 }
18523 st_foreach(literal_keys, append_literal_keys, (st_data_t)&result);
18524 st_free_table(literal_keys);
18525 if (hash) {
18526 if (!result) result = hash;
18527 else list_concat(result, hash);
18528 }
18529 result->nd_loc = loc;
18530 return result;
18531}
18532
18533static NODE *
18534new_hash(struct parser_params *p, NODE *hash, const YYLTYPE *loc)
18535{
18536 if (hash) hash = remove_duplicate_keys(p, hash);
18537 return NEW_HASH(hash, loc);
18538}
18539#endif
18540
18541static void
18542error_duplicate_pattern_variable(struct parser_params *p, ID id, const YYLTYPE *loc)
18543{
18544 if (is_private_local_id(id)) {
18545 return;
18546 }
18547 if (st_is_member(p->pvtbl, id)) {
18548 yyerror1(loc, "duplicated variable name");
18549 }
18550 else {
18551 st_insert(p->pvtbl, (st_data_t)id, 0);
18552 }
18553}
18554
18555static void
18556error_duplicate_pattern_key(struct parser_params *p, VALUE key, const YYLTYPE *loc)
18557{
18558 if (!p->pktbl) {
18559 p->pktbl = st_init_numtable();
18560 }
18561 else if (st_is_member(p->pktbl, key)) {
18562 yyerror1(loc, "duplicated key name");
18563 return;
18564 }
18565 st_insert(p->pktbl, (st_data_t)key, 0);
18566}
18567
18568#ifndef RIPPER
18569static NODE *
18570new_unique_key_hash(struct parser_params *p, NODE *hash, const YYLTYPE *loc)
18571{
18572 return NEW_HASH(hash, loc);
18573}
18574#endif /* !RIPPER */
18575
18576#ifndef RIPPER
18577static NODE *
18578new_op_assign(struct parser_params *p, NODE *lhs, ID op, NODE *rhs, const YYLTYPE *loc)
18579{
18580 NODE *asgn;
18581
18582 if (lhs) {
18583 ID vid = lhs->nd_vid;
18584 YYLTYPE lhs_loc = lhs->nd_loc;
18585 if (op == tOROP) {
18586 lhs->nd_value = rhs;
18587 nd_set_loc(lhs, loc);
18588 asgn = NEW_OP_ASGN_OR(gettable(p, vid, &lhs_loc), lhs, loc);
18589 if (is_notop_id(vid)) {
18590 switch (id_type(vid)) {
18591 case ID_GLOBAL:
18592 case ID_INSTANCE:
18593 case ID_CLASS:
18594 asgn->nd_aid = vid;
18595 }
18596 }
18597 }
18598 else if (op == tANDOP) {
18599 lhs->nd_value = rhs;
18600 nd_set_loc(lhs, loc);
18601 asgn = NEW_OP_ASGN_AND(gettable(p, vid, &lhs_loc), lhs, loc);
18602 }
18603 else {
18604 asgn = lhs;
18605 asgn->nd_value = NEW_CALL(gettable(p, vid, &lhs_loc), op, NEW_LIST(rhs, &rhs->nd_loc), loc);
18606 nd_set_loc(asgn, loc);
18607 }
18608 }
18609 else {
18610 asgn = NEW_BEGIN(0, loc);
18611 }
18612 return asgn;
18613}
18614
18615static NODE *
18616new_ary_op_assign(struct parser_params *p, NODE *ary,
18617 NODE *args, ID op, NODE *rhs, const YYLTYPE *args_loc, const YYLTYPE *loc)
18618{
18619 NODE *asgn;
18620
18621 args = make_list(args, args_loc);
18622 if (nd_type(args) == NODE_BLOCK_PASS) {
18623 args = NEW_ARGSCAT(args, rhs, loc);
18624 }
18625 else {
18626 args = arg_concat(p, args, rhs, loc);
18627 }
18628 asgn = NEW_OP_ASGN1(ary, op, args, loc);
18629 fixpos(asgn, ary);
18630 return asgn;
18631}
18632
18633static NODE *
18634new_attr_op_assign(struct parser_params *p, NODE *lhs,
18635 ID atype, ID attr, ID op, NODE *rhs, const YYLTYPE *loc)
18636{
18637 NODE *asgn;
18638
18639 asgn = NEW_OP_ASGN2(lhs, CALL_Q_P(atype), attr, op, rhs, loc);
18640 fixpos(asgn, lhs);
18641 return asgn;
18642}
18643
18644static NODE *
18645new_const_op_assign(struct parser_params *p, NODE *lhs, ID op, NODE *rhs, const YYLTYPE *loc)
18646{
18647 NODE *asgn;
18648
18649 if (lhs) {
18650 asgn = NEW_OP_CDECL(lhs, op, rhs, loc);
18651 }
18652 else {
18653 asgn = NEW_BEGIN(0, loc);
18654 }
18655 fixpos(asgn, lhs);
18656 return asgn;
18657}
18658
18659static NODE *
18660const_decl(struct parser_params *p, NODE *path, const YYLTYPE *loc)
18661{
18662 if (p->in_def) {
18663 yyerror1(loc, "dynamic constant assignment");
18664 }
18665 return NEW_CDECL(0, 0, (path), loc);
18666}
18667#else
18668static VALUE
18669const_decl(struct parser_params *p, VALUE path)
18670{
18671 if (p->in_def) {
18672 path = dispatch1(assign_error, path);
18673 ripper_error(p);
18674 }
18675 return path;
18676}
18677
18678static VALUE
18679assign_error(struct parser_params *p, VALUE a)
18680{
18681 a = dispatch1(assign_error, a);
18682 ripper_error(p);
18683 return a;
18684}
18685
18686static VALUE
18687var_field(struct parser_params *p, VALUE a)
18688{
18689 return ripper_new_yylval(p, get_id(a), dispatch1(var_field, a), 0);
18690}
18691#endif
18692
18693#ifndef RIPPER
18694static NODE *
18695new_bodystmt(struct parser_params *p, NODE *head, NODE *rescue, NODE *rescue_else, NODE *ensure, const YYLTYPE *loc)
18696{
18697 NODE *result = head;
18698 if (rescue) {
18699 NODE *tmp = rescue_else ? rescue_else : rescue;
18700 YYLTYPE rescue_loc = code_loc_gen(&head->nd_loc, &tmp->nd_loc);
18701
18702 result = NEW_RESCUE(head, rescue, rescue_else, &rescue_loc);
18703 nd_set_line(result, rescue->nd_loc.beg_pos.lineno);
18704 }
18705 else if (rescue_else) {
18706 result = block_append(p, result, rescue_else);
18707 }
18708 if (ensure) {
18709 result = NEW_ENSURE(result, ensure, loc);
18710 }
18711 fixpos(result, head);
18712 return result;
18713}
18714#endif
18715
18716static void
18717warn_unused_var(struct parser_params *p, struct local_vars *local)
18718{
18719 int cnt;
18720
18721 if (!local->used) return;
18722 cnt = local->used->pos;
18723 if (cnt != local->vars->pos) {
18724 rb_parser_fatal(p, "local->used->pos != local->vars->pos");
18725 }
18726#ifndef RIPPER
18727 ID *v = local->vars->tbl;
18728 ID *u = local->used->tbl;
18729 for (int i = 0; i < cnt; ++i) {
18730 if (!v[i] || (u[i] & LVAR_USED)) continue;
18731 if (is_private_local_id(v[i])) continue;
18732 rb_warn1L((int)u[i], "assigned but unused variable - %"PRIsWARN, rb_id2str(v[i]));
18733 }
18734#endif
18735}
18736
18737static void
18738local_push(struct parser_params *p, int toplevel_scope)
18739{
18740 struct local_vars *local;
18741 int inherits_dvars = toplevel_scope && compile_for_eval;
18742 int warn_unused_vars = RTEST(ruby_verbose);
18743
18744 local = ALLOC(struct local_vars);
18745 local->prev = p->lvtbl;
18746 local->args = vtable_alloc(0);
18747 local->vars = vtable_alloc(inherits_dvars ? DVARS_INHERIT : DVARS_TOPSCOPE);
18748#ifndef RIPPER
18749 if (toplevel_scope && compile_for_eval) warn_unused_vars = 0;
18750 if (toplevel_scope && e_option_supplied(p)) warn_unused_vars = 0;
18751 local->numparam.outer = 0;
18752 local->numparam.inner = 0;
18753 local->numparam.current = 0;
18754#endif
18755 local->used = warn_unused_vars ? vtable_alloc(0) : 0;
18756
18757# if WARN_PAST_SCOPE
18758 local->past = 0;
18759# endif
18760 CMDARG_PUSH(0);
18761 COND_PUSH(0);
18762 p->lvtbl = local;
18763}
18764
18765static void
18766local_pop(struct parser_params *p)
18767{
18768 struct local_vars *local = p->lvtbl->prev;
18769 if (p->lvtbl->used) {
18770 warn_unused_var(p, p->lvtbl);
18771 vtable_free(p->lvtbl->used);
18772 }
18773# if WARN_PAST_SCOPE
18774 while (p->lvtbl->past) {
18775 struct vtable *past = p->lvtbl->past;
18776 p->lvtbl->past = past->prev;
18777 vtable_free(past);
18778 }
18779# endif
18780 vtable_free(p->lvtbl->args);
18781 vtable_free(p->lvtbl->vars);
18782 CMDARG_POP();
18783 COND_POP();
18784 ruby_sized_xfree(p->lvtbl, sizeof(*p->lvtbl));
18785 p->lvtbl = local;
18786}
18787
18788#ifndef RIPPER
18789static ID*
18790local_tbl(struct parser_params *p)
18791{
18792 int cnt_args = vtable_size(p->lvtbl->args);
18793 int cnt_vars = vtable_size(p->lvtbl->vars);
18794 int cnt = cnt_args + cnt_vars;
18795 int i, j;
18796 ID *buf;
18797
18798 if (cnt <= 0) return 0;
18799 buf = ALLOC_N(ID, cnt + 2);
18800 MEMCPY(buf+1, p->lvtbl->args->tbl, ID, cnt_args);
18801 /* remove IDs duplicated to warn shadowing */
18802 for (i = 0, j = cnt_args+1; i < cnt_vars; ++i) {
18803 ID id = p->lvtbl->vars->tbl[i];
18804 if (!vtable_included(p->lvtbl->args, id)) {
18805 buf[j++] = id;
18806 }
18807 }
18808 if (--j < cnt) {
18809 REALLOC_N(buf, ID, (cnt = j) + 2);
18810 }
18811 buf[0] = cnt;
18813
18814 return buf;
18815}
18816
18817static NODE*
18818node_newnode_with_locals(struct parser_params *p, enum node_type type, VALUE a1, VALUE a2, const rb_code_location_t *loc)
18819{
18820 ID *a0;
18821 NODE *n;
18822
18823 a0 = local_tbl(p);
18824 n = NEW_NODE(type, a0, a1, a2, loc);
18825 return n;
18826}
18827
18828#endif
18829
18830static void
18831numparam_name(struct parser_params *p, ID id)
18832{
18833 if (!NUMPARAM_ID_P(id)) return;
18834 rb_warn1("`_%d' is reserved for numbered parameter; consider another name",
18836}
18837
18838static void
18839arg_var(struct parser_params *p, ID id)
18840{
18841 numparam_name(p, id);
18842 vtable_add(p->lvtbl->args, id);
18843}
18844
18845static void
18846local_var(struct parser_params *p, ID id)
18847{
18848 numparam_name(p, id);
18849 vtable_add(p->lvtbl->vars, id);
18850 if (p->lvtbl->used) {
18852 }
18853}
18854
18855static int
18856local_id_ref(struct parser_params *p, ID id, ID **vidrefp)
18857{
18858 struct vtable *vars, *args, *used;
18859
18860 vars = p->lvtbl->vars;
18861 args = p->lvtbl->args;
18862 used = p->lvtbl->used;
18863
18864 while (vars && !DVARS_TERMINAL_P(vars->prev)) {
18865 vars = vars->prev;
18866 args = args->prev;
18867 if (used) used = used->prev;
18868 }
18869
18870 if (vars && vars->prev == DVARS_INHERIT) {
18871 return rb_local_defined(id, p->parent_iseq);
18872 }
18873 else if (vtable_included(args, id)) {
18874 return 1;
18875 }
18876 else {
18877 int i = vtable_included(vars, id);
18878 if (i && used && vidrefp) *vidrefp = &used->tbl[i-1];
18879 return i != 0;
18880 }
18881}
18882
18883static int
18884local_id(struct parser_params *p, ID id)
18885{
18886 return local_id_ref(p, id, NULL);
18887}
18888
18889static NODE *
18890numparam_push(struct parser_params *p)
18891{
18892#ifndef RIPPER
18893 struct local_vars *local = p->lvtbl;
18894 NODE *inner = local->numparam.inner;
18895 if (!local->numparam.outer) {
18896 local->numparam.outer = local->numparam.current;
18897 }
18898 local->numparam.inner = 0;
18899 local->numparam.current = 0;
18900 return inner;
18901#else
18902 return 0;
18903#endif
18904}
18905
18906static void
18907numparam_pop(struct parser_params *p, NODE *prev_inner)
18908{
18909#ifndef RIPPER
18910 struct local_vars *local = p->lvtbl;
18911 if (prev_inner) {
18912 /* prefer first one */
18913 local->numparam.inner = prev_inner;
18914 }
18915 else if (local->numparam.current) {
18916 /* current and inner are exclusive */
18917 local->numparam.inner = local->numparam.current;
18918 }
18919 if (p->max_numparam > NO_PARAM) {
18920 /* current and outer are exclusive */
18921 local->numparam.current = local->numparam.outer;
18922 local->numparam.outer = 0;
18923 }
18924 else {
18925 /* no numbered parameter */
18926 local->numparam.current = 0;
18927 }
18928#endif
18929}
18930
18931static const struct vtable *
18932dyna_push(struct parser_params *p)
18933{
18934 p->lvtbl->args = vtable_alloc(p->lvtbl->args);
18935 p->lvtbl->vars = vtable_alloc(p->lvtbl->vars);
18936 if (p->lvtbl->used) {
18937 p->lvtbl->used = vtable_alloc(p->lvtbl->used);
18938 }
18939 return p->lvtbl->args;
18940}
18941
18942static void
18943dyna_pop_vtable(struct parser_params *p, struct vtable **vtblp)
18944{
18945 struct vtable *tmp = *vtblp;
18946 *vtblp = tmp->prev;
18947# if WARN_PAST_SCOPE
18948 if (p->past_scope_enabled) {
18949 tmp->prev = p->lvtbl->past;
18950 p->lvtbl->past = tmp;
18951 return;
18952 }
18953# endif
18954 vtable_free(tmp);
18955}
18956
18957static void
18958dyna_pop_1(struct parser_params *p)
18959{
18960 struct vtable *tmp;
18961
18962 if ((tmp = p->lvtbl->used) != 0) {
18963 warn_unused_var(p, p->lvtbl);
18964 p->lvtbl->used = p->lvtbl->used->prev;
18965 vtable_free(tmp);
18966 }
18967 dyna_pop_vtable(p, &p->lvtbl->args);
18968 dyna_pop_vtable(p, &p->lvtbl->vars);
18969}
18970
18971static void
18972dyna_pop(struct parser_params *p, const struct vtable *lvargs)
18973{
18974 while (p->lvtbl->args != lvargs) {
18975 dyna_pop_1(p);
18976 if (!p->lvtbl->args) {
18977 struct local_vars *local = p->lvtbl->prev;
18978 ruby_sized_xfree(p->lvtbl, sizeof(*p->lvtbl));
18979 p->lvtbl = local;
18980 }
18981 }
18982 dyna_pop_1(p);
18983}
18984
18985static int
18986dyna_in_block(struct parser_params *p)
18987{
18988 return !DVARS_TERMINAL_P(p->lvtbl->vars) && p->lvtbl->vars->prev != DVARS_TOPSCOPE;
18989}
18990
18991static int
18992dvar_defined_ref(struct parser_params *p, ID id, ID **vidrefp)
18993{
18994 struct vtable *vars, *args, *used;
18995 int i;
18996
18997 args = p->lvtbl->args;
18998 vars = p->lvtbl->vars;
18999 used = p->lvtbl->used;
19000
19001 while (!DVARS_TERMINAL_P(vars)) {
19002 if (vtable_included(args, id)) {
19003 return 1;
19004 }
19005 if ((i = vtable_included(vars, id)) != 0) {
19006 if (used && vidrefp) *vidrefp = &used->tbl[i-1];
19007 return 1;
19008 }
19009 args = args->prev;
19010 vars = vars->prev;
19011 if (!vidrefp) used = 0;
19012 if (used) used = used->prev;
19013 }
19014
19015 if (vars == DVARS_INHERIT) {
19016 return rb_dvar_defined(id, p->parent_iseq);
19017 }
19018
19019 return 0;
19020}
19021
19022static int
19023dvar_defined(struct parser_params *p, ID id)
19024{
19025 return dvar_defined_ref(p, id, NULL);
19026}
19027
19028static int
19029dvar_curr(struct parser_params *p, ID id)
19030{
19031 return (vtable_included(p->lvtbl->args, id) ||
19032 vtable_included(p->lvtbl->vars, id));
19033}
19034
19035static void
19036reg_fragment_enc_error(struct parser_params* p, VALUE str, int c)
19037{
19038 compile_error(p,
19039 "regexp encoding option '%c' differs from source encoding '%s'",
19041}
19042
19043#ifndef RIPPER
19044int
19046{
19047 int c = RE_OPTION_ENCODING_IDX(options);
19048
19049 if (c) {
19050 int opt, idx;
19051 rb_char_to_option_kcode(c, &opt, &idx);
19052 if (idx != ENCODING_GET(str) &&
19054 goto error;
19055 }
19056 ENCODING_SET(str, idx);
19057 }
19058 else if (RE_OPTION_ENCODING_NONE(options)) {
19059 if (!ENCODING_IS_ASCII8BIT(str) &&
19061 c = 'n';
19062 goto error;
19063 }
19065 }
19066 else if (p->enc == rb_usascii_encoding()) {
19068 /* raise in re.c */
19070 }
19071 else {
19073 }
19074 }
19075 return 0;
19076
19077 error:
19078 return c;
19079}
19080
19081static void
19082reg_fragment_setenc(struct parser_params* p, VALUE str, int options)
19083{
19084 int c = rb_reg_fragment_setenc(p, str, options);
19085 if (c) reg_fragment_enc_error(p, str, c);
19086}
19087
19088static int
19089reg_fragment_check(struct parser_params* p, VALUE str, int options)
19090{
19091 VALUE err;
19092 reg_fragment_setenc(p, str, options);
19094 if (err != Qnil) {
19096 compile_error(p, "%"PRIsVALUE, err);
19097 return 0;
19098 }
19099 return 1;
19100}
19101
19102typedef struct {
19106 const YYLTYPE *loc;
19108
19109static int
19110reg_named_capture_assign_iter(const OnigUChar *name, const OnigUChar *name_end,
19111 int back_num, int *back_refs, OnigRegex regex, void *arg0)
19112{
19114 struct parser_params* p = arg->parser;
19115 rb_encoding *enc = arg->enc;
19116 long len = name_end - name;
19117 const char *s = (const char *)name;
19118 ID var;
19119 NODE *node, *succ;
19120
19121 if (!len) return ST_CONTINUE;
19122 if (rb_enc_symname_type(s, len, enc, (1U<<ID_LOCAL)) != ID_LOCAL)
19123 return ST_CONTINUE;
19124
19125 var = intern_cstr(s, len, enc);
19126 if (len < MAX_WORD_LENGTH && rb_reserved_word(s, (int)len)) {
19127 if (!lvar_defined(p, var)) return ST_CONTINUE;
19128 }
19129 node = node_assign(p, assignable(p, var, 0, arg->loc), NEW_LIT(ID2SYM(var), arg->loc), arg->loc);
19130 succ = arg->succ_block;
19131 if (!succ) succ = NEW_BEGIN(0, arg->loc);
19132 succ = block_append(p, succ, node);
19133 arg->succ_block = succ;
19134 return ST_CONTINUE;
19135}
19136
19137static NODE *
19138reg_named_capture_assign(struct parser_params* p, VALUE regexp, const YYLTYPE *loc)
19139{
19141
19142 arg.parser = p;
19143 arg.enc = rb_enc_get(regexp);
19144 arg.succ_block = 0;
19145 arg.loc = loc;
19146 onig_foreach_name(RREGEXP_PTR(regexp), reg_named_capture_assign_iter, &arg);
19147
19148 if (!arg.succ_block) return 0;
19149 return arg.succ_block->nd_next;
19150}
19151
19152static VALUE
19153parser_reg_compile(struct parser_params* p, VALUE str, int options)
19154{
19155 reg_fragment_setenc(p, str, options);
19156 return rb_parser_reg_compile(p, str, options);
19157}
19158
19159VALUE
19161{
19163}
19164
19165static VALUE
19166reg_compile(struct parser_params* p, VALUE str, int options)
19167{
19168 VALUE re;
19169 VALUE err;
19170
19171 err = rb_errinfo();
19172 re = parser_reg_compile(p, str, options);
19173 if (NIL_P(re)) {
19176 compile_error(p, "%"PRIsVALUE, m);
19177 return Qnil;
19178 }
19179 return re;
19180}
19181#else
19182static VALUE
19183parser_reg_compile(struct parser_params* p, VALUE str, int options, VALUE *errmsg)
19184{
19185 VALUE err = rb_errinfo();
19186 VALUE re;
19187 str = ripper_is_node_yylval(str) ? RNODE(str)->nd_cval : str;
19188 int c = rb_reg_fragment_setenc(p, str, options);
19189 if (c) reg_fragment_enc_error(p, str, c);
19190 re = rb_parser_reg_compile(p, str, options);
19191 if (NIL_P(re)) {
19192 *errmsg = rb_attr_get(rb_errinfo(), idMesg);
19194 }
19195 return re;
19196}
19197#endif
19198
19199#ifndef RIPPER
19200void
19201rb_parser_set_options(VALUE vparser, int print, int loop, int chomp, int split)
19202{
19203 struct parser_params *p;
19204 TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, p);
19205 p->do_print = print;
19206 p->do_loop = loop;
19207 p->do_chomp = chomp;
19208 p->do_split = split;
19209}
19210
19211void
19213{
19214 struct parser_params *p;
19215 TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, p);
19216 p->warn_location = warn;
19217}
19218
19219static NODE *
19220parser_append_options(struct parser_params *p, NODE *node)
19221{
19222 static const YYLTYPE default_location = {{1, 0}, {1, 0}};
19223 const YYLTYPE *const LOC = &default_location;
19224
19225 if (p->do_print) {
19226 NODE *print = NEW_FCALL(rb_intern("print"),
19227 NEW_LIST(NEW_GVAR(idLASTLINE, LOC), LOC),
19228 LOC);
19229 node = block_append(p, node, print);
19230 }
19231
19232 if (p->do_loop) {
19233 if (p->do_split) {
19234 NODE *args = NEW_LIST(NEW_GVAR(rb_intern("$;"), LOC), LOC);
19235 NODE *split = NEW_GASGN(rb_intern("$F"),
19237 rb_intern("split"), args, LOC),
19238 LOC);
19239 node = block_append(p, split, node);
19240 }
19241 if (p->do_chomp) {
19242 NODE *chomp = NEW_CALL(NEW_GVAR(idLASTLINE, LOC),
19243 rb_intern("chomp!"), 0, LOC);
19244 node = block_append(p, chomp, node);
19245 }
19246
19247 node = NEW_WHILE(NEW_VCALL(idGets, LOC), node, 1, LOC);
19248 }
19249
19250 return node;
19251}
19252
19253void
19255{
19256 /* just to suppress unused-function warnings */
19257 (void)nodetype;
19258 (void)nodeline;
19259}
19260
19261static ID
19262internal_id(struct parser_params *p)
19263{
19264 const ID max_id = RB_ID_SERIAL_MAX & ~0xffff;
19265 ID id = (ID)vtable_size(p->lvtbl->args) + (ID)vtable_size(p->lvtbl->vars);
19266 id = max_id - id;
19267 return ID_STATIC_SYM | ID_INTERNAL | (id << ID_SCOPE_SHIFT);
19268}
19269#endif /* !RIPPER */
19270
19271static void
19272parser_initialize(struct parser_params *p)
19273{
19274 /* note: we rely on TypedData_Make_Struct to set most fields to 0 */
19275 p->command_start = TRUE;
19277 p->lex.lpar_beg = -1; /* make lambda_beginning_p() == FALSE at first */
19278 p->node_id = 0;
19279#ifdef RIPPER
19280 p->delayed.token = Qnil;
19281 p->result = Qnil;
19282 p->parsing_thread = Qnil;
19283#else
19284 p->error_buffer = Qfalse;
19285#endif
19286 p->debug_buffer = Qnil;
19288 p->enc = rb_utf8_encoding();
19289}
19290
19291#ifdef RIPPER
19292#define parser_mark ripper_parser_mark
19293#define parser_free ripper_parser_free
19294#endif
19295
19296static void
19297parser_mark(void *ptr)
19298{
19299 struct parser_params *p = (struct parser_params*)ptr;
19300
19301 rb_gc_mark(p->lex.input);
19307 rb_gc_mark((VALUE)p->ast);
19309#ifndef RIPPER
19313#else
19314 rb_gc_mark(p->delayed.token);
19315 rb_gc_mark(p->value);
19316 rb_gc_mark(p->result);
19317 rb_gc_mark(p->parsing_thread);
19318#endif
19321#ifdef YYMALLOC
19322 rb_gc_mark((VALUE)p->heap);
19323#endif
19324}
19325
19326static void
19327parser_free(void *ptr)
19328{
19329 struct parser_params *p = (struct parser_params*)ptr;
19330 struct local_vars *local, *prev;
19331
19332 if (p->tokenbuf) {
19334 }
19335 for (local = p->lvtbl; local; local = prev) {
19336 if (local->vars) xfree(local->vars);
19337 prev = local->prev;
19338 xfree(local);
19339 }
19340 {
19341 token_info *ptinfo;
19342 while ((ptinfo = p->token_info) != 0) {
19343 p->token_info = ptinfo->next;
19344 xfree(ptinfo);
19345 }
19346 }
19347 xfree(ptr);
19348}
19349
19350static size_t
19351parser_memsize(const void *ptr)
19352{
19353 struct parser_params *p = (struct parser_params*)ptr;
19354 struct local_vars *local;
19355 size_t size = sizeof(*p);
19356
19357 size += p->toksiz;
19358 for (local = p->lvtbl; local; local = local->prev) {
19359 size += sizeof(*local);
19360 if (local->vars) size += local->vars->capa * sizeof(ID);
19361 }
19362 return size;
19363}
19364
19365static const rb_data_type_t parser_data_type = {
19366#ifndef RIPPER
19367 "parser",
19368#else
19369 "ripper",
19370#endif
19371 {
19372 parser_mark,
19373 parser_free,
19374 parser_memsize,
19375 },
19377};
19378
19379#ifndef RIPPER
19380#undef rb_reserved_word
19381
19382const struct kwtable *
19383rb_reserved_word(const char *str, unsigned int len)
19384{
19385 return reserved_word(str, len);
19386}
19387
19388VALUE
19390{
19391 struct parser_params *p;
19392 VALUE parser = TypedData_Make_Struct(0, struct parser_params,
19393 &parser_data_type, p);
19394 parser_initialize(p);
19395 return parser;
19396}
19397
19398VALUE
19399rb_parser_set_context(VALUE vparser, const struct rb_iseq_struct *base, int main)
19400{
19401 struct parser_params *p;
19402
19403 TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, p);
19404 p->error_buffer = main ? Qfalse : Qnil;
19405 p->parent_iseq = base;
19406 return vparser;
19407}
19408#endif
19409
19410#ifdef RIPPER
19411#define rb_parser_end_seen_p ripper_parser_end_seen_p
19412#define rb_parser_encoding ripper_parser_encoding
19413#define rb_parser_get_yydebug ripper_parser_get_yydebug
19414#define rb_parser_set_yydebug ripper_parser_set_yydebug
19415#define rb_parser_get_debug_output ripper_parser_get_debug_output
19416#define rb_parser_set_debug_output ripper_parser_set_debug_output
19417static VALUE ripper_parser_end_seen_p(VALUE vparser);
19418static VALUE ripper_parser_encoding(VALUE vparser);
19419static VALUE ripper_parser_get_yydebug(VALUE self);
19420static VALUE ripper_parser_set_yydebug(VALUE self, VALUE flag);
19421static VALUE ripper_parser_get_debug_output(VALUE self);
19422static VALUE ripper_parser_set_debug_output(VALUE self, VALUE output);
19423
19424/*
19425 * call-seq:
19426 * ripper.error? -> Boolean
19427 *
19428 * Return true if parsed source has errors.
19429 */
19430static VALUE
19431ripper_error_p(VALUE vparser)
19432{
19433 struct parser_params *p;
19434
19435 TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, p);
19436 return p->error_p ? Qtrue : Qfalse;
19437}
19438#endif
19439
19440/*
19441 * call-seq:
19442 * ripper.end_seen? -> Boolean
19443 *
19444 * Return true if parsed source ended by +\_\_END\_\_+.
19445 */
19446VALUE
19448{
19449 struct parser_params *p;
19450
19451 TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, p);
19452 return p->ruby__end__seen ? Qtrue : Qfalse;
19453}
19454
19455/*
19456 * call-seq:
19457 * ripper.encoding -> encoding
19458 *
19459 * Return encoding of the source.
19460 */
19461VALUE
19463{
19464 struct parser_params *p;
19465
19466 TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, p);
19467 return rb_enc_from_encoding(p->enc);
19468}
19469
19470#ifdef RIPPER
19471/*
19472 * call-seq:
19473 * ripper.yydebug -> true or false
19474 *
19475 * Get yydebug.
19476 */
19477VALUE
19478rb_parser_get_yydebug(VALUE self)
19479{
19480 struct parser_params *p;
19481
19482 TypedData_Get_Struct(self, struct parser_params, &parser_data_type, p);
19483 return p->debug ? Qtrue : Qfalse;
19484}
19485#endif
19486
19487/*
19488 * call-seq:
19489 * ripper.yydebug = flag
19490 *
19491 * Set yydebug.
19492 */
19493VALUE
19495{
19496 struct parser_params *p;
19497
19498 TypedData_Get_Struct(self, struct parser_params, &parser_data_type, p);
19499 p->debug = RTEST(flag);
19500 return flag;
19501}
19502
19503/*
19504 * call-seq:
19505 * ripper.debug_output -> obj
19506 *
19507 * Get debug output.
19508 */
19509VALUE
19511{
19512 struct parser_params *p;
19513
19514 TypedData_Get_Struct(self, struct parser_params, &parser_data_type, p);
19515 return p->debug_output;
19516}
19517
19518/*
19519 * call-seq:
19520 * ripper.debug_output = obj
19521 *
19522 * Set debug output.
19523 */
19524VALUE
19526{
19527 struct parser_params *p;
19528
19529 TypedData_Get_Struct(self, struct parser_params, &parser_data_type, p);
19530 return p->debug_output = output;
19531}
19532
19533#ifndef RIPPER
19534#ifdef YYMALLOC
19535#define HEAPCNT(n, size) ((n) * (size) / sizeof(YYSTYPE))
19536/* Keep the order; NEWHEAP then xmalloc and ADD2HEAP to get rid of
19537 * potential memory leak */
19538#define NEWHEAP() rb_imemo_tmpbuf_parser_heap(0, p->heap, 0)
19539#define ADD2HEAP(new, cnt, ptr) ((p->heap = (new))->ptr = (ptr), \
19540 (new)->cnt = (cnt), (ptr))
19541
19542void *
19544{
19545 size_t cnt = HEAPCNT(1, size);
19547 void *ptr = xmalloc(size);
19548
19549 return ADD2HEAP(n, cnt, ptr);
19550}
19551
19552void *
19553rb_parser_calloc(struct parser_params *p, size_t nelem, size_t size)
19554{
19555 size_t cnt = HEAPCNT(nelem, size);
19557 void *ptr = xcalloc(nelem, size);
19558
19559 return ADD2HEAP(n, cnt, ptr);
19560}
19561
19562void *
19563rb_parser_realloc(struct parser_params *p, void *ptr, size_t size)
19564{
19566 size_t cnt = HEAPCNT(1, size);
19567
19568 if (ptr && (n = p->heap) != NULL) {
19569 do {
19570 if (n->ptr == ptr) {
19571 n->ptr = ptr = xrealloc(ptr, size);
19572 if (n->cnt) n->cnt = cnt;
19573 return ptr;
19574 }
19575 } while ((n = n->next) != NULL);
19576 }
19577 n = NEWHEAP();
19578 ptr = xrealloc(ptr, size);
19579 return ADD2HEAP(n, cnt, ptr);
19580}
19581
19582void
19584{
19585 rb_imemo_tmpbuf_t **prev = &p->heap, *n;
19586
19587 while ((n = *prev) != NULL) {
19588 if (n->ptr == ptr) {
19589 *prev = n->next;
19591 break;
19592 }
19593 prev = &n->next;
19594 }
19595 xfree(ptr);
19596}
19597#endif
19598
19599void
19600rb_parser_printf(struct parser_params *p, const char *fmt, ...)
19601{
19602 va_list ap;
19603 VALUE mesg = p->debug_buffer;
19604
19605 if (NIL_P(mesg)) p->debug_buffer = mesg = rb_str_new(0, 0);
19606 va_start(ap, fmt);
19607 rb_str_vcatf(mesg, fmt, ap);
19608 va_end(ap);
19609 if (RSTRING_END(mesg)[-1] == '\n') {
19610 rb_io_write(p->debug_output, mesg);
19611 p->debug_buffer = Qnil;
19612 }
19613}
19614
19615static void
19616parser_compile_error(struct parser_params *p, const char *fmt, ...)
19617{
19618 va_list ap;
19619
19621 p->error_p = 1;
19622 va_start(ap, fmt);
19623 p->error_buffer =
19626 p->ruby_sourceline,
19627 rb_long2int(p->lex.pcur - p->lex.pbeg),
19628 p->enc, fmt, ap);
19629 va_end(ap);
19630}
19631
19632static size_t
19633count_char(const char *str, int c)
19634{
19635 int n = 0;
19636 while (str[n] == c) ++n;
19637 return n;
19638}
19639
19640/*
19641 * strip enclosing double-quotes, same as the default yytnamerr except
19642 * for that single-quotes matching back-quotes do not stop stripping.
19643 *
19644 * "\"`class' keyword\"" => "`class' keyword"
19645 */
19646RUBY_FUNC_EXPORTED size_t
19647rb_yytnamerr(struct parser_params *p, char *yyres, const char *yystr)
19648{
19649 if (*yystr == '"') {
19650 size_t yyn = 0, bquote = 0;
19651 const char *yyp = yystr;
19652
19653 while (*++yyp) {
19654 switch (*yyp) {
19655 case '`':
19656 if (!bquote) {
19657 bquote = count_char(yyp+1, '`') + 1;
19658 if (yyres) memcpy(&yyres[yyn], yyp, bquote);
19659 yyn += bquote;
19660 yyp += bquote - 1;
19661 break;
19662 }
19663 goto default_char;
19664
19665 case '\'':
19666 if (bquote && count_char(yyp+1, '\'') + 1 == bquote) {
19667 if (yyres) memcpy(yyres + yyn, yyp, bquote);
19668 yyn += bquote;
19669 yyp += bquote - 1;
19670 bquote = 0;
19671 break;
19672 }
19673 if (yyp[1] && yyp[1] != '\'' && yyp[2] == '\'') {
19674 if (yyres) memcpy(yyres + yyn, yyp, 3);
19675 yyn += 3;
19676 yyp += 2;
19677 break;
19678 }
19679 goto do_not_strip_quotes;
19680
19681 case ',':
19682 goto do_not_strip_quotes;
19683
19684 case '\\':
19685 if (*++yyp != '\\')
19686 goto do_not_strip_quotes;
19687 /* Fall through. */
19688 default_char:
19689 default:
19690 if (yyres)
19691 yyres[yyn] = *yyp;
19692 yyn++;
19693 break;
19694
19695 case '"':
19696 case '\0':
19697 if (yyres)
19698 yyres[yyn] = '\0';
19699 return yyn;
19700 }
19701 }
19702 do_not_strip_quotes: ;
19703 }
19704
19705 if (!yyres) return strlen(yystr);
19706
19707 return (YYSIZE_T)(yystpcpy(yyres, yystr) - yyres);
19708}
19709#endif
19710
19711#ifdef RIPPER
19712#ifdef RIPPER_DEBUG
19713/* :nodoc: */
19714static VALUE
19715ripper_validate_object(VALUE self, VALUE x)
19716{
19717 if (x == Qfalse) return x;
19718 if (x == Qtrue) return x;
19719 if (x == Qnil) return x;
19720 if (x == Qundef)
19721 rb_raise(rb_eArgError, "Qundef given");
19722 if (FIXNUM_P(x)) return x;
19723 if (SYMBOL_P(x)) return x;
19724 switch (BUILTIN_TYPE(x)) {
19725 case T_STRING:
19726 case T_OBJECT:
19727 case T_ARRAY:
19728 case T_BIGNUM:
19729 case T_FLOAT:
19730 case T_COMPLEX:
19731 case T_RATIONAL:
19732 break;
19733 case T_NODE:
19734 if (nd_type((NODE *)x) != NODE_RIPPER) {
19735 rb_raise(rb_eArgError, "NODE given: %p", (void *)x);
19736 }
19737 x = ((NODE *)x)->nd_rval;
19738 break;
19739 default:
19740 rb_raise(rb_eArgError, "wrong type of ruby object: %p (%s)",
19741 (void *)x, rb_obj_classname(x));
19742 }
19743 if (!RBASIC_CLASS(x)) {
19744 rb_raise(rb_eArgError, "hidden ruby object: %p (%s)",
19745 (void *)x, rb_builtin_type_name(TYPE(x)));
19746 }
19747 return x;
19748}
19749#endif
19750
19751#define validate(x) ((x) = get_value(x))
19752
19753static VALUE
19754ripper_dispatch0(struct parser_params *p, ID mid)
19755{
19756 return rb_funcall(p->value, mid, 0);
19757}
19758
19759static VALUE
19760ripper_dispatch1(struct parser_params *p, ID mid, VALUE a)
19761{
19762 validate(a);
19763 return rb_funcall(p->value, mid, 1, a);
19764}
19765
19766static VALUE
19767ripper_dispatch2(struct parser_params *p, ID mid, VALUE a, VALUE b)
19768{
19769 validate(a);
19770 validate(b);
19771 return rb_funcall(p->value, mid, 2, a, b);
19772}
19773
19774static VALUE
19775ripper_dispatch3(struct parser_params *p, ID mid, VALUE a, VALUE b, VALUE c)
19776{
19777 validate(a);
19778 validate(b);
19779 validate(c);
19780 return rb_funcall(p->value, mid, 3, a, b, c);
19781}
19782
19783static VALUE
19784ripper_dispatch4(struct parser_params *p, ID mid, VALUE a, VALUE b, VALUE c, VALUE d)
19785{
19786 validate(a);
19787 validate(b);
19788 validate(c);
19789 validate(d);
19790 return rb_funcall(p->value, mid, 4, a, b, c, d);
19791}
19792
19793static VALUE
19794ripper_dispatch5(struct parser_params *p, ID mid, VALUE a, VALUE b, VALUE c, VALUE d, VALUE e)
19795{
19796 validate(a);
19797 validate(b);
19798 validate(c);
19799 validate(d);
19800 validate(e);
19801 return rb_funcall(p->value, mid, 5, a, b, c, d, e);
19802}
19803
19804static VALUE
19805ripper_dispatch7(struct parser_params *p, ID mid, VALUE a, VALUE b, VALUE c, VALUE d, VALUE e, VALUE f, VALUE g)
19806{
19807 validate(a);
19808 validate(b);
19809 validate(c);
19810 validate(d);
19811 validate(e);
19812 validate(f);
19813 validate(g);
19814 return rb_funcall(p->value, mid, 7, a, b, c, d, e, f, g);
19815}
19816
19817static ID
19818ripper_get_id(VALUE v)
19819{
19820 NODE *nd;
19821 if (!RB_TYPE_P(v, T_NODE)) return 0;
19822 nd = (NODE *)v;
19823 if (nd_type(nd) != NODE_RIPPER) return 0;
19824 return nd->nd_vid;
19825}
19826
19827static VALUE
19828ripper_get_value(VALUE v)
19829{
19830 NODE *nd;
19831 if (v == Qundef) return Qnil;
19832 if (!RB_TYPE_P(v, T_NODE)) return v;
19833 nd = (NODE *)v;
19834 if (nd_type(nd) != NODE_RIPPER) return Qnil;
19835 return nd->nd_rval;
19836}
19837
19838static void
19839ripper_error(struct parser_params *p)
19840{
19841 p->error_p = TRUE;
19842}
19843
19844static void
19845ripper_compile_error(struct parser_params *p, const char *fmt, ...)
19846{
19847 VALUE str;
19848 va_list args;
19849
19850 va_start(args, fmt);
19851 str = rb_vsprintf(fmt, args);
19852 va_end(args);
19853 rb_funcall(p->value, rb_intern("compile_error"), 1, str);
19854 ripper_error(p);
19855}
19856
19857static VALUE
19858ripper_lex_get_generic(struct parser_params *p, VALUE src)
19859{
19860 VALUE line = rb_funcallv_public(src, id_gets, 0, 0);
19861 if (!NIL_P(line) && !RB_TYPE_P(line, T_STRING)) {
19863 "gets returned %"PRIsVALUE" (expected String or nil)",
19864 rb_obj_class(line));
19865 }
19866 return line;
19867}
19868
19869static VALUE
19870ripper_lex_io_get(struct parser_params *p, VALUE src)
19871{
19872 return rb_io_gets(src);
19873}
19874
19875static VALUE
19876ripper_s_allocate(VALUE klass)
19877{
19878 struct parser_params *p;
19880 &parser_data_type, p);
19881 p->value = self;
19882 return self;
19883}
19884
19885#define ripper_initialized_p(r) ((r)->lex.input != 0)
19886
19887/*
19888 * call-seq:
19889 * Ripper.new(src, filename="(ripper)", lineno=1) -> ripper
19890 *
19891 * Create a new Ripper object.
19892 * _src_ must be a String, an IO, or an Object which has #gets method.
19893 *
19894 * This method does not starts parsing.
19895 * See also Ripper#parse and Ripper.parse.
19896 */
19897static VALUE
19898ripper_initialize(int argc, VALUE *argv, VALUE self)
19899{
19900 struct parser_params *p;
19901 VALUE src, fname, lineno;
19902
19903 TypedData_Get_Struct(self, struct parser_params, &parser_data_type, p);
19904 rb_scan_args(argc, argv, "12", &src, &fname, &lineno);
19905 if (RB_TYPE_P(src, T_FILE)) {
19906 p->lex.gets = ripper_lex_io_get;
19907 }
19908 else if (rb_respond_to(src, id_gets)) {
19909 p->lex.gets = ripper_lex_get_generic;
19910 }
19911 else {
19913 p->lex.gets = lex_get_str;
19914 }
19915 p->lex.input = src;
19916 p->eofp = 0;
19917 if (NIL_P(fname)) {
19918 fname = STR_NEW2("(ripper)");
19919 OBJ_FREEZE(fname);
19920 }
19921 else {
19922 StringValueCStr(fname);
19923 fname = rb_str_new_frozen(fname);
19924 }
19925 parser_initialize(p);
19926
19927 p->ruby_sourcefile_string = fname;
19928 p->ruby_sourcefile = RSTRING_PTR(fname);
19929 p->ruby_sourceline = NIL_P(lineno) ? 0 : NUM2INT(lineno) - 1;
19930
19931 return Qnil;
19932}
19933
19934static VALUE
19935ripper_parse0(VALUE parser_v)
19936{
19937 struct parser_params *p;
19938
19939 TypedData_Get_Struct(parser_v, struct parser_params, &parser_data_type, p);
19940 parser_prepare(p);
19941 p->ast = rb_ast_new();
19942 ripper_yyparse((void*)p);
19943 rb_ast_dispose(p->ast);
19944 p->ast = 0;
19945 return p->result;
19946}
19947
19948static VALUE
19949ripper_ensure(VALUE parser_v)
19950{
19951 struct parser_params *p;
19952
19953 TypedData_Get_Struct(parser_v, struct parser_params, &parser_data_type, p);
19954 p->parsing_thread = Qnil;
19955 return Qnil;
19956}
19957
19958/*
19959 * call-seq:
19960 * ripper.parse
19961 *
19962 * Start parsing and returns the value of the root action.
19963 */
19964static VALUE
19965ripper_parse(VALUE self)
19966{
19967 struct parser_params *p;
19968
19969 TypedData_Get_Struct(self, struct parser_params, &parser_data_type, p);
19970 if (!ripper_initialized_p(p)) {
19971 rb_raise(rb_eArgError, "method called for uninitialized object");
19972 }
19973 if (!NIL_P(p->parsing_thread)) {
19974 if (p->parsing_thread == rb_thread_current())
19975 rb_raise(rb_eArgError, "Ripper#parse is not reentrant");
19976 else
19977 rb_raise(rb_eArgError, "Ripper#parse is not multithread-safe");
19978 }
19979 p->parsing_thread = rb_thread_current();
19980 rb_ensure(ripper_parse0, self, ripper_ensure, self);
19981
19982 return p->result;
19983}
19984
19985/*
19986 * call-seq:
19987 * ripper.column -> Integer
19988 *
19989 * Return column number of current parsing line.
19990 * This number starts from 0.
19991 */
19992static VALUE
19993ripper_column(VALUE self)
19994{
19995 struct parser_params *p;
19996 long col;
19997
19998 TypedData_Get_Struct(self, struct parser_params, &parser_data_type, p);
19999 if (!ripper_initialized_p(p)) {
20000 rb_raise(rb_eArgError, "method called for uninitialized object");
20001 }
20002 if (NIL_P(p->parsing_thread)) return Qnil;
20003 col = p->lex.ptok - p->lex.pbeg;
20004 return LONG2NUM(col);
20005}
20006
20007/*
20008 * call-seq:
20009 * ripper.filename -> String
20010 *
20011 * Return current parsing filename.
20012 */
20013static VALUE
20014ripper_filename(VALUE self)
20015{
20016 struct parser_params *p;
20017
20018 TypedData_Get_Struct(self, struct parser_params, &parser_data_type, p);
20019 if (!ripper_initialized_p(p)) {
20020 rb_raise(rb_eArgError, "method called for uninitialized object");
20021 }
20022 return p->ruby_sourcefile_string;
20023}
20024
20025/*
20026 * call-seq:
20027 * ripper.lineno -> Integer
20028 *
20029 * Return line number of current parsing line.
20030 * This number starts from 1.
20031 */
20032static VALUE
20033ripper_lineno(VALUE self)
20034{
20035 struct parser_params *p;
20036
20037 TypedData_Get_Struct(self, struct parser_params, &parser_data_type, p);
20038 if (!ripper_initialized_p(p)) {
20039 rb_raise(rb_eArgError, "method called for uninitialized object");
20040 }
20041 if (NIL_P(p->parsing_thread)) return Qnil;
20042 return INT2NUM(p->ruby_sourceline);
20043}
20044
20045/*
20046 * call-seq:
20047 * ripper.state -> Integer
20048 *
20049 * Return scanner state of current token.
20050 */
20051static VALUE
20052ripper_state(VALUE self)
20053{
20054 struct parser_params *p;
20055
20056 TypedData_Get_Struct(self, struct parser_params, &parser_data_type, p);
20057 if (!ripper_initialized_p(p)) {
20058 rb_raise(rb_eArgError, "method called for uninitialized object");
20059 }
20060 if (NIL_P(p->parsing_thread)) return Qnil;
20061 return INT2NUM(p->lex.state);
20062}
20063
20064/*
20065 * call-seq:
20066 * ripper.token -> String
20067 *
20068 * Return the current token string.
20069 */
20070static VALUE
20071ripper_token(VALUE self)
20072{
20073 struct parser_params *p;
20074 long pos, len;
20075
20076 TypedData_Get_Struct(self, struct parser_params, &parser_data_type, p);
20077 if (!ripper_initialized_p(p)) {
20078 rb_raise(rb_eArgError, "method called for uninitialized object");
20079 }
20080 if (NIL_P(p->parsing_thread)) return Qnil;
20081 pos = p->lex.ptok - p->lex.pbeg;
20082 len = p->lex.pcur - p->lex.ptok;
20083 return rb_str_subseq(p->lex.lastline, pos, len);
20084}
20085
20086#ifdef RIPPER_DEBUG
20087/* :nodoc: */
20088static VALUE
20089ripper_assert_Qundef(VALUE self, VALUE obj, VALUE msg)
20090{
20091 StringValue(msg);
20092 if (obj == Qundef) {
20094 }
20095 return Qnil;
20096}
20097
20098/* :nodoc: */
20099static VALUE
20100ripper_value(VALUE self, VALUE obj)
20101{
20102 return ULONG2NUM(obj);
20103}
20104#endif
20105
20106/*
20107 * call-seq:
20108 * Ripper.lex_state_name(integer) -> string
20109 *
20110 * Returns a string representation of lex_state.
20111 */
20112static VALUE
20113ripper_lex_state_name(VALUE self, VALUE state)
20114{
20116}
20117
20118void
20119Init_ripper(void)
20120{
20121 ripper_init_eventids1();
20122 ripper_init_eventids2();
20123 id_warn = rb_intern_const("warn");
20124 id_warning = rb_intern_const("warning");
20125 id_gets = rb_intern_const("gets");
20126 id_assoc = rb_intern_const("=>");
20127
20128 (void)yystpcpy; /* may not used in newer bison */
20129
20130 InitVM(ripper);
20131}
20132
20133void
20134InitVM_ripper(void)
20135{
20136 VALUE Ripper;
20137
20138 Ripper = rb_define_class("Ripper", rb_cObject);
20139 /* version of Ripper */
20140 rb_define_const(Ripper, "Version", rb_usascii_str_new2(RIPPER_VERSION));
20141 rb_define_alloc_func(Ripper, ripper_s_allocate);
20142 rb_define_method(Ripper, "initialize", ripper_initialize, -1);
20143 rb_define_method(Ripper, "parse", ripper_parse, 0);
20144 rb_define_method(Ripper, "column", ripper_column, 0);
20145 rb_define_method(Ripper, "filename", ripper_filename, 0);
20146 rb_define_method(Ripper, "lineno", ripper_lineno, 0);
20147 rb_define_method(Ripper, "state", ripper_state, 0);
20148 rb_define_method(Ripper, "token", ripper_token, 0);
20149 rb_define_method(Ripper, "end_seen?", rb_parser_end_seen_p, 0);
20150 rb_define_method(Ripper, "encoding", rb_parser_encoding, 0);
20151 rb_define_method(Ripper, "yydebug", rb_parser_get_yydebug, 0);
20152 rb_define_method(Ripper, "yydebug=", rb_parser_set_yydebug, 1);
20153 rb_define_method(Ripper, "debug_output", rb_parser_get_debug_output, 0);
20154 rb_define_method(Ripper, "debug_output=", rb_parser_set_debug_output, 1);
20155 rb_define_method(Ripper, "error?", ripper_error_p, 0);
20156#ifdef RIPPER_DEBUG
20157 rb_define_method(Ripper, "assert_Qundef", ripper_assert_Qundef, 2);
20158 rb_define_method(Ripper, "rawVALUE", ripper_value, 1);
20159 rb_define_method(Ripper, "validate_object", ripper_validate_object, 1);
20160#endif
20161
20162 rb_define_singleton_method(Ripper, "dedent_string", parser_dedent_string, 2);
20163 rb_define_private_method(Ripper, "dedent_string", parser_dedent_string, 2);
20164
20165 rb_define_singleton_method(Ripper, "lex_state_name", ripper_lex_state_name, 1);
20166
20167 /* ignore newline, +/- is a sign. */
20168 rb_define_const(Ripper, "EXPR_BEG", INT2NUM(EXPR_BEG));
20169 /* newline significant, +/- is an operator. */
20170 rb_define_const(Ripper, "EXPR_END", INT2NUM(EXPR_END));
20171 /* ditto, and unbound braces. */
20172 rb_define_const(Ripper, "EXPR_ENDARG", INT2NUM(EXPR_ENDARG));
20173 /* ditto, and unbound braces. */
20174 rb_define_const(Ripper, "EXPR_ENDFN", INT2NUM(EXPR_ENDFN));
20175 /* newline significant, +/- is an operator. */
20176 rb_define_const(Ripper, "EXPR_ARG", INT2NUM(EXPR_ARG));
20177 /* newline significant, +/- is an operator. */
20178 rb_define_const(Ripper, "EXPR_CMDARG", INT2NUM(EXPR_CMDARG));
20179 /* newline significant, +/- is an operator. */
20180 rb_define_const(Ripper, "EXPR_MID", INT2NUM(EXPR_MID));
20181 /* ignore newline, no reserved words. */
20182 rb_define_const(Ripper, "EXPR_FNAME", INT2NUM(EXPR_FNAME));
20183 /* right after `.' or `::', no reserved words. */
20184 rb_define_const(Ripper, "EXPR_DOT", INT2NUM(EXPR_DOT));
20185 /* immediate after `class', no here document. */
20186 rb_define_const(Ripper, "EXPR_CLASS", INT2NUM(EXPR_CLASS));
20187 /* flag bit, label is allowed. */
20188 rb_define_const(Ripper, "EXPR_LABEL", INT2NUM(EXPR_LABEL));
20189 /* flag bit, just after a label. */
20190 rb_define_const(Ripper, "EXPR_LABELED", INT2NUM(EXPR_LABELED));
20191 /* symbol literal as FNAME. */
20192 rb_define_const(Ripper, "EXPR_FITEM", INT2NUM(EXPR_FITEM));
20193 /* equals to +EXPR_BEG+ */
20194 rb_define_const(Ripper, "EXPR_VALUE", INT2NUM(EXPR_VALUE));
20195 /* equals to <tt>(EXPR_BEG | EXPR_MID | EXPR_CLASS)</tt> */
20196 rb_define_const(Ripper, "EXPR_BEG_ANY", INT2NUM(EXPR_BEG_ANY));
20197 /* equals to <tt>(EXPR_ARG | EXPR_CMDARG)</tt> */
20198 rb_define_const(Ripper, "EXPR_ARG_ANY", INT2NUM(EXPR_ARG_ANY));
20199 /* equals to <tt>(EXPR_END | EXPR_ENDARG | EXPR_ENDFN)</tt> */
20200 rb_define_const(Ripper, "EXPR_END_ANY", INT2NUM(EXPR_END_ANY));
20201 /* equals to +0+ */
20202 rb_define_const(Ripper, "EXPR_NONE", INT2NUM(EXPR_NONE));
20203
20204 ripper_init_eventids1_table(Ripper);
20205 ripper_init_eventids2_table(Ripper);
20206
20207# if 0
20208 /* Hack to let RDoc document SCRIPT_LINES__ */
20209
20210 /*
20211 * When a Hash is assigned to +SCRIPT_LINES__+ the contents of files loaded
20212 * after the assignment will be added as an Array of lines with the file
20213 * name as the key.
20214 */
20215 rb_define_global_const("SCRIPT_LINES__", Qnil);
20216#endif
20217
20218}
20219#endif /* RIPPER */
20220
20221/*
20222 * Local variables:
20223 * mode: c
20224 * c-file-style: "ruby"
20225 * End:
20226 */
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
const char * alias
Definition: nkf.c:1159
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)
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)))
VALUE rb_assoc_new(VALUE, VALUE)
Definition: array.c:896
#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
VALUE rb_ary_concat(VALUE, VALUE)
Definition: array.c:4069
#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)
return cc call
#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)
#define rb_ary_new3
void * memset(void *, int, size_t)
#define NEW_FOR_MASGN(v, loc)
const char * s2
#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
#define RE_OPTION_ENCODING(e)
Definition: ripper.c:707
enum lex_state_e rb_parser_trace_lex_state(struct parser_params *, enum lex_state_e, enum lex_state_e, int)
Definition: ripper.c:17254
#define NUM_SUFFIX_I
Definition: ripper.c:14360
#define HERETERM_LENGTH_BITS
Definition: ripper.c:733
#define Qnull
Definition: ripper.c:946
void rb_parser_fatal(struct parser_params *p, const char *fmt,...)
Definition: ripper.c:17297
#define yyerror0(msg)
Definition: ripper.c:418
#define DEF_EXPR(n)
Definition: ripper.c:156
#define dispatch_delayed_token(p, t)
Definition: ripper.c:12452
#define IS_LABEL_POSSIBLE()
Definition: ripper.c:14004
#define has_delayed_token(p)
Definition: ripper.c:12453
#define set_yylval_name(x)
Definition: ripper.c:12429
#define DVARS_TOPSCOPE
Definition: ripper.c:252
#define idFWD_REST
Definition: ripper.c:697
#define YY_LOCATION_PRINT(File, loc)
Definition: ripper.c:108
#define IS_BEG()
Definition: ripper.c:14002
#define DVARS_TERMINAL_P(tbl)
Definition: ripper.c:253
#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
Definition: ripper.c:1389
#define YYMAXDEPTH
Definition: ripper.c:5479
#define STR_NEW2(ptr)
Definition: ripper.c:383
VALUE rb_parser_new(void)
Definition: ripper.c:19389
#define RUBY_DTRACE_PARSE_HOOK(name)
#define YYSTACK_FREE
Definition: ripper.c:1451
#define YY_SYMBOL_PRINT(Title, Type, Value, Location)
Definition: ripper.c:5347
#define STR_FUNC_QWORDS
Definition: ripper.c:13113
#define DVARS_INHERIT
Definition: ripper.c:251
#define LVAR_USED
Definition: ripper.c:16479
#define yyerrok
Definition: ripper.c:5227
#define add_delayed_token(p, tok, end)
Definition: ripper.c:13173
#define STRTERM_HEREDOC
Definition: ripper.c:757
#define YY_ASSERT(E)
Definition: ripper.c:1409
#define NUMPARAM_ID_P(id)
Definition: ripper.c:239
#define str_copy(_s, _p, _n)
#define YY_(Msgid)
Definition: ripper.c:1350
#define get_value(val)
Definition: ripper.c:592
#define SWITCH_BY_COND_TYPE(t, w, arg)
Definition: ripper.c:18034
#define make_list(list, loc)
Definition: ripper.c:571
#define rb_warn1L(l, fmt, a)
Definition: ripper.c:965
void * rb_parser_malloc(struct parser_params *p, size_t size)
Definition: ripper.c:19543
#define dispatch_heredoc_end(p)
Definition: ripper.c:14431
#define YY_IGNORE_MAYBE_UNINITIALIZED_END
Definition: ripper.c:1390
#define YYNSTATES
Definition: ripper.c:1554
#define YYPRINT(out, tok, val)
Definition: ripper.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: ripper.c:13054
void(* rb_magic_comment_setter_t)(struct parser_params *p, const char *name, const char *val)
Definition: ripper.c:14718
#define NEW_STRTERM(func, term, paren)
Definition: ripper.c:13915
STATIC_ASSERT(rb_strterm_heredoc_t, sizeof(rb_strterm_heredoc_t)<=4 *SIZEOF_VALUE)
#define YY_IGNORE_USELESS_CAST_END
Definition: ripper.c:1405
#define lex_goto_eol(p)
Definition: ripper.c:13149
short yytype_int16
Definition: ripper.c:1274
#define YYUSE(E)
Definition: ripper.c:1372
#define literal_flush(p, ptr)
Definition: ripper.c:12450
#define IS_END()
Definition: ripper.c:14001
#define RE_OPTION_MASK
Definition: ripper.c:710
#define yyerror(yylloc, p, msg)
Definition: ripper.c:420
struct token_info token_info
void rb_parser_printf(struct parser_params *p, const char *fmt,...)
Definition: ripper.c:19600
#define WARN_S(s)
Definition: ripper.c:1000
#define tok(p)
Definition: ripper.c:13259
#define KWD2EID(t, v)
Definition: ripper.c:941
#define ESCAPE_CONTROL
Definition: ripper.c:13465
#define YYEOF
Definition: ripper.c:5230
#define YYABORT
Definition: ripper.c:5233
#define idFWD_KWREST
Definition: ripper.c:701
RUBY_SYMBOL_EXPORT_BEGIN VALUE rb_parser_reg_compile(struct parser_params *p, VALUE str, int options)
Definition: ripper.c:19160
#define tokcopy(p, n)
Definition: ripper.c:13329
#define PRIsWARN
Definition: ripper.c:1004
#define YYSTACK_BYTES(N)
Definition: ripper.c:1497
lex_state_e
Definition: ripper.c:155
@ EXPR_END_ANY
Definition: ripper.c:173
@ EXPR_VALUE
Definition: ripper.c:170
@ EXPR_NONE
Definition: ripper.c:174
@ EXPR_BEG_ANY
Definition: ripper.c:171
@ EXPR_ARG_ANY
Definition: ripper.c:172
#define IS_lex_state(ls)
Definition: ripper.c:178
YYLTYPE * rb_parser_set_location(struct parser_params *p, YYLTYPE *yylloc)
Definition: ripper.c:17348
yytype_int16 yy_state_t
Definition: ripper.c:1337
#define WARN_SPACE_CHAR(c, prefix)
Definition: ripper.c:13358
#define YYLLOC_DEFAULT(Current, Rhs, N)
Definition: ripper.c:112
#define intern_cstr(n, l, en)
Definition: ripper.c:379
#define TAB_WIDTH
Definition: ripper.c:98
#define CMDARG_POP()
Definition: ripper.c:207
#define YY_REDUCE_PRINT(Rule)
Definition: ripper.c:5447
rb_ast_t * rb_parser_compile_string_path(VALUE vparser, VALUE f, VALUE s, int line)
Definition: ripper.c:13060
#define YY_CAST(Type, Val)
Definition: ripper.c:1033
void rb_parser_set_options(VALUE vparser, int print, int loop, int chomp, int split)
Definition: ripper.c:19201
#define vtable_alloc(prev)
Definition: ripper.c:12801
VALUE rb_parser_set_context(VALUE vparser, const struct rb_iseq_struct *base, int main)
Definition: ripper.c:19399
#define was_bol(p)
Definition: ripper.c:13256
#define IS_lex_state_for(x, ls)
Definition: ripper.c:176
#define WARN_S_L(s, l)
Definition: ripper.c:999
#define dispatch_scan_event(p, t)
Definition: ripper.c:12451
#define YYCASE_(N, S)
#define set_yylval_id(x)
Definition: ripper.c:12428
#define NUM_SUFFIX_R
Definition: ripper.c:14359
#define NEW_QCALL(q, r, m, a, loc)
Definition: ripper.c:433
long(* rb_magic_comment_length_t)(struct parser_params *p, const char *name, long len)
Definition: ripper.c:14717
#define warn_balanced(tok, op, syn)
Definition: ripper.c:15013
#define YY_NULLPTR
Definition: ripper.c:1045
#define RE_OPTION_ENCODING_NONE(o)
Definition: ripper.c:709
YYLTYPE * rb_parser_set_location_from_strterm_heredoc(struct parser_params *p, rb_strterm_heredoc_t *here, YYLTYPE *yylloc)
Definition: ripper.c:17323
#define STR_FUNC_TERM
Definition: ripper.c:13118
#define set_yylval_literal(x)
Definition: ripper.c:12422
#define set_yylval_str(x)
Definition: ripper.c:12417
#define YYFINAL
Definition: ripper.c:1543
#define WARN_LOCATION(type)
Definition: ripper.c:16882
rb_ast_t * rb_parser_compile_generic(VALUE vparser, VALUE(*lex_gets)(VALUE, int), VALUE fname, VALUE input, int start)
Definition: ripper.c:13095
#define RUBY_INIT_YYLLOC()
Definition: ripper.c:132
void rb_init_parse(void)
Definition: ripper.c:19254
#define YY_INITIAL_VALUE(Value)
Definition: ripper.c:1386
#define TOK_INTERN()
Definition: ripper.c:385
#define vtable_free(tbl)
Definition: ripper.c:12819
#define CALL_Q_P(q)
Definition: ripper.c:431
#define yyparse
Definition: ripper.c:487
#define STR_NEW3(ptr, len, e, func)
Definition: ripper.c:384
#define yylval
Definition: ripper.c:12403
#define YYNTOKENS
Definition: ripper.c:1548
VALUE rb_parser_encoding(VALUE vparser)
Definition: ripper.c:19462
int rb_reg_fragment_setenc(struct parser_params *, VALUE, int)
Definition: ripper.c:19045
#define yytnamerr(yyres, yystr)
Definition: ripper.c:779
VALUE rb_parser_get_debug_output(VALUE self)
Definition: ripper.c:19510
#define Qnone
Definition: ripper.c:945
unsigned char yytype_uint8
Definition: ripper.c:1283
#define peek(p, c)
Definition: ripper.c:13152
#define YY_STACK_PRINT(Bottom, Top)
Definition: ripper.c:5416
#define compile_for_eval
Definition: ripper.c:426
const struct kwtable * rb_reserved_word(const char *str, unsigned int len)
Definition: ripper.c:19383
lex_state_bits
Definition: ripper.c:138
@ EXPR_ENDARG_bit
Definition: ripper.c:141
@ EXPR_ENDFN_bit
Definition: ripper.c:142
@ EXPR_MAX_STATE
Definition: ripper.c:152
@ EXPR_END_bit
Definition: ripper.c:140
@ EXPR_FNAME_bit
Definition: ripper.c:146
@ EXPR_LABEL_bit
Definition: ripper.c:149
@ EXPR_FITEM_bit
Definition: ripper.c:151
@ EXPR_CLASS_bit
Definition: ripper.c:148
@ EXPR_MID_bit
Definition: ripper.c:145
@ EXPR_CMDARG_bit
Definition: ripper.c:144
@ EXPR_LABELED_bit
Definition: ripper.c:150
@ EXPR_ARG_bit
Definition: ripper.c:143
@ EXPR_DOT_bit
Definition: ripper.c:147
@ EXPR_BEG_bit
Definition: ripper.c:139
#define STR_NEW(ptr, len)
Definition: ripper.c:381
#define lambda_beginning_p()
Definition: ripper.c:435
#define YYSIZE_T
Definition: ripper.c:1324
#define RUBY_SET_YYLLOC_FROM_STRTERM_HEREDOC(Current)
Definition: ripper.c:126
#define YYSTACK_ALLOC_MAXIMUM
Definition: ripper.c:1453
#define IS_lex_state_all(ls)
Definition: ripper.c:179
#define yydebug
Definition: ripper.c:100
#define NUMPARAM_IDX_TO_ID(idx)
Definition: ripper.c:241
#define YY_IGNORE_USELESS_CAST_BEGIN
Definition: ripper.c:1404
#define IS_SPCARG(c)
Definition: ripper.c:14003
void rb_strterm_mark(VALUE obj)
Definition: ripper.c:769
#define rb_warn2(fmt, a, b)
Definition: ripper.c:956
void rb_parser_show_bitstack(struct parser_params *, stack_type, const char *, int)
Definition: ripper.c:17287
#define IS_ARG()
Definition: ripper.c:14000
#define value_expr(node)
Definition: ripper.c:503
#define RE_OPTION_ONCE
Definition: ripper.c:705
#define ADD2HEAP(new, cnt, ptr)
Definition: ripper.c:19539
#define YYPTRDIFF_T
Definition: ripper.c:1310
#define NEWHEAP()
Definition: ripper.c:19538
#define WARN_EOL(tok)
Definition: ripper.c:1020
#define mixed_escape(beg, enc1, enc2)
#define COND_POP()
Definition: ripper.c:200
#define lex_eol_p(p)
Definition: ripper.c:13150
#define RE_OPTION_ENCODING_IDX(o)
Definition: ripper.c:708
#define vtable_pop(tbl, n)
Definition: ripper.c:12858
#define WARN_ID(i)
Definition: ripper.c:1002
#define set_yylval_noname()
Definition: ripper.c:12447
void * rb_parser_realloc(struct parser_params *p, void *ptr, size_t size)
Definition: ripper.c:19563
VALUE rb_parser_set_debug_output(VALUE self, VALUE output)
Definition: ripper.c:19525
#define rb_warn1(fmt, a)
Definition: ripper.c:955
#define set_yylval_node(x)
Definition: ripper.c:12412
VALUE rb_parser_set_yydebug(VALUE self, VALUE flag)
Definition: ripper.c:19494
VALUE rb_parser_end_seen_p(VALUE vparser)
Definition: ripper.c:19447
#define RUBY_SET_YYLLOC(Current)
Definition: ripper.c:130
#define WARN_IVAL(i)
Definition: ripper.c:1003
#define YYACCEPT
Definition: ripper.c:5232
#define ID2VAL(id)
Definition: ripper.c:939
#define yytable_value_is_error(Yyn)
Definition: ripper.c:1809
#define toklen(p)
Definition: ripper.c:13260
#define new_nil(loc)
Definition: ripper.c:491
struct rb_strterm_literal_struct rb_strterm_literal_t
#define YYTRANSLATE(YYX)
Definition: ripper.c:1562
#define subnodes(n1, n2)
#define HERETERM_LENGTH_MAX
#define rb_warn0(fmt)
Definition: ripper.c:954
YYLTYPE * rb_parser_set_location_of_none(struct parser_params *p, YYLTYPE *yylloc)
Definition: ripper.c:17338
#define STR_FUNC_LIST
Definition: ripper.c:13117
#define YY_ATTRIBUTE_UNUSED
Definition: ripper.c:1366
#define STR_FUNC_ESCAPE
Definition: ripper.c:13110
#define ifndef_ripper(x)
Definition: ripper.c:947
#define STR_FUNC_SYMBOL
Definition: ripper.c:13114
#define CMDARG_PUSH(n)
Definition: ripper.c:206
void rb_parser_free(struct parser_params *p, void *ptr)
Definition: ripper.c:19583
#define CMDARG_P()
Definition: ripper.c:208
#define STR_FUNC_LABEL
Definition: ripper.c:13116
#define rb_warning0(fmt)
Definition: ripper.c:959
#define STR_FUNC_INDENT
Definition: ripper.c:13115
#define peek_n(p, c, n)
Definition: ripper.c:13153
#define COND_P()
Definition: ripper.c:201
#define ESCAPE_META
Definition: ripper.c:13466
PRINTF_ARGS(void rb_parser_fatal(struct parser_params *p, const char *fmt,...), 2, 3)
#define METHOD_NOT
Definition: ripper.c:694
rb_ast_t * rb_parser_compile_file_path(VALUE vparser, VALUE fname, VALUE file, int start)
Definition: ripper.c:13075
#define NUMPARAM_ID_TO_IDX(id)
Definition: ripper.c:240
#define HEAPCNT(n, size)
Definition: ripper.c:19535
void rb_parser_warn_location(VALUE vparser, int warn)
Definition: ripper.c:19212
#define YYTERROR
Definition: ripper.c:5257
#define YYPOPSTACK(N)
int yy_state_fast_t
Definition: ripper.c:1340
#define SET_LEX_STATE(ls)
Definition: ripper.c:181
#define STR_FUNC_REGEXP
Definition: ripper.c:13112
#define RUBY_SET_YYLLOC_OF_NONE(Current)
Definition: ripper.c:128
#define idFWD_BLOCK
Definition: ripper.c:703
#define vtable_add(tbl, id)
Definition: ripper.c:12841
#define WARN_I(i)
Definition: ripper.c:1001
#define COND_PUSH(n)
Definition: ripper.c:199
unsigned short yytype_uint16
Definition: ripper.c:1294
#define token_flush(ptr)
Definition: ripper.c:421
#define get_id(id)
Definition: ripper.c:591
string_type
Definition: ripper.c:13120
@ str_dsym
Definition: ripper.c:13129
@ str_dword
Definition: ripper.c:13127
@ str_label
Definition: ripper.c:13121
@ str_ssym
Definition: ripper.c:13128
@ str_xquote
Definition: ripper.c:13124
@ str_dquote
Definition: ripper.c:13123
@ str_regexp
Definition: ripper.c:13125
@ str_squote
Definition: ripper.c:13122
@ str_sword
Definition: ripper.c:13126
#define mixed_error(enc1, enc2)
#define dyna_var(p, id)
Definition: ripper.c:681
#define rb_node_newnode(type, a1, a2, a3, loc)
Definition: ripper.c:463
#define IS_LABEL_SUFFIX(n)
Definition: ripper.c:14007
#define nd_once_body(node)
Definition: ripper.c:16820
#define yyerror1(loc, msg)
Definition: ripper.c:419
#define YYEMPTY
Definition: ripper.c:5229
#define tokfix(p)
Definition: ripper.c:13258
#define YYLAST
Definition: ripper.c:1545
#define NUM_SUFFIX_ALL
Definition: ripper.c:14361
VALUE stack_type
Definition: ripper.c:187
#define YYSTACK_RELOCATE(Stack_alloc, Stack)
Definition: ripper.c:1509
size_t rb_yytnamerr(struct parser_params *p, char *yyres, const char *yystr)
Definition: ripper.c:19647
#define yypact_value_is_default(Yyn)
Definition: ripper.c:1804
cond_type
Definition: ripper.c:18028
@ COND_IN_COND
Definition: ripper.c:18030
@ COND_IN_OP
Definition: ripper.c:18029
@ COND_IN_FF
Definition: ripper.c:18031
#define YYINITDEPTH
Definition: ripper.c:5468
#define flush_string_content(p, enc)
Definition: ripper.c:13940
#define rb_warn0L(l, fmt)
Definition: ripper.c:964
#define CSI_BEGIN
#define STR_NEW0()
Definition: ripper.c:382
@ NUMPARAM_MAX
Definition: ripper.c:236
@ ORDINAL_PARAM
Definition: ripper.c:234
@ NO_PARAM
Definition: ripper.c:235
signed char yytype_int8
Definition: ripper.c:1266
#define rb_warn3L(l, fmt, a, b, c)
Definition: ripper.c:967
#define CSI_SGR
#define STR_FUNC_EXPAND
Definition: ripper.c:13111
#define rb_warning1(fmt, a)
Definition: ripper.c:960
#define YYSYNTAX_ERROR
#define YYERROR
Definition: ripper.c:5234
void * rb_parser_calloc(struct parser_params *p, size_t nelem, size_t size)
Definition: ripper.c:19553
#define YYSIZEOF(X)
Definition: ripper.c:1334
#define YYFPRINTF
Definition: ripper.c:106
RUBY_FUNC_EXPORTED const unsigned int ruby_global_name_punct_bits[(0x7e - 0x20+31)/32]
Definition: ripper.c:13943
#define YYSTACK_ALLOC
Definition: ripper.c:1450
#define YYDPRINTF(Args)
Definition: ripper.c:5296
VALUE rb_parser_lex_state_name(enum lex_state_e state)
Definition: ripper.c:17268
#define peekc_n(p, n)
Definition: ripper.c:13155
#define compile_error
Definition: ripper.c:1012
#define IS_AFTER_OPERATOR()
Definition: ripper.c:14008
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
const YYLTYPE * loc
Definition: ripper.c:19106
struct parser_params * parser
Definition: ripper.c:19103
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 STATIC_ID2SYM(id)
Definition: symbol.h:18
#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