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 
133 enum lex_state_bits {
134     EXPR_BEG_bit,		/* ignore newline, +/- is a sign. */
135     EXPR_END_bit,		/* newline significant, +/- is an operator. */
136     EXPR_ENDARG_bit,		/* ditto, and unbound braces. */
137     EXPR_ENDFN_bit,		/* ditto, and unbound braces. */
138     EXPR_ARG_bit,		/* newline significant, +/- is an operator. */
139     EXPR_CMDARG_bit,		/* newline significant, +/- is an operator. */
140     EXPR_MID_bit,		/* newline significant, +/- is an operator. */
141     EXPR_FNAME_bit,		/* ignore newline, no reserved words. */
142     EXPR_DOT_bit,		/* right after `.' or `::', no reserved words. */
143     EXPR_CLASS_bit,		/* immediate after `class', no here document. */
144     EXPR_LABEL_bit,		/* flag bit, label is allowed. */
145     EXPR_LABELED_bit,		/* flag bit, just after a label. */
146     EXPR_FITEM_bit,		/* symbol literal as FNAME. */
147     EXPR_MAX_STATE
148 };
149 /* examine combinations */
150 enum lex_state_e {
151 #define DEF_EXPR(n) EXPR_##n = (1 << EXPR_##n##_bit)
152     DEF_EXPR(BEG),
153     DEF_EXPR(END),
154     DEF_EXPR(ENDARG),
155     DEF_EXPR(ENDFN),
156     DEF_EXPR(ARG),
157     DEF_EXPR(CMDARG),
158     DEF_EXPR(MID),
159     DEF_EXPR(FNAME),
160     DEF_EXPR(DOT),
161     DEF_EXPR(CLASS),
162     DEF_EXPR(LABEL),
163     DEF_EXPR(LABELED),
164     DEF_EXPR(FITEM),
165     EXPR_VALUE = EXPR_BEG,
166     EXPR_BEG_ANY  =  (EXPR_BEG | EXPR_MID | EXPR_CLASS),
167     EXPR_ARG_ANY  =  (EXPR_ARG | EXPR_CMDARG),
168     EXPR_END_ANY  =  (EXPR_END | EXPR_ENDARG | EXPR_ENDFN),
169     EXPR_NONE = 0
170 };
171 #define IS_lex_state_for(x, ls)	((x) & (ls))
172 #define IS_lex_state_all_for(x, ls) (((x) & (ls)) == (ls))
173 #define IS_lex_state(ls)	IS_lex_state_for(p->lex.state, (ls))
174 #define IS_lex_state_all(ls)	IS_lex_state_all_for(p->lex.state, (ls))
175 
176 # define SET_LEX_STATE(ls) \
177     (p->lex.state = \
178      (p->debug ? \
179       rb_parser_trace_lex_state(p, p->lex.state, (ls), __LINE__) : \
180       (enum lex_state_e)(ls)))
181 
182 typedef VALUE stack_type;
183 
184 static const rb_code_location_t NULL_LOC = { {0, -1}, {0, -1} };
185 
186 # define SHOW_BITSTACK(stack, name) (p->debug ? rb_parser_show_bitstack(p, stack, name, __LINE__) : (void)0)
187 # define BITSTACK_PUSH(stack, n) (((p->stack) = ((p->stack)<<1)|((n)&1)), SHOW_BITSTACK(p->stack, #stack"(push)"))
188 # define BITSTACK_POP(stack)	 (((p->stack) = (p->stack) >> 1), SHOW_BITSTACK(p->stack, #stack"(pop)"))
189 # define BITSTACK_SET_P(stack)	 (SHOW_BITSTACK(p->stack, #stack), (p->stack)&1)
190 # define BITSTACK_SET(stack, n)	 ((p->stack)=(n), SHOW_BITSTACK(p->stack, #stack"(set)"))
191 
192 /* A flag to identify keyword_do_cond, "do" keyword after condition expression.
193    Examples: `while ... do`, `until ... do`, and `for ... in ... do` */
194 #define COND_PUSH(n)	BITSTACK_PUSH(cond_stack, (n))
195 #define COND_POP()	BITSTACK_POP(cond_stack)
196 #define COND_P()	BITSTACK_SET_P(cond_stack)
197 #define COND_SET(n)	BITSTACK_SET(cond_stack, (n))
198 
199 /* A flag to identify keyword_do_block; "do" keyword after command_call.
200    Example: `foo 1, 2 do`. */
201 #define CMDARG_PUSH(n)	BITSTACK_PUSH(cmdarg_stack, (n))
202 #define CMDARG_POP()	BITSTACK_POP(cmdarg_stack)
203 #define CMDARG_P()	BITSTACK_SET_P(cmdarg_stack)
204 #define CMDARG_SET(n)	BITSTACK_SET(cmdarg_stack, (n))
205 
206 struct vtable {
207     ID *tbl;
208     int pos;
209     int capa;
210     struct vtable *prev;
211 };
212 
213 struct local_vars {
214     struct vtable *args;
215     struct vtable *vars;
216     struct vtable *used;
217 # if WARN_PAST_SCOPE
218     struct vtable *past;
219 # endif
220     struct local_vars *prev;
221 };
222 
223 #define DVARS_INHERIT ((void*)1)
224 #define DVARS_TOPSCOPE NULL
225 #define DVARS_TERMINAL_P(tbl) ((tbl) == DVARS_INHERIT || (tbl) == DVARS_TOPSCOPE)
226 
227 typedef struct token_info {
228     const char *token;
229     int linenum;
230     int column;
231     int nonspc;
232     struct token_info *next;
233 } token_info;
234 
235 typedef struct rb_strterm_struct rb_strterm_t;
236 
237 /*
238     Structure of Lexer Buffer:
239 
240  lex.pbeg     lex.ptok     lex.pcur     lex.pend
241     |            |            |            |
242     |------------+------------+------------|
243                  |<---------->|
244                      token
245 */
246 struct parser_params {
247     rb_imemo_tmpbuf_t *heap;
248 
249     YYSTYPE *lval;
250 
251     struct {
252 	rb_strterm_t *strterm;
253 	VALUE (*gets)(struct parser_params*,VALUE);
254 	VALUE input;
255 	VALUE prevline;
256 	VALUE lastline;
257 	VALUE nextline;
258 	const char *pbeg;
259 	const char *pcur;
260 	const char *pend;
261 	const char *ptok;
262 	union {
263 	    long ptr;
264 	    VALUE (*call)(VALUE, int);
265 	} gets_;
266 	enum lex_state_e state;
267 	/* track the nest level of any parens "()[]{}" */
268 	int paren_nest;
269 	/* keep p->lex.paren_nest at the beginning of lambda "->" to detect tLAMBEG and keyword_do_LAMBDA */
270 	int lpar_beg;
271 	/* track the nest level of only braces "{}" */
272 	int brace_nest;
273     } lex;
274     stack_type cond_stack;
275     stack_type cmdarg_stack;
276     int tokidx;
277     int toksiz;
278     int tokline;
279     int heredoc_end;
280     int heredoc_indent;
281     int heredoc_line_indent;
282     char *tokenbuf;
283     struct local_vars *lvtbl;
284     int line_count;
285     int ruby_sourceline;	/* current line no. */
286     const char *ruby_sourcefile; /* current source file */
287     VALUE ruby_sourcefile_string;
288     rb_encoding *enc;
289     token_info *token_info;
290     VALUE compile_option;
291 
292     VALUE debug_buffer;
293     VALUE debug_output;
294 
295     ID cur_arg;
296 
297     rb_ast_t *ast;
298     int node_id;
299 
300     unsigned int command_start:1;
301     unsigned int eofp: 1;
302     unsigned int ruby__end__seen: 1;
303     unsigned int debug: 1;
304     unsigned int has_shebang: 1;
305     unsigned int in_defined: 1;
306     unsigned int in_main: 1;
307     unsigned int in_kwarg: 1;
308     unsigned int in_def: 1;
309     unsigned int in_class: 1;
310     unsigned int token_seen: 1;
311     unsigned int token_info_enabled: 1;
312 # if WARN_PAST_SCOPE
313     unsigned int past_scope_enabled: 1;
314 # endif
315     unsigned int error_p: 1;
316     unsigned int cr_seen: 1;
317 
318 #ifndef RIPPER
319     /* Ruby core only */
320 
321     unsigned int do_print: 1;
322     unsigned int do_loop: 1;
323     unsigned int do_chomp: 1;
324     unsigned int do_split: 1;
325     unsigned int warn_location: 1;
326 
327     NODE *eval_tree_begin;
328     NODE *eval_tree;
329     VALUE error_buffer;
330     VALUE debug_lines;
331     const struct rb_block *base_block;
332 #else
333     /* Ripper only */
334 
335     VALUE delayed;
336     int delayed_line;
337     int delayed_col;
338 
339     VALUE value;
340     VALUE result;
341     VALUE parsing_thread;
342 #endif
343 };
344 
345 #define new_tmpbuf() \
346     (rb_imemo_tmpbuf_t *)add_mark_object(p, rb_imemo_tmpbuf_auto_free_pointer(NULL))
347 
348 #define intern_cstr(n,l,en) rb_intern3(n,l,en)
349 
350 #define STR_NEW(ptr,len) rb_enc_str_new((ptr),(len),p->enc)
351 #define STR_NEW0() rb_enc_str_new(0,0,p->enc)
352 #define STR_NEW2(ptr) rb_enc_str_new((ptr),strlen(ptr),p->enc)
353 #define STR_NEW3(ptr,len,e,func) parser_str_new((ptr),(len),(e),(func),p->enc)
354 #define TOK_INTERN() intern_cstr(tok(p), toklen(p), p->enc)
355 
356 static int parser_yyerror(struct parser_params*, const YYLTYPE *yylloc, const char*);
357 #define yyerror0(msg) parser_yyerror(p, NULL, (msg))
358 #define yyerror1(loc, msg) parser_yyerror(p, (loc), (msg))
359 #define yyerror(yylloc, p, msg) parser_yyerror(p, yylloc, msg)
360 #define token_flush(ptr) ((ptr)->lex.ptok = (ptr)->lex.pcur)
361 
362 #ifdef RIPPER
363 #define compile_for_eval	(0)
364 #else
365 #define compile_for_eval	(p->base_block != 0 && !p->in_main)
366 #endif
367 
368 #define token_column		((int)(p->lex.ptok - p->lex.pbeg))
369 
370 #define CALL_Q_P(q) ((q) == TOKEN2VAL(tANDDOT))
371 #define NODE_CALL_Q(q) (CALL_Q_P(q) ? NODE_QCALL : NODE_CALL)
372 #define NEW_QCALL(q,r,m,a,loc) NEW_NODE(NODE_CALL_Q(q),r,m,a,loc)
373 
374 #define lambda_beginning_p() (p->lex.lpar_beg == p->lex.paren_nest)
375 
376 static enum yytokentype yylex(YYSTYPE*, YYLTYPE*, struct parser_params*);
377 
378 #ifndef RIPPER
379 static inline void
rb_discard_node(struct parser_params * p,NODE * n)380 rb_discard_node(struct parser_params *p, NODE *n)
381 {
382     rb_ast_delete_node(p->ast, n);
383 }
384 #endif
385 
386 static inline VALUE
add_mark_object(struct parser_params * p,VALUE obj)387 add_mark_object(struct parser_params *p, VALUE obj)
388 {
389     if (!SPECIAL_CONST_P(obj)
390 #ifdef RIPPER
391 	&& !RB_TYPE_P(obj, T_NODE) /* Ripper jumbles NODE objects and other objects... */
392 #endif
393     ) {
394 	rb_ast_add_mark_object(p->ast, obj);
395     }
396     return obj;
397 }
398 
399 static NODE* node_newnode(struct parser_params *, enum node_type, VALUE, VALUE, VALUE, const rb_code_location_t*);
400 #define rb_node_newnode(type, a1, a2, a3, loc) node_newnode(p, (type), (a1), (a2), (a3), (loc))
401 
402 static NODE *nd_set_loc(NODE *nd, const YYLTYPE *loc);
403 
404 static int
parser_get_node_id(struct parser_params * p)405 parser_get_node_id(struct parser_params *p)
406 {
407     int node_id = p->node_id;
408     p->node_id++;
409     return node_id;
410 }
411 
412 #ifndef RIPPER
413 static inline void
set_line_body(NODE * body,int line)414 set_line_body(NODE *body, int line)
415 {
416     if (!body) return;
417     switch (nd_type(body)) {
418       case NODE_RESCUE:
419       case NODE_ENSURE:
420 	nd_set_line(body, line);
421     }
422 }
423 
424 #define yyparse ruby_yyparse
425 
426 static NODE* cond(struct parser_params *p, NODE *node, const YYLTYPE *loc);
427 static NODE* method_cond(struct parser_params *p, NODE *node, const YYLTYPE *loc);
428 #define new_nil(loc) NEW_NIL(loc)
429 static NODE *new_if(struct parser_params*,NODE*,NODE*,NODE*,const YYLTYPE*);
430 static NODE *new_unless(struct parser_params*,NODE*,NODE*,NODE*,const YYLTYPE*);
431 static NODE *logop(struct parser_params*,ID,NODE*,NODE*,const YYLTYPE*,const YYLTYPE*);
432 
433 static NODE *newline_node(NODE*);
434 static void fixpos(NODE*,NODE*);
435 
436 static int value_expr_gen(struct parser_params*,NODE*);
437 static void void_expr(struct parser_params*,NODE*);
438 static NODE *remove_begin(NODE*);
439 static NODE *remove_begin_all(NODE*);
440 #define value_expr(node) value_expr_gen(p, (node) = remove_begin(node))
441 static NODE *void_stmts(struct parser_params*,NODE*);
442 static void reduce_nodes(struct parser_params*,NODE**);
443 static void block_dup_check(struct parser_params*,NODE*,NODE*);
444 
445 static NODE *block_append(struct parser_params*,NODE*,NODE*);
446 static NODE *list_append(struct parser_params*,NODE*,NODE*);
447 static NODE *list_concat(NODE*,NODE*);
448 static NODE *arg_append(struct parser_params*,NODE*,NODE*,const YYLTYPE*);
449 static NODE *last_arg_append(struct parser_params *p, NODE *args, NODE *last_arg, const YYLTYPE *loc);
450 static NODE *rest_arg_append(struct parser_params *p, NODE *args, NODE *rest_arg, const YYLTYPE *loc);
451 static NODE *literal_concat(struct parser_params*,NODE*,NODE*,const YYLTYPE*);
452 static NODE *new_evstr(struct parser_params*,NODE*,const YYLTYPE*);
453 static NODE *evstr2dstr(struct parser_params*,NODE*);
454 static NODE *splat_array(NODE*);
455 
456 static NODE *call_bin_op(struct parser_params*,NODE*,ID,NODE*,const YYLTYPE*,const YYLTYPE*);
457 static NODE *call_uni_op(struct parser_params*,NODE*,ID,const YYLTYPE*,const YYLTYPE*);
458 static NODE *new_qcall(struct parser_params* p, ID atype, NODE *recv, ID mid, NODE *args, const YYLTYPE *op_loc, const YYLTYPE *loc);
459 static 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);
method_add_block(struct parser_params * p,NODE * m,NODE * b,const YYLTYPE * loc)460 static 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;}
461 
462 static NODE *new_args(struct parser_params*,NODE*,NODE*,ID,NODE*,NODE*,const YYLTYPE*);
463 static NODE *new_args_tail(struct parser_params*,NODE*,ID,ID,const YYLTYPE*);
464 static NODE *new_kw_arg(struct parser_params *p, NODE *k, const YYLTYPE *loc);
465 
466 static VALUE negate_lit(struct parser_params*, VALUE);
467 static NODE *ret_args(struct parser_params*,NODE*);
468 static NODE *arg_blk_pass(NODE*,NODE*);
469 static NODE *new_yield(struct parser_params*,NODE*,const YYLTYPE*);
470 static NODE *dsym_node(struct parser_params*,NODE*,const YYLTYPE*);
471 
472 static NODE *gettable(struct parser_params*,ID,const YYLTYPE*);
473 static NODE *assignable(struct parser_params*,ID,NODE*,const YYLTYPE*);
474 
475 static NODE *aryset(struct parser_params*,NODE*,NODE*,const YYLTYPE*);
476 static NODE *attrset(struct parser_params*,NODE*,ID,ID,const YYLTYPE*);
477 
478 static void rb_backref_error(struct parser_params*,NODE*);
479 static NODE *node_assign(struct parser_params*,NODE*,NODE*,const YYLTYPE*);
480 
481 static NODE *new_op_assign(struct parser_params *p, NODE *lhs, ID op, NODE *rhs, const YYLTYPE *loc);
482 static NODE *new_ary_op_assign(struct parser_params *p, NODE *ary, NODE *args, ID op, NODE *rhs, const YYLTYPE *args_loc, const YYLTYPE *loc);
483 static NODE *new_attr_op_assign(struct parser_params *p, NODE *lhs, ID atype, ID attr, ID op, NODE *rhs, const YYLTYPE *loc);
484 static NODE *new_const_op_assign(struct parser_params *p, NODE *lhs, ID op, NODE *rhs, const YYLTYPE *loc);
485 static NODE *new_bodystmt(struct parser_params *p, NODE *head, NODE *rescue, NODE *rescue_else, NODE *ensure, const YYLTYPE *loc);
486 
487 static NODE *const_decl(struct parser_params *p, NODE* path, const YYLTYPE *loc);
488 
489 static NODE *opt_arg_append(NODE*, NODE*);
490 static NODE *kwd_append(NODE*, NODE*);
491 
492 static NODE *new_hash(struct parser_params *p, NODE *hash, const YYLTYPE *loc);
493 
494 static NODE *new_defined(struct parser_params *p, NODE *expr, const YYLTYPE *loc);
495 
496 static NODE *new_regexp(struct parser_params *, NODE *, int, const YYLTYPE *);
497 
498 #define make_array(ary, loc) ((ary) ? (nd_set_loc(ary, loc), ary) : NEW_ZARRAY(loc))
499 
500 static NODE *new_xstring(struct parser_params *, NODE *, const YYLTYPE *loc);
501 
502 static NODE *symbol_append(struct parser_params *p, NODE *symbols, NODE *symbol);
503 
504 static NODE *match_op(struct parser_params*,NODE*,NODE*,const YYLTYPE*,const YYLTYPE*);
505 
506 static ID  *local_tbl(struct parser_params*);
507 
508 static VALUE reg_compile(struct parser_params*, VALUE, int);
509 static void reg_fragment_setenc(struct parser_params*, VALUE, int);
510 static int reg_fragment_check(struct parser_params*, VALUE, int);
511 static NODE *reg_named_capture_assign(struct parser_params* p, VALUE regexp, const YYLTYPE *loc);
512 
513 static int literal_concat0(struct parser_params *p, VALUE head, VALUE tail);
514 static NODE *heredoc_dedent(struct parser_params*,NODE*);
515 #define get_id(id) (id)
516 #define get_value(val) (val)
517 #else  /* RIPPER */
518 #define NODE_RIPPER NODE_CDECL
519 
520 static inline VALUE
ripper_new_yylval(struct parser_params * p,ID a,VALUE b,VALUE c)521 ripper_new_yylval(struct parser_params *p, ID a, VALUE b, VALUE c)
522 {
523     add_mark_object(p, b);
524     add_mark_object(p, c);
525     return (VALUE)NEW_CDECL(a, b, c, &NULL_LOC);
526 }
527 
528 static inline int
ripper_is_node_yylval(VALUE n)529 ripper_is_node_yylval(VALUE n)
530 {
531     return RB_TYPE_P(n, T_NODE) && nd_type(RNODE(n)) == NODE_RIPPER;
532 }
533 
534 #define value_expr(node) ((void)(node))
535 #define remove_begin(node) (node)
536 #define void_stmts(p,x) (x)
537 #define rb_dvar_defined(id, base) 0
538 #define rb_local_defined(id, base) 0
539 static ID ripper_get_id(VALUE);
540 #define get_id(id) ripper_get_id(id)
541 static VALUE ripper_get_value(VALUE);
542 #define get_value(val) ripper_get_value(val)
543 static VALUE assignable(struct parser_params*,VALUE);
544 static int id_is_var(struct parser_params *p, ID id);
545 
546 #define method_cond(p,node,loc) (node)
547 #define call_bin_op(p, recv,id,arg1,op_loc,loc) dispatch3(binary, (recv), STATIC_ID2SYM(id), (arg1))
548 #define match_op(p,node1,node2,op_loc,loc) call_bin_op(0, (node1), idEqTilde, (node2), op_loc, loc)
549 #define call_uni_op(p, recv,id,op_loc,loc) dispatch2(unary, STATIC_ID2SYM(id), (recv))
550 #define logop(p,id,node1,node2,op_loc,loc) call_bin_op(0, (node1), (id), (node2), op_loc, loc)
551 
552 #define new_nil(loc) Qnil
553 
554 static VALUE new_regexp(struct parser_params *, VALUE, VALUE, const YYLTYPE *);
555 
556 static VALUE const_decl(struct parser_params *p, VALUE path);
557 
558 static VALUE var_field(struct parser_params *p, VALUE a);
559 static VALUE assign_error(struct parser_params *p, VALUE a);
560 
561 static VALUE parser_reg_compile(struct parser_params*, VALUE, int, VALUE *);
562 
563 #endif /* !RIPPER */
564 
565 /* forward declaration */
566 typedef struct rb_strterm_heredoc_struct rb_strterm_heredoc_t;
567 
568 RUBY_SYMBOL_EXPORT_BEGIN
569 VALUE rb_parser_reg_compile(struct parser_params* p, VALUE str, int options);
570 int rb_reg_fragment_setenc(struct parser_params*, VALUE, int);
571 enum lex_state_e rb_parser_trace_lex_state(struct parser_params *, enum lex_state_e, enum lex_state_e, int);
572 VALUE rb_parser_lex_state_name(enum lex_state_e state);
573 void rb_parser_show_bitstack(struct parser_params *, stack_type, const char *, int);
574 PRINTF_ARGS(void rb_parser_fatal(struct parser_params *p, const char *fmt, ...), 2, 3);
575 void rb_parser_set_location_from_strterm_heredoc(struct parser_params *p, rb_strterm_heredoc_t *here, YYLTYPE *yylloc);
576 void rb_parser_set_location_of_none(struct parser_params *p, YYLTYPE *yylloc);
577 void rb_parser_set_location(struct parser_params *p, YYLTYPE *yylloc);
578 RUBY_SYMBOL_EXPORT_END
579 
580 static void parser_token_value_print(struct parser_params *p, enum yytokentype type, const YYSTYPE *valp);
581 static ID formal_argument(struct parser_params*, ID);
582 static ID shadowing_lvar(struct parser_params*,ID);
583 static void new_bv(struct parser_params*,ID);
584 
585 static void local_push(struct parser_params*,int);
586 static void local_pop(struct parser_params*);
587 static void local_var(struct parser_params*, ID);
588 static void arg_var(struct parser_params*, ID);
589 static int  local_id(struct parser_params *p, ID id);
590 static int  local_id_ref(struct parser_params*, ID, ID **);
591 static ID   internal_id(struct parser_params*);
592 
593 static const struct vtable *dyna_push(struct parser_params *);
594 static void dyna_pop(struct parser_params*, const struct vtable *);
595 static int dyna_in_block(struct parser_params*);
596 #define dyna_var(p, id) local_var(p, id)
597 static int dvar_defined(struct parser_params*, ID);
598 static int dvar_defined_ref(struct parser_params*, ID, ID**);
599 static int dvar_curr(struct parser_params*,ID);
600 
601 static int lvar_defined(struct parser_params*, ID);
602 
603 #ifdef RIPPER
604 # define METHOD_NOT idNOT
605 #else
606 # define METHOD_NOT '!'
607 #endif
608 
609 #define RE_OPTION_ONCE (1<<16)
610 #define RE_OPTION_ENCODING_SHIFT 8
611 #define RE_OPTION_ENCODING(e) (((e)&0xff)<<RE_OPTION_ENCODING_SHIFT)
612 #define RE_OPTION_ENCODING_IDX(o) (((o)>>RE_OPTION_ENCODING_SHIFT)&0xff)
613 #define RE_OPTION_ENCODING_NONE(o) ((o)&RE_OPTION_ARG_ENCODING_NONE)
614 #define RE_OPTION_MASK  0xff
615 #define RE_OPTION_ARG_ENCODING_NONE 32
616 
617 /* structs for managing terminator of string literal and heredocment */
618 typedef struct rb_strterm_literal_struct {
619     union {
620 	VALUE dummy;
621 	long nest;
622     } u0;
623     union {
624 	VALUE dummy;
625 	long func;	    /* STR_FUNC_* (e.g., STR_FUNC_ESCAPE and STR_FUNC_EXPAND) */
626     } u1;
627     union {
628 	VALUE dummy;
629 	long paren;	    /* '(' of `%q(...)` */
630     } u2;
631     union {
632 	VALUE dummy;
633 	long term;	    /* ')' of `%q(...)` */
634     } u3;
635 } rb_strterm_literal_t;
636 
637 struct rb_strterm_heredoc_struct {
638     SIGNED_VALUE sourceline; /* lineno of the line that contains `<<"END"` */
639     VALUE term;		/* `"END"` of `<<"END"` */
640     VALUE lastline;	/* the string of line that contains `<<"END"` */
641     union {
642 	VALUE dummy;
643 	long lastidx;	/* the column of `<<"END"` */
644     } u3;
645 };
646 
647 #define STRTERM_HEREDOC IMEMO_FL_USER0
648 
649 struct rb_strterm_struct {
650     VALUE flags;
651     union {
652 	rb_strterm_literal_t literal;
653 	rb_strterm_heredoc_t heredoc;
654     } u;
655 };
656 
657 #ifndef RIPPER
658 void
rb_strterm_mark(VALUE obj)659 rb_strterm_mark(VALUE obj)
660 {
661     rb_strterm_t *strterm = (rb_strterm_t*)obj;
662     if (RBASIC(obj)->flags & STRTERM_HEREDOC) {
663 	rb_strterm_heredoc_t *heredoc = &strterm->u.heredoc;
664 	rb_gc_mark(heredoc->term);
665 	rb_gc_mark(heredoc->lastline);
666     }
667 }
668 #endif
669 
670 #define TOKEN2ID(tok) ( \
671     tTOKEN_LOCAL_BEGIN<(tok)&&(tok)<tTOKEN_LOCAL_END ? TOKEN2LOCALID(tok) : \
672     tTOKEN_INSTANCE_BEGIN<(tok)&&(tok)<tTOKEN_INSTANCE_END ? TOKEN2INSTANCEID(tok) : \
673     tTOKEN_GLOBAL_BEGIN<(tok)&&(tok)<tTOKEN_GLOBAL_END ? TOKEN2GLOBALID(tok) : \
674     tTOKEN_CONST_BEGIN<(tok)&&(tok)<tTOKEN_CONST_END ? TOKEN2CONSTID(tok) : \
675     tTOKEN_CLASS_BEGIN<(tok)&&(tok)<tTOKEN_CLASS_END ? TOKEN2CLASSID(tok) : \
676     tTOKEN_ATTRSET_BEGIN<(tok)&&(tok)<tTOKEN_ATTRSET_END ? TOKEN2ATTRSETID(tok) : \
677     ((tok) / ((tok)<tPRESERVED_ID_END && ((tok)>=128 || rb_ispunct(tok)))))
678 
679 /****** Ripper *******/
680 
681 #ifdef RIPPER
682 #define RIPPER_VERSION "0.1.0"
683 
684 static inline VALUE intern_sym(const char *name);
685 
686 #include "eventids1.c"
687 #include "eventids2.c"
688 
689 static VALUE ripper_dispatch0(struct parser_params*,ID);
690 static VALUE ripper_dispatch1(struct parser_params*,ID,VALUE);
691 static VALUE ripper_dispatch2(struct parser_params*,ID,VALUE,VALUE);
692 static VALUE ripper_dispatch3(struct parser_params*,ID,VALUE,VALUE,VALUE);
693 static VALUE ripper_dispatch4(struct parser_params*,ID,VALUE,VALUE,VALUE,VALUE);
694 static VALUE ripper_dispatch5(struct parser_params*,ID,VALUE,VALUE,VALUE,VALUE,VALUE);
695 static VALUE ripper_dispatch7(struct parser_params*,ID,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE);
696 static void ripper_error(struct parser_params *p);
697 
698 #define dispatch0(n)            ripper_dispatch0(p, TOKEN_PASTE(ripper_id_, n))
699 #define dispatch1(n,a)          ripper_dispatch1(p, TOKEN_PASTE(ripper_id_, n), (a))
700 #define dispatch2(n,a,b)        ripper_dispatch2(p, TOKEN_PASTE(ripper_id_, n), (a), (b))
701 #define dispatch3(n,a,b,c)      ripper_dispatch3(p, TOKEN_PASTE(ripper_id_, n), (a), (b), (c))
702 #define dispatch4(n,a,b,c,d)    ripper_dispatch4(p, TOKEN_PASTE(ripper_id_, n), (a), (b), (c), (d))
703 #define dispatch5(n,a,b,c,d,e)  ripper_dispatch5(p, TOKEN_PASTE(ripper_id_, n), (a), (b), (c), (d), (e))
704 #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))
705 
706 #define yyparse ripper_yyparse
707 
708 #define ID2VAL(id) STATIC_ID2SYM(id)
709 #define TOKEN2VAL(t) ID2VAL(TOKEN2ID(t))
710 #define KWD2EID(t, v) ripper_new_yylval(p, keyword_##t, get_value(v), 0)
711 
712 #define params_new(pars, opts, rest, pars2, kws, kwrest, blk) \
713         dispatch7(params, (pars), (opts), (rest), (pars2), (kws), (kwrest), (blk))
714 
715 #define escape_Qundef(x) ((x)==Qundef ? Qnil : (x))
716 
717 static inline VALUE
new_args(struct parser_params * p,VALUE pre_args,VALUE opt_args,VALUE rest_arg,VALUE post_args,VALUE tail,YYLTYPE * loc)718 new_args(struct parser_params *p, VALUE pre_args, VALUE opt_args, VALUE rest_arg, VALUE post_args, VALUE tail, YYLTYPE *loc)
719 {
720     NODE *t = (NODE *)tail;
721     VALUE kw_args = t->u1.value, kw_rest_arg = t->u2.value, block = t->u3.value;
722     return params_new(pre_args, opt_args, rest_arg, post_args, kw_args, kw_rest_arg, escape_Qundef(block));
723 }
724 
725 static inline VALUE
new_args_tail(struct parser_params * p,VALUE kw_args,VALUE kw_rest_arg,VALUE block,YYLTYPE * loc)726 new_args_tail(struct parser_params *p, VALUE kw_args, VALUE kw_rest_arg, VALUE block, YYLTYPE *loc)
727 {
728     NODE *t = rb_node_newnode(NODE_ARGS_AUX, kw_args, kw_rest_arg, block, &NULL_LOC);
729     add_mark_object(p, kw_args);
730     add_mark_object(p, kw_rest_arg);
731     add_mark_object(p, block);
732     return (VALUE)t;
733 }
734 
735 #define new_defined(p,expr,loc) dispatch1(defined, (expr))
736 
737 static VALUE heredoc_dedent(struct parser_params*,VALUE);
738 
739 #else
740 #define ID2VAL(id) ((VALUE)(id))
741 #define TOKEN2VAL(t) ID2VAL(t)
742 #define KWD2EID(t, v) keyword_##t
743 #endif /* RIPPER */
744 
745 #ifndef RIPPER
746 # define Qnone 0
747 # define Qnull 0
748 # define ifndef_ripper(x) (x)
749 #else
750 # define Qnone Qnil
751 # define Qnull Qundef
752 # define ifndef_ripper(x)
753 #endif
754 
755 # define rb_warn0(fmt)         WARN_CALL(WARN_ARGS(fmt, 1))
756 # define rb_warn1(fmt,a)       WARN_CALL(WARN_ARGS(fmt, 2), (a))
757 # define rb_warn2(fmt,a,b)     WARN_CALL(WARN_ARGS(fmt, 3), (a), (b))
758 # define rb_warn3(fmt,a,b,c)   WARN_CALL(WARN_ARGS(fmt, 4), (a), (b), (c))
759 # define rb_warn4(fmt,a,b,c,d) WARN_CALL(WARN_ARGS(fmt, 5), (a), (b), (c), (d))
760 # define rb_warning0(fmt)         WARNING_CALL(WARNING_ARGS(fmt, 1))
761 # define rb_warning1(fmt,a)       WARNING_CALL(WARNING_ARGS(fmt, 2), (a))
762 # define rb_warning2(fmt,a,b)     WARNING_CALL(WARNING_ARGS(fmt, 3), (a), (b))
763 # define rb_warning3(fmt,a,b,c)   WARNING_CALL(WARNING_ARGS(fmt, 4), (a), (b), (c))
764 # define rb_warning4(fmt,a,b,c,d) WARNING_CALL(WARNING_ARGS(fmt, 5), (a), (b), (c), (d))
765 # define rb_warn0L(l,fmt)         WARN_CALL(WARN_ARGS_L(l, fmt, 1))
766 # define rb_warn1L(l,fmt,a)       WARN_CALL(WARN_ARGS_L(l, fmt, 2), (a))
767 # define rb_warn2L(l,fmt,a,b)     WARN_CALL(WARN_ARGS_L(l, fmt, 3), (a), (b))
768 # define rb_warn3L(l,fmt,a,b,c)   WARN_CALL(WARN_ARGS_L(l, fmt, 4), (a), (b), (c))
769 # define rb_warn4L(l,fmt,a,b,c,d) WARN_CALL(WARN_ARGS_L(l, fmt, 5), (a), (b), (c), (d))
770 # define rb_warning0L(l,fmt)         WARNING_CALL(WARNING_ARGS_L(l, fmt, 1))
771 # define rb_warning1L(l,fmt,a)       WARNING_CALL(WARNING_ARGS_L(l, fmt, 2), (a))
772 # define rb_warning2L(l,fmt,a,b)     WARNING_CALL(WARNING_ARGS_L(l, fmt, 3), (a), (b))
773 # define rb_warning3L(l,fmt,a,b,c)   WARNING_CALL(WARNING_ARGS_L(l, fmt, 4), (a), (b), (c))
774 # define rb_warning4L(l,fmt,a,b,c,d) WARNING_CALL(WARNING_ARGS_L(l, fmt, 5), (a), (b), (c), (d))
775 #ifdef RIPPER
776 static ID id_warn, id_warning, id_gets;
777 # define WARN_S_L(s,l) STR_NEW(s,l)
778 # define WARN_S(s) STR_NEW2(s)
779 # define WARN_I(i) INT2NUM(i)
780 # define WARN_ID(i) rb_id2str(i)
781 # define PRIsWARN "s"
782 # define WARN_ARGS(fmt,n) p->value, id_warn, n, rb_usascii_str_new_lit(fmt)
783 # define WARN_ARGS_L(l,fmt,n) WARN_ARGS(fmt,n)
784 # ifdef HAVE_VA_ARGS_MACRO
785 # define WARN_CALL(...) rb_funcall(__VA_ARGS__)
786 # else
787 # define WARN_CALL rb_funcall
788 # endif
789 # define WARNING_ARGS(fmt,n) p->value, id_warning, n, rb_usascii_str_new_lit(fmt)
790 # define WARNING_ARGS_L(l, fmt,n) WARNING_ARGS(fmt,n)
791 # ifdef HAVE_VA_ARGS_MACRO
792 # define WARNING_CALL(...) rb_funcall(__VA_ARGS__)
793 # else
794 # define WARNING_CALL rb_funcall
795 # endif
796 PRINTF_ARGS(static void ripper_compile_error(struct parser_params*, const char *fmt, ...), 2, 3);
797 # define compile_error ripper_compile_error
798 #else
799 # define WARN_S_L(s,l) s
800 # define WARN_S(s) s
801 # define WARN_I(i) i
802 # define WARN_ID(i) rb_id2name(i)
803 # define PRIsWARN PRIsVALUE
804 # define WARN_ARGS(fmt,n) WARN_ARGS_L(p->ruby_sourceline,fmt,n)
805 # define WARN_ARGS_L(l,fmt,n) p->ruby_sourcefile, (l), (fmt)
806 # define WARN_CALL rb_compile_warn
807 # define WARNING_ARGS(fmt,n) WARN_ARGS(fmt,n)
808 # define WARNING_ARGS_L(l,fmt,n) WARN_ARGS_L(l,fmt,n)
809 # define WARNING_CALL rb_compile_warning
810 PRINTF_ARGS(static void parser_compile_error(struct parser_params*, const char *fmt, ...), 2, 3);
811 # define compile_error parser_compile_error
812 #endif
813 
814 static void token_info_push(struct parser_params*, const char *token, const rb_code_location_t *loc);
815 static void token_info_pop(struct parser_params*, const char *token, const rb_code_location_t *loc);
816 static void token_info_warn(struct parser_params *p, const char *token, token_info *ptinfo_beg, int same, const rb_code_location_t *loc);
817 
818 #line 819 "ripper.c"
819 
820 # ifndef YY_CAST
821 #  ifdef __cplusplus
822 #   define YY_CAST(Type, Val) static_cast<Type> (Val)
823 #   define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast<Type> (Val)
824 #  else
825 #   define YY_CAST(Type, Val) ((Type) (Val))
826 #   define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val))
827 #  endif
828 # endif
829 # ifndef YY_NULLPTR
830 #  if defined __cplusplus
831 #   if 201103L <= __cplusplus
832 #    define YY_NULLPTR nullptr
833 #   else
834 #    define YY_NULLPTR 0
835 #   endif
836 #  else
837 #   define YY_NULLPTR ((void*)0)
838 #  endif
839 # endif
840 
841 /* Enabling verbose error messages.  */
842 #ifdef YYERROR_VERBOSE
843 # undef YYERROR_VERBOSE
844 # define YYERROR_VERBOSE 1
845 #else
846 # define YYERROR_VERBOSE 0
847 #endif
848 
849 
850 /* Debug traces.  */
851 #ifndef YYDEBUG
852 # define YYDEBUG 1
853 #endif
854 #if YYDEBUG
855 #ifndef yydebug
856 extern int yydebug;
857 #endif
858 #endif
859 
860 /* Token type.  */
861 #ifndef YYTOKENTYPE
862 # define YYTOKENTYPE
863   enum yytokentype
864   {
865     END_OF_INPUT = 0,
866     keyword_class = 258,
867     keyword_module = 259,
868     keyword_def = 260,
869     keyword_undef = 261,
870     keyword_begin = 262,
871     keyword_rescue = 263,
872     keyword_ensure = 264,
873     keyword_end = 265,
874     keyword_if = 266,
875     keyword_unless = 267,
876     keyword_then = 268,
877     keyword_elsif = 269,
878     keyword_else = 270,
879     keyword_case = 271,
880     keyword_when = 272,
881     keyword_while = 273,
882     keyword_until = 274,
883     keyword_for = 275,
884     keyword_break = 276,
885     keyword_next = 277,
886     keyword_redo = 278,
887     keyword_retry = 279,
888     keyword_in = 280,
889     keyword_do = 281,
890     keyword_do_cond = 282,
891     keyword_do_block = 283,
892     keyword_do_LAMBDA = 284,
893     keyword_return = 285,
894     keyword_yield = 286,
895     keyword_super = 287,
896     keyword_self = 288,
897     keyword_nil = 289,
898     keyword_true = 290,
899     keyword_false = 291,
900     keyword_and = 292,
901     keyword_or = 293,
902     keyword_not = 294,
903     modifier_if = 295,
904     modifier_unless = 296,
905     modifier_while = 297,
906     modifier_until = 298,
907     modifier_rescue = 299,
908     keyword_alias = 300,
909     keyword_defined = 301,
910     keyword_BEGIN = 302,
911     keyword_END = 303,
912     keyword__LINE__ = 304,
913     keyword__FILE__ = 305,
914     keyword__ENCODING__ = 306,
915     tIDENTIFIER = 307,
916     tFID = 308,
917     tGVAR = 309,
918     tIVAR = 310,
919     tCONSTANT = 311,
920     tCVAR = 312,
921     tLABEL = 313,
922     tINTEGER = 314,
923     tFLOAT = 315,
924     tRATIONAL = 316,
925     tIMAGINARY = 317,
926     tSTRING_CONTENT = 318,
927     tCHAR = 319,
928     tNTH_REF = 320,
929     tBACK_REF = 321,
930     tREGEXP_END = 322,
931     tSP = 323,
932     tUPLUS = 130,
933     tUMINUS = 131,
934     tPOW = 132,
935     tCMP = 133,
936     tEQ = 138,
937     tEQQ = 139,
938     tNEQ = 140,
939     tGEQ = 137,
940     tLEQ = 136,
941     tANDOP = 146,
942     tOROP = 147,
943     tMATCH = 141,
944     tNMATCH = 142,
945     tDOT2 = 128,
946     tDOT3 = 129,
947     tAREF = 143,
948     tASET = 144,
949     tLSHFT = 134,
950     tRSHFT = 135,
951     tANDDOT = 148,
952     tCOLON2 = 145,
953     tCOLON3 = 324,
954     tOP_ASGN = 325,
955     tASSOC = 326,
956     tLPAREN = 327,
957     tLPAREN_ARG = 328,
958     tRPAREN = 329,
959     tLBRACK = 330,
960     tLBRACE = 331,
961     tLBRACE_ARG = 332,
962     tSTAR = 333,
963     tDSTAR = 334,
964     tAMPER = 335,
965     tLAMBDA = 336,
966     tSYMBEG = 337,
967     tSTRING_BEG = 338,
968     tXSTRING_BEG = 339,
969     tREGEXP_BEG = 340,
970     tWORDS_BEG = 341,
971     tQWORDS_BEG = 342,
972     tSYMBOLS_BEG = 343,
973     tQSYMBOLS_BEG = 344,
974     tSTRING_DBEG = 345,
975     tSTRING_DEND = 346,
976     tSTRING_DVAR = 347,
977     tSTRING_END = 348,
978     tLAMBEG = 349,
979     tLABEL_END = 350,
980     tLOWEST = 351,
981     tUMINUS_NUM = 352,
982     tLAST_TOKEN = 353
983   };
984 #endif
985 
986 /* Value type.  */
987 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
988 union YYSTYPE
989 {
990 #line 770 "ripper.y"
991 
992     VALUE val;
993     NODE *node;
994     ID id;
995     int num;
996     const struct vtable *vars;
997     struct rb_strterm_struct *strterm;
998 
999 #line 998 "ripper.c"
1000 
1001 };
1002 typedef union YYSTYPE YYSTYPE;
1003 # define YYSTYPE_IS_TRIVIAL 1
1004 # define YYSTYPE_IS_DECLARED 1
1005 #endif
1006 
1007 /* Location type.  */
1008 #if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
1009 typedef struct YYLTYPE YYLTYPE;
1010 struct YYLTYPE
1011 {
1012   int first_line;
1013   int first_column;
1014   int last_line;
1015   int last_column;
1016 };
1017 # define YYLTYPE_IS_DECLARED 1
1018 # define YYLTYPE_IS_TRIVIAL 1
1019 #endif
1020 
1021 
1022 
1023 int yyparse (struct parser_params *p);
1024 
1025 
1026 
1027 
1028 
1029 #ifdef short
1030 # undef short
1031 #endif
1032 
1033 /* On compilers that do not define __PTRDIFF_MAX__ etc., make sure
1034    <limits.h> and (if available) <stdint.h> are included
1035    so that the code can choose integer types of a good width.  */
1036 
1037 #ifndef __PTRDIFF_MAX__
1038 # include <limits.h> /* INFRINGES ON USER NAME SPACE */
1039 # if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
1040 #  include <stdint.h> /* INFRINGES ON USER NAME SPACE */
1041 #  define YY_STDINT_H
1042 # endif
1043 #endif
1044 
1045 /* Narrow types that promote to a signed type and that can represent a
1046    signed or unsigned integer of at least N bits.  In tables they can
1047    save space and decrease cache pressure.  Promoting to a signed type
1048    helps avoid bugs in integer arithmetic.  */
1049 
1050 #ifdef __INT_LEAST8_MAX__
1051 typedef __INT_LEAST8_TYPE__ yytype_int8;
1052 #elif defined YY_STDINT_H
1053 typedef int_least8_t yytype_int8;
1054 #else
1055 typedef signed char yytype_int8;
1056 #endif
1057 
1058 #ifdef __INT_LEAST16_MAX__
1059 typedef __INT_LEAST16_TYPE__ yytype_int16;
1060 #elif defined YY_STDINT_H
1061 typedef int_least16_t yytype_int16;
1062 #else
1063 typedef short yytype_int16;
1064 #endif
1065 
1066 #if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__
1067 typedef __UINT_LEAST8_TYPE__ yytype_uint8;
1068 #elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \
1069        && UINT_LEAST8_MAX <= INT_MAX)
1070 typedef uint_least8_t yytype_uint8;
1071 #elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX
1072 typedef unsigned char yytype_uint8;
1073 #else
1074 typedef short yytype_uint8;
1075 #endif
1076 
1077 #if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__
1078 typedef __UINT_LEAST16_TYPE__ yytype_uint16;
1079 #elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \
1080        && UINT_LEAST16_MAX <= INT_MAX)
1081 typedef uint_least16_t yytype_uint16;
1082 #elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX
1083 typedef unsigned short yytype_uint16;
1084 #else
1085 typedef int yytype_uint16;
1086 #endif
1087 
1088 #ifndef YYPTRDIFF_T
1089 # if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__
1090 #  define YYPTRDIFF_T __PTRDIFF_TYPE__
1091 #  define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__
1092 # elif defined PTRDIFF_MAX
1093 #  ifndef ptrdiff_t
1094 #   include <stddef.h> /* INFRINGES ON USER NAME SPACE */
1095 #  endif
1096 #  define YYPTRDIFF_T ptrdiff_t
1097 #  define YYPTRDIFF_MAXIMUM PTRDIFF_MAX
1098 # else
1099 #  define YYPTRDIFF_T long
1100 #  define YYPTRDIFF_MAXIMUM LONG_MAX
1101 # endif
1102 #endif
1103 
1104 #ifndef YYSIZE_T
1105 # ifdef __SIZE_TYPE__
1106 #  define YYSIZE_T __SIZE_TYPE__
1107 # elif defined size_t
1108 #  define YYSIZE_T size_t
1109 # elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
1110 #  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
1111 #  define YYSIZE_T size_t
1112 # else
1113 #  define YYSIZE_T unsigned
1114 # endif
1115 #endif
1116 
1117 #define YYSIZE_MAXIMUM                                  \
1118   YY_CAST (YYPTRDIFF_T,                                 \
1119            (YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1)  \
1120             ? YYPTRDIFF_MAXIMUM                         \
1121             : YY_CAST (YYSIZE_T, -1)))
1122 
1123 #define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X))
1124 
1125 /* Stored state numbers (used for stacks). */
1126 typedef yytype_int16 yy_state_t;
1127 
1128 /* State numbers in computations.  */
1129 typedef int yy_state_fast_t;
1130 
1131 #ifndef YY_
1132 # if defined YYENABLE_NLS && YYENABLE_NLS
1133 #  if ENABLE_NLS
1134 #   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
1135 #   define YY_(Msgid) dgettext ("bison-runtime", Msgid)
1136 #  endif
1137 # endif
1138 # ifndef YY_
1139 #  define YY_(Msgid) Msgid
1140 # endif
1141 #endif
1142 
1143 #ifndef YY_ATTRIBUTE_PURE
1144 # if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__)
1145 #  define YY_ATTRIBUTE_PURE __attribute__ ((__pure__))
1146 # else
1147 #  define YY_ATTRIBUTE_PURE
1148 # endif
1149 #endif
1150 
1151 #ifndef YY_ATTRIBUTE_UNUSED
1152 # if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__)
1153 #  define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
1154 # else
1155 #  define YY_ATTRIBUTE_UNUSED
1156 # endif
1157 #endif
1158 
1159 /* Suppress unused-variable warnings by "using" E.  */
1160 #if ! defined lint || defined __GNUC__
1161 # define YYUSE(E) ((void) (E))
1162 #else
1163 # define YYUSE(E) /* empty */
1164 #endif
1165 
1166 #if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
1167 /* Suppress an incorrect diagnostic about yylval being uninitialized.  */
1168 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN                            \
1169     _Pragma ("GCC diagnostic push")                                     \
1170     _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")              \
1171     _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
1172 # define YY_IGNORE_MAYBE_UNINITIALIZED_END      \
1173     _Pragma ("GCC diagnostic pop")
1174 #else
1175 # define YY_INITIAL_VALUE(Value) Value
1176 #endif
1177 #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1178 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1179 # define YY_IGNORE_MAYBE_UNINITIALIZED_END
1180 #endif
1181 #ifndef YY_INITIAL_VALUE
1182 # define YY_INITIAL_VALUE(Value) /* Nothing. */
1183 #endif
1184 
1185 #if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__
1186 # define YY_IGNORE_USELESS_CAST_BEGIN                          \
1187     _Pragma ("GCC diagnostic push")                            \
1188     _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"")
1189 # define YY_IGNORE_USELESS_CAST_END            \
1190     _Pragma ("GCC diagnostic pop")
1191 #endif
1192 #ifndef YY_IGNORE_USELESS_CAST_BEGIN
1193 # define YY_IGNORE_USELESS_CAST_BEGIN
1194 # define YY_IGNORE_USELESS_CAST_END
1195 #endif
1196 
1197 
1198 #define YY_ASSERT(E) ((void) (0 && (E)))
1199 
1200 #if ! defined yyoverflow || YYERROR_VERBOSE
1201 
1202 /* The parser invokes alloca or malloc; define the necessary symbols.  */
1203 
1204 # ifdef YYSTACK_USE_ALLOCA
1205 #  if YYSTACK_USE_ALLOCA
1206 #   ifdef __GNUC__
1207 #    define YYSTACK_ALLOC __builtin_alloca
1208 #   elif defined __BUILTIN_VA_ARG_INCR
1209 #    include <alloca.h> /* INFRINGES ON USER NAME SPACE */
1210 #   elif defined _AIX
1211 #    define YYSTACK_ALLOC __alloca
1212 #   elif defined _MSC_VER
1213 #    include <malloc.h> /* INFRINGES ON USER NAME SPACE */
1214 #    define alloca _alloca
1215 #   else
1216 #    define YYSTACK_ALLOC alloca
1217 #    if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
1218 #     include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
1219       /* Use EXIT_SUCCESS as a witness for stdlib.h.  */
1220 #     ifndef EXIT_SUCCESS
1221 #      define EXIT_SUCCESS 0
1222 #     endif
1223 #    endif
1224 #   endif
1225 #  endif
1226 # endif
1227 
1228 # ifdef YYSTACK_ALLOC
1229    /* Pacify GCC's 'empty if-body' warning.  */
1230 #  define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
1231 #  ifndef YYSTACK_ALLOC_MAXIMUM
1232     /* The OS might guarantee only one guard page at the bottom of the stack,
1233        and a page size can be as small as 4096 bytes.  So we cannot safely
1234        invoke alloca (N) if N exceeds 4096.  Use a slightly smaller number
1235        to allow for a few compiler-allocated temporary stack slots.  */
1236 #   define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
1237 #  endif
1238 # else
1239 #  define YYSTACK_ALLOC YYMALLOC
1240 #  define YYSTACK_FREE YYFREE
1241 #  ifndef YYSTACK_ALLOC_MAXIMUM
1242 #   define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
1243 #  endif
1244 #  if (defined __cplusplus && ! defined EXIT_SUCCESS \
1245        && ! ((defined YYMALLOC || defined malloc) \
1246              && (defined YYFREE || defined free)))
1247 #   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
1248 #   ifndef EXIT_SUCCESS
1249 #    define EXIT_SUCCESS 0
1250 #   endif
1251 #  endif
1252 #  ifndef YYMALLOC
1253 #   define YYMALLOC malloc
1254 #   if ! defined malloc && ! defined EXIT_SUCCESS
1255 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
1256 #   endif
1257 #  endif
1258 #  ifndef YYFREE
1259 #   define YYFREE free
1260 #   if ! defined free && ! defined EXIT_SUCCESS
1261 void free (void *); /* INFRINGES ON USER NAME SPACE */
1262 #   endif
1263 #  endif
1264 # endif
1265 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
1266 
1267 
1268 #if (! defined yyoverflow \
1269      && (! defined __cplusplus \
1270          || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \
1271              && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
1272 
1273 /* A type that is properly aligned for any stack member.  */
1274 union yyalloc
1275 {
1276   yy_state_t yyss_alloc;
1277   YYSTYPE yyvs_alloc;
1278   YYLTYPE yyls_alloc;
1279 };
1280 
1281 /* The size of the maximum gap between one aligned stack and the next.  */
1282 # define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1)
1283 
1284 /* The size of an array large to enough to hold all stacks, each with
1285    N elements.  */
1286 # define YYSTACK_BYTES(N) \
1287      ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE) \
1288              + YYSIZEOF (YYLTYPE)) \
1289       + 2 * YYSTACK_GAP_MAXIMUM)
1290 
1291 # define YYCOPY_NEEDED 1
1292 
1293 /* Relocate STACK from its old location to the new one.  The
1294    local variables YYSIZE and YYSTACKSIZE give the old and new number of
1295    elements in the stack, and YYPTR gives the new location of the
1296    stack.  Advance YYPTR to a properly aligned location for the next
1297    stack.  */
1298 # define YYSTACK_RELOCATE(Stack_alloc, Stack)                           \
1299     do                                                                  \
1300       {                                                                 \
1301         YYPTRDIFF_T yynewbytes;                                         \
1302         YYCOPY (&yyptr->Stack_alloc, Stack, yysize);                    \
1303         Stack = &yyptr->Stack_alloc;                                    \
1304         yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \
1305         yyptr += yynewbytes / YYSIZEOF (*yyptr);                        \
1306       }                                                                 \
1307     while (0)
1308 
1309 #endif
1310 
1311 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
1312 /* Copy COUNT objects from SRC to DST.  The source and destination do
1313    not overlap.  */
1314 # ifndef YYCOPY
1315 #  if defined __GNUC__ && 1 < __GNUC__
1316 #   define YYCOPY(Dst, Src, Count) \
1317       __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src)))
1318 #  else
1319 #   define YYCOPY(Dst, Src, Count)              \
1320       do                                        \
1321         {                                       \
1322           YYPTRDIFF_T yyi;                      \
1323           for (yyi = 0; yyi < (Count); yyi++)   \
1324             (Dst)[yyi] = (Src)[yyi];            \
1325         }                                       \
1326       while (0)
1327 #  endif
1328 # endif
1329 #endif /* !YYCOPY_NEEDED */
1330 
1331 /* YYFINAL -- State number of the termination state.  */
1332 #define YYFINAL  3
1333 /* YYLAST -- Last index in YYTABLE.  */
1334 #define YYLAST   12570
1335 
1336 /* YYNTOKENS -- Number of terminals.  */
1337 #define YYNTOKENS  152
1338 /* YYNNTS -- Number of nonterminals.  */
1339 #define YYNNTS  215
1340 /* YYNRULES -- Number of rules.  */
1341 #define YYNRULES  640
1342 /* YYNSTATES -- Number of states.  */
1343 #define YYNSTATES  1076
1344 
1345 #define YYUNDEFTOK  2
1346 #define YYMAXUTOK   353
1347 
1348 
1349 /* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM
1350    as returned by yylex, with out-of-bounds checking.  */
1351 #define YYTRANSLATE(YYX)                                                \
1352   (0 <= (YYX) && (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
1353 
1354 /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
1355    as returned by yylex.  */
1356 static const yytype_uint8 yytranslate[] =
1357 {
1358        0,     2,     2,     2,     2,     2,     2,     2,     2,    71,
1359      151,    74,    72,    73,     2,     2,     2,     2,     2,     2,
1360        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
1361        2,     2,   150,   138,     2,     2,     2,   136,   131,     2,
1362      146,   147,   134,   132,   144,   133,    68,   135,     2,     2,
1363        2,     2,     2,     2,     2,     2,     2,     2,   126,   149,
1364      128,   124,   127,   125,     2,     2,     2,     2,     2,     2,
1365        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
1366        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
1367        2,   143,    69,   148,   130,     2,   145,     2,     2,     2,
1368        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
1369        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
1370        2,     2,     2,   141,   129,   142,   139,     2,    88,    89,
1371       75,    76,    77,    78,    92,    93,    83,    82,    79,    80,
1372       81,    86,    87,    90,    91,    95,    84,    85,    94,     2,
1373        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
1374        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
1375        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
1376        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
1377        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
1378        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
1379        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
1380        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
1381        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
1382        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
1383        2,     2,     2,     2,     2,     2,     1,     2,     3,     4,
1384        5,     6,     7,     8,     9,    10,    11,    12,    13,    14,
1385       15,    16,    17,    18,    19,    20,    21,    22,    23,    24,
1386       25,    26,    27,    28,    29,    30,    31,    32,    33,    34,
1387       35,    36,    37,    38,    39,    40,    41,    42,    43,    44,
1388       45,    46,    47,    48,    49,    50,    51,    52,    53,    54,
1389       55,    56,    57,    58,    59,    60,    61,    62,    63,    64,
1390       65,    66,    67,    70,    96,    97,    98,    99,   100,   101,
1391      102,   103,   104,   105,   106,   107,   108,   109,   110,   111,
1392      112,   113,   114,   115,   116,   117,   118,   119,   120,   121,
1393      122,   123,   137,   140
1394 };
1395 
1396 #if YYDEBUG
1397   /* YYRLINE[YYN] -- Source line where rule number YYN was defined.  */
1398 static const yytype_int16 yyrline[] =
1399 {
1400        0,   937,   937,   937,   963,   969,   976,   983,   990,   996,
1401      997,  1003,  1016,  1014,  1025,  1036,  1042,  1049,  1056,  1063,
1402     1069,  1074,  1073,  1082,  1082,  1089,  1096,  1106,  1114,  1121,
1403     1129,  1137,  1149,  1161,  1171,  1185,  1186,  1194,  1202,  1209,
1404     1212,  1219,  1226,  1234,  1241,  1248,  1256,  1263,  1273,  1278,
1405     1287,  1290,  1291,  1295,  1299,  1303,  1307,  1310,  1317,  1317,
1406     1317,  1323,  1324,  1327,  1328,  1337,  1347,  1357,  1366,  1377,
1407     1384,  1391,  1398,  1405,  1413,  1421,  1428,  1435,  1444,  1445,
1408     1454,  1455,  1464,  1471,  1478,  1485,  1492,  1499,  1506,  1513,
1409     1520,  1527,  1536,  1537,  1546,  1553,  1562,  1569,  1578,  1585,
1410     1592,  1599,  1606,  1613,  1620,  1627,  1634,  1644,  1651,  1658,
1411     1665,  1672,  1679,  1686,  1693,  1700,  1710,  1717,  1720,  1727,
1412     1734,  1743,  1744,  1745,  1746,  1751,  1758,  1759,  1762,  1769,
1413     1772,  1779,  1779,  1789,  1790,  1791,  1792,  1793,  1794,  1795,
1414     1796,  1797,  1798,  1799,  1800,  1801,  1802,  1803,  1804,  1805,
1415     1806,  1807,  1808,  1809,  1810,  1811,  1812,  1813,  1814,  1815,
1416     1816,  1817,  1818,  1821,  1821,  1821,  1822,  1822,  1823,  1823,
1417     1823,  1824,  1824,  1824,  1824,  1825,  1825,  1825,  1825,  1826,
1418     1826,  1826,  1827,  1827,  1827,  1827,  1828,  1828,  1828,  1828,
1419     1829,  1829,  1829,  1829,  1830,  1830,  1830,  1830,  1831,  1831,
1420     1831,  1831,  1832,  1832,  1835,  1842,  1849,  1857,  1865,  1873,
1421     1881,  1889,  1896,  1904,  1913,  1922,  1934,  1946,  1950,  1954,
1422     1958,  1962,  1966,  1970,  1974,  1978,  1982,  1986,  1990,  1994,
1423     1998,  1999,  2003,  2007,  2011,  2015,  2019,  2023,  2027,  2031,
1424     2035,  2039,  2043,  2043,  2048,  2057,  2063,  2064,  2065,  2066,
1425     2069,  2073,  2080,  2087,  2088,  2092,  2099,  2108,  2113,  2124,
1426     2133,  2134,  2137,  2138,  2139,  2143,  2150,  2159,  2167,  2174,
1427     2182,  2190,  2194,  2194,  2231,  2240,  2244,  2250,  2257,  2264,
1428     2271,  2280,  2281,  2284,  2291,  2298,  2307,  2308,  2309,  2310,
1429     2311,  2312,  2313,  2314,  2315,  2316,  2317,  2325,  2324,  2339,
1430     2339,  2346,  2346,  2353,  2360,  2367,  2374,  2381,  2389,  2396,
1431     2403,  2410,  2417,  2417,  2422,  2426,  2430,  2437,  2438,  2447,
1432     2446,  2457,  2468,  2479,  2489,  2499,  2509,  2516,  2562,  2561,
1433     2585,  2584,  2607,  2606,  2630,  2635,  2629,  2655,  2656,  2655,
1434     2680,  2687,  2694,  2701,  2710,  2717,  2723,  2729,  2735,  2741,
1435     2747,  2753,  2759,  2765,  2771,  2777,  2783,  2789,  2795,  2801,
1436     2807,  2815,  2821,  2827,  2834,  2835,  2836,  2839,  2840,  2843,
1437     2844,  2856,  2857,  2866,  2867,  2870,  2877,  2886,  2893,  2902,
1438     2909,  2916,  2923,  2930,  2937,  2944,  2951,  2958,  2968,  2972,
1439     2976,  2980,  2986,  2991,  2996,  3000,  3004,  3008,  3012,  3016,
1440     3025,  3029,  3033,  3037,  3041,  3045,  3049,  3053,  3057,  3063,
1441     3064,  3070,  3078,  3085,  3096,  3100,  3109,  3111,  3115,  3120,
1442     3126,  3129,  3134,  3126,  3154,  3161,  3167,  3172,  3178,  3188,
1443     3202,  3209,  3216,  3225,  3234,  3242,  3250,  3257,  3265,  3273,
1444     3280,  3287,  3300,  3308,  3318,  3318,  3329,  3330,  3329,  3342,
1445     3354,  3355,  3358,  3370,  3373,  3380,  3387,  3390,  3394,  3397,
1446     3404,  3407,  3408,  3415,  3418,  3434,  3435,  3436,  3445,  3455,
1447     3464,  3470,  3480,  3486,  3495,  3497,  3506,  3516,  3522,  3531,
1448     3540,  3550,  3556,  3566,  3572,  3582,  3588,  3598,  3604,  3614,
1449     3624,  3665,  3667,  3666,  3683,  3687,  3692,  3696,  3700,  3682,
1450     3721,  3728,  3735,  3742,  3745,  3755,  3756,  3757,  3758,  3761,
1451     3771,  3772,  3782,  3783,  3784,  3785,  3788,  3789,  3790,  3791,
1452     3792,  3795,  3796,  3797,  3798,  3799,  3800,  3801,  3804,  3817,
1453     3826,  3833,  3842,  3843,  3847,  3846,  3856,  3864,  3873,  3873,
1454     3887,  3891,  3895,  3899,  3905,  3910,  3915,  3919,  3923,  3927,
1455     3931,  3935,  3939,  3943,  3947,  3951,  3955,  3959,  3963,  3967,
1456     3972,  3978,  3986,  3994,  4002,  4012,  4013,  4020,  4029,  4037,
1457     4060,  4062,  4075,  4084,  4092,  4102,  4109,  4118,  4125,  4135,
1458     4142,  4151,  4152,  4155,  4163,  4173,  4183,  4193,  4200,  4209,
1459     4216,  4225,  4226,  4229,  4237,  4247,  4248,  4251,  4261,  4265,
1460     4274,  4279,  4279,  4303,  4304,  4313,  4315,  4338,  4349,  4356,
1461     4364,  4377,  4378,  4379,  4382,  4383,  4384,  4385,  4388,  4389,
1462     4390,  4393,  4394,  4397,  4398,  4401,  4402,  4405,  4406,  4409,
1463     4410,  4413,  4416,  4419,  4420,  4421,  4424,  4425,  4428,  4429,
1464     4433
1465 };
1466 #endif
1467 
1468 #if YYDEBUG || YYERROR_VERBOSE || 0
1469 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
1470    First, the terminals, then, starting at YYNTOKENS, nonterminals.  */
1471 static const char *const yytname[] =
1472 {
1473   "\"end-of-input\"", "error", "$undefined", "\"class\"", "\"module\"",
1474   "\"def\"", "\"undef\"", "\"begin\"", "\"rescue\"", "\"ensure\"",
1475   "\"end\"", "\"if\"", "\"unless\"", "\"then\"", "\"elsif\"", "\"else\"",
1476   "\"case\"", "\"when\"", "\"while\"", "\"until\"", "\"for\"", "\"break\"",
1477   "\"next\"", "\"redo\"", "\"retry\"", "\"in\"", "\"do\"",
1478   "\"do (for condition)\"", "\"do (for block)\"", "\"do (for lambda)\"",
1479   "\"return\"", "\"yield\"", "\"super\"", "\"self\"", "\"nil\"",
1480   "\"true\"", "\"false\"", "\"and\"", "\"or\"", "\"not\"",
1481   "\"if (modifier)\"", "\"unless (modifier)\"", "\"while (modifier)\"",
1482   "\"until (modifier)\"", "\"rescue (modifier)\"", "\"alias\"",
1483   "\"defined?\"", "\"BEGIN\"", "\"END\"", "\"__LINE__\"", "\"__FILE__\"",
1484   "\"__ENCODING__\"", "tIDENTIFIER", "tFID", "tGVAR", "tIVAR", "tCONSTANT",
1485   "tCVAR", "tLABEL", "tINTEGER", "tFLOAT", "tRATIONAL", "tIMAGINARY",
1486   "tSTRING_CONTENT", "tCHAR", "tNTH_REF", "tBACK_REF", "tREGEXP_END",
1487   "'.'", "\"backslash\"", "\"escaped space\"",
1488   "\"escaped horizontal tab\"", "\"escaped form feed\"",
1489   "\"escaped carriage return\"", "\"escaped vertical tab\"", "\"unary+\"",
1490   "\"unary-\"", "\"**\"", "\"<=>\"", "\"==\"", "\"===\"", "\"!=\"",
1491   "\">=\"", "\"<=\"", "\"&&\"", "\"||\"", "\"=~\"", "\"!~\"", "\"..\"",
1492   "\"...\"", "\"[]\"", "\"[]=\"", "\"<<\"", "\">>\"", "\"&.\"", "\"::\"",
1493   "\":: at EXPR_BEG\"", "tOP_ASGN", "\"=>\"", "\"(\"", "\"( arg\"",
1494   "\")\"", "\"[\"", "\"{\"", "\"{ arg\"", "\"*\"", "\"**arg\"", "\"&\"",
1495   "\"->\"", "tSYMBEG", "tSTRING_BEG", "tXSTRING_BEG", "tREGEXP_BEG",
1496   "tWORDS_BEG", "tQWORDS_BEG", "tSYMBOLS_BEG", "tQSYMBOLS_BEG",
1497   "tSTRING_DBEG", "tSTRING_DEND", "tSTRING_DVAR", "tSTRING_END", "tLAMBEG",
1498   "tLABEL_END", "tLOWEST", "'='", "'?'", "':'", "'>'", "'<'", "'|'", "'^'",
1499   "'&'", "'+'", "'-'", "'*'", "'/'", "'%'", "tUMINUS_NUM", "'!'", "'~'",
1500   "tLAST_TOKEN", "'{'", "'}'", "'['", "','", "'`'", "'('", "')'", "']'",
1501   "';'", "' '", "'\\n'", "$accept", "program", "$@1", "top_compstmt",
1502   "top_stmts", "top_stmt", "begin_block", "bodystmt", "$@2", "compstmt",
1503   "stmts", "stmt_or_begin", "$@3", "stmt", "$@4", "command_asgn",
1504   "command_rhs", "expr", "expr_value", "expr_value_do", "$@5", "$@6",
1505   "command_call", "block_command", "cmd_brace_block", "fcall", "command",
1506   "mlhs", "mlhs_inner", "mlhs_basic", "mlhs_item", "mlhs_head",
1507   "mlhs_post", "mlhs_node", "lhs", "cname", "cpath", "fname", "fsym",
1508   "fitem", "undef_list", "$@7", "op", "reswords", "arg", "$@8", "relop",
1509   "rel_expr", "arg_value", "aref_args", "arg_rhs", "paren_args",
1510   "opt_paren_args", "opt_call_args", "call_args", "command_args", "$@9",
1511   "block_arg", "opt_block_arg", "args", "mrhs_arg", "mrhs", "primary",
1512   "$@10", "$@11", "$@12", "$@13", "$@14", "$@15", "@16", "$@17", "@18",
1513   "@19", "@20", "@21", "primary_value", "k_begin", "k_if", "k_unless",
1514   "k_while", "k_until", "k_case", "k_for", "k_class", "k_module", "k_def",
1515   "k_do", "k_do_block", "k_rescue", "k_ensure", "k_when", "k_else",
1516   "k_elsif", "k_end", "k_return", "then", "do", "if_tail", "opt_else",
1517   "for_var", "f_marg", "f_marg_list", "f_margs", "block_args_tail",
1518   "opt_block_args_tail", "block_param", "opt_block_param",
1519   "block_param_def", "opt_bv_decl", "bv_decls", "bvar", "lambda", "@22",
1520   "@23", "$@24", "f_larglist", "lambda_body", "do_block", "block_call",
1521   "method_call", "brace_block", "brace_body", "@25", "do_body", "@26",
1522   "$@27", "case_body", "cases", "opt_rescue", "exc_list", "exc_var",
1523   "opt_ensure", "literal", "strings", "string", "string1", "xstring",
1524   "regexp", "words", "word_list", "word", "symbols", "symbol_list",
1525   "qwords", "qsymbols", "qword_list", "qsym_list", "string_contents",
1526   "xstring_contents", "regexp_contents", "string_content", "@28", "$@29",
1527   "@30", "@31", "@32", "@33", "string_dvar", "symbol", "sym", "dsym",
1528   "numeric", "simple_numeric", "user_variable", "keyword_variable",
1529   "var_ref", "var_lhs", "backref", "superclass", "$@34", "f_arglist",
1530   "@35", "args_tail", "opt_args_tail", "f_args", "f_bad_arg", "f_norm_arg",
1531   "f_arg_asgn", "f_arg_item", "f_arg", "f_label", "f_kw", "f_block_kw",
1532   "f_block_kwarg", "f_kwarg", "kwrest_mark", "f_kwrest", "f_opt",
1533   "f_block_opt", "f_block_optarg", "f_optarg", "restarg_mark",
1534   "f_rest_arg", "blkarg_mark", "f_block_arg", "opt_f_block_arg",
1535   "singleton", "$@36", "assoc_list", "assocs", "assoc", "operation",
1536   "operation2", "operation3", "dot_or_colon", "call_op", "call_op2",
1537   "opt_terms", "opt_nl", "rparen", "rbracket", "trailer", "term", "terms",
1538   "none", YY_NULLPTR
1539 };
1540 #endif
1541 
1542 # ifdef YYPRINT
1543 /* YYTOKNUM[NUM] -- (External) token number corresponding to the
1544    (internal) symbol number NUM (which must be that of a token).  */
1545 static const yytype_int16 yytoknum[] =
1546 {
1547        0,   256,   257,   258,   259,   260,   261,   262,   263,   264,
1548      265,   266,   267,   268,   269,   270,   271,   272,   273,   274,
1549      275,   276,   277,   278,   279,   280,   281,   282,   283,   284,
1550      285,   286,   287,   288,   289,   290,   291,   292,   293,   294,
1551      295,   296,   297,   298,   299,   300,   301,   302,   303,   304,
1552      305,   306,   307,   308,   309,   310,   311,   312,   313,   314,
1553      315,   316,   317,   318,   319,   320,   321,   322,    46,    92,
1554      323,     9,    12,    13,    11,   130,   131,   132,   133,   138,
1555      139,   140,   137,   136,   146,   147,   141,   142,   128,   129,
1556      143,   144,   134,   135,   148,   145,   324,   325,   326,   327,
1557      328,   329,   330,   331,   332,   333,   334,   335,   336,   337,
1558      338,   339,   340,   341,   342,   343,   344,   345,   346,   347,
1559      348,   349,   350,   351,    61,    63,    58,    62,    60,   124,
1560       94,    38,    43,    45,    42,    47,    37,   352,    33,   126,
1561      353,   123,   125,    91,    44,    96,    40,    41,    93,    59,
1562       32,    10
1563 };
1564 # endif
1565 
1566 #define YYPACT_NINF (-856)
1567 
1568 #define yypact_value_is_default(Yyn) \
1569   ((Yyn) == YYPACT_NINF)
1570 
1571 #define YYTABLE_NINF (-641)
1572 
1573 #define yytable_value_is_error(Yyn) \
1574   ((Yyn) == YYTABLE_NINF)
1575 
1576   /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
1577      STATE-NUM.  */
1578 static const yytype_int16 yypact[] =
1579 {
1580     -856,    88,  3334,  -856,  8359,  -856,  -856,  -856,  7952,  -856,
1581     -856,  -856,  -856,  -856,  -856,  -856,  8483,  8483,  -856,  -856,
1582     -856,  4611,  4176,  -856,  -856,  -856,  -856,   -16,  7809,   -50,
1583      -24,   -19,  -856,  -856,  -856,  3451,  4321,  -856,  -856,  3596,
1584     -856,  -856,  -856,  -856,  -856,  -856,  -856,  -856,  9971,  9971,
1585       95,  6035,  8607,  8855,  9227,  3047,  -856,  7666,  -856,  -856,
1586     -856,    78,   107,   111,   115,   976, 10095,  9971,  -856,    16,
1587     -856,  1161,  -856,   518,  -856,  -856,    63,   213,   198,  -856,
1588      145, 10343,  -856,   203,  3429,   983,   346,   366,  -856, 10219,
1589    10219,  -856,  -856,  7003, 10463, 10583, 10703,  7522,  8483,    61,
1590       71,  -856,  -856,   231,  -856,  -856,  -856,  -856,  -856,  -856,
1591     -856,  -856,  -856,  -856,  -856,    24,   268,  -856,   278,   325,
1592     -856,  -856,  -856,  -856,  -856,  -856,  -856,  -856,  -856,  -856,
1593     -856,  -856,  -856,  -856,  -856,  -856,  -856,  -856,  -856,  -856,
1594     -856,  -856,  -856,  -856,  -856,  -856,  -856,  -856,  -856,  -856,
1595     -856,  -856,  -856,  -856,  -856,  -856,  -856,  -856,  -856,  -856,
1596     -856,  -856,  -856,  -856,  -856,  -856,  -856,  -856,  -856,  -856,
1597     -856,  -856,  -856,  -856,  -856,  -856,  -856,  -856,  -856,  -856,
1598     -856,  -856,  -856,  -856,  -856,  -856,  -856,  -856,  -856,  -856,
1599     -856,  -856,  -856,  -856,  -856,  -856,  -856,  -856,  -856,  -856,
1600      240,  -856,  -856,  -856,  -856,   241,  9971,   342,  6184,  9971,
1601     9971,  9971,  -856,  9971,  -856,   276,  3429,   310,  -856,  -856,
1602      277,   422,    30,   153,   329,   233,   286,  -856,  -856,  6879,
1603     -856,  8483,  8483,  -856,  -856,  7127,  -856, 10219,   695,  -856,
1604      300,  6333,  -856,  6482,  -856,  -856,   306,   324,    63,  -856,
1605      507,  -856,   430,   398,  8607,  -856,  6035,   328,    16,  -856,
1606     1161,   -50,   370,  -856,  1161,   -50,   372,   -28,   196,  -856,
1607      310,   406,   196,  -856,   -50,   487,   976, 10823,   416,  -856,
1608      552,   554,   558,   652,  -856,  -856,  -856,  -856,  -856,   447,
1609     -856,   609,   874,   419,  -856,  -856,  -856,  -856,   473,  -856,
1610     -856,  -856,  -856,  -856,  -856,  -856,  7251, 10219, 10219, 10219,
1611    10219,  8607, 10219, 10219,  -856,  -856,  -856,   458,  -856,  -856,
1612     -856,  -856,  -856,  9351,  -856,  6035,  8232,   434,  9351,  9971,
1613     9971,  9971,  9971,  9971,  -856,  -856,  9971,  9971,  9971,  9971,
1614     9971,  9971,  9971,  9971,  9971,  -856,  -856,  9971,  9971,  9971,
1615     9971,  9971,  9971,  9971,  9971,  9971,  9971,  -856,  -856, 11105,
1616     8483, 11193,  5340,   518,   151,   151,  6631, 10219,  6631,    16,
1617      557,   436,   536,  -856,  -856,   705,   568,    57,    87,   101,
1618      795,   812, 10219,   200,  -856,   486,   712,  -856,  -856,  -856,
1619     -856,    52,   361,   383,   423,   462,   476,   593,   594,   597,
1620     -856,  -856,  -856,   598,  -856,  -856,  -856, 12425,  -856,  -856,
1621    10095, 10095,  -856,  -856,   572,  -856,  -856,  -856,  1100,  9971,
1622     9971,  8731,  -856,  -856, 11281,  8483, 11369,  9971,  9971,  8979,
1623     -856,   -50,   464,  -856,  -856,   -50,  -856,   471,   474,  -856,
1624       36,  -856,  -856,  -856,  -856,  -856,  7952,  -856,  9971,   488,
1625      490, 11281, 11369,  9971,  1161,   -24,   -50,  -856,  -856,  7375,
1626      484,   -50,  -856,  -856,  9103,  -856,  -856,  9227,  -856,  -856,
1627     -856,   300,   718,  -856,  -856,   493, 10823, 11457,  8483, 11545,
1628     -856,  -856,  -856,  -856,  -856,  -856,  -856,  -856,  -856,  -856,
1629     -856,  -856,   886,    14,   899,    65,  9971,  -856,  -856,  -856,
1630     -856,  -856,  -856,  -856,  -856,  -856,   502,    33,  -856,  -856,
1631      650,  -856,   650,  9971,  -856,   524,   529,  -856,  -856,   -50,
1632    10823,   532,  -856,  -856,  -856,   639,   561,  2721,  -856,  -856,
1633     -856,   779,   582,   430,  1571,  1571,  1571,  1571,  1693,  2127,
1634     1571,  1571,  3719,  3719,  1131,  1131,  4727,  1402,  1402,  1039,
1635      658,   658,   430,   430,   430,  1278,  1278,  4756,  3741,  5046,
1636     3886,  -856,   324,  -856,   -50,   417,  -856,   483,  -856,  -856,
1637     4466,   650,   701,  -856,  5489,   698,  5787,   650,    40,   650,
1638      557,  -856,  9475,   650,   127, 11633,  8483, 11721,  -856,   518,
1639     -856,   718,  -856,  -856,  -856, 11809,  8483, 11897,  5340, 10219,
1640     -856,  -856,  -856,  -856,  -856,  -856,  2366,  -856,  3574,  -856,
1641     -856,  -856,  7952,  9971,  -856,  9971,   310,  -856,   286,  3172,
1642     4031,   -50,   584,   651,  -856,  -856,  -856,  -856,  8731,  8979,
1643     -856,  -856, 10219,  3429,  -856,  -856,   324,   324,  -856,  -856,
1644       42,  -856,  -856,   196, 10823,   493,   382,   478,   -50,    56,
1645      353,  1218,  -856,   854,  -856,   229,  -856,   567,  -856,  -856,
1646      408,   575,  -856,   430,  -856,  -856,  1155,  6482,  -856,  -856,
1647      590,  -856,  -856,    33,  -856,   595,  9599,  -856,   493, 10823,
1648     8607, 10095,  9971, 11985,  8483, 12073,   616, 10095, 10095,  -856,
1649      458,   606,   546, 10095, 10095,  -856,  -856,   458,  -856,  -856,
1650     -856,  9723,   217,  -856,   321,  -856,   730,  -856,  -856,  -856,
1651     -856,  -856,   650,    66,  -856,   165,   298,   -50,   138,   157,
1652     6631,    16, 10219,  5340,  1014,   478,  -856,   -50,   650,    36,
1653      618,  8095,    71,   213,  -856,  -856,  -856,  -856,  9971,  9971,
1654      665,  9971,  9971,   624,    36,  -856,  -856,   388,  -856,  -856,
1655     -856,  -856,  -856,  -856,  -856,  1129,  -856,  -856,  -856,  -856,
1656     -856,  1386,  -856,  -856,  -856,  -856,  -856,   666,  -856,   667,
1657     9971,  -856,   671,   764,   676,  -856,   680,   776,   683,   778,
1658     -856,  -856,  -856,  -856,  -856,  -856,  -856,  -856,  -856,  -856,
1659     -856,  -856,  -856,   -50,   710,   717,   706, 10943,  -856,   708,
1660      676,  -856,   715,   726,  -856,   729,  -856,  -856,  5340,  9971,
1661      727,   493,  -856,  3429,  4901,  5191,   -50,   725,   738,  9971,
1662     -856,  -856,  -856,  -856,  -856,  -856, 10095,  -856,  -856,  -856,
1663     -856,  -856,   524,  -856,   787,  -856,  -856,  -856,  6631,  -856,
1664     -856,  -856,  -856,  6631, 10219,   650,  -856,  -856,   650,  -856,
1665     -856,  9847,  5638,   170,   650,  5340,    16,   650,  -856,  -856,
1666     -856,  1386,  5340,  1386,  -856,  -856,  -856,  9971,  8979,  -856,
1667     1129,   534,  -856,   748,   -50,  -856,   -50,    73,  9971,  1386,
1668     -856,  -856,   825,  -856,  -856,  -856,    46,  -856,  1386,  -856,
1669     -856,  1290,  -856,  -856,  -856,   765,  -856, 10943,  1386,  -856,
1670      844,   833,   825,  -856,  -856,  1386,  -856,  1290,  -856,   957,
1671     -856,   766,   775,  3429,  -856,  -856, 11063,   151,  -856,  -856,
1672     5911,  -856,   151,  -856,  -856,  -856,   401,  -856,   650,  -856,
1673     -856,   -50,   650,    16,   618,   -50,  1259,   768,  1274,  -856,
1674      770,  5340,  6482,  -856,  -856,  -856,  -856,   771,   774,  -856,
1675      676,  -856,   782,  -856,   789,  -856,   782,  -856,  -856,   833,
1676     -856,   790,   791,  -856, 12161,  -856,   676,   799,  -856,   801,
1677      799,  -856,   311,  -856,  -856,   883,  -856,   835,   210,   255,
1678      282,  5340,   937,  5489,  -856,  -856,  -856,  -856,  -856,  -856,
1679     -856,  5340,  -856,   803,  1259,   722,  -856,  -856,   650,   808,
1680     1386,  -856,  1290,  -856,  -856,  1290,  -856,  1290,  -856,  -856,
1681     6755,  1386,  -856,  1290,  -856,   805,   815,  -856,  1290,  -856,
1682     1290,  -856,  -856,   957,  -856,   294, 12249,  8483, 12337,   701,
1683     -856,   321,   650,  1259,   803,  1259,   822,  -856,  -856,   782,
1684      826,   782,   782,   856,   799,   828,   799,   799,  -856,    91,
1685      250,   -50,   315,   347,  -856,  -856,  -856,   803,  1259,  -856,
1686     1290,  -856,  -856,  -856,  -856,  -856,  1290,  -856,  -856,  -856,
1687      350,   803,   782,   799,  -856,  -856
1688 };
1689 
1690   /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
1691      Performed when YYTABLE does not specify something else to do.  Zero
1692      means the default is an error.  */
1693 static const yytype_int16 yydefact[] =
1694 {
1695        2,     0,     0,     1,     0,   352,   353,   354,     0,   345,
1696      346,   347,   350,   348,   349,   351,   340,   341,   342,   343,
1697      363,   272,   272,   522,   521,   523,   524,   629,     0,   629,
1698        0,     0,   526,   525,   527,   611,   613,   518,   517,   612,
1699      520,   512,   513,   514,   515,   465,   532,   533,     0,     0,
1700        0,     0,   299,   640,   640,    90,   319,   485,   485,   487,
1701      489,     0,     0,     0,     0,     0,     0,     0,     3,   627,
1702        6,     9,    35,    39,    51,    62,   272,    61,     0,    78,
1703        0,    82,    92,     0,    56,   230,   245,     0,   297,     0,
1704        0,    58,    58,   627,     0,     0,     0,     0,   308,    63,
1705      317,   286,   287,   464,   466,   288,   289,   290,   292,   291,
1706      293,   462,   463,   461,   510,   528,   529,   294,     0,   295,
1707       66,     5,     8,   173,   184,   174,   197,   170,   190,   180,
1708      179,   200,   201,   195,   178,   177,   172,   198,   202,   203,
1709      182,   171,   185,   189,   191,   183,   176,   192,   199,   194,
1710      193,   186,   196,   181,   169,   188,   187,   168,   175,   166,
1711      167,   163,   164,   165,   121,   123,   122,   158,   159,   154,
1712      136,   137,   138,   145,   142,   144,   139,   140,   160,   161,
1713      146,   147,   151,   155,   141,   143,   133,   134,   135,   148,
1714      149,   150,   152,   153,   156,   157,   162,   126,   128,   130,
1715       28,   124,   125,   127,   129,     0,     0,     0,     0,     0,
1716        0,     0,   485,     0,   267,     0,   252,   277,    76,   271,
1717      640,     0,   528,   529,     0,   295,   640,   605,    77,   629,
1718       74,     0,   640,   439,    73,   629,   630,     0,     0,    23,
1719      242,     0,    10,     0,   340,   341,   311,   440,     0,   224,
1720        0,   308,   225,   305,     0,    21,     0,     0,   627,    17,
1721       20,   629,    80,    16,   301,   629,     0,   633,   633,   253,
1722        0,     0,   633,   603,   629,     0,     0,     0,    88,   344,
1723        0,    98,    99,   106,   420,   507,   506,   508,   505,     0,
1724      504,     0,     0,     0,   472,   481,   477,   483,   511,    55,
1725      236,   237,   636,   637,     4,   638,   628,     0,     0,     0,
1726        0,     0,     0,     0,   355,   444,   433,    67,   446,   316,
1727      356,   446,   429,     0,    94,     0,    86,    83,     0,     0,
1728        0,     0,     0,     0,   248,   249,     0,     0,     0,     0,
1729      215,   216,     0,     0,     0,   246,   247,     0,     0,     0,
1730        0,     0,     0,     0,     0,     0,     0,   623,   624,     0,
1731      640,     0,     0,    57,     0,     0,     0,     0,     0,   627,
1732        0,   628,     0,   374,   373,     0,     0,   528,   529,   295,
1733      116,   117,     0,     0,   119,   536,     0,   528,   529,   295,
1734      332,   193,   186,   196,   181,   163,   164,   165,   121,   122,
1735      601,   334,   600,     0,    75,   626,   625,     0,   318,   467,
1736        0,     0,   131,   608,   305,   278,   610,   274,     0,     0,
1737        0,     0,   268,   276,     0,   640,     0,     0,     0,     0,
1738      269,   629,     0,   310,   273,   629,   263,   640,   640,   262,
1739      629,   315,    54,    25,    27,    26,     0,   312,     0,     0,
1740        0,     0,     0,     0,    19,     0,   629,   303,    15,   628,
1741       79,   629,   300,   306,   635,   634,   254,   635,   256,   307,
1742      604,     0,   105,   511,    96,    91,     0,     0,   640,     0,
1743      320,   421,   491,   494,   492,   509,   486,   468,   469,   488,
1744      470,   490,     0,     0,     0,     0,     0,   639,     7,    29,
1745       30,    31,    32,    33,    52,    53,     0,   640,   444,    68,
1746        0,   447,     0,     0,    36,   282,     0,    38,   281,   629,
1747        0,    84,    95,    50,    40,    48,     0,   257,   277,   204,
1748       37,     0,   295,   222,   229,   231,   232,   233,   240,   241,
1749      234,   235,   213,   214,   238,   239,   629,   226,   227,   228,
1750      217,   218,   219,   220,   221,   250,   251,   614,   616,   615,
1751      617,   438,   272,   436,   629,   614,   616,   615,   617,   437,
1752      272,     0,   640,   365,     0,   364,     0,     0,     0,     0,
1753        0,   359,     0,     0,   305,     0,   640,     0,    58,   330,
1754      116,   117,   118,   534,   328,     0,   640,     0,     0,     0,
1755      335,   621,   622,   337,   614,   615,   272,    41,   257,   205,
1756       47,   212,     0,     0,   607,     0,   279,   275,   640,   614,
1757      615,   629,   614,   615,   606,   309,   631,   259,   264,   266,
1758      314,    24,     0,   243,    11,    34,     0,   640,   211,    22,
1759       81,    18,   302,   633,     0,    89,   618,   104,   629,   614,
1760      615,   560,   495,     0,   471,     0,   474,     0,   479,   476,
1761        0,     0,   480,   223,   442,   412,   629,     0,   410,   409,
1762        0,   362,   443,   640,   428,   285,     0,    93,    87,     0,
1763        0,     0,     0,     0,   640,     0,     0,     0,     0,   435,
1764       71,     0,   441,     0,     0,   261,   434,    69,   260,   298,
1765      357,   640,   640,   453,   640,   366,   640,   323,   368,    59,
1766      367,   324,     0,     0,   326,   618,   304,   629,   614,   615,
1767        0,     0,     0,     0,   116,   117,   120,   629,     0,   629,
1768      538,     0,   430,    64,   132,   609,   280,   270,     0,     0,
1769      441,     0,     0,   640,   629,   255,    97,   441,   566,   563,
1770      562,   561,   564,   572,   581,     0,   592,   582,   596,   595,
1771      591,   560,   422,   559,   425,   565,   567,   568,   570,   545,
1772      574,   579,   640,   584,   640,   589,   545,   594,   545,     0,
1773      543,   496,   500,   501,   502,   493,   503,   473,   475,   482,
1774      478,   484,   408,   629,     0,   568,   393,   576,   577,   640,
1775      640,   587,   393,   393,   391,   414,   445,    65,     0,     0,
1776      283,    85,    49,   258,   614,   615,   629,   614,   615,     0,
1777       46,   209,    45,   210,    72,   632,     0,    43,   207,    44,
1778      208,    70,   454,   455,   640,   456,   358,   360,     0,    12,
1779       14,   460,   361,     0,     0,     0,   369,   371,     0,    60,
1780      325,     0,     0,   441,     0,     0,     0,     0,   441,   333,
1781      602,   560,     0,   560,   338,   431,   432,     0,   265,   313,
1782        0,   386,   377,   379,   629,   375,   629,     0,     0,     0,
1783      552,   573,     0,   541,   599,   583,     0,   542,     0,   555,
1784      593,     0,   557,   597,   497,     0,   411,     0,   399,   401,
1785        0,   575,     0,   389,   390,     0,   404,     0,   406,     0,
1786      448,   284,   441,   244,    42,   206,     0,     0,   458,   459,
1787        0,   372,     0,   321,   322,   279,   640,   327,     0,   535,
1788      329,   629,     0,     0,   538,   629,     0,   384,     0,   569,
1789        0,     0,     0,   423,   585,   544,   571,   545,   545,   580,
1790      640,   598,   545,   590,   545,   568,   545,   498,   413,   586,
1791      392,   393,   393,   305,     0,   578,   640,   393,   588,   393,
1792      393,   418,   629,   416,   419,     0,   457,     0,   528,   529,
1793      295,     0,   640,     0,   450,   451,   449,   331,   537,   336,
1794      539,     0,   376,   387,     0,   382,   378,   424,     0,     0,
1795        0,   548,     0,   550,   540,     0,   556,     0,   553,   558,
1796        0,     0,   396,     0,   398,   618,   304,   388,     0,   405,
1797        0,   402,   407,     0,   415,   305,     0,   640,     0,   640,
1798       13,   640,     0,     0,   385,     0,   380,   427,   426,   545,
1799      545,   545,   545,     0,   393,   393,   393,   393,   417,   618,
1800      304,   629,   614,   615,   452,   370,   339,   383,     0,   549,
1801        0,   546,   551,   554,   499,   397,     0,   394,   400,   403,
1802      441,   381,   545,   393,   547,   395
1803 };
1804 
1805   /* YYPGOTO[NTERM-NUM].  */
1806 static const yytype_int16 yypgoto[] =
1807 {
1808     -856,  -856,  -856,   741,  -856,    23,   540,  -438,  -856,   -29,
1809     -856,   530,  -856,     6,  -856,  -214,  -311,    81,   -88,   -80,
1810     -856,  -856,   -30,  -856,  -166,   736,    59,   903,  -164,    -1,
1811      -48,  -856,  -412,     8,  2062,  -322,   904,   -54,  -856,   -14,
1812     -856,  -856,    13,  -856,  1459,  -856,   916,  -856,   777,  -856,
1813      426,    97,   409,  -353,    74,   -11,  -856,  -375,  -203,    15,
1814     -856,  -315,   -39,  -856,  -856,  -856,  -856,  -856,  -856,  -856,
1815     -856,  -856,  -856,  -856,  -856,    43,  -856,  -856,  -856,  -856,
1816     -856,  -856,  -856,  -856,  -856,  -856,  -856,  -856,  -856,  -856,
1817     -856,   318,  -856,   305,   767,  -340,  -856,    -9,  -662,  -856,
1818     -855,  -852,   137,   362,   254,  -856,   357,  -856,  -678,  -856,
1819        9,  -856,  -856,  -856,  -856,  -856,  -856,   317,  -856,  -856,
1820      -99,   523,  -856,   733,  -856,  -856,  -554,  -856,    22,  -856,
1821     -856,    76,  -856,  -856,  -856,   952,  -856,  -856,  -856,  -856,
1822      566,  -856,  -856,  -856,  -856,  -856,  -856,     4,  -856,  -856,
1823     -258,  -856,  -856,  -856,  -856,  -856,  -856,  -856,     1,  -856,
1824       11,  -856,   -17,  1925,  2034,   965,  2368,  1642,  -856,  -856,
1825      135,  -856,  -580,  -197,  -376,  -798,  -725,   291,  -813,   180,
1826      238,   199,   181,  -856,  -856,  -856,   -97,  -792,  -827,   186,
1827      212,  -856,  -573,  -856,  -299,  -624,  -856,  -856,  -856,    90,
1828     -380,  -856,  -321,  -856,  -856,   -81,  -856,   -56,   -12,   632,
1829     -568,  -248,   -65,     0,    -2
1830 };
1831 
1832   /* YYDEFGOTO[NTERM-NUM].  */
1833 static const yytype_int16 yydefgoto[] =
1834 {
1835       -1,     1,     2,    68,    69,    70,   242,   571,   920,   572,
1836      258,   259,   455,   260,   446,    72,   524,    73,   364,   366,
1837      367,   849,    74,    75,   509,   248,    77,    78,   261,    79,
1838       80,    81,   475,    82,   215,   384,   385,   197,   198,   199,
1839      200,   612,   560,   202,    84,   448,   355,    85,   217,   266,
1840      529,   561,   696,   435,   436,   230,   231,   219,   422,   437,
1841      517,   518,    86,   362,   265,   461,   632,   284,   723,   721,
1842      598,   600,   730,   731,   934,   250,    88,    89,    90,    91,
1843       92,    93,    94,    95,    96,    97,   318,   321,   701,   838,
1844      582,   843,   844,   672,   251,   574,   709,   845,   846,   376,
1845      872,   873,   874,   960,   899,   793,   667,   668,   794,   972,
1846      973,   480,   481,   651,   877,   762,   943,   322,    99,   100,
1847      319,   506,   507,   510,   511,   673,   583,   986,   702,   834,
1848      917,   840,   101,   102,   103,   104,   105,   106,   107,   492,
1849      655,   108,   494,   109,   110,   493,   495,   289,   292,   293,
1850      486,   653,   652,   781,   894,   957,  1010,   785,   111,   290,
1851      112,   113,   114,   222,   223,   117,   224,   225,   594,   722,
1852      862,   863,   945,   880,   764,   765,   766,   955,   768,   769,
1853      770,   771,   798,   799,   772,   773,   774,   775,   801,   802,
1854      776,   777,   778,   779,   780,   883,   403,   599,   271,   438,
1855      227,   120,   636,   563,   603,   597,   407,   304,   432,   433,
1856      692,   466,   575,   371,   263
1857 };
1858 
1859   /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM.  If
1860      positive, shift that token.  If negative, reduce the rule whose
1861      number is the opposite.  If YYTABLE_NINF, syntax error.  */
1862 static const yytype_int16 yytable[] =
1863 {
1864      121,   408,   365,   288,   305,   369,   361,   564,    71,   203,
1865       71,   234,   368,   530,   239,   237,   279,   240,   406,   204,
1866      468,   201,   257,   430,   470,   576,   712,   122,   305,   203,
1867      875,   220,   220,   327,   489,   491,   299,   370,   562,   204,
1868      570,   201,   279,   401,   848,    87,   617,    87,   298,   624,
1869      262,   269,   273,   740,   617,   279,   279,   279,   264,   221,
1870      221,   592,   291,   278,   645,   317,   946,   708,   267,   306,
1871      201,   763,   621,   312,   313,   214,   214,   657,   968,   573,
1872      747,  -101,  -107,   996,   993,   946,   606,   624,     3,   314,
1873      218,   228,   456,   803,    87,    87,   953,   314,   280,   607,
1874      610,   236,   941,   562,  -111,   570,   226,   226,   678,   221,
1875      201,   974,  -108,   220,   523,   895,   464,   241,   665,   233,
1876     -522,  -530,   243,   465,   280,   648,  -115,  -530,   661,   357,
1877      235,   637,   221,   221,   658,   236,   221,   375,   386,   386,
1878      426,   221,  1034,   268,   272,   875,   937,  -522,  -107,   853,
1879      887,   253,  -114,   758,  -107,   358,   405,   214,   637,   858,
1880      728,   519,   666,  -110,   573,   302,   -79,   303,   -98,   452,
1881      363,   363,   404,   316,   363,   903,   904,   759,   996,   257,
1882     -101,   763,  -112,  1057,   968,   662,   -93,   236,   226,   302,
1883     -111,   303,   946,   305,   942,  -109,   523,   523,   940,   479,
1884     -101,   -98,   458,  -101,   315,   946,  1071,  -101,   953,   232,
1885      851,   875,   315,   875,   450,   302,   418,   303,   423,   499,
1886      500,   501,   502,  -107,   423,   974,   836,   257,   294,   474,
1887      439,   -99,   837,   717,   656,   430,   656,  -614,   279,   121,
1888     -111,   320,  -111,   727,   220,  -106,   220,    71,   912,   624,
1889     -531,    87,   590,   617,   617,   262,   591,   295,   459,   473,
1890      454,   296,   471,  -113,   984,   297,   637,   811,  -108,   875,
1891     1036,  -105,   221,   726,   221,   221,   637,  -108,   221,   578,
1892      221,   763,  -101,   763,    87,   857,    87,   279,   214,   324,
1893      214,   214,   482,   514,   587,  -115,   257,    87,   525,    87,
1894      302,  -103,   303,   431,   305,   434,   948,  -114,   875,  -102,
1895      875,  -614,    71,   580,  -100,   954,   440,   503,   442,   226,
1896      280,   226,   323,  -113,   262,   962,  1004,   328,  -110,   498,
1897      428,   816,   969,   875,   521,   842,   837,   577,   516,   579,
1898      467,    58,  1017,   516,   233,   316,   483,   465,   484,    87,
1899      221,   221,   221,   221,    87,   221,   221,  -115,   439,  -107,
1900     -112,  -107,   562,  -109,   570,  -531,   221,   804,    87,   280,
1901      910,   531,   985,   852,   568,   410,   820,   822,  -103,   787,
1902      525,   525,   827,   829,   412,   876,   833,   235,   363,   363,
1903      363,   363,  -108,   504,   505,   745,  -615,   788,   414,  -113,
1904      419,  -113,   788,   221,  -108,    87,  -108,  -102,   420,    87,
1905      221,    87,   -99,  -100,  -344,   737,   837,   928,   581,   214,
1906      568,   421,   411,   439,   932,   221,   427,  1040,   474,  -521,
1907      429,  -115,   631,  -115,   357,   423,   423,   279,  1045,   568,
1908     -344,  -344,  -104,  -114,  -615,  -114,   447,   203,   363,  -115,
1909      685,  -523,   229,   531,   531,  1023,  -521,   204,   569,   201,
1910      358,   359,   236,   589,  -110,   568,  -110,   523,   221,  -106,
1911      232,   482,   474,   523,   523,   457,   439,  -103,  -523,   523,
1912      523,   279,   482,  1070,   214,   931,   490,   933,   624,  -344,
1913      357,  -524,   568,   617,   -78,   453,  -112,  -103,  -112,  -109,
1914     -103,  -109,    87,   998,  -103,   669,  -102,   329,   720,   360,
1915      482,   618,  -100,   710,   693,   914,   358,   424,  -524,   280,
1916      463,   221,  -114,   569,   824,   483,  -102,   484,  -614,  -102,
1917     -526,   831,  -100,  -102,   686,  -100,   483,   214,   484,  -100,
1918      737,  -110,  -105,   472,  -525,   704,  -304,   706,   469,   569,
1919      496,   690,   691,  1032,   643,   312,   313,  -526,   790,   697,
1920      476,  -101,   508,   280,   483,   425,   484,   485,   698,   800,
1921      703,  -525,  -304,  -304,   581,   357,   569,   981,   522,   889,
1922      694,   892,   983,   951,   439,   497,   748,   951,   749,   750,
1923      751,   752,   584,   588,   439,   733,   746,   713,   734,   804,
1924      568,   358,   451,   951,   698,   279,   804,  -112,   804,   691,
1925      568,   626,   523,   203,   593,   628,   423,    87,   629,    87,
1926      357,  -304,  -528,   204,  -615,   201,  -529,  -103,   -93,   221,
1927      634,   474,   635,   865,   856,   698,   691,   644,   806,   221,
1928      279,    87,   221,   826,   664,   214,   358,   477,  -528,  -528,
1929      425,   525,  -529,  -529,   805,   214,   855,   525,   525,   689,
1930      671,  -527,  -516,   525,   525,  -519,   601,   695,  -277,   453,
1931     -109,   669,   482,   676,  1051,   221,   679,   864,   936,   411,
1932      729,   741,   439,   680,   569,   681,   812,   280,  -527,  -516,
1933     -100,   854,  -519,   602,   569,   478,  -114,  -528,   568,   835,
1934      841,  -529,   847,   695,   847,   691,  -115,   637,  -110,   700,
1935       87,   705,   804,   744,   804,   691,   516,   789,   743,   804,
1936     -295,   804,   280,    87,   531,   791,   483,   221,   484,   487,
1937      531,   531,   807,   689,   695,   329,   531,   531,    76,  -278,
1938       76,   423,   819,   214,   201,   837,  -295,  -295,   742,   443,
1939     1001,  1003,    76,    76,   825,  1006,   922,  1008,   279,  1009,
1940      444,   445,   867,    87,   861,   221,    87,   804,   868,    98,
1941      884,    98,   884,   357,   748,  -112,   749,   750,   751,   752,
1942      357,   805,   569,    98,    98,   950,  -305,    76,    76,  -109,
1943      878,   929,   352,   353,   354,  -295,   525,   884,   884,   358,
1944      585,   800,    76,   363,   691,   966,   358,   595,   800,   919,
1945      800,   879,  -305,  -305,   921,   882,   885,   674,    98,    98,
1946      886,  -611,   693,   926,   888,    76,    76,   891,   890,    76,
1947      893,   270,   918,    98,    76,   694,   609,   611,  -612,   896,
1948      901,   897,  1059,  1061,  1062,  1063,   796,   357,   586,  -110,
1949      898,    87,   902,   609,   611,   596,    98,    98,   279,   905,
1950       98,  -305,  -112,  -516,   805,    98,  1035,   441,   990,   531,
1951      907,  -279,   826,   358,   683,  1074,   699,   279,   909,   638,
1952     -519,    87,   707,   753,   711,   916,    87,   221,   714,  -516,
1953     -516,   982,   938,   460,   958,    87,  1028,   462,    87,  -109,
1954      963,   357,   754,   357,   797,    87,  -519,  -519,   782,   783,
1955     -280,   784,   994,   999,   800,  1000,   800,   997,  1002,    46,
1956       47,   800,   684,   800,   847,   363,  1005,   358,   964,   358,
1957     1026,   757,   758,  1007,  1011,  1013,  -611,   482,  -516,  1025,
1958      959,  -611,   767,  1018,    76,  1020,   836,  1033,   884,   482,
1959     1038,  -614,  1029,  -612,  1031,  -519,   759,   795,  -612,   977,
1960     1024,  -615,   482,    87,   884,    76,  1058,    76,    76,   800,
1961     1060,    76,  1066,    76,  1064,    98,   596,    76,  1027,    76,
1962      841,  1043,   449,   413,    87,    87,   415,   416,   417,   641,
1963       76,   483,    76,   484,   488,   639,    98,   373,    98,    98,
1964      390,   356,    98,   483,    98,   484,   654,   935,    98,   971,
1965       98,   749,   750,   751,   752,   732,   483,   850,   484,   659,
1966      839,    98,  1055,    98,    87,   439,    87,   703,   792,   847,
1967      808,   670,  1048,   859,    87,    41,    42,    43,    44,   691,
1968     -618,   568,    76,    76,    76,    76,    76,    76,    76,    76,
1969      866,  1054,   767,    87,   512,   409,   906,   908,  1030,    76,
1970      660,    76,   402,   625,    76,   334,   335,   627,   952,   991,
1971      221,   956,   630,    98,    98,    98,    98,    98,    98,    98,
1972       98,   949,  -618,   965,   961,   967,   214,   970,   640,     0,
1973       98,   947,    98,   642,     0,    98,    76,     0,    76,     0,
1974      515,     0,    76,    76,    76,   528,     0,     0,  -618,  -618,
1975      345,   346,     0,   821,   823,     0,   329,     0,    76,   828,
1976      830,     0,     0,     0,     0,   569,     0,    98,     0,    98,
1977        0,   342,   343,    98,    98,    98,   797,     0,     0,     0,
1978      797,     0,     0,   797,     0,   797,    76,    76,     0,    98,
1979      923,   677,   767,   924,   767,  -618,     0,  -618,     0,   927,
1980     -614,    76,   930,   482,   821,   823,     0,   828,   830,     0,
1981      767,   350,   351,   352,   353,   354,     0,    98,    98,   767,
1982     1039,   748,  1041,   749,   750,   751,   752,  1042,     0,   795,
1983        0,  1044,    98,  1046,     0,    76,   795,   614,   616,     0,
1984     1047,   307,   308,   309,   310,   311,   270,   748,   329,   749,
1985      750,   751,   752,   753,    76,  1012,  1014,   483,     0,   484,
1986      487,  1019,   613,  1021,  1022,     0,    98,     0,   870,     0,
1987        0,     0,   754,   987,   871,     0,     0,   989,     0,     0,
1988     1072,   616,     0,     0,   270,    98,  1073,     0,     0,   797,
1989        0,   797,   915,     0,   755,     0,   797,     0,   797,     0,
1990      756,   757,   758,   350,   351,   352,   353,   354,     0,     0,
1991      748,     0,   749,   750,   751,   752,   753,     0,     0,     0,
1992        0,     0,     0,     0,     0,     0,   759,     0,     0,   760,
1993      675,   767,     0,   915,     0,   754,     0,     0,  1065,  1067,
1994     1068,  1069,   795,  1037,   797,     0,   236,     0,     0,     0,
1995       76,   748,    76,   749,   750,   751,   752,   755,     0,     0,
1996        0,     0,    76,   756,   757,   758,   748,  1075,   749,   750,
1997      751,   752,    76,     0,    76,    76,     0,  1056,     0,     0,
1998        0,    98,   748,    98,   749,   750,   751,   752,   753,   759,
1999        0,     0,   760,    98,     0,   329,     0,     0,   870,   528,
2000        0,   860,     0,    98,   761,    98,    98,   754,    76,     0,
2001      342,   343,     0,   870,     0,     0,   869,     0,     0,   995,
2002        0,     0,     0,     0,     0,     0,     0,     0,     0,   755,
2003      735,     0,   736,     0,     0,     0,   757,   758,     0,    98,
2004        0,     0,     0,    76,     0,   616,   270,   347,   348,   349,
2005      350,   351,   352,   353,   354,     0,    76,    76,     0,     0,
2006       76,   759,     0,    76,    76,     0,     0,     0,     0,    76,
2007       76,     0,     0,     0,    98,     0,     0,     0,   748,     0,
2008      749,   750,   751,   752,   753,     0,     0,    98,    98,     0,
2009        0,    98,     0,   810,    98,    98,    76,     0,    76,    76,
2010       98,    98,     0,   754,     0,     0,     0,     0,     0,     0,
2011        0,     0,     0,     0,     0,   216,   216,     0,   832,   329,
2012        0,     0,     0,     0,     0,   755,     0,    98,     0,    98,
2013       98,   756,   757,   758,   342,   343,     0,     0,     0,     0,
2014        0,     0,     0,     0,     0,     0,   939,   249,   252,     0,
2015        0,     0,   216,   216,     0,     0,     0,   759,     0,     0,
2016      760,     0,     0,     0,     0,   300,   301,     0,     0,     0,
2017        0,     0,     0,   349,   350,   351,   352,   353,   354,     0,
2018        0,     0,     0,     0,    76,     0,     0,   881,     0,     0,
2019        0,     0,     0,     0,     0,     0,     0,   216,     0,     0,
2020        0,     0,    76,   988,     0,     0,     0,   992,     0,     0,
2021        0,     0,     0,     0,    76,    98,     0,     0,     0,    76,
2022       76,     0,     0,     0,     0,     0,   911,     0,    76,     0,
2023        0,    76,     0,    98,     0,     0,     0,     0,    76,     0,
2024        0,     0,     0,     0,     0,    98,     0,     0,     0,     0,
2025       98,    98,     0,     0,     0,     0,     0,     0,     0,    98,
2026        0,     0,    98,     0,     0,     0,     0,     0,   925,    98,
2027        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2028        0,     0,     0,     0,   119,   270,   119,     0,   329,  -641,
2029     -641,  -641,  -641,   334,   335,   944,    76,  -641,  -641,     0,
2030        0,     0,     0,   342,   343,   216,     0,     0,   216,   216,
2031      216,     0,   300,     0,     0,     0,     0,    76,    76,     0,
2032        0,     0,     0,     0,     0,     0,     0,    98,   216,     0,
2033      216,   216,     0,   119,   119,     0,     0,   283,   345,   346,
2034      347,   348,   349,   350,   351,   352,   353,   354,    98,    98,
2035        0,     0,     0,     0,     0,     0,     0,    76,     0,    76,
2036        0,     0,     0,   283,     0,     0,     0,    76,     0,     0,
2037        0,     0,     0,     0,     0,     0,   379,   389,   389,     0,
2038        0,     0,     0,     0,     0,     0,    76,     0,    98,     0,
2039       98,     0,     0,     0,     0,     0,     0,     0,    98,     0,
2040        0,     0,     0,    76,     0,     0,     0,     0,     0,     0,
2041      329,   330,   331,   332,   333,   334,   335,    98,     0,   338,
2042      339,     0,   216,     0,     0,   342,   343,   527,   533,   534,
2043      535,   536,   537,     0,    98,   538,   539,   540,   541,   542,
2044      543,   544,   545,   546,     0,     0,   547,   548,   549,   550,
2045      551,   552,   553,   554,   555,   556,     0,     0,     0,   216,
2046      345,   346,   347,   348,   349,   350,   351,   352,   353,   354,
2047        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2048        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2049      119,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2050        0,     0,     0,     0,     0,     0,     0,     0,     0,   608,
2051      608,     0,     0,     0,     0,     0,     0,     0,   608,   216,
2052      216,     0,     0,   119,   216,   119,   608,   608,   216,     0,
2053        0,     0,     0,     0,     0,     0,   119,     0,   119,     0,
2054        0,     0,     0,     0,     0,     0,     0,   633,     0,     0,
2055        0,     0,   608,     0,     0,     0,     0,     0,     0,   283,
2056        0,     0,     0,   216,     0,     0,   216,   115,     0,   115,
2057        0,     0,     0,     0,     0,     0,     0,   216,     0,     0,
2058        0,     0,     0,     0,     0,     0,     0,     0,   119,     0,
2059        0,     0,     0,   119,     0,   663,     0,     0,     0,     0,
2060        0,     0,     0,     0,     0,     0,     0,   119,   283,     0,
2061      532,     0,   216,     0,     0,     0,   115,   115,     0,     0,
2062      281,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2063        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2064        0,     0,     0,     0,   119,     0,   281,     0,   119,     0,
2065      119,     0,     0,     0,     0,     0,     0,     0,     0,   377,
2066      387,   387,   387,     0,     0,     0,     0,     0,     0,     0,
2067        0,     0,     0,     0,     0,     0,   116,     0,   116,     0,
2068        0,   216,     0,     0,     0,   216,     0,     0,     0,     0,
2069        0,     0,   532,   532,     0,   216,     0,     0,     0,     0,
2070        0,     0,     0,     0,    83,     0,    83,     0,     0,     0,
2071        0,     0,   216,     0,   216,     0,     0,     0,     0,     0,
2072        0,     0,     0,     0,     0,   116,   116,   216,   216,   282,
2073        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2074        0,   119,     0,     0,     0,     0,     0,     0,     0,     0,
2075        0,     0,     0,    83,    83,   282,     0,     0,   283,     0,
2076        0,     0,     0,     0,     0,     0,     0,     0,   378,   388,
2077      388,   388,     0,   115,     0,   216,     0,     0,     0,     0,
2078      608,   813,     0,   216,     0,     0,   608,   608,     0,     0,
2079        0,     0,   608,   608,     0,     0,   374,     0,     0,     0,
2080      216,     0,   283,     0,     0,     0,   115,     0,   115,     0,
2081        0,     0,     0,     0,     0,     0,     0,     0,     0,   115,
2082        0,   115,     0,     0,     0,     0,     0,     0,     0,     0,
2083        0,     0,     0,     0,     0,     0,     0,   608,   608,     0,
2084      608,   608,   281,     0,   329,   330,   331,   332,   333,   334,
2085      335,   336,     0,   338,   339,     0,   119,     0,   119,   342,
2086      343,     0,     0,     0,     0,     0,     0,     0,     0,   216,
2087        0,   115,     0,     0,     0,     0,   115,     0,     0,     0,
2088      119,     0,   116,     0,     0,     0,     0,     0,     0,     0,
2089      115,   281,     0,     0,   345,   346,   347,   348,   349,   350,
2090      351,   352,   353,   354,     0,     0,     0,     0,   216,     0,
2091       83,     0,     0,     0,     0,   116,     0,   116,   913,     0,
2092        0,     0,     0,     0,     0,   608,   283,   115,   116,     0,
2093      116,   115,     0,   115,     0,   786,     0,     0,     0,     0,
2094        0,     0,     0,    83,     0,    83,     0,     0,     0,   119,
2095      216,   282,     0,     0,     0,     0,    83,     0,    83,     0,
2096        0,   283,   119,   532,     0,     0,   608,   216,     0,   532,
2097      532,     0,     0,     0,     0,   532,   532,   216,     0,     0,
2098      116,     0,     0,     0,     0,   116,     0,     0,     0,     0,
2099        0,     0,     0,     0,     0,     0,     0,     0,     0,   116,
2100      282,     0,   119,     0,     0,   119,  -640,     0,    83,     0,
2101      118,     0,   118,    83,  -640,  -640,  -640,     0,     0,  -640,
2102     -640,  -640,     0,  -640,   115,     0,     0,    83,     0,     0,
2103      526,     0,  -640,  -640,     0,     0,   116,     0,     0,     0,
2104      116,   281,   116,  -640,  -640,     0,  -640,  -640,  -640,  -640,
2105     -640,     0,     0,     0,     0,     0,     0,     0,     0,   118,
2106      118,     0,     0,     0,    83,     0,     0,     0,    83,     0,
2107       83,     0,     0,     0,  -640,     0,     0,     0,     0,   389,
2108        0,     0,     0,     0,     0,   281,     0,     0,     0,     0,
2109      119,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2110     -640,  -640,     0,     0,     0,     0,     0,     0,   532,     0,
2111        0,     0,   526,   526,     0,     0,     0,     0,     0,     0,
2112      119,     0,     0,     0,  -640,   119,   216,     0,     0,     0,
2113        0,     0,     0,   116,   119,     0,     0,   119,     0,   115,
2114        0,   115,     0,     0,   119,     0,     0,  -640,  -640,     0,
2115      282,     0,   232,  -640,     0,  -640,     0,  -640,     0,     0,
2116        0,    83,     0,   115,     0,     0,     0,     0,     0,     0,
2117        0,     0,     0,     0,     0,     0,     0,     0,     0,   389,
2118        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2119        0,     0,     0,     0,   282,     0,     0,     0,   980,     0,
2120        0,     0,   119,     0,     0,     0,     0,     0,     0,   281,
2121        0,     0,     0,     0,     0,     0,   118,     0,     0,     0,
2122        0,     0,     0,   119,   119,     0,     0,     0,     0,     0,
2123        0,     0,   115,     0,     0,     0,     0,     0,     0,     0,
2124        0,     0,     0,     0,   281,   115,     0,     0,   116,   118,
2125      116,   118,     0,     0,     0,     0,     0,     0,     0,     0,
2126        0,     0,   118,   119,   118,   119,     0,     0,     0,     0,
2127        0,     0,   116,   119,     0,     0,    83,     0,    83,     0,
2128        0,     0,     0,     0,     0,   115,     0,     0,   115,     0,
2129        0,     0,   119,     0,     0,     0,     0,     0,     0,     0,
2130       83,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2131        0,     0,     0,     0,   118,     0,     0,     0,   282,   118,
2132        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2133        0,     0,     0,   118,     0,     0,   118,     0,     0,     0,
2134        0,   116,     0,     0,     0,     0,     0,     0,     0,     0,
2135        0,     0,     0,   282,   116,     0,     0,     0,     0,     0,
2136        0,     0,   387,     0,     0,     0,     0,     0,     0,    83,
2137      118,     0,     0,   115,   118,     0,   118,     0,     0,     0,
2138        0,     0,    83,   526,     0,     0,     0,     0,     0,   526,
2139      526,     0,     0,     0,   116,   526,   526,   116,     0,     0,
2140        0,     0,     0,   115,     0,   682,     0,     0,   115,     0,
2141        0,     0,     0,     0,     0,     0,     0,   115,   118,   118,
2142      115,     0,    83,     0,     0,    83,     0,   115,     0,     0,
2143        0,     0,     0,     0,     0,     0,     0,     0,   329,   330,
2144      331,   332,   333,   334,   335,   336,   337,   338,   339,   340,
2145      341,     0,     0,   342,   343,     0,     0,     0,     0,     0,
2146        0,     0,   387,     0,     0,     0,     0,   118,     0,     0,
2147        0,   388,     0,     0,     0,     0,     0,     0,     0,     0,
2148        0,   978,   116,     0,     0,   115,   344,     0,   345,   346,
2149      347,   348,   349,   350,   351,   352,   353,   354,     0,     0,
2150        0,     0,     0,     0,     0,  -252,   115,   115,     0,     0,
2151       83,     0,   116,     0,     0,     0,     0,   116,     0,     0,
2152        0,     0,     0,     0,     0,     0,   116,     0,   526,   116,
2153        0,     0,     0,     0,     0,     0,   116,     0,     0,     0,
2154       83,     0,     0,     0,     0,    83,   115,     0,   115,     0,
2155        0,     0,     0,     0,    83,     0,   115,    83,     0,     0,
2156        0,     0,     0,     0,    83,     0,     0,     0,     0,     0,
2157        0,   388,     0,     0,     0,   115,     0,     0,     0,     0,
2158        0,     0,   118,     0,   118,     0,     0,     0,     0,     0,
2159      979,     0,     0,     0,   116,     0,     0,     0,     0,     0,
2160        0,     0,     0,     0,     0,     0,   118,     0,     0,     0,
2161        0,     0,     0,     0,     0,   116,   116,     0,   976,     0,
2162        0,     0,    83,     0,     0,     0,     0,     0,     0,     0,
2163        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2164        0,     0,     0,    83,    83,     0,     0,     0,     0,     0,
2165        0,     0,     0,     0,     0,   116,     0,   116,     0,     0,
2166        0,     0,     0,     0,     0,   116,     0,     0,     0,     0,
2167        0,     0,     0,     0,     0,   118,     0,     0,     0,     0,
2168        0,     0,     0,    83,   116,    83,     0,     0,   118,   118,
2169        5,     6,     7,    83,     9,   118,   118,     0,    10,    11,
2170        0,   118,   118,    12,     0,    13,    14,    15,   244,   245,
2171       18,    19,    83,     0,     0,     0,     0,    20,   246,   247,
2172       23,    24,    25,    26,     0,     0,   205,     0,   118,     0,
2173        0,   118,     0,   274,     0,     0,    32,    33,    34,    35,
2174       36,    37,    38,    39,    40,     0,    41,    42,    43,    44,
2175        0,    45,    46,    47,     0,     0,     0,     0,     0,     0,
2176        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2177        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2178        0,     0,     0,   275,     0,     0,   208,    52,     0,    53,
2179       54,     0,     0,     0,     0,    56,    57,    58,    59,    60,
2180       61,    62,    63,    64,     0,     0,     0,     0,     0,     0,
2181        0,     0,  -618,     0,     0,     0,   118,     0,     0,     0,
2182     -618,  -618,  -618,     0,   276,  -618,  -618,  -618,     0,  -618,
2183        0,   277,     0,     0,   118,     0,     0,     0,  -618,  -618,
2184     -618,  -618,     0,     0,     0,     0,   118,     0,     0,  -618,
2185     -618,   118,  -618,  -618,  -618,  -618,  -618,     0,     0,     0,
2186      118,     0,     0,   118,     0,     0,     0,     0,     0,     0,
2187      118,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2188     -618,     0,     0,     0,     0,     0,     0,     0,     0,  -618,
2189     -618,  -618,  -618,  -618,  -618,  -618,  -618,  -618,  -618,  -618,
2190     -618,  -618,     0,     0,  -618,  -618,  -618,  -618,     0,   738,
2191     -618,     0,     0,     0,     0,     0,  -618,     0,     0,     0,
2192        0,     0,     0,     0,     0,     0,     0,     0,   118,     0,
2193     -618,     0,     0,  -618,     0,     0,  -111,  -618,  -618,  -618,
2194     -618,  -618,  -618,  -618,  -618,  -618,  -618,  -618,  -618,   118,
2195      118,     0,     0,  -618,  -618,  -618,  -618,     0,     0,  -618,
2196     -618,  -618,     0,  -618,     0,     0,     0,     0,     0,     0,
2197        0,     0,     0,     0,  -640,     4,     0,     5,     6,     7,
2198        8,     9,     0,     0,     0,    10,    11,     0,     0,   118,
2199       12,   118,    13,    14,    15,    16,    17,    18,    19,   118,
2200        0,     0,     0,     0,    20,    21,    22,    23,    24,    25,
2201       26,     0,     0,    27,     0,     0,     0,     0,   118,    28,
2202       29,    30,    31,    32,    33,    34,    35,    36,    37,    38,
2203       39,    40,     0,    41,    42,    43,    44,     0,    45,    46,
2204       47,     0,     0,     0,     0,     0,     0,     0,     0,    48,
2205       49,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2206        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2207       50,     0,     0,    51,    52,     0,    53,    54,     0,    55,
2208        0,     0,    56,    57,    58,    59,    60,    61,    62,    63,
2209       64,  -516,     0,     0,     0,     0,     0,     0,     0,  -516,
2210     -516,  -516,     0,     0,  -516,  -516,  -516,     0,  -516,     0,
2211        0,    65,    66,    67,     0,     0,  -516,     0,  -516,  -516,
2212     -516,     0,     0,  -640,     0,  -640,     0,     0,  -516,  -516,
2213        0,  -516,  -516,  -516,  -516,  -516,     0,     0,     0,     0,
2214        0,     0,     0,     0,     0,     0,   329,   330,   331,   332,
2215      333,   334,   335,   336,   337,   338,   339,   340,   341,  -516,
2216        0,   342,   343,     0,     0,     0,     0,     0,  -516,  -516,
2217     -516,  -516,  -516,  -516,  -516,  -516,  -516,  -516,  -516,  -516,
2218     -516,     0,     0,  -516,  -516,  -516,  -516,     0,  -516,  -516,
2219        0,     0,     0,     0,   344,  -516,   345,   346,   347,   348,
2220      349,   350,   351,   352,   353,   354,     0,     0,     0,  -516,
2221        0,     0,  -516,     0,     0,  -516,  -516,  -516,  -516,  -516,
2222     -516,  -516,  -516,  -516,  -516,  -516,  -516,  -516,     0,     0,
2223        0,     0,     0,  -516,  -516,  -516,  -519,     0,  -516,  -516,
2224     -516,     0,  -516,     0,  -519,  -519,  -519,     0,     0,  -519,
2225     -519,  -519,     0,  -519,     0,     0,     0,     0,   682,     0,
2226        0,  -519,     0,  -519,  -519,  -519,     0,     0,     0,     0,
2227        0,     0,     0,  -519,  -519,     0,  -519,  -519,  -519,  -519,
2228     -519,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2229        0,   329,   330,   331,   332,   333,   334,   335,   336,   337,
2230      338,   339,   340,   341,  -519,     0,   342,   343,     0,     0,
2231        0,     0,     0,  -519,  -519,  -519,  -519,  -519,  -519,  -519,
2232     -519,  -519,  -519,  -519,  -519,  -519,     0,     0,  -519,  -519,
2233     -519,  -519,     0,  -519,  -519,     0,     0,     0,     0,   344,
2234     -519,   345,   346,   347,   348,   349,   350,   351,   352,   353,
2235      354,     0,     0,     0,  -519,     0,     0,  -519,     0,     0,
2236     -519,  -519,  -519,  -519,  -519,  -519,  -519,  -519,  -519,  -519,
2237     -519,  -519,  -519,     0,     0,     0,     0,     0,  -519,  -519,
2238     -519,  -619,     0,  -519,  -519,  -519,     0,  -519,     0,  -619,
2239     -619,  -619,     0,     0,  -619,  -619,  -619,     0,  -619,     0,
2240        0,     0,     0,     0,     0,     0,     0,  -619,  -619,  -619,
2241     -619,     0,     0,     0,     0,     0,     0,     0,  -619,  -619,
2242        0,  -619,  -619,  -619,  -619,  -619,     0,     0,     0,     0,
2243        0,     0,     0,     0,     0,     0,   329,   330,   331,   332,
2244      333,   334,   335,   336,   337,   338,   339,  -641,  -641,  -619,
2245        0,   342,   343,     0,     0,     0,     0,     0,  -619,  -619,
2246     -619,  -619,  -619,  -619,  -619,  -619,  -619,  -619,  -619,  -619,
2247     -619,     0,     0,  -619,  -619,  -619,  -619,     0,     0,  -619,
2248        0,     0,     0,     0,     0,  -619,   345,   346,   347,   348,
2249      349,   350,   351,   352,   353,   354,     0,     0,     0,  -619,
2250        0,     0,  -619,     0,     0,     0,  -619,  -619,  -619,  -619,
2251     -619,  -619,  -619,  -619,  -619,  -619,  -619,  -619,     0,     0,
2252        0,     0,  -619,  -619,  -619,  -619,  -620,     0,  -619,  -619,
2253     -619,     0,  -619,     0,  -620,  -620,  -620,     0,     0,  -620,
2254     -620,  -620,     0,  -620,     0,     0,     0,     0,     0,     0,
2255        0,     0,  -620,  -620,  -620,  -620,     0,     0,     0,     0,
2256        0,     0,     0,  -620,  -620,     0,  -620,  -620,  -620,  -620,
2257     -620,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2258        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2259        0,     0,     0,     0,  -620,     0,     0,     0,     0,     0,
2260        0,     0,     0,  -620,  -620,  -620,  -620,  -620,  -620,  -620,
2261     -620,  -620,  -620,  -620,  -620,  -620,     0,     0,  -620,  -620,
2262     -620,  -620,     0,     0,  -620,     0,     0,     0,     0,     0,
2263     -620,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2264        0,     0,     0,     0,  -620,     0,     0,  -620,     0,     0,
2265        0,  -620,  -620,  -620,  -620,  -620,  -620,  -620,  -620,  -620,
2266     -620,  -620,  -620,     0,     0,     0,     0,  -620,  -620,  -620,
2267     -620,  -304,     0,  -620,  -620,  -620,     0,  -620,     0,  -304,
2268     -304,  -304,     0,     0,  -304,  -304,  -304,     0,  -304,     0,
2269        0,     0,     0,     0,     0,     0,     0,     0,  -304,  -304,
2270     -304,     0,     0,     0,     0,     0,     0,     0,  -304,  -304,
2271        0,  -304,  -304,  -304,  -304,  -304,     0,     0,     0,     0,
2272        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2273        0,     0,     0,     0,     0,     0,     0,     0,     0,  -304,
2274        0,     0,     0,     0,     0,     0,     0,     0,  -304,  -304,
2275     -304,  -304,  -304,  -304,  -304,  -304,  -304,  -304,  -304,  -304,
2276     -304,     0,     0,  -304,  -304,  -304,  -304,     0,   739,  -304,
2277        0,     0,     0,     0,     0,  -304,     0,     0,     0,     0,
2278        0,     0,     0,     0,     0,     0,     0,     0,     0,  -304,
2279        0,     0,  -304,     0,     0,  -113,  -304,  -304,  -304,  -304,
2280     -304,  -304,  -304,  -304,  -304,  -304,  -304,  -304,     0,     0,
2281        0,     0,     0,  -304,  -304,  -304,  -440,     0,  -304,  -304,
2282     -304,     0,  -304,     0,  -440,  -440,  -440,     0,     0,  -440,
2283     -440,  -440,     0,  -440,     0,     0,     0,     0,     0,     0,
2284        0,     0,  -440,  -440,  -440,     0,     0,     0,     0,     0,
2285        0,     0,     0,  -440,  -440,     0,  -440,  -440,  -440,  -440,
2286     -440,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2287        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2288        0,     0,     0,     0,  -440,     0,     0,     0,     0,     0,
2289        0,     0,     0,  -440,  -440,  -440,  -440,  -440,  -440,  -440,
2290     -440,  -440,  -440,  -440,  -440,  -440,     0,     0,  -440,  -440,
2291     -440,  -440,     0,     0,  -440,     0,     0,     0,     0,     0,
2292     -440,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2293        0,     0,     0,     0,  -440,     0,     0,     0,     0,     0,
2294        0,  -440,     0,  -440,  -440,  -440,  -440,  -440,  -440,  -440,
2295     -440,  -440,  -440,     0,     0,     0,     0,  -440,  -440,  -440,
2296     -440,  -296,   232,  -440,  -440,  -440,     0,  -440,     0,  -296,
2297     -296,  -296,     0,     0,  -296,  -296,  -296,     0,  -296,     0,
2298        0,     0,     0,     0,     0,     0,     0,     0,  -296,  -296,
2299     -296,     0,     0,     0,     0,     0,     0,     0,  -296,  -296,
2300        0,  -296,  -296,  -296,  -296,  -296,     0,     0,     0,     0,
2301        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2302        0,     0,     0,     0,     0,     0,     0,     0,     0,  -296,
2303        0,     0,     0,     0,     0,     0,     0,     0,  -296,  -296,
2304     -296,  -296,  -296,  -296,  -296,  -296,  -296,  -296,  -296,  -296,
2305     -296,     0,     0,  -296,  -296,  -296,  -296,     0,     0,  -296,
2306        0,     0,     0,     0,     0,  -296,     0,     0,     0,     0,
2307        0,     0,     0,     0,     0,     0,     0,     0,     0,  -296,
2308        0,     0,  -296,     0,     0,     0,  -296,  -296,  -296,  -296,
2309     -296,  -296,  -296,  -296,  -296,  -296,  -296,  -296,     0,     0,
2310        0,     0,     0,  -296,  -296,  -296,  -640,     0,  -296,  -296,
2311     -296,     0,  -296,     0,  -640,  -640,  -640,     0,     0,  -640,
2312     -640,  -640,     0,  -640,     0,     0,     0,     0,     0,     0,
2313        0,     0,  -640,  -640,  -640,     0,     0,     0,     0,     0,
2314        0,     0,     0,  -640,  -640,     0,  -640,  -640,  -640,  -640,
2315     -640,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2316        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2317        0,     0,     0,     0,  -640,     0,     0,     0,     0,     0,
2318        0,     0,     0,  -640,  -640,  -640,  -640,  -640,  -640,  -640,
2319     -640,  -640,  -640,  -640,  -640,  -640,     0,     0,  -640,  -640,
2320     -640,  -640,     0,     0,  -640,     0,     0,     0,     0,     0,
2321     -640,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2322        0,     0,     0,     0,  -640,     0,     0,     0,     0,     0,
2323        0,  -640,     0,  -640,  -640,  -640,  -640,  -640,  -640,  -640,
2324     -640,  -640,  -640,     0,     0,     0,     0,  -640,  -640,  -640,
2325     -640,  -311,   232,  -640,  -640,  -640,     0,  -640,     0,  -311,
2326     -311,  -311,     0,     0,  -311,  -311,  -311,     0,  -311,     0,
2327        0,     0,     0,     0,     0,     0,     0,     0,  -311,  -311,
2328        0,     0,     0,     0,     0,     0,     0,     0,  -311,  -311,
2329        0,  -311,  -311,  -311,  -311,  -311,     0,     0,     0,     0,
2330        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2331        0,     0,     0,     0,     0,     0,     0,     0,     0,  -311,
2332        0,     0,     0,     0,     0,     0,     0,     0,  -311,  -311,
2333     -311,  -311,  -311,  -311,  -311,  -311,  -311,  -311,  -311,  -311,
2334     -311,     0,     0,  -311,  -311,  -311,  -311,     0,     0,  -311,
2335        0,     0,     0,     0,     0,  -311,     0,     0,     0,     0,
2336        0,     0,     0,     0,     0,     0,     0,     0,     0,  -311,
2337        0,     0,     0,     0,     0,     0,  -311,     0,  -311,  -311,
2338     -311,  -311,  -311,  -311,  -311,  -311,  -311,  -311,     0,     0,
2339        0,     0,     0,  -311,  -311,  -311,  -618,   229,  -311,  -311,
2340     -311,     0,  -311,     0,  -618,  -618,  -618,     0,     0,     0,
2341     -618,  -618,     0,  -618,     0,     0,     0,     0,     0,     0,
2342        0,     0,  -618,     0,     0,     0,     0,     0,     0,     0,
2343        0,     0,     0,  -618,  -618,     0,  -618,  -618,  -618,  -618,
2344     -618,     0,     0,     0,   329,   330,   331,   332,   333,   334,
2345      335,   336,   337,   338,   339,   340,   341,     0,     0,   342,
2346      343,     0,     0,     0,  -618,     0,     0,     0,     0,     0,
2347        0,     0,     0,  -618,  -618,  -618,  -618,  -618,  -618,  -618,
2348     -618,  -618,  -618,  -618,  -618,  -618,     0,     0,  -618,  -618,
2349     -618,  -618,   344,   687,   345,   346,   347,   348,   349,   350,
2350      351,   352,   353,   354,     0,     0,     0,     0,     0,     0,
2351        0,     0,     0,     0,  -618,     0,     0,     0,   236,     0,
2352     -111,  -618,     0,  -618,  -618,  -618,  -618,  -618,  -618,  -618,
2353     -618,  -618,  -618,     0,     0,     0,     0,  -618,  -618,  -618,
2354     -102,  -618,     0,  -618,     0,  -618,     0,  -618,     0,  -618,
2355     -618,  -618,     0,     0,     0,  -618,  -618,     0,  -618,     0,
2356        0,     0,     0,     0,     0,     0,     0,  -618,     0,     0,
2357        0,     0,     0,     0,     0,     0,     0,     0,  -618,  -618,
2358        0,  -618,  -618,  -618,  -618,  -618,     0,     0,     0,     0,
2359        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2360        0,     0,     0,     0,     0,     0,     0,     0,     0,  -618,
2361        0,     0,     0,     0,     0,     0,     0,     0,  -618,  -618,
2362     -618,  -618,  -618,  -618,  -618,  -618,  -618,  -618,  -618,  -618,
2363     -618,     0,     0,  -618,  -618,  -618,  -618,     0,   687,     0,
2364        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2365        0,     0,     0,     0,     0,     0,     0,     0,     0,  -618,
2366        0,     0,     0,     0,     0,  -111,  -618,     0,  -618,  -618,
2367     -618,  -618,  -618,  -618,  -618,  -618,  -618,  -618,     0,     0,
2368        0,     0,  -618,  -618,  -618,  -618,  -304,     0,  -618,     0,
2369     -618,     0,  -618,     0,  -304,  -304,  -304,     0,     0,     0,
2370     -304,  -304,     0,  -304,     0,     0,     0,     0,     0,     0,
2371        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2372        0,     0,     0,  -304,  -304,     0,  -304,  -304,  -304,  -304,
2373     -304,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2374        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2375        0,     0,     0,     0,  -304,     0,     0,     0,     0,     0,
2376        0,     0,     0,  -304,  -304,  -304,  -304,  -304,  -304,  -304,
2377     -304,  -304,  -304,  -304,  -304,  -304,     0,     0,  -304,  -304,
2378     -304,  -304,     0,   688,     0,     0,     0,     0,     0,     0,
2379        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2380        0,     0,     0,     0,  -304,     0,     0,     0,     0,     0,
2381     -113,  -304,     0,  -304,  -304,  -304,  -304,  -304,  -304,  -304,
2382     -304,  -304,  -304,     0,     0,     0,     0,     0,  -304,  -304,
2383     -104,  -304,     0,  -304,     0,  -304,     0,  -304,     0,  -304,
2384     -304,  -304,     0,     0,     0,  -304,  -304,     0,  -304,     0,
2385        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2386        0,     0,     0,     0,     0,     0,     0,     0,  -304,  -304,
2387        0,  -304,  -304,  -304,  -304,  -304,     0,     0,     0,     0,
2388        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2389        0,     0,     0,     0,     0,     0,     0,     0,     0,  -304,
2390        0,     0,     0,     0,     0,     0,     0,     0,  -304,  -304,
2391     -304,  -304,  -304,  -304,  -304,  -304,  -304,  -304,  -304,  -304,
2392     -304,     0,     0,  -304,  -304,  -304,  -304,     0,   688,     0,
2393        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2394        0,     0,     0,     0,     0,     0,     0,     0,     0,  -304,
2395        0,     0,     0,     0,     0,  -113,  -304,     0,  -304,  -304,
2396     -304,  -304,  -304,  -304,  -304,  -304,  -304,  -304,     0,     0,
2397        0,     0,     0,  -304,  -304,  -304,     0,     0,  -304,     0,
2398     -304,   254,  -304,     5,     6,     7,     8,     9,  -640,  -640,
2399     -640,    10,    11,     0,     0,  -640,    12,     0,    13,    14,
2400       15,    16,    17,    18,    19,     0,     0,     0,     0,     0,
2401       20,    21,    22,    23,    24,    25,    26,     0,     0,    27,
2402        0,     0,     0,     0,     0,    28,    29,   255,    31,    32,
2403       33,    34,    35,    36,    37,    38,    39,    40,     0,    41,
2404       42,    43,    44,     0,    45,    46,    47,     0,     0,     0,
2405        0,     0,     0,     0,     0,    48,    49,     0,     0,     0,
2406        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2407        0,     0,     0,     0,     0,     0,    50,     0,     0,    51,
2408       52,     0,    53,    54,     0,    55,     0,     0,    56,    57,
2409       58,    59,    60,    61,    62,    63,    64,     0,     0,     0,
2410        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2411        0,     0,     0,     0,     0,     0,     0,    65,    66,    67,
2412        0,     0,     0,     0,     0,     0,     0,     0,     0,  -640,
2413      254,  -640,     5,     6,     7,     8,     9,     0,     0,  -640,
2414       10,    11,     0,  -640,  -640,    12,     0,    13,    14,    15,
2415       16,    17,    18,    19,     0,     0,     0,     0,     0,    20,
2416       21,    22,    23,    24,    25,    26,     0,     0,    27,     0,
2417        0,     0,     0,     0,    28,    29,   255,    31,    32,    33,
2418       34,    35,    36,    37,    38,    39,    40,     0,    41,    42,
2419       43,    44,     0,    45,    46,    47,     0,     0,     0,     0,
2420        0,     0,     0,     0,    48,    49,     0,     0,     0,     0,
2421        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2422        0,     0,     0,     0,     0,    50,     0,     0,    51,    52,
2423        0,    53,    54,     0,    55,     0,     0,    56,    57,    58,
2424       59,    60,    61,    62,    63,    64,     0,     0,     0,     0,
2425        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2426        0,     0,     0,     0,     0,     0,    65,    66,    67,     0,
2427        0,     0,     0,     0,     0,     0,     0,     0,  -640,   254,
2428     -640,     5,     6,     7,     8,     9,     0,     0,  -640,    10,
2429       11,     0,     0,  -640,    12,  -640,    13,    14,    15,    16,
2430       17,    18,    19,     0,     0,     0,     0,     0,    20,    21,
2431       22,    23,    24,    25,    26,     0,     0,    27,     0,     0,
2432        0,     0,     0,    28,    29,   255,    31,    32,    33,    34,
2433       35,    36,    37,    38,    39,    40,     0,    41,    42,    43,
2434       44,     0,    45,    46,    47,     0,     0,     0,     0,     0,
2435        0,     0,     0,    48,    49,     0,     0,     0,     0,     0,
2436        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2437        0,     0,     0,     0,    50,     0,     0,    51,    52,     0,
2438       53,    54,     0,    55,     0,     0,    56,    57,    58,    59,
2439       60,    61,    62,    63,    64,     0,     0,     0,     0,     0,
2440        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2441        0,     0,     0,     0,     0,    65,    66,    67,     0,     0,
2442        0,     0,     0,     0,     0,     0,     0,  -640,   254,  -640,
2443        5,     6,     7,     8,     9,     0,     0,  -640,    10,    11,
2444        0,     0,  -640,    12,     0,    13,    14,    15,    16,    17,
2445       18,    19,     0,     0,     0,     0,     0,    20,    21,    22,
2446       23,    24,    25,    26,     0,     0,    27,     0,     0,     0,
2447        0,     0,    28,    29,   255,    31,    32,    33,    34,    35,
2448       36,    37,    38,    39,    40,     0,    41,    42,    43,    44,
2449        0,    45,    46,    47,     0,     0,     0,     0,     0,     0,
2450        0,     0,    48,    49,     0,     0,     0,     0,     0,     0,
2451        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2452        0,     0,     0,    50,     0,     0,    51,    52,     0,    53,
2453       54,     0,    55,     0,     0,    56,    57,    58,    59,    60,
2454       61,    62,    63,    64,     0,     0,     0,     0,     0,     0,
2455        0,     0,   254,     0,     5,     6,     7,     8,     9,     0,
2456     -640,  -640,    10,    11,    65,    66,    67,    12,     0,    13,
2457       14,    15,    16,    17,    18,    19,  -640,     0,  -640,     0,
2458        0,    20,    21,    22,    23,    24,    25,    26,     0,     0,
2459       27,     0,     0,     0,     0,     0,    28,    29,   255,    31,
2460       32,    33,    34,    35,    36,    37,    38,    39,    40,     0,
2461       41,    42,    43,    44,     0,    45,    46,    47,     0,     0,
2462        0,     0,     0,     0,     0,     0,    48,    49,     0,     0,
2463        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2464        0,     0,     0,     0,     0,     0,     0,    50,     0,     0,
2465       51,    52,     0,    53,    54,     0,    55,     0,     0,    56,
2466       57,    58,    59,    60,    61,    62,    63,    64,     0,     0,
2467        0,     0,     0,     0,     0,     0,   254,     0,     5,     6,
2468        7,     8,     9,     0,     0,     0,    10,    11,    65,    66,
2469       67,    12,     0,    13,    14,    15,    16,    17,    18,    19,
2470     -640,     0,  -640,     0,     0,    20,    21,    22,    23,    24,
2471       25,    26,     0,     0,    27,     0,     0,     0,     0,     0,
2472       28,    29,   255,    31,    32,    33,    34,    35,    36,    37,
2473       38,    39,    40,     0,    41,    42,    43,    44,     0,    45,
2474       46,    47,     0,     0,     0,     0,     0,     0,     0,     0,
2475       48,    49,     0,     0,     0,     0,     0,     0,     0,     0,
2476        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2477        0,    50,     0,     0,   256,    52,     0,    53,    54,     0,
2478       55,     0,     0,    56,    57,    58,    59,    60,    61,    62,
2479       63,    64,     0,     0,     0,     0,     0,     0,     0,     0,
2480        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2481        0,     0,    65,    66,    67,     0,     0,     0,     0,     0,
2482        0,     0,  -640,     0,  -640,   254,  -640,     5,     6,     7,
2483        8,     9,     0,     0,     0,    10,    11,     0,     0,     0,
2484       12,     0,    13,    14,    15,    16,    17,    18,    19,     0,
2485        0,     0,     0,     0,    20,    21,    22,    23,    24,    25,
2486       26,     0,     0,    27,     0,     0,     0,     0,     0,    28,
2487       29,   255,    31,    32,    33,    34,    35,    36,    37,    38,
2488       39,    40,     0,    41,    42,    43,    44,     0,    45,    46,
2489       47,     0,     0,     0,     0,     0,     0,     0,     0,    48,
2490       49,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2491        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2492       50,     0,     0,    51,    52,     0,    53,    54,     0,    55,
2493        0,     0,    56,    57,    58,    59,    60,    61,    62,    63,
2494       64,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2495        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2496        0,    65,    66,    67,     0,     0,     0,     0,     0,     0,
2497        0,  -640,     0,  -640,     4,  -640,     5,     6,     7,     8,
2498        9,     0,     0,     0,    10,    11,     0,     0,     0,    12,
2499        0,    13,    14,    15,    16,    17,    18,    19,     0,     0,
2500        0,     0,     0,    20,    21,    22,    23,    24,    25,    26,
2501        0,     0,    27,     0,     0,     0,     0,     0,    28,    29,
2502       30,    31,    32,    33,    34,    35,    36,    37,    38,    39,
2503       40,     0,    41,    42,    43,    44,     0,    45,    46,    47,
2504        0,     0,     0,     0,     0,     0,     0,     0,    48,    49,
2505        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2506        0,     0,     0,     0,     0,     0,     0,     0,     0,    50,
2507        0,     0,    51,    52,     0,    53,    54,     0,    55,     0,
2508        0,    56,    57,    58,    59,    60,    61,    62,    63,    64,
2509        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2510        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2511       65,    66,    67,     0,     0,  -640,     0,     0,     0,     0,
2512        0,     0,  -640,   254,  -640,     5,     6,     7,     8,     9,
2513        0,     0,     0,    10,    11,     0,     0,     0,    12,     0,
2514       13,    14,    15,    16,    17,    18,    19,     0,     0,     0,
2515        0,     0,    20,    21,    22,    23,    24,    25,    26,     0,
2516        0,    27,     0,     0,     0,     0,     0,    28,    29,   255,
2517       31,    32,    33,    34,    35,    36,    37,    38,    39,    40,
2518        0,    41,    42,    43,    44,     0,    45,    46,    47,     0,
2519        0,     0,     0,     0,     0,     0,     0,    48,    49,     0,
2520        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2521        0,     0,     0,     0,     0,     0,     0,     0,    50,     0,
2522        0,    51,    52,     0,    53,    54,     0,    55,     0,     0,
2523       56,    57,    58,    59,    60,    61,    62,    63,    64,     0,
2524        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2525        0,     0,     0,     0,     0,     0,     0,     0,     0,    65,
2526       66,    67,     0,     0,  -640,     0,     0,     0,     0,     0,
2527        0,  -640,   254,  -640,     5,     6,     7,     8,     9,     0,
2528        0,  -640,    10,    11,     0,     0,     0,    12,     0,    13,
2529       14,    15,    16,    17,    18,    19,     0,     0,     0,     0,
2530        0,    20,    21,    22,    23,    24,    25,    26,     0,     0,
2531       27,     0,     0,     0,     0,     0,    28,    29,   255,    31,
2532       32,    33,    34,    35,    36,    37,    38,    39,    40,     0,
2533       41,    42,    43,    44,     0,    45,    46,    47,     0,     0,
2534        0,     0,     0,     0,     0,     0,    48,    49,     0,     0,
2535        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2536        0,     0,     0,     0,     0,     0,     0,    50,     0,     0,
2537       51,    52,     0,    53,    54,     0,    55,     0,     0,    56,
2538       57,    58,    59,    60,    61,    62,    63,    64,     0,     0,
2539        0,     0,     0,     0,     0,     0,   254,     0,     5,     6,
2540        7,     8,     9,     0,     0,     0,    10,    11,    65,    66,
2541       67,    12,     0,    13,    14,    15,    16,    17,    18,    19,
2542     -640,     0,  -640,     0,     0,    20,    21,    22,    23,    24,
2543       25,    26,     0,     0,    27,     0,     0,     0,     0,     0,
2544       28,    29,   255,    31,    32,    33,    34,    35,    36,    37,
2545       38,    39,    40,     0,    41,    42,    43,    44,     0,    45,
2546       46,    47,     0,     0,     0,     0,     0,     0,     0,     0,
2547       48,    49,     0,     0,     0,     0,     0,     0,     0,     0,
2548        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2549        0,    50,     0,     0,    51,    52,     0,    53,    54,     0,
2550       55,     0,     0,    56,    57,    58,    59,    60,    61,    62,
2551       63,    64,     0,  -640,     0,     0,     0,     0,     0,     0,
2552        0,     0,     5,     6,     7,     0,     9,     0,     0,     0,
2553       10,    11,    65,    66,    67,    12,     0,    13,    14,    15,
2554       16,    17,    18,    19,  -640,     0,  -640,     0,     0,    20,
2555       21,    22,    23,    24,    25,    26,     0,     0,   205,     0,
2556        0,     0,     0,     0,     0,    29,     0,     0,    32,    33,
2557       34,    35,    36,    37,    38,    39,    40,   206,    41,    42,
2558       43,    44,     0,    45,    46,    47,     0,     0,     0,     0,
2559        0,     0,     0,     0,    48,    49,     0,     0,     0,     0,
2560        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2561        0,     0,     0,     0,     0,   207,     0,     0,   208,    52,
2562        0,    53,    54,     0,   209,   210,   211,    56,    57,   212,
2563       59,    60,    61,    62,    63,    64,     0,     0,     0,     0,
2564        0,     0,     0,     0,     0,     0,     5,     6,     7,     0,
2565        9,     0,     0,     0,    10,    11,    65,   213,    67,    12,
2566        0,    13,    14,    15,    16,    17,    18,    19,     0,     0,
2567      236,     0,     0,    20,    21,    22,    23,    24,    25,    26,
2568        0,     0,    27,     0,     0,     0,     0,     0,     0,    29,
2569        0,     0,    32,    33,    34,    35,    36,    37,    38,    39,
2570       40,     0,    41,    42,    43,    44,     0,    45,    46,    47,
2571        0,     0,     0,     0,     0,     0,     0,     0,    48,    49,
2572        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2573        0,     0,     0,     0,     0,     0,     0,     0,     0,   207,
2574        0,     0,   208,    52,     0,    53,    54,     0,     0,     0,
2575        0,    56,    57,    58,    59,    60,    61,    62,    63,    64,
2576        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2577        5,     6,     7,     0,     9,     0,     0,     0,    10,    11,
2578       65,    66,    67,    12,     0,    13,    14,    15,    16,    17,
2579       18,    19,   302,     0,   303,     0,     0,    20,    21,    22,
2580       23,    24,    25,    26,     0,     0,    27,     0,     0,     0,
2581        0,     0,     0,    29,     0,     0,    32,    33,    34,    35,
2582       36,    37,    38,    39,    40,     0,    41,    42,    43,    44,
2583        0,    45,    46,    47,     0,     0,     0,     0,     0,     0,
2584        0,     0,    48,    49,     0,     0,     0,     0,     0,     0,
2585        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2586        0,     0,     0,   207,     0,     0,   208,    52,     0,    53,
2587       54,     0,     0,     0,     0,    56,    57,    58,    59,    60,
2588       61,    62,    63,    64,     0,     0,     0,     0,     0,     0,
2589        0,     0,     0,     0,     5,     6,     7,     8,     9,     0,
2590        0,     0,    10,    11,    65,    66,    67,    12,     0,    13,
2591       14,    15,    16,    17,    18,    19,     0,     0,   236,     0,
2592        0,    20,    21,    22,    23,    24,    25,    26,     0,     0,
2593       27,     0,     0,     0,     0,     0,    28,    29,    30,    31,
2594       32,    33,    34,    35,    36,    37,    38,    39,    40,     0,
2595       41,    42,    43,    44,     0,    45,    46,    47,     0,     0,
2596        0,     0,     0,     0,     0,     0,    48,    49,     0,     0,
2597        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2598        0,     0,     0,     0,     0,     0,     0,    50,     0,     0,
2599       51,    52,     0,    53,    54,     0,    55,     0,     0,    56,
2600       57,    58,    59,    60,    61,    62,    63,    64,     0,     0,
2601        0,     0,     0,     0,     0,     0,     0,     0,     5,     6,
2602        7,     8,     9,     0,     0,     0,    10,    11,    65,    66,
2603       67,    12,     0,    13,    14,    15,    16,    17,    18,    19,
2604      497,     0,     0,     0,     0,    20,    21,    22,    23,    24,
2605       25,    26,     0,     0,    27,     0,     0,     0,     0,     0,
2606       28,    29,   255,    31,    32,    33,    34,    35,    36,    37,
2607       38,    39,    40,     0,    41,    42,    43,    44,     0,    45,
2608       46,    47,     0,     0,     0,     0,     0,     0,     0,     0,
2609       48,    49,     0,     0,     0,     0,     0,     0,     0,     0,
2610        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2611        0,    50,     0,     0,    51,    52,     0,    53,    54,     0,
2612       55,     0,     0,    56,    57,    58,    59,    60,    61,    62,
2613       63,    64,     0,     0,     0,     0,     0,     0,     0,     0,
2614        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2615        0,     0,    65,    66,    67,     0,     0,     0,     0,     0,
2616        0,     0,     0,     0,   497,   123,   124,   125,   126,   127,
2617      128,   129,   130,   131,   132,   133,   134,   135,   136,   137,
2618      138,   139,   140,   141,   142,   143,   144,   145,   146,     0,
2619        0,     0,   147,   148,   149,   391,   392,   393,   394,   154,
2620      155,   156,     0,     0,     0,     0,     0,   157,   158,   159,
2621      160,   395,   396,   397,   398,   165,    37,    38,   399,    40,
2622        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2623        0,     0,     0,     0,     0,     0,     0,   167,   168,   169,
2624      170,   171,   172,   173,   174,   175,     0,     0,   176,   177,
2625        0,     0,   178,   179,   180,   181,     0,     0,     0,     0,
2626        0,     0,     0,     0,     0,     0,     0,   182,   183,     0,
2627        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2628        0,     0,     0,     0,     0,     0,     0,     0,     0,   184,
2629      185,   186,   187,   188,   189,   190,   191,   192,   193,     0,
2630      194,   195,     0,     0,     0,     0,     0,   196,   400,   123,
2631      124,   125,   126,   127,   128,   129,   130,   131,   132,   133,
2632      134,   135,   136,   137,   138,   139,   140,   141,   142,   143,
2633      144,   145,   146,     0,     0,     0,   147,   148,   149,   150,
2634      151,   152,   153,   154,   155,   156,     0,     0,     0,     0,
2635        0,   157,   158,   159,   160,   161,   162,   163,   164,   165,
2636      285,   286,   166,   287,     0,     0,     0,     0,     0,     0,
2637        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2638        0,   167,   168,   169,   170,   171,   172,   173,   174,   175,
2639        0,     0,   176,   177,     0,     0,   178,   179,   180,   181,
2640        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2641        0,   182,   183,     0,     0,     0,     0,     0,     0,     0,
2642        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2643        0,     0,     0,   184,   185,   186,   187,   188,   189,   190,
2644      191,   192,   193,     0,   194,   195,     0,     0,     0,     0,
2645        0,   196,   123,   124,   125,   126,   127,   128,   129,   130,
2646      131,   132,   133,   134,   135,   136,   137,   138,   139,   140,
2647      141,   142,   143,   144,   145,   146,     0,     0,     0,   147,
2648      148,   149,   150,   151,   152,   153,   154,   155,   156,     0,
2649        0,     0,     0,     0,   157,   158,   159,   160,   161,   162,
2650      163,   164,   165,   238,     0,   166,     0,     0,     0,     0,
2651        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2652        0,     0,     0,     0,   167,   168,   169,   170,   171,   172,
2653      173,   174,   175,     0,     0,   176,   177,     0,     0,   178,
2654      179,   180,   181,     0,     0,     0,     0,     0,     0,     0,
2655        0,     0,     0,     0,   182,   183,     0,     0,    57,     0,
2656        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2657        0,     0,     0,     0,     0,     0,   184,   185,   186,   187,
2658      188,   189,   190,   191,   192,   193,     0,   194,   195,     0,
2659        0,     0,     0,     0,   196,   123,   124,   125,   126,   127,
2660      128,   129,   130,   131,   132,   133,   134,   135,   136,   137,
2661      138,   139,   140,   141,   142,   143,   144,   145,   146,     0,
2662        0,     0,   147,   148,   149,   150,   151,   152,   153,   154,
2663      155,   156,     0,     0,     0,     0,     0,   157,   158,   159,
2664      160,   161,   162,   163,   164,   165,     0,     0,   166,     0,
2665        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2666        0,     0,     0,     0,     0,     0,     0,   167,   168,   169,
2667      170,   171,   172,   173,   174,   175,     0,     0,   176,   177,
2668        0,     0,   178,   179,   180,   181,     0,     0,     0,     0,
2669        0,     0,     0,     0,     0,     0,     0,   182,   183,     0,
2670        0,    57,     0,     0,     0,     0,     0,     0,     0,     0,
2671        0,     0,     0,     0,     0,     0,     0,     0,     0,   184,
2672      185,   186,   187,   188,   189,   190,   191,   192,   193,     0,
2673      194,   195,     0,     0,     0,     0,     0,   196,   123,   124,
2674      125,   126,   127,   128,   129,   130,   131,   132,   133,   134,
2675      135,   136,   137,   138,   139,   140,   141,   142,   143,   144,
2676      145,   146,     0,     0,     0,   147,   148,   149,   150,   151,
2677      152,   153,   154,   155,   156,     0,     0,     0,     0,     0,
2678      157,   158,   159,   160,   161,   162,   163,   164,   165,     0,
2679        0,   166,     0,     0,     0,     0,     0,     0,     0,     0,
2680        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2681      167,   168,   169,   170,   171,   172,   173,   174,   175,     0,
2682        0,   176,   177,     0,     0,   178,   179,   180,   181,     0,
2683        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2684      182,   183,     0,     0,     0,     0,     0,     0,     0,     0,
2685        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2686        0,     0,   184,   185,   186,   187,   188,   189,   190,   191,
2687      192,   193,     0,   194,   195,     5,     6,     7,     0,     9,
2688      196,     0,     0,    10,    11,     0,     0,     0,    12,     0,
2689       13,    14,    15,   244,   245,    18,    19,     0,     0,     0,
2690        0,     0,    20,   246,   247,    23,    24,    25,    26,     0,
2691        0,   205,     0,     0,     0,     0,     0,     0,   274,     0,
2692        0,    32,    33,    34,    35,    36,    37,    38,    39,    40,
2693        0,    41,    42,    43,    44,     0,    45,    46,    47,     0,
2694        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2695        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2696        0,     0,     0,     0,     0,     0,     0,     0,   275,     0,
2697        0,   208,    52,     0,    53,    54,     0,     0,     0,     0,
2698       56,    57,    58,    59,    60,    61,    62,    63,    64,     0,
2699        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2700        0,     0,     5,     6,     7,     8,     9,     0,     0,   276,
2701       10,    11,     0,     0,     0,    12,   520,    13,    14,    15,
2702       16,    17,    18,    19,     0,     0,     0,     0,     0,    20,
2703       21,    22,    23,    24,    25,    26,     0,     0,    27,     0,
2704        0,     0,     0,     0,    28,    29,    30,    31,    32,    33,
2705       34,    35,    36,    37,    38,    39,    40,     0,    41,    42,
2706       43,    44,     0,    45,    46,    47,     0,     0,     0,     0,
2707        0,     0,     0,     0,    48,    49,     0,     0,     0,     0,
2708        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2709        0,     0,     0,     0,     0,    50,     0,     0,    51,    52,
2710        0,    53,    54,     0,    55,     0,     0,    56,    57,    58,
2711       59,    60,    61,    62,    63,    64,     0,     0,     0,     0,
2712        0,     0,     0,     0,     0,     0,     5,     6,     7,     0,
2713        9,     0,     0,     0,    10,    11,    65,    66,    67,    12,
2714        0,    13,    14,    15,    16,    17,    18,    19,     0,     0,
2715        0,     0,     0,    20,    21,    22,    23,    24,    25,    26,
2716        0,     0,   205,     0,     0,     0,     0,     0,     0,    29,
2717        0,     0,    32,    33,    34,    35,    36,    37,    38,    39,
2718       40,   206,    41,    42,    43,    44,     0,    45,    46,    47,
2719        0,     0,     0,     0,     0,     0,     0,     0,    48,    49,
2720        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2721        0,     0,     0,     0,     0,     0,     0,     0,     0,   207,
2722        0,     0,   208,    52,     0,    53,    54,     0,   209,   210,
2723      211,    56,    57,   212,    59,    60,    61,    62,    63,    64,
2724        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2725        5,     6,     7,     8,     9,     0,     0,     0,    10,    11,
2726       65,   213,    67,    12,     0,    13,    14,    15,    16,    17,
2727       18,    19,     0,     0,     0,     0,     0,    20,    21,    22,
2728       23,    24,    25,    26,     0,     0,    27,     0,     0,     0,
2729        0,     0,    28,    29,     0,    31,    32,    33,    34,    35,
2730       36,    37,    38,    39,    40,     0,    41,    42,    43,    44,
2731        0,    45,    46,    47,     0,     0,     0,     0,     0,     0,
2732        0,     0,    48,    49,     0,     0,     0,     0,     0,     0,
2733        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2734        0,     0,     0,    50,     0,     0,    51,    52,     0,    53,
2735       54,     0,    55,     0,     0,    56,    57,    58,    59,    60,
2736       61,    62,    63,    64,     0,     0,     0,     0,     0,     0,
2737        0,     0,     0,     0,     5,     6,     7,     0,     9,     0,
2738        0,     0,    10,    11,    65,    66,    67,    12,     0,    13,
2739       14,    15,   244,   245,    18,    19,     0,     0,     0,     0,
2740        0,    20,   246,   247,    23,    24,    25,    26,     0,     0,
2741      205,     0,     0,     0,     0,     0,     0,    29,     0,     0,
2742       32,    33,    34,    35,    36,    37,    38,    39,    40,   206,
2743       41,    42,    43,    44,     0,    45,    46,    47,     0,     0,
2744        0,     0,     0,     0,     0,     0,    48,    49,     0,     0,
2745        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2746        0,     0,     0,     0,     0,     0,     0,   207,     0,     0,
2747      208,    52,     0,    53,    54,     0,   615,   210,   211,    56,
2748       57,   212,    59,    60,    61,    62,    63,    64,     0,     0,
2749        0,     0,     0,     0,     0,     0,     0,     0,     5,     6,
2750        7,     0,     9,     0,     0,     0,    10,    11,    65,   213,
2751       67,    12,     0,    13,    14,    15,   244,   245,    18,    19,
2752        0,     0,     0,     0,     0,    20,   246,   247,    23,    24,
2753       25,    26,     0,     0,   205,     0,     0,     0,     0,     0,
2754        0,    29,     0,     0,    32,    33,    34,    35,    36,    37,
2755       38,    39,    40,   206,    41,    42,    43,    44,     0,    45,
2756       46,    47,     0,     0,     0,     0,     0,     0,     0,     0,
2757       48,    49,     0,     0,     0,     0,     0,     0,     0,     0,
2758        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2759        0,   207,     0,     0,   208,    52,     0,    53,    54,     0,
2760      209,   210,     0,    56,    57,   212,    59,    60,    61,    62,
2761       63,    64,     0,     0,     0,     0,     0,     0,     0,     0,
2762        0,     0,     5,     6,     7,     0,     9,     0,     0,     0,
2763       10,    11,    65,   213,    67,    12,     0,    13,    14,    15,
2764      244,   245,    18,    19,     0,     0,     0,     0,     0,    20,
2765      246,   247,    23,    24,    25,    26,     0,     0,   205,     0,
2766        0,     0,     0,     0,     0,    29,     0,     0,    32,    33,
2767       34,    35,    36,    37,    38,    39,    40,   206,    41,    42,
2768       43,    44,     0,    45,    46,    47,     0,     0,     0,     0,
2769        0,     0,     0,     0,    48,    49,     0,     0,     0,     0,
2770        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2771        0,     0,     0,     0,     0,   207,     0,     0,   208,    52,
2772        0,    53,    54,     0,     0,   210,   211,    56,    57,   212,
2773       59,    60,    61,    62,    63,    64,     0,     0,     0,     0,
2774        0,     0,     0,     0,     0,     0,     5,     6,     7,     0,
2775        9,     0,     0,     0,    10,    11,    65,   213,    67,    12,
2776        0,    13,    14,    15,   244,   245,    18,    19,     0,     0,
2777        0,     0,     0,    20,   246,   247,    23,    24,    25,    26,
2778        0,     0,   205,     0,     0,     0,     0,     0,     0,    29,
2779        0,     0,    32,    33,    34,    35,    36,    37,    38,    39,
2780       40,   206,    41,    42,    43,    44,     0,    45,    46,    47,
2781        0,     0,     0,     0,     0,     0,     0,     0,    48,    49,
2782        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2783        0,     0,     0,     0,     0,     0,     0,     0,     0,   207,
2784        0,     0,   208,    52,     0,    53,    54,     0,   615,   210,
2785        0,    56,    57,   212,    59,    60,    61,    62,    63,    64,
2786        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2787        5,     6,     7,     0,     9,     0,     0,     0,    10,    11,
2788       65,   213,    67,    12,     0,    13,    14,    15,   244,   245,
2789       18,    19,     0,     0,     0,     0,     0,    20,   246,   247,
2790       23,    24,    25,    26,     0,     0,   205,     0,     0,     0,
2791        0,     0,     0,    29,     0,     0,    32,    33,    34,    35,
2792       36,    37,    38,    39,    40,   206,    41,    42,    43,    44,
2793        0,    45,    46,    47,     0,     0,     0,     0,     0,     0,
2794        0,     0,    48,    49,     0,     0,     0,     0,     0,     0,
2795        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2796        0,     0,     0,   207,     0,     0,   208,    52,     0,    53,
2797       54,     0,     0,   210,     0,    56,    57,   212,    59,    60,
2798       61,    62,    63,    64,     0,     0,     0,     0,     0,     0,
2799        0,     0,     0,     0,     5,     6,     7,     0,     9,     0,
2800        0,     0,    10,    11,    65,   213,    67,    12,     0,    13,
2801       14,    15,    16,    17,    18,    19,     0,     0,     0,     0,
2802        0,    20,    21,    22,    23,    24,    25,    26,     0,     0,
2803      205,     0,     0,     0,     0,     0,     0,    29,     0,     0,
2804       32,    33,    34,    35,    36,    37,    38,    39,    40,     0,
2805       41,    42,    43,    44,     0,    45,    46,    47,     0,     0,
2806        0,     0,     0,     0,     0,     0,    48,    49,     0,     0,
2807        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2808        0,     0,     0,     0,     0,     0,     0,   207,     0,     0,
2809      208,    52,     0,    53,    54,     0,   513,     0,     0,    56,
2810       57,    58,    59,    60,    61,    62,    63,    64,     0,     0,
2811        0,     0,     0,     0,     0,     0,     0,     0,     5,     6,
2812        7,     0,     9,     0,     0,     0,    10,    11,    65,   213,
2813       67,    12,     0,    13,    14,    15,   244,   245,    18,    19,
2814        0,     0,     0,     0,     0,    20,   246,   247,    23,    24,
2815       25,    26,     0,     0,   205,     0,     0,     0,     0,     0,
2816        0,    29,     0,     0,    32,    33,    34,    35,    36,    37,
2817       38,    39,    40,     0,    41,    42,    43,    44,     0,    45,
2818       46,    47,     0,     0,     0,     0,     0,     0,     0,     0,
2819       48,    49,     0,     0,     0,     0,     0,     0,     0,     0,
2820        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2821        0,   207,     0,     0,   208,    52,     0,    53,    54,     0,
2822      209,     0,     0,    56,    57,    58,    59,    60,    61,    62,
2823       63,    64,     0,     0,     0,     0,     0,     0,     0,     0,
2824        0,     0,     5,     6,     7,     0,     9,     0,     0,     0,
2825       10,    11,    65,   213,    67,    12,     0,    13,    14,    15,
2826      244,   245,    18,    19,     0,     0,     0,     0,     0,    20,
2827      246,   247,    23,    24,    25,    26,     0,     0,   205,     0,
2828        0,     0,     0,     0,     0,    29,     0,     0,    32,    33,
2829       34,    35,    36,    37,    38,    39,    40,     0,    41,    42,
2830       43,    44,     0,    45,    46,    47,     0,     0,     0,     0,
2831        0,     0,     0,     0,    48,    49,     0,     0,     0,     0,
2832        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2833        0,     0,     0,     0,     0,   207,     0,     0,   208,    52,
2834        0,    53,    54,     0,   809,     0,     0,    56,    57,    58,
2835       59,    60,    61,    62,    63,    64,     0,     0,     0,     0,
2836        0,     0,     0,     0,     0,     0,     5,     6,     7,     0,
2837        9,     0,     0,     0,    10,    11,    65,   213,    67,    12,
2838        0,    13,    14,    15,   244,   245,    18,    19,     0,     0,
2839        0,     0,     0,    20,   246,   247,    23,    24,    25,    26,
2840        0,     0,   205,     0,     0,     0,     0,     0,     0,    29,
2841        0,     0,    32,    33,    34,    35,    36,    37,    38,    39,
2842       40,     0,    41,    42,    43,    44,     0,    45,    46,    47,
2843        0,     0,     0,     0,     0,     0,     0,     0,    48,    49,
2844        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2845        0,     0,     0,     0,     0,     0,     0,     0,     0,   207,
2846        0,     0,   208,    52,     0,    53,    54,     0,   513,     0,
2847        0,    56,    57,    58,    59,    60,    61,    62,    63,    64,
2848        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2849        5,     6,     7,     0,     9,     0,     0,     0,    10,    11,
2850       65,   213,    67,    12,     0,    13,    14,    15,   244,   245,
2851       18,    19,     0,     0,     0,     0,     0,    20,   246,   247,
2852       23,    24,    25,    26,     0,     0,   205,     0,     0,     0,
2853        0,     0,     0,    29,     0,     0,    32,    33,    34,    35,
2854       36,    37,    38,    39,    40,     0,    41,    42,    43,    44,
2855        0,    45,    46,    47,     0,     0,     0,     0,     0,     0,
2856        0,     0,    48,    49,     0,     0,     0,     0,     0,     0,
2857        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2858        0,     0,     0,   207,     0,     0,   208,    52,     0,    53,
2859       54,     0,   615,     0,     0,    56,    57,    58,    59,    60,
2860       61,    62,    63,    64,     0,     0,     0,     0,     0,     0,
2861        0,     0,     0,     0,     5,     6,     7,     0,     9,     0,
2862        0,     0,    10,    11,    65,   213,    67,    12,     0,    13,
2863       14,    15,   244,   245,    18,    19,     0,     0,     0,     0,
2864        0,    20,   246,   247,    23,    24,    25,    26,     0,     0,
2865      205,     0,     0,     0,     0,     0,     0,    29,     0,     0,
2866       32,    33,    34,    35,    36,    37,    38,    39,    40,     0,
2867       41,    42,    43,    44,     0,    45,    46,    47,     0,     0,
2868        0,     0,     0,     0,     0,     0,    48,    49,     0,     0,
2869        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2870        0,     0,     0,     0,     0,     0,     0,   207,     0,     0,
2871      208,    52,     0,    53,    54,     0,     0,     0,     0,    56,
2872       57,    58,    59,    60,    61,    62,    63,    64,     0,     0,
2873        0,     0,     0,     0,     0,     0,     0,     0,     5,     6,
2874        7,     0,     9,     0,     0,     0,    10,    11,    65,   213,
2875       67,    12,     0,    13,    14,    15,    16,    17,    18,    19,
2876        0,     0,     0,     0,     0,    20,    21,    22,    23,    24,
2877       25,    26,     0,     0,   205,     0,     0,     0,     0,     0,
2878        0,    29,     0,     0,    32,    33,    34,    35,    36,    37,
2879       38,    39,    40,     0,    41,    42,    43,    44,     0,    45,
2880       46,    47,     0,     0,     0,     0,     0,     0,     0,     0,
2881       48,    49,     0,     0,     0,     0,     0,     0,     0,     0,
2882        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2883        0,   207,     0,     0,   208,    52,     0,    53,    54,     0,
2884        0,     0,     0,    56,    57,    58,    59,    60,    61,    62,
2885       63,    64,     0,     0,     0,     0,     0,     0,     0,     0,
2886        0,     0,     5,     6,     7,     0,     9,     0,     0,     0,
2887       10,    11,    65,   213,    67,    12,     0,    13,    14,    15,
2888       16,    17,    18,    19,     0,     0,     0,     0,     0,    20,
2889       21,    22,    23,    24,    25,    26,     0,     0,    27,     0,
2890        0,     0,     0,     0,     0,    29,     0,     0,    32,    33,
2891       34,    35,    36,    37,    38,    39,    40,     0,    41,    42,
2892       43,    44,     0,    45,    46,    47,     0,     0,     0,     0,
2893        0,     0,     0,     0,    48,    49,     0,     0,     0,     0,
2894        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2895        0,     0,     0,     0,     0,   207,     0,     0,   208,    52,
2896        0,    53,    54,     0,     0,     0,     0,    56,    57,    58,
2897       59,    60,    61,    62,    63,    64,     0,     0,     0,     0,
2898        0,     0,     0,     0,     0,     0,     5,     6,     7,     0,
2899        9,     0,     0,     0,    10,    11,    65,    66,    67,    12,
2900        0,    13,    14,    15,   244,   245,    18,    19,     0,     0,
2901        0,     0,     0,    20,   246,   247,    23,    24,    25,    26,
2902        0,     0,   205,     0,     0,     0,     0,     0,     0,   274,
2903        0,     0,    32,    33,    34,    35,    36,    37,    38,    39,
2904       40,     0,    41,    42,    43,    44,     0,    45,    46,    47,
2905        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2906        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2907        0,     0,     0,     0,     0,     0,     0,     0,     0,   275,
2908        0,     0,   325,    52,     0,    53,    54,     0,   326,     0,
2909        0,    56,    57,    58,    59,    60,    61,    62,    63,    64,
2910        0,     0,     0,     0,     0,     0,     5,     6,     7,     0,
2911        9,     0,     0,     0,    10,    11,     0,     0,     0,    12,
2912      276,    13,    14,    15,   244,   245,    18,    19,     0,     0,
2913        0,     0,     0,    20,   246,   247,    23,    24,    25,    26,
2914        0,     0,   205,     0,     0,     0,     0,     0,     0,   274,
2915        0,     0,    32,    33,    34,    35,    36,    37,    38,    39,
2916       40,     0,    41,    42,    43,    44,     0,    45,    46,    47,
2917        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2918        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2919        0,     0,     0,     0,     0,     0,     0,     0,     0,   372,
2920        0,     0,    51,    52,     0,    53,    54,     0,    55,     0,
2921        0,    56,    57,    58,    59,    60,    61,    62,    63,    64,
2922        0,     0,     0,     0,     0,     0,     5,     6,     7,     0,
2923        9,     0,     0,     0,    10,    11,     0,     0,     0,    12,
2924      276,    13,    14,    15,   244,   245,    18,    19,     0,     0,
2925        0,     0,     0,    20,   246,   247,    23,    24,    25,    26,
2926        0,     0,   205,     0,     0,     0,     0,     0,     0,   274,
2927        0,     0,    32,    33,    34,   380,    36,    37,    38,   381,
2928       40,     0,    41,    42,    43,    44,     0,    45,    46,    47,
2929        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2930        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2931        0,     0,     0,     0,     0,   382,     0,     0,     0,   383,
2932        0,     0,   208,    52,     0,    53,    54,     0,     0,     0,
2933        0,    56,    57,    58,    59,    60,    61,    62,    63,    64,
2934        0,     0,     0,     0,     0,     0,     5,     6,     7,     0,
2935        9,     0,     0,     0,    10,    11,     0,     0,     0,    12,
2936      276,    13,    14,    15,   244,   245,    18,    19,     0,     0,
2937        0,     0,     0,    20,   246,   247,    23,    24,    25,    26,
2938        0,     0,   205,     0,     0,     0,     0,     0,     0,   274,
2939        0,     0,    32,    33,    34,   380,    36,    37,    38,   381,
2940       40,     0,    41,    42,    43,    44,     0,    45,    46,    47,
2941        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2942        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2943        0,     0,     0,     0,     0,     0,     0,     0,     0,   383,
2944        0,     0,   208,    52,     0,    53,    54,     0,     0,     0,
2945        0,    56,    57,    58,    59,    60,    61,    62,    63,    64,
2946        0,     0,     0,     0,     0,     0,     5,     6,     7,     0,
2947        9,     0,     0,     0,    10,    11,     0,     0,     0,    12,
2948      276,    13,    14,    15,   244,   245,    18,    19,     0,     0,
2949        0,     0,     0,    20,   246,   247,    23,    24,    25,    26,
2950        0,     0,   205,     0,     0,     0,     0,     0,     0,   274,
2951        0,     0,    32,    33,    34,    35,    36,    37,    38,    39,
2952       40,     0,    41,    42,    43,    44,     0,    45,    46,    47,
2953        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2954        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2955        0,     0,     0,     0,     0,     0,     0,     0,     0,   275,
2956        0,     0,   325,    52,     0,    53,    54,     0,     0,     0,
2957        0,    56,    57,    58,    59,    60,    61,    62,    63,    64,
2958        0,     0,     0,     0,     0,     0,     5,     6,     7,     0,
2959        9,     0,     0,     0,    10,    11,     0,     0,     0,    12,
2960      276,    13,    14,    15,   244,   245,    18,    19,     0,     0,
2961        0,     0,     0,    20,   246,   247,    23,    24,    25,    26,
2962        0,     0,   205,     0,     0,     0,     0,     0,     0,   274,
2963        0,     0,    32,    33,    34,    35,    36,    37,    38,    39,
2964       40,     0,    41,    42,    43,    44,     0,    45,    46,    47,
2965        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2966        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2967        0,     0,     0,     0,     0,     0,     0,     0,     0,   900,
2968        0,     0,   208,    52,     0,    53,    54,     0,     0,     0,
2969        0,    56,    57,    58,    59,    60,    61,    62,    63,    64,
2970        0,     0,     0,     0,     0,     0,     5,     6,     7,     0,
2971        9,     0,     0,     0,    10,    11,     0,     0,     0,    12,
2972      276,    13,    14,    15,   244,   245,    18,    19,     0,     0,
2973        0,     0,     0,    20,   246,   247,    23,    24,    25,    26,
2974        0,     0,   205,     0,     0,     0,     0,     0,     0,   274,
2975        0,     0,    32,    33,    34,    35,    36,    37,    38,    39,
2976       40,     0,    41,    42,    43,    44,     0,    45,    46,    47,
2977        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2978        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2979        0,     0,     0,     0,     0,     0,     0,   557,   558,   975,
2980        0,   559,   208,    52,     0,    53,    54,     0,     0,     0,
2981        0,    56,    57,    58,    59,    60,    61,    62,    63,    64,
2982      167,   168,   169,   170,   171,   172,   173,   174,   175,     0,
2983        0,   176,   177,     0,     0,   178,   179,   180,   181,     0,
2984      276,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2985      182,   183,     0,     0,     0,     0,     0,     0,     0,     0,
2986        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2987        0,     0,   184,   185,   186,   187,   188,   189,   190,   191,
2988      192,   193,     0,   194,   195,   565,   566,     0,     0,   567,
2989      196,   232,     0,     0,     0,     0,     0,     0,     0,     0,
2990        0,     0,     0,     0,     0,     0,     0,     0,   167,   168,
2991      169,   170,   171,   172,   173,   174,   175,     0,     0,   176,
2992      177,     0,     0,   178,   179,   180,   181,     0,     0,     0,
2993        0,     0,     0,     0,     0,     0,     0,     0,   182,   183,
2994        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2995        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2996      184,   185,   186,   187,   188,   189,   190,   191,   192,   193,
2997        0,   194,   195,   619,   558,     0,     0,   620,   196,   232,
2998        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
2999        0,     0,     0,     0,     0,     0,   167,   168,   169,   170,
3000      171,   172,   173,   174,   175,     0,     0,   176,   177,     0,
3001        0,   178,   179,   180,   181,     0,     0,     0,     0,     0,
3002        0,     0,     0,     0,     0,     0,   182,   183,     0,     0,
3003        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
3004        0,     0,     0,     0,     0,     0,     0,     0,   184,   185,
3005      186,   187,   188,   189,   190,   191,   192,   193,     0,   194,
3006      195,   622,   566,     0,     0,   623,   196,   232,     0,     0,
3007        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
3008        0,     0,     0,     0,   167,   168,   169,   170,   171,   172,
3009      173,   174,   175,     0,     0,   176,   177,     0,     0,   178,
3010      179,   180,   181,     0,     0,     0,     0,     0,     0,     0,
3011        0,     0,     0,     0,   182,   183,     0,     0,     0,     0,
3012        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
3013        0,     0,     0,     0,     0,     0,   184,   185,   186,   187,
3014      188,   189,   190,   191,   192,   193,     0,   194,   195,   646,
3015      558,     0,     0,   647,   196,   232,     0,     0,     0,     0,
3016        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
3017        0,     0,   167,   168,   169,   170,   171,   172,   173,   174,
3018      175,     0,     0,   176,   177,     0,     0,   178,   179,   180,
3019      181,     0,     0,     0,     0,     0,     0,     0,     0,     0,
3020        0,     0,   182,   183,     0,     0,     0,     0,     0,     0,
3021        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
3022        0,     0,     0,     0,   184,   185,   186,   187,   188,   189,
3023      190,   191,   192,   193,     0,   194,   195,   649,   566,     0,
3024        0,   650,   196,   232,     0,     0,     0,     0,     0,     0,
3025        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
3026      167,   168,   169,   170,   171,   172,   173,   174,   175,     0,
3027        0,   176,   177,     0,     0,   178,   179,   180,   181,     0,
3028        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
3029      182,   183,     0,     0,     0,     0,     0,     0,     0,     0,
3030        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
3031        0,     0,   184,   185,   186,   187,   188,   189,   190,   191,
3032      192,   193,     0,   194,   195,   715,   558,     0,     0,   716,
3033      196,   232,     0,     0,     0,     0,     0,     0,     0,     0,
3034        0,     0,     0,     0,     0,     0,     0,     0,   167,   168,
3035      169,   170,   171,   172,   173,   174,   175,     0,     0,   176,
3036      177,     0,     0,   178,   179,   180,   181,     0,     0,     0,
3037        0,     0,     0,     0,     0,     0,     0,     0,   182,   183,
3038        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
3039        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
3040      184,   185,   186,   187,   188,   189,   190,   191,   192,   193,
3041        0,   194,   195,   718,   566,     0,     0,   719,   196,   232,
3042        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
3043        0,     0,     0,     0,     0,     0,   167,   168,   169,   170,
3044      171,   172,   173,   174,   175,     0,     0,   176,   177,     0,
3045        0,   178,   179,   180,   181,     0,     0,     0,     0,     0,
3046        0,     0,     0,     0,     0,     0,   182,   183,     0,     0,
3047        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
3048        0,     0,     0,     0,     0,     0,     0,     0,   184,   185,
3049      186,   187,   188,   189,   190,   191,   192,   193,     0,   194,
3050      195,   724,   558,     0,     0,   725,   196,   232,     0,     0,
3051        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
3052        0,     0,     0,     0,   167,   168,   169,   170,   171,   172,
3053      173,   174,   175,     0,     0,   176,   177,     0,     0,   178,
3054      179,   180,   181,     0,     0,     0,     0,     0,     0,     0,
3055        0,     0,     0,     0,   182,   183,     0,     0,     0,     0,
3056        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
3057        0,     0,     0,     0,     0,     0,   184,   185,   186,   187,
3058      188,   189,   190,   191,   192,   193,     0,   194,   195,   604,
3059      566,     0,     0,   605,   196,   232,     0,     0,     0,     0,
3060        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
3061        0,     0,   167,   168,   169,   170,   171,   172,   173,   174,
3062      175,     0,     0,   176,   177,     0,     0,   178,   179,   180,
3063      181,     0,     0,     0,     0,     0,     0,     0,     0,     0,
3064        0,     0,   182,   183,     0,     0,     0,     0,     0,     0,
3065        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
3066        0,     0,     0,     0,   184,   185,   186,   187,   188,   189,
3067      190,   191,   192,   193,     0,   194,   195,   814,   558,     0,
3068        0,   815,   196,   232,     0,     0,     0,     0,     0,     0,
3069        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
3070      167,   168,   169,   170,   171,   172,   173,   174,   175,     0,
3071        0,   176,   177,     0,     0,   178,   179,   180,   181,     0,
3072        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
3073      182,   183,     0,     0,     0,     0,     0,     0,     0,     0,
3074        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
3075        0,     0,   184,   185,   186,   187,   188,   189,   190,   191,
3076      192,   193,     0,   194,   195,   817,   566,     0,     0,   818,
3077      196,   232,     0,     0,     0,     0,     0,     0,     0,     0,
3078        0,     0,     0,     0,     0,     0,     0,     0,   167,   168,
3079      169,   170,   171,   172,   173,   174,   175,     0,     0,   176,
3080      177,     0,     0,   178,   179,   180,   181,     0,     0,     0,
3081        0,     0,     0,     0,     0,     0,     0,     0,   182,   183,
3082        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
3083        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
3084      184,   185,   186,   187,   188,   189,   190,   191,   192,   193,
3085        0,   194,   195,  1015,   558,     0,     0,  1016,   196,   232,
3086        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
3087        0,     0,     0,     0,     0,     0,   167,   168,   169,   170,
3088      171,   172,   173,   174,   175,     0,     0,   176,   177,     0,
3089        0,   178,   179,   180,   181,     0,     0,     0,     0,     0,
3090        0,     0,     0,     0,     0,     0,   182,   183,     0,     0,
3091        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
3092        0,     0,     0,     0,     0,     0,     0,     0,   184,   185,
3093      186,   187,   188,   189,   190,   191,   192,   193,     0,   194,
3094      195,  1049,   558,     0,     0,  1050,   196,   232,     0,     0,
3095        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
3096        0,     0,     0,     0,   167,   168,   169,   170,   171,   172,
3097      173,   174,   175,     0,     0,   176,   177,     0,     0,   178,
3098      179,   180,   181,     0,     0,     0,     0,     0,     0,     0,
3099        0,     0,     0,     0,   182,   183,     0,     0,     0,     0,
3100        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
3101        0,     0,     0,     0,     0,     0,   184,   185,   186,   187,
3102      188,   189,   190,   191,   192,   193,     0,   194,   195,  1052,
3103      566,     0,     0,  1053,   196,   232,     0,     0,     0,     0,
3104        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
3105        0,     0,   167,   168,   169,   170,   171,   172,   173,   174,
3106      175,     0,     0,   176,   177,     0,     0,   178,   179,   180,
3107      181,     0,     0,     0,     0,     0,     0,     0,     0,     0,
3108        0,     0,   182,   183,     0,     0,     0,     0,     0,     0,
3109        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
3110        0,     0,     0,     0,   184,   185,   186,   187,   188,   189,
3111      190,   191,   192,   193,     0,   194,   195,   604,   566,     0,
3112        0,   605,   196,   232,     0,     0,     0,     0,     0,     0,
3113        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
3114      167,   168,   169,   170,   171,   172,   173,   174,   175,     0,
3115        0,   176,   177,     0,     0,   178,   179,   180,   181,     0,
3116        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
3117      182,   183,     0,     0,     0,     0,     0,     0,     0,     0,
3118        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
3119        0,     0,   184,   185,   186,   187,   188,   189,   190,   191,
3120      192,   193,     0,   194,   195,     0,     0,     0,     0,     0,
3121      196
3122 };
3123 
3124 static const yytype_int16 yycheck[] =
3125 {
3126        2,   100,    90,    57,    69,    93,    87,   360,     2,     8,
3127        4,    22,    92,   328,    28,    27,    55,    29,    99,     8,
3128      268,     8,    51,   226,   272,   365,   580,     4,    93,    28,
3129      755,    16,    17,    81,   292,   293,    66,    93,   359,    28,
3130      361,    28,    81,    97,   706,     2,   421,     4,    65,   429,
3131       51,    53,    54,   621,   429,    94,    95,    96,    52,    16,
3132       17,   383,    58,    55,   476,    76,   879,    27,    53,    69,
3133       57,   651,   425,    37,    38,    16,    17,    63,   905,    13,
3134      648,    25,    25,   938,   936,   898,   407,   467,     0,    26,
3135       16,    17,   256,   666,    51,    52,   888,    26,    55,   410,
3136      411,   151,    29,   424,    13,   426,    16,    17,   520,    66,
3137       97,   909,    25,    98,   328,   793,   144,   141,    85,    22,
3138       68,    97,   141,   151,    81,   478,    25,    97,    63,    68,
3139      146,   452,    89,    90,   120,   151,    93,    94,    95,    96,
3140      221,    98,   994,    53,    54,   870,   871,    95,   124,   717,
3141      774,    56,    25,   107,   124,    94,    95,    98,   479,   727,
3142      598,   325,   129,    25,    13,   149,   124,   151,   144,   250,
3143       89,    90,    98,    76,    93,   799,   800,   131,  1033,   208,
3144      124,   761,    25,  1035,  1011,   120,   144,   151,    98,   149,
3145       25,   151,  1005,   258,   121,    25,   410,   411,   876,   280,
3146      144,   144,   258,   147,   141,  1018,  1058,   151,  1000,   146,
3147      144,   936,   141,   938,   243,   149,   212,   151,   220,   307,
3148      308,   309,   310,    13,   226,  1023,     9,   256,   150,   277,
3149      232,   144,    15,   586,   492,   438,   494,   146,   277,   241,
3150      149,    28,   151,   596,   229,   144,   231,   241,   816,   629,
3151       97,   208,    52,   628,   629,   256,    56,   150,   258,   276,
3152      254,   150,   274,    13,   926,   150,   587,   679,    13,   994,
3153      995,   144,   229,   595,   231,   232,   597,   124,   235,   367,
3154      237,   861,   144,   863,   241,   723,   243,   326,   229,   144,
3155      231,   232,    63,   323,   375,    13,   325,   254,   328,   256,
3156      149,   144,   151,   229,   369,   231,   879,    13,  1033,   144,
3157     1035,   146,   306,   369,   144,   888,   235,   311,   237,   229,
3158      277,   231,   124,    25,   325,   898,   950,   124,    13,   306,
3159       97,   684,   905,  1058,   326,    14,    15,   366,   323,   368,
3160      144,   110,   966,   328,   247,   248,   117,   151,   119,   306,
3161      307,   308,   309,   310,   311,   312,   313,   124,   360,   149,
3162       13,   151,   683,    13,   685,    97,   323,   666,   325,   326,
3163      808,   328,   926,   713,   361,    97,   687,   688,    25,   150,
3164      410,   411,   693,   694,   144,   761,   701,   146,   307,   308,
3165      309,   310,   124,   312,   313,   643,   146,   655,    56,   149,
3166      124,   151,   660,   360,   149,   362,   151,    25,    98,   366,
3167      367,   368,   144,    25,    68,   618,    15,   855,    17,   360,
3168      407,   144,    97,   425,   862,   382,    97,  1000,   476,    68,
3169      144,   149,   446,   151,    68,   437,   438,   476,  1011,   426,
3170       94,    95,   144,   149,   146,   151,   146,   446,   367,   124,
3171      531,    68,   146,   410,   411,   144,    95,   446,   361,   446,
3172       94,    95,   151,   382,   149,   452,   151,   681,   425,   144,
3173      146,    63,   520,   687,   688,   147,   478,   124,    95,   693,
3174      694,   520,    63,  1051,   425,   861,    67,   863,   868,   143,
3175       68,    68,   479,   868,   124,    97,   149,   144,   151,   149,
3176      147,   151,   459,   941,   151,   507,   124,    77,   588,   143,
3177       63,   421,   124,   578,    97,   826,    94,    95,    95,   476,
3178      148,   478,   124,   426,   690,   117,   144,   119,   146,   147,
3179       68,   697,   144,   151,   546,   147,   117,   478,   119,   151,
3180      743,   124,   144,    56,    68,   574,    68,   576,   142,   452,
3181       77,   562,   564,   991,   464,    37,    38,    95,   150,   570,
3182      144,   144,   104,   520,   117,   143,   119,   120,   570,   666,
3183      572,    95,    94,    95,    17,    68,   479,   917,   144,   776,
3184       97,   778,   922,   882,   586,   149,    52,   886,    54,    55,
3185       56,    57,    56,    25,   596,   606,   644,   582,   612,   898,
3186      587,    94,    95,   902,   606,   644,   905,   124,   907,   621,
3187      597,   147,   826,   612,   128,   144,   618,   574,   144,   576,
3188       68,   143,    68,   612,   146,   612,    68,   144,   144,   586,
3189      142,   679,   142,   732,   722,   637,   648,   144,   667,   596,
3190      679,   598,   599,    97,   142,   586,    94,    95,    94,    95,
3191      143,   681,    94,    95,   666,   596,   721,   687,   688,   562,
3192       10,    68,    68,   693,   694,    68,    68,   570,   144,    97,
3193      124,   673,    63,   144,  1027,   632,   144,   731,   144,    97,
3194      599,    97,   684,    44,   587,   124,   680,   644,    95,    95,
3195      144,   720,    95,    95,   597,   143,   124,   143,   685,   701,
3196      702,   143,   704,   606,   706,   717,   124,  1028,   124,     8,
3197      667,    13,  1011,   632,  1013,   727,   701,   150,   628,  1018,
3198       68,  1020,   679,   680,   681,   150,   117,   684,   119,   120,
3199      687,   688,   142,   636,   637,    77,   693,   694,     2,   144,
3200        4,   743,   126,   684,   731,    15,    94,    95,    97,    54,
3201      947,   948,    16,    17,   148,   952,   844,   954,   797,   956,
3202       65,    66,    97,   720,   146,   722,   723,  1066,   144,     2,
3203      772,     4,   774,    68,    52,   124,    54,    55,    56,    57,
3204       68,   793,   685,    16,    17,   882,    68,    51,    52,   124,
3205      124,   856,   134,   135,   136,   143,   826,   799,   800,    94,
3206       95,   898,    66,   722,   816,   902,    94,    95,   905,   838,
3207      907,   144,    94,    95,   843,   144,    52,   512,    51,    52,
3208      144,    26,    97,   852,   144,    89,    90,   144,    52,    93,
3209       52,    54,   834,    66,    98,    97,   410,   411,    26,   129,
3210      797,   124,  1039,  1040,  1041,  1042,   666,    68,   143,   124,
3211      144,   808,   144,   427,   428,   143,    89,    90,   897,   144,
3212       93,   143,   124,    68,   876,    98,   144,   235,   933,   826,
3213      144,   144,    97,    94,    95,  1072,   571,   916,   149,   453,
3214       68,   838,   577,    58,   579,    98,   843,   844,   583,    94,
3215       95,   920,   144,   261,   129,   852,   977,   265,   855,   124,
3216       56,    68,    77,    68,   666,   862,    94,    95,    54,    55,
3217      144,    57,   144,   942,  1011,   144,  1013,   147,   144,    65,
3218       66,  1018,   143,  1020,   926,   844,   144,    94,    95,    94,
3219       95,   106,   107,   144,   144,   144,   141,    63,   143,    56,
3220      897,   146,   651,   144,   208,   144,     9,   144,   950,    63,
3221      142,   146,   981,   141,   983,   143,   131,   666,   146,   916,
3222      972,   146,    63,   920,   966,   229,   144,   231,   232,  1066,
3223      144,   235,   144,   237,   118,   208,   143,   241,   143,   243,
3224      982,  1010,   241,   206,   941,   942,   209,   210,   211,   459,
3225      254,   117,   256,   119,   120,   455,   229,    94,   231,   232,
3226       96,    85,   235,   117,   237,   119,   120,   870,   241,    52,
3227      243,    54,    55,    56,    57,   606,   117,   712,   119,   120,
3228      702,   254,  1031,   256,   981,  1027,   983,  1029,   666,  1031,
3229      673,   508,  1023,   728,   991,    59,    60,    61,    62,  1051,
3230       26,  1028,   306,   307,   308,   309,   310,   311,   312,   313,
3231      733,  1029,   761,  1010,   321,   103,   802,   803,   982,   323,
3232      494,   325,    97,   431,   328,    82,    83,   435,   888,   934,
3233     1027,   891,   440,   306,   307,   308,   309,   310,   311,   312,
3234      313,   882,    68,   902,   898,   905,  1027,   907,   456,    -1,
3235      323,   879,   325,   461,    -1,   328,   360,    -1,   362,    -1,
3236      323,    -1,   366,   367,   368,   328,    -1,    -1,    94,    95,
3237      127,   128,    -1,   687,   688,    -1,    77,    -1,   382,   693,
3238      694,    -1,    -1,    -1,    -1,  1028,    -1,   360,    -1,   362,
3239       -1,    92,    93,   366,   367,   368,   898,    -1,    -1,    -1,
3240      902,    -1,    -1,   905,    -1,   907,   410,   411,    -1,   382,
3241      845,   519,   861,   848,   863,   141,    -1,   143,    -1,   854,
3242      146,   425,   857,    63,   738,   739,    -1,   741,   742,    -1,
3243      879,   132,   133,   134,   135,   136,    -1,   410,   411,   888,
3244     1000,    52,  1002,    54,    55,    56,    57,  1007,    -1,   898,
3245       -1,  1011,   425,  1013,    -1,   459,   905,   420,   421,    -1,
3246     1020,    40,    41,    42,    43,    44,   429,    52,    77,    54,
3247       55,    56,    57,    58,   478,   961,   962,   117,    -1,   119,
3248      120,   967,   122,   969,   970,    -1,   459,    -1,    99,    -1,
3249       -1,    -1,    77,   928,   105,    -1,    -1,   932,    -1,    -1,
3250     1060,   464,    -1,    -1,   467,   478,  1066,    -1,    -1,  1011,
3251       -1,  1013,   826,    -1,    99,    -1,  1018,    -1,  1020,    -1,
3252      105,   106,   107,   132,   133,   134,   135,   136,    -1,    -1,
3253       52,    -1,    54,    55,    56,    57,    58,    -1,    -1,    -1,
3254       -1,    -1,    -1,    -1,    -1,    -1,   131,    -1,    -1,   134,
3255      513,  1000,    -1,   867,    -1,    77,    -1,    -1,  1044,  1045,
3256     1046,  1047,  1011,   998,  1066,    -1,   151,    -1,    -1,    -1,
3257      574,    52,   576,    54,    55,    56,    57,    99,    -1,    -1,
3258       -1,    -1,   586,   105,   106,   107,    52,  1073,    54,    55,
3259       56,    57,   596,    -1,   598,   599,    -1,  1032,    -1,    -1,
3260       -1,   574,    52,   576,    54,    55,    56,    57,    58,   131,
3261       -1,    -1,   134,   586,    -1,    77,    -1,    -1,    99,   582,
3262       -1,   729,    -1,   596,   146,   598,   599,    77,   632,    -1,
3263       92,    93,    -1,    99,    -1,    -1,   744,    -1,    -1,   105,
3264       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    99,
3265      613,    -1,   615,    -1,    -1,    -1,   106,   107,    -1,   632,
3266       -1,    -1,    -1,   667,    -1,   628,   629,   129,   130,   131,
3267      132,   133,   134,   135,   136,    -1,   680,   681,    -1,    -1,
3268      684,   131,    -1,   687,   688,    -1,    -1,    -1,    -1,   693,
3269      694,    -1,    -1,    -1,   667,    -1,    -1,    -1,    52,    -1,
3270       54,    55,    56,    57,    58,    -1,    -1,   680,   681,    -1,
3271       -1,   684,    -1,   676,   687,   688,   720,    -1,   722,   723,
3272      693,   694,    -1,    77,    -1,    -1,    -1,    -1,    -1,    -1,
3273       -1,    -1,    -1,    -1,    -1,    16,    17,    -1,   701,    77,
3274       -1,    -1,    -1,    -1,    -1,    99,    -1,   720,    -1,   722,
3275      723,   105,   106,   107,    92,    93,    -1,    -1,    -1,    -1,
3276       -1,    -1,    -1,    -1,    -1,    -1,   874,    48,    49,    -1,
3277       -1,    -1,    53,    54,    -1,    -1,    -1,   131,    -1,    -1,
3278      134,    -1,    -1,    -1,    -1,    66,    67,    -1,    -1,    -1,
3279       -1,    -1,    -1,   131,   132,   133,   134,   135,   136,    -1,
3280       -1,    -1,    -1,    -1,   808,    -1,    -1,   770,    -1,    -1,
3281       -1,    -1,    -1,    -1,    -1,    -1,    -1,    98,    -1,    -1,
3282       -1,    -1,   826,   931,    -1,    -1,    -1,   935,    -1,    -1,
3283       -1,    -1,    -1,    -1,   838,   808,    -1,    -1,    -1,   843,
3284      844,    -1,    -1,    -1,    -1,    -1,   809,    -1,   852,    -1,
3285       -1,   855,    -1,   826,    -1,    -1,    -1,    -1,   862,    -1,
3286       -1,    -1,    -1,    -1,    -1,   838,    -1,    -1,    -1,    -1,
3287      843,   844,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   852,
3288       -1,    -1,   855,    -1,    -1,    -1,    -1,    -1,   851,   862,
3289       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
3290       -1,    -1,    -1,    -1,     2,   868,     4,    -1,    77,    78,
3291       79,    80,    81,    82,    83,   878,   920,    86,    87,    -1,
3292       -1,    -1,    -1,    92,    93,   206,    -1,    -1,   209,   210,
3293      211,    -1,   213,    -1,    -1,    -1,    -1,   941,   942,    -1,
3294       -1,    -1,    -1,    -1,    -1,    -1,    -1,   920,   229,    -1,
3295      231,   232,    -1,    51,    52,    -1,    -1,    55,   127,   128,
3296      129,   130,   131,   132,   133,   134,   135,   136,   941,   942,
3297       -1,    -1,    -1,    -1,    -1,    -1,    -1,   981,    -1,   983,
3298       -1,    -1,    -1,    81,    -1,    -1,    -1,   991,    -1,    -1,
3299       -1,    -1,    -1,    -1,    -1,    -1,    94,    95,    96,    -1,
3300       -1,    -1,    -1,    -1,    -1,    -1,  1010,    -1,   981,    -1,
3301      983,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   991,    -1,
3302       -1,    -1,    -1,  1027,    -1,    -1,    -1,    -1,    -1,    -1,
3303       77,    78,    79,    80,    81,    82,    83,  1010,    -1,    86,
3304       87,    -1,   323,    -1,    -1,    92,    93,   328,   329,   330,
3305      331,   332,   333,    -1,  1027,   336,   337,   338,   339,   340,
3306      341,   342,   343,   344,    -1,    -1,   347,   348,   349,   350,
3307      351,   352,   353,   354,   355,   356,    -1,    -1,    -1,   360,
3308      127,   128,   129,   130,   131,   132,   133,   134,   135,   136,
3309       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
3310       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
3311      208,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
3312       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   410,
3313      411,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   419,   420,
3314      421,    -1,    -1,   241,   425,   243,   427,   428,   429,    -1,
3315       -1,    -1,    -1,    -1,    -1,    -1,   254,    -1,   256,    -1,
3316       -1,    -1,    -1,    -1,    -1,    -1,    -1,   448,    -1,    -1,
3317       -1,    -1,   453,    -1,    -1,    -1,    -1,    -1,    -1,   277,
3318       -1,    -1,    -1,   464,    -1,    -1,   467,     2,    -1,     4,
3319       -1,    -1,    -1,    -1,    -1,    -1,    -1,   478,    -1,    -1,
3320       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   306,    -1,
3321       -1,    -1,    -1,   311,    -1,   496,    -1,    -1,    -1,    -1,
3322       -1,    -1,    -1,    -1,    -1,    -1,    -1,   325,   326,    -1,
3323      328,    -1,   513,    -1,    -1,    -1,    51,    52,    -1,    -1,
3324       55,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
3325       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
3326       -1,    -1,    -1,    -1,   362,    -1,    81,    -1,   366,    -1,
3327      368,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    94,
3328       95,    96,    97,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
3329       -1,    -1,    -1,    -1,    -1,    -1,     2,    -1,     4,    -1,
3330       -1,   582,    -1,    -1,    -1,   586,    -1,    -1,    -1,    -1,
3331       -1,    -1,   410,   411,    -1,   596,    -1,    -1,    -1,    -1,
3332       -1,    -1,    -1,    -1,     2,    -1,     4,    -1,    -1,    -1,
3333       -1,    -1,   613,    -1,   615,    -1,    -1,    -1,    -1,    -1,
3334       -1,    -1,    -1,    -1,    -1,    51,    52,   628,   629,    55,
3335       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
3336       -1,   459,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
3337       -1,    -1,    -1,    51,    52,    81,    -1,    -1,   476,    -1,
3338       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    94,    95,
3339       96,    97,    -1,   208,    -1,   676,    -1,    -1,    -1,    -1,
3340      681,   682,    -1,   684,    -1,    -1,   687,   688,    -1,    -1,
3341       -1,    -1,   693,   694,    -1,    -1,    94,    -1,    -1,    -1,
3342      701,    -1,   520,    -1,    -1,    -1,   241,    -1,   243,    -1,
3343       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   254,
3344       -1,   256,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
3345       -1,    -1,    -1,    -1,    -1,    -1,    -1,   738,   739,    -1,
3346      741,   742,   277,    -1,    77,    78,    79,    80,    81,    82,
3347       83,    84,    -1,    86,    87,    -1,   574,    -1,   576,    92,
3348       93,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   770,
3349       -1,   306,    -1,    -1,    -1,    -1,   311,    -1,    -1,    -1,
3350      598,    -1,   208,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
3351      325,   326,    -1,    -1,   127,   128,   129,   130,   131,   132,
3352      133,   134,   135,   136,    -1,    -1,    -1,    -1,   809,    -1,
3353      208,    -1,    -1,    -1,    -1,   241,    -1,   243,   819,    -1,
3354       -1,    -1,    -1,    -1,    -1,   826,   644,   362,   254,    -1,
3355      256,   366,    -1,   368,    -1,   653,    -1,    -1,    -1,    -1,
3356       -1,    -1,    -1,   241,    -1,   243,    -1,    -1,    -1,   667,
3357      851,   277,    -1,    -1,    -1,    -1,   254,    -1,   256,    -1,
3358       -1,   679,   680,   681,    -1,    -1,   867,   868,    -1,   687,
3359      688,    -1,    -1,    -1,    -1,   693,   694,   878,    -1,    -1,
3360      306,    -1,    -1,    -1,    -1,   311,    -1,    -1,    -1,    -1,
3361       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   325,
3362      326,    -1,   720,    -1,    -1,   723,     0,    -1,   306,    -1,
3363        2,    -1,     4,   311,     8,     9,    10,    -1,    -1,    13,
3364       14,    15,    -1,    17,   459,    -1,    -1,   325,    -1,    -1,
3365      328,    -1,    26,    27,    -1,    -1,   362,    -1,    -1,    -1,
3366      366,   476,   368,    37,    38,    -1,    40,    41,    42,    43,
3367       44,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    51,
3368       52,    -1,    -1,    -1,   362,    -1,    -1,    -1,   366,    -1,
3369      368,    -1,    -1,    -1,    68,    -1,    -1,    -1,    -1,   797,
3370       -1,    -1,    -1,    -1,    -1,   520,    -1,    -1,    -1,    -1,
3371      808,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
3372       94,    95,    -1,    -1,    -1,    -1,    -1,    -1,   826,    -1,
3373       -1,    -1,   410,   411,    -1,    -1,    -1,    -1,    -1,    -1,
3374      838,    -1,    -1,    -1,   118,   843,  1027,    -1,    -1,    -1,
3375       -1,    -1,    -1,   459,   852,    -1,    -1,   855,    -1,   574,
3376       -1,   576,    -1,    -1,   862,    -1,    -1,   141,   142,    -1,
3377      476,    -1,   146,   147,    -1,   149,    -1,   151,    -1,    -1,
3378       -1,   459,    -1,   598,    -1,    -1,    -1,    -1,    -1,    -1,
3379       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   897,
3380       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
3381       -1,    -1,    -1,    -1,   520,    -1,    -1,    -1,   916,    -1,
3382       -1,    -1,   920,    -1,    -1,    -1,    -1,    -1,    -1,   644,
3383       -1,    -1,    -1,    -1,    -1,    -1,   208,    -1,    -1,    -1,
3384       -1,    -1,    -1,   941,   942,    -1,    -1,    -1,    -1,    -1,
3385       -1,    -1,   667,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
3386       -1,    -1,    -1,    -1,   679,   680,    -1,    -1,   574,   241,
3387      576,   243,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
3388       -1,    -1,   254,   981,   256,   983,    -1,    -1,    -1,    -1,
3389       -1,    -1,   598,   991,    -1,    -1,   574,    -1,   576,    -1,
3390       -1,    -1,    -1,    -1,    -1,   720,    -1,    -1,   723,    -1,
3391       -1,    -1,  1010,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
3392      598,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
3393       -1,    -1,    -1,    -1,   306,    -1,    -1,    -1,   644,   311,
3394       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
3395       -1,    -1,    -1,   325,    -1,    -1,   328,    -1,    -1,    -1,
3396       -1,   667,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
3397       -1,    -1,    -1,   679,   680,    -1,    -1,    -1,    -1,    -1,
3398       -1,    -1,   797,    -1,    -1,    -1,    -1,    -1,    -1,   667,
3399      362,    -1,    -1,   808,   366,    -1,   368,    -1,    -1,    -1,
3400       -1,    -1,   680,   681,    -1,    -1,    -1,    -1,    -1,   687,
3401      688,    -1,    -1,    -1,   720,   693,   694,   723,    -1,    -1,
3402       -1,    -1,    -1,   838,    -1,    44,    -1,    -1,   843,    -1,
3403       -1,    -1,    -1,    -1,    -1,    -1,    -1,   852,   410,   411,
3404      855,    -1,   720,    -1,    -1,   723,    -1,   862,    -1,    -1,
3405       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    77,    78,
3406       79,    80,    81,    82,    83,    84,    85,    86,    87,    88,
3407       89,    -1,    -1,    92,    93,    -1,    -1,    -1,    -1,    -1,
3408       -1,    -1,   897,    -1,    -1,    -1,    -1,   459,    -1,    -1,
3409       -1,   797,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
3410       -1,   916,   808,    -1,    -1,   920,   125,    -1,   127,   128,
3411      129,   130,   131,   132,   133,   134,   135,   136,    -1,    -1,
3412       -1,    -1,    -1,    -1,    -1,   144,   941,   942,    -1,    -1,
3413      808,    -1,   838,    -1,    -1,    -1,    -1,   843,    -1,    -1,
3414       -1,    -1,    -1,    -1,    -1,    -1,   852,    -1,   826,   855,
3415       -1,    -1,    -1,    -1,    -1,    -1,   862,    -1,    -1,    -1,
3416      838,    -1,    -1,    -1,    -1,   843,   981,    -1,   983,    -1,
3417       -1,    -1,    -1,    -1,   852,    -1,   991,   855,    -1,    -1,
3418       -1,    -1,    -1,    -1,   862,    -1,    -1,    -1,    -1,    -1,
3419       -1,   897,    -1,    -1,    -1,  1010,    -1,    -1,    -1,    -1,
3420       -1,    -1,   574,    -1,   576,    -1,    -1,    -1,    -1,    -1,
3421      916,    -1,    -1,    -1,   920,    -1,    -1,    -1,    -1,    -1,
3422       -1,    -1,    -1,    -1,    -1,    -1,   598,    -1,    -1,    -1,
3423       -1,    -1,    -1,    -1,    -1,   941,   942,    -1,   916,    -1,
3424       -1,    -1,   920,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
3425       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
3426       -1,    -1,    -1,   941,   942,    -1,    -1,    -1,    -1,    -1,
3427       -1,    -1,    -1,    -1,    -1,   981,    -1,   983,    -1,    -1,
3428       -1,    -1,    -1,    -1,    -1,   991,    -1,    -1,    -1,    -1,
3429       -1,    -1,    -1,    -1,    -1,   667,    -1,    -1,    -1,    -1,
3430       -1,    -1,    -1,   981,  1010,   983,    -1,    -1,   680,   681,
3431        3,     4,     5,   991,     7,   687,   688,    -1,    11,    12,
3432       -1,   693,   694,    16,    -1,    18,    19,    20,    21,    22,
3433       23,    24,  1010,    -1,    -1,    -1,    -1,    30,    31,    32,
3434       33,    34,    35,    36,    -1,    -1,    39,    -1,   720,    -1,
3435       -1,   723,    -1,    46,    -1,    -1,    49,    50,    51,    52,
3436       53,    54,    55,    56,    57,    -1,    59,    60,    61,    62,
3437       -1,    64,    65,    66,    -1,    -1,    -1,    -1,    -1,    -1,
3438       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
3439       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
3440       -1,    -1,    -1,    96,    -1,    -1,    99,   100,    -1,   102,
3441      103,    -1,    -1,    -1,    -1,   108,   109,   110,   111,   112,
3442      113,   114,   115,   116,    -1,    -1,    -1,    -1,    -1,    -1,
3443       -1,    -1,     0,    -1,    -1,    -1,   808,    -1,    -1,    -1,
3444        8,     9,    10,    -1,   137,    13,    14,    15,    -1,    17,
3445       -1,   144,    -1,    -1,   826,    -1,    -1,    -1,    26,    27,
3446       28,    29,    -1,    -1,    -1,    -1,   838,    -1,    -1,    37,
3447       38,   843,    40,    41,    42,    43,    44,    -1,    -1,    -1,
3448      852,    -1,    -1,   855,    -1,    -1,    -1,    -1,    -1,    -1,
3449      862,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
3450       68,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    77,
3451       78,    79,    80,    81,    82,    83,    84,    85,    86,    87,
3452       88,    89,    -1,    -1,    92,    93,    94,    95,    -1,    97,
3453       98,    -1,    -1,    -1,    -1,    -1,   104,    -1,    -1,    -1,
3454       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   920,    -1,
3455      118,    -1,    -1,   121,    -1,    -1,   124,   125,   126,   127,
3456      128,   129,   130,   131,   132,   133,   134,   135,   136,   941,
3457      942,    -1,    -1,   141,   142,   143,   144,    -1,    -1,   147,
3458      148,   149,    -1,   151,    -1,    -1,    -1,    -1,    -1,    -1,
3459       -1,    -1,    -1,    -1,     0,     1,    -1,     3,     4,     5,
3460        6,     7,    -1,    -1,    -1,    11,    12,    -1,    -1,   981,
3461       16,   983,    18,    19,    20,    21,    22,    23,    24,   991,
3462       -1,    -1,    -1,    -1,    30,    31,    32,    33,    34,    35,
3463       36,    -1,    -1,    39,    -1,    -1,    -1,    -1,  1010,    45,
3464       46,    47,    48,    49,    50,    51,    52,    53,    54,    55,
3465       56,    57,    -1,    59,    60,    61,    62,    -1,    64,    65,
3466       66,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    75,
3467       76,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
3468       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
3469       96,    -1,    -1,    99,   100,    -1,   102,   103,    -1,   105,
3470       -1,    -1,   108,   109,   110,   111,   112,   113,   114,   115,
3471      116,     0,    -1,    -1,    -1,    -1,    -1,    -1,    -1,     8,
3472        9,    10,    -1,    -1,    13,    14,    15,    -1,    17,    -1,
3473       -1,   137,   138,   139,    -1,    -1,    25,    -1,    27,    28,
3474       29,    -1,    -1,   149,    -1,   151,    -1,    -1,    37,    38,
3475       -1,    40,    41,    42,    43,    44,    -1,    -1,    -1,    -1,
3476       -1,    -1,    -1,    -1,    -1,    -1,    77,    78,    79,    80,
3477       81,    82,    83,    84,    85,    86,    87,    88,    89,    68,
3478       -1,    92,    93,    -1,    -1,    -1,    -1,    -1,    77,    78,
3479       79,    80,    81,    82,    83,    84,    85,    86,    87,    88,
3480       89,    -1,    -1,    92,    93,    94,    95,    -1,    97,    98,
3481       -1,    -1,    -1,    -1,   125,   104,   127,   128,   129,   130,
3482      131,   132,   133,   134,   135,   136,    -1,    -1,    -1,   118,
3483       -1,    -1,   121,    -1,    -1,   124,   125,   126,   127,   128,
3484      129,   130,   131,   132,   133,   134,   135,   136,    -1,    -1,
3485       -1,    -1,    -1,   142,   143,   144,     0,    -1,   147,   148,
3486      149,    -1,   151,    -1,     8,     9,    10,    -1,    -1,    13,
3487       14,    15,    -1,    17,    -1,    -1,    -1,    -1,    44,    -1,
3488       -1,    25,    -1,    27,    28,    29,    -1,    -1,    -1,    -1,
3489       -1,    -1,    -1,    37,    38,    -1,    40,    41,    42,    43,
3490       44,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
3491       -1,    77,    78,    79,    80,    81,    82,    83,    84,    85,
3492       86,    87,    88,    89,    68,    -1,    92,    93,    -1,    -1,
3493       -1,    -1,    -1,    77,    78,    79,    80,    81,    82,    83,
3494       84,    85,    86,    87,    88,    89,    -1,    -1,    92,    93,
3495       94,    95,    -1,    97,    98,    -1,    -1,    -1,    -1,   125,
3496      104,   127,   128,   129,   130,   131,   132,   133,   134,   135,
3497      136,    -1,    -1,    -1,   118,    -1,    -1,   121,    -1,    -1,
3498      124,   125,   126,   127,   128,   129,   130,   131,   132,   133,
3499      134,   135,   136,    -1,    -1,    -1,    -1,    -1,   142,   143,
3500      144,     0,    -1,   147,   148,   149,    -1,   151,    -1,     8,
3501        9,    10,    -1,    -1,    13,    14,    15,    -1,    17,    -1,
3502       -1,    -1,    -1,    -1,    -1,    -1,    -1,    26,    27,    28,
3503       29,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    37,    38,
3504       -1,    40,    41,    42,    43,    44,    -1,    -1,    -1,    -1,
3505       -1,    -1,    -1,    -1,    -1,    -1,    77,    78,    79,    80,
3506       81,    82,    83,    84,    85,    86,    87,    88,    89,    68,
3507       -1,    92,    93,    -1,    -1,    -1,    -1,    -1,    77,    78,
3508       79,    80,    81,    82,    83,    84,    85,    86,    87,    88,
3509       89,    -1,    -1,    92,    93,    94,    95,    -1,    -1,    98,
3510       -1,    -1,    -1,    -1,    -1,   104,   127,   128,   129,   130,
3511      131,   132,   133,   134,   135,   136,    -1,    -1,    -1,   118,
3512       -1,    -1,   121,    -1,    -1,    -1,   125,   126,   127,   128,
3513      129,   130,   131,   132,   133,   134,   135,   136,    -1,    -1,
3514       -1,    -1,   141,   142,   143,   144,     0,    -1,   147,   148,
3515      149,    -1,   151,    -1,     8,     9,    10,    -1,    -1,    13,
3516       14,    15,    -1,    17,    -1,    -1,    -1,    -1,    -1,    -1,
3517       -1,    -1,    26,    27,    28,    29,    -1,    -1,    -1,    -1,
3518       -1,    -1,    -1,    37,    38,    -1,    40,    41,    42,    43,
3519       44,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
3520       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
3521       -1,    -1,    -1,    -1,    68,    -1,    -1,    -1,    -1,    -1,
3522       -1,    -1,    -1,    77,    78,    79,    80,    81,    82,    83,
3523       84,    85,    86,    87,    88,    89,    -1,    -1,    92,    93,
3524       94,    95,    -1,    -1,    98,    -1,    -1,    -1,    -1,    -1,
3525      104,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
3526       -1,    -1,    -1,    -1,   118,    -1,    -1,   121,    -1,    -1,
3527       -1,   125,   126,   127,   128,   129,   130,   131,   132,   133,
3528      134,   135,   136,    -1,    -1,    -1,    -1,   141,   142,   143,
3529      144,     0,    -1,   147,   148,   149,    -1,   151,    -1,     8,
3530        9,    10,    -1,    -1,    13,    14,    15,    -1,    17,    -1,
3531       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    27,    28,
3532       29,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    37,    38,
3533       -1,    40,    41,    42,    43,    44,    -1,    -1,    -1,    -1,
3534       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
3535       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    68,
3536       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    77,    78,
3537       79,    80,    81,    82,    83,    84,    85,    86,    87,    88,
3538       89,    -1,    -1,    92,    93,    94,    95,    -1,    97,    98,
3539       -1,    -1,    -1,    -1,    -1,   104,    -1,    -1,    -1,    -1,
3540       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   118,
3541       -1,    -1,   121,    -1,    -1,   124,   125,   126,   127,   128,
3542      129,   130,   131,   132,   133,   134,   135,   136,    -1,    -1,
3543       -1,    -1,    -1,   142,   143,   144,     0,    -1,   147,   148,
3544      149,    -1,   151,    -1,     8,     9,    10,    -1,    -1,    13,
3545       14,    15,    -1,    17,    -1,    -1,    -1,    -1,    -1,    -1,
3546       -1,    -1,    26,    27,    28,    -1,    -1,    -1,    -1,    -1,
3547       -1,    -1,    -1,    37,    38,    -1,    40,    41,    42,    43,
3548       44,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
3549       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
3550       -1,    -1,    -1,    -1,    68,    -1,    -1,    -1,    -1,    -1,
3551       -1,    -1,    -1,    77,    78,    79,    80,    81,    82,    83,
3552       84,    85,    86,    87,    88,    89,    -1,    -1,    92,    93,
3553       94,    95,    -1,    -1,    98,    -1,    -1,    -1,    -1,    -1,
3554      104,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
3555       -1,    -1,    -1,    -1,   118,    -1,    -1,    -1,    -1,    -1,
3556       -1,   125,    -1,   127,   128,   129,   130,   131,   132,   133,
3557      134,   135,   136,    -1,    -1,    -1,    -1,   141,   142,   143,
3558      144,     0,   146,   147,   148,   149,    -1,   151,    -1,     8,
3559        9,    10,    -1,    -1,    13,    14,    15,    -1,    17,    -1,
3560       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    27,    28,
3561       29,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    37,    38,
3562       -1,    40,    41,    42,    43,    44,    -1,    -1,    -1,    -1,
3563       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
3564       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    68,
3565       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    77,    78,
3566       79,    80,    81,    82,    83,    84,    85,    86,    87,    88,
3567       89,    -1,    -1,    92,    93,    94,    95,    -1,    -1,    98,
3568       -1,    -1,    -1,    -1,    -1,   104,    -1,    -1,    -1,    -1,
3569       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   118,
3570       -1,    -1,   121,    -1,    -1,    -1,   125,   126,   127,   128,
3571      129,   130,   131,   132,   133,   134,   135,   136,    -1,    -1,
3572       -1,    -1,    -1,   142,   143,   144,     0,    -1,   147,   148,
3573      149,    -1,   151,    -1,     8,     9,    10,    -1,    -1,    13,
3574       14,    15,    -1,    17,    -1,    -1,    -1,    -1,    -1,    -1,
3575       -1,    -1,    26,    27,    28,    -1,    -1,    -1,    -1,    -1,
3576       -1,    -1,    -1,    37,    38,    -1,    40,    41,    42,    43,
3577       44,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
3578       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
3579       -1,    -1,    -1,    -1,    68,    -1,    -1,    -1,    -1,    -1,
3580       -1,    -1,    -1,    77,    78,    79,    80,    81,    82,    83,
3581       84,    85,    86,    87,    88,    89,    -1,    -1,    92,    93,
3582       94,    95,    -1,    -1,    98,    -1,    -1,    -1,    -1,    -1,
3583      104,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
3584       -1,    -1,    -1,    -1,   118,    -1,    -1,    -1,    -1,    -1,
3585       -1,   125,    -1,   127,   128,   129,   130,   131,   132,   133,
3586      134,   135,   136,    -1,    -1,    -1,    -1,   141,   142,   143,
3587      144,     0,   146,   147,   148,   149,    -1,   151,    -1,     8,
3588        9,    10,    -1,    -1,    13,    14,    15,    -1,    17,    -1,
3589       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    27,    28,
3590       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    37,    38,
3591       -1,    40,    41,    42,    43,    44,    -1,    -1,    -1,    -1,
3592       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
3593       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    68,
3594       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    77,    78,
3595       79,    80,    81,    82,    83,    84,    85,    86,    87,    88,
3596       89,    -1,    -1,    92,    93,    94,    95,    -1,    -1,    98,
3597       -1,    -1,    -1,    -1,    -1,   104,    -1,    -1,    -1,    -1,
3598       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   118,
3599       -1,    -1,    -1,    -1,    -1,    -1,   125,    -1,   127,   128,
3600      129,   130,   131,   132,   133,   134,   135,   136,    -1,    -1,
3601       -1,    -1,    -1,   142,   143,   144,     0,   146,   147,   148,
3602      149,    -1,   151,    -1,     8,     9,    10,    -1,    -1,    -1,
3603       14,    15,    -1,    17,    -1,    -1,    -1,    -1,    -1,    -1,
3604       -1,    -1,    26,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
3605       -1,    -1,    -1,    37,    38,    -1,    40,    41,    42,    43,
3606       44,    -1,    -1,    -1,    77,    78,    79,    80,    81,    82,
3607       83,    84,    85,    86,    87,    88,    89,    -1,    -1,    92,
3608       93,    -1,    -1,    -1,    68,    -1,    -1,    -1,    -1,    -1,
3609       -1,    -1,    -1,    77,    78,    79,    80,    81,    82,    83,
3610       84,    85,    86,    87,    88,    89,    -1,    -1,    92,    93,
3611       94,    95,   125,    97,   127,   128,   129,   130,   131,   132,
3612      133,   134,   135,   136,    -1,    -1,    -1,    -1,    -1,    -1,
3613       -1,    -1,    -1,    -1,   118,    -1,    -1,    -1,   151,    -1,
3614      124,   125,    -1,   127,   128,   129,   130,   131,   132,   133,
3615      134,   135,   136,    -1,    -1,    -1,    -1,   141,   142,   143,
3616      144,     0,    -1,   147,    -1,   149,    -1,   151,    -1,     8,
3617        9,    10,    -1,    -1,    -1,    14,    15,    -1,    17,    -1,
3618       -1,    -1,    -1,    -1,    -1,    -1,    -1,    26,    -1,    -1,
3619       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    37,    38,
3620       -1,    40,    41,    42,    43,    44,    -1,    -1,    -1,    -1,
3621       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
3622       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    68,
3623       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    77,    78,
3624       79,    80,    81,    82,    83,    84,    85,    86,    87,    88,
3625       89,    -1,    -1,    92,    93,    94,    95,    -1,    97,    -1,
3626       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
3627       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   118,
3628       -1,    -1,    -1,    -1,    -1,   124,   125,    -1,   127,   128,
3629      129,   130,   131,   132,   133,   134,   135,   136,    -1,    -1,
3630       -1,    -1,   141,   142,   143,   144,     0,    -1,   147,    -1,
3631      149,    -1,   151,    -1,     8,     9,    10,    -1,    -1,    -1,
3632       14,    15,    -1,    17,    -1,    -1,    -1,    -1,    -1,    -1,
3633       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
3634       -1,    -1,    -1,    37,    38,    -1,    40,    41,    42,    43,
3635       44,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
3636       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
3637       -1,    -1,    -1,    -1,    68,    -1,    -1,    -1,    -1,    -1,
3638       -1,    -1,    -1,    77,    78,    79,    80,    81,    82,    83,
3639       84,    85,    86,    87,    88,    89,    -1,    -1,    92,    93,
3640       94,    95,    -1,    97,    -1,    -1,    -1,    -1,    -1,    -1,
3641       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
3642       -1,    -1,    -1,    -1,   118,    -1,    -1,    -1,    -1,    -1,
3643      124,   125,    -1,   127,   128,   129,   130,   131,   132,   133,
3644      134,   135,   136,    -1,    -1,    -1,    -1,    -1,   142,   143,
3645      144,     0,    -1,   147,    -1,   149,    -1,   151,    -1,     8,
3646        9,    10,    -1,    -1,    -1,    14,    15,    -1,    17,    -1,
3647       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
3648       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    37,    38,
3649       -1,    40,    41,    42,    43,    44,    -1,    -1,    -1,    -1,
3650       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
3651       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    68,
3652       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    77,    78,
3653       79,    80,    81,    82,    83,    84,    85,    86,    87,    88,
3654       89,    -1,    -1,    92,    93,    94,    95,    -1,    97,    -1,
3655       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
3656       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   118,
3657       -1,    -1,    -1,    -1,    -1,   124,   125,    -1,   127,   128,
3658      129,   130,   131,   132,   133,   134,   135,   136,    -1,    -1,
3659       -1,    -1,    -1,   142,   143,   144,    -1,    -1,   147,    -1,
3660      149,     1,   151,     3,     4,     5,     6,     7,     8,     9,
3661       10,    11,    12,    -1,    -1,    15,    16,    -1,    18,    19,
3662       20,    21,    22,    23,    24,    -1,    -1,    -1,    -1,    -1,
3663       30,    31,    32,    33,    34,    35,    36,    -1,    -1,    39,
3664       -1,    -1,    -1,    -1,    -1,    45,    46,    47,    48,    49,
3665       50,    51,    52,    53,    54,    55,    56,    57,    -1,    59,
3666       60,    61,    62,    -1,    64,    65,    66,    -1,    -1,    -1,
3667       -1,    -1,    -1,    -1,    -1,    75,    76,    -1,    -1,    -1,
3668       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
3669       -1,    -1,    -1,    -1,    -1,    -1,    96,    -1,    -1,    99,
3670      100,    -1,   102,   103,    -1,   105,    -1,    -1,   108,   109,
3671      110,   111,   112,   113,   114,   115,   116,    -1,    -1,    -1,
3672       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
3673       -1,    -1,    -1,    -1,    -1,    -1,    -1,   137,   138,   139,
3674       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   149,
3675        1,   151,     3,     4,     5,     6,     7,    -1,    -1,    10,
3676       11,    12,    -1,    14,    15,    16,    -1,    18,    19,    20,
3677       21,    22,    23,    24,    -1,    -1,    -1,    -1,    -1,    30,
3678       31,    32,    33,    34,    35,    36,    -1,    -1,    39,    -1,
3679       -1,    -1,    -1,    -1,    45,    46,    47,    48,    49,    50,
3680       51,    52,    53,    54,    55,    56,    57,    -1,    59,    60,
3681       61,    62,    -1,    64,    65,    66,    -1,    -1,    -1,    -1,
3682       -1,    -1,    -1,    -1,    75,    76,    -1,    -1,    -1,    -1,
3683       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
3684       -1,    -1,    -1,    -1,    -1,    96,    -1,    -1,    99,   100,
3685       -1,   102,   103,    -1,   105,    -1,    -1,   108,   109,   110,
3686      111,   112,   113,   114,   115,   116,    -1,    -1,    -1,    -1,
3687       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
3688       -1,    -1,    -1,    -1,    -1,    -1,   137,   138,   139,    -1,
3689       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   149,     1,
3690      151,     3,     4,     5,     6,     7,    -1,    -1,    10,    11,
3691       12,    -1,    -1,    15,    16,    17,    18,    19,    20,    21,
3692       22,    23,    24,    -1,    -1,    -1,    -1,    -1,    30,    31,
3693       32,    33,    34,    35,    36,    -1,    -1,    39,    -1,    -1,
3694       -1,    -1,    -1,    45,    46,    47,    48,    49,    50,    51,
3695       52,    53,    54,    55,    56,    57,    -1,    59,    60,    61,
3696       62,    -1,    64,    65,    66,    -1,    -1,    -1,    -1,    -1,
3697       -1,    -1,    -1,    75,    76,    -1,    -1,    -1,    -1,    -1,
3698       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
3699       -1,    -1,    -1,    -1,    96,    -1,    -1,    99,   100,    -1,
3700      102,   103,    -1,   105,    -1,    -1,   108,   109,   110,   111,
3701      112,   113,   114,   115,   116,    -1,    -1,    -1,    -1,    -1,
3702       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
3703       -1,    -1,    -1,    -1,    -1,   137,   138,   139,    -1,    -1,
3704       -1,    -1,    -1,    -1,    -1,    -1,    -1,   149,     1,   151,
3705        3,     4,     5,     6,     7,    -1,    -1,    10,    11,    12,
3706       -1,    -1,    15,    16,    -1,    18,    19,    20,    21,    22,
3707       23,    24,    -1,    -1,    -1,    -1,    -1,    30,    31,    32,
3708       33,    34,    35,    36,    -1,    -1,    39,    -1,    -1,    -1,
3709       -1,    -1,    45,    46,    47,    48,    49,    50,    51,    52,
3710       53,    54,    55,    56,    57,    -1,    59,    60,    61,    62,
3711       -1,    64,    65,    66,    -1,    -1,    -1,    -1,    -1,    -1,
3712       -1,    -1,    75,    76,    -1,    -1,    -1,    -1,    -1,    -1,
3713       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
3714       -1,    -1,    -1,    96,    -1,    -1,    99,   100,    -1,   102,
3715      103,    -1,   105,    -1,    -1,   108,   109,   110,   111,   112,
3716      113,   114,   115,   116,    -1,    -1,    -1,    -1,    -1,    -1,
3717       -1,    -1,     1,    -1,     3,     4,     5,     6,     7,    -1,
3718        9,    10,    11,    12,   137,   138,   139,    16,    -1,    18,
3719       19,    20,    21,    22,    23,    24,   149,    -1,   151,    -1,
3720       -1,    30,    31,    32,    33,    34,    35,    36,    -1,    -1,
3721       39,    -1,    -1,    -1,    -1,    -1,    45,    46,    47,    48,
3722       49,    50,    51,    52,    53,    54,    55,    56,    57,    -1,
3723       59,    60,    61,    62,    -1,    64,    65,    66,    -1,    -1,
3724       -1,    -1,    -1,    -1,    -1,    -1,    75,    76,    -1,    -1,
3725       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
3726       -1,    -1,    -1,    -1,    -1,    -1,    -1,    96,    -1,    -1,
3727       99,   100,    -1,   102,   103,    -1,   105,    -1,    -1,   108,
3728      109,   110,   111,   112,   113,   114,   115,   116,    -1,    -1,
3729       -1,    -1,    -1,    -1,    -1,    -1,     1,    -1,     3,     4,
3730        5,     6,     7,    -1,    -1,    -1,    11,    12,   137,   138,
3731      139,    16,    -1,    18,    19,    20,    21,    22,    23,    24,
3732      149,    -1,   151,    -1,    -1,    30,    31,    32,    33,    34,
3733       35,    36,    -1,    -1,    39,    -1,    -1,    -1,    -1,    -1,
3734       45,    46,    47,    48,    49,    50,    51,    52,    53,    54,
3735       55,    56,    57,    -1,    59,    60,    61,    62,    -1,    64,
3736       65,    66,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
3737       75,    76,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
3738       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
3739       -1,    96,    -1,    -1,    99,   100,    -1,   102,   103,    -1,
3740      105,    -1,    -1,   108,   109,   110,   111,   112,   113,   114,
3741      115,   116,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
3742       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
3743       -1,    -1,   137,   138,   139,    -1,    -1,    -1,    -1,    -1,
3744       -1,    -1,   147,    -1,   149,     1,   151,     3,     4,     5,
3745        6,     7,    -1,    -1,    -1,    11,    12,    -1,    -1,    -1,
3746       16,    -1,    18,    19,    20,    21,    22,    23,    24,    -1,
3747       -1,    -1,    -1,    -1,    30,    31,    32,    33,    34,    35,
3748       36,    -1,    -1,    39,    -1,    -1,    -1,    -1,    -1,    45,
3749       46,    47,    48,    49,    50,    51,    52,    53,    54,    55,
3750       56,    57,    -1,    59,    60,    61,    62,    -1,    64,    65,
3751       66,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    75,
3752       76,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
3753       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
3754       96,    -1,    -1,    99,   100,    -1,   102,   103,    -1,   105,
3755       -1,    -1,   108,   109,   110,   111,   112,   113,   114,   115,
3756      116,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
3757       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
3758       -1,   137,   138,   139,    -1,    -1,    -1,    -1,    -1,    -1,
3759       -1,   147,    -1,   149,     1,   151,     3,     4,     5,     6,
3760        7,    -1,    -1,    -1,    11,    12,    -1,    -1,    -1,    16,
3761       -1,    18,    19,    20,    21,    22,    23,    24,    -1,    -1,
3762       -1,    -1,    -1,    30,    31,    32,    33,    34,    35,    36,
3763       -1,    -1,    39,    -1,    -1,    -1,    -1,    -1,    45,    46,
3764       47,    48,    49,    50,    51,    52,    53,    54,    55,    56,
3765       57,    -1,    59,    60,    61,    62,    -1,    64,    65,    66,
3766       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    75,    76,
3767       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
3768       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    96,
3769       -1,    -1,    99,   100,    -1,   102,   103,    -1,   105,    -1,
3770       -1,   108,   109,   110,   111,   112,   113,   114,   115,   116,
3771       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
3772       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
3773      137,   138,   139,    -1,    -1,   142,    -1,    -1,    -1,    -1,
3774       -1,    -1,   149,     1,   151,     3,     4,     5,     6,     7,
3775       -1,    -1,    -1,    11,    12,    -1,    -1,    -1,    16,    -1,
3776       18,    19,    20,    21,    22,    23,    24,    -1,    -1,    -1,
3777       -1,    -1,    30,    31,    32,    33,    34,    35,    36,    -1,
3778       -1,    39,    -1,    -1,    -1,    -1,    -1,    45,    46,    47,
3779       48,    49,    50,    51,    52,    53,    54,    55,    56,    57,
3780       -1,    59,    60,    61,    62,    -1,    64,    65,    66,    -1,
3781       -1,    -1,    -1,    -1,    -1,    -1,    -1,    75,    76,    -1,
3782       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
3783       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    96,    -1,
3784       -1,    99,   100,    -1,   102,   103,    -1,   105,    -1,    -1,
3785      108,   109,   110,   111,   112,   113,   114,   115,   116,    -1,
3786       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
3787       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   137,
3788      138,   139,    -1,    -1,   142,    -1,    -1,    -1,    -1,    -1,
3789       -1,   149,     1,   151,     3,     4,     5,     6,     7,    -1,
3790       -1,    10,    11,    12,    -1,    -1,    -1,    16,    -1,    18,
3791       19,    20,    21,    22,    23,    24,    -1,    -1,    -1,    -1,
3792       -1,    30,    31,    32,    33,    34,    35,    36,    -1,    -1,
3793       39,    -1,    -1,    -1,    -1,    -1,    45,    46,    47,    48,
3794       49,    50,    51,    52,    53,    54,    55,    56,    57,    -1,
3795       59,    60,    61,    62,    -1,    64,    65,    66,    -1,    -1,
3796       -1,    -1,    -1,    -1,    -1,    -1,    75,    76,    -1,    -1,
3797       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
3798       -1,    -1,    -1,    -1,    -1,    -1,    -1,    96,    -1,    -1,
3799       99,   100,    -1,   102,   103,    -1,   105,    -1,    -1,   108,
3800      109,   110,   111,   112,   113,   114,   115,   116,    -1,    -1,
3801       -1,    -1,    -1,    -1,    -1,    -1,     1,    -1,     3,     4,
3802        5,     6,     7,    -1,    -1,    -1,    11,    12,   137,   138,
3803      139,    16,    -1,    18,    19,    20,    21,    22,    23,    24,
3804      149,    -1,   151,    -1,    -1,    30,    31,    32,    33,    34,
3805       35,    36,    -1,    -1,    39,    -1,    -1,    -1,    -1,    -1,
3806       45,    46,    47,    48,    49,    50,    51,    52,    53,    54,
3807       55,    56,    57,    -1,    59,    60,    61,    62,    -1,    64,
3808       65,    66,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
3809       75,    76,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
3810       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
3811       -1,    96,    -1,    -1,    99,   100,    -1,   102,   103,    -1,
3812      105,    -1,    -1,   108,   109,   110,   111,   112,   113,   114,
3813      115,   116,    -1,   118,    -1,    -1,    -1,    -1,    -1,    -1,
3814       -1,    -1,     3,     4,     5,    -1,     7,    -1,    -1,    -1,
3815       11,    12,   137,   138,   139,    16,    -1,    18,    19,    20,
3816       21,    22,    23,    24,   149,    -1,   151,    -1,    -1,    30,
3817       31,    32,    33,    34,    35,    36,    -1,    -1,    39,    -1,
3818       -1,    -1,    -1,    -1,    -1,    46,    -1,    -1,    49,    50,
3819       51,    52,    53,    54,    55,    56,    57,    58,    59,    60,
3820       61,    62,    -1,    64,    65,    66,    -1,    -1,    -1,    -1,
3821       -1,    -1,    -1,    -1,    75,    76,    -1,    -1,    -1,    -1,
3822       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
3823       -1,    -1,    -1,    -1,    -1,    96,    -1,    -1,    99,   100,
3824       -1,   102,   103,    -1,   105,   106,   107,   108,   109,   110,
3825      111,   112,   113,   114,   115,   116,    -1,    -1,    -1,    -1,
3826       -1,    -1,    -1,    -1,    -1,    -1,     3,     4,     5,    -1,
3827        7,    -1,    -1,    -1,    11,    12,   137,   138,   139,    16,
3828       -1,    18,    19,    20,    21,    22,    23,    24,    -1,    -1,
3829      151,    -1,    -1,    30,    31,    32,    33,    34,    35,    36,
3830       -1,    -1,    39,    -1,    -1,    -1,    -1,    -1,    -1,    46,
3831       -1,    -1,    49,    50,    51,    52,    53,    54,    55,    56,
3832       57,    -1,    59,    60,    61,    62,    -1,    64,    65,    66,
3833       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    75,    76,
3834       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
3835       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    96,
3836       -1,    -1,    99,   100,    -1,   102,   103,    -1,    -1,    -1,
3837       -1,   108,   109,   110,   111,   112,   113,   114,   115,   116,
3838       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
3839        3,     4,     5,    -1,     7,    -1,    -1,    -1,    11,    12,
3840      137,   138,   139,    16,    -1,    18,    19,    20,    21,    22,
3841       23,    24,   149,    -1,   151,    -1,    -1,    30,    31,    32,
3842       33,    34,    35,    36,    -1,    -1,    39,    -1,    -1,    -1,
3843       -1,    -1,    -1,    46,    -1,    -1,    49,    50,    51,    52,
3844       53,    54,    55,    56,    57,    -1,    59,    60,    61,    62,
3845       -1,    64,    65,    66,    -1,    -1,    -1,    -1,    -1,    -1,
3846       -1,    -1,    75,    76,    -1,    -1,    -1,    -1,    -1,    -1,
3847       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
3848       -1,    -1,    -1,    96,    -1,    -1,    99,   100,    -1,   102,
3849      103,    -1,    -1,    -1,    -1,   108,   109,   110,   111,   112,
3850      113,   114,   115,   116,    -1,    -1,    -1,    -1,    -1,    -1,
3851       -1,    -1,    -1,    -1,     3,     4,     5,     6,     7,    -1,
3852       -1,    -1,    11,    12,   137,   138,   139,    16,    -1,    18,
3853       19,    20,    21,    22,    23,    24,    -1,    -1,   151,    -1,
3854       -1,    30,    31,    32,    33,    34,    35,    36,    -1,    -1,
3855       39,    -1,    -1,    -1,    -1,    -1,    45,    46,    47,    48,
3856       49,    50,    51,    52,    53,    54,    55,    56,    57,    -1,
3857       59,    60,    61,    62,    -1,    64,    65,    66,    -1,    -1,
3858       -1,    -1,    -1,    -1,    -1,    -1,    75,    76,    -1,    -1,
3859       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
3860       -1,    -1,    -1,    -1,    -1,    -1,    -1,    96,    -1,    -1,
3861       99,   100,    -1,   102,   103,    -1,   105,    -1,    -1,   108,
3862      109,   110,   111,   112,   113,   114,   115,   116,    -1,    -1,
3863       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,     3,     4,
3864        5,     6,     7,    -1,    -1,    -1,    11,    12,   137,   138,
3865      139,    16,    -1,    18,    19,    20,    21,    22,    23,    24,
3866      149,    -1,    -1,    -1,    -1,    30,    31,    32,    33,    34,
3867       35,    36,    -1,    -1,    39,    -1,    -1,    -1,    -1,    -1,
3868       45,    46,    47,    48,    49,    50,    51,    52,    53,    54,
3869       55,    56,    57,    -1,    59,    60,    61,    62,    -1,    64,
3870       65,    66,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
3871       75,    76,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
3872       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
3873       -1,    96,    -1,    -1,    99,   100,    -1,   102,   103,    -1,
3874      105,    -1,    -1,   108,   109,   110,   111,   112,   113,   114,
3875      115,   116,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
3876       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
3877       -1,    -1,   137,   138,   139,    -1,    -1,    -1,    -1,    -1,
3878       -1,    -1,    -1,    -1,   149,     3,     4,     5,     6,     7,
3879        8,     9,    10,    11,    12,    13,    14,    15,    16,    17,
3880       18,    19,    20,    21,    22,    23,    24,    25,    26,    -1,
3881       -1,    -1,    30,    31,    32,    33,    34,    35,    36,    37,
3882       38,    39,    -1,    -1,    -1,    -1,    -1,    45,    46,    47,
3883       48,    49,    50,    51,    52,    53,    54,    55,    56,    57,
3884       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
3885       -1,    -1,    -1,    -1,    -1,    -1,    -1,    75,    76,    77,
3886       78,    79,    80,    81,    82,    83,    -1,    -1,    86,    87,
3887       -1,    -1,    90,    91,    92,    93,    -1,    -1,    -1,    -1,
3888       -1,    -1,    -1,    -1,    -1,    -1,    -1,   105,   106,    -1,
3889       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
3890       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   127,
3891      128,   129,   130,   131,   132,   133,   134,   135,   136,    -1,
3892      138,   139,    -1,    -1,    -1,    -1,    -1,   145,   146,     3,
3893        4,     5,     6,     7,     8,     9,    10,    11,    12,    13,
3894       14,    15,    16,    17,    18,    19,    20,    21,    22,    23,
3895       24,    25,    26,    -1,    -1,    -1,    30,    31,    32,    33,
3896       34,    35,    36,    37,    38,    39,    -1,    -1,    -1,    -1,
3897       -1,    45,    46,    47,    48,    49,    50,    51,    52,    53,
3898       54,    55,    56,    57,    -1,    -1,    -1,    -1,    -1,    -1,
3899       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
3900       -1,    75,    76,    77,    78,    79,    80,    81,    82,    83,
3901       -1,    -1,    86,    87,    -1,    -1,    90,    91,    92,    93,
3902       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
3903       -1,   105,   106,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
3904       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
3905       -1,    -1,    -1,   127,   128,   129,   130,   131,   132,   133,
3906      134,   135,   136,    -1,   138,   139,    -1,    -1,    -1,    -1,
3907       -1,   145,     3,     4,     5,     6,     7,     8,     9,    10,
3908       11,    12,    13,    14,    15,    16,    17,    18,    19,    20,
3909       21,    22,    23,    24,    25,    26,    -1,    -1,    -1,    30,
3910       31,    32,    33,    34,    35,    36,    37,    38,    39,    -1,
3911       -1,    -1,    -1,    -1,    45,    46,    47,    48,    49,    50,
3912       51,    52,    53,    54,    -1,    56,    -1,    -1,    -1,    -1,
3913       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
3914       -1,    -1,    -1,    -1,    75,    76,    77,    78,    79,    80,
3915       81,    82,    83,    -1,    -1,    86,    87,    -1,    -1,    90,
3916       91,    92,    93,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
3917       -1,    -1,    -1,    -1,   105,   106,    -1,    -1,   109,    -1,
3918       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
3919       -1,    -1,    -1,    -1,    -1,    -1,   127,   128,   129,   130,
3920      131,   132,   133,   134,   135,   136,    -1,   138,   139,    -1,
3921       -1,    -1,    -1,    -1,   145,     3,     4,     5,     6,     7,
3922        8,     9,    10,    11,    12,    13,    14,    15,    16,    17,
3923       18,    19,    20,    21,    22,    23,    24,    25,    26,    -1,
3924       -1,    -1,    30,    31,    32,    33,    34,    35,    36,    37,
3925       38,    39,    -1,    -1,    -1,    -1,    -1,    45,    46,    47,
3926       48,    49,    50,    51,    52,    53,    -1,    -1,    56,    -1,
3927       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
3928       -1,    -1,    -1,    -1,    -1,    -1,    -1,    75,    76,    77,
3929       78,    79,    80,    81,    82,    83,    -1,    -1,    86,    87,
3930       -1,    -1,    90,    91,    92,    93,    -1,    -1,    -1,    -1,
3931       -1,    -1,    -1,    -1,    -1,    -1,    -1,   105,   106,    -1,
3932       -1,   109,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
3933       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   127,
3934      128,   129,   130,   131,   132,   133,   134,   135,   136,    -1,
3935      138,   139,    -1,    -1,    -1,    -1,    -1,   145,     3,     4,
3936        5,     6,     7,     8,     9,    10,    11,    12,    13,    14,
3937       15,    16,    17,    18,    19,    20,    21,    22,    23,    24,
3938       25,    26,    -1,    -1,    -1,    30,    31,    32,    33,    34,
3939       35,    36,    37,    38,    39,    -1,    -1,    -1,    -1,    -1,
3940       45,    46,    47,    48,    49,    50,    51,    52,    53,    -1,
3941       -1,    56,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
3942       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
3943       75,    76,    77,    78,    79,    80,    81,    82,    83,    -1,
3944       -1,    86,    87,    -1,    -1,    90,    91,    92,    93,    -1,
3945       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
3946      105,   106,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
3947       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
3948       -1,    -1,   127,   128,   129,   130,   131,   132,   133,   134,
3949      135,   136,    -1,   138,   139,     3,     4,     5,    -1,     7,
3950      145,    -1,    -1,    11,    12,    -1,    -1,    -1,    16,    -1,
3951       18,    19,    20,    21,    22,    23,    24,    -1,    -1,    -1,
3952       -1,    -1,    30,    31,    32,    33,    34,    35,    36,    -1,
3953       -1,    39,    -1,    -1,    -1,    -1,    -1,    -1,    46,    -1,
3954       -1,    49,    50,    51,    52,    53,    54,    55,    56,    57,
3955       -1,    59,    60,    61,    62,    -1,    64,    65,    66,    -1,
3956       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
3957       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
3958       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    96,    -1,
3959       -1,    99,   100,    -1,   102,   103,    -1,    -1,    -1,    -1,
3960      108,   109,   110,   111,   112,   113,   114,   115,   116,    -1,
3961       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
3962       -1,    -1,     3,     4,     5,     6,     7,    -1,    -1,   137,
3963       11,    12,    -1,    -1,    -1,    16,   144,    18,    19,    20,
3964       21,    22,    23,    24,    -1,    -1,    -1,    -1,    -1,    30,
3965       31,    32,    33,    34,    35,    36,    -1,    -1,    39,    -1,
3966       -1,    -1,    -1,    -1,    45,    46,    47,    48,    49,    50,
3967       51,    52,    53,    54,    55,    56,    57,    -1,    59,    60,
3968       61,    62,    -1,    64,    65,    66,    -1,    -1,    -1,    -1,
3969       -1,    -1,    -1,    -1,    75,    76,    -1,    -1,    -1,    -1,
3970       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
3971       -1,    -1,    -1,    -1,    -1,    96,    -1,    -1,    99,   100,
3972       -1,   102,   103,    -1,   105,    -1,    -1,   108,   109,   110,
3973      111,   112,   113,   114,   115,   116,    -1,    -1,    -1,    -1,
3974       -1,    -1,    -1,    -1,    -1,    -1,     3,     4,     5,    -1,
3975        7,    -1,    -1,    -1,    11,    12,   137,   138,   139,    16,
3976       -1,    18,    19,    20,    21,    22,    23,    24,    -1,    -1,
3977       -1,    -1,    -1,    30,    31,    32,    33,    34,    35,    36,
3978       -1,    -1,    39,    -1,    -1,    -1,    -1,    -1,    -1,    46,
3979       -1,    -1,    49,    50,    51,    52,    53,    54,    55,    56,
3980       57,    58,    59,    60,    61,    62,    -1,    64,    65,    66,
3981       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    75,    76,
3982       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
3983       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    96,
3984       -1,    -1,    99,   100,    -1,   102,   103,    -1,   105,   106,
3985      107,   108,   109,   110,   111,   112,   113,   114,   115,   116,
3986       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
3987        3,     4,     5,     6,     7,    -1,    -1,    -1,    11,    12,
3988      137,   138,   139,    16,    -1,    18,    19,    20,    21,    22,
3989       23,    24,    -1,    -1,    -1,    -1,    -1,    30,    31,    32,
3990       33,    34,    35,    36,    -1,    -1,    39,    -1,    -1,    -1,
3991       -1,    -1,    45,    46,    -1,    48,    49,    50,    51,    52,
3992       53,    54,    55,    56,    57,    -1,    59,    60,    61,    62,
3993       -1,    64,    65,    66,    -1,    -1,    -1,    -1,    -1,    -1,
3994       -1,    -1,    75,    76,    -1,    -1,    -1,    -1,    -1,    -1,
3995       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
3996       -1,    -1,    -1,    96,    -1,    -1,    99,   100,    -1,   102,
3997      103,    -1,   105,    -1,    -1,   108,   109,   110,   111,   112,
3998      113,   114,   115,   116,    -1,    -1,    -1,    -1,    -1,    -1,
3999       -1,    -1,    -1,    -1,     3,     4,     5,    -1,     7,    -1,
4000       -1,    -1,    11,    12,   137,   138,   139,    16,    -1,    18,
4001       19,    20,    21,    22,    23,    24,    -1,    -1,    -1,    -1,
4002       -1,    30,    31,    32,    33,    34,    35,    36,    -1,    -1,
4003       39,    -1,    -1,    -1,    -1,    -1,    -1,    46,    -1,    -1,
4004       49,    50,    51,    52,    53,    54,    55,    56,    57,    58,
4005       59,    60,    61,    62,    -1,    64,    65,    66,    -1,    -1,
4006       -1,    -1,    -1,    -1,    -1,    -1,    75,    76,    -1,    -1,
4007       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
4008       -1,    -1,    -1,    -1,    -1,    -1,    -1,    96,    -1,    -1,
4009       99,   100,    -1,   102,   103,    -1,   105,   106,   107,   108,
4010      109,   110,   111,   112,   113,   114,   115,   116,    -1,    -1,
4011       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,     3,     4,
4012        5,    -1,     7,    -1,    -1,    -1,    11,    12,   137,   138,
4013      139,    16,    -1,    18,    19,    20,    21,    22,    23,    24,
4014       -1,    -1,    -1,    -1,    -1,    30,    31,    32,    33,    34,
4015       35,    36,    -1,    -1,    39,    -1,    -1,    -1,    -1,    -1,
4016       -1,    46,    -1,    -1,    49,    50,    51,    52,    53,    54,
4017       55,    56,    57,    58,    59,    60,    61,    62,    -1,    64,
4018       65,    66,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
4019       75,    76,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
4020       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
4021       -1,    96,    -1,    -1,    99,   100,    -1,   102,   103,    -1,
4022      105,   106,    -1,   108,   109,   110,   111,   112,   113,   114,
4023      115,   116,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
4024       -1,    -1,     3,     4,     5,    -1,     7,    -1,    -1,    -1,
4025       11,    12,   137,   138,   139,    16,    -1,    18,    19,    20,
4026       21,    22,    23,    24,    -1,    -1,    -1,    -1,    -1,    30,
4027       31,    32,    33,    34,    35,    36,    -1,    -1,    39,    -1,
4028       -1,    -1,    -1,    -1,    -1,    46,    -1,    -1,    49,    50,
4029       51,    52,    53,    54,    55,    56,    57,    58,    59,    60,
4030       61,    62,    -1,    64,    65,    66,    -1,    -1,    -1,    -1,
4031       -1,    -1,    -1,    -1,    75,    76,    -1,    -1,    -1,    -1,
4032       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
4033       -1,    -1,    -1,    -1,    -1,    96,    -1,    -1,    99,   100,
4034       -1,   102,   103,    -1,    -1,   106,   107,   108,   109,   110,
4035      111,   112,   113,   114,   115,   116,    -1,    -1,    -1,    -1,
4036       -1,    -1,    -1,    -1,    -1,    -1,     3,     4,     5,    -1,
4037        7,    -1,    -1,    -1,    11,    12,   137,   138,   139,    16,
4038       -1,    18,    19,    20,    21,    22,    23,    24,    -1,    -1,
4039       -1,    -1,    -1,    30,    31,    32,    33,    34,    35,    36,
4040       -1,    -1,    39,    -1,    -1,    -1,    -1,    -1,    -1,    46,
4041       -1,    -1,    49,    50,    51,    52,    53,    54,    55,    56,
4042       57,    58,    59,    60,    61,    62,    -1,    64,    65,    66,
4043       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    75,    76,
4044       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
4045       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    96,
4046       -1,    -1,    99,   100,    -1,   102,   103,    -1,   105,   106,
4047       -1,   108,   109,   110,   111,   112,   113,   114,   115,   116,
4048       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
4049        3,     4,     5,    -1,     7,    -1,    -1,    -1,    11,    12,
4050      137,   138,   139,    16,    -1,    18,    19,    20,    21,    22,
4051       23,    24,    -1,    -1,    -1,    -1,    -1,    30,    31,    32,
4052       33,    34,    35,    36,    -1,    -1,    39,    -1,    -1,    -1,
4053       -1,    -1,    -1,    46,    -1,    -1,    49,    50,    51,    52,
4054       53,    54,    55,    56,    57,    58,    59,    60,    61,    62,
4055       -1,    64,    65,    66,    -1,    -1,    -1,    -1,    -1,    -1,
4056       -1,    -1,    75,    76,    -1,    -1,    -1,    -1,    -1,    -1,
4057       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
4058       -1,    -1,    -1,    96,    -1,    -1,    99,   100,    -1,   102,
4059      103,    -1,    -1,   106,    -1,   108,   109,   110,   111,   112,
4060      113,   114,   115,   116,    -1,    -1,    -1,    -1,    -1,    -1,
4061       -1,    -1,    -1,    -1,     3,     4,     5,    -1,     7,    -1,
4062       -1,    -1,    11,    12,   137,   138,   139,    16,    -1,    18,
4063       19,    20,    21,    22,    23,    24,    -1,    -1,    -1,    -1,
4064       -1,    30,    31,    32,    33,    34,    35,    36,    -1,    -1,
4065       39,    -1,    -1,    -1,    -1,    -1,    -1,    46,    -1,    -1,
4066       49,    50,    51,    52,    53,    54,    55,    56,    57,    -1,
4067       59,    60,    61,    62,    -1,    64,    65,    66,    -1,    -1,
4068       -1,    -1,    -1,    -1,    -1,    -1,    75,    76,    -1,    -1,
4069       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
4070       -1,    -1,    -1,    -1,    -1,    -1,    -1,    96,    -1,    -1,
4071       99,   100,    -1,   102,   103,    -1,   105,    -1,    -1,   108,
4072      109,   110,   111,   112,   113,   114,   115,   116,    -1,    -1,
4073       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,     3,     4,
4074        5,    -1,     7,    -1,    -1,    -1,    11,    12,   137,   138,
4075      139,    16,    -1,    18,    19,    20,    21,    22,    23,    24,
4076       -1,    -1,    -1,    -1,    -1,    30,    31,    32,    33,    34,
4077       35,    36,    -1,    -1,    39,    -1,    -1,    -1,    -1,    -1,
4078       -1,    46,    -1,    -1,    49,    50,    51,    52,    53,    54,
4079       55,    56,    57,    -1,    59,    60,    61,    62,    -1,    64,
4080       65,    66,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
4081       75,    76,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
4082       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
4083       -1,    96,    -1,    -1,    99,   100,    -1,   102,   103,    -1,
4084      105,    -1,    -1,   108,   109,   110,   111,   112,   113,   114,
4085      115,   116,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
4086       -1,    -1,     3,     4,     5,    -1,     7,    -1,    -1,    -1,
4087       11,    12,   137,   138,   139,    16,    -1,    18,    19,    20,
4088       21,    22,    23,    24,    -1,    -1,    -1,    -1,    -1,    30,
4089       31,    32,    33,    34,    35,    36,    -1,    -1,    39,    -1,
4090       -1,    -1,    -1,    -1,    -1,    46,    -1,    -1,    49,    50,
4091       51,    52,    53,    54,    55,    56,    57,    -1,    59,    60,
4092       61,    62,    -1,    64,    65,    66,    -1,    -1,    -1,    -1,
4093       -1,    -1,    -1,    -1,    75,    76,    -1,    -1,    -1,    -1,
4094       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
4095       -1,    -1,    -1,    -1,    -1,    96,    -1,    -1,    99,   100,
4096       -1,   102,   103,    -1,   105,    -1,    -1,   108,   109,   110,
4097      111,   112,   113,   114,   115,   116,    -1,    -1,    -1,    -1,
4098       -1,    -1,    -1,    -1,    -1,    -1,     3,     4,     5,    -1,
4099        7,    -1,    -1,    -1,    11,    12,   137,   138,   139,    16,
4100       -1,    18,    19,    20,    21,    22,    23,    24,    -1,    -1,
4101       -1,    -1,    -1,    30,    31,    32,    33,    34,    35,    36,
4102       -1,    -1,    39,    -1,    -1,    -1,    -1,    -1,    -1,    46,
4103       -1,    -1,    49,    50,    51,    52,    53,    54,    55,    56,
4104       57,    -1,    59,    60,    61,    62,    -1,    64,    65,    66,
4105       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    75,    76,
4106       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
4107       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    96,
4108       -1,    -1,    99,   100,    -1,   102,   103,    -1,   105,    -1,
4109       -1,   108,   109,   110,   111,   112,   113,   114,   115,   116,
4110       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
4111        3,     4,     5,    -1,     7,    -1,    -1,    -1,    11,    12,
4112      137,   138,   139,    16,    -1,    18,    19,    20,    21,    22,
4113       23,    24,    -1,    -1,    -1,    -1,    -1,    30,    31,    32,
4114       33,    34,    35,    36,    -1,    -1,    39,    -1,    -1,    -1,
4115       -1,    -1,    -1,    46,    -1,    -1,    49,    50,    51,    52,
4116       53,    54,    55,    56,    57,    -1,    59,    60,    61,    62,
4117       -1,    64,    65,    66,    -1,    -1,    -1,    -1,    -1,    -1,
4118       -1,    -1,    75,    76,    -1,    -1,    -1,    -1,    -1,    -1,
4119       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
4120       -1,    -1,    -1,    96,    -1,    -1,    99,   100,    -1,   102,
4121      103,    -1,   105,    -1,    -1,   108,   109,   110,   111,   112,
4122      113,   114,   115,   116,    -1,    -1,    -1,    -1,    -1,    -1,
4123       -1,    -1,    -1,    -1,     3,     4,     5,    -1,     7,    -1,
4124       -1,    -1,    11,    12,   137,   138,   139,    16,    -1,    18,
4125       19,    20,    21,    22,    23,    24,    -1,    -1,    -1,    -1,
4126       -1,    30,    31,    32,    33,    34,    35,    36,    -1,    -1,
4127       39,    -1,    -1,    -1,    -1,    -1,    -1,    46,    -1,    -1,
4128       49,    50,    51,    52,    53,    54,    55,    56,    57,    -1,
4129       59,    60,    61,    62,    -1,    64,    65,    66,    -1,    -1,
4130       -1,    -1,    -1,    -1,    -1,    -1,    75,    76,    -1,    -1,
4131       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
4132       -1,    -1,    -1,    -1,    -1,    -1,    -1,    96,    -1,    -1,
4133       99,   100,    -1,   102,   103,    -1,    -1,    -1,    -1,   108,
4134      109,   110,   111,   112,   113,   114,   115,   116,    -1,    -1,
4135       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,     3,     4,
4136        5,    -1,     7,    -1,    -1,    -1,    11,    12,   137,   138,
4137      139,    16,    -1,    18,    19,    20,    21,    22,    23,    24,
4138       -1,    -1,    -1,    -1,    -1,    30,    31,    32,    33,    34,
4139       35,    36,    -1,    -1,    39,    -1,    -1,    -1,    -1,    -1,
4140       -1,    46,    -1,    -1,    49,    50,    51,    52,    53,    54,
4141       55,    56,    57,    -1,    59,    60,    61,    62,    -1,    64,
4142       65,    66,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
4143       75,    76,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
4144       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
4145       -1,    96,    -1,    -1,    99,   100,    -1,   102,   103,    -1,
4146       -1,    -1,    -1,   108,   109,   110,   111,   112,   113,   114,
4147      115,   116,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
4148       -1,    -1,     3,     4,     5,    -1,     7,    -1,    -1,    -1,
4149       11,    12,   137,   138,   139,    16,    -1,    18,    19,    20,
4150       21,    22,    23,    24,    -1,    -1,    -1,    -1,    -1,    30,
4151       31,    32,    33,    34,    35,    36,    -1,    -1,    39,    -1,
4152       -1,    -1,    -1,    -1,    -1,    46,    -1,    -1,    49,    50,
4153       51,    52,    53,    54,    55,    56,    57,    -1,    59,    60,
4154       61,    62,    -1,    64,    65,    66,    -1,    -1,    -1,    -1,
4155       -1,    -1,    -1,    -1,    75,    76,    -1,    -1,    -1,    -1,
4156       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
4157       -1,    -1,    -1,    -1,    -1,    96,    -1,    -1,    99,   100,
4158       -1,   102,   103,    -1,    -1,    -1,    -1,   108,   109,   110,
4159      111,   112,   113,   114,   115,   116,    -1,    -1,    -1,    -1,
4160       -1,    -1,    -1,    -1,    -1,    -1,     3,     4,     5,    -1,
4161        7,    -1,    -1,    -1,    11,    12,   137,   138,   139,    16,
4162       -1,    18,    19,    20,    21,    22,    23,    24,    -1,    -1,
4163       -1,    -1,    -1,    30,    31,    32,    33,    34,    35,    36,
4164       -1,    -1,    39,    -1,    -1,    -1,    -1,    -1,    -1,    46,
4165       -1,    -1,    49,    50,    51,    52,    53,    54,    55,    56,
4166       57,    -1,    59,    60,    61,    62,    -1,    64,    65,    66,
4167       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
4168       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
4169       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    96,
4170       -1,    -1,    99,   100,    -1,   102,   103,    -1,   105,    -1,
4171       -1,   108,   109,   110,   111,   112,   113,   114,   115,   116,
4172       -1,    -1,    -1,    -1,    -1,    -1,     3,     4,     5,    -1,
4173        7,    -1,    -1,    -1,    11,    12,    -1,    -1,    -1,    16,
4174      137,    18,    19,    20,    21,    22,    23,    24,    -1,    -1,
4175       -1,    -1,    -1,    30,    31,    32,    33,    34,    35,    36,
4176       -1,    -1,    39,    -1,    -1,    -1,    -1,    -1,    -1,    46,
4177       -1,    -1,    49,    50,    51,    52,    53,    54,    55,    56,
4178       57,    -1,    59,    60,    61,    62,    -1,    64,    65,    66,
4179       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
4180       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
4181       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    96,
4182       -1,    -1,    99,   100,    -1,   102,   103,    -1,   105,    -1,
4183       -1,   108,   109,   110,   111,   112,   113,   114,   115,   116,
4184       -1,    -1,    -1,    -1,    -1,    -1,     3,     4,     5,    -1,
4185        7,    -1,    -1,    -1,    11,    12,    -1,    -1,    -1,    16,
4186      137,    18,    19,    20,    21,    22,    23,    24,    -1,    -1,
4187       -1,    -1,    -1,    30,    31,    32,    33,    34,    35,    36,
4188       -1,    -1,    39,    -1,    -1,    -1,    -1,    -1,    -1,    46,
4189       -1,    -1,    49,    50,    51,    52,    53,    54,    55,    56,
4190       57,    -1,    59,    60,    61,    62,    -1,    64,    65,    66,
4191       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
4192       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
4193       -1,    -1,    -1,    -1,    -1,    92,    -1,    -1,    -1,    96,
4194       -1,    -1,    99,   100,    -1,   102,   103,    -1,    -1,    -1,
4195       -1,   108,   109,   110,   111,   112,   113,   114,   115,   116,
4196       -1,    -1,    -1,    -1,    -1,    -1,     3,     4,     5,    -1,
4197        7,    -1,    -1,    -1,    11,    12,    -1,    -1,    -1,    16,
4198      137,    18,    19,    20,    21,    22,    23,    24,    -1,    -1,
4199       -1,    -1,    -1,    30,    31,    32,    33,    34,    35,    36,
4200       -1,    -1,    39,    -1,    -1,    -1,    -1,    -1,    -1,    46,
4201       -1,    -1,    49,    50,    51,    52,    53,    54,    55,    56,
4202       57,    -1,    59,    60,    61,    62,    -1,    64,    65,    66,
4203       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
4204       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
4205       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    96,
4206       -1,    -1,    99,   100,    -1,   102,   103,    -1,    -1,    -1,
4207       -1,   108,   109,   110,   111,   112,   113,   114,   115,   116,
4208       -1,    -1,    -1,    -1,    -1,    -1,     3,     4,     5,    -1,
4209        7,    -1,    -1,    -1,    11,    12,    -1,    -1,    -1,    16,
4210      137,    18,    19,    20,    21,    22,    23,    24,    -1,    -1,
4211       -1,    -1,    -1,    30,    31,    32,    33,    34,    35,    36,
4212       -1,    -1,    39,    -1,    -1,    -1,    -1,    -1,    -1,    46,
4213       -1,    -1,    49,    50,    51,    52,    53,    54,    55,    56,
4214       57,    -1,    59,    60,    61,    62,    -1,    64,    65,    66,
4215       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
4216       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
4217       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    96,
4218       -1,    -1,    99,   100,    -1,   102,   103,    -1,    -1,    -1,
4219       -1,   108,   109,   110,   111,   112,   113,   114,   115,   116,
4220       -1,    -1,    -1,    -1,    -1,    -1,     3,     4,     5,    -1,
4221        7,    -1,    -1,    -1,    11,    12,    -1,    -1,    -1,    16,
4222      137,    18,    19,    20,    21,    22,    23,    24,    -1,    -1,
4223       -1,    -1,    -1,    30,    31,    32,    33,    34,    35,    36,
4224       -1,    -1,    39,    -1,    -1,    -1,    -1,    -1,    -1,    46,
4225       -1,    -1,    49,    50,    51,    52,    53,    54,    55,    56,
4226       57,    -1,    59,    60,    61,    62,    -1,    64,    65,    66,
4227       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
4228       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
4229       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    96,
4230       -1,    -1,    99,   100,    -1,   102,   103,    -1,    -1,    -1,
4231       -1,   108,   109,   110,   111,   112,   113,   114,   115,   116,
4232       -1,    -1,    -1,    -1,    -1,    -1,     3,     4,     5,    -1,
4233        7,    -1,    -1,    -1,    11,    12,    -1,    -1,    -1,    16,
4234      137,    18,    19,    20,    21,    22,    23,    24,    -1,    -1,
4235       -1,    -1,    -1,    30,    31,    32,    33,    34,    35,    36,
4236       -1,    -1,    39,    -1,    -1,    -1,    -1,    -1,    -1,    46,
4237       -1,    -1,    49,    50,    51,    52,    53,    54,    55,    56,
4238       57,    -1,    59,    60,    61,    62,    -1,    64,    65,    66,
4239       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
4240       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
4241       -1,    -1,    -1,    -1,    -1,    -1,    -1,    52,    53,    96,
4242       -1,    56,    99,   100,    -1,   102,   103,    -1,    -1,    -1,
4243       -1,   108,   109,   110,   111,   112,   113,   114,   115,   116,
4244       75,    76,    77,    78,    79,    80,    81,    82,    83,    -1,
4245       -1,    86,    87,    -1,    -1,    90,    91,    92,    93,    -1,
4246      137,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
4247      105,   106,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
4248       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
4249       -1,    -1,   127,   128,   129,   130,   131,   132,   133,   134,
4250      135,   136,    -1,   138,   139,    52,    53,    -1,    -1,    56,
4251      145,   146,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
4252       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    75,    76,
4253       77,    78,    79,    80,    81,    82,    83,    -1,    -1,    86,
4254       87,    -1,    -1,    90,    91,    92,    93,    -1,    -1,    -1,
4255       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   105,   106,
4256       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
4257       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
4258      127,   128,   129,   130,   131,   132,   133,   134,   135,   136,
4259       -1,   138,   139,    52,    53,    -1,    -1,    56,   145,   146,
4260       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
4261       -1,    -1,    -1,    -1,    -1,    -1,    75,    76,    77,    78,
4262       79,    80,    81,    82,    83,    -1,    -1,    86,    87,    -1,
4263       -1,    90,    91,    92,    93,    -1,    -1,    -1,    -1,    -1,
4264       -1,    -1,    -1,    -1,    -1,    -1,   105,   106,    -1,    -1,
4265       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
4266       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   127,   128,
4267      129,   130,   131,   132,   133,   134,   135,   136,    -1,   138,
4268      139,    52,    53,    -1,    -1,    56,   145,   146,    -1,    -1,
4269       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
4270       -1,    -1,    -1,    -1,    75,    76,    77,    78,    79,    80,
4271       81,    82,    83,    -1,    -1,    86,    87,    -1,    -1,    90,
4272       91,    92,    93,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
4273       -1,    -1,    -1,    -1,   105,   106,    -1,    -1,    -1,    -1,
4274       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
4275       -1,    -1,    -1,    -1,    -1,    -1,   127,   128,   129,   130,
4276      131,   132,   133,   134,   135,   136,    -1,   138,   139,    52,
4277       53,    -1,    -1,    56,   145,   146,    -1,    -1,    -1,    -1,
4278       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
4279       -1,    -1,    75,    76,    77,    78,    79,    80,    81,    82,
4280       83,    -1,    -1,    86,    87,    -1,    -1,    90,    91,    92,
4281       93,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
4282       -1,    -1,   105,   106,    -1,    -1,    -1,    -1,    -1,    -1,
4283       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
4284       -1,    -1,    -1,    -1,   127,   128,   129,   130,   131,   132,
4285      133,   134,   135,   136,    -1,   138,   139,    52,    53,    -1,
4286       -1,    56,   145,   146,    -1,    -1,    -1,    -1,    -1,    -1,
4287       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
4288       75,    76,    77,    78,    79,    80,    81,    82,    83,    -1,
4289       -1,    86,    87,    -1,    -1,    90,    91,    92,    93,    -1,
4290       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
4291      105,   106,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
4292       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
4293       -1,    -1,   127,   128,   129,   130,   131,   132,   133,   134,
4294      135,   136,    -1,   138,   139,    52,    53,    -1,    -1,    56,
4295      145,   146,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
4296       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    75,    76,
4297       77,    78,    79,    80,    81,    82,    83,    -1,    -1,    86,
4298       87,    -1,    -1,    90,    91,    92,    93,    -1,    -1,    -1,
4299       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   105,   106,
4300       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
4301       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
4302      127,   128,   129,   130,   131,   132,   133,   134,   135,   136,
4303       -1,   138,   139,    52,    53,    -1,    -1,    56,   145,   146,
4304       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
4305       -1,    -1,    -1,    -1,    -1,    -1,    75,    76,    77,    78,
4306       79,    80,    81,    82,    83,    -1,    -1,    86,    87,    -1,
4307       -1,    90,    91,    92,    93,    -1,    -1,    -1,    -1,    -1,
4308       -1,    -1,    -1,    -1,    -1,    -1,   105,   106,    -1,    -1,
4309       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
4310       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   127,   128,
4311      129,   130,   131,   132,   133,   134,   135,   136,    -1,   138,
4312      139,    52,    53,    -1,    -1,    56,   145,   146,    -1,    -1,
4313       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
4314       -1,    -1,    -1,    -1,    75,    76,    77,    78,    79,    80,
4315       81,    82,    83,    -1,    -1,    86,    87,    -1,    -1,    90,
4316       91,    92,    93,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
4317       -1,    -1,    -1,    -1,   105,   106,    -1,    -1,    -1,    -1,
4318       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
4319       -1,    -1,    -1,    -1,    -1,    -1,   127,   128,   129,   130,
4320      131,   132,   133,   134,   135,   136,    -1,   138,   139,    52,
4321       53,    -1,    -1,    56,   145,   146,    -1,    -1,    -1,    -1,
4322       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
4323       -1,    -1,    75,    76,    77,    78,    79,    80,    81,    82,
4324       83,    -1,    -1,    86,    87,    -1,    -1,    90,    91,    92,
4325       93,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
4326       -1,    -1,   105,   106,    -1,    -1,    -1,    -1,    -1,    -1,
4327       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
4328       -1,    -1,    -1,    -1,   127,   128,   129,   130,   131,   132,
4329      133,   134,   135,   136,    -1,   138,   139,    52,    53,    -1,
4330       -1,    56,   145,   146,    -1,    -1,    -1,    -1,    -1,    -1,
4331       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
4332       75,    76,    77,    78,    79,    80,    81,    82,    83,    -1,
4333       -1,    86,    87,    -1,    -1,    90,    91,    92,    93,    -1,
4334       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
4335      105,   106,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
4336       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
4337       -1,    -1,   127,   128,   129,   130,   131,   132,   133,   134,
4338      135,   136,    -1,   138,   139,    52,    53,    -1,    -1,    56,
4339      145,   146,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
4340       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    75,    76,
4341       77,    78,    79,    80,    81,    82,    83,    -1,    -1,    86,
4342       87,    -1,    -1,    90,    91,    92,    93,    -1,    -1,    -1,
4343       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   105,   106,
4344       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
4345       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
4346      127,   128,   129,   130,   131,   132,   133,   134,   135,   136,
4347       -1,   138,   139,    52,    53,    -1,    -1,    56,   145,   146,
4348       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
4349       -1,    -1,    -1,    -1,    -1,    -1,    75,    76,    77,    78,
4350       79,    80,    81,    82,    83,    -1,    -1,    86,    87,    -1,
4351       -1,    90,    91,    92,    93,    -1,    -1,    -1,    -1,    -1,
4352       -1,    -1,    -1,    -1,    -1,    -1,   105,   106,    -1,    -1,
4353       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
4354       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   127,   128,
4355      129,   130,   131,   132,   133,   134,   135,   136,    -1,   138,
4356      139,    52,    53,    -1,    -1,    56,   145,   146,    -1,    -1,
4357       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
4358       -1,    -1,    -1,    -1,    75,    76,    77,    78,    79,    80,
4359       81,    82,    83,    -1,    -1,    86,    87,    -1,    -1,    90,
4360       91,    92,    93,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
4361       -1,    -1,    -1,    -1,   105,   106,    -1,    -1,    -1,    -1,
4362       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
4363       -1,    -1,    -1,    -1,    -1,    -1,   127,   128,   129,   130,
4364      131,   132,   133,   134,   135,   136,    -1,   138,   139,    52,
4365       53,    -1,    -1,    56,   145,   146,    -1,    -1,    -1,    -1,
4366       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
4367       -1,    -1,    75,    76,    77,    78,    79,    80,    81,    82,
4368       83,    -1,    -1,    86,    87,    -1,    -1,    90,    91,    92,
4369       93,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
4370       -1,    -1,   105,   106,    -1,    -1,    -1,    -1,    -1,    -1,
4371       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
4372       -1,    -1,    -1,    -1,   127,   128,   129,   130,   131,   132,
4373      133,   134,   135,   136,    -1,   138,   139,    52,    53,    -1,
4374       -1,    56,   145,   146,    -1,    -1,    -1,    -1,    -1,    -1,
4375       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
4376       75,    76,    77,    78,    79,    80,    81,    82,    83,    -1,
4377       -1,    86,    87,    -1,    -1,    90,    91,    92,    93,    -1,
4378       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
4379      105,   106,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
4380       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
4381       -1,    -1,   127,   128,   129,   130,   131,   132,   133,   134,
4382      135,   136,    -1,   138,   139,    -1,    -1,    -1,    -1,    -1,
4383      145
4384 };
4385 
4386   /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
4387      symbol of state STATE-NUM.  */
4388 static const yytype_int16 yystos[] =
4389 {
4390        0,   153,   154,     0,     1,     3,     4,     5,     6,     7,
4391       11,    12,    16,    18,    19,    20,    21,    22,    23,    24,
4392       30,    31,    32,    33,    34,    35,    36,    39,    45,    46,
4393       47,    48,    49,    50,    51,    52,    53,    54,    55,    56,
4394       57,    59,    60,    61,    62,    64,    65,    66,    75,    76,
4395       96,    99,   100,   102,   103,   105,   108,   109,   110,   111,
4396      112,   113,   114,   115,   116,   137,   138,   139,   155,   156,
4397      157,   165,   167,   169,   174,   175,   177,   178,   179,   181,
4398      182,   183,   185,   186,   196,   199,   214,   227,   228,   229,
4399      230,   231,   232,   233,   234,   235,   236,   237,   246,   270,
4400      271,   284,   285,   286,   287,   288,   289,   290,   293,   295,
4401      296,   310,   312,   313,   314,   315,   316,   317,   318,   319,
4402      353,   366,   157,     3,     4,     5,     6,     7,     8,     9,
4403       10,    11,    12,    13,    14,    15,    16,    17,    18,    19,
4404       20,    21,    22,    23,    24,    25,    26,    30,    31,    32,
4405       33,    34,    35,    36,    37,    38,    39,    45,    46,    47,
4406       48,    49,    50,    51,    52,    53,    56,    75,    76,    77,
4407       78,    79,    80,    81,    82,    83,    86,    87,    90,    91,
4408       92,    93,   105,   106,   127,   128,   129,   130,   131,   132,
4409      133,   134,   135,   136,   138,   139,   145,   189,   190,   191,
4410      192,   194,   195,   310,   312,    39,    58,    96,    99,   105,
4411      106,   107,   110,   138,   178,   186,   196,   200,   206,   209,
4412      211,   227,   315,   316,   318,   319,   351,   352,   206,   146,
4413      207,   208,   146,   203,   207,   146,   151,   360,    54,   191,
4414      360,   141,   158,   141,    21,    22,    31,    32,   177,   196,
4415      227,   246,   196,    56,     1,    47,    99,   161,   162,   163,
4416      165,   180,   181,   366,   165,   216,   201,   211,   351,   366,
4417      200,   350,   351,   366,    46,    96,   137,   144,   185,   214,
4418      227,   315,   316,   319,   219,    54,    55,    57,   189,   299,
4419      311,   299,   300,   301,   150,   150,   150,   150,   314,   174,
4420      196,   196,   149,   151,   359,   364,   365,    40,    41,    42,
4421       43,    44,    37,    38,    26,   141,   203,   207,   238,   272,
4422       28,   239,   269,   124,   144,    99,   105,   182,   124,    77,
4423       78,    79,    80,    81,    82,    83,    84,    85,    86,    87,
4424       88,    89,    92,    93,   125,   127,   128,   129,   130,   131,
4425      132,   133,   134,   135,   136,   198,   198,    68,    94,    95,
4426      143,   357,   215,   169,   170,   170,   171,   172,   171,   170,
4427      359,   365,    96,   179,   186,   227,   251,   315,   316,   319,
4428       52,    56,    92,    96,   187,   188,   227,   315,   316,   319,
4429      188,    33,    34,    35,    36,    49,    50,    51,    52,    56,
4430      146,   189,   317,   348,   206,    95,   357,   358,   272,   287,
4431       97,    97,   144,   200,    56,   200,   200,   200,   299,   124,
4432       98,   144,   210,   366,    95,   143,   357,    97,    97,   144,
4433      210,   206,   360,   361,   206,   205,   206,   211,   351,   366,
4434      169,   361,   169,    54,    65,    66,   166,   146,   197,   155,
4435      161,    95,   357,    97,   165,   164,   180,   147,   359,   365,
4436      361,   217,   361,   148,   144,   151,   363,   144,   363,   142,
4437      363,   360,    56,   314,   182,   184,   144,    95,   143,   357,
4438      263,   264,    63,   117,   119,   120,   302,   120,   120,   302,
4439       67,   302,   291,   297,   294,   298,    77,   149,   157,   170,
4440      170,   170,   170,   165,   169,   169,   273,   274,   104,   176,
4441      275,   276,   275,   105,   174,   200,   211,   212,   213,   180,
4442      144,   185,   144,   167,   168,   174,   186,   196,   200,   202,
4443      213,   227,   319,   196,   196,   196,   196,   196,   196,   196,
4444      196,   196,   196,   196,   196,   196,   196,   196,   196,   196,
4445      196,   196,   196,   196,   196,   196,   196,    52,    53,    56,
4446      194,   203,   354,   355,   205,    52,    53,    56,   194,   203,
4447      354,   159,   161,    13,   247,   364,   247,   161,   170,   161,
4448      359,    17,   242,   278,    56,    95,   143,   357,    25,   169,
4449       52,    56,   187,   128,   320,    95,   143,   357,   222,   349,
4450      223,    68,    95,   356,    52,    56,   354,   168,   196,   202,
4451      168,   202,   193,   122,   200,   105,   200,   209,   351,    52,
4452       56,   205,    52,    56,   352,   361,   147,   361,   144,   144,
4453      361,   191,   218,   196,   142,   142,   354,   354,   202,   158,
4454      361,   163,   361,   351,   144,   184,    52,    56,   205,    52,
4455       56,   265,   304,   303,   120,   292,   302,    63,   120,   120,
4456      292,    63,   120,   196,   142,    85,   129,   258,   259,   366,
4457      273,    10,   245,   277,   245,   200,   144,   361,   184,   144,
4458       44,   124,    44,    95,   143,   357,   360,    97,    97,   203,
4459      207,   360,   362,    97,    97,   203,   204,   207,   366,   245,
4460        8,   240,   280,   366,   161,    13,   161,   245,    27,   248,
4461      364,   245,   278,   211,   245,    52,    56,   205,    52,    56,
4462      171,   221,   321,   220,    52,    56,   187,   205,   159,   169,
4463      224,   225,   204,   207,   191,   200,   200,   210,    97,    97,
4464      362,    97,    97,   351,   169,   363,   182,   362,    52,    54,
4465       55,    56,    57,    58,    77,    99,   105,   106,   107,   131,
4466      134,   146,   267,   324,   326,   327,   328,   329,   330,   331,
4467      332,   333,   336,   337,   338,   339,   342,   343,   344,   345,
4468      346,   305,    54,    55,    57,   309,   319,   150,   302,   150,
4469      150,   150,   255,   257,   260,   329,   331,   332,   334,   335,
4470      338,   340,   341,   344,   346,   360,   161,   142,   258,   105,
4471      200,   184,   165,   196,    52,    56,   205,    52,    56,   126,
4472      168,   202,   168,   202,   176,   148,    97,   168,   202,   168,
4473      202,   176,   200,   213,   281,   366,     9,    15,   241,   243,
4474      283,   366,    14,   243,   244,   249,   250,   366,   250,   173,
4475      245,   144,   247,   362,   161,   364,   170,   159,   362,   245,
4476      361,   146,   322,   323,   189,   272,   269,    97,   144,   361,
4477       99,   105,   252,   253,   254,   328,   326,   266,   124,   144,
4478      325,   200,   144,   347,   366,    52,   144,   347,   144,   325,
4479       52,   144,   325,    52,   306,   260,   129,   124,   144,   256,
4480       96,   227,   144,   347,   347,   144,   256,   144,   256,   149,
4481      159,   200,   362,   196,   168,   202,    98,   282,   366,   161,
4482      160,   161,   170,   245,   245,   200,   161,   245,   159,   364,
4483      245,   326,   159,   326,   226,   254,   144,   328,   144,   361,
4484      260,    29,   121,   268,   200,   324,   330,   342,   344,   333,
4485      338,   346,   331,   339,   344,   329,   331,   307,   129,   227,
4486      255,   341,   344,    56,    95,   334,   338,   331,   340,   344,
4487      331,    52,   261,   262,   327,    96,   186,   227,   315,   316,
4488      319,   247,   161,   247,   250,   278,   279,   245,   361,   245,
4489      364,   322,   361,   253,   144,   105,   252,   147,   159,   161,
4490      144,   325,   144,   325,   347,   144,   325,   144,   325,   325,
4491      308,   144,   256,   144,   256,    52,    56,   347,   144,   256,
4492      144,   256,   256,   144,   360,    56,    95,   143,   357,   161,
4493      283,   161,   159,   144,   253,   144,   328,   245,   142,   331,
4494      344,   331,   331,   161,   331,   344,   331,   331,   262,    52,
4495       56,   205,    52,    56,   280,   249,   245,   253,   144,   325,
4496      144,   325,   325,   325,   118,   256,   144,   256,   256,   256,
4497      362,   253,   331,   331,   325,   256
4498 };
4499 
4500   /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
4501 static const yytype_int16 yyr1[] =
4502 {
4503        0,   152,   154,   153,   155,   156,   156,   156,   156,   157,
4504      157,   158,   160,   159,   159,   161,   162,   162,   162,   162,
4505      163,   164,   163,   166,   165,   165,   165,   165,   165,   165,
4506      165,   165,   165,   165,   165,   165,   165,   165,   165,   165,
4507      167,   167,   167,   167,   167,   167,   167,   167,   168,   168,
4508      168,   169,   169,   169,   169,   169,   169,   170,   172,   173,
4509      171,   174,   174,   175,   175,   176,   177,   178,   178,   178,
4510      178,   178,   178,   178,   178,   178,   178,   178,   179,   179,
4511      180,   180,   181,   181,   181,   181,   181,   181,   181,   181,
4512      181,   181,   182,   182,   183,   183,   184,   184,   185,   185,
4513      185,   185,   185,   185,   185,   185,   185,   186,   186,   186,
4514      186,   186,   186,   186,   186,   186,   187,   187,   188,   188,
4515      188,   189,   189,   189,   189,   189,   190,   190,   191,   191,
4516      192,   193,   192,   194,   194,   194,   194,   194,   194,   194,
4517      194,   194,   194,   194,   194,   194,   194,   194,   194,   194,
4518      194,   194,   194,   194,   194,   194,   194,   194,   194,   194,
4519      194,   194,   194,   195,   195,   195,   195,   195,   195,   195,
4520      195,   195,   195,   195,   195,   195,   195,   195,   195,   195,
4521      195,   195,   195,   195,   195,   195,   195,   195,   195,   195,
4522      195,   195,   195,   195,   195,   195,   195,   195,   195,   195,
4523      195,   195,   195,   195,   196,   196,   196,   196,   196,   196,
4524      196,   196,   196,   196,   196,   196,   196,   196,   196,   196,
4525      196,   196,   196,   196,   196,   196,   196,   196,   196,   196,
4526      196,   196,   196,   196,   196,   196,   196,   196,   196,   196,
4527      196,   196,   197,   196,   196,   196,   198,   198,   198,   198,
4528      199,   199,   200,   201,   201,   201,   201,   202,   202,   203,
4529      204,   204,   205,   205,   205,   205,   205,   206,   206,   206,
4530      206,   206,   208,   207,   209,   210,   210,   211,   211,   211,
4531      211,   212,   212,   213,   213,   213,   214,   214,   214,   214,
4532      214,   214,   214,   214,   214,   214,   214,   215,   214,   216,
4533      214,   217,   214,   214,   214,   214,   214,   214,   214,   214,
4534      214,   214,   218,   214,   214,   214,   214,   214,   214,   219,
4535      214,   214,   214,   214,   214,   214,   214,   214,   220,   214,
4536      221,   214,   222,   214,   223,   224,   214,   225,   226,   214,
4537      214,   214,   214,   214,   227,   228,   229,   230,   231,   232,
4538      233,   234,   235,   236,   237,   238,   239,   240,   241,   242,
4539      243,   244,   245,   246,   247,   247,   247,   248,   248,   249,
4540      249,   250,   250,   251,   251,   252,   252,   253,   253,   254,
4541      254,   254,   254,   254,   254,   254,   254,   254,   255,   255,
4542      255,   255,   256,   256,   257,   257,   257,   257,   257,   257,
4543      257,   257,   257,   257,   257,   257,   257,   257,   257,   258,
4544      258,   259,   259,   259,   260,   260,   261,   261,   262,   262,
4545      264,   265,   266,   263,   267,   267,   268,   268,   269,   270,
4546      270,   270,   270,   271,   271,   271,   271,   271,   271,   271,
4547      271,   271,   272,   272,   274,   273,   276,   277,   275,   278,
4548      279,   279,   280,   280,   281,   281,   281,   282,   282,   283,
4549      283,   284,   284,   284,   285,   286,   286,   286,   287,   288,
4550      289,   290,   291,   291,   292,   292,   293,   294,   294,   295,
4551      296,   297,   297,   298,   298,   299,   299,   300,   300,   301,
4552      301,   302,   303,   302,   304,   305,   306,   307,   308,   302,
4553      309,   309,   309,   309,   310,   311,   311,   311,   311,   312,
4554      313,   313,   314,   314,   314,   314,   315,   315,   315,   315,
4555      315,   316,   316,   316,   316,   316,   316,   316,   317,   317,
4556      318,   318,   319,   319,   321,   320,   320,   322,   323,   322,
4557      324,   324,   324,   324,   325,   325,   326,   326,   326,   326,
4558      326,   326,   326,   326,   326,   326,   326,   326,   326,   326,
4559      326,   327,   327,   327,   327,   328,   328,   329,   330,   330,
4560      331,   331,   332,   333,   333,   334,   334,   335,   335,   336,
4561      336,   337,   337,   338,   338,   339,   340,   341,   341,   342,
4562      342,   343,   343,   344,   344,   345,   345,   346,   347,   347,
4563      348,   349,   348,   350,   350,   351,   351,   352,   352,   352,
4564      352,   353,   353,   353,   354,   354,   354,   354,   355,   355,
4565      355,   356,   356,   357,   357,   358,   358,   359,   359,   360,
4566      360,   361,   362,   363,   363,   363,   364,   364,   365,   365,
4567      366
4568 };
4569 
4570   /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN.  */
4571 static const yytype_int8 yyr2[] =
4572 {
4573        0,     2,     0,     2,     2,     1,     1,     3,     2,     1,
4574        2,     3,     0,     6,     3,     2,     1,     1,     3,     2,
4575        1,     0,     3,     0,     4,     3,     3,     3,     2,     3,
4576        3,     3,     3,     3,     4,     1,     3,     3,     3,     1,
4577        3,     3,     6,     5,     5,     5,     5,     3,     1,     3,
4578        1,     1,     3,     3,     3,     2,     1,     1,     0,     0,
4579        4,     1,     1,     1,     4,     3,     1,     2,     3,     4,
4580        5,     4,     5,     2,     2,     2,     2,     2,     1,     3,
4581        1,     3,     1,     2,     3,     5,     2,     4,     2,     4,
4582        1,     3,     1,     3,     2,     3,     1,     3,     1,     1,
4583        4,     3,     3,     3,     3,     2,     1,     1,     1,     4,
4584        3,     3,     3,     3,     2,     1,     1,     1,     2,     1,
4585        3,     1,     1,     1,     1,     1,     1,     1,     1,     1,
4586        1,     0,     4,     1,     1,     1,     1,     1,     1,     1,
4587        1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
4588        1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
4589        1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
4590        1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
4591        1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
4592        1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
4593        1,     1,     1,     1,     3,     3,     6,     5,     5,     5,
4594        5,     4,     3,     3,     3,     2,     2,     3,     3,     3,
4595        3,     3,     3,     4,     2,     2,     3,     3,     3,     3,
4596        1,     3,     3,     3,     3,     3,     2,     2,     3,     3,
4597        3,     3,     0,     4,     6,     1,     1,     1,     1,     1,
4598        3,     3,     1,     1,     2,     4,     2,     1,     3,     3,
4599        1,     1,     1,     1,     2,     4,     2,     1,     2,     2,
4600        4,     1,     0,     2,     2,     2,     1,     1,     2,     3,
4601        4,     1,     1,     3,     4,     2,     1,     1,     1,     1,
4602        1,     1,     1,     1,     1,     1,     1,     0,     4,     0,
4603        3,     0,     4,     3,     3,     2,     3,     3,     1,     4,
4604        3,     1,     0,     6,     4,     3,     2,     1,     2,     0,
4605        3,     6,     6,     4,     4,     5,     4,     6,     0,     6,
4606        0,     7,     0,     5,     0,     0,     7,     0,     0,     9,
4607        1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
4608        1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
4609        1,     1,     1,     1,     1,     1,     2,     1,     1,     1,
4610        5,     1,     2,     1,     1,     1,     3,     1,     3,     1,
4611        4,     6,     3,     5,     2,     4,     1,     3,     4,     2,
4612        2,     1,     2,     0,     6,     8,     4,     6,     4,     2,
4613        6,     2,     4,     6,     2,     4,     2,     4,     1,     1,
4614        1,     3,     1,     4,     1,     4,     1,     3,     1,     1,
4615        0,     0,     0,     5,     4,     1,     3,     3,     3,     2,
4616        4,     5,     5,     2,     4,     4,     3,     3,     3,     2,
4617        1,     4,     3,     3,     0,     3,     0,     0,     4,     5,
4618        1,     1,     6,     1,     1,     1,     1,     2,     1,     2,
4619        1,     1,     1,     1,     1,     1,     1,     2,     3,     3,
4620        3,     4,     0,     3,     1,     2,     4,     0,     3,     4,
4621        4,     0,     3,     0,     3,     0,     2,     0,     2,     0,
4622        2,     1,     0,     3,     0,     0,     0,     0,     0,     8,
4623        1,     1,     1,     1,     2,     1,     1,     1,     1,     3,
4624        1,     2,     1,     1,     1,     1,     1,     1,     1,     1,
4625        1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
4626        1,     1,     1,     1,     0,     4,     0,     3,     0,     3,
4627        4,     2,     2,     1,     2,     0,     6,     8,     4,     6,
4628        4,     6,     2,     4,     6,     2,     4,     2,     4,     1,
4629        0,     1,     1,     1,     1,     1,     1,     1,     1,     3,
4630        1,     3,     1,     2,     1,     2,     1,     1,     3,     1,
4631        3,     1,     1,     2,     1,     3,     3,     1,     3,     1,
4632        3,     1,     1,     2,     1,     1,     1,     2,     2,     1,
4633        1,     0,     4,     1,     2,     1,     3,     3,     2,     4,
4634        2,     1,     1,     1,     1,     1,     1,     1,     1,     1,
4635        1,     1,     1,     1,     1,     1,     1,     0,     1,     0,
4636        1,     2,     2,     0,     1,     1,     1,     1,     1,     2,
4637        0
4638 };
4639 
4640 
4641 #define yyerrok         (yyerrstatus = 0)
4642 #define yyclearin       (yychar = YYEMPTY)
4643 #define YYEMPTY         (-2)
4644 #define YYEOF           0
4645 
4646 #define YYACCEPT        goto yyacceptlab
4647 #define YYABORT         goto yyabortlab
4648 #define YYERROR         goto yyerrorlab
4649 
4650 
4651 #define YYRECOVERING()  (!!yyerrstatus)
4652 
4653 #define YYBACKUP(Token, Value)                                    \
4654   do                                                              \
4655     if (yychar == YYEMPTY)                                        \
4656       {                                                           \
4657         yychar = (Token);                                         \
4658         yylval = (Value);                                         \
4659         YYPOPSTACK (yylen);                                       \
4660         yystate = *yyssp;                                         \
4661         goto yybackup;                                            \
4662       }                                                           \
4663     else                                                          \
4664       {                                                           \
4665         yyerror (&yylloc, p, YY_("syntax error: cannot back up")); \
4666         YYERROR;                                                  \
4667       }                                                           \
4668   while (0)
4669 
4670 /* Error token number */
4671 #define YYTERROR        1
4672 #define YYERRCODE       256
4673 
4674 
4675 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
4676    If N is 0, then set CURRENT to the empty location which ends
4677    the previous symbol: RHS[0] (always defined).  */
4678 
4679 #ifndef YYLLOC_DEFAULT
4680 # define YYLLOC_DEFAULT(Current, Rhs, N)                                \
4681     do                                                                  \
4682       if (N)                                                            \
4683         {                                                               \
4684           (Current).first_line   = YYRHSLOC (Rhs, 1).first_line;        \
4685           (Current).first_column = YYRHSLOC (Rhs, 1).first_column;      \
4686           (Current).last_line    = YYRHSLOC (Rhs, N).last_line;         \
4687           (Current).last_column  = YYRHSLOC (Rhs, N).last_column;       \
4688         }                                                               \
4689       else                                                              \
4690         {                                                               \
4691           (Current).first_line   = (Current).last_line   =              \
4692             YYRHSLOC (Rhs, 0).last_line;                                \
4693           (Current).first_column = (Current).last_column =              \
4694             YYRHSLOC (Rhs, 0).last_column;                              \
4695         }                                                               \
4696     while (0)
4697 #endif
4698 
4699 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
4700 
4701 
4702 /* Enable debugging if requested.  */
4703 #if YYDEBUG
4704 
4705 # ifndef YYFPRINTF
4706 #  include <stdio.h> /* INFRINGES ON USER NAME SPACE */
4707 #  define YYFPRINTF fprintf
4708 # endif
4709 
4710 # define YYDPRINTF(Args)                        \
4711 do {                                            \
4712   if (yydebug)                                  \
4713     YYFPRINTF Args;                             \
4714 } while (0)
4715 
4716 
4717 /* YY_LOCATION_PRINT -- Print the location on the stream.
4718    This macro was not mandated originally: define only if we know
4719    we won't break user code: when these are the locations we know.  */
4720 
4721 #ifndef YY_LOCATION_PRINT
4722 # if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
4723 
4724 /* Print *YYLOCP on YYO.  Private, do not rely on its existence. */
4725 
4726 YY_ATTRIBUTE_UNUSED
4727 static int
yy_location_print_(FILE * yyo,YYLTYPE const * const yylocp)4728 yy_location_print_ (FILE *yyo, YYLTYPE const * const yylocp)
4729 {
4730   int res = 0;
4731   int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0;
4732   if (0 <= yylocp->first_line)
4733     {
4734       res += YYFPRINTF (p, "%d", yylocp->first_line);
4735       if (0 <= yylocp->first_column)
4736         res += YYFPRINTF (p, ".%d", yylocp->first_column);
4737     }
4738   if (0 <= yylocp->last_line)
4739     {
4740       if (yylocp->first_line < yylocp->last_line)
4741         {
4742           res += YYFPRINTF (p, "-%d", yylocp->last_line);
4743           if (0 <= end_col)
4744             res += YYFPRINTF (p, ".%d", end_col);
4745         }
4746       else if (0 <= end_col && yylocp->first_column < end_col)
4747         res += YYFPRINTF (p, "-%d", end_col);
4748     }
4749   return res;
4750  }
4751 
4752 #  define YY_LOCATION_PRINT(File, Loc)          \
4753   yy_location_print_ (File, &(Loc))
4754 
4755 # else
4756 #  define YY_LOCATION_PRINT(File, Loc) ((void) 0)
4757 # endif
4758 #endif
4759 
4760 
4761 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)                    \
4762 do {                                                                      \
4763   if (yydebug)                                                            \
4764     {                                                                     \
4765       YYFPRINTF (p, "%s ", Title);                                   \
4766       yy_symbol_print (stderr,                                            \
4767                   Type, Value, Location, p); \
4768       YYFPRINTF (p, "\n");                                           \
4769     }                                                                     \
4770 } while (0)
4771 
4772 
4773 /*-----------------------------------.
4774 | Print this symbol's value on YYO.  |
4775 `-----------------------------------*/
4776 
4777 static void
yy_symbol_value_print(FILE * yyo,int yytype,YYSTYPE const * const yyvaluep,YYLTYPE const * const yylocationp,struct parser_params * p)4778 yy_symbol_value_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, struct parser_params *p)
4779 {
4780   FILE *yyoutput = yyo;
4781   YYUSE (yyoutput);
4782   YYUSE (yylocationp);
4783   YYUSE (p);
4784   if (!yyvaluep)
4785     return;
4786 # ifdef YYPRINT
4787   if (yytype < YYNTOKENS)
4788     YYPRINT (yyo, yytoknum[yytype], *yyvaluep);
4789 # endif
4790   YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
4791   YYUSE (yytype);
4792   YY_IGNORE_MAYBE_UNINITIALIZED_END
4793 }
4794 
4795 
4796 /*---------------------------.
4797 | Print this symbol on YYO.  |
4798 `---------------------------*/
4799 
4800 static void
yy_symbol_print(FILE * yyo,int yytype,YYSTYPE const * const yyvaluep,YYLTYPE const * const yylocationp,struct parser_params * p)4801 yy_symbol_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, struct parser_params *p)
4802 {
4803   YYFPRINTF (p, "%s %s (",
4804              yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]);
4805 
4806   YY_LOCATION_PRINT (yyo, *yylocationp);
4807   YYFPRINTF (p, ": ");
4808   yy_symbol_value_print (yyo, yytype, yyvaluep, yylocationp, p);
4809   YYFPRINTF (p, ")");
4810 }
4811 
4812 /*------------------------------------------------------------------.
4813 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
4814 | TOP (included).                                                   |
4815 `------------------------------------------------------------------*/
4816 
4817 static void
ruby_parser_yy_stack_print(yy_state_t * yybottom,yy_state_t * yytop,struct parser_params * p)4818 ruby_parser_yy_stack_print (yy_state_t *yybottom, yy_state_t *yytop, struct parser_params *p)
4819 #define yy_stack_print(b, t) ruby_parser_yy_stack_print(b, t, p)
4820 {
4821   YYFPRINTF (p, "Stack now");
4822   for (; yybottom <= yytop; yybottom++)
4823     {
4824       int yybot = *yybottom;
4825       YYFPRINTF (p, " %d", yybot);
4826     }
4827   YYFPRINTF (p, "\n");
4828 }
4829 
4830 # define YY_STACK_PRINT(Bottom, Top)                            \
4831 do {                                                            \
4832   if (yydebug)                                                  \
4833     yy_stack_print ((Bottom), (Top));                           \
4834 } while (0)
4835 
4836 
4837 /*------------------------------------------------.
4838 | Report that the YYRULE is going to be reduced.  |
4839 `------------------------------------------------*/
4840 
4841 static void
yy_reduce_print(yy_state_t * yyssp,YYSTYPE * yyvsp,YYLTYPE * yylsp,int yyrule,struct parser_params * p)4842 yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule, struct parser_params *p)
4843 {
4844   int yylno = yyrline[yyrule];
4845   int yynrhs = yyr2[yyrule];
4846   int yyi;
4847   YYFPRINTF (p, "Reducing stack by rule %d (line %d):\n",
4848              yyrule - 1, yylno);
4849   /* The symbols being reduced.  */
4850   for (yyi = 0; yyi < yynrhs; yyi++)
4851     {
4852       YYFPRINTF (p, "   $%d = ", yyi + 1);
4853       yy_symbol_print (stderr,
4854                        yystos[+yyssp[yyi + 1 - yynrhs]],
4855                        &yyvsp[(yyi + 1) - (yynrhs)]
4856                        , &(yylsp[(yyi + 1) - (yynrhs)])                       , p);
4857       YYFPRINTF (p, "\n");
4858     }
4859 }
4860 
4861 # define YY_REDUCE_PRINT(Rule)          \
4862 do {                                    \
4863   if (yydebug)                          \
4864     yy_reduce_print (yyssp, yyvsp, yylsp, Rule, p); \
4865 } while (0)
4866 
4867 /* Nonzero means print parse trace.  It is left uninitialized so that
4868    multiple parsers can coexist.  */
4869 #ifndef yydebug
4870 int yydebug;
4871 #endif
4872 #else /* !YYDEBUG */
4873 # define YYDPRINTF(Args)
4874 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
4875 # define YY_STACK_PRINT(Bottom, Top)
4876 # define YY_REDUCE_PRINT(Rule)
4877 #endif /* !YYDEBUG */
4878 
4879 
4880 /* YYINITDEPTH -- initial size of the parser's stacks.  */
4881 #ifndef YYINITDEPTH
4882 # define YYINITDEPTH 200
4883 #endif
4884 
4885 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
4886    if the built-in stack extension method is used).
4887 
4888    Do not make this value too large; the results are undefined if
4889    YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
4890    evaluated with infinite-precision integer arithmetic.  */
4891 
4892 #ifndef YYMAXDEPTH
4893 # define YYMAXDEPTH 10000
4894 #endif
4895 
4896 
4897 #if YYERROR_VERBOSE
4898 
4899 # ifndef yystrlen
4900 #  if defined __GLIBC__ && defined _STRING_H
4901 #   define yystrlen(S) (YY_CAST (YYPTRDIFF_T, strlen (S)))
4902 #  else
4903 /* Return the length of YYSTR.  */
4904 static YYPTRDIFF_T
yystrlen(const char * yystr)4905 yystrlen (const char *yystr)
4906 {
4907   YYPTRDIFF_T yylen;
4908   for (yylen = 0; yystr[yylen]; yylen++)
4909     continue;
4910   return yylen;
4911 }
4912 #  endif
4913 # endif
4914 
4915 # ifndef yystpcpy
4916 #  if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
4917 #   define yystpcpy stpcpy
4918 #  else
4919 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
4920    YYDEST.  */
4921 static char *
yystpcpy(char * yydest,const char * yysrc)4922 yystpcpy (char *yydest, const char *yysrc)
4923 {
4924   char *yyd = yydest;
4925   const char *yys = yysrc;
4926 
4927   while ((*yyd++ = *yys++) != '\0')
4928     continue;
4929 
4930   return yyd - 1;
4931 }
4932 #  endif
4933 # endif
4934 
4935 # ifndef yytnamerr
4936 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
4937    quotes and backslashes, so that it's suitable for yyerror.  The
4938    heuristic is that double-quoting is unnecessary unless the string
4939    contains an apostrophe, a comma, or backslash (other than
4940    backslash-backslash).  YYSTR is taken from yytname.  If YYRES is
4941    null, do not copy; instead, return the length of what the result
4942    would have been.  */
4943 static YYPTRDIFF_T
yytnamerr(char * yyres,const char * yystr)4944 yytnamerr (char *yyres, const char *yystr)
4945 {
4946   if (*yystr == '"')
4947     {
4948       YYPTRDIFF_T yyn = 0;
4949       char const *yyp = yystr;
4950 
4951       for (;;)
4952         switch (*++yyp)
4953           {
4954           case '\'':
4955           case ',':
4956             goto do_not_strip_quotes;
4957 
4958           case '\\':
4959             if (*++yyp != '\\')
4960               goto do_not_strip_quotes;
4961             else
4962               goto append;
4963 
4964           append:
4965           default:
4966             if (yyres)
4967               yyres[yyn] = *yyp;
4968             yyn++;
4969             break;
4970 
4971           case '"':
4972             if (yyres)
4973               yyres[yyn] = '\0';
4974             return yyn;
4975           }
4976     do_not_strip_quotes: ;
4977     }
4978 
4979   if (yyres)
4980     return yystpcpy (yyres, yystr) - yyres;
4981   else
4982     return yystrlen (yystr);
4983 }
4984 # endif
4985 
4986 /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
4987    about the unexpected token YYTOKEN for the state stack whose top is
4988    YYSSP.
4989 
4990    Return 0 if *YYMSG was successfully written.  Return 1 if *YYMSG is
4991    not large enough to hold the message.  In that case, also set
4992    *YYMSG_ALLOC to the required number of bytes.  Return 2 if the
4993    required number of bytes is too large to store.  */
4994 static int
yysyntax_error(YYPTRDIFF_T * yymsg_alloc,char ** yymsg,yy_state_t * yyssp,int yytoken)4995 yysyntax_error (YYPTRDIFF_T *yymsg_alloc, char **yymsg,
4996                 yy_state_t *yyssp, int yytoken)
4997 {
4998   enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
4999   /* Internationalized format string. */
5000   const char *yyformat = YY_NULLPTR;
5001   /* Arguments of yyformat: reported tokens (one for the "unexpected",
5002      one per "expected"). */
5003   char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
5004   /* Actual size of YYARG. */
5005   int yycount = 0;
5006   /* Cumulated lengths of YYARG.  */
5007   YYPTRDIFF_T yysize = 0;
5008 
5009   /* There are many possibilities here to consider:
5010      - If this state is a consistent state with a default action, then
5011        the only way this function was invoked is if the default action
5012        is an error action.  In that case, don't check for expected
5013        tokens because there are none.
5014      - The only way there can be no lookahead present (in yychar) is if
5015        this state is a consistent state with a default action.  Thus,
5016        detecting the absence of a lookahead is sufficient to determine
5017        that there is no unexpected or expected token to report.  In that
5018        case, just report a simple "syntax error".
5019      - Don't assume there isn't a lookahead just because this state is a
5020        consistent state with a default action.  There might have been a
5021        previous inconsistent state, consistent state with a non-default
5022        action, or user semantic action that manipulated yychar.
5023      - Of course, the expected token list depends on states to have
5024        correct lookahead information, and it depends on the parser not
5025        to perform extra reductions after fetching a lookahead from the
5026        scanner and before detecting a syntax error.  Thus, state merging
5027        (from LALR or IELR) and default reductions corrupt the expected
5028        token list.  However, the list is correct for canonical LR with
5029        one exception: it will still contain any token that will not be
5030        accepted due to an error action in a later state.
5031   */
5032   if (yytoken != YYEMPTY)
5033     {
5034       int yyn = yypact[+*yyssp];
5035       YYPTRDIFF_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]);
5036       yysize = yysize0;
5037       yyarg[yycount++] = yytname[yytoken];
5038       if (!yypact_value_is_default (yyn))
5039         {
5040           /* Start YYX at -YYN if negative to avoid negative indexes in
5041              YYCHECK.  In other words, skip the first -YYN actions for
5042              this state because they are default actions.  */
5043           int yyxbegin = yyn < 0 ? -yyn : 0;
5044           /* Stay within bounds of both yycheck and yytname.  */
5045           int yychecklim = YYLAST - yyn + 1;
5046           int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
5047           int yyx;
5048 
5049           for (yyx = yyxbegin; yyx < yyxend; ++yyx)
5050             if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
5051                 && !yytable_value_is_error (yytable[yyx + yyn]))
5052               {
5053                 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
5054                   {
5055                     yycount = 1;
5056                     yysize = yysize0;
5057                     break;
5058                   }
5059                 yyarg[yycount++] = yytname[yyx];
5060                 {
5061                   YYPTRDIFF_T yysize1
5062                     = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]);
5063                   if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)
5064                     yysize = yysize1;
5065                   else
5066                     return 2;
5067                 }
5068               }
5069         }
5070     }
5071 
5072   switch (yycount)
5073     {
5074 # define YYCASE_(N, S)                      \
5075       case N:                               \
5076         yyformat = S;                       \
5077       break
5078     default: /* Avoid compiler warnings. */
5079       YYCASE_(0, YY_("syntax error"));
5080       YYCASE_(1, YY_("syntax error, unexpected %s"));
5081       YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
5082       YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
5083       YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
5084       YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
5085 # undef YYCASE_
5086     }
5087 
5088   {
5089     /* Don't count the "%s"s in the final size, but reserve room for
5090        the terminator.  */
5091     YYPTRDIFF_T yysize1 = yysize + (yystrlen (yyformat) - 2 * yycount) + 1;
5092     if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)
5093       yysize = yysize1;
5094     else
5095       return 2;
5096   }
5097 
5098   if (*yymsg_alloc < yysize)
5099     {
5100       *yymsg_alloc = 2 * yysize;
5101       if (! (yysize <= *yymsg_alloc
5102              && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
5103         *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
5104       return 1;
5105     }
5106 
5107   /* Avoid sprintf, as that infringes on the user's name space.
5108      Don't have undefined behavior even if the translation
5109      produced a string with the wrong number of "%s"s.  */
5110   {
5111     char *yyp = *yymsg;
5112     int yyi = 0;
5113     while ((*yyp = *yyformat) != '\0')
5114       if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
5115         {
5116           yyp += yytnamerr (yyp, yyarg[yyi++]);
5117           yyformat += 2;
5118         }
5119       else
5120         {
5121           ++yyp;
5122           ++yyformat;
5123         }
5124   }
5125   return 0;
5126 }
5127 #endif /* YYERROR_VERBOSE */
5128 
5129 /*-----------------------------------------------.
5130 | Release the memory associated to this symbol.  |
5131 `-----------------------------------------------*/
5132 
5133 static void
yydestruct(const char * yymsg,int yytype,YYSTYPE * yyvaluep,YYLTYPE * yylocationp,struct parser_params * p)5134 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, struct parser_params *p)
5135 {
5136   YYUSE (yyvaluep);
5137   YYUSE (yylocationp);
5138   YYUSE (p);
5139   if (!yymsg)
5140     yymsg = "Deleting";
5141   YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
5142 
5143   YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
5144   YYUSE (yytype);
5145   YY_IGNORE_MAYBE_UNINITIALIZED_END
5146 }
5147 
5148 
5149 
5150 
5151 /*----------.
5152 | yyparse.  |
5153 `----------*/
5154 
5155 int
yyparse(struct parser_params * p)5156 yyparse (struct parser_params *p)
5157 {
5158 /* The lookahead symbol.  */
5159 int yychar;
5160 
5161 
5162 /* The semantic value of the lookahead symbol.  */
5163 /* Default value used for initialization, for pacifying older GCCs
5164    or non-GCC compilers.  */
5165 YY_INITIAL_VALUE (static YYSTYPE yyval_default;)
5166 YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
5167 
5168 /* Location data for the lookahead symbol.  */
5169 static YYLTYPE yyloc_default
5170 # if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
5171   = { 1, 1, 1, 1 }
5172 # endif
5173 ;
5174 YYLTYPE yylloc = yyloc_default;
5175 
5176     /* Number of syntax errors so far.  */
5177     int yynerrs;
5178 
5179     yy_state_fast_t yystate;
5180     /* Number of tokens to shift before error messages enabled.  */
5181     int yyerrstatus;
5182 
5183     /* The stacks and their tools:
5184        'yyss': related to states.
5185        'yyvs': related to semantic values.
5186        'yyls': related to locations.
5187 
5188        Refer to the stacks through separate pointers, to allow yyoverflow
5189        to reallocate them elsewhere.  */
5190 
5191     /* The state stack.  */
5192     yy_state_t yyssa[YYINITDEPTH];
5193     yy_state_t *yyss;
5194     yy_state_t *yyssp;
5195 
5196     /* The semantic value stack.  */
5197     YYSTYPE yyvsa[YYINITDEPTH];
5198     YYSTYPE *yyvs;
5199     YYSTYPE *yyvsp;
5200 
5201     /* The location stack.  */
5202     YYLTYPE yylsa[YYINITDEPTH];
5203     YYLTYPE *yyls;
5204     YYLTYPE *yylsp;
5205 
5206     /* The locations where the error started and ended.  */
5207     YYLTYPE yyerror_range[3];
5208 
5209     YYPTRDIFF_T yystacksize;
5210 
5211   int yyn;
5212   int yyresult;
5213   /* Lookahead token as an internal (translated) token number.  */
5214   int yytoken = 0;
5215   /* The variables used to return semantic value and location from the
5216      action routines.  */
5217   YYSTYPE yyval;
5218   YYLTYPE yyloc;
5219 
5220 #if YYERROR_VERBOSE
5221   /* Buffer for error messages, and its allocated size.  */
5222   char yymsgbuf[128];
5223   char *yymsg = yymsgbuf;
5224   YYPTRDIFF_T yymsg_alloc = sizeof yymsgbuf;
5225 #endif
5226 
5227 #define YYPOPSTACK(N)   (yyvsp -= (N), yyssp -= (N), yylsp -= (N))
5228 
5229   /* The number of symbols on the RHS of the reduced rule.
5230      Keep to zero when no symbol should be popped.  */
5231   int yylen = 0;
5232 
5233   yyssp = yyss = yyssa;
5234   yyvsp = yyvs = yyvsa;
5235   yylsp = yyls = yylsa;
5236   yystacksize = YYINITDEPTH;
5237 
5238   YYDPRINTF ((p, "Starting parse\n"));
5239 
5240   yystate = 0;
5241   yyerrstatus = 0;
5242   yynerrs = 0;
5243   yychar = YYEMPTY; /* Cause a token to be read.  */
5244 
5245 /* User initialization code.  */
5246 #line 766 "ripper.y"
5247 {
5248     RUBY_SET_YYLLOC_OF_NONE(yylloc);
5249 }
5250 
5251 #line 5247 "ripper.c"
5252 
5253   yylsp[0] = yylloc;
5254   goto yysetstate;
5255 
5256 
5257 /*------------------------------------------------------------.
5258 | yynewstate -- push a new state, which is found in yystate.  |
5259 `------------------------------------------------------------*/
5260 yynewstate:
5261   /* In all cases, when you get here, the value and location stacks
5262      have just been pushed.  So pushing a state here evens the stacks.  */
5263   yyssp++;
5264 
5265 
5266 /*--------------------------------------------------------------------.
5267 | yysetstate -- set current state (the top of the stack) to yystate.  |
5268 `--------------------------------------------------------------------*/
5269 yysetstate:
5270   YYDPRINTF ((p, "Entering state %d\n", yystate));
5271   YY_ASSERT (0 <= yystate && yystate < YYNSTATES);
5272   YY_IGNORE_USELESS_CAST_BEGIN
5273   *yyssp = YY_CAST (yy_state_t, yystate);
5274   YY_IGNORE_USELESS_CAST_END
5275 
5276   if (yyss + yystacksize - 1 <= yyssp)
5277 #if !defined yyoverflow && !defined YYSTACK_RELOCATE
5278     goto yyexhaustedlab;
5279 #else
5280     {
5281       /* Get the current used size of the three stacks, in elements.  */
5282       YYPTRDIFF_T yysize = yyssp - yyss + 1;
5283 
5284 # if defined yyoverflow
5285       {
5286         /* Give user a chance to reallocate the stack.  Use copies of
5287            these so that the &'s don't force the real ones into
5288            memory.  */
5289         yy_state_t *yyss1 = yyss;
5290         YYSTYPE *yyvs1 = yyvs;
5291         YYLTYPE *yyls1 = yyls;
5292 
5293         /* Each stack pointer address is followed by the size of the
5294            data in use in that stack, in bytes.  This used to be a
5295            conditional around just the two extra args, but that might
5296            be undefined if yyoverflow is a macro.  */
5297         yyoverflow (YY_("memory exhausted"),
5298                     &yyss1, yysize * YYSIZEOF (*yyssp),
5299                     &yyvs1, yysize * YYSIZEOF (*yyvsp),
5300                     &yyls1, yysize * YYSIZEOF (*yylsp),
5301                     &yystacksize);
5302         yyss = yyss1;
5303         yyvs = yyvs1;
5304         yyls = yyls1;
5305       }
5306 # else /* defined YYSTACK_RELOCATE */
5307       /* Extend the stack our own way.  */
5308       if (YYMAXDEPTH <= yystacksize)
5309         goto yyexhaustedlab;
5310       yystacksize *= 2;
5311       if (YYMAXDEPTH < yystacksize)
5312         yystacksize = YYMAXDEPTH;
5313 
5314       {
5315         yy_state_t *yyss1 = yyss;
5316         union yyalloc *yyptr =
5317           YY_CAST (union yyalloc *,
5318                    YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize))));
5319         if (! yyptr)
5320           goto yyexhaustedlab;
5321         YYSTACK_RELOCATE (yyss_alloc, yyss);
5322         YYSTACK_RELOCATE (yyvs_alloc, yyvs);
5323         YYSTACK_RELOCATE (yyls_alloc, yyls);
5324 # undef YYSTACK_RELOCATE
5325         if (yyss1 != yyssa)
5326           YYSTACK_FREE (yyss1);
5327       }
5328 # endif
5329 
5330       yyssp = yyss + yysize - 1;
5331       yyvsp = yyvs + yysize - 1;
5332       yylsp = yyls + yysize - 1;
5333 
5334       YY_IGNORE_USELESS_CAST_BEGIN
5335       YYDPRINTF ((p, "Stack size increased to %ld\n",
5336                   YY_CAST (long, yystacksize)));
5337       YY_IGNORE_USELESS_CAST_END
5338 
5339       if (yyss + yystacksize - 1 <= yyssp)
5340         YYABORT;
5341     }
5342 #endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */
5343 
5344   if (yystate == YYFINAL)
5345     YYACCEPT;
5346 
5347   goto yybackup;
5348 
5349 
5350 /*-----------.
5351 | yybackup.  |
5352 `-----------*/
5353 yybackup:
5354   /* Do appropriate processing given the current state.  Read a
5355      lookahead token if we need one and don't already have one.  */
5356 
5357   /* First try to decide what to do without reference to lookahead token.  */
5358   yyn = yypact[yystate];
5359   if (yypact_value_is_default (yyn))
5360     goto yydefault;
5361 
5362   /* Not known => get a lookahead token if don't already have one.  */
5363 
5364   /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol.  */
5365   if (yychar == YYEMPTY)
5366     {
5367       YYDPRINTF ((p, "Reading a token: "));
5368       yychar = yylex (&yylval, &yylloc, p);
5369     }
5370 
5371   if (yychar <= YYEOF)
5372     {
5373       yychar = yytoken = YYEOF;
5374       YYDPRINTF ((p, "Now at end of input.\n"));
5375     }
5376   else
5377     {
5378       yytoken = YYTRANSLATE (yychar);
5379       YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
5380     }
5381 
5382   /* If the proper action on seeing token YYTOKEN is to reduce or to
5383      detect an error, take that action.  */
5384   yyn += yytoken;
5385   if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
5386     goto yydefault;
5387   yyn = yytable[yyn];
5388   if (yyn <= 0)
5389     {
5390       if (yytable_value_is_error (yyn))
5391         goto yyerrlab;
5392       yyn = -yyn;
5393       goto yyreduce;
5394     }
5395 
5396   /* Count tokens shifted since error; after three, turn off error
5397      status.  */
5398   if (yyerrstatus)
5399     yyerrstatus--;
5400 
5401   /* Shift the lookahead token.  */
5402   YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
5403   yystate = yyn;
5404   YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
5405   *++yyvsp = yylval;
5406   YY_IGNORE_MAYBE_UNINITIALIZED_END
5407   *++yylsp = yylloc;
5408 
5409   /* Discard the shifted token.  */
5410   yychar = YYEMPTY;
5411   goto yynewstate;
5412 
5413 
5414 /*-----------------------------------------------------------.
5415 | yydefault -- do the default action for the current state.  |
5416 `-----------------------------------------------------------*/
5417 yydefault:
5418   yyn = yydefact[yystate];
5419   if (yyn == 0)
5420     goto yyerrlab;
5421   goto yyreduce;
5422 
5423 
5424 /*-----------------------------.
5425 | yyreduce -- do a reduction.  |
5426 `-----------------------------*/
5427 yyreduce:
5428   /* yyn is the number of a rule to reduce with.  */
5429   yylen = yyr2[yyn];
5430 
5431   /* If YYLEN is nonzero, implement the default value of the action:
5432      '$$ = $1'.
5433 
5434      Otherwise, the following line sets YYVAL to garbage.
5435      This behavior is undocumented and Bison
5436      users should not rely upon it.  Assigning to YYVAL
5437      unconditionally makes the parser a bit smaller, and it avoids a
5438      GCC warning that YYVAL may be used uninitialized.  */
5439   yyval = yyvsp[1-yylen];
5440 
5441   /* Default location. */
5442   YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
5443   yyerror_range[1] = yyloc;
5444   YY_REDUCE_PRINT (yyn);
5445   switch (yyn)
5446     {
5447   case 2:
5448 #line 937 "ripper.y"
5449                    {
5450 			SET_LEX_STATE(EXPR_BEG);
5451 			local_push(p, ifndef_ripper(1)+0);
5452 		    }
5453 #line 5449 "ripper.c"
5454     break;
5455 
5456   case 3:
5457 #line 942 "ripper.y"
5458                     {
5459 #if 0
5460 			if ((yyvsp[0].val) && !compile_for_eval) {
5461 			    NODE *node = (yyvsp[0].val);
5462 			    /* last expression should not be void */
5463 			    if (nd_type(node) == NODE_BLOCK) {
5464 				while (node->nd_next) {
5465 				    node = node->nd_next;
5466 				}
5467 				node = node->nd_head;
5468 			    }
5469 			    node = remove_begin(node);
5470 			    void_expr(p, node);
5471 			}
5472 			p->eval_tree = NEW_SCOPE(0, block_append(p, p->eval_tree, (yyvsp[0].val)), &(yyloc));
5473 #endif
5474 			{VALUE v1,v2;v1=(yyvsp[0].val);v2=dispatch1(program,v1);p->result=v2;}
5475 			local_pop(p);
5476 		    }
5477 #line 5473 "ripper.c"
5478     break;
5479 
5480   case 4:
5481 #line 964 "ripper.y"
5482                     {
5483 			(yyval.val) = void_stmts(p, (yyvsp[-1].val));
5484 		    }
5485 #line 5481 "ripper.c"
5486     break;
5487 
5488   case 5:
5489 #line 970 "ripper.y"
5490                     {
5491 #if 0
5492 			(yyval.val) = NEW_BEGIN(0, &(yyloc));
5493 #endif
5494 			{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;}
5495 		    }
5496 #line 5492 "ripper.c"
5497     break;
5498 
5499   case 6:
5500 #line 977 "ripper.y"
5501                     {
5502 #if 0
5503 			(yyval.val) = newline_node((yyvsp[0].val));
5504 #endif
5505 			{VALUE v1,v2,v3,v4;v1=dispatch0(stmts_new);v2=v1;v3=(yyvsp[0].val);v4=dispatch2(stmts_add,v2,v3);(yyval.val)=v4;}
5506 		    }
5507 #line 5503 "ripper.c"
5508     break;
5509 
5510   case 7:
5511 #line 984 "ripper.y"
5512                     {
5513 #if 0
5514 			(yyval.val) = block_append(p, (yyvsp[-2].val), newline_node((yyvsp[0].val)));
5515 #endif
5516 			{VALUE v1,v2,v3;v1=(yyvsp[-2].val);v2=(yyvsp[0].val);v3=dispatch2(stmts_add,v1,v2);(yyval.val)=v3;}
5517 		    }
5518 #line 5514 "ripper.c"
5519     break;
5520 
5521   case 8:
5522 #line 991 "ripper.y"
5523                     {
5524 			(yyval.val) = remove_begin((yyvsp[0].val));
5525 		    }
5526 #line 5522 "ripper.c"
5527     break;
5528 
5529   case 10:
5530 #line 998 "ripper.y"
5531                     {
5532 			(yyval.val) = (yyvsp[0].val);
5533 		    }
5534 #line 5530 "ripper.c"
5535     break;
5536 
5537   case 11:
5538 #line 1004 "ripper.y"
5539                     {
5540 #if 0
5541 			p->eval_tree_begin = block_append(p, p->eval_tree_begin,
5542 							  NEW_BEGIN((yyvsp[-1].val), &(yyloc)));
5543 			(yyval.val) = NEW_BEGIN(0, &(yyloc));
5544 #endif
5545 			{VALUE v1,v2;v1=(yyvsp[-1].val);v2=dispatch1(BEGIN,v1);(yyval.val)=v2;}
5546 		    }
5547 #line 5543 "ripper.c"
5548     break;
5549 
5550   case 12:
5551 #line 1016 "ripper.y"
5552                          {if (!(yyvsp[-1].val)) {yyerror1(&(yylsp[0]), "else without rescue is useless");}}
5553 #line 5549 "ripper.c"
5554     break;
5555 
5556   case 13:
5557 #line 1019 "ripper.y"
5558                     {
5559 #if 0
5560 			(yyval.val) = new_bodystmt(p, (yyvsp[-5].val), (yyvsp[-4].val), (yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
5561 #endif
5562 			{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;}
5563 		    }
5564 #line 5560 "ripper.c"
5565     break;
5566 
5567   case 14:
5568 #line 1028 "ripper.y"
5569                     {
5570 #if 0
5571 			(yyval.val) = new_bodystmt(p, (yyvsp[-2].val), (yyvsp[-1].val), 0, (yyvsp[0].val), &(yyloc));
5572 #endif
5573 			{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;}
5574 		    }
5575 #line 5571 "ripper.c"
5576     break;
5577 
5578   case 15:
5579 #line 1037 "ripper.y"
5580                     {
5581 			(yyval.val) = void_stmts(p, (yyvsp[-1].val));
5582 		    }
5583 #line 5579 "ripper.c"
5584     break;
5585 
5586   case 16:
5587 #line 1043 "ripper.y"
5588                     {
5589 #if 0
5590 			(yyval.val) = NEW_BEGIN(0, &(yyloc));
5591 #endif
5592 			{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;}
5593 		    }
5594 #line 5590 "ripper.c"
5595     break;
5596 
5597   case 17:
5598 #line 1050 "ripper.y"
5599                     {
5600 #if 0
5601 			(yyval.val) = newline_node((yyvsp[0].val));
5602 #endif
5603 			{VALUE v1,v2,v3,v4;v1=dispatch0(stmts_new);v2=v1;v3=(yyvsp[0].val);v4=dispatch2(stmts_add,v2,v3);(yyval.val)=v4;}
5604 		    }
5605 #line 5601 "ripper.c"
5606     break;
5607 
5608   case 18:
5609 #line 1057 "ripper.y"
5610                     {
5611 #if 0
5612 			(yyval.val) = block_append(p, (yyvsp[-2].val), newline_node((yyvsp[0].val)));
5613 #endif
5614 			{VALUE v1,v2,v3;v1=(yyvsp[-2].val);v2=(yyvsp[0].val);v3=dispatch2(stmts_add,v1,v2);(yyval.val)=v3;}
5615 		    }
5616 #line 5612 "ripper.c"
5617     break;
5618 
5619   case 19:
5620 #line 1064 "ripper.y"
5621                     {
5622 			(yyval.val) = remove_begin((yyvsp[0].val));
5623 		    }
5624 #line 5620 "ripper.c"
5625     break;
5626 
5627   case 20:
5628 #line 1070 "ripper.y"
5629                     {
5630 			(yyval.val) = (yyvsp[0].val);
5631 		    }
5632 #line 5628 "ripper.c"
5633     break;
5634 
5635   case 21:
5636 #line 1074 "ripper.y"
5637                     {
5638 			yyerror1(&(yylsp[0]), "BEGIN is permitted only at toplevel");
5639 		    }
5640 #line 5636 "ripper.c"
5641     break;
5642 
5643   case 22:
5644 #line 1078 "ripper.y"
5645                     {
5646 			(yyval.val) = (yyvsp[0].val);
5647 		    }
5648 #line 5644 "ripper.c"
5649     break;
5650 
5651   case 23:
5652 #line 1082 "ripper.y"
5653                                       {SET_LEX_STATE(EXPR_FNAME|EXPR_FITEM);}
5654 #line 5650 "ripper.c"
5655     break;
5656 
5657   case 24:
5658 #line 1083 "ripper.y"
5659                     {
5660 #if 0
5661 			(yyval.val) = NEW_ALIAS((yyvsp[-2].val), (yyvsp[0].val), &(yyloc));
5662 #endif
5663 			{VALUE v1,v2,v3;v1=(yyvsp[-2].val);v2=(yyvsp[0].val);v3=dispatch2(alias,v1,v2);(yyval.val)=v3;}
5664 		    }
5665 #line 5661 "ripper.c"
5666     break;
5667 
5668   case 25:
5669 #line 1090 "ripper.y"
5670                     {
5671 #if 0
5672 			(yyval.val) = NEW_VALIAS((yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
5673 #endif
5674 			{VALUE v1,v2,v3;v1=(yyvsp[-1].val);v2=(yyvsp[0].val);v3=dispatch2(var_alias,v1,v2);(yyval.val)=v3;}
5675 		    }
5676 #line 5672 "ripper.c"
5677     break;
5678 
5679   case 26:
5680 #line 1097 "ripper.y"
5681                     {
5682 #if 0
5683 			char buf[2];
5684 			buf[0] = '$';
5685 			buf[1] = (char)(yyvsp[0].val)->nd_nth;
5686 			(yyval.val) = NEW_VALIAS((yyvsp[-1].val), rb_intern2(buf, 2), &(yyloc));
5687 #endif
5688 			{VALUE v1,v2,v3;v1=(yyvsp[-1].val);v2=(yyvsp[0].val);v3=dispatch2(var_alias,v1,v2);(yyval.val)=v3;}
5689 		    }
5690 #line 5686 "ripper.c"
5691     break;
5692 
5693   case 27:
5694 #line 1107 "ripper.y"
5695                     {
5696 #if 0
5697 			yyerror1(&(yylsp[0]), "can't make alias for the number variables");
5698 			(yyval.val) = NEW_BEGIN(0, &(yyloc));
5699 #endif
5700 			{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);
5701 		    }
5702 #line 5698 "ripper.c"
5703     break;
5704 
5705   case 28:
5706 #line 1115 "ripper.y"
5707                     {
5708 #if 0
5709 			(yyval.val) = (yyvsp[0].val);
5710 #endif
5711 			{VALUE v1,v2;v1=(yyvsp[0].val);v2=dispatch1(undef,v1);(yyval.val)=v2;}
5712 		    }
5713 #line 5709 "ripper.c"
5714     break;
5715 
5716   case 29:
5717 #line 1122 "ripper.y"
5718                     {
5719 #if 0
5720 			(yyval.val) = new_if(p, (yyvsp[0].val), remove_begin((yyvsp[-2].val)), 0, &(yyloc));
5721 			fixpos((yyval.val), (yyvsp[0].val));
5722 #endif
5723 			{VALUE v1,v2,v3;v1=(yyvsp[0].val);v2=(yyvsp[-2].val);v3=dispatch2(if_mod,v1,v2);(yyval.val)=v3;}
5724 		    }
5725 #line 5721 "ripper.c"
5726     break;
5727 
5728   case 30:
5729 #line 1130 "ripper.y"
5730                     {
5731 #if 0
5732 			(yyval.val) = new_unless(p, (yyvsp[0].val), remove_begin((yyvsp[-2].val)), 0, &(yyloc));
5733 			fixpos((yyval.val), (yyvsp[0].val));
5734 #endif
5735 			{VALUE v1,v2,v3;v1=(yyvsp[0].val);v2=(yyvsp[-2].val);v3=dispatch2(unless_mod,v1,v2);(yyval.val)=v3;}
5736 		    }
5737 #line 5733 "ripper.c"
5738     break;
5739 
5740   case 31:
5741 #line 1138 "ripper.y"
5742                     {
5743 #if 0
5744 			if ((yyvsp[-2].val) && nd_type((yyvsp[-2].val)) == NODE_BEGIN) {
5745 			    (yyval.val) = NEW_WHILE(cond(p, (yyvsp[0].val), &(yylsp[0])), (yyvsp[-2].val)->nd_body, 0, &(yyloc));
5746 			}
5747 			else {
5748 			    (yyval.val) = NEW_WHILE(cond(p, (yyvsp[0].val), &(yylsp[0])), (yyvsp[-2].val), 1, &(yyloc));
5749 			}
5750 #endif
5751 			{VALUE v1,v2,v3;v1=(yyvsp[0].val);v2=(yyvsp[-2].val);v3=dispatch2(while_mod,v1,v2);(yyval.val)=v3;}
5752 		    }
5753 #line 5749 "ripper.c"
5754     break;
5755 
5756   case 32:
5757 #line 1150 "ripper.y"
5758                     {
5759 #if 0
5760 			if ((yyvsp[-2].val) && nd_type((yyvsp[-2].val)) == NODE_BEGIN) {
5761 			    (yyval.val) = NEW_UNTIL(cond(p, (yyvsp[0].val), &(yylsp[0])), (yyvsp[-2].val)->nd_body, 0, &(yyloc));
5762 			}
5763 			else {
5764 			    (yyval.val) = NEW_UNTIL(cond(p, (yyvsp[0].val), &(yylsp[0])), (yyvsp[-2].val), 1, &(yyloc));
5765 			}
5766 #endif
5767 			{VALUE v1,v2,v3;v1=(yyvsp[0].val);v2=(yyvsp[-2].val);v3=dispatch2(until_mod,v1,v2);(yyval.val)=v3;}
5768 		    }
5769 #line 5765 "ripper.c"
5770     break;
5771 
5772   case 33:
5773 #line 1162 "ripper.y"
5774                     {
5775 #if 0
5776 			NODE *resq;
5777 			YYLTYPE loc = code_loc_gen(&(yylsp[-1]), &(yylsp[0]));
5778 			resq = NEW_RESBODY(0, remove_begin((yyvsp[0].val)), 0, &loc);
5779 			(yyval.val) = NEW_RESCUE(remove_begin((yyvsp[-2].val)), resq, 0, &(yyloc));
5780 #endif
5781 			{VALUE v1,v2,v3;v1=(yyvsp[-2].val);v2=(yyvsp[0].val);v3=dispatch2(rescue_mod,v1,v2);(yyval.val)=v3;}
5782 		    }
5783 #line 5779 "ripper.c"
5784     break;
5785 
5786   case 34:
5787 #line 1172 "ripper.y"
5788                     {
5789 			if (p->in_def) {
5790 			    rb_warn0("END in method; use at_exit");
5791 			}
5792 #if 0
5793 			{
5794 			    NODE *scope = NEW_NODE(
5795 				NODE_SCOPE, 0 /* tbl */, (yyvsp[-1].val) /* body */, 0 /* args */, &(yyloc));
5796 			    (yyval.val) = NEW_POSTEXE(scope, &(yyloc));
5797 			}
5798 #endif
5799 			{VALUE v1,v2;v1=(yyvsp[-1].val);v2=dispatch1(END,v1);(yyval.val)=v2;}
5800 		    }
5801 #line 5797 "ripper.c"
5802     break;
5803 
5804   case 36:
5805 #line 1187 "ripper.y"
5806                     {
5807 #if 0
5808 			value_expr((yyvsp[0].val));
5809 			(yyval.val) = node_assign(p, (yyvsp[-2].val), (yyvsp[0].val), &(yyloc));
5810 #endif
5811 			{VALUE v1,v2,v3;v1=(yyvsp[-2].val);v2=(yyvsp[0].val);v3=dispatch2(massign,v1,v2);(yyval.val)=v3;}
5812 		    }
5813 #line 5809 "ripper.c"
5814     break;
5815 
5816   case 37:
5817 #line 1195 "ripper.y"
5818                     {
5819 #if 0
5820 			value_expr((yyvsp[0].val));
5821 			(yyval.val) = node_assign(p, (yyvsp[-2].val), (yyvsp[0].val), &(yyloc));
5822 #endif
5823 			{VALUE v1,v2,v3;v1=(yyvsp[-2].val);v2=(yyvsp[0].val);v3=dispatch2(assign,v1,v2);(yyval.val)=v3;}
5824 		    }
5825 #line 5821 "ripper.c"
5826     break;
5827 
5828   case 38:
5829 #line 1203 "ripper.y"
5830                     {
5831 #if 0
5832 			(yyval.val) = node_assign(p, (yyvsp[-2].val), (yyvsp[0].val), &(yyloc));
5833 #endif
5834 			{VALUE v1,v2,v3;v1=(yyvsp[-2].val);v2=(yyvsp[0].val);v3=dispatch2(massign,v1,v2);(yyval.val)=v3;}
5835 		    }
5836 #line 5832 "ripper.c"
5837     break;
5838 
5839   case 40:
5840 #line 1213 "ripper.y"
5841                     {
5842 #if 0
5843 			(yyval.val) = node_assign(p, (yyvsp[-2].val), (yyvsp[0].val), &(yyloc));
5844 #endif
5845 			{VALUE v1,v2,v3;v1=(yyvsp[-2].val);v2=(yyvsp[0].val);v3=dispatch2(assign,v1,v2);(yyval.val)=v3;}
5846 		    }
5847 #line 5843 "ripper.c"
5848     break;
5849 
5850   case 41:
5851 #line 1220 "ripper.y"
5852                     {
5853 #if 0
5854 			(yyval.val) = new_op_assign(p, (yyvsp[-2].val), (yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
5855 #endif
5856 			{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;}
5857 		    }
5858 #line 5854 "ripper.c"
5859     break;
5860 
5861   case 42:
5862 #line 1227 "ripper.y"
5863                     {
5864 #if 0
5865 			(yyval.val) = new_ary_op_assign(p, (yyvsp[-5].val), (yyvsp[-3].val), (yyvsp[-1].val), (yyvsp[0].val), &(yylsp[-3]), &(yyloc));
5866 #endif
5867 			{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;}
5868 
5869 		    }
5870 #line 5866 "ripper.c"
5871     break;
5872 
5873   case 43:
5874 #line 1235 "ripper.y"
5875                     {
5876 #if 0
5877 			(yyval.val) = new_attr_op_assign(p, (yyvsp[-4].val), (yyvsp[-3].val), (yyvsp[-2].val), (yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
5878 #endif
5879 			{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;}
5880 		    }
5881 #line 5877 "ripper.c"
5882     break;
5883 
5884   case 44:
5885 #line 1242 "ripper.y"
5886                     {
5887 #if 0
5888 			(yyval.val) = new_attr_op_assign(p, (yyvsp[-4].val), (yyvsp[-3].val), (yyvsp[-2].val), (yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
5889 #endif
5890 			{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;}
5891 		    }
5892 #line 5888 "ripper.c"
5893     break;
5894 
5895   case 45:
5896 #line 1249 "ripper.y"
5897                     {
5898 #if 0
5899 			YYLTYPE loc = code_loc_gen(&(yylsp[-4]), &(yylsp[-2]));
5900 			(yyval.val) = new_const_op_assign(p, NEW_COLON2((yyvsp[-4].val), (yyvsp[-2].val), &loc), (yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
5901 #endif
5902 			{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;}
5903 		    }
5904 #line 5900 "ripper.c"
5905     break;
5906 
5907   case 46:
5908 #line 1257 "ripper.y"
5909                     {
5910 #if 0
5911 			(yyval.val) = new_attr_op_assign(p, (yyvsp[-4].val), ID2VAL(idCOLON2), (yyvsp[-2].val), (yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
5912 #endif
5913 			{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;}
5914 		    }
5915 #line 5911 "ripper.c"
5916     break;
5917 
5918   case 47:
5919 #line 1264 "ripper.y"
5920                     {
5921 #if 0
5922 			rb_backref_error(p, (yyvsp[-2].val));
5923 			(yyval.val) = NEW_BEGIN(0, &(yyloc));
5924 #endif
5925 			{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);
5926 		    }
5927 #line 5923 "ripper.c"
5928     break;
5929 
5930   case 48:
5931 #line 1274 "ripper.y"
5932                     {
5933 			value_expr((yyvsp[0].val));
5934 			(yyval.val) = (yyvsp[0].val);
5935 		    }
5936 #line 5932 "ripper.c"
5937     break;
5938 
5939   case 49:
5940 #line 1279 "ripper.y"
5941                     {
5942 #if 0
5943 			YYLTYPE loc = code_loc_gen(&(yylsp[-1]), &(yylsp[0]));
5944 			value_expr((yyvsp[-2].val));
5945 			(yyval.val) = NEW_RESCUE((yyvsp[-2].val), NEW_RESBODY(0, remove_begin((yyvsp[0].val)), 0, &loc), 0, &(yyloc));
5946 #endif
5947 			{VALUE v1,v2,v3;v1=(yyvsp[-2].val);v2=(yyvsp[0].val);v3=dispatch2(rescue_mod,v1,v2);(yyval.val)=v3;}
5948 		    }
5949 #line 5945 "ripper.c"
5950     break;
5951 
5952   case 52:
5953 #line 1292 "ripper.y"
5954                     {
5955 			(yyval.val) = logop(p, idAND, (yyvsp[-2].val), (yyvsp[0].val), &(yylsp[-1]), &(yyloc));
5956 		    }
5957 #line 5953 "ripper.c"
5958     break;
5959 
5960   case 53:
5961 #line 1296 "ripper.y"
5962                     {
5963 			(yyval.val) = logop(p, idOR, (yyvsp[-2].val), (yyvsp[0].val), &(yylsp[-1]), &(yyloc));
5964 		    }
5965 #line 5961 "ripper.c"
5966     break;
5967 
5968   case 54:
5969 #line 1300 "ripper.y"
5970                     {
5971 			(yyval.val) = call_uni_op(p, method_cond(p, (yyvsp[0].val), &(yylsp[0])), METHOD_NOT, &(yylsp[-2]), &(yyloc));
5972 		    }
5973 #line 5969 "ripper.c"
5974     break;
5975 
5976   case 55:
5977 #line 1304 "ripper.y"
5978                     {
5979 			(yyval.val) = call_uni_op(p, method_cond(p, (yyvsp[0].val), &(yylsp[0])), '!', &(yylsp[-1]), &(yyloc));
5980 		    }
5981 #line 5977 "ripper.c"
5982     break;
5983 
5984   case 57:
5985 #line 1311 "ripper.y"
5986                     {
5987 			value_expr((yyvsp[0].val));
5988 			(yyval.val) = (yyvsp[0].val);
5989 		    }
5990 #line 5986 "ripper.c"
5991     break;
5992 
5993   case 58:
5994 #line 1317 "ripper.y"
5995                   {COND_PUSH(1);}
5996 #line 5992 "ripper.c"
5997     break;
5998 
5999   case 59:
6000 #line 1317 "ripper.y"
6001                                                 {COND_POP();}
6002 #line 5998 "ripper.c"
6003     break;
6004 
6005   case 60:
6006 #line 1318 "ripper.y"
6007                     {
6008 			(yyval.val) = (yyvsp[-2].val);
6009 		    }
6010 #line 6006 "ripper.c"
6011     break;
6012 
6013   case 64:
6014 #line 1329 "ripper.y"
6015                     {
6016 #if 0
6017 			(yyval.val) = new_qcall(p, (yyvsp[-2].val), (yyvsp[-3].val), (yyvsp[-1].val), (yyvsp[0].val), &(yylsp[-1]), &(yyloc));
6018 #endif
6019 			{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;}
6020 		    }
6021 #line 6017 "ripper.c"
6022     break;
6023 
6024   case 65:
6025 #line 1338 "ripper.y"
6026                     {
6027 			(yyval.val) = (yyvsp[-1].val);
6028 #if 0
6029 			(yyval.val)->nd_body->nd_loc = code_loc_gen(&(yylsp[-2]), &(yylsp[0]));
6030 			nd_set_line((yyval.val), (yylsp[-2]).end_pos.lineno);
6031 #endif
6032 		    }
6033 #line 6029 "ripper.c"
6034     break;
6035 
6036   case 66:
6037 #line 1348 "ripper.y"
6038                     {
6039 #if 0
6040 			(yyval.val) = NEW_FCALL((yyvsp[0].val), 0, &(yyloc));
6041 			nd_set_line((yyval.val), p->tokline);
6042 #endif
6043 			(yyval.val)=(yyvsp[0].val);
6044 		    }
6045 #line 6041 "ripper.c"
6046     break;
6047 
6048   case 67:
6049 #line 1358 "ripper.y"
6050                     {
6051 #if 0
6052 			(yyvsp[-1].val)->nd_args = (yyvsp[0].val);
6053 			nd_set_last_loc((yyvsp[-1].val), (yylsp[0]).end_pos);
6054 			(yyval.val) = (yyvsp[-1].val);
6055 #endif
6056 			{VALUE v1,v2,v3;v1=(yyvsp[-1].val);v2=(yyvsp[0].val);v3=dispatch2(command,v1,v2);(yyval.val)=v3;}
6057 		    }
6058 #line 6054 "ripper.c"
6059     break;
6060 
6061   case 68:
6062 #line 1367 "ripper.y"
6063                     {
6064 #if 0
6065 			block_dup_check(p, (yyvsp[-1].val), (yyvsp[0].val));
6066 			(yyvsp[-2].val)->nd_args = (yyvsp[-1].val);
6067 			(yyval.val) = method_add_block(p, (yyvsp[-2].val), (yyvsp[0].val), &(yyloc));
6068 			fixpos((yyval.val), (yyvsp[-2].val));
6069 			nd_set_last_loc((yyvsp[-2].val), (yylsp[-1]).end_pos);
6070 #endif
6071 			{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;}
6072 		    }
6073 #line 6069 "ripper.c"
6074     break;
6075 
6076   case 69:
6077 #line 1378 "ripper.y"
6078                     {
6079 #if 0
6080 			(yyval.val) = new_command_qcall(p, (yyvsp[-2].val), (yyvsp[-3].val), (yyvsp[-1].val), (yyvsp[0].val), Qnull, &(yylsp[-1]), &(yyloc));
6081 #endif
6082 			{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;}
6083 		    }
6084 #line 6080 "ripper.c"
6085     break;
6086 
6087   case 70:
6088 #line 1385 "ripper.y"
6089                     {
6090 #if 0
6091 			(yyval.val) = new_command_qcall(p, (yyvsp[-3].val), (yyvsp[-4].val), (yyvsp[-2].val), (yyvsp[-1].val), (yyvsp[0].val), &(yylsp[-2]), &(yyloc));
6092 #endif
6093 			{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;}
6094 		    }
6095 #line 6091 "ripper.c"
6096     break;
6097 
6098   case 71:
6099 #line 1392 "ripper.y"
6100                     {
6101 #if 0
6102 			(yyval.val) = new_command_qcall(p, ID2VAL(idCOLON2), (yyvsp[-3].val), (yyvsp[-1].val), (yyvsp[0].val), Qnull, &(yylsp[-1]), &(yyloc));
6103 #endif
6104 			{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;}
6105 		    }
6106 #line 6102 "ripper.c"
6107     break;
6108 
6109   case 72:
6110 #line 1399 "ripper.y"
6111                     {
6112 #if 0
6113 			(yyval.val) = new_command_qcall(p, ID2VAL(idCOLON2), (yyvsp[-4].val), (yyvsp[-2].val), (yyvsp[-1].val), (yyvsp[0].val), &(yylsp[-2]), &(yyloc));
6114 #endif
6115 			{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;}
6116 		   }
6117 #line 6113 "ripper.c"
6118     break;
6119 
6120   case 73:
6121 #line 1406 "ripper.y"
6122                     {
6123 #if 0
6124 			(yyval.val) = NEW_SUPER((yyvsp[0].val), &(yyloc));
6125 			fixpos((yyval.val), (yyvsp[0].val));
6126 #endif
6127 			{VALUE v1,v2;v1=(yyvsp[0].val);v2=dispatch1(super,v1);(yyval.val)=v2;}
6128 		    }
6129 #line 6125 "ripper.c"
6130     break;
6131 
6132   case 74:
6133 #line 1414 "ripper.y"
6134                     {
6135 #if 0
6136 			(yyval.val) = new_yield(p, (yyvsp[0].val), &(yyloc));
6137 			fixpos((yyval.val), (yyvsp[0].val));
6138 #endif
6139 			{VALUE v1,v2;v1=(yyvsp[0].val);v2=dispatch1(yield,v1);(yyval.val)=v2;}
6140 		    }
6141 #line 6137 "ripper.c"
6142     break;
6143 
6144   case 75:
6145 #line 1422 "ripper.y"
6146                     {
6147 #if 0
6148 			(yyval.val) = NEW_RETURN(ret_args(p, (yyvsp[0].val)), &(yyloc));
6149 #endif
6150 			{VALUE v1,v2;v1=(yyvsp[0].val);v2=dispatch1(return,v1);(yyval.val)=v2;}
6151 		    }
6152 #line 6148 "ripper.c"
6153     break;
6154 
6155   case 76:
6156 #line 1429 "ripper.y"
6157                     {
6158 #if 0
6159 			(yyval.val) = NEW_BREAK(ret_args(p, (yyvsp[0].val)), &(yyloc));
6160 #endif
6161 			{VALUE v1,v2;v1=(yyvsp[0].val);v2=dispatch1(break,v1);(yyval.val)=v2;}
6162 		    }
6163 #line 6159 "ripper.c"
6164     break;
6165 
6166   case 77:
6167 #line 1436 "ripper.y"
6168                     {
6169 #if 0
6170 			(yyval.val) = NEW_NEXT(ret_args(p, (yyvsp[0].val)), &(yyloc));
6171 #endif
6172 			{VALUE v1,v2;v1=(yyvsp[0].val);v2=dispatch1(next,v1);(yyval.val)=v2;}
6173 		    }
6174 #line 6170 "ripper.c"
6175     break;
6176 
6177   case 79:
6178 #line 1446 "ripper.y"
6179                     {
6180 #if 0
6181 			(yyval.val) = (yyvsp[-1].val);
6182 #endif
6183 			{VALUE v1,v2;v1=(yyvsp[-1].val);v2=dispatch1(mlhs_paren,v1);(yyval.val)=v2;}
6184 		    }
6185 #line 6181 "ripper.c"
6186     break;
6187 
6188   case 81:
6189 #line 1456 "ripper.y"
6190                     {
6191 #if 0
6192 			(yyval.val) = NEW_MASGN(NEW_LIST((yyvsp[-1].val), &(yyloc)), 0, &(yyloc));
6193 #endif
6194 			{VALUE v1,v2;v1=(yyvsp[-1].val);v2=dispatch1(mlhs_paren,v1);(yyval.val)=v2;}
6195 		    }
6196 #line 6192 "ripper.c"
6197     break;
6198 
6199   case 82:
6200 #line 1465 "ripper.y"
6201                     {
6202 #if 0
6203 			(yyval.val) = NEW_MASGN((yyvsp[0].val), 0, &(yyloc));
6204 #endif
6205 			(yyval.val)=(yyvsp[0].val);
6206 		    }
6207 #line 6203 "ripper.c"
6208     break;
6209 
6210   case 83:
6211 #line 1472 "ripper.y"
6212                     {
6213 #if 0
6214 			(yyval.val) = NEW_MASGN(list_append(p, (yyvsp[-1].val),(yyvsp[0].val)), 0, &(yyloc));
6215 #endif
6216 			{VALUE v1,v2,v3;v1=(yyvsp[-1].val);v2=(yyvsp[0].val);v3=dispatch2(mlhs_add,v1,v2);(yyval.val)=v3;}
6217 		    }
6218 #line 6214 "ripper.c"
6219     break;
6220 
6221   case 84:
6222 #line 1479 "ripper.y"
6223                     {
6224 #if 0
6225 			(yyval.val) = NEW_MASGN((yyvsp[-2].val), (yyvsp[0].val), &(yyloc));
6226 #endif
6227 			{VALUE v1,v2,v3;v1=(yyvsp[-2].val);v2=(yyvsp[0].val);v3=dispatch2(mlhs_add_star,v1,v2);(yyval.val)=v3;}
6228 		    }
6229 #line 6225 "ripper.c"
6230     break;
6231 
6232   case 85:
6233 #line 1486 "ripper.y"
6234                     {
6235 #if 0
6236 			(yyval.val) = NEW_MASGN((yyvsp[-4].val), NEW_POSTARG((yyvsp[-2].val),(yyvsp[0].val),&(yyloc)), &(yyloc));
6237 #endif
6238 			{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;}
6239 		    }
6240 #line 6236 "ripper.c"
6241     break;
6242 
6243   case 86:
6244 #line 1493 "ripper.y"
6245                     {
6246 #if 0
6247 			(yyval.val) = NEW_MASGN((yyvsp[-1].val), NODE_SPECIAL_NO_NAME_REST, &(yyloc));
6248 #endif
6249 			{VALUE v1,v2,v3;v1=(yyvsp[-1].val);v2=Qnil;v3=dispatch2(mlhs_add_star,v1,v2);(yyval.val)=v3;}
6250 		    }
6251 #line 6247 "ripper.c"
6252     break;
6253 
6254   case 87:
6255 #line 1500 "ripper.y"
6256                     {
6257 #if 0
6258 			(yyval.val) = NEW_MASGN((yyvsp[-3].val), NEW_POSTARG(NODE_SPECIAL_NO_NAME_REST, (yyvsp[0].val), &(yyloc)), &(yyloc));
6259 #endif
6260 			{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;}
6261 		    }
6262 #line 6258 "ripper.c"
6263     break;
6264 
6265   case 88:
6266 #line 1507 "ripper.y"
6267                     {
6268 #if 0
6269 			(yyval.val) = NEW_MASGN(0, (yyvsp[0].val), &(yyloc));
6270 #endif
6271 			{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;}
6272 		    }
6273 #line 6269 "ripper.c"
6274     break;
6275 
6276   case 89:
6277 #line 1514 "ripper.y"
6278                     {
6279 #if 0
6280 			(yyval.val) = NEW_MASGN(0, NEW_POSTARG((yyvsp[-2].val),(yyvsp[0].val),&(yyloc)), &(yyloc));
6281 #endif
6282 			{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;}
6283 		    }
6284 #line 6280 "ripper.c"
6285     break;
6286 
6287   case 90:
6288 #line 1521 "ripper.y"
6289                     {
6290 #if 0
6291 			(yyval.val) = NEW_MASGN(0, NODE_SPECIAL_NO_NAME_REST, &(yyloc));
6292 #endif
6293 			{VALUE v1,v2,v3,v4;v1=dispatch0(mlhs_new);v2=v1;v3=Qnil;v4=dispatch2(mlhs_add_star,v2,v3);(yyval.val)=v4;}
6294 		    }
6295 #line 6291 "ripper.c"
6296     break;
6297 
6298   case 91:
6299 #line 1528 "ripper.y"
6300                     {
6301 #if 0
6302 			(yyval.val) = NEW_MASGN(0, NEW_POSTARG(NODE_SPECIAL_NO_NAME_REST, (yyvsp[0].val), &(yyloc)), &(yyloc));
6303 #endif
6304 			{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;}
6305 		    }
6306 #line 6302 "ripper.c"
6307     break;
6308 
6309   case 93:
6310 #line 1538 "ripper.y"
6311                     {
6312 #if 0
6313 			(yyval.val) = (yyvsp[-1].val);
6314 #endif
6315 			{VALUE v1,v2;v1=(yyvsp[-1].val);v2=dispatch1(mlhs_paren,v1);(yyval.val)=v2;}
6316 		    }
6317 #line 6313 "ripper.c"
6318     break;
6319 
6320   case 94:
6321 #line 1547 "ripper.y"
6322                     {
6323 #if 0
6324 			(yyval.val) = NEW_LIST((yyvsp[-1].val), &(yylsp[-1]));
6325 #endif
6326 			{VALUE v1,v2,v3,v4;v1=dispatch0(mlhs_new);v2=v1;v3=(yyvsp[-1].val);v4=dispatch2(mlhs_add,v2,v3);(yyval.val)=v4;}
6327 		    }
6328 #line 6324 "ripper.c"
6329     break;
6330 
6331   case 95:
6332 #line 1554 "ripper.y"
6333                     {
6334 #if 0
6335 			(yyval.val) = list_append(p, (yyvsp[-2].val), (yyvsp[-1].val));
6336 #endif
6337 			{VALUE v1,v2,v3;v1=(yyvsp[-2].val);v2=(yyvsp[-1].val);v3=dispatch2(mlhs_add,v1,v2);(yyval.val)=v3;}
6338 		    }
6339 #line 6335 "ripper.c"
6340     break;
6341 
6342   case 96:
6343 #line 1563 "ripper.y"
6344                     {
6345 #if 0
6346 			(yyval.val) = NEW_LIST((yyvsp[0].val), &(yyloc));
6347 #endif
6348 			{VALUE v1,v2,v3,v4;v1=dispatch0(mlhs_new);v2=v1;v3=(yyvsp[0].val);v4=dispatch2(mlhs_add,v2,v3);(yyval.val)=v4;}
6349 		    }
6350 #line 6346 "ripper.c"
6351     break;
6352 
6353   case 97:
6354 #line 1570 "ripper.y"
6355                     {
6356 #if 0
6357 			(yyval.val) = list_append(p, (yyvsp[-2].val), (yyvsp[0].val));
6358 #endif
6359 			{VALUE v1,v2,v3;v1=(yyvsp[-2].val);v2=(yyvsp[0].val);v3=dispatch2(mlhs_add,v1,v2);(yyval.val)=v3;}
6360 		    }
6361 #line 6357 "ripper.c"
6362     break;
6363 
6364   case 98:
6365 #line 1579 "ripper.y"
6366                     {
6367 #if 0
6368 			(yyval.val) = assignable(p, (yyvsp[0].val), 0, &(yyloc));
6369 #endif
6370 			(yyval.val)=assignable(p, var_field(p, (yyvsp[0].val)));
6371 		    }
6372 #line 6368 "ripper.c"
6373     break;
6374 
6375   case 99:
6376 #line 1586 "ripper.y"
6377                     {
6378 #if 0
6379 			(yyval.val) = assignable(p, (yyvsp[0].val), 0, &(yyloc));
6380 #endif
6381 			(yyval.val)=assignable(p, var_field(p, (yyvsp[0].val)));
6382 		    }
6383 #line 6379 "ripper.c"
6384     break;
6385 
6386   case 100:
6387 #line 1593 "ripper.y"
6388                     {
6389 #if 0
6390 			(yyval.val) = aryset(p, (yyvsp[-3].val), (yyvsp[-1].val), &(yyloc));
6391 #endif
6392 			{VALUE v1,v2,v3;v1=(yyvsp[-3].val);v2=escape_Qundef((yyvsp[-1].val));v3=dispatch2(aref_field,v1,v2);(yyval.val)=v3;}
6393 		    }
6394 #line 6390 "ripper.c"
6395     break;
6396 
6397   case 101:
6398 #line 1600 "ripper.y"
6399                     {
6400 #if 0
6401 			(yyval.val) = attrset(p, (yyvsp[-2].val), (yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
6402 #endif
6403 			{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;}
6404 		    }
6405 #line 6401 "ripper.c"
6406     break;
6407 
6408   case 102:
6409 #line 1607 "ripper.y"
6410                     {
6411 #if 0
6412 			(yyval.val) = attrset(p, (yyvsp[-2].val), idCOLON2, (yyvsp[0].val), &(yyloc));
6413 #endif
6414 			{VALUE v1,v2,v3;v1=(yyvsp[-2].val);v2=(yyvsp[0].val);v3=dispatch2(const_path_field,v1,v2);(yyval.val)=v3;}
6415 		    }
6416 #line 6412 "ripper.c"
6417     break;
6418 
6419   case 103:
6420 #line 1614 "ripper.y"
6421                     {
6422 #if 0
6423 			(yyval.val) = attrset(p, (yyvsp[-2].val), (yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
6424 #endif
6425 			{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;}
6426 		    }
6427 #line 6423 "ripper.c"
6428     break;
6429 
6430   case 104:
6431 #line 1621 "ripper.y"
6432                     {
6433 #if 0
6434 			(yyval.val) = const_decl(p, NEW_COLON2((yyvsp[-2].val), (yyvsp[0].val), &(yyloc)), &(yyloc));
6435 #endif
6436 			{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);}
6437 		    }
6438 #line 6434 "ripper.c"
6439     break;
6440 
6441   case 105:
6442 #line 1628 "ripper.y"
6443                     {
6444 #if 0
6445 			(yyval.val) = const_decl(p, NEW_COLON3((yyvsp[0].val), &(yyloc)), &(yyloc));
6446 #endif
6447 			{VALUE v1,v2;v1=(yyvsp[0].val);v2=dispatch1(top_const_field,v1);(yyval.val)=const_decl(p, v2);}
6448 		    }
6449 #line 6445 "ripper.c"
6450     break;
6451 
6452   case 106:
6453 #line 1635 "ripper.y"
6454                     {
6455 #if 0
6456 			rb_backref_error(p, (yyvsp[0].val));
6457 			(yyval.val) = NEW_BEGIN(0, &(yyloc));
6458 #endif
6459 			{VALUE v1,v2;v1=var_field(p, (yyvsp[0].val));v2=dispatch1(assign_error,v1);(yyval.val)=v2;}ripper_error(p);
6460 		    }
6461 #line 6457 "ripper.c"
6462     break;
6463 
6464   case 107:
6465 #line 1645 "ripper.y"
6466                     {
6467 #if 0
6468 			(yyval.val) = assignable(p, (yyvsp[0].val), 0, &(yyloc));
6469 #endif
6470 			(yyval.val)=assignable(p, var_field(p, (yyvsp[0].val)));
6471 		    }
6472 #line 6468 "ripper.c"
6473     break;
6474 
6475   case 108:
6476 #line 1652 "ripper.y"
6477                     {
6478 #if 0
6479 			(yyval.val) = assignable(p, (yyvsp[0].val), 0, &(yyloc));
6480 #endif
6481 			(yyval.val)=assignable(p, var_field(p, (yyvsp[0].val)));
6482 		    }
6483 #line 6479 "ripper.c"
6484     break;
6485 
6486   case 109:
6487 #line 1659 "ripper.y"
6488                     {
6489 #if 0
6490 			(yyval.val) = aryset(p, (yyvsp[-3].val), (yyvsp[-1].val), &(yyloc));
6491 #endif
6492 			{VALUE v1,v2,v3;v1=(yyvsp[-3].val);v2=escape_Qundef((yyvsp[-1].val));v3=dispatch2(aref_field,v1,v2);(yyval.val)=v3;}
6493 		    }
6494 #line 6490 "ripper.c"
6495     break;
6496 
6497   case 110:
6498 #line 1666 "ripper.y"
6499                     {
6500 #if 0
6501 			(yyval.val) = attrset(p, (yyvsp[-2].val), (yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
6502 #endif
6503 			{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;}
6504 		    }
6505 #line 6501 "ripper.c"
6506     break;
6507 
6508   case 111:
6509 #line 1673 "ripper.y"
6510                     {
6511 #if 0
6512 			(yyval.val) = attrset(p, (yyvsp[-2].val), idCOLON2, (yyvsp[0].val), &(yyloc));
6513 #endif
6514 			{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;}
6515 		    }
6516 #line 6512 "ripper.c"
6517     break;
6518 
6519   case 112:
6520 #line 1680 "ripper.y"
6521                     {
6522 #if 0
6523 			(yyval.val) = attrset(p, (yyvsp[-2].val), (yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
6524 #endif
6525 			{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;}
6526 		    }
6527 #line 6523 "ripper.c"
6528     break;
6529 
6530   case 113:
6531 #line 1687 "ripper.y"
6532                     {
6533 #if 0
6534 			(yyval.val) = const_decl(p, NEW_COLON2((yyvsp[-2].val), (yyvsp[0].val), &(yyloc)), &(yyloc));
6535 #endif
6536 			{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);}
6537 		    }
6538 #line 6534 "ripper.c"
6539     break;
6540 
6541   case 114:
6542 #line 1694 "ripper.y"
6543                     {
6544 #if 0
6545 			(yyval.val) = const_decl(p, NEW_COLON3((yyvsp[0].val), &(yyloc)), &(yyloc));
6546 #endif
6547 			{VALUE v1,v2;v1=(yyvsp[0].val);v2=dispatch1(top_const_field,v1);(yyval.val)=const_decl(p, v2);}
6548 		    }
6549 #line 6545 "ripper.c"
6550     break;
6551 
6552   case 115:
6553 #line 1701 "ripper.y"
6554                     {
6555 #if 0
6556 			rb_backref_error(p, (yyvsp[0].val));
6557 			(yyval.val) = NEW_BEGIN(0, &(yyloc));
6558 #endif
6559 			{VALUE v1,v2;v1=var_field(p, (yyvsp[0].val));v2=dispatch1(assign_error,v1);(yyval.val)=v2;}ripper_error(p);
6560 		    }
6561 #line 6557 "ripper.c"
6562     break;
6563 
6564   case 116:
6565 #line 1711 "ripper.y"
6566                     {
6567 #if 0
6568 			yyerror1(&(yylsp[0]), "class/module name must be CONSTANT");
6569 #endif
6570 			{VALUE v1,v2;v1=(yyvsp[0].val);v2=dispatch1(class_name_error,v1);(yyval.val)=v2;}ripper_error(p);
6571 		    }
6572 #line 6568 "ripper.c"
6573     break;
6574 
6575   case 118:
6576 #line 1721 "ripper.y"
6577                     {
6578 #if 0
6579 			(yyval.val) = NEW_COLON3((yyvsp[0].val), &(yyloc));
6580 #endif
6581 			{VALUE v1,v2;v1=(yyvsp[0].val);v2=dispatch1(top_const_ref,v1);(yyval.val)=v2;}
6582 		    }
6583 #line 6579 "ripper.c"
6584     break;
6585 
6586   case 119:
6587 #line 1728 "ripper.y"
6588                     {
6589 #if 0
6590 			(yyval.val) = NEW_COLON2(0, (yyval.val), &(yyloc));
6591 #endif
6592 			{VALUE v1,v2;v1=(yyvsp[0].val);v2=dispatch1(const_ref,v1);(yyval.val)=v2;}
6593 		    }
6594 #line 6590 "ripper.c"
6595     break;
6596 
6597   case 120:
6598 #line 1735 "ripper.y"
6599                     {
6600 #if 0
6601 			(yyval.val) = NEW_COLON2((yyvsp[-2].val), (yyvsp[0].val), &(yyloc));
6602 #endif
6603 			{VALUE v1,v2,v3;v1=(yyvsp[-2].val);v2=(yyvsp[0].val);v3=dispatch2(const_path_ref,v1,v2);(yyval.val)=v3;}
6604 		    }
6605 #line 6601 "ripper.c"
6606     break;
6607 
6608   case 124:
6609 #line 1747 "ripper.y"
6610                     {
6611 			SET_LEX_STATE(EXPR_ENDFN);
6612 			(yyval.val) = (yyvsp[0].val);
6613 		    }
6614 #line 6610 "ripper.c"
6615     break;
6616 
6617   case 125:
6618 #line 1752 "ripper.y"
6619                     {
6620 			SET_LEX_STATE(EXPR_ENDFN);
6621 			(yyval.val) = (yyvsp[0].val);
6622 		    }
6623 #line 6619 "ripper.c"
6624     break;
6625 
6626   case 128:
6627 #line 1763 "ripper.y"
6628                     {
6629 #if 0
6630 			(yyval.val) = NEW_LIT(ID2SYM((yyvsp[0].val)), &(yyloc));
6631 #endif
6632 			{VALUE v1,v2;v1=(yyvsp[0].val);v2=dispatch1(symbol_literal,v1);(yyval.val)=v2;}
6633 		    }
6634 #line 6630 "ripper.c"
6635     break;
6636 
6637   case 130:
6638 #line 1773 "ripper.y"
6639                     {
6640 #if 0
6641 			(yyval.val) = NEW_UNDEF((yyvsp[0].val), &(yyloc));
6642 #endif
6643 			(yyval.val)=rb_ary_new3(1, get_value((yyvsp[0].val)));
6644 		    }
6645 #line 6641 "ripper.c"
6646     break;
6647 
6648   case 131:
6649 #line 1779 "ripper.y"
6650                                  {SET_LEX_STATE(EXPR_FNAME|EXPR_FITEM);}
6651 #line 6647 "ripper.c"
6652     break;
6653 
6654   case 132:
6655 #line 1780 "ripper.y"
6656                     {
6657 #if 0
6658 			NODE *undef = NEW_UNDEF((yyvsp[0].val), &(yylsp[0]));
6659 			(yyval.val) = block_append(p, (yyvsp[-3].val), undef);
6660 #endif
6661 			(yyval.val)=rb_ary_push((yyvsp[-3].val), get_value((yyvsp[0].val)));
6662 		    }
6663 #line 6659 "ripper.c"
6664     break;
6665 
6666   case 133:
6667 #line 1789 "ripper.y"
6668                                 { ifndef_ripper((yyval.val) = '|'); }
6669 #line 6665 "ripper.c"
6670     break;
6671 
6672   case 134:
6673 #line 1790 "ripper.y"
6674                                 { ifndef_ripper((yyval.val) = '^'); }
6675 #line 6671 "ripper.c"
6676     break;
6677 
6678   case 135:
6679 #line 1791 "ripper.y"
6680                                 { ifndef_ripper((yyval.val) = '&'); }
6681 #line 6677 "ripper.c"
6682     break;
6683 
6684   case 136:
6685 #line 1792 "ripper.y"
6686                                 { ifndef_ripper((yyval.val) = tCMP); }
6687 #line 6683 "ripper.c"
6688     break;
6689 
6690   case 137:
6691 #line 1793 "ripper.y"
6692                                 { ifndef_ripper((yyval.val) = tEQ); }
6693 #line 6689 "ripper.c"
6694     break;
6695 
6696   case 138:
6697 #line 1794 "ripper.y"
6698                                 { ifndef_ripper((yyval.val) = tEQQ); }
6699 #line 6695 "ripper.c"
6700     break;
6701 
6702   case 139:
6703 #line 1795 "ripper.y"
6704                                 { ifndef_ripper((yyval.val) = tMATCH); }
6705 #line 6701 "ripper.c"
6706     break;
6707 
6708   case 140:
6709 #line 1796 "ripper.y"
6710                                 { ifndef_ripper((yyval.val) = tNMATCH); }
6711 #line 6707 "ripper.c"
6712     break;
6713 
6714   case 141:
6715 #line 1797 "ripper.y"
6716                                 { ifndef_ripper((yyval.val) = '>'); }
6717 #line 6713 "ripper.c"
6718     break;
6719 
6720   case 142:
6721 #line 1798 "ripper.y"
6722                                 { ifndef_ripper((yyval.val) = tGEQ); }
6723 #line 6719 "ripper.c"
6724     break;
6725 
6726   case 143:
6727 #line 1799 "ripper.y"
6728                                 { ifndef_ripper((yyval.val) = '<'); }
6729 #line 6725 "ripper.c"
6730     break;
6731 
6732   case 144:
6733 #line 1800 "ripper.y"
6734                                 { ifndef_ripper((yyval.val) = tLEQ); }
6735 #line 6731 "ripper.c"
6736     break;
6737 
6738   case 145:
6739 #line 1801 "ripper.y"
6740                                 { ifndef_ripper((yyval.val) = tNEQ); }
6741 #line 6737 "ripper.c"
6742     break;
6743 
6744   case 146:
6745 #line 1802 "ripper.y"
6746                                 { ifndef_ripper((yyval.val) = tLSHFT); }
6747 #line 6743 "ripper.c"
6748     break;
6749 
6750   case 147:
6751 #line 1803 "ripper.y"
6752                                 { ifndef_ripper((yyval.val) = tRSHFT); }
6753 #line 6749 "ripper.c"
6754     break;
6755 
6756   case 148:
6757 #line 1804 "ripper.y"
6758                                 { ifndef_ripper((yyval.val) = '+'); }
6759 #line 6755 "ripper.c"
6760     break;
6761 
6762   case 149:
6763 #line 1805 "ripper.y"
6764                                 { ifndef_ripper((yyval.val) = '-'); }
6765 #line 6761 "ripper.c"
6766     break;
6767 
6768   case 150:
6769 #line 1806 "ripper.y"
6770                                 { ifndef_ripper((yyval.val) = '*'); }
6771 #line 6767 "ripper.c"
6772     break;
6773 
6774   case 151:
6775 #line 1807 "ripper.y"
6776                                 { ifndef_ripper((yyval.val) = '*'); }
6777 #line 6773 "ripper.c"
6778     break;
6779 
6780   case 152:
6781 #line 1808 "ripper.y"
6782                                 { ifndef_ripper((yyval.val) = '/'); }
6783 #line 6779 "ripper.c"
6784     break;
6785 
6786   case 153:
6787 #line 1809 "ripper.y"
6788                                 { ifndef_ripper((yyval.val) = '%'); }
6789 #line 6785 "ripper.c"
6790     break;
6791 
6792   case 154:
6793 #line 1810 "ripper.y"
6794                                 { ifndef_ripper((yyval.val) = tPOW); }
6795 #line 6791 "ripper.c"
6796     break;
6797 
6798   case 155:
6799 #line 1811 "ripper.y"
6800                                 { ifndef_ripper((yyval.val) = tDSTAR); }
6801 #line 6797 "ripper.c"
6802     break;
6803 
6804   case 156:
6805 #line 1812 "ripper.y"
6806                                 { ifndef_ripper((yyval.val) = '!'); }
6807 #line 6803 "ripper.c"
6808     break;
6809 
6810   case 157:
6811 #line 1813 "ripper.y"
6812                                 { ifndef_ripper((yyval.val) = '~'); }
6813 #line 6809 "ripper.c"
6814     break;
6815 
6816   case 158:
6817 #line 1814 "ripper.y"
6818                                 { ifndef_ripper((yyval.val) = tUPLUS); }
6819 #line 6815 "ripper.c"
6820     break;
6821 
6822   case 159:
6823 #line 1815 "ripper.y"
6824                                 { ifndef_ripper((yyval.val) = tUMINUS); }
6825 #line 6821 "ripper.c"
6826     break;
6827 
6828   case 160:
6829 #line 1816 "ripper.y"
6830                                 { ifndef_ripper((yyval.val) = tAREF); }
6831 #line 6827 "ripper.c"
6832     break;
6833 
6834   case 161:
6835 #line 1817 "ripper.y"
6836                                 { ifndef_ripper((yyval.val) = tASET); }
6837 #line 6833 "ripper.c"
6838     break;
6839 
6840   case 162:
6841 #line 1818 "ripper.y"
6842                                 { ifndef_ripper((yyval.val) = '`'); }
6843 #line 6839 "ripper.c"
6844     break;
6845 
6846   case 204:
6847 #line 1836 "ripper.y"
6848                     {
6849 #if 0
6850 			(yyval.val) = node_assign(p, (yyvsp[-2].val), (yyvsp[0].val), &(yyloc));
6851 #endif
6852 			{VALUE v1,v2,v3;v1=(yyvsp[-2].val);v2=(yyvsp[0].val);v3=dispatch2(assign,v1,v2);(yyval.val)=v3;}
6853 		    }
6854 #line 6850 "ripper.c"
6855     break;
6856 
6857   case 205:
6858 #line 1843 "ripper.y"
6859                     {
6860 #if 0
6861 			(yyval.val) = new_op_assign(p, (yyvsp[-2].val), (yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
6862 #endif
6863 			{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;}
6864 		    }
6865 #line 6861 "ripper.c"
6866     break;
6867 
6868   case 206:
6869 #line 1850 "ripper.y"
6870                     {
6871 #if 0
6872 			value_expr((yyvsp[0].val));
6873 			(yyval.val) = new_ary_op_assign(p, (yyvsp[-5].val), (yyvsp[-3].val), (yyvsp[-1].val), (yyvsp[0].val), &(yylsp[-3]), &(yyloc));
6874 #endif
6875 			{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;}
6876 		    }
6877 #line 6873 "ripper.c"
6878     break;
6879 
6880   case 207:
6881 #line 1858 "ripper.y"
6882                     {
6883 #if 0
6884 			value_expr((yyvsp[0].val));
6885 			(yyval.val) = new_attr_op_assign(p, (yyvsp[-4].val), (yyvsp[-3].val), (yyvsp[-2].val), (yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
6886 #endif
6887 			{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;}
6888 		    }
6889 #line 6885 "ripper.c"
6890     break;
6891 
6892   case 208:
6893 #line 1866 "ripper.y"
6894                     {
6895 #if 0
6896 			value_expr((yyvsp[0].val));
6897 			(yyval.val) = new_attr_op_assign(p, (yyvsp[-4].val), (yyvsp[-3].val), (yyvsp[-2].val), (yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
6898 #endif
6899 			{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;}
6900 		    }
6901 #line 6897 "ripper.c"
6902     break;
6903 
6904   case 209:
6905 #line 1874 "ripper.y"
6906                     {
6907 #if 0
6908 			value_expr((yyvsp[0].val));
6909 			(yyval.val) = new_attr_op_assign(p, (yyvsp[-4].val), ID2VAL(idCOLON2), (yyvsp[-2].val), (yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
6910 #endif
6911 			{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;}
6912 		    }
6913 #line 6909 "ripper.c"
6914     break;
6915 
6916   case 210:
6917 #line 1882 "ripper.y"
6918                     {
6919 #if 0
6920 			YYLTYPE loc = code_loc_gen(&(yylsp[-4]), &(yylsp[-2]));
6921 			(yyval.val) = new_const_op_assign(p, NEW_COLON2((yyvsp[-4].val), (yyvsp[-2].val), &loc), (yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
6922 #endif
6923 			{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;}
6924 		    }
6925 #line 6921 "ripper.c"
6926     break;
6927 
6928   case 211:
6929 #line 1890 "ripper.y"
6930                     {
6931 #if 0
6932 			(yyval.val) = new_const_op_assign(p, NEW_COLON3((yyvsp[-2].val), &(yyloc)), (yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
6933 #endif
6934 			{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;}
6935 		    }
6936 #line 6932 "ripper.c"
6937     break;
6938 
6939   case 212:
6940 #line 1897 "ripper.y"
6941                     {
6942 #if 0
6943 			rb_backref_error(p, (yyvsp[-2].val));
6944 			(yyval.val) = NEW_BEGIN(0, &(yyloc));
6945 #endif
6946 			{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);
6947 		    }
6948 #line 6944 "ripper.c"
6949     break;
6950 
6951   case 213:
6952 #line 1905 "ripper.y"
6953                     {
6954 #if 0
6955 			value_expr((yyvsp[-2].val));
6956 			value_expr((yyvsp[0].val));
6957 			(yyval.val) = NEW_DOT2((yyvsp[-2].val), (yyvsp[0].val), &(yyloc));
6958 #endif
6959 			{VALUE v1,v2,v3;v1=(yyvsp[-2].val);v2=(yyvsp[0].val);v3=dispatch2(dot2,v1,v2);(yyval.val)=v3;}
6960 		    }
6961 #line 6957 "ripper.c"
6962     break;
6963 
6964   case 214:
6965 #line 1914 "ripper.y"
6966                     {
6967 #if 0
6968 			value_expr((yyvsp[-2].val));
6969 			value_expr((yyvsp[0].val));
6970 			(yyval.val) = NEW_DOT3((yyvsp[-2].val), (yyvsp[0].val), &(yyloc));
6971 #endif
6972 			{VALUE v1,v2,v3;v1=(yyvsp[-2].val);v2=(yyvsp[0].val);v3=dispatch2(dot3,v1,v2);(yyval.val)=v3;}
6973 		    }
6974 #line 6970 "ripper.c"
6975     break;
6976 
6977   case 215:
6978 #line 1923 "ripper.y"
6979                     {
6980 #if 0
6981                         YYLTYPE loc;
6982                         loc.beg_pos = (yylsp[0]).end_pos;
6983                         loc.end_pos = (yylsp[0]).end_pos;
6984 
6985 			value_expr((yyvsp[-1].val));
6986 			(yyval.val) = NEW_DOT2((yyvsp[-1].val), new_nil(&loc), &(yyloc));
6987 #endif
6988 			{VALUE v1,v2,v3;v1=(yyvsp[-1].val);v2=Qnil;v3=dispatch2(dot2,v1,v2);(yyval.val)=v3;}
6989 		    }
6990 #line 6986 "ripper.c"
6991     break;
6992 
6993   case 216:
6994 #line 1935 "ripper.y"
6995                     {
6996 #if 0
6997                         YYLTYPE loc;
6998                         loc.beg_pos = (yylsp[0]).end_pos;
6999                         loc.end_pos = (yylsp[0]).end_pos;
7000 
7001 			value_expr((yyvsp[-1].val));
7002 			(yyval.val) = NEW_DOT3((yyvsp[-1].val), new_nil(&loc), &(yyloc));
7003 #endif
7004 			{VALUE v1,v2,v3;v1=(yyvsp[-1].val);v2=Qnil;v3=dispatch2(dot3,v1,v2);(yyval.val)=v3;}
7005 		    }
7006 #line 7002 "ripper.c"
7007     break;
7008 
7009   case 217:
7010 #line 1947 "ripper.y"
7011                     {
7012 			(yyval.val) = call_bin_op(p, (yyvsp[-2].val), '+', (yyvsp[0].val), &(yylsp[-1]), &(yyloc));
7013 		    }
7014 #line 7010 "ripper.c"
7015     break;
7016 
7017   case 218:
7018 #line 1951 "ripper.y"
7019                     {
7020 			(yyval.val) = call_bin_op(p, (yyvsp[-2].val), '-', (yyvsp[0].val), &(yylsp[-1]), &(yyloc));
7021 		    }
7022 #line 7018 "ripper.c"
7023     break;
7024 
7025   case 219:
7026 #line 1955 "ripper.y"
7027                     {
7028 			(yyval.val) = call_bin_op(p, (yyvsp[-2].val), '*', (yyvsp[0].val), &(yylsp[-1]), &(yyloc));
7029 		    }
7030 #line 7026 "ripper.c"
7031     break;
7032 
7033   case 220:
7034 #line 1959 "ripper.y"
7035                     {
7036 			(yyval.val) = call_bin_op(p, (yyvsp[-2].val), '/', (yyvsp[0].val), &(yylsp[-1]), &(yyloc));
7037 		    }
7038 #line 7034 "ripper.c"
7039     break;
7040 
7041   case 221:
7042 #line 1963 "ripper.y"
7043                     {
7044 			(yyval.val) = call_bin_op(p, (yyvsp[-2].val), '%', (yyvsp[0].val), &(yylsp[-1]), &(yyloc));
7045 		    }
7046 #line 7042 "ripper.c"
7047     break;
7048 
7049   case 222:
7050 #line 1967 "ripper.y"
7051                     {
7052 			(yyval.val) = call_bin_op(p, (yyvsp[-2].val), idPow, (yyvsp[0].val), &(yylsp[-1]), &(yyloc));
7053 		    }
7054 #line 7050 "ripper.c"
7055     break;
7056 
7057   case 223:
7058 #line 1971 "ripper.y"
7059                     {
7060 			(yyval.val) = call_uni_op(p, call_bin_op(p, (yyvsp[-2].val), idPow, (yyvsp[0].val), &(yylsp[-2]), &(yyloc)), idUMinus, &(yylsp[-3]), &(yyloc));
7061 		    }
7062 #line 7058 "ripper.c"
7063     break;
7064 
7065   case 224:
7066 #line 1975 "ripper.y"
7067                     {
7068 			(yyval.val) = call_uni_op(p, (yyvsp[0].val), idUPlus, &(yylsp[-1]), &(yyloc));
7069 		    }
7070 #line 7066 "ripper.c"
7071     break;
7072 
7073   case 225:
7074 #line 1979 "ripper.y"
7075                     {
7076 			(yyval.val) = call_uni_op(p, (yyvsp[0].val), idUMinus, &(yylsp[-1]), &(yyloc));
7077 		    }
7078 #line 7074 "ripper.c"
7079     break;
7080 
7081   case 226:
7082 #line 1983 "ripper.y"
7083                     {
7084 			(yyval.val) = call_bin_op(p, (yyvsp[-2].val), '|', (yyvsp[0].val), &(yylsp[-1]), &(yyloc));
7085 		    }
7086 #line 7082 "ripper.c"
7087     break;
7088 
7089   case 227:
7090 #line 1987 "ripper.y"
7091                     {
7092 			(yyval.val) = call_bin_op(p, (yyvsp[-2].val), '^', (yyvsp[0].val), &(yylsp[-1]), &(yyloc));
7093 		    }
7094 #line 7090 "ripper.c"
7095     break;
7096 
7097   case 228:
7098 #line 1991 "ripper.y"
7099                     {
7100 			(yyval.val) = call_bin_op(p, (yyvsp[-2].val), '&', (yyvsp[0].val), &(yylsp[-1]), &(yyloc));
7101 		    }
7102 #line 7098 "ripper.c"
7103     break;
7104 
7105   case 229:
7106 #line 1995 "ripper.y"
7107                     {
7108 			(yyval.val) = call_bin_op(p, (yyvsp[-2].val), idCmp, (yyvsp[0].val), &(yylsp[-1]), &(yyloc));
7109 		    }
7110 #line 7106 "ripper.c"
7111     break;
7112 
7113   case 231:
7114 #line 2000 "ripper.y"
7115                     {
7116 			(yyval.val) = call_bin_op(p, (yyvsp[-2].val), idEq, (yyvsp[0].val), &(yylsp[-1]), &(yyloc));
7117 		    }
7118 #line 7114 "ripper.c"
7119     break;
7120 
7121   case 232:
7122 #line 2004 "ripper.y"
7123                     {
7124 			(yyval.val) = call_bin_op(p, (yyvsp[-2].val), idEqq, (yyvsp[0].val), &(yylsp[-1]), &(yyloc));
7125 		    }
7126 #line 7122 "ripper.c"
7127     break;
7128 
7129   case 233:
7130 #line 2008 "ripper.y"
7131                     {
7132 			(yyval.val) = call_bin_op(p, (yyvsp[-2].val), idNeq, (yyvsp[0].val), &(yylsp[-1]), &(yyloc));
7133 		    }
7134 #line 7130 "ripper.c"
7135     break;
7136 
7137   case 234:
7138 #line 2012 "ripper.y"
7139                     {
7140 			(yyval.val) = match_op(p, (yyvsp[-2].val), (yyvsp[0].val), &(yylsp[-1]), &(yyloc));
7141 		    }
7142 #line 7138 "ripper.c"
7143     break;
7144 
7145   case 235:
7146 #line 2016 "ripper.y"
7147                     {
7148 			(yyval.val) = call_bin_op(p, (yyvsp[-2].val), idNeqTilde, (yyvsp[0].val), &(yylsp[-1]), &(yyloc));
7149 		    }
7150 #line 7146 "ripper.c"
7151     break;
7152 
7153   case 236:
7154 #line 2020 "ripper.y"
7155                     {
7156 			(yyval.val) = call_uni_op(p, method_cond(p, (yyvsp[0].val), &(yylsp[0])), '!', &(yylsp[-1]), &(yyloc));
7157 		    }
7158 #line 7154 "ripper.c"
7159     break;
7160 
7161   case 237:
7162 #line 2024 "ripper.y"
7163                     {
7164 			(yyval.val) = call_uni_op(p, (yyvsp[0].val), '~', &(yylsp[-1]), &(yyloc));
7165 		    }
7166 #line 7162 "ripper.c"
7167     break;
7168 
7169   case 238:
7170 #line 2028 "ripper.y"
7171                     {
7172 			(yyval.val) = call_bin_op(p, (yyvsp[-2].val), idLTLT, (yyvsp[0].val), &(yylsp[-1]), &(yyloc));
7173 		    }
7174 #line 7170 "ripper.c"
7175     break;
7176 
7177   case 239:
7178 #line 2032 "ripper.y"
7179                     {
7180 			(yyval.val) = call_bin_op(p, (yyvsp[-2].val), idGTGT, (yyvsp[0].val), &(yylsp[-1]), &(yyloc));
7181 		    }
7182 #line 7178 "ripper.c"
7183     break;
7184 
7185   case 240:
7186 #line 2036 "ripper.y"
7187                     {
7188 			(yyval.val) = logop(p, idANDOP, (yyvsp[-2].val), (yyvsp[0].val), &(yylsp[-1]), &(yyloc));
7189 		    }
7190 #line 7186 "ripper.c"
7191     break;
7192 
7193   case 241:
7194 #line 2040 "ripper.y"
7195                     {
7196 			(yyval.val) = logop(p, idOROP, (yyvsp[-2].val), (yyvsp[0].val), &(yylsp[-1]), &(yyloc));
7197 		    }
7198 #line 7194 "ripper.c"
7199     break;
7200 
7201   case 242:
7202 #line 2043 "ripper.y"
7203                                          {p->in_defined = 1;}
7204 #line 7200 "ripper.c"
7205     break;
7206 
7207   case 243:
7208 #line 2044 "ripper.y"
7209                     {
7210 			p->in_defined = 0;
7211 			(yyval.val) = new_defined(p, (yyvsp[0].val), &(yyloc));
7212 		    }
7213 #line 7209 "ripper.c"
7214     break;
7215 
7216   case 244:
7217 #line 2049 "ripper.y"
7218                     {
7219 #if 0
7220 			value_expr((yyvsp[-5].val));
7221 			(yyval.val) = new_if(p, (yyvsp[-5].val), (yyvsp[-3].val), (yyvsp[0].val), &(yyloc));
7222 			fixpos((yyval.val), (yyvsp[-5].val));
7223 #endif
7224 			{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;}
7225 		    }
7226 #line 7222 "ripper.c"
7227     break;
7228 
7229   case 245:
7230 #line 2058 "ripper.y"
7231                     {
7232 			(yyval.val) = (yyvsp[0].val);
7233 		    }
7234 #line 7230 "ripper.c"
7235     break;
7236 
7237   case 246:
7238 #line 2063 "ripper.y"
7239                        {(yyval.val) = '>';}
7240 #line 7236 "ripper.c"
7241     break;
7242 
7243   case 247:
7244 #line 2064 "ripper.y"
7245                        {(yyval.val) = '<';}
7246 #line 7242 "ripper.c"
7247     break;
7248 
7249   case 248:
7250 #line 2065 "ripper.y"
7251                        {(yyval.val) = idGE;}
7252 #line 7248 "ripper.c"
7253     break;
7254 
7255   case 249:
7256 #line 2066 "ripper.y"
7257                        {(yyval.val) = idLE;}
7258 #line 7254 "ripper.c"
7259     break;
7260 
7261   case 250:
7262 #line 2070 "ripper.y"
7263                     {
7264 			(yyval.val) = call_bin_op(p, (yyvsp[-2].val), (yyvsp[-1].val), (yyvsp[0].val), &(yylsp[-1]), &(yyloc));
7265 		    }
7266 #line 7262 "ripper.c"
7267     break;
7268 
7269   case 251:
7270 #line 2074 "ripper.y"
7271                     {
7272 			rb_warning1("comparison '%s' after comparison", WARN_ID((yyvsp[-1].val)));
7273 			(yyval.val) = call_bin_op(p, (yyvsp[-2].val), (yyvsp[-1].val), (yyvsp[0].val), &(yylsp[-1]), &(yyloc));
7274 		    }
7275 #line 7271 "ripper.c"
7276     break;
7277 
7278   case 252:
7279 #line 2081 "ripper.y"
7280                     {
7281 			value_expr((yyvsp[0].val));
7282 			(yyval.val) = (yyvsp[0].val);
7283 		    }
7284 #line 7280 "ripper.c"
7285     break;
7286 
7287   case 254:
7288 #line 2089 "ripper.y"
7289                     {
7290 			(yyval.val) = (yyvsp[-1].val);
7291 		    }
7292 #line 7288 "ripper.c"
7293     break;
7294 
7295   case 255:
7296 #line 2093 "ripper.y"
7297                     {
7298 #if 0
7299 			(yyval.val) = (yyvsp[-1].val) ? arg_append(p, (yyvsp[-3].val), new_hash(p, (yyvsp[-1].val), &(yylsp[-1])), &(yyloc)) : (yyvsp[-3].val);
7300 #endif
7301 			{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;}
7302 		    }
7303 #line 7299 "ripper.c"
7304     break;
7305 
7306   case 256:
7307 #line 2100 "ripper.y"
7308                     {
7309 #if 0
7310 			(yyval.val) = (yyvsp[-1].val) ? NEW_LIST(new_hash(p, (yyvsp[-1].val), &(yylsp[-1])), &(yyloc)) : 0;
7311 #endif
7312 			{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;}
7313 		    }
7314 #line 7310 "ripper.c"
7315     break;
7316 
7317   case 257:
7318 #line 2109 "ripper.y"
7319                     {
7320 			value_expr((yyvsp[0].val));
7321 			(yyval.val) = (yyvsp[0].val);
7322 		    }
7323 #line 7319 "ripper.c"
7324     break;
7325 
7326   case 258:
7327 #line 2114 "ripper.y"
7328                     {
7329 #if 0
7330 			YYLTYPE loc = code_loc_gen(&(yylsp[-1]), &(yylsp[0]));
7331 			value_expr((yyvsp[-2].val));
7332 			(yyval.val) = NEW_RESCUE((yyvsp[-2].val), NEW_RESBODY(0, remove_begin((yyvsp[0].val)), 0, &loc), 0, &(yyloc));
7333 #endif
7334 			{VALUE v1,v2,v3;v1=(yyvsp[-2].val);v2=(yyvsp[0].val);v3=dispatch2(rescue_mod,v1,v2);(yyval.val)=v3;}
7335 		    }
7336 #line 7332 "ripper.c"
7337     break;
7338 
7339   case 259:
7340 #line 2125 "ripper.y"
7341                     {
7342 #if 0
7343 			(yyval.val) = (yyvsp[-1].val);
7344 #endif
7345 			{VALUE v1,v2;v1=escape_Qundef((yyvsp[-1].val));v2=dispatch1(arg_paren,v1);(yyval.val)=v2;}
7346 		    }
7347 #line 7343 "ripper.c"
7348     break;
7349 
7350   case 264:
7351 #line 2140 "ripper.y"
7352                     {
7353 		      (yyval.val) = (yyvsp[-1].val);
7354 		    }
7355 #line 7351 "ripper.c"
7356     break;
7357 
7358   case 265:
7359 #line 2144 "ripper.y"
7360                     {
7361 #if 0
7362 			(yyval.val) = (yyvsp[-1].val) ? arg_append(p, (yyvsp[-3].val), new_hash(p, (yyvsp[-1].val), &(yylsp[-1])), &(yyloc)) : (yyvsp[-3].val);
7363 #endif
7364 			{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;}
7365 		    }
7366 #line 7362 "ripper.c"
7367     break;
7368 
7369   case 266:
7370 #line 2151 "ripper.y"
7371                     {
7372 #if 0
7373 			(yyval.val) = (yyvsp[-1].val) ? NEW_LIST(new_hash(p, (yyvsp[-1].val), &(yylsp[-1])), &(yylsp[-1])) : 0;
7374 #endif
7375 			{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;}
7376 		    }
7377 #line 7373 "ripper.c"
7378     break;
7379 
7380   case 267:
7381 #line 2160 "ripper.y"
7382                     {
7383 #if 0
7384 			value_expr((yyvsp[0].val));
7385 			(yyval.val) = NEW_LIST((yyvsp[0].val), &(yyloc));
7386 #endif
7387 			{VALUE v1,v2,v3,v4;v1=dispatch0(args_new);v2=v1;v3=(yyvsp[0].val);v4=dispatch2(args_add,v2,v3);(yyval.val)=v4;}
7388 		    }
7389 #line 7385 "ripper.c"
7390     break;
7391 
7392   case 268:
7393 #line 2168 "ripper.y"
7394                     {
7395 #if 0
7396 			(yyval.val) = arg_blk_pass((yyvsp[-1].val), (yyvsp[0].val));
7397 #endif
7398 			{VALUE v1,v2,v3;v1=(yyvsp[-1].val);v2=(yyvsp[0].val);v3=dispatch2(args_add_block,v1,v2);(yyval.val)=v3;}
7399 		    }
7400 #line 7396 "ripper.c"
7401     break;
7402 
7403   case 269:
7404 #line 2175 "ripper.y"
7405                     {
7406 #if 0
7407 			(yyval.val) = (yyvsp[-1].val) ? NEW_LIST(new_hash(p, (yyvsp[-1].val), &(yylsp[-1])), &(yylsp[-1])) : 0;
7408 			(yyval.val) = arg_blk_pass((yyval.val), (yyvsp[0].val));
7409 #endif
7410 			{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;}
7411 		    }
7412 #line 7408 "ripper.c"
7413     break;
7414 
7415   case 270:
7416 #line 2183 "ripper.y"
7417                     {
7418 #if 0
7419 			(yyval.val) = (yyvsp[-1].val) ? arg_append(p, (yyvsp[-3].val), new_hash(p, (yyvsp[-1].val), &(yylsp[-1])), &(yyloc)) : (yyvsp[-3].val);
7420 			(yyval.val) = arg_blk_pass((yyval.val), (yyvsp[0].val));
7421 #endif
7422 			{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;}
7423 		    }
7424 #line 7420 "ripper.c"
7425     break;
7426 
7427   case 271:
7428 #line 2191 "ripper.y"
7429                         {{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;}}
7430 #line 7426 "ripper.c"
7431     break;
7432 
7433   case 272:
7434 #line 2194 "ripper.y"
7435                     {
7436 			/* If call_args starts with a open paren '(' or '[',
7437 			 * look-ahead reading of the letters calls CMDARG_PUSH(0),
7438 			 * but the push must be done after CMDARG_PUSH(1).
7439 			 * So this code makes them consistent by first cancelling
7440 			 * the premature CMDARG_PUSH(0), doing CMDARG_PUSH(1),
7441 			 * and finally redoing CMDARG_PUSH(0).
7442 			 */
7443 			int lookahead = 0;
7444 			switch (yychar) {
7445 			  case '(': case tLPAREN: case tLPAREN_ARG: case '[': case tLBRACK:
7446 			    lookahead = 1;
7447 			}
7448 			if (lookahead) CMDARG_POP();
7449 			CMDARG_PUSH(1);
7450 			if (lookahead) CMDARG_PUSH(0);
7451 		    }
7452 #line 7448 "ripper.c"
7453     break;
7454 
7455   case 273:
7456 #line 2212 "ripper.y"
7457                     {
7458 			/* call_args can be followed by tLBRACE_ARG (that does CMDARG_PUSH(0) in the lexer)
7459 			 * but the push must be done after CMDARG_POP() in the parser.
7460 			 * So this code does CMDARG_POP() to pop 0 pushed by tLBRACE_ARG,
7461 			 * CMDARG_POP() to pop 1 pushed by command_args,
7462 			 * and CMDARG_PUSH(0) to restore back the flag set by tLBRACE_ARG.
7463 			 */
7464 			int lookahead = 0;
7465 			switch (yychar) {
7466 			  case tLBRACE_ARG:
7467 			    lookahead = 1;
7468 			}
7469 			if (lookahead) CMDARG_POP();
7470 			CMDARG_POP();
7471 			if (lookahead) CMDARG_PUSH(0);
7472 			(yyval.val) = (yyvsp[0].val);
7473 		    }
7474 #line 7470 "ripper.c"
7475     break;
7476 
7477   case 274:
7478 #line 2232 "ripper.y"
7479                     {
7480 #if 0
7481 			(yyval.val) = NEW_BLOCK_PASS((yyvsp[0].val), &(yyloc));
7482 #endif
7483 			(yyval.val)=(yyvsp[0].val);
7484 		    }
7485 #line 7481 "ripper.c"
7486     break;
7487 
7488   case 275:
7489 #line 2241 "ripper.y"
7490                     {
7491 			(yyval.val) = (yyvsp[0].val);
7492 		    }
7493 #line 7489 "ripper.c"
7494     break;
7495 
7496   case 276:
7497 #line 2245 "ripper.y"
7498                     {
7499 			(yyval.val) = 0;
7500 		    }
7501 #line 7497 "ripper.c"
7502     break;
7503 
7504   case 277:
7505 #line 2251 "ripper.y"
7506                     {
7507 #if 0
7508 			(yyval.val) = NEW_LIST((yyvsp[0].val), &(yyloc));
7509 #endif
7510 			{VALUE v1,v2,v3,v4;v1=dispatch0(args_new);v2=v1;v3=(yyvsp[0].val);v4=dispatch2(args_add,v2,v3);(yyval.val)=v4;}
7511 		    }
7512 #line 7508 "ripper.c"
7513     break;
7514 
7515   case 278:
7516 #line 2258 "ripper.y"
7517                     {
7518 #if 0
7519 			(yyval.val) = NEW_SPLAT((yyvsp[0].val), &(yyloc));
7520 #endif
7521 			{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;}
7522 		    }
7523 #line 7519 "ripper.c"
7524     break;
7525 
7526   case 279:
7527 #line 2265 "ripper.y"
7528                     {
7529 #if 0
7530 			(yyval.val) = last_arg_append(p, (yyvsp[-2].val), (yyvsp[0].val), &(yyloc));
7531 #endif
7532 			{VALUE v1,v2,v3;v1=(yyvsp[-2].val);v2=(yyvsp[0].val);v3=dispatch2(args_add,v1,v2);(yyval.val)=v3;}
7533 		    }
7534 #line 7530 "ripper.c"
7535     break;
7536 
7537   case 280:
7538 #line 2272 "ripper.y"
7539                     {
7540 #if 0
7541 			(yyval.val) = rest_arg_append(p, (yyvsp[-3].val), (yyvsp[0].val), &(yyloc));
7542 #endif
7543 			{VALUE v1,v2,v3;v1=(yyvsp[-3].val);v2=(yyvsp[0].val);v3=dispatch2(args_add_star,v1,v2);(yyval.val)=v3;}
7544 		    }
7545 #line 7541 "ripper.c"
7546     break;
7547 
7548   case 283:
7549 #line 2285 "ripper.y"
7550                     {
7551 #if 0
7552 			(yyval.val) = last_arg_append(p, (yyvsp[-2].val), (yyvsp[0].val), &(yyloc));
7553 #endif
7554 			{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;}
7555 		    }
7556 #line 7552 "ripper.c"
7557     break;
7558 
7559   case 284:
7560 #line 2292 "ripper.y"
7561                     {
7562 #if 0
7563 			(yyval.val) = rest_arg_append(p, (yyvsp[-3].val), (yyvsp[0].val), &(yyloc));
7564 #endif
7565 			{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;}
7566 		    }
7567 #line 7563 "ripper.c"
7568     break;
7569 
7570   case 285:
7571 #line 2299 "ripper.y"
7572                     {
7573 #if 0
7574 			(yyval.val) = NEW_SPLAT((yyvsp[0].val), &(yyloc));
7575 #endif
7576 			{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;}
7577 		    }
7578 #line 7574 "ripper.c"
7579     break;
7580 
7581   case 296:
7582 #line 2318 "ripper.y"
7583                     {
7584 #if 0
7585 			(yyval.val) = NEW_FCALL((yyvsp[0].val), 0, &(yyloc));
7586 #endif
7587 			{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;}
7588 		    }
7589 #line 7585 "ripper.c"
7590     break;
7591 
7592   case 297:
7593 #line 2325 "ripper.y"
7594                     {
7595 			CMDARG_PUSH(0);
7596 		    }
7597 #line 7593 "ripper.c"
7598     break;
7599 
7600   case 298:
7601 #line 2330 "ripper.y"
7602                     {
7603 			CMDARG_POP();
7604 #if 0
7605 			set_line_body((yyvsp[-1].val), (yylsp[-3]).end_pos.lineno);
7606 			(yyval.val) = NEW_BEGIN((yyvsp[-1].val), &(yyloc));
7607 			nd_set_line((yyval.val), (yylsp[-3]).end_pos.lineno);
7608 #endif
7609 			{VALUE v1,v2;v1=(yyvsp[-1].val);v2=dispatch1(begin,v1);(yyval.val)=v2;}
7610 		    }
7611 #line 7607 "ripper.c"
7612     break;
7613 
7614   case 299:
7615 #line 2339 "ripper.y"
7616                               {SET_LEX_STATE(EXPR_ENDARG);}
7617 #line 7613 "ripper.c"
7618     break;
7619 
7620   case 300:
7621 #line 2340 "ripper.y"
7622                     {
7623 #if 0
7624 			(yyval.val) = NEW_BEGIN(0, &(yyloc));
7625 #endif
7626 			{VALUE v1,v2;v1=0;v2=dispatch1(paren,v1);(yyval.val)=v2;}
7627 		    }
7628 #line 7624 "ripper.c"
7629     break;
7630 
7631   case 301:
7632 #line 2346 "ripper.y"
7633                                    {SET_LEX_STATE(EXPR_ENDARG);}
7634 #line 7630 "ripper.c"
7635     break;
7636 
7637   case 302:
7638 #line 2347 "ripper.y"
7639                     {
7640 #if 0
7641 			(yyval.val) = (yyvsp[-2].val);
7642 #endif
7643 			{VALUE v1,v2;v1=(yyvsp[-2].val);v2=dispatch1(paren,v1);(yyval.val)=v2;}
7644 		    }
7645 #line 7641 "ripper.c"
7646     break;
7647 
7648   case 303:
7649 #line 2354 "ripper.y"
7650                     {
7651 #if 0
7652 			(yyval.val) = (yyvsp[-1].val);
7653 #endif
7654 			{VALUE v1,v2;v1=(yyvsp[-1].val);v2=dispatch1(paren,v1);(yyval.val)=v2;}
7655 		    }
7656 #line 7652 "ripper.c"
7657     break;
7658 
7659   case 304:
7660 #line 2361 "ripper.y"
7661                     {
7662 #if 0
7663 			(yyval.val) = NEW_COLON2((yyvsp[-2].val), (yyvsp[0].val), &(yyloc));
7664 #endif
7665 			{VALUE v1,v2,v3;v1=(yyvsp[-2].val);v2=(yyvsp[0].val);v3=dispatch2(const_path_ref,v1,v2);(yyval.val)=v3;}
7666 		    }
7667 #line 7663 "ripper.c"
7668     break;
7669 
7670   case 305:
7671 #line 2368 "ripper.y"
7672                     {
7673 #if 0
7674 			(yyval.val) = NEW_COLON3((yyvsp[0].val), &(yyloc));
7675 #endif
7676 			{VALUE v1,v2;v1=(yyvsp[0].val);v2=dispatch1(top_const_ref,v1);(yyval.val)=v2;}
7677 		    }
7678 #line 7674 "ripper.c"
7679     break;
7680 
7681   case 306:
7682 #line 2375 "ripper.y"
7683                     {
7684 #if 0
7685 			(yyval.val) = make_array((yyvsp[-1].val), &(yyloc));
7686 #endif
7687 			{VALUE v1,v2;v1=escape_Qundef((yyvsp[-1].val));v2=dispatch1(array,v1);(yyval.val)=v2;}
7688 		    }
7689 #line 7685 "ripper.c"
7690     break;
7691 
7692   case 307:
7693 #line 2382 "ripper.y"
7694                     {
7695 #if 0
7696 			(yyval.val) = new_hash(p, (yyvsp[-1].val), &(yyloc));
7697 			(yyval.val)->nd_alen = TRUE;
7698 #endif
7699 			{VALUE v1,v2;v1=escape_Qundef((yyvsp[-1].val));v2=dispatch1(hash,v1);(yyval.val)=v2;}
7700 		    }
7701 #line 7697 "ripper.c"
7702     break;
7703 
7704   case 308:
7705 #line 2390 "ripper.y"
7706                     {
7707 #if 0
7708 			(yyval.val) = NEW_RETURN(0, &(yyloc));
7709 #endif
7710 			{VALUE v1;v1=dispatch0(return0);(yyval.val)=v1;}
7711 		    }
7712 #line 7708 "ripper.c"
7713     break;
7714 
7715   case 309:
7716 #line 2397 "ripper.y"
7717                     {
7718 #if 0
7719 			(yyval.val) = new_yield(p, (yyvsp[-1].val), &(yyloc));
7720 #endif
7721 			{VALUE v1,v2,v3,v4;v1=(yyvsp[-1].val);v2=dispatch1(paren,v1);v3=v2;v4=dispatch1(yield,v3);(yyval.val)=v4;}
7722 		    }
7723 #line 7719 "ripper.c"
7724     break;
7725 
7726   case 310:
7727 #line 2404 "ripper.y"
7728                     {
7729 #if 0
7730 			(yyval.val) = NEW_YIELD(0, &(yyloc));
7731 #endif
7732 			{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;}
7733 		    }
7734 #line 7730 "ripper.c"
7735     break;
7736 
7737   case 311:
7738 #line 2411 "ripper.y"
7739                     {
7740 #if 0
7741 			(yyval.val) = NEW_YIELD(0, &(yyloc));
7742 #endif
7743 			{VALUE v1;v1=dispatch0(yield0);(yyval.val)=v1;}
7744 		    }
7745 #line 7741 "ripper.c"
7746     break;
7747 
7748   case 312:
7749 #line 2417 "ripper.y"
7750                                              {p->in_defined = 1;}
7751 #line 7747 "ripper.c"
7752     break;
7753 
7754   case 313:
7755 #line 2418 "ripper.y"
7756                     {
7757 			p->in_defined = 0;
7758 			(yyval.val) = new_defined(p, (yyvsp[-1].val), &(yyloc));
7759 		    }
7760 #line 7756 "ripper.c"
7761     break;
7762 
7763   case 314:
7764 #line 2423 "ripper.y"
7765                     {
7766 			(yyval.val) = call_uni_op(p, method_cond(p, (yyvsp[-1].val), &(yylsp[-1])), METHOD_NOT, &(yylsp[-3]), &(yyloc));
7767 		    }
7768 #line 7764 "ripper.c"
7769     break;
7770 
7771   case 315:
7772 #line 2427 "ripper.y"
7773                     {
7774 			(yyval.val) = call_uni_op(p, method_cond(p, new_nil(&(yylsp[-1])), &(yylsp[-1])), METHOD_NOT, &(yylsp[-2]), &(yyloc));
7775 		    }
7776 #line 7772 "ripper.c"
7777     break;
7778 
7779   case 316:
7780 #line 2431 "ripper.y"
7781                     {
7782 #if 0
7783 			(yyval.val) = method_add_block(p, (yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
7784 #endif
7785 			{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;}
7786 		    }
7787 #line 7783 "ripper.c"
7788     break;
7789 
7790   case 318:
7791 #line 2439 "ripper.y"
7792                     {
7793 #if 0
7794 			block_dup_check(p, (yyvsp[-1].val)->nd_args, (yyvsp[0].val));
7795 			(yyval.val) = method_add_block(p, (yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
7796 #endif
7797 			{VALUE v1,v2,v3;v1=(yyvsp[-1].val);v2=(yyvsp[0].val);v3=dispatch2(method_add_block,v1,v2);(yyval.val)=v3;}
7798 		    }
7799 #line 7795 "ripper.c"
7800     break;
7801 
7802   case 319:
7803 #line 2447 "ripper.y"
7804                     {
7805 			token_info_push(p, "->", &(yylsp[0]));
7806 		    }
7807 #line 7803 "ripper.c"
7808     break;
7809 
7810   case 320:
7811 #line 2451 "ripper.y"
7812                     {
7813 			(yyval.val) = (yyvsp[0].val);
7814 #if 0
7815                         nd_set_first_loc((yyval.val), (yylsp[-2]).beg_pos);
7816 #endif
7817 		    }
7818 #line 7814 "ripper.c"
7819     break;
7820 
7821   case 321:
7822 #line 2461 "ripper.y"
7823                     {
7824 #if 0
7825 			(yyval.val) = new_if(p, (yyvsp[-4].val), (yyvsp[-2].val), (yyvsp[-1].val), &(yyloc));
7826 			fixpos((yyval.val), (yyvsp[-4].val));
7827 #endif
7828 			{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;}
7829 		    }
7830 #line 7826 "ripper.c"
7831     break;
7832 
7833   case 322:
7834 #line 2472 "ripper.y"
7835                     {
7836 #if 0
7837 			(yyval.val) = new_unless(p, (yyvsp[-4].val), (yyvsp[-2].val), (yyvsp[-1].val), &(yyloc));
7838 			fixpos((yyval.val), (yyvsp[-4].val));
7839 #endif
7840 			{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;}
7841 		    }
7842 #line 7838 "ripper.c"
7843     break;
7844 
7845   case 323:
7846 #line 2482 "ripper.y"
7847                     {
7848 #if 0
7849 			(yyval.val) = NEW_WHILE(cond(p, (yyvsp[-2].val), &(yylsp[-2])), (yyvsp[-1].val), 1, &(yyloc));
7850 			fixpos((yyval.val), (yyvsp[-2].val));
7851 #endif
7852 			{VALUE v1,v2,v3;v1=(yyvsp[-2].val);v2=(yyvsp[-1].val);v3=dispatch2(while,v1,v2);(yyval.val)=v3;}
7853 		    }
7854 #line 7850 "ripper.c"
7855     break;
7856 
7857   case 324:
7858 #line 2492 "ripper.y"
7859                     {
7860 #if 0
7861 			(yyval.val) = NEW_UNTIL(cond(p, (yyvsp[-2].val), &(yylsp[-2])), (yyvsp[-1].val), 1, &(yyloc));
7862 			fixpos((yyval.val), (yyvsp[-2].val));
7863 #endif
7864 			{VALUE v1,v2,v3;v1=(yyvsp[-2].val);v2=(yyvsp[-1].val);v3=dispatch2(until,v1,v2);(yyval.val)=v3;}
7865 		    }
7866 #line 7862 "ripper.c"
7867     break;
7868 
7869   case 325:
7870 #line 2502 "ripper.y"
7871                     {
7872 #if 0
7873 			(yyval.val) = NEW_CASE((yyvsp[-3].val), (yyvsp[-1].val), &(yyloc));
7874 			fixpos((yyval.val), (yyvsp[-3].val));
7875 #endif
7876 			{VALUE v1,v2,v3;v1=(yyvsp[-3].val);v2=(yyvsp[-1].val);v3=dispatch2(case,v1,v2);(yyval.val)=v3;}
7877 		    }
7878 #line 7874 "ripper.c"
7879     break;
7880 
7881   case 326:
7882 #line 2510 "ripper.y"
7883                     {
7884 #if 0
7885 			(yyval.val) = NEW_CASE2((yyvsp[-1].val), &(yyloc));
7886 #endif
7887 			{VALUE v1,v2,v3;v1=Qnil;v2=(yyvsp[-1].val);v3=dispatch2(case,v1,v2);(yyval.val)=v3;}
7888 		    }
7889 #line 7885 "ripper.c"
7890     break;
7891 
7892   case 327:
7893 #line 2519 "ripper.y"
7894                     {
7895 #if 0
7896 			/*
7897 			 *  for a, b, c in e
7898 			 *  #=>
7899 			 *  e.each{|*x| a, b, c = x}
7900 			 *
7901 			 *  for a in e
7902 			 *  #=>
7903 			 *  e.each{|x| a, = x}
7904 			 */
7905 			ID id = internal_id(p);
7906 			NODE *m = NEW_ARGS_AUX(0, 0, &NULL_LOC);
7907 			NODE *args, *scope, *internal_var = NEW_DVAR(id, &(yylsp[-4]));
7908 			rb_imemo_tmpbuf_t *tmpbuf = new_tmpbuf();
7909 			ID *tbl = ALLOC_N(ID, 2);
7910 			tbl[0] = 1 /* length of local var table */; tbl[1] = id /* internal id */;
7911 			tmpbuf->ptr = (VALUE *)tbl;
7912 
7913 			switch (nd_type((yyvsp[-4].val))) {
7914 			  case NODE_LASGN:
7915 			  case NODE_DASGN:
7916 			  case NODE_DASGN_CURR: /* e.each {|internal_var| a = internal_var; ... } */
7917 			    (yyvsp[-4].val)->nd_value = internal_var;
7918 			    id = 0;
7919 			    m->nd_plen = 1;
7920 			    m->nd_next = (yyvsp[-4].val);
7921 			    break;
7922 			  case NODE_MASGN: /* e.each {|*internal_var| a, b, c = (internal_var.length == 1 && Array === (tmp = internal_var[0]) ? tmp : internal_var); ... } */
7923 			    m->nd_next = node_assign(p, (yyvsp[-4].val), NEW_FOR_MASGN(internal_var, &(yylsp[-4])), &(yylsp[-4]));
7924 			    break;
7925 			  default: /* e.each {|*internal_var| @a, B, c[1], d.attr = internal_val; ... } */
7926 			    m->nd_next = node_assign(p, NEW_MASGN(NEW_LIST((yyvsp[-4].val), &(yylsp[-4])), 0, &(yylsp[-4])), internal_var, &(yylsp[-4]));
7927 			}
7928 			/* {|*internal_id| <m> = internal_id; ... } */
7929 			args = new_args(p, m, 0, id, 0, new_args_tail(p, 0, 0, 0, &(yylsp[-4])), &(yylsp[-4]));
7930 			scope = NEW_NODE(NODE_SCOPE, tbl, (yyvsp[-1].val), args, &(yyloc));
7931 			(yyval.val) = NEW_FOR((yyvsp[-2].val), scope, &(yyloc));
7932 			fixpos((yyval.val), (yyvsp[-4].val));
7933 #endif
7934 			{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;}
7935 		    }
7936 #line 7932 "ripper.c"
7937     break;
7938 
7939   case 328:
7940 #line 2562 "ripper.y"
7941                     {
7942 			if (p->in_def) {
7943 			    YYLTYPE loc = code_loc_gen(&(yylsp[-2]), &(yylsp[-1]));
7944 			    yyerror1(&loc, "class definition in method body");
7945 			}
7946 			(yyvsp[-2].num) = p->in_class;
7947 			p->in_class = 1;
7948 			local_push(p, 0);
7949 		    }
7950 #line 7946 "ripper.c"
7951     break;
7952 
7953   case 329:
7954 #line 2573 "ripper.y"
7955                     {
7956 #if 0
7957 			(yyval.val) = NEW_CLASS((yyvsp[-4].val), (yyvsp[-1].val), (yyvsp[-3].val), &(yyloc));
7958 			nd_set_line((yyval.val)->nd_body, (yylsp[0]).end_pos.lineno);
7959 			set_line_body((yyvsp[-1].val), (yylsp[-3]).end_pos.lineno);
7960 			nd_set_line((yyval.val), (yylsp[-3]).end_pos.lineno);
7961 #endif
7962 			{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;}
7963 			local_pop(p);
7964 			p->in_class = (yyvsp[-5].num) & 1;
7965 		    }
7966 #line 7962 "ripper.c"
7967     break;
7968 
7969   case 330:
7970 #line 2585 "ripper.y"
7971                     {
7972 			(yyval.num) = (p->in_class << 1) | p->in_def;
7973 			p->in_def = 0;
7974 			p->in_class = 0;
7975 			local_push(p, 0);
7976 		    }
7977 #line 7973 "ripper.c"
7978     break;
7979 
7980   case 331:
7981 #line 2594 "ripper.y"
7982                     {
7983 #if 0
7984 			(yyval.val) = NEW_SCLASS((yyvsp[-4].val), (yyvsp[-1].val), &(yyloc));
7985 			nd_set_line((yyval.val)->nd_body, (yylsp[0]).end_pos.lineno);
7986 			set_line_body((yyvsp[-1].val), nd_line((yyvsp[-4].val)));
7987 			fixpos((yyval.val), (yyvsp[-4].val));
7988 #endif
7989 			{VALUE v1,v2,v3;v1=(yyvsp[-4].val);v2=(yyvsp[-1].val);v3=dispatch2(sclass,v1,v2);(yyval.val)=v3;}
7990 			local_pop(p);
7991 			p->in_def = (yyvsp[-3].num) & 1;
7992 			p->in_class = ((yyvsp[-3].num) >> 1) & 1;
7993 		    }
7994 #line 7990 "ripper.c"
7995     break;
7996 
7997   case 332:
7998 #line 2607 "ripper.y"
7999                     {
8000 			if (p->in_def) {
8001 			    YYLTYPE loc = code_loc_gen(&(yylsp[-1]), &(yylsp[0]));
8002 			    yyerror1(&loc, "module definition in method body");
8003 			}
8004 			(yyvsp[-1].num) = p->in_class;
8005 			p->in_class = 1;
8006 			local_push(p, 0);
8007 		    }
8008 #line 8004 "ripper.c"
8009     break;
8010 
8011   case 333:
8012 #line 2618 "ripper.y"
8013                     {
8014 #if 0
8015 			(yyval.val) = NEW_MODULE((yyvsp[-3].val), (yyvsp[-1].val), &(yyloc));
8016 			nd_set_line((yyval.val)->nd_body, (yylsp[0]).end_pos.lineno);
8017 			set_line_body((yyvsp[-1].val), (yylsp[-3]).end_pos.lineno);
8018 			nd_set_line((yyval.val), (yylsp[-3]).end_pos.lineno);
8019 #endif
8020 			{VALUE v1,v2,v3;v1=(yyvsp[-3].val);v2=(yyvsp[-1].val);v3=dispatch2(module,v1,v2);(yyval.val)=v3;}
8021 			local_pop(p);
8022 			p->in_class = (yyvsp[-4].num) & 1;
8023 		    }
8024 #line 8020 "ripper.c"
8025     break;
8026 
8027   case 334:
8028 #line 2630 "ripper.y"
8029                     {
8030 			local_push(p, 0);
8031 			(yyval.id) = p->cur_arg;
8032 			p->cur_arg = 0;
8033 		    }
8034 #line 8030 "ripper.c"
8035     break;
8036 
8037   case 335:
8038 #line 2635 "ripper.y"
8039                     {
8040 			(yyval.num) = p->in_def;
8041 			p->in_def = 1;
8042 		    }
8043 #line 8039 "ripper.c"
8044     break;
8045 
8046   case 336:
8047 #line 2642 "ripper.y"
8048                     {
8049 #if 0
8050 			NODE *body = remove_begin((yyvsp[-1].val));
8051 			reduce_nodes(p, &body);
8052 			(yyval.val) = NEW_DEFN((yyvsp[-5].val), (yyvsp[-2].val), body, &(yyloc));
8053 			nd_set_line((yyval.val)->nd_defn, (yylsp[0]).end_pos.lineno);
8054 			set_line_body(body, (yylsp[-6]).beg_pos.lineno);
8055 #endif
8056 			{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;}
8057 			local_pop(p);
8058 			p->in_def = (yyvsp[-3].num) & 1;
8059 			p->cur_arg = (yyvsp[-4].id);
8060 		    }
8061 #line 8057 "ripper.c"
8062     break;
8063 
8064   case 337:
8065 #line 2655 "ripper.y"
8066                                                {SET_LEX_STATE(EXPR_FNAME);}
8067 #line 8063 "ripper.c"
8068     break;
8069 
8070   case 338:
8071 #line 2656 "ripper.y"
8072                     {
8073 			(yyvsp[-1].num) = p->in_def;
8074 			p->in_def = 1;
8075 			SET_LEX_STATE(EXPR_ENDFN|EXPR_LABEL); /* force for args */
8076 			local_push(p, 0);
8077 			(yyval.id) = p->cur_arg;
8078 			p->cur_arg = 0;
8079 		    }
8080 #line 8076 "ripper.c"
8081     break;
8082 
8083   case 339:
8084 #line 2667 "ripper.y"
8085                     {
8086 #if 0
8087 			NODE *body = remove_begin((yyvsp[-1].val));
8088 			reduce_nodes(p, &body);
8089 			(yyval.val) = NEW_DEFS((yyvsp[-7].val), (yyvsp[-4].val), (yyvsp[-2].val), body, &(yyloc));
8090 			nd_set_line((yyval.val)->nd_defn, (yylsp[0]).end_pos.lineno);
8091 			set_line_body(body, (yylsp[-8]).beg_pos.lineno);
8092 #endif
8093 			{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;}
8094 			local_pop(p);
8095 			p->in_def = (yyvsp[-5].num) & 1;
8096 			p->cur_arg = (yyvsp[-3].id);
8097 		    }
8098 #line 8094 "ripper.c"
8099     break;
8100 
8101   case 340:
8102 #line 2681 "ripper.y"
8103                     {
8104 #if 0
8105 			(yyval.val) = NEW_BREAK(0, &(yyloc));
8106 #endif
8107 			{VALUE v1,v2,v3;v1=dispatch0(args_new);v2=v1;v3=dispatch1(break,v2);(yyval.val)=v3;}
8108 		    }
8109 #line 8105 "ripper.c"
8110     break;
8111 
8112   case 341:
8113 #line 2688 "ripper.y"
8114                     {
8115 #if 0
8116 			(yyval.val) = NEW_NEXT(0, &(yyloc));
8117 #endif
8118 			{VALUE v1,v2,v3;v1=dispatch0(args_new);v2=v1;v3=dispatch1(next,v2);(yyval.val)=v3;}
8119 		    }
8120 #line 8116 "ripper.c"
8121     break;
8122 
8123   case 342:
8124 #line 2695 "ripper.y"
8125                     {
8126 #if 0
8127 			(yyval.val) = NEW_REDO(&(yyloc));
8128 #endif
8129 			{VALUE v1;v1=dispatch0(redo);(yyval.val)=v1;}
8130 		    }
8131 #line 8127 "ripper.c"
8132     break;
8133 
8134   case 343:
8135 #line 2702 "ripper.y"
8136                     {
8137 #if 0
8138 			(yyval.val) = NEW_RETRY(&(yyloc));
8139 #endif
8140 			{VALUE v1;v1=dispatch0(retry);(yyval.val)=v1;}
8141 		    }
8142 #line 8138 "ripper.c"
8143     break;
8144 
8145   case 344:
8146 #line 2711 "ripper.y"
8147                     {
8148 			value_expr((yyvsp[0].val));
8149 			(yyval.val) = (yyvsp[0].val);
8150 		    }
8151 #line 8147 "ripper.c"
8152     break;
8153 
8154   case 345:
8155 #line 2718 "ripper.y"
8156                     {
8157 			token_info_push(p, "begin", &(yyloc));
8158 		    }
8159 #line 8155 "ripper.c"
8160     break;
8161 
8162   case 346:
8163 #line 2724 "ripper.y"
8164                     {
8165 			token_info_push(p, "if", &(yyloc));
8166 		    }
8167 #line 8163 "ripper.c"
8168     break;
8169 
8170   case 347:
8171 #line 2730 "ripper.y"
8172                     {
8173 			token_info_push(p, "unless", &(yyloc));
8174 		    }
8175 #line 8171 "ripper.c"
8176     break;
8177 
8178   case 348:
8179 #line 2736 "ripper.y"
8180                     {
8181 			token_info_push(p, "while", &(yyloc));
8182 		    }
8183 #line 8179 "ripper.c"
8184     break;
8185 
8186   case 349:
8187 #line 2742 "ripper.y"
8188                     {
8189 			token_info_push(p, "until", &(yyloc));
8190 		    }
8191 #line 8187 "ripper.c"
8192     break;
8193 
8194   case 350:
8195 #line 2748 "ripper.y"
8196                     {
8197 			token_info_push(p, "case", &(yyloc));
8198 		    }
8199 #line 8195 "ripper.c"
8200     break;
8201 
8202   case 351:
8203 #line 2754 "ripper.y"
8204                     {
8205 			token_info_push(p, "for", &(yyloc));
8206 		    }
8207 #line 8203 "ripper.c"
8208     break;
8209 
8210   case 352:
8211 #line 2760 "ripper.y"
8212                     {
8213 			token_info_push(p, "class", &(yyloc));
8214 		    }
8215 #line 8211 "ripper.c"
8216     break;
8217 
8218   case 353:
8219 #line 2766 "ripper.y"
8220                     {
8221 			token_info_push(p, "module", &(yyloc));
8222 		    }
8223 #line 8219 "ripper.c"
8224     break;
8225 
8226   case 354:
8227 #line 2772 "ripper.y"
8228                     {
8229 			token_info_push(p, "def", &(yyloc));
8230 		    }
8231 #line 8227 "ripper.c"
8232     break;
8233 
8234   case 355:
8235 #line 2778 "ripper.y"
8236                     {
8237 			token_info_push(p, "do", &(yyloc));
8238 		    }
8239 #line 8235 "ripper.c"
8240     break;
8241 
8242   case 356:
8243 #line 2784 "ripper.y"
8244                     {
8245 			token_info_push(p, "do", &(yyloc));
8246 		    }
8247 #line 8243 "ripper.c"
8248     break;
8249 
8250   case 357:
8251 #line 2790 "ripper.y"
8252                     {
8253 			token_info_warn(p, "rescue", p->token_info, 1, &(yyloc));
8254 		    }
8255 #line 8251 "ripper.c"
8256     break;
8257 
8258   case 358:
8259 #line 2796 "ripper.y"
8260                     {
8261 			token_info_warn(p, "ensure", p->token_info, 1, &(yyloc));
8262 		    }
8263 #line 8259 "ripper.c"
8264     break;
8265 
8266   case 359:
8267 #line 2802 "ripper.y"
8268                     {
8269 			token_info_warn(p, "when", p->token_info, 0, &(yyloc));
8270 		    }
8271 #line 8267 "ripper.c"
8272     break;
8273 
8274   case 360:
8275 #line 2808 "ripper.y"
8276                     {
8277 			token_info *ptinfo_beg = p->token_info;
8278 			int same = ptinfo_beg && strcmp(ptinfo_beg->token, "case") != 0;
8279 			token_info_warn(p, "else", p->token_info, same, &(yyloc));
8280 		    }
8281 #line 8277 "ripper.c"
8282     break;
8283 
8284   case 361:
8285 #line 2816 "ripper.y"
8286                     {
8287 			token_info_warn(p, "elsif", p->token_info, 1, &(yyloc));
8288 		    }
8289 #line 8285 "ripper.c"
8290     break;
8291 
8292   case 362:
8293 #line 2822 "ripper.y"
8294                     {
8295 			token_info_pop(p, "end", &(yyloc));
8296 		    }
8297 #line 8293 "ripper.c"
8298     break;
8299 
8300   case 363:
8301 #line 2828 "ripper.y"
8302                     {
8303 			if (p->in_class && !p->in_def && !dyna_in_block(p))
8304 			    yyerror1(&(yylsp[0]), "Invalid return in class/module body");
8305 		    }
8306 #line 8302 "ripper.c"
8307     break;
8308 
8309   case 370:
8310 #line 2847 "ripper.y"
8311                     {
8312 #if 0
8313 			(yyval.val) = new_if(p, (yyvsp[-3].val), (yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
8314 			fixpos((yyval.val), (yyvsp[-3].val));
8315 #endif
8316 			{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;}
8317 		    }
8318 #line 8314 "ripper.c"
8319     break;
8320 
8321   case 372:
8322 #line 2858 "ripper.y"
8323                     {
8324 #if 0
8325 			(yyval.val) = (yyvsp[0].val);
8326 #endif
8327 			{VALUE v1,v2;v1=(yyvsp[0].val);v2=dispatch1(else,v1);(yyval.val)=v2;}
8328 		    }
8329 #line 8325 "ripper.c"
8330     break;
8331 
8332   case 375:
8333 #line 2871 "ripper.y"
8334                     {
8335 #if 0
8336 			(yyval.val) = assignable(p, (yyvsp[0].val), 0, &(yyloc));
8337 #endif
8338 			(yyval.val)=assignable(p, (yyvsp[0].val));
8339 		    }
8340 #line 8336 "ripper.c"
8341     break;
8342 
8343   case 376:
8344 #line 2878 "ripper.y"
8345                     {
8346 #if 0
8347 			(yyval.val) = (yyvsp[-1].val);
8348 #endif
8349 			{VALUE v1,v2;v1=(yyvsp[-1].val);v2=dispatch1(mlhs_paren,v1);(yyval.val)=v2;}
8350 		    }
8351 #line 8347 "ripper.c"
8352     break;
8353 
8354   case 377:
8355 #line 2887 "ripper.y"
8356                     {
8357 #if 0
8358 			(yyval.val) = NEW_LIST((yyvsp[0].val), &(yyloc));
8359 #endif
8360 			{VALUE v1,v2,v3,v4;v1=dispatch0(mlhs_new);v2=v1;v3=(yyvsp[0].val);v4=dispatch2(mlhs_add,v2,v3);(yyval.val)=v4;}
8361 		    }
8362 #line 8358 "ripper.c"
8363     break;
8364 
8365   case 378:
8366 #line 2894 "ripper.y"
8367                     {
8368 #if 0
8369 			(yyval.val) = list_append(p, (yyvsp[-2].val), (yyvsp[0].val));
8370 #endif
8371 			{VALUE v1,v2,v3;v1=(yyvsp[-2].val);v2=(yyvsp[0].val);v3=dispatch2(mlhs_add,v1,v2);(yyval.val)=v3;}
8372 		    }
8373 #line 8369 "ripper.c"
8374     break;
8375 
8376   case 379:
8377 #line 2903 "ripper.y"
8378                     {
8379 #if 0
8380 			(yyval.val) = NEW_MASGN((yyvsp[0].val), 0, &(yyloc));
8381 #endif
8382 			(yyval.val)=(yyvsp[0].val);
8383 		    }
8384 #line 8380 "ripper.c"
8385     break;
8386 
8387   case 380:
8388 #line 2910 "ripper.y"
8389                     {
8390 #if 0
8391 			(yyval.val) = NEW_MASGN((yyvsp[-3].val), assignable(p, (yyvsp[0].val), 0, &(yyloc)), &(yyloc));
8392 #endif
8393 			{VALUE v1,v2,v3;v1=(yyvsp[-3].val);v2=assignable(p, (yyvsp[0].val));v3=dispatch2(mlhs_add_star,v1,v2);(yyval.val)=v3;}
8394 		    }
8395 #line 8391 "ripper.c"
8396     break;
8397 
8398   case 381:
8399 #line 2917 "ripper.y"
8400                     {
8401 #if 0
8402 			(yyval.val) = NEW_MASGN((yyvsp[-5].val), NEW_POSTARG(assignable(p, (yyvsp[-2].val), 0, &(yyloc)), (yyvsp[0].val), &(yyloc)), &(yyloc));
8403 #endif
8404 			{VALUE v1,v2,v3,v4,v5,v6;v1=(yyvsp[-5].val);v2=assignable(p, (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;}
8405 		    }
8406 #line 8402 "ripper.c"
8407     break;
8408 
8409   case 382:
8410 #line 2924 "ripper.y"
8411                     {
8412 #if 0
8413 			(yyval.val) = NEW_MASGN((yyvsp[-2].val), NODE_SPECIAL_NO_NAME_REST, &(yyloc));
8414 #endif
8415 			{VALUE v1,v2,v3;v1=(yyvsp[-2].val);v2=Qnil;v3=dispatch2(mlhs_add_star,v1,v2);(yyval.val)=v3;}
8416 		    }
8417 #line 8413 "ripper.c"
8418     break;
8419 
8420   case 383:
8421 #line 2931 "ripper.y"
8422                     {
8423 #if 0
8424 			(yyval.val) = NEW_MASGN((yyvsp[-4].val), NEW_POSTARG(NODE_SPECIAL_NO_NAME_REST, (yyvsp[0].val), &(yyloc)), &(yyloc));
8425 #endif
8426 			{VALUE v1,v2,v3,v4,v5,v6;v1=(yyvsp[-4].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;}
8427 		    }
8428 #line 8424 "ripper.c"
8429     break;
8430 
8431   case 384:
8432 #line 2938 "ripper.y"
8433                     {
8434 #if 0
8435 			(yyval.val) = NEW_MASGN(0, assignable(p, (yyvsp[0].val), 0, &(yyloc)), &(yyloc));
8436 #endif
8437 			{VALUE v1,v2,v3,v4;v1=dispatch0(mlhs_new);v2=v1;v3=assignable(p, (yyvsp[0].val));v4=dispatch2(mlhs_add_star,v2,v3);(yyval.val)=v4;}
8438 		    }
8439 #line 8435 "ripper.c"
8440     break;
8441 
8442   case 385:
8443 #line 2945 "ripper.y"
8444                     {
8445 #if 0
8446 			(yyval.val) = NEW_MASGN(0, NEW_POSTARG(assignable(p, (yyvsp[-2].val), 0, &(yyloc)), (yyvsp[0].val), &(yyloc)), &(yyloc));
8447 #endif
8448 			{VALUE v1,v2,v3,v4,v5,v6,v7;v1=dispatch0(mlhs_new);v2=v1;v3=assignable(p, (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;}
8449 		    }
8450 #line 8446 "ripper.c"
8451     break;
8452 
8453   case 386:
8454 #line 2952 "ripper.y"
8455                     {
8456 #if 0
8457 			(yyval.val) = NEW_MASGN(0, NODE_SPECIAL_NO_NAME_REST, &(yyloc));
8458 #endif
8459 			{VALUE v1,v2,v3,v4;v1=dispatch0(mlhs_new);v2=v1;v3=Qnil;v4=dispatch2(mlhs_add_star,v2,v3);(yyval.val)=v4;}
8460 		    }
8461 #line 8457 "ripper.c"
8462     break;
8463 
8464   case 387:
8465 #line 2959 "ripper.y"
8466                     {
8467 #if 0
8468 			(yyval.val) = NEW_MASGN(0, NEW_POSTARG(NODE_SPECIAL_NO_NAME_REST, (yyvsp[0].val), &(yyloc)), &(yyloc));
8469 #endif
8470 			{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;}
8471 		    }
8472 #line 8468 "ripper.c"
8473     break;
8474 
8475   case 388:
8476 #line 2969 "ripper.y"
8477                     {
8478 			(yyval.val) = new_args_tail(p, (yyvsp[-3].val), (yyvsp[-1].val), (yyvsp[0].val), &(yylsp[-1]));
8479 		    }
8480 #line 8476 "ripper.c"
8481     break;
8482 
8483   case 389:
8484 #line 2973 "ripper.y"
8485                     {
8486 			(yyval.val) = new_args_tail(p, (yyvsp[-1].val), Qnone, (yyvsp[0].val), &(yylsp[-1]));
8487 		    }
8488 #line 8484 "ripper.c"
8489     break;
8490 
8491   case 390:
8492 #line 2977 "ripper.y"
8493                     {
8494 			(yyval.val) = new_args_tail(p, Qnone, (yyvsp[-1].val), (yyvsp[0].val), &(yylsp[-1]));
8495 		    }
8496 #line 8492 "ripper.c"
8497     break;
8498 
8499   case 391:
8500 #line 2981 "ripper.y"
8501                     {
8502 			(yyval.val) = new_args_tail(p, Qnone, Qnone, (yyvsp[0].val), &(yylsp[0]));
8503 		    }
8504 #line 8500 "ripper.c"
8505     break;
8506 
8507   case 392:
8508 #line 2987 "ripper.y"
8509                     {
8510 			(yyval.val) = (yyvsp[0].val);
8511 		    }
8512 #line 8508 "ripper.c"
8513     break;
8514 
8515   case 393:
8516 #line 2991 "ripper.y"
8517                     {
8518 			(yyval.val) = new_args_tail(p, Qnone, Qnone, Qnone, &(yylsp[0]));
8519 		    }
8520 #line 8516 "ripper.c"
8521     break;
8522 
8523   case 394:
8524 #line 2997 "ripper.y"
8525                     {
8526 			(yyval.val) = new_args(p, (yyvsp[-5].val), (yyvsp[-3].val), (yyvsp[-1].val), Qnone, (yyvsp[0].val), &(yyloc));
8527 		    }
8528 #line 8524 "ripper.c"
8529     break;
8530 
8531   case 395:
8532 #line 3001 "ripper.y"
8533                     {
8534 			(yyval.val) = new_args(p, (yyvsp[-7].val), (yyvsp[-5].val), (yyvsp[-3].val), (yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
8535 		    }
8536 #line 8532 "ripper.c"
8537     break;
8538 
8539   case 396:
8540 #line 3005 "ripper.y"
8541                     {
8542 			(yyval.val) = new_args(p, (yyvsp[-3].val), (yyvsp[-1].val), Qnone, Qnone, (yyvsp[0].val), &(yyloc));
8543 		    }
8544 #line 8540 "ripper.c"
8545     break;
8546 
8547   case 397:
8548 #line 3009 "ripper.y"
8549                     {
8550 			(yyval.val) = new_args(p, (yyvsp[-5].val), (yyvsp[-3].val), Qnone, (yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
8551 		    }
8552 #line 8548 "ripper.c"
8553     break;
8554 
8555   case 398:
8556 #line 3013 "ripper.y"
8557                     {
8558 			(yyval.val) = new_args(p, (yyvsp[-3].val), Qnone, (yyvsp[-1].val), Qnone, (yyvsp[0].val), &(yyloc));
8559 		    }
8560 #line 8556 "ripper.c"
8561     break;
8562 
8563   case 399:
8564 #line 3017 "ripper.y"
8565                     {
8566 #if 0
8567 			/* magic number for rest_id in iseq_set_arguments() */
8568 			const ID excessed_comma = 1;
8569 			(yyval.val) = new_args(p, (yyvsp[-1].val), Qnone, excessed_comma, Qnone, new_args_tail(p, Qnone, Qnone, Qnone, &(yylsp[-1])), &(yyloc));
8570 #endif
8571 			{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);}
8572 		    }
8573 #line 8569 "ripper.c"
8574     break;
8575 
8576   case 400:
8577 #line 3026 "ripper.y"
8578                     {
8579 			(yyval.val) = new_args(p, (yyvsp[-5].val), Qnone, (yyvsp[-3].val), (yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
8580 		    }
8581 #line 8577 "ripper.c"
8582     break;
8583 
8584   case 401:
8585 #line 3030 "ripper.y"
8586                     {
8587 			(yyval.val) = new_args(p, (yyvsp[-1].val), Qnone, Qnone, Qnone, (yyvsp[0].val), &(yyloc));
8588 		    }
8589 #line 8585 "ripper.c"
8590     break;
8591 
8592   case 402:
8593 #line 3034 "ripper.y"
8594                     {
8595 			(yyval.val) = new_args(p, Qnone, (yyvsp[-3].val), (yyvsp[-1].val), Qnone, (yyvsp[0].val), &(yyloc));
8596 		    }
8597 #line 8593 "ripper.c"
8598     break;
8599 
8600   case 403:
8601 #line 3038 "ripper.y"
8602                     {
8603 			(yyval.val) = new_args(p, Qnone, (yyvsp[-5].val), (yyvsp[-3].val), (yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
8604 		    }
8605 #line 8601 "ripper.c"
8606     break;
8607 
8608   case 404:
8609 #line 3042 "ripper.y"
8610                     {
8611 			(yyval.val) = new_args(p, Qnone, (yyvsp[-1].val), Qnone, Qnone, (yyvsp[0].val), &(yyloc));
8612 		    }
8613 #line 8609 "ripper.c"
8614     break;
8615 
8616   case 405:
8617 #line 3046 "ripper.y"
8618                     {
8619 			(yyval.val) = new_args(p, Qnone, (yyvsp[-3].val), Qnone, (yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
8620 		    }
8621 #line 8617 "ripper.c"
8622     break;
8623 
8624   case 406:
8625 #line 3050 "ripper.y"
8626                     {
8627 			(yyval.val) = new_args(p, Qnone, Qnone, (yyvsp[-1].val), Qnone, (yyvsp[0].val), &(yyloc));
8628 		    }
8629 #line 8625 "ripper.c"
8630     break;
8631 
8632   case 407:
8633 #line 3054 "ripper.y"
8634                     {
8635 			(yyval.val) = new_args(p, Qnone, Qnone, (yyvsp[-3].val), (yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
8636 		    }
8637 #line 8633 "ripper.c"
8638     break;
8639 
8640   case 408:
8641 #line 3058 "ripper.y"
8642                     {
8643 			(yyval.val) = new_args(p, Qnone, Qnone, Qnone, Qnone, (yyvsp[0].val), &(yyloc));
8644 		    }
8645 #line 8641 "ripper.c"
8646     break;
8647 
8648   case 410:
8649 #line 3065 "ripper.y"
8650                     {
8651 			p->command_start = TRUE;
8652 		    }
8653 #line 8649 "ripper.c"
8654     break;
8655 
8656   case 411:
8657 #line 3071 "ripper.y"
8658                     {
8659 			p->cur_arg = 0;
8660 #if 0
8661 			(yyval.val) = 0;
8662 #endif
8663 			{VALUE v1,v2,v3;v1=params_new(Qnil, Qnil, Qnil, Qnil, Qnil, Qnil, Qnil);v2=escape_Qundef((yyvsp[-1].val));v3=dispatch2(block_var,v1,v2);(yyval.val)=v3;}
8664 		    }
8665 #line 8661 "ripper.c"
8666     break;
8667 
8668   case 412:
8669 #line 3079 "ripper.y"
8670                     {
8671 #if 0
8672 			(yyval.val) = 0;
8673 #endif
8674 			{VALUE v1,v2,v3;v1=params_new(Qnil, Qnil, Qnil, Qnil, Qnil, Qnil, Qnil);v2=Qnil;v3=dispatch2(block_var,v1,v2);(yyval.val)=v3;}
8675 		    }
8676 #line 8672 "ripper.c"
8677     break;
8678 
8679   case 413:
8680 #line 3086 "ripper.y"
8681                     {
8682 			p->cur_arg = 0;
8683 #if 0
8684 			(yyval.val) = (yyvsp[-2].val);
8685 #endif
8686 			{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;}
8687 		    }
8688 #line 8684 "ripper.c"
8689     break;
8690 
8691   case 414:
8692 #line 3097 "ripper.y"
8693                     {
8694 		      (yyval.val) = 0;
8695 		    }
8696 #line 8692 "ripper.c"
8697     break;
8698 
8699   case 415:
8700 #line 3101 "ripper.y"
8701                     {
8702 #if 0
8703 			(yyval.val) = 0;
8704 #endif
8705 			(yyval.val)=(yyvsp[-1].val);
8706 		    }
8707 #line 8703 "ripper.c"
8708     break;
8709 
8710   case 416:
8711 #line 3110 "ripper.y"
8712                         {(yyval.val)=rb_ary_new3(1, get_value((yyvsp[0].val)));}
8713 #line 8709 "ripper.c"
8714     break;
8715 
8716   case 417:
8717 #line 3112 "ripper.y"
8718                         {(yyval.val)=rb_ary_push((yyvsp[-2].val), get_value((yyvsp[0].val)));}
8719 #line 8715 "ripper.c"
8720     break;
8721 
8722   case 418:
8723 #line 3116 "ripper.y"
8724                     {
8725 			new_bv(p, get_id((yyvsp[0].val)));
8726 			(yyval.val)=get_value((yyvsp[0].val));
8727 		    }
8728 #line 8724 "ripper.c"
8729     break;
8730 
8731   case 419:
8732 #line 3121 "ripper.y"
8733                     {
8734 			(yyval.val) = 0;
8735 		    }
8736 #line 8732 "ripper.c"
8737     break;
8738 
8739   case 420:
8740 #line 3126 "ripper.y"
8741                     {
8742 			(yyval.vars) = dyna_push(p);
8743 		    }
8744 #line 8740 "ripper.c"
8745     break;
8746 
8747   case 421:
8748 #line 3129 "ripper.y"
8749                     {
8750 			(yyval.num) = p->lex.lpar_beg;
8751 			p->lex.lpar_beg = p->lex.paren_nest;
8752 		    }
8753 #line 8749 "ripper.c"
8754     break;
8755 
8756   case 422:
8757 #line 3134 "ripper.y"
8758                     {
8759 			CMDARG_PUSH(0);
8760 		    }
8761 #line 8757 "ripper.c"
8762     break;
8763 
8764   case 423:
8765 #line 3138 "ripper.y"
8766                     {
8767 			p->lex.lpar_beg = (yyvsp[-3].num);
8768 			CMDARG_POP();
8769 #if 0
8770                         {
8771                             YYLTYPE loc = code_loc_gen(&(yylsp[-2]), &(yylsp[0]));
8772                             (yyval.val) = NEW_LAMBDA((yyvsp[-2].val), (yyvsp[0].val), &loc);
8773                             nd_set_line((yyval.val)->nd_body, (yylsp[0]).end_pos.lineno);
8774                             nd_set_line((yyval.val), (yylsp[-2]).end_pos.lineno);
8775                         }
8776 #endif
8777 			{VALUE v1,v2,v3;v1=(yyvsp[-2].val);v2=(yyvsp[0].val);v3=dispatch2(lambda,v1,v2);(yyval.val)=v3;}
8778 			dyna_pop(p, (yyvsp[-4].vars));
8779 		    }
8780 #line 8776 "ripper.c"
8781     break;
8782 
8783   case 424:
8784 #line 3155 "ripper.y"
8785                     {
8786 #if 0
8787 			(yyval.val) = (yyvsp[-2].val);
8788 #endif
8789 			{VALUE v1,v2;v1=(yyvsp[-2].val);v2=dispatch1(paren,v1);(yyval.val)=v2;}
8790 		    }
8791 #line 8787 "ripper.c"
8792     break;
8793 
8794   case 425:
8795 #line 3162 "ripper.y"
8796                     {
8797 			(yyval.val) = (yyvsp[0].val);
8798 		    }
8799 #line 8795 "ripper.c"
8800     break;
8801 
8802   case 426:
8803 #line 3168 "ripper.y"
8804                     {
8805 			token_info_pop(p, "}", &(yylsp[0]));
8806 			(yyval.val) = (yyvsp[-1].val);
8807 		    }
8808 #line 8804 "ripper.c"
8809     break;
8810 
8811   case 427:
8812 #line 3173 "ripper.y"
8813                     {
8814 			(yyval.val) = (yyvsp[-1].val);
8815 		    }
8816 #line 8812 "ripper.c"
8817     break;
8818 
8819   case 428:
8820 #line 3179 "ripper.y"
8821                     {
8822 			(yyval.val) = (yyvsp[-1].val);
8823 #if 0
8824 			(yyval.val)->nd_body->nd_loc = code_loc_gen(&(yylsp[-2]), &(yylsp[0]));
8825 			nd_set_line((yyval.val), (yylsp[-2]).end_pos.lineno);
8826 #endif
8827 		    }
8828 #line 8824 "ripper.c"
8829     break;
8830 
8831   case 429:
8832 #line 3189 "ripper.y"
8833                     {
8834 #if 0
8835 			if (nd_type((yyvsp[-1].val)) == NODE_YIELD) {
8836 			    compile_error(p, "block given to yield");
8837 			}
8838 			else {
8839 			    block_dup_check(p, (yyvsp[-1].val)->nd_args, (yyvsp[0].val));
8840 			}
8841 			(yyval.val) = method_add_block(p, (yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
8842 			fixpos((yyval.val), (yyvsp[-1].val));
8843 #endif
8844 			{VALUE v1,v2,v3;v1=(yyvsp[-1].val);v2=(yyvsp[0].val);v3=dispatch2(method_add_block,v1,v2);(yyval.val)=v3;}
8845 		    }
8846 #line 8842 "ripper.c"
8847     break;
8848 
8849   case 430:
8850 #line 3203 "ripper.y"
8851                     {
8852 #if 0
8853 			(yyval.val) = new_qcall(p, (yyvsp[-2].val), (yyvsp[-3].val), (yyvsp[-1].val), (yyvsp[0].val), &(yylsp[-1]), &(yyloc));
8854 #endif
8855 			{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;}
8856 		    }
8857 #line 8853 "ripper.c"
8858     break;
8859 
8860   case 431:
8861 #line 3210 "ripper.y"
8862                     {
8863 #if 0
8864 			(yyval.val) = new_command_qcall(p, (yyvsp[-3].val), (yyvsp[-4].val), (yyvsp[-2].val), (yyvsp[-1].val), (yyvsp[0].val), &(yylsp[-2]), &(yyloc));
8865 #endif
8866 			{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;}
8867 		    }
8868 #line 8864 "ripper.c"
8869     break;
8870 
8871   case 432:
8872 #line 3217 "ripper.y"
8873                     {
8874 #if 0
8875 			(yyval.val) = new_command_qcall(p, (yyvsp[-3].val), (yyvsp[-4].val), (yyvsp[-2].val), (yyvsp[-1].val), (yyvsp[0].val), &(yylsp[-2]), &(yyloc));
8876 #endif
8877 			{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;}
8878 		    }
8879 #line 8875 "ripper.c"
8880     break;
8881 
8882   case 433:
8883 #line 3226 "ripper.y"
8884                     {
8885 #if 0
8886 			(yyval.val) = (yyvsp[-1].val);
8887 			(yyval.val)->nd_args = (yyvsp[0].val);
8888 			nd_set_last_loc((yyvsp[-1].val), (yylsp[0]).end_pos);
8889 #endif
8890 			{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;}
8891 		    }
8892 #line 8888 "ripper.c"
8893     break;
8894 
8895   case 434:
8896 #line 3235 "ripper.y"
8897                     {
8898 #if 0
8899 			(yyval.val) = new_qcall(p, (yyvsp[-2].val), (yyvsp[-3].val), (yyvsp[-1].val), (yyvsp[0].val), &(yylsp[-1]), &(yyloc));
8900 			nd_set_line((yyval.val), (yylsp[-1]).end_pos.lineno);
8901 #endif
8902 			{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;}
8903 		    }
8904 #line 8900 "ripper.c"
8905     break;
8906 
8907   case 435:
8908 #line 3243 "ripper.y"
8909                     {
8910 #if 0
8911 			(yyval.val) = new_qcall(p, ID2VAL(idCOLON2), (yyvsp[-3].val), (yyvsp[-1].val), (yyvsp[0].val), &(yylsp[-1]), &(yyloc));
8912 			nd_set_line((yyval.val), (yylsp[-1]).end_pos.lineno);
8913 #endif
8914 			{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;}
8915 		    }
8916 #line 8912 "ripper.c"
8917     break;
8918 
8919   case 436:
8920 #line 3251 "ripper.y"
8921                     {
8922 #if 0
8923 			(yyval.val) = new_qcall(p, ID2VAL(idCOLON2), (yyvsp[-2].val), (yyvsp[0].val), Qnull, &(yylsp[0]), &(yyloc));
8924 #endif
8925 			{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;}
8926 		    }
8927 #line 8923 "ripper.c"
8928     break;
8929 
8930   case 437:
8931 #line 3258 "ripper.y"
8932                     {
8933 #if 0
8934 			(yyval.val) = new_qcall(p, (yyvsp[-1].val), (yyvsp[-2].val), ID2VAL(idCall), (yyvsp[0].val), &(yylsp[-1]), &(yyloc));
8935 			nd_set_line((yyval.val), (yylsp[-1]).end_pos.lineno);
8936 #endif
8937 			{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;}
8938 		    }
8939 #line 8935 "ripper.c"
8940     break;
8941 
8942   case 438:
8943 #line 3266 "ripper.y"
8944                     {
8945 #if 0
8946 			(yyval.val) = new_qcall(p, ID2VAL(idCOLON2), (yyvsp[-2].val), ID2VAL(idCall), (yyvsp[0].val), &(yylsp[-1]), &(yyloc));
8947 			nd_set_line((yyval.val), (yylsp[-1]).end_pos.lineno);
8948 #endif
8949 			{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;}
8950 		    }
8951 #line 8947 "ripper.c"
8952     break;
8953 
8954   case 439:
8955 #line 3274 "ripper.y"
8956                     {
8957 #if 0
8958 			(yyval.val) = NEW_SUPER((yyvsp[0].val), &(yyloc));
8959 #endif
8960 			{VALUE v1,v2;v1=(yyvsp[0].val);v2=dispatch1(super,v1);(yyval.val)=v2;}
8961 		    }
8962 #line 8958 "ripper.c"
8963     break;
8964 
8965   case 440:
8966 #line 3281 "ripper.y"
8967                     {
8968 #if 0
8969 			(yyval.val) = NEW_ZSUPER(&(yyloc));
8970 #endif
8971 			{VALUE v1;v1=dispatch0(zsuper);(yyval.val)=v1;}
8972 		    }
8973 #line 8969 "ripper.c"
8974     break;
8975 
8976   case 441:
8977 #line 3288 "ripper.y"
8978                     {
8979 #if 0
8980 			if ((yyvsp[-3].val) && nd_type((yyvsp[-3].val)) == NODE_SELF)
8981 			    (yyval.val) = NEW_FCALL(tAREF, (yyvsp[-1].val), &(yyloc));
8982 			else
8983 			    (yyval.val) = NEW_CALL((yyvsp[-3].val), tAREF, (yyvsp[-1].val), &(yyloc));
8984 			fixpos((yyval.val), (yyvsp[-3].val));
8985 #endif
8986 			{VALUE v1,v2,v3;v1=(yyvsp[-3].val);v2=escape_Qundef((yyvsp[-1].val));v3=dispatch2(aref,v1,v2);(yyval.val)=v3;}
8987 		    }
8988 #line 8984 "ripper.c"
8989     break;
8990 
8991   case 442:
8992 #line 3301 "ripper.y"
8993                     {
8994 			(yyval.val) = (yyvsp[-1].val);
8995 #if 0
8996 			(yyval.val)->nd_body->nd_loc = code_loc_gen(&(yylsp[-2]), &(yylsp[0]));
8997 			nd_set_line((yyval.val), (yylsp[-2]).end_pos.lineno);
8998 #endif
8999 		    }
9000 #line 8996 "ripper.c"
9001     break;
9002 
9003   case 443:
9004 #line 3309 "ripper.y"
9005                     {
9006 			(yyval.val) = (yyvsp[-1].val);
9007 #if 0
9008 			(yyval.val)->nd_body->nd_loc = code_loc_gen(&(yylsp[-2]), &(yylsp[0]));
9009 			nd_set_line((yyval.val), (yylsp[-2]).end_pos.lineno);
9010 #endif
9011 		    }
9012 #line 9008 "ripper.c"
9013     break;
9014 
9015   case 444:
9016 #line 3318 "ripper.y"
9017                   {(yyval.vars) = dyna_push(p);}
9018 #line 9014 "ripper.c"
9019     break;
9020 
9021   case 445:
9022 #line 3320 "ripper.y"
9023                     {
9024 #if 0
9025 			(yyval.val) = NEW_ITER((yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
9026 #endif
9027 			{VALUE v1,v2,v3;v1=escape_Qundef((yyvsp[-1].val));v2=(yyvsp[0].val);v3=dispatch2(brace_block,v1,v2);(yyval.val)=v3;}
9028 			dyna_pop(p, (yyvsp[-2].vars));
9029 		    }
9030 #line 9026 "ripper.c"
9031     break;
9032 
9033   case 446:
9034 #line 3329 "ripper.y"
9035                   {(yyval.vars) = dyna_push(p);}
9036 #line 9032 "ripper.c"
9037     break;
9038 
9039   case 447:
9040 #line 3330 "ripper.y"
9041                   {CMDARG_PUSH(0);}
9042 #line 9038 "ripper.c"
9043     break;
9044 
9045   case 448:
9046 #line 3332 "ripper.y"
9047                     {
9048 #if 0
9049 			(yyval.val) = NEW_ITER((yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
9050 #endif
9051 			{VALUE v1,v2,v3;v1=escape_Qundef((yyvsp[-1].val));v2=(yyvsp[0].val);v3=dispatch2(do_block,v1,v2);(yyval.val)=v3;}
9052 			CMDARG_POP();
9053 			dyna_pop(p, (yyvsp[-3].vars));
9054 		    }
9055 #line 9051 "ripper.c"
9056     break;
9057 
9058   case 449:
9059 #line 3345 "ripper.y"
9060                     {
9061 #if 0
9062 			(yyval.val) = NEW_WHEN((yyvsp[-3].val), (yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
9063 			fixpos((yyval.val), (yyvsp[-3].val));
9064 #endif
9065 			{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;}
9066 		    }
9067 #line 9063 "ripper.c"
9068     break;
9069 
9070   case 452:
9071 #line 3361 "ripper.y"
9072                     {
9073 #if 0
9074 			(yyval.val) = NEW_RESBODY((yyvsp[-4].val),
9075 					 (yyvsp[-3].val) ? block_append(p, node_assign(p, (yyvsp[-3].val), NEW_ERRINFO(&(yylsp[-3])), &(yylsp[-3])), (yyvsp[-1].val)) : (yyvsp[-1].val),
9076 					 (yyvsp[0].val), &(yyloc));
9077 			fixpos((yyval.val), (yyvsp[-4].val)?(yyvsp[-4].val):(yyvsp[-1].val));
9078 #endif
9079 			{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;}
9080 		    }
9081 #line 9077 "ripper.c"
9082     break;
9083 
9084   case 454:
9085 #line 3374 "ripper.y"
9086                     {
9087 #if 0
9088 			(yyval.val) = NEW_LIST((yyvsp[0].val), &(yyloc));
9089 #endif
9090 			(yyval.val)=rb_ary_new3(1, get_value((yyvsp[0].val)));
9091 		    }
9092 #line 9088 "ripper.c"
9093     break;
9094 
9095   case 455:
9096 #line 3381 "ripper.y"
9097                     {
9098 #if 0
9099 			if (!((yyval.val) = splat_array((yyvsp[0].val)))) (yyval.val) = (yyvsp[0].val);
9100 #endif
9101 			(yyval.val)=(yyvsp[0].val);
9102 		    }
9103 #line 9099 "ripper.c"
9104     break;
9105 
9106   case 457:
9107 #line 3391 "ripper.y"
9108                     {
9109 			(yyval.val) = (yyvsp[0].val);
9110 		    }
9111 #line 9107 "ripper.c"
9112     break;
9113 
9114   case 459:
9115 #line 3398 "ripper.y"
9116                     {
9117 #if 0
9118 			(yyval.val) = (yyvsp[0].val);
9119 #endif
9120 			{VALUE v1,v2;v1=(yyvsp[0].val);v2=dispatch1(ensure,v1);(yyval.val)=v2;}
9121 		    }
9122 #line 9118 "ripper.c"
9123     break;
9124 
9125   case 462:
9126 #line 3409 "ripper.y"
9127                     {
9128 #if 0
9129 			(yyval.val) = NEW_LIT(ID2SYM((yyvsp[0].val)), &(yyloc));
9130 #endif
9131 			{VALUE v1,v2;v1=(yyvsp[0].val);v2=dispatch1(symbol_literal,v1);(yyval.val)=v2;}
9132 		    }
9133 #line 9129 "ripper.c"
9134     break;
9135 
9136   case 464:
9137 #line 3419 "ripper.y"
9138                     {
9139 #if 0
9140 			NODE *node = (yyvsp[0].val);
9141 			if (!node) {
9142 			    node = NEW_STR(add_mark_object(p, STR_NEW0()), &(yyloc));
9143 			}
9144 			else {
9145 			    node = evstr2dstr(p, node);
9146 			}
9147 			(yyval.val) = node;
9148 #endif
9149 			(yyval.val)=(yyvsp[0].val);
9150 		    }
9151 #line 9147 "ripper.c"
9152     break;
9153 
9154   case 467:
9155 #line 3437 "ripper.y"
9156                     {
9157 #if 0
9158 			(yyval.val) = literal_concat(p, (yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
9159 #endif
9160 			{VALUE v1,v2,v3;v1=(yyvsp[-1].val);v2=(yyvsp[0].val);v3=dispatch2(string_concat,v1,v2);(yyval.val)=v3;}
9161 		    }
9162 #line 9158 "ripper.c"
9163     break;
9164 
9165   case 468:
9166 #line 3446 "ripper.y"
9167                     {
9168 #if 0
9169 			(yyval.val) = heredoc_dedent(p, (yyvsp[-1].val));
9170 			if ((yyval.val)) nd_set_loc((yyval.val), &(yyloc));
9171 #endif
9172 			{VALUE v1,v2;v1=heredoc_dedent(p, (yyvsp[-1].val));v2=dispatch1(string_literal,v1);(yyval.val)=v2;}
9173 		    }
9174 #line 9170 "ripper.c"
9175     break;
9176 
9177   case 469:
9178 #line 3456 "ripper.y"
9179                     {
9180 #if 0
9181 			(yyval.val) = new_xstring(p, heredoc_dedent(p, (yyvsp[-1].val)), &(yyloc));
9182 #endif
9183 			{VALUE v1,v2;v1=heredoc_dedent(p, (yyvsp[-1].val));v2=dispatch1(xstring_literal,v1);(yyval.val)=v2;}
9184 		    }
9185 #line 9181 "ripper.c"
9186     break;
9187 
9188   case 470:
9189 #line 3465 "ripper.y"
9190                     {
9191 			(yyval.val) = new_regexp(p, (yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
9192 		    }
9193 #line 9189 "ripper.c"
9194     break;
9195 
9196   case 471:
9197 #line 3471 "ripper.y"
9198                     {
9199 #if 0
9200 			(yyval.val) = make_array((yyvsp[-1].val), &(yyloc));
9201 #endif
9202 			{VALUE v1,v2;v1=(yyvsp[-1].val);v2=dispatch1(array,v1);(yyval.val)=v2;}
9203 		    }
9204 #line 9200 "ripper.c"
9205     break;
9206 
9207   case 472:
9208 #line 3480 "ripper.y"
9209                     {
9210 #if 0
9211 			(yyval.val) = 0;
9212 #endif
9213 			{VALUE v1;v1=dispatch0(words_new);(yyval.val)=v1;}
9214 		    }
9215 #line 9211 "ripper.c"
9216     break;
9217 
9218   case 473:
9219 #line 3487 "ripper.y"
9220                     {
9221 #if 0
9222 			(yyval.val) = list_append(p, (yyvsp[-2].val), evstr2dstr(p, (yyvsp[-1].val)));
9223 #endif
9224 			{VALUE v1,v2,v3;v1=(yyvsp[-2].val);v2=(yyvsp[-1].val);v3=dispatch2(words_add,v1,v2);(yyval.val)=v3;}
9225 		    }
9226 #line 9222 "ripper.c"
9227     break;
9228 
9229   case 474:
9230 #line 3496 "ripper.y"
9231                         {{VALUE v1,v2,v3,v4;v1=dispatch0(word_new);v2=v1;v3=(yyvsp[0].val);v4=dispatch2(word_add,v2,v3);(yyval.val)=v4;}}
9232 #line 9228 "ripper.c"
9233     break;
9234 
9235   case 475:
9236 #line 3498 "ripper.y"
9237                     {
9238 #if 0
9239 			(yyval.val) = literal_concat(p, (yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
9240 #endif
9241 			{VALUE v1,v2,v3;v1=(yyvsp[-1].val);v2=(yyvsp[0].val);v3=dispatch2(word_add,v1,v2);(yyval.val)=v3;}
9242 		    }
9243 #line 9239 "ripper.c"
9244     break;
9245 
9246   case 476:
9247 #line 3507 "ripper.y"
9248                     {
9249 #if 0
9250 			(yyval.val) = make_array((yyvsp[-1].val), &(yyloc));
9251 #endif
9252 			{VALUE v1,v2;v1=(yyvsp[-1].val);v2=dispatch1(array,v1);(yyval.val)=v2;}
9253 		    }
9254 #line 9250 "ripper.c"
9255     break;
9256 
9257   case 477:
9258 #line 3516 "ripper.y"
9259                     {
9260 #if 0
9261 			(yyval.val) = 0;
9262 #endif
9263 			{VALUE v1;v1=dispatch0(symbols_new);(yyval.val)=v1;}
9264 		    }
9265 #line 9261 "ripper.c"
9266     break;
9267 
9268   case 478:
9269 #line 3523 "ripper.y"
9270                     {
9271 #if 0
9272 			(yyval.val) = symbol_append(p, (yyvsp[-2].val), evstr2dstr(p, (yyvsp[-1].val)));
9273 #endif
9274 			{VALUE v1,v2,v3;v1=(yyvsp[-2].val);v2=(yyvsp[-1].val);v3=dispatch2(symbols_add,v1,v2);(yyval.val)=v3;}
9275 		    }
9276 #line 9272 "ripper.c"
9277     break;
9278 
9279   case 479:
9280 #line 3532 "ripper.y"
9281                     {
9282 #if 0
9283 			(yyval.val) = make_array((yyvsp[-1].val), &(yyloc));
9284 #endif
9285 			{VALUE v1,v2;v1=(yyvsp[-1].val);v2=dispatch1(array,v1);(yyval.val)=v2;}
9286 		    }
9287 #line 9283 "ripper.c"
9288     break;
9289 
9290   case 480:
9291 #line 3541 "ripper.y"
9292                     {
9293 #if 0
9294 			(yyval.val) = make_array((yyvsp[-1].val), &(yyloc));
9295 #endif
9296 			{VALUE v1,v2;v1=(yyvsp[-1].val);v2=dispatch1(array,v1);(yyval.val)=v2;}
9297 		    }
9298 #line 9294 "ripper.c"
9299     break;
9300 
9301   case 481:
9302 #line 3550 "ripper.y"
9303                     {
9304 #if 0
9305 			(yyval.val) = 0;
9306 #endif
9307 			{VALUE v1;v1=dispatch0(qwords_new);(yyval.val)=v1;}
9308 		    }
9309 #line 9305 "ripper.c"
9310     break;
9311 
9312   case 482:
9313 #line 3557 "ripper.y"
9314                     {
9315 #if 0
9316 			(yyval.val) = list_append(p, (yyvsp[-2].val), (yyvsp[-1].val));
9317 #endif
9318 			{VALUE v1,v2,v3;v1=(yyvsp[-2].val);v2=(yyvsp[-1].val);v3=dispatch2(qwords_add,v1,v2);(yyval.val)=v3;}
9319 		    }
9320 #line 9316 "ripper.c"
9321     break;
9322 
9323   case 483:
9324 #line 3566 "ripper.y"
9325                     {
9326 #if 0
9327 			(yyval.val) = 0;
9328 #endif
9329 			{VALUE v1;v1=dispatch0(qsymbols_new);(yyval.val)=v1;}
9330 		    }
9331 #line 9327 "ripper.c"
9332     break;
9333 
9334   case 484:
9335 #line 3573 "ripper.y"
9336                     {
9337 #if 0
9338 			(yyval.val) = symbol_append(p, (yyvsp[-2].val), (yyvsp[-1].val));
9339 #endif
9340 			{VALUE v1,v2,v3;v1=(yyvsp[-2].val);v2=(yyvsp[-1].val);v3=dispatch2(qsymbols_add,v1,v2);(yyval.val)=v3;}
9341 		    }
9342 #line 9338 "ripper.c"
9343     break;
9344 
9345   case 485:
9346 #line 3582 "ripper.y"
9347                     {
9348 #if 0
9349 			(yyval.val) = 0;
9350 #endif
9351 			{VALUE v1;v1=dispatch0(string_content);(yyval.val)=v1;}
9352 		    }
9353 #line 9349 "ripper.c"
9354     break;
9355 
9356   case 486:
9357 #line 3589 "ripper.y"
9358                     {
9359 #if 0
9360 			(yyval.val) = literal_concat(p, (yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
9361 #endif
9362 			{VALUE v1,v2,v3;v1=(yyvsp[-1].val);v2=(yyvsp[0].val);v3=dispatch2(string_add,v1,v2);(yyval.val)=v3;}
9363 		    }
9364 #line 9360 "ripper.c"
9365     break;
9366 
9367   case 487:
9368 #line 3598 "ripper.y"
9369                     {
9370 #if 0
9371 			(yyval.val) = 0;
9372 #endif
9373 			{VALUE v1;v1=dispatch0(xstring_new);(yyval.val)=v1;}
9374 		    }
9375 #line 9371 "ripper.c"
9376     break;
9377 
9378   case 488:
9379 #line 3605 "ripper.y"
9380                     {
9381 #if 0
9382 			(yyval.val) = literal_concat(p, (yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
9383 #endif
9384 			{VALUE v1,v2,v3;v1=(yyvsp[-1].val);v2=(yyvsp[0].val);v3=dispatch2(xstring_add,v1,v2);(yyval.val)=v3;}
9385 		    }
9386 #line 9382 "ripper.c"
9387     break;
9388 
9389   case 489:
9390 #line 3614 "ripper.y"
9391                     {
9392 #if 0
9393 			(yyval.val) = 0;
9394 #endif
9395 			{VALUE v1;v1=dispatch0(regexp_new);(yyval.val)=v1;}
9396 #if 0
9397 #endif
9398 			(yyval.val) = ripper_new_yylval(p, 0, (yyval.val), 0);
9399 
9400 		    }
9401 #line 9397 "ripper.c"
9402     break;
9403 
9404   case 490:
9405 #line 3625 "ripper.y"
9406                     {
9407 #if 0
9408 			NODE *head = (yyvsp[-1].val), *tail = (yyvsp[0].val);
9409 			if (!head) {
9410 			    (yyval.val) = tail;
9411 			}
9412 			else if (!tail) {
9413 			    (yyval.val) = head;
9414 			}
9415 			else {
9416 			    switch (nd_type(head)) {
9417 			      case NODE_STR:
9418 				nd_set_type(head, NODE_DSTR);
9419 				break;
9420 			      case NODE_DSTR:
9421 				break;
9422 			      default:
9423 				head = list_append(p, NEW_DSTR(Qnil, &(yyloc)), head);
9424 				break;
9425 			    }
9426 			    (yyval.val) = list_append(p, head, tail);
9427 			}
9428 #endif
9429 			VALUE s1 = 1, s2 = 0, n1 = (yyvsp[-1].val), n2 = (yyvsp[0].val);
9430 			if (ripper_is_node_yylval(n1)) {
9431 			    s1 = RNODE(n1)->nd_cval;
9432 			    n1 = RNODE(n1)->nd_rval;
9433 			}
9434 			if (ripper_is_node_yylval(n2)) {
9435 			    s2 = RNODE(n2)->nd_cval;
9436 			    n2 = RNODE(n2)->nd_rval;
9437 			}
9438 			(yyval.val) = dispatch2(regexp_add, n1, n2);
9439 			if (!s1 && s2) {
9440 			    (yyval.val) = ripper_new_yylval(p, 0, (yyval.val), s2);
9441 			}
9442 
9443 		    }
9444 #line 9440 "ripper.c"
9445     break;
9446 
9447   case 492:
9448 #line 3667 "ripper.y"
9449                     {
9450 			/* need to backup p->lex.strterm so that a string literal `%&foo,#$&,bar&` can be parsed */
9451 			(yyval.strterm) = p->lex.strterm;
9452 			p->lex.strterm = 0;
9453 			SET_LEX_STATE(EXPR_BEG);
9454 		    }
9455 #line 9451 "ripper.c"
9456     break;
9457 
9458   case 493:
9459 #line 3674 "ripper.y"
9460                     {
9461 			p->lex.strterm = (yyvsp[-1].strterm);
9462 #if 0
9463 			(yyval.val) = NEW_EVSTR((yyvsp[0].val), &(yyloc));
9464 			nd_set_line((yyval.val), (yylsp[0]).end_pos.lineno);
9465 #endif
9466 			{VALUE v1,v2;v1=(yyvsp[0].val);v2=dispatch1(string_dvar,v1);(yyval.val)=v2;}
9467 		    }
9468 #line 9464 "ripper.c"
9469     break;
9470 
9471   case 494:
9472 #line 3683 "ripper.y"
9473                     {
9474 			CMDARG_PUSH(0);
9475 			COND_PUSH(0);
9476 		    }
9477 #line 9473 "ripper.c"
9478     break;
9479 
9480   case 495:
9481 #line 3687 "ripper.y"
9482                     {
9483 			/* need to backup p->lex.strterm so that a string literal `%!foo,#{ !0 },bar!` can be parsed */
9484 			(yyval.strterm) = p->lex.strterm;
9485 			p->lex.strterm = 0;
9486 		    }
9487 #line 9483 "ripper.c"
9488     break;
9489 
9490   case 496:
9491 #line 3692 "ripper.y"
9492                     {
9493 			(yyval.num) = p->lex.state;
9494 			SET_LEX_STATE(EXPR_BEG);
9495 		    }
9496 #line 9492 "ripper.c"
9497     break;
9498 
9499   case 497:
9500 #line 3696 "ripper.y"
9501                     {
9502 			(yyval.num) = p->lex.brace_nest;
9503 			p->lex.brace_nest = 0;
9504 		    }
9505 #line 9501 "ripper.c"
9506     break;
9507 
9508   case 498:
9509 #line 3700 "ripper.y"
9510                     {
9511 			(yyval.num) = p->heredoc_indent;
9512 			p->heredoc_indent = 0;
9513 		    }
9514 #line 9510 "ripper.c"
9515     break;
9516 
9517   case 499:
9518 #line 3705 "ripper.y"
9519                     {
9520 			COND_POP();
9521 			CMDARG_POP();
9522 			p->lex.strterm = (yyvsp[-5].strterm);
9523 			SET_LEX_STATE((yyvsp[-4].num));
9524 			p->lex.brace_nest = (yyvsp[-3].num);
9525 			p->heredoc_indent = (yyvsp[-2].num);
9526 			p->heredoc_line_indent = -1;
9527 #if 0
9528 			if ((yyvsp[-1].val)) (yyvsp[-1].val)->flags &= ~NODE_FL_NEWLINE;
9529 			(yyval.val) = new_evstr(p, (yyvsp[-1].val), &(yyloc));
9530 #endif
9531 			{VALUE v1,v2;v1=(yyvsp[-1].val);v2=dispatch1(string_embexpr,v1);(yyval.val)=v2;}
9532 		    }
9533 #line 9529 "ripper.c"
9534     break;
9535 
9536   case 500:
9537 #line 3722 "ripper.y"
9538                     {
9539 #if 0
9540 			(yyval.val) = NEW_GVAR((yyvsp[0].val), &(yyloc));
9541 #endif
9542 			{VALUE v1,v2;v1=(yyvsp[0].val);v2=dispatch1(var_ref,v1);(yyval.val)=v2;}
9543 		    }
9544 #line 9540 "ripper.c"
9545     break;
9546 
9547   case 501:
9548 #line 3729 "ripper.y"
9549                     {
9550 #if 0
9551 			(yyval.val) = NEW_IVAR((yyvsp[0].val), &(yyloc));
9552 #endif
9553 			{VALUE v1,v2;v1=(yyvsp[0].val);v2=dispatch1(var_ref,v1);(yyval.val)=v2;}
9554 		    }
9555 #line 9551 "ripper.c"
9556     break;
9557 
9558   case 502:
9559 #line 3736 "ripper.y"
9560                     {
9561 #if 0
9562 			(yyval.val) = NEW_CVAR((yyvsp[0].val), &(yyloc));
9563 #endif
9564 			{VALUE v1,v2;v1=(yyvsp[0].val);v2=dispatch1(var_ref,v1);(yyval.val)=v2;}
9565 		    }
9566 #line 9562 "ripper.c"
9567     break;
9568 
9569   case 504:
9570 #line 3746 "ripper.y"
9571                     {
9572 			SET_LEX_STATE(EXPR_END);
9573 #if 0
9574 			(yyval.val) = (yyvsp[0].val);
9575 #endif
9576 			{VALUE v1,v2;v1=(yyvsp[0].val);v2=dispatch1(symbol,v1);(yyval.val)=v2;}
9577 		    }
9578 #line 9574 "ripper.c"
9579     break;
9580 
9581   case 509:
9582 #line 3762 "ripper.y"
9583                     {
9584 			SET_LEX_STATE(EXPR_END);
9585 #if 0
9586 			(yyval.val) = dsym_node(p, (yyvsp[-1].val), &(yyloc));
9587 #endif
9588 			{VALUE v1,v2;v1=(yyvsp[-1].val);v2=dispatch1(dyna_symbol,v1);(yyval.val)=v2;}
9589 		    }
9590 #line 9586 "ripper.c"
9591     break;
9592 
9593   case 511:
9594 #line 3773 "ripper.y"
9595                     {
9596 #if 0
9597 			(yyval.val) = (yyvsp[0].val);
9598 			add_mark_object(p, (yyval.val)->nd_lit = negate_lit(p, (yyval.val)->nd_lit));
9599 #endif
9600 			{VALUE v1,v2,v3;v1=ID2VAL(idUMinus);v2=(yyvsp[0].val);v3=dispatch2(unary,v1,v2);(yyval.val)=v3;}
9601 		    }
9602 #line 9598 "ripper.c"
9603     break;
9604 
9605   case 521:
9606 #line 3795 "ripper.y"
9607                               {(yyval.val) = KWD2EID(nil, (yyvsp[0].val));}
9608 #line 9604 "ripper.c"
9609     break;
9610 
9611   case 522:
9612 #line 3796 "ripper.y"
9613                                {(yyval.val) = KWD2EID(self, (yyvsp[0].val));}
9614 #line 9610 "ripper.c"
9615     break;
9616 
9617   case 523:
9618 #line 3797 "ripper.y"
9619                                {(yyval.val) = KWD2EID(true, (yyvsp[0].val));}
9620 #line 9616 "ripper.c"
9621     break;
9622 
9623   case 524:
9624 #line 3798 "ripper.y"
9625                                 {(yyval.val) = KWD2EID(false, (yyvsp[0].val));}
9626 #line 9622 "ripper.c"
9627     break;
9628 
9629   case 525:
9630 #line 3799 "ripper.y"
9631                                   {(yyval.val) = KWD2EID(_FILE__, (yyvsp[0].val));}
9632 #line 9628 "ripper.c"
9633     break;
9634 
9635   case 526:
9636 #line 3800 "ripper.y"
9637                                   {(yyval.val) = KWD2EID(_LINE__, (yyvsp[0].val));}
9638 #line 9634 "ripper.c"
9639     break;
9640 
9641   case 527:
9642 #line 3801 "ripper.y"
9643                                       {(yyval.val) = KWD2EID(_ENCODING__, (yyvsp[0].val));}
9644 #line 9640 "ripper.c"
9645     break;
9646 
9647   case 528:
9648 #line 3805 "ripper.y"
9649                     {
9650 #if 0
9651 			if (!((yyval.val) = gettable(p, (yyvsp[0].val), &(yyloc)))) (yyval.val) = NEW_BEGIN(0, &(yyloc));
9652 #endif
9653 			if (id_is_var(p, get_id((yyvsp[0].val)))) {
9654 			    (yyval.val) = dispatch1(var_ref, (yyvsp[0].val));
9655 			}
9656 			else {
9657 			    (yyval.val) = dispatch1(vcall, (yyvsp[0].val));
9658 			}
9659 
9660 		    }
9661 #line 9657 "ripper.c"
9662     break;
9663 
9664   case 529:
9665 #line 3818 "ripper.y"
9666                     {
9667 #if 0
9668 			if (!((yyval.val) = gettable(p, (yyvsp[0].val), &(yyloc)))) (yyval.val) = NEW_BEGIN(0, &(yyloc));
9669 #endif
9670 			{VALUE v1,v2;v1=(yyvsp[0].val);v2=dispatch1(var_ref,v1);(yyval.val)=v2;}
9671 		    }
9672 #line 9668 "ripper.c"
9673     break;
9674 
9675   case 530:
9676 #line 3827 "ripper.y"
9677                     {
9678 #if 0
9679 			(yyval.val) = assignable(p, (yyvsp[0].val), 0, &(yyloc));
9680 #endif
9681 			(yyval.val)=assignable(p, var_field(p, (yyvsp[0].val)));
9682 		    }
9683 #line 9679 "ripper.c"
9684     break;
9685 
9686   case 531:
9687 #line 3834 "ripper.y"
9688                     {
9689 #if 0
9690 			(yyval.val) = assignable(p, (yyvsp[0].val), 0, &(yyloc));
9691 #endif
9692 			(yyval.val)=assignable(p, var_field(p, (yyvsp[0].val)));
9693 		    }
9694 #line 9690 "ripper.c"
9695     break;
9696 
9697   case 534:
9698 #line 3847 "ripper.y"
9699                     {
9700 			SET_LEX_STATE(EXPR_BEG);
9701 			p->command_start = TRUE;
9702 		    }
9703 #line 9699 "ripper.c"
9704     break;
9705 
9706   case 535:
9707 #line 3852 "ripper.y"
9708                     {
9709 			(yyval.val) = (yyvsp[-1].val);
9710 		    }
9711 #line 9707 "ripper.c"
9712     break;
9713 
9714   case 536:
9715 #line 3856 "ripper.y"
9716                     {
9717 #if 0
9718 			(yyval.val) = 0;
9719 #endif
9720 			(yyval.val)=Qnil;
9721 		    }
9722 #line 9718 "ripper.c"
9723     break;
9724 
9725   case 537:
9726 #line 3865 "ripper.y"
9727                     {
9728 #if 0
9729 			(yyval.val) = (yyvsp[-1].val);
9730 #endif
9731 			{VALUE v1,v2;v1=(yyvsp[-1].val);v2=dispatch1(paren,v1);(yyval.val)=v2;}
9732 			SET_LEX_STATE(EXPR_BEG);
9733 			p->command_start = TRUE;
9734 		    }
9735 #line 9731 "ripper.c"
9736     break;
9737 
9738   case 538:
9739 #line 3873 "ripper.y"
9740                     {
9741 			(yyval.num) = p->in_kwarg;
9742 			p->in_kwarg = 1;
9743 			SET_LEX_STATE(p->lex.state|EXPR_LABEL); /* force for args */
9744 		    }
9745 #line 9741 "ripper.c"
9746     break;
9747 
9748   case 539:
9749 #line 3879 "ripper.y"
9750                     {
9751 			p->in_kwarg = !!(yyvsp[-2].num);
9752 			(yyval.val) = (yyvsp[-1].val);
9753 			SET_LEX_STATE(EXPR_BEG);
9754 			p->command_start = TRUE;
9755 		    }
9756 #line 9752 "ripper.c"
9757     break;
9758 
9759   case 540:
9760 #line 3888 "ripper.y"
9761                     {
9762 			(yyval.val) = new_args_tail(p, (yyvsp[-3].val), (yyvsp[-1].val), (yyvsp[0].val), &(yylsp[-1]));
9763 		    }
9764 #line 9760 "ripper.c"
9765     break;
9766 
9767   case 541:
9768 #line 3892 "ripper.y"
9769                     {
9770 			(yyval.val) = new_args_tail(p, (yyvsp[-1].val), Qnone, (yyvsp[0].val), &(yylsp[-1]));
9771 		    }
9772 #line 9768 "ripper.c"
9773     break;
9774 
9775   case 542:
9776 #line 3896 "ripper.y"
9777                     {
9778 			(yyval.val) = new_args_tail(p, Qnone, (yyvsp[-1].val), (yyvsp[0].val), &(yylsp[-1]));
9779 		    }
9780 #line 9776 "ripper.c"
9781     break;
9782 
9783   case 543:
9784 #line 3900 "ripper.y"
9785                     {
9786 			(yyval.val) = new_args_tail(p, Qnone, Qnone, (yyvsp[0].val), &(yylsp[0]));
9787 		    }
9788 #line 9784 "ripper.c"
9789     break;
9790 
9791   case 544:
9792 #line 3906 "ripper.y"
9793                     {
9794 			(yyval.val) = (yyvsp[0].val);
9795 		    }
9796 #line 9792 "ripper.c"
9797     break;
9798 
9799   case 545:
9800 #line 3910 "ripper.y"
9801                     {
9802 			(yyval.val) = new_args_tail(p, Qnone, Qnone, Qnone, &(yylsp[0]));
9803 		    }
9804 #line 9800 "ripper.c"
9805     break;
9806 
9807   case 546:
9808 #line 3916 "ripper.y"
9809                     {
9810 			(yyval.val) = new_args(p, (yyvsp[-5].val), (yyvsp[-3].val), (yyvsp[-1].val), Qnone, (yyvsp[0].val), &(yyloc));
9811 		    }
9812 #line 9808 "ripper.c"
9813     break;
9814 
9815   case 547:
9816 #line 3920 "ripper.y"
9817                     {
9818 			(yyval.val) = new_args(p, (yyvsp[-7].val), (yyvsp[-5].val), (yyvsp[-3].val), (yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
9819 		    }
9820 #line 9816 "ripper.c"
9821     break;
9822 
9823   case 548:
9824 #line 3924 "ripper.y"
9825                     {
9826 			(yyval.val) = new_args(p, (yyvsp[-3].val), (yyvsp[-1].val), Qnone, Qnone, (yyvsp[0].val), &(yyloc));
9827 		    }
9828 #line 9824 "ripper.c"
9829     break;
9830 
9831   case 549:
9832 #line 3928 "ripper.y"
9833                     {
9834 			(yyval.val) = new_args(p, (yyvsp[-5].val), (yyvsp[-3].val), Qnone, (yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
9835 		    }
9836 #line 9832 "ripper.c"
9837     break;
9838 
9839   case 550:
9840 #line 3932 "ripper.y"
9841                     {
9842 			(yyval.val) = new_args(p, (yyvsp[-3].val), Qnone, (yyvsp[-1].val), Qnone, (yyvsp[0].val), &(yyloc));
9843 		    }
9844 #line 9840 "ripper.c"
9845     break;
9846 
9847   case 551:
9848 #line 3936 "ripper.y"
9849                     {
9850 			(yyval.val) = new_args(p, (yyvsp[-5].val), Qnone, (yyvsp[-3].val), (yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
9851 		    }
9852 #line 9848 "ripper.c"
9853     break;
9854 
9855   case 552:
9856 #line 3940 "ripper.y"
9857                     {
9858 			(yyval.val) = new_args(p, (yyvsp[-1].val), Qnone, Qnone, Qnone, (yyvsp[0].val), &(yyloc));
9859 		    }
9860 #line 9856 "ripper.c"
9861     break;
9862 
9863   case 553:
9864 #line 3944 "ripper.y"
9865                     {
9866 			(yyval.val) = new_args(p, Qnone, (yyvsp[-3].val), (yyvsp[-1].val), Qnone, (yyvsp[0].val), &(yyloc));
9867 		    }
9868 #line 9864 "ripper.c"
9869     break;
9870 
9871   case 554:
9872 #line 3948 "ripper.y"
9873                     {
9874 			(yyval.val) = new_args(p, Qnone, (yyvsp[-5].val), (yyvsp[-3].val), (yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
9875 		    }
9876 #line 9872 "ripper.c"
9877     break;
9878 
9879   case 555:
9880 #line 3952 "ripper.y"
9881                     {
9882 			(yyval.val) = new_args(p, Qnone, (yyvsp[-1].val), Qnone, Qnone, (yyvsp[0].val), &(yyloc));
9883 		    }
9884 #line 9880 "ripper.c"
9885     break;
9886 
9887   case 556:
9888 #line 3956 "ripper.y"
9889                     {
9890 			(yyval.val) = new_args(p, Qnone, (yyvsp[-3].val), Qnone, (yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
9891 		    }
9892 #line 9888 "ripper.c"
9893     break;
9894 
9895   case 557:
9896 #line 3960 "ripper.y"
9897                     {
9898 			(yyval.val) = new_args(p, Qnone, Qnone, (yyvsp[-1].val), Qnone, (yyvsp[0].val), &(yyloc));
9899 		    }
9900 #line 9896 "ripper.c"
9901     break;
9902 
9903   case 558:
9904 #line 3964 "ripper.y"
9905                     {
9906 			(yyval.val) = new_args(p, Qnone, Qnone, (yyvsp[-3].val), (yyvsp[-1].val), (yyvsp[0].val), &(yyloc));
9907 		    }
9908 #line 9904 "ripper.c"
9909     break;
9910 
9911   case 559:
9912 #line 3968 "ripper.y"
9913                     {
9914 			(yyval.val) = new_args(p, Qnone, Qnone, Qnone, Qnone, (yyvsp[0].val), &(yyloc));
9915 		    }
9916 #line 9912 "ripper.c"
9917     break;
9918 
9919   case 560:
9920 #line 3972 "ripper.y"
9921                     {
9922 			(yyval.val) = new_args_tail(p, Qnone, Qnone, Qnone, &(yylsp[0]));
9923 			(yyval.val) = new_args(p, Qnone, Qnone, Qnone, Qnone, (yyval.val), &(yylsp[0]));
9924 		    }
9925 #line 9921 "ripper.c"
9926     break;
9927 
9928   case 561:
9929 #line 3979 "ripper.y"
9930                     {
9931 #if 0
9932 			yyerror1(&(yylsp[0]), "formal argument cannot be a constant");
9933 			(yyval.val) = 0;
9934 #endif
9935 			{VALUE v1,v2;v1=(yyvsp[0].val);v2=dispatch1(param_error,v1);(yyval.val)=v2;}ripper_error(p);
9936 		    }
9937 #line 9933 "ripper.c"
9938     break;
9939 
9940   case 562:
9941 #line 3987 "ripper.y"
9942                     {
9943 #if 0
9944 			yyerror1(&(yylsp[0]), "formal argument cannot be an instance variable");
9945 			(yyval.val) = 0;
9946 #endif
9947 			{VALUE v1,v2;v1=(yyvsp[0].val);v2=dispatch1(param_error,v1);(yyval.val)=v2;}ripper_error(p);
9948 		    }
9949 #line 9945 "ripper.c"
9950     break;
9951 
9952   case 563:
9953 #line 3995 "ripper.y"
9954                     {
9955 #if 0
9956 			yyerror1(&(yylsp[0]), "formal argument cannot be a global variable");
9957 			(yyval.val) = 0;
9958 #endif
9959 			{VALUE v1,v2;v1=(yyvsp[0].val);v2=dispatch1(param_error,v1);(yyval.val)=v2;}ripper_error(p);
9960 		    }
9961 #line 9957 "ripper.c"
9962     break;
9963 
9964   case 564:
9965 #line 4003 "ripper.y"
9966                     {
9967 #if 0
9968 			yyerror1(&(yylsp[0]), "formal argument cannot be a class variable");
9969 			(yyval.val) = 0;
9970 #endif
9971 			{VALUE v1,v2;v1=(yyvsp[0].val);v2=dispatch1(param_error,v1);(yyval.val)=v2;}ripper_error(p);
9972 		    }
9973 #line 9969 "ripper.c"
9974     break;
9975 
9976   case 566:
9977 #line 4014 "ripper.y"
9978                     {
9979 			formal_argument(p, get_id((yyvsp[0].val)));
9980 			(yyval.val) = (yyvsp[0].val);
9981 		    }
9982 #line 9978 "ripper.c"
9983     break;
9984 
9985   case 567:
9986 #line 4021 "ripper.y"
9987                     {
9988 			ID id = get_id((yyvsp[0].val));
9989 			arg_var(p, id);
9990 			p->cur_arg = id;
9991 			(yyval.val) = (yyvsp[0].val);
9992 		    }
9993 #line 9989 "ripper.c"
9994     break;
9995 
9996   case 568:
9997 #line 4030 "ripper.y"
9998                     {
9999 			p->cur_arg = 0;
10000 #if 0
10001 			(yyval.val) = NEW_ARGS_AUX((yyvsp[0].val), 1, &NULL_LOC);
10002 #endif
10003 			(yyval.val)=get_value((yyvsp[0].val));
10004 		    }
10005 #line 10001 "ripper.c"
10006     break;
10007 
10008   case 569:
10009 #line 4038 "ripper.y"
10010                     {
10011 			ID tid = internal_id(p);
10012 #if 0
10013 			YYLTYPE loc;
10014 			loc.beg_pos = (yylsp[-1]).beg_pos;
10015 			loc.end_pos = (yylsp[-1]).beg_pos;
10016 #endif
10017 			arg_var(p, tid);
10018 #if 0
10019 			if (dyna_in_block(p)) {
10020 			    (yyvsp[-1].val)->nd_value = NEW_DVAR(tid, &loc);
10021 			}
10022 			else {
10023 			    (yyvsp[-1].val)->nd_value = NEW_LVAR(tid, &loc);
10024 			}
10025 			(yyval.val) = NEW_ARGS_AUX(tid, 1, &NULL_LOC);
10026 			(yyval.val)->nd_next = (yyvsp[-1].val);
10027 #endif
10028 			{VALUE v1,v2;v1=(yyvsp[-1].val);v2=dispatch1(mlhs_paren,v1);(yyval.val)=v2;}
10029 		    }
10030 #line 10026 "ripper.c"
10031     break;
10032 
10033   case 570:
10034 #line 4061 "ripper.y"
10035                         {(yyval.val)=rb_ary_new3(1, get_value((yyvsp[0].val)));}
10036 #line 10032 "ripper.c"
10037     break;
10038 
10039   case 571:
10040 #line 4063 "ripper.y"
10041                     {
10042 #if 0
10043 			(yyval.val) = (yyvsp[-2].val);
10044 			(yyval.val)->nd_plen++;
10045 			(yyval.val)->nd_next = block_append(p, (yyval.val)->nd_next, (yyvsp[0].val)->nd_next);
10046 			rb_discard_node(p, (yyvsp[0].val));
10047 #endif
10048 			(yyval.val)=rb_ary_push((yyvsp[-2].val), get_value((yyvsp[0].val)));
10049 		    }
10050 #line 10046 "ripper.c"
10051     break;
10052 
10053   case 572:
10054 #line 4076 "ripper.y"
10055                     {
10056 			ID id = get_id((yyvsp[0].val));
10057 			arg_var(p, formal_argument(p, id));
10058 			p->cur_arg = id;
10059 			(yyval.val) = (yyvsp[0].val);
10060 		    }
10061 #line 10057 "ripper.c"
10062     break;
10063 
10064   case 573:
10065 #line 4085 "ripper.y"
10066                     {
10067 			p->cur_arg = 0;
10068 #if 0
10069 			(yyval.val) = new_kw_arg(p, assignable(p, (yyvsp[-1].val), (yyvsp[0].val), &(yyloc)), &(yyloc));
10070 #endif
10071 			(yyval.val)=rb_assoc_new(get_value(assignable(p, (yyvsp[-1].val))), get_value((yyvsp[0].val)));
10072 		    }
10073 #line 10069 "ripper.c"
10074     break;
10075 
10076   case 574:
10077 #line 4093 "ripper.y"
10078                     {
10079 			p->cur_arg = 0;
10080 #if 0
10081 			(yyval.val) = new_kw_arg(p, assignable(p, (yyvsp[0].val), NODE_SPECIAL_REQUIRED_KEYWORD, &(yyloc)), &(yyloc));
10082 #endif
10083 			(yyval.val)=rb_assoc_new(get_value(assignable(p, (yyvsp[0].val))), 0);
10084 		    }
10085 #line 10081 "ripper.c"
10086     break;
10087 
10088   case 575:
10089 #line 4103 "ripper.y"
10090                     {
10091 #if 0
10092 			(yyval.val) = new_kw_arg(p, assignable(p, (yyvsp[-1].val), (yyvsp[0].val), &(yyloc)), &(yyloc));
10093 #endif
10094 			(yyval.val)=rb_assoc_new(get_value(assignable(p, (yyvsp[-1].val))), get_value((yyvsp[0].val)));
10095 		    }
10096 #line 10092 "ripper.c"
10097     break;
10098 
10099   case 576:
10100 #line 4110 "ripper.y"
10101                     {
10102 #if 0
10103 			(yyval.val) = new_kw_arg(p, assignable(p, (yyvsp[0].val), NODE_SPECIAL_REQUIRED_KEYWORD, &(yyloc)), &(yyloc));
10104 #endif
10105 			(yyval.val)=rb_assoc_new(get_value(assignable(p, (yyvsp[0].val))), 0);
10106 		    }
10107 #line 10103 "ripper.c"
10108     break;
10109 
10110   case 577:
10111 #line 4119 "ripper.y"
10112                     {
10113 #if 0
10114 			(yyval.val) = (yyvsp[0].val);
10115 #endif
10116 			(yyval.val)=rb_ary_new3(1, get_value((yyvsp[0].val)));
10117 		    }
10118 #line 10114 "ripper.c"
10119     break;
10120 
10121   case 578:
10122 #line 4126 "ripper.y"
10123                     {
10124 #if 0
10125 			(yyval.val) = kwd_append((yyvsp[-2].val), (yyvsp[0].val));
10126 #endif
10127 			(yyval.val)=rb_ary_push((yyvsp[-2].val), get_value((yyvsp[0].val)));
10128 		    }
10129 #line 10125 "ripper.c"
10130     break;
10131 
10132   case 579:
10133 #line 4136 "ripper.y"
10134                     {
10135 #if 0
10136 			(yyval.val) = (yyvsp[0].val);
10137 #endif
10138 			(yyval.val)=rb_ary_new3(1, get_value((yyvsp[0].val)));
10139 		    }
10140 #line 10136 "ripper.c"
10141     break;
10142 
10143   case 580:
10144 #line 4143 "ripper.y"
10145                     {
10146 #if 0
10147 			(yyval.val) = kwd_append((yyvsp[-2].val), (yyvsp[0].val));
10148 #endif
10149 			(yyval.val)=rb_ary_push((yyvsp[-2].val), get_value((yyvsp[0].val)));
10150 		    }
10151 #line 10147 "ripper.c"
10152     break;
10153 
10154   case 583:
10155 #line 4156 "ripper.y"
10156                     {
10157 			arg_var(p, shadowing_lvar(p, get_id((yyvsp[0].val))));
10158 #if 0
10159 			(yyval.val) = (yyvsp[0].val);
10160 #endif
10161 			{VALUE v1,v2;v1=(yyvsp[0].val);v2=dispatch1(kwrest_param,v1);(yyval.val)=v2;}
10162 		    }
10163 #line 10159 "ripper.c"
10164     break;
10165 
10166   case 584:
10167 #line 4164 "ripper.y"
10168                     {
10169 #if 0
10170 			(yyval.val) = internal_id(p);
10171 			arg_var(p, (yyval.val));
10172 #endif
10173 			{VALUE v1,v2;v1=Qnil;v2=dispatch1(kwrest_param,v1);(yyval.val)=v2;}
10174 		    }
10175 #line 10171 "ripper.c"
10176     break;
10177 
10178   case 585:
10179 #line 4174 "ripper.y"
10180                     {
10181 			p->cur_arg = 0;
10182 #if 0
10183 			(yyval.val) = NEW_OPT_ARG(0, assignable(p, (yyvsp[-2].val), (yyvsp[0].val), &(yyloc)), &(yyloc));
10184 #endif
10185 			(yyval.val)=rb_assoc_new(get_value(assignable(p, (yyvsp[-2].val))), get_value((yyvsp[0].val)));
10186 		    }
10187 #line 10183 "ripper.c"
10188     break;
10189 
10190   case 586:
10191 #line 4184 "ripper.y"
10192                     {
10193 			p->cur_arg = 0;
10194 #if 0
10195 			(yyval.val) = NEW_OPT_ARG(0, assignable(p, (yyvsp[-2].val), (yyvsp[0].val), &(yyloc)), &(yyloc));
10196 #endif
10197 			(yyval.val)=rb_assoc_new(get_value(assignable(p, (yyvsp[-2].val))), get_value((yyvsp[0].val)));
10198 		    }
10199 #line 10195 "ripper.c"
10200     break;
10201 
10202   case 587:
10203 #line 4194 "ripper.y"
10204                     {
10205 #if 0
10206 			(yyval.val) = (yyvsp[0].val);
10207 #endif
10208 			(yyval.val)=rb_ary_new3(1, get_value((yyvsp[0].val)));
10209 		    }
10210 #line 10206 "ripper.c"
10211     break;
10212 
10213   case 588:
10214 #line 4201 "ripper.y"
10215                     {
10216 #if 0
10217 			(yyval.val) = opt_arg_append((yyvsp[-2].val), (yyvsp[0].val));
10218 #endif
10219 			(yyval.val)=rb_ary_push((yyvsp[-2].val), get_value((yyvsp[0].val)));
10220 		    }
10221 #line 10217 "ripper.c"
10222     break;
10223 
10224   case 589:
10225 #line 4210 "ripper.y"
10226                     {
10227 #if 0
10228 			(yyval.val) = (yyvsp[0].val);
10229 #endif
10230 			(yyval.val)=rb_ary_new3(1, get_value((yyvsp[0].val)));
10231 		    }
10232 #line 10228 "ripper.c"
10233     break;
10234 
10235   case 590:
10236 #line 4217 "ripper.y"
10237                     {
10238 #if 0
10239 			(yyval.val) = opt_arg_append((yyvsp[-2].val), (yyvsp[0].val));
10240 #endif
10241 			(yyval.val)=rb_ary_push((yyvsp[-2].val), get_value((yyvsp[0].val)));
10242 		    }
10243 #line 10239 "ripper.c"
10244     break;
10245 
10246   case 593:
10247 #line 4230 "ripper.y"
10248                     {
10249 			arg_var(p, shadowing_lvar(p, get_id((yyvsp[0].val))));
10250 #if 0
10251 			(yyval.val) = (yyvsp[0].val);
10252 #endif
10253 			{VALUE v1,v2;v1=(yyvsp[0].val);v2=dispatch1(rest_param,v1);(yyval.val)=v2;}
10254 		    }
10255 #line 10251 "ripper.c"
10256     break;
10257 
10258   case 594:
10259 #line 4238 "ripper.y"
10260                     {
10261 #if 0
10262 			(yyval.val) = internal_id(p);
10263 			arg_var(p, (yyval.val));
10264 #endif
10265 			{VALUE v1,v2;v1=Qnil;v2=dispatch1(rest_param,v1);(yyval.val)=v2;}
10266 		    }
10267 #line 10263 "ripper.c"
10268     break;
10269 
10270   case 597:
10271 #line 4252 "ripper.y"
10272                     {
10273 			arg_var(p, shadowing_lvar(p, get_id((yyvsp[0].val))));
10274 #if 0
10275 			(yyval.val) = (yyvsp[0].val);
10276 #endif
10277 			{VALUE v1,v2;v1=(yyvsp[0].val);v2=dispatch1(blockarg,v1);(yyval.val)=v2;}
10278 		    }
10279 #line 10275 "ripper.c"
10280     break;
10281 
10282   case 598:
10283 #line 4262 "ripper.y"
10284                     {
10285 			(yyval.val) = (yyvsp[0].val);
10286 		    }
10287 #line 10283 "ripper.c"
10288     break;
10289 
10290   case 599:
10291 #line 4266 "ripper.y"
10292                     {
10293 #if 0
10294 			(yyval.val) = 0;
10295 #endif
10296 			(yyval.val)=Qundef;
10297 		    }
10298 #line 10294 "ripper.c"
10299     break;
10300 
10301   case 600:
10302 #line 4275 "ripper.y"
10303                     {
10304 			value_expr((yyvsp[0].val));
10305 			(yyval.val) = (yyvsp[0].val);
10306 		    }
10307 #line 10303 "ripper.c"
10308     break;
10309 
10310   case 601:
10311 #line 4279 "ripper.y"
10312                       {SET_LEX_STATE(EXPR_BEG);}
10313 #line 10309 "ripper.c"
10314     break;
10315 
10316   case 602:
10317 #line 4280 "ripper.y"
10318                     {
10319 #if 0
10320 			switch (nd_type((yyvsp[-1].val))) {
10321 			  case NODE_STR:
10322 			  case NODE_DSTR:
10323 			  case NODE_XSTR:
10324 			  case NODE_DXSTR:
10325 			  case NODE_DREGX:
10326 			  case NODE_LIT:
10327 			  case NODE_ARRAY:
10328 			  case NODE_ZARRAY:
10329 			    yyerror1(&(yylsp[-1]), "can't define singleton method for literals");
10330 			    break;
10331 			  default:
10332 			    value_expr((yyvsp[-1].val));
10333 			    break;
10334 			}
10335 			(yyval.val) = (yyvsp[-1].val);
10336 #endif
10337 			{VALUE v1,v2;v1=(yyvsp[-1].val);v2=dispatch1(paren,v1);(yyval.val)=v2;}
10338 		    }
10339 #line 10335 "ripper.c"
10340     break;
10341 
10342   case 604:
10343 #line 4305 "ripper.y"
10344                     {
10345 #if 0
10346 			(yyval.val) = (yyvsp[-1].val);
10347 #endif
10348 			{VALUE v1,v2;v1=(yyvsp[-1].val);v2=dispatch1(assoclist_from_args,v1);(yyval.val)=v2;}
10349 		    }
10350 #line 10346 "ripper.c"
10351     break;
10352 
10353   case 605:
10354 #line 4314 "ripper.y"
10355                         {(yyval.val)=rb_ary_new3(1, get_value((yyvsp[0].val)));}
10356 #line 10352 "ripper.c"
10357     break;
10358 
10359   case 606:
10360 #line 4316 "ripper.y"
10361                     {
10362 #if 0
10363 			NODE *assocs = (yyvsp[-2].val);
10364 			NODE *tail = (yyvsp[0].val);
10365 			if (!assocs) {
10366 			    assocs = tail;
10367 			}
10368 			else if (tail) {
10369 			    if (assocs->nd_head &&
10370 				!tail->nd_head && nd_type(tail->nd_next) == NODE_ARRAY &&
10371 				nd_type(tail->nd_next->nd_head) == NODE_HASH) {
10372 				/* DSTAR */
10373 				tail = tail->nd_next->nd_head->nd_head;
10374 			    }
10375 			    assocs = list_concat(assocs, tail);
10376 			}
10377 			(yyval.val) = assocs;
10378 #endif
10379 			(yyval.val)=rb_ary_push((yyvsp[-2].val), get_value((yyvsp[0].val)));
10380 		    }
10381 #line 10377 "ripper.c"
10382     break;
10383 
10384   case 607:
10385 #line 4339 "ripper.y"
10386                     {
10387 #if 0
10388 			if (nd_type((yyvsp[-2].val)) == NODE_STR) {
10389 			    nd_set_type((yyvsp[-2].val), NODE_LIT);
10390 			    add_mark_object(p, (yyvsp[-2].val)->nd_lit = rb_fstring((yyvsp[-2].val)->nd_lit));
10391 			}
10392 			(yyval.val) = list_append(p, NEW_LIST((yyvsp[-2].val), &(yyloc)), (yyvsp[0].val));
10393 #endif
10394 			{VALUE v1,v2,v3;v1=(yyvsp[-2].val);v2=(yyvsp[0].val);v3=dispatch2(assoc_new,v1,v2);(yyval.val)=v3;}
10395 		    }
10396 #line 10392 "ripper.c"
10397     break;
10398 
10399   case 608:
10400 #line 4350 "ripper.y"
10401                     {
10402 #if 0
10403 			(yyval.val) = list_append(p, NEW_LIST(NEW_LIT(ID2SYM((yyvsp[-1].val)), &(yylsp[-1])), &(yyloc)), (yyvsp[0].val));
10404 #endif
10405 			{VALUE v1,v2,v3;v1=(yyvsp[-1].val);v2=(yyvsp[0].val);v3=dispatch2(assoc_new,v1,v2);(yyval.val)=v3;}
10406 		    }
10407 #line 10403 "ripper.c"
10408     break;
10409 
10410   case 609:
10411 #line 4357 "ripper.y"
10412                     {
10413 #if 0
10414 			YYLTYPE loc = code_loc_gen(&(yylsp[-3]), &(yylsp[-1]));
10415 			(yyval.val) = list_append(p, NEW_LIST(dsym_node(p, (yyvsp[-2].val), &loc), &loc), (yyvsp[0].val));
10416 #endif
10417 			{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;}
10418 		    }
10419 #line 10415 "ripper.c"
10420     break;
10421 
10422   case 610:
10423 #line 4365 "ripper.y"
10424                     {
10425 #if 0
10426 			if (nd_type((yyvsp[0].val)) == NODE_HASH &&
10427 			    !((yyvsp[0].val)->nd_head && (yyvsp[0].val)->nd_head->nd_alen))
10428 			    (yyval.val) = 0;
10429 			else
10430 			    (yyval.val) = list_append(p, NEW_LIST(0, &(yyloc)), (yyvsp[0].val));
10431 #endif
10432 			{VALUE v1,v2;v1=(yyvsp[0].val);v2=dispatch1(assoc_splat,v1);(yyval.val)=v2;}
10433 		    }
10434 #line 10430 "ripper.c"
10435     break;
10436 
10437   case 636:
10438 #line 4424 "ripper.y"
10439                       {yyerrok;token_flush(p);}
10440 #line 10436 "ripper.c"
10441     break;
10442 
10443   case 637:
10444 #line 4425 "ripper.y"
10445                        {token_flush(p);}
10446 #line 10442 "ripper.c"
10447     break;
10448 
10449   case 639:
10450 #line 4429 "ripper.y"
10451                             {yyerrok;}
10452 #line 10448 "ripper.c"
10453     break;
10454 
10455   case 640:
10456 #line 4433 "ripper.y"
10457                     {
10458 			(yyval.val) = Qnull;
10459 		    }
10460 #line 10456 "ripper.c"
10461     break;
10462 
10463 
10464 #line 10460 "ripper.c"
10465 
10466       default: break;
10467     }
10468   /* User semantic actions sometimes alter yychar, and that requires
10469      that yytoken be updated with the new translation.  We take the
10470      approach of translating immediately before every use of yytoken.
10471      One alternative is translating here after every semantic action,
10472      but that translation would be missed if the semantic action invokes
10473      YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
10474      if it invokes YYBACKUP.  In the case of YYABORT or YYACCEPT, an
10475      incorrect destructor might then be invoked immediately.  In the
10476      case of YYERROR or YYBACKUP, subsequent parser actions might lead
10477      to an incorrect destructor call or verbose syntax error message
10478      before the lookahead is translated.  */
10479   YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
10480 
10481   YYPOPSTACK (yylen);
10482   yylen = 0;
10483   YY_STACK_PRINT (yyss, yyssp);
10484 
10485   *++yyvsp = yyval;
10486   *++yylsp = yyloc;
10487 
10488   /* Now 'shift' the result of the reduction.  Determine what state
10489      that goes to, based on the state we popped back to and the rule
10490      number reduced by.  */
10491   {
10492     const int yylhs = yyr1[yyn] - YYNTOKENS;
10493     const int yyi = yypgoto[yylhs] + *yyssp;
10494     yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp
10495                ? yytable[yyi]
10496                : yydefgoto[yylhs]);
10497   }
10498 
10499   goto yynewstate;
10500 
10501 
10502 /*--------------------------------------.
10503 | yyerrlab -- here on detecting error.  |
10504 `--------------------------------------*/
10505 yyerrlab:
10506   /* Make sure we have latest lookahead translation.  See comments at
10507      user semantic actions for why this is necessary.  */
10508   yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
10509 
10510   /* If not already recovering from an error, report this error.  */
10511   if (!yyerrstatus)
10512     {
10513       ++yynerrs;
10514 #if ! YYERROR_VERBOSE
10515       yyerror (&yylloc, p, YY_("syntax error"));
10516 #else
10517 # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
10518                                         yyssp, yytoken)
10519       {
10520         char const *yymsgp = YY_("syntax error");
10521         int yysyntax_error_status;
10522         yysyntax_error_status = YYSYNTAX_ERROR;
10523         if (yysyntax_error_status == 0)
10524           yymsgp = yymsg;
10525         else if (yysyntax_error_status == 1)
10526           {
10527             if (yymsg != yymsgbuf)
10528               YYSTACK_FREE (yymsg);
10529             yymsg = YY_CAST (char *, YYSTACK_ALLOC (YY_CAST (YYSIZE_T, yymsg_alloc)));
10530             if (!yymsg)
10531               {
10532                 yymsg = yymsgbuf;
10533                 yymsg_alloc = sizeof yymsgbuf;
10534                 yysyntax_error_status = 2;
10535               }
10536             else
10537               {
10538                 yysyntax_error_status = YYSYNTAX_ERROR;
10539                 yymsgp = yymsg;
10540               }
10541           }
10542         yyerror (&yylloc, p, yymsgp);
10543         if (yysyntax_error_status == 2)
10544           goto yyexhaustedlab;
10545       }
10546 # undef YYSYNTAX_ERROR
10547 #endif
10548     }
10549 
10550   yyerror_range[1] = yylloc;
10551 
10552   if (yyerrstatus == 3)
10553     {
10554       /* If just tried and failed to reuse lookahead token after an
10555          error, discard it.  */
10556 
10557       if (yychar <= YYEOF)
10558         {
10559           /* Return failure if at end of input.  */
10560           if (yychar == YYEOF)
10561             YYABORT;
10562         }
10563       else
10564         {
10565           yydestruct ("Error: discarding",
10566                       yytoken, &yylval, &yylloc, p);
10567           yychar = YYEMPTY;
10568         }
10569     }
10570 
10571   /* Else will try to reuse lookahead token after shifting the error
10572      token.  */
10573   goto yyerrlab1;
10574 
10575 
10576 /*---------------------------------------------------.
10577 | yyerrorlab -- error raised explicitly by YYERROR.  |
10578 `---------------------------------------------------*/
10579 yyerrorlab:
10580   /* Pacify compilers when the user code never invokes YYERROR and the
10581      label yyerrorlab therefore never appears in user code.  */
10582   if (0)
10583     YYERROR;
10584 
10585   /* Do not reclaim the symbols of the rule whose action triggered
10586      this YYERROR.  */
10587   YYPOPSTACK (yylen);
10588   yylen = 0;
10589   YY_STACK_PRINT (yyss, yyssp);
10590   yystate = *yyssp;
10591   goto yyerrlab1;
10592 
10593 
10594 /*-------------------------------------------------------------.
10595 | yyerrlab1 -- common code for both syntax error and YYERROR.  |
10596 `-------------------------------------------------------------*/
10597 yyerrlab1:
10598   yyerrstatus = 3;      /* Each real token shifted decrements this.  */
10599 
10600   for (;;)
10601     {
10602       yyn = yypact[yystate];
10603       if (!yypact_value_is_default (yyn))
10604         {
10605           yyn += YYTERROR;
10606           if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
10607             {
10608               yyn = yytable[yyn];
10609               if (0 < yyn)
10610                 break;
10611             }
10612         }
10613 
10614       /* Pop the current state because it cannot handle the error token.  */
10615       if (yyssp == yyss)
10616         YYABORT;
10617 
10618       yyerror_range[1] = *yylsp;
10619       yydestruct ("Error: popping",
10620                   yystos[yystate], yyvsp, yylsp, p);
10621       YYPOPSTACK (1);
10622       yystate = *yyssp;
10623       YY_STACK_PRINT (yyss, yyssp);
10624     }
10625 
10626   YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
10627   *++yyvsp = yylval;
10628   YY_IGNORE_MAYBE_UNINITIALIZED_END
10629 
10630   yyerror_range[2] = yylloc;
10631   /* Using YYLLOC is tempting, but would change the location of
10632      the lookahead.  YYLOC is available though.  */
10633   YYLLOC_DEFAULT (yyloc, yyerror_range, 2);
10634   *++yylsp = yyloc;
10635 
10636   /* Shift the error token.  */
10637   YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
10638 
10639   yystate = yyn;
10640   goto yynewstate;
10641 
10642 
10643 /*-------------------------------------.
10644 | yyacceptlab -- YYACCEPT comes here.  |
10645 `-------------------------------------*/
10646 yyacceptlab:
10647   yyresult = 0;
10648   goto yyreturn;
10649 
10650 
10651 /*-----------------------------------.
10652 | yyabortlab -- YYABORT comes here.  |
10653 `-----------------------------------*/
10654 yyabortlab:
10655   yyresult = 1;
10656   goto yyreturn;
10657 
10658 
10659 #if !defined yyoverflow || YYERROR_VERBOSE
10660 /*-------------------------------------------------.
10661 | yyexhaustedlab -- memory exhaustion comes here.  |
10662 `-------------------------------------------------*/
10663 yyexhaustedlab:
10664   yyerror (&yylloc, p, YY_("memory exhausted"));
10665   yyresult = 2;
10666   /* Fall through.  */
10667 #endif
10668 
10669 
10670 /*-----------------------------------------------------.
10671 | yyreturn -- parsing is finished, return the result.  |
10672 `-----------------------------------------------------*/
10673 yyreturn:
10674   if (yychar != YYEMPTY)
10675     {
10676       /* Make sure we have latest lookahead translation.  See comments at
10677          user semantic actions for why this is necessary.  */
10678       yytoken = YYTRANSLATE (yychar);
10679       yydestruct ("Cleanup: discarding lookahead",
10680                   yytoken, &yylval, &yylloc, p);
10681     }
10682   /* Do not reclaim the symbols of the rule whose action triggered
10683      this YYABORT or YYACCEPT.  */
10684   YYPOPSTACK (yylen);
10685   YY_STACK_PRINT (yyss, yyssp);
10686   while (yyssp != yyss)
10687     {
10688       yydestruct ("Cleanup: popping",
10689                   yystos[+*yyssp], yyvsp, yylsp, p);
10690       YYPOPSTACK (1);
10691     }
10692 #ifndef yyoverflow
10693   if (yyss != yyssa)
10694     YYSTACK_FREE (yyss);
10695 #endif
10696 #if YYERROR_VERBOSE
10697   if (yymsg != yymsgbuf)
10698     YYSTACK_FREE (yymsg);
10699 #endif
10700   return yyresult;
10701 }
10702 #line 4437 "ripper.y"
10703 
10704 # undef p
10705 # undef yylex
10706 # undef yylval
10707 # define yylval  (*p->lval)
10708 
10709 static int regx_options(struct parser_params*);
10710 static int tokadd_string(struct parser_params*,int,int,int,long*,rb_encoding**,rb_encoding**);
10711 static void tokaddmbc(struct parser_params *p, int c, rb_encoding *enc);
10712 static enum yytokentype parse_string(struct parser_params*,rb_strterm_literal_t*);
10713 static enum yytokentype here_document(struct parser_params*,rb_strterm_heredoc_t*);
10714 
10715 #ifndef RIPPER
10716 # define set_yylval_node(x) {				\
10717   YYLTYPE _cur_loc;					\
10718   rb_parser_set_location(p, &_cur_loc);			\
10719   yylval.node = (x);					\
10720 }
10721 # define set_yylval_str(x) set_yylval_node(NEW_STR(x, &_cur_loc))
10722 # define set_yylval_literal(x) set_yylval_node(NEW_LIT(x, &_cur_loc))
10723 # define set_yylval_num(x) (yylval.num = (x))
10724 # define set_yylval_id(x)  (yylval.id = (x))
10725 # define set_yylval_name(x)  (yylval.id = (x))
10726 # define yylval_id() (yylval.id)
10727 #else
10728 static inline VALUE
ripper_yylval_id(struct parser_params * p,ID x)10729 ripper_yylval_id(struct parser_params *p, ID x)
10730 {
10731     return ripper_new_yylval(p, x, ID2SYM(x), 0);
10732 }
10733 # define set_yylval_str(x) (yylval.val = (x))
10734 # define set_yylval_num(x) (yylval.val = ripper_new_yylval(p, (x), 0, 0))
10735 # define set_yylval_id(x)  (void)(x)
10736 # define set_yylval_name(x) (void)(yylval.val = ripper_yylval_id(p, x))
10737 # define set_yylval_literal(x) (void)(x)
10738 # define set_yylval_node(x) (void)(x)
10739 # define yylval_id() yylval.id
10740 # define _cur_loc NULL_LOC /* dummy */
10741 #endif
10742 
10743 #ifndef RIPPER
10744 #define literal_flush(p, ptr) ((p)->lex.ptok = (ptr))
10745 #define dispatch_scan_event(p, t) ((void)0)
10746 #define dispatch_delayed_token(p, t) ((void)0)
10747 #define has_delayed_token(p) (0)
10748 #else
10749 #define literal_flush(p, ptr) ((void)(ptr))
10750 
10751 #define yylval_rval (*(RB_TYPE_P(yylval.val, T_NODE) ? &yylval.node->nd_rval : &yylval.val))
10752 
10753 static inline VALUE
intern_sym(const char * name)10754 intern_sym(const char *name)
10755 {
10756     ID id = rb_intern_const(name);
10757     return ID2SYM(id);
10758 }
10759 
10760 static int
ripper_has_scan_event(struct parser_params * p)10761 ripper_has_scan_event(struct parser_params *p)
10762 {
10763     if (p->lex.pcur < p->lex.ptok) rb_raise(rb_eRuntimeError, "lex.pcur < lex.ptok");
10764     return p->lex.pcur > p->lex.ptok;
10765 }
10766 
10767 static VALUE
ripper_scan_event_val(struct parser_params * p,int t)10768 ripper_scan_event_val(struct parser_params *p, int t)
10769 {
10770     VALUE str = STR_NEW(p->lex.ptok, p->lex.pcur - p->lex.ptok);
10771     VALUE rval = ripper_dispatch1(p, ripper_token2eventid(t), str);
10772     token_flush(p);
10773     return rval;
10774 }
10775 
10776 static void
ripper_dispatch_scan_event(struct parser_params * p,int t)10777 ripper_dispatch_scan_event(struct parser_params *p, int t)
10778 {
10779     if (!ripper_has_scan_event(p)) return;
10780     add_mark_object(p, yylval_rval = ripper_scan_event_val(p, t));
10781 }
10782 #define dispatch_scan_event(p, t) ripper_dispatch_scan_event(p, t)
10783 
10784 static void
ripper_dispatch_delayed_token(struct parser_params * p,int t)10785 ripper_dispatch_delayed_token(struct parser_params *p, int t)
10786 {
10787     int saved_line = p->ruby_sourceline;
10788     const char *saved_tokp = p->lex.ptok;
10789 
10790     p->ruby_sourceline = p->delayed_line;
10791     p->lex.ptok = p->lex.pbeg + p->delayed_col;
10792     add_mark_object(p, yylval_rval = ripper_dispatch1(p, ripper_token2eventid(t), p->delayed));
10793     p->delayed = Qnil;
10794     p->ruby_sourceline = saved_line;
10795     p->lex.ptok = saved_tokp;
10796 }
10797 #define dispatch_delayed_token(p, t) ripper_dispatch_delayed_token(p, t)
10798 #define has_delayed_token(p) (!NIL_P(p->delayed))
10799 #endif /* RIPPER */
10800 
10801 #include "ruby/regex.h"
10802 #include "ruby/util.h"
10803 
10804 static inline int
is_identchar(const char * ptr,const char * MAYBE_UNUSED (ptr_end),rb_encoding * enc)10805 is_identchar(const char *ptr, const char *MAYBE_UNUSED(ptr_end), rb_encoding *enc)
10806 {
10807     return rb_enc_isalnum((unsigned char)*ptr, enc) || *ptr == '_' || !ISASCII(*ptr);
10808 }
10809 
10810 static inline int
parser_is_identchar(struct parser_params * p)10811 parser_is_identchar(struct parser_params *p)
10812 {
10813     return !(p)->eofp && is_identchar(p->lex.pcur-1, p->lex.pend, p->enc);
10814 }
10815 
10816 static inline int
parser_isascii(struct parser_params * p)10817 parser_isascii(struct parser_params *p)
10818 {
10819     return ISASCII(*(p->lex.pcur-1));
10820 }
10821 
10822 static void
setup_token_info(token_info * ptinfo,const char * ptr,const rb_code_location_t * loc)10823 setup_token_info(token_info *ptinfo, const char *ptr, const rb_code_location_t *loc)
10824 {
10825     int column = 1, nonspc = 0, i;
10826     for (i = 0; i < loc->beg_pos.column; i++, ptr++) {
10827 	if (*ptr == '\t') {
10828 	    column = (((column - 1) / TAB_WIDTH) + 1) * TAB_WIDTH;
10829 	}
10830 	column++;
10831 	if (*ptr != ' ' && *ptr != '\t') {
10832 	    nonspc = 1;
10833 	}
10834     }
10835 
10836     ptinfo->linenum = loc->beg_pos.lineno;
10837     ptinfo->column = column;
10838     ptinfo->nonspc = nonspc;
10839 }
10840 
10841 static void
token_info_push(struct parser_params * p,const char * token,const rb_code_location_t * loc)10842 token_info_push(struct parser_params *p, const char *token, const rb_code_location_t *loc)
10843 {
10844     token_info *ptinfo;
10845 
10846     if (!p->token_info_enabled) return;
10847     ptinfo = ALLOC(token_info);
10848     ptinfo->token = token;
10849     ptinfo->next = p->token_info;
10850     setup_token_info(ptinfo, p->lex.pbeg, loc);
10851 
10852     p->token_info = ptinfo;
10853 }
10854 
10855 static void
token_info_pop(struct parser_params * p,const char * token,const rb_code_location_t * loc)10856 token_info_pop(struct parser_params *p, const char *token, const rb_code_location_t *loc)
10857 {
10858     token_info *ptinfo_beg = p->token_info;
10859 
10860     if (!ptinfo_beg) return;
10861     p->token_info = ptinfo_beg->next;
10862 
10863     /* indentation check of matched keywords (begin..end, if..end, etc.) */
10864     token_info_warn(p, token, ptinfo_beg, 1, loc);
10865     ruby_sized_xfree(ptinfo_beg, sizeof(*ptinfo_beg));
10866 }
10867 
10868 static void
token_info_warn(struct parser_params * p,const char * token,token_info * ptinfo_beg,int same,const rb_code_location_t * loc)10869 token_info_warn(struct parser_params *p, const char *token, token_info *ptinfo_beg, int same, const rb_code_location_t *loc)
10870 {
10871     token_info ptinfo_end_body, *ptinfo_end = &ptinfo_end_body;
10872     if (!p->token_info_enabled) return;
10873     if (!ptinfo_beg) return;
10874     setup_token_info(ptinfo_end, p->lex.pbeg, loc);
10875     if (ptinfo_beg->linenum == ptinfo_end->linenum) return; /* ignore one-line block */
10876     if (ptinfo_beg->nonspc || ptinfo_end->nonspc) return; /* ignore keyword in the middle of a line */
10877     if (ptinfo_beg->column == ptinfo_end->column) return; /* the indents are matched */
10878     if (!same && ptinfo_beg->column < ptinfo_end->column) return;
10879     rb_warn3L(ptinfo_end->linenum,
10880 	      "mismatched indentations at '%s' with '%s' at %d",
10881 	      WARN_S(token), WARN_S(ptinfo_beg->token), WARN_I(ptinfo_beg->linenum));
10882 }
10883 
10884 static int
parser_precise_mbclen(struct parser_params * p,const char * ptr)10885 parser_precise_mbclen(struct parser_params *p, const char *ptr)
10886 {
10887     int len = rb_enc_precise_mbclen(ptr, p->lex.pend, p->enc);
10888     if (!MBCLEN_CHARFOUND_P(len)) {
10889 	compile_error(p, "invalid multibyte char (%s)", rb_enc_name(p->enc));
10890 	return -1;
10891     }
10892     return len;
10893 }
10894 
10895 static int
parser_yyerror(struct parser_params * p,const YYLTYPE * yylloc,const char * msg)10896 parser_yyerror(struct parser_params *p, const YYLTYPE *yylloc, const char *msg)
10897 {
10898 #ifndef RIPPER
10899     const int max_line_margin = 30;
10900     const char *ptr, *ptr_end, *pt, *pb;
10901     const char *pre = "", *post = "", *pend;
10902     const char *code = "", *caret = "", *newline = "";
10903     const char *lim;
10904     char *buf;
10905     long len;
10906     int i;
10907     YYLTYPE current;
10908 
10909     if (!yylloc) {
10910 	RUBY_SET_YYLLOC(current);
10911 	yylloc = &current;
10912     }
10913     else if ((p->ruby_sourceline != yylloc->beg_pos.lineno &&
10914 	      p->ruby_sourceline != yylloc->end_pos.lineno) ||
10915 	     (yylloc->beg_pos.lineno == yylloc->end_pos.lineno &&
10916 	      yylloc->beg_pos.column == yylloc->end_pos.column)) {
10917 	compile_error(p, "%s", msg);
10918 	return 0;
10919     }
10920 
10921     pend = p->lex.pend;
10922     if (pend > p->lex.pbeg && pend[-1] == '\n') {
10923 	if (--pend > p->lex.pbeg && pend[-1] == '\r') --pend;
10924     }
10925 
10926     pt = (p->ruby_sourceline == yylloc->end_pos.lineno) ?
10927 	    p->lex.pbeg + yylloc->end_pos.column : p->lex.pend;
10928     ptr = ptr_end = pt < pend ? pt : pend;
10929     lim = ptr - p->lex.pbeg > max_line_margin ? ptr - max_line_margin : p->lex.pbeg;
10930     while ((lim < ptr) && (*(ptr-1) != '\n')) ptr--;
10931 
10932     lim = pend - ptr_end > max_line_margin ? ptr_end + max_line_margin : pend;
10933     while ((ptr_end < lim) && (*ptr_end != '\n')) ptr_end++;
10934 
10935     len = ptr_end - ptr;
10936     if (len > 4) {
10937 	if (ptr > p->lex.pbeg) {
10938 	    ptr = rb_enc_prev_char(p->lex.pbeg, ptr, pt, rb_enc_get(p->lex.lastline));
10939 	    if (ptr > p->lex.pbeg) pre = "...";
10940 	}
10941 	if (ptr_end < pend) {
10942 	    ptr_end = rb_enc_prev_char(pt, ptr_end, pend, rb_enc_get(p->lex.lastline));
10943 	    if (ptr_end < pend) post = "...";
10944 	}
10945     }
10946     pb = p->lex.pbeg;
10947     if (p->ruby_sourceline == yylloc->beg_pos.lineno) {
10948 	pb += yylloc->beg_pos.column;
10949 	if (pb > pt) pb = pt;
10950     }
10951     if (pb < ptr) pb = ptr;
10952     if (len <= 4 && yylloc->beg_pos.lineno == yylloc->end_pos.lineno) {
10953 	compile_error(p, "%s", msg);
10954     }
10955     else if (!p->error_buffer && rb_stderr_tty_p()) {
10956 #define CSI_BEGIN "\033["
10957 #define CSI_SGR "m"
10958 	compile_error(p, "%s\n"
10959 		      CSI_BEGIN""CSI_SGR"%s" /* pre */
10960 		      CSI_BEGIN"1"CSI_SGR"%.*s"
10961 		      CSI_BEGIN"1;4"CSI_SGR"%.*s"
10962 		      CSI_BEGIN";1"CSI_SGR"%.*s"
10963 		      CSI_BEGIN""CSI_SGR"%s" /* post */,
10964 		      msg, pre,
10965 		      (int)(pb - ptr), ptr,
10966 		      (int)(pt - pb), pb,
10967 		      (int)(ptr_end - pt), pt,
10968 		      post);
10969     }
10970     else {
10971 	char *p2;
10972 
10973 	len = ptr_end - ptr;
10974 	lim = pt < pend ? pt : pend;
10975 	i = (int)(lim - ptr);
10976 	buf = ALLOCA_N(char, i+2);
10977 	code = ptr;
10978 	caret = p2 = buf;
10979 	if (ptr <= pb) {
10980 	    while (ptr < pb) {
10981 		*p2++ = *ptr++ == '\t' ? '\t' : ' ';
10982 	    }
10983 	    *p2++ = '^';
10984 	    ptr++;
10985 	}
10986 	if (lim > ptr) {
10987 	    memset(p2, '~', (lim - ptr));
10988 	    p2 += (lim - ptr);
10989 	}
10990 	*p2 = '\0';
10991 	newline = "\n";
10992 	compile_error(p, "%s%s""%s%.*s%s%s""%s%s",
10993 		      msg, newline,
10994 		      pre, (int)len, code, post, newline,
10995 		      pre, caret);
10996     }
10997 #else
10998     dispatch1(parse_error, STR_NEW2(msg));
10999     ripper_error(p);
11000 #endif /* !RIPPER */
11001     return 0;
11002 }
11003 
11004 static int
vtable_size(const struct vtable * tbl)11005 vtable_size(const struct vtable *tbl)
11006 {
11007     if (!DVARS_TERMINAL_P(tbl)) {
11008 	return tbl->pos;
11009     }
11010     else {
11011 	return 0;
11012     }
11013 }
11014 
11015 static struct vtable *
vtable_alloc_gen(struct parser_params * p,int line,struct vtable * prev)11016 vtable_alloc_gen(struct parser_params *p, int line, struct vtable *prev)
11017 {
11018     struct vtable *tbl = ALLOC(struct vtable);
11019     tbl->pos = 0;
11020     tbl->capa = 8;
11021     tbl->tbl = ALLOC_N(ID, tbl->capa);
11022     tbl->prev = prev;
11023 #ifndef RIPPER
11024     if (p->debug) {
11025 	rb_parser_printf(p, "vtable_alloc:%d: %p\n", line, (void *)tbl);
11026     }
11027 #endif
11028     return tbl;
11029 }
11030 #define vtable_alloc(prev) vtable_alloc_gen(p, __LINE__, prev)
11031 
11032 static void
vtable_free_gen(struct parser_params * p,int line,const char * name,struct vtable * tbl)11033 vtable_free_gen(struct parser_params *p, int line, const char *name,
11034 		struct vtable *tbl)
11035 {
11036 #ifndef RIPPER
11037     if (p->debug) {
11038 	rb_parser_printf(p, "vtable_free:%d: %s(%p)\n", line, name, (void *)tbl);
11039     }
11040 #endif
11041     if (!DVARS_TERMINAL_P(tbl)) {
11042 	if (tbl->tbl) {
11043 	    ruby_sized_xfree(tbl->tbl, tbl->capa * sizeof(ID));
11044 	}
11045 	ruby_sized_xfree(tbl, sizeof(tbl));
11046     }
11047 }
11048 #define vtable_free(tbl) vtable_free_gen(p, __LINE__, #tbl, tbl)
11049 
11050 static void
vtable_add_gen(struct parser_params * p,int line,const char * name,struct vtable * tbl,ID id)11051 vtable_add_gen(struct parser_params *p, int line, const char *name,
11052 	       struct vtable *tbl, ID id)
11053 {
11054 #ifndef RIPPER
11055     if (p->debug) {
11056 	rb_parser_printf(p, "vtable_add:%d: %s(%p), %s\n",
11057 			 line, name, (void *)tbl, rb_id2name(id));
11058     }
11059 #endif
11060     if (DVARS_TERMINAL_P(tbl)) {
11061 	rb_parser_fatal(p, "vtable_add: vtable is not allocated (%p)", (void *)tbl);
11062 	return;
11063     }
11064     if (tbl->pos == tbl->capa) {
11065 	tbl->capa = tbl->capa * 2;
11066 	SIZED_REALLOC_N(tbl->tbl, ID, tbl->capa, tbl->pos);
11067     }
11068     tbl->tbl[tbl->pos++] = id;
11069 }
11070 #define vtable_add(tbl, id) vtable_add_gen(p, __LINE__, #tbl, tbl, id)
11071 
11072 #ifndef RIPPER
11073 static void
vtable_pop_gen(struct parser_params * p,int line,const char * name,struct vtable * tbl,int n)11074 vtable_pop_gen(struct parser_params *p, int line, const char *name,
11075 	       struct vtable *tbl, int n)
11076 {
11077     if (p->debug) {
11078 	rb_parser_printf(p, "vtable_pop:%d: %s(%p), %d\n",
11079 			 line, name, (void *)tbl, n);
11080     }
11081     if (tbl->pos < n) {
11082 	rb_parser_fatal(p, "vtable_pop: unreachable (%d < %d)", tbl->pos, n);
11083 	return;
11084     }
11085     tbl->pos -= n;
11086 }
11087 #define vtable_pop(tbl, n) vtable_pop_gen(p, __LINE__, #tbl, tbl, n)
11088 #endif
11089 
11090 static int
vtable_included(const struct vtable * tbl,ID id)11091 vtable_included(const struct vtable * tbl, ID id)
11092 {
11093     int i;
11094 
11095     if (!DVARS_TERMINAL_P(tbl)) {
11096 	for (i = 0; i < tbl->pos; i++) {
11097 	    if (tbl->tbl[i] == id) {
11098 		return i+1;
11099 	    }
11100 	}
11101     }
11102     return 0;
11103 }
11104 
11105 static void parser_prepare(struct parser_params *p);
11106 
11107 #ifndef RIPPER
11108 static NODE *parser_append_options(struct parser_params *p, NODE *node);
11109 
11110 static VALUE
debug_lines(VALUE fname)11111 debug_lines(VALUE fname)
11112 {
11113     ID script_lines;
11114     CONST_ID(script_lines, "SCRIPT_LINES__");
11115     if (rb_const_defined_at(rb_cObject, script_lines)) {
11116 	VALUE hash = rb_const_get_at(rb_cObject, script_lines);
11117 	if (RB_TYPE_P(hash, T_HASH)) {
11118 	    VALUE lines = rb_ary_new();
11119 	    rb_hash_aset(hash, fname, lines);
11120 	    return lines;
11121 	}
11122     }
11123     return 0;
11124 }
11125 
11126 static int
e_option_supplied(struct parser_params * p)11127 e_option_supplied(struct parser_params *p)
11128 {
11129     return strcmp(p->ruby_sourcefile, "-e") == 0;
11130 }
11131 
11132 static VALUE
yycompile0(VALUE arg)11133 yycompile0(VALUE arg)
11134 {
11135     int n;
11136     NODE *tree;
11137     struct parser_params *p = (struct parser_params *)arg;
11138     VALUE cov = Qfalse;
11139 
11140     if (!compile_for_eval && rb_safe_level() == 0 && !NIL_P(p->ruby_sourcefile_string)) {
11141 	p->debug_lines = debug_lines(p->ruby_sourcefile_string);
11142 	if (p->debug_lines && p->ruby_sourceline > 0) {
11143 	    VALUE str = STR_NEW0();
11144 	    n = p->ruby_sourceline;
11145 	    do {
11146 		rb_ary_push(p->debug_lines, str);
11147 	    } while (--n);
11148 	}
11149 
11150 	if (!e_option_supplied(p)) {
11151 	    cov = Qtrue;
11152 	}
11153     }
11154 
11155     parser_prepare(p);
11156 #define RUBY_DTRACE_PARSE_HOOK(name) \
11157     if (RUBY_DTRACE_PARSE_##name##_ENABLED()) { \
11158 	RUBY_DTRACE_PARSE_##name(p->ruby_sourcefile, p->ruby_sourceline); \
11159     }
11160     RUBY_DTRACE_PARSE_HOOK(BEGIN);
11161     n = yyparse(p);
11162     RUBY_DTRACE_PARSE_HOOK(END);
11163     p->debug_lines = 0;
11164 
11165     p->lex.strterm = 0;
11166     p->lex.pcur = p->lex.pbeg = p->lex.pend = 0;
11167     p->lex.prevline = p->lex.lastline = p->lex.nextline = 0;
11168     if (n || p->error_p) {
11169 	VALUE mesg = p->error_buffer;
11170 	if (!mesg) {
11171 	    mesg = rb_class_new_instance(0, 0, rb_eSyntaxError);
11172 	}
11173 	rb_set_errinfo(mesg);
11174 	return FALSE;
11175     }
11176     tree = p->eval_tree;
11177     if (!tree) {
11178 	tree = NEW_NIL(&NULL_LOC);
11179     }
11180     else {
11181 	VALUE opt = p->compile_option;
11182 	NODE *prelude;
11183 	NODE *body = parser_append_options(p, tree->nd_body);
11184 	if (!opt) opt = rb_obj_hide(rb_ident_hash_new());
11185 	rb_hash_aset(opt, rb_sym_intern_ascii_cstr("coverage_enabled"), cov);
11186 	prelude = block_append(p, p->eval_tree_begin, body);
11187 	add_mark_object(p, opt);
11188 	tree->nd_body = prelude;
11189 	p->ast->body.compile_option = opt;
11190     }
11191     p->ast->body.root = tree;
11192     p->ast->body.line_count = p->line_count;
11193     return TRUE;
11194 }
11195 
11196 static rb_ast_t *
yycompile(VALUE vparser,struct parser_params * p,VALUE fname,int line)11197 yycompile(VALUE vparser, struct parser_params *p, VALUE fname, int line)
11198 {
11199     rb_ast_t *ast;
11200     if (NIL_P(fname)) {
11201 	p->ruby_sourcefile_string = Qnil;
11202 	p->ruby_sourcefile = "(none)";
11203     }
11204     else {
11205 	p->ruby_sourcefile_string = rb_fstring(fname);
11206 	p->ruby_sourcefile = StringValueCStr(fname);
11207     }
11208     p->ruby_sourceline = line - 1;
11209 
11210     p->ast = ast = rb_ast_new();
11211     rb_suppress_tracing(yycompile0, (VALUE)p);
11212     p->ast = 0;
11213     RB_GC_GUARD(vparser); /* prohibit tail call optimization */
11214 
11215     return ast;
11216 }
11217 #endif /* !RIPPER */
11218 
11219 static rb_encoding *
must_be_ascii_compatible(VALUE s)11220 must_be_ascii_compatible(VALUE s)
11221 {
11222     rb_encoding *enc = rb_enc_get(s);
11223     if (!rb_enc_asciicompat(enc)) {
11224 	rb_raise(rb_eArgError, "invalid source encoding");
11225     }
11226     return enc;
11227 }
11228 
11229 static VALUE
lex_get_str(struct parser_params * p,VALUE s)11230 lex_get_str(struct parser_params *p, VALUE s)
11231 {
11232     char *beg, *end, *start;
11233     long len;
11234 
11235     beg = RSTRING_PTR(s);
11236     len = RSTRING_LEN(s);
11237     start = beg;
11238     if (p->lex.gets_.ptr) {
11239 	if (len == p->lex.gets_.ptr) return Qnil;
11240 	beg += p->lex.gets_.ptr;
11241 	len -= p->lex.gets_.ptr;
11242     }
11243     end = memchr(beg, '\n', len);
11244     if (end) len = ++end - beg;
11245     p->lex.gets_.ptr += len;
11246     return rb_str_subseq(s, beg - start, len);
11247 }
11248 
11249 static VALUE
lex_getline(struct parser_params * p)11250 lex_getline(struct parser_params *p)
11251 {
11252     VALUE line = (*p->lex.gets)(p, p->lex.input);
11253     if (NIL_P(line)) return line;
11254     must_be_ascii_compatible(line);
11255 #ifndef RIPPER
11256     if (p->debug_lines) {
11257 	rb_enc_associate(line, p->enc);
11258 	rb_ary_push(p->debug_lines, line);
11259     }
11260 #endif
11261     p->line_count++;
11262     return line;
11263 }
11264 
11265 static const rb_data_type_t parser_data_type;
11266 
11267 #ifndef RIPPER
11268 static rb_ast_t*
parser_compile_string(VALUE vparser,VALUE fname,VALUE s,int line)11269 parser_compile_string(VALUE vparser, VALUE fname, VALUE s, int line)
11270 {
11271     struct parser_params *p;
11272 
11273     TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, p);
11274 
11275     p->lex.gets = lex_get_str;
11276     p->lex.gets_.ptr = 0;
11277     p->lex.input = rb_str_new_frozen(s);
11278     p->lex.pbeg = p->lex.pcur = p->lex.pend = 0;
11279 
11280     return yycompile(vparser, p, fname, line);
11281 }
11282 
11283 rb_ast_t*
rb_compile_string(const char * f,VALUE s,int line)11284 rb_compile_string(const char *f, VALUE s, int line)
11285 {
11286     must_be_ascii_compatible(s);
11287     return parser_compile_string(rb_parser_new(), rb_filesystem_str_new_cstr(f), s, line);
11288 }
11289 
11290 rb_ast_t*
rb_parser_compile_string(VALUE vparser,const char * f,VALUE s,int line)11291 rb_parser_compile_string(VALUE vparser, const char *f, VALUE s, int line)
11292 {
11293     return rb_parser_compile_string_path(vparser, rb_filesystem_str_new_cstr(f), s, line);
11294 }
11295 
11296 rb_ast_t*
rb_parser_compile_string_path(VALUE vparser,VALUE f,VALUE s,int line)11297 rb_parser_compile_string_path(VALUE vparser, VALUE f, VALUE s, int line)
11298 {
11299     must_be_ascii_compatible(s);
11300     return parser_compile_string(vparser, f, s, line);
11301 }
11302 
11303 rb_ast_t*
rb_compile_cstr(const char * f,const char * s,int len,int line)11304 rb_compile_cstr(const char *f, const char *s, int len, int line)
11305 {
11306     VALUE str = rb_str_new(s, len);
11307     return parser_compile_string(rb_parser_new(), rb_filesystem_str_new_cstr(f), str, line);
11308 }
11309 
11310 rb_ast_t*
rb_parser_compile_cstr(VALUE vparser,const char * f,const char * s,int len,int line)11311 rb_parser_compile_cstr(VALUE vparser, const char *f, const char *s, int len, int line)
11312 {
11313     VALUE str = rb_str_new(s, len);
11314     return parser_compile_string(vparser, rb_filesystem_str_new_cstr(f), str, line);
11315 }
11316 
11317 VALUE rb_io_gets_internal(VALUE io);
11318 
11319 static VALUE
lex_io_gets(struct parser_params * p,VALUE io)11320 lex_io_gets(struct parser_params *p, VALUE io)
11321 {
11322     return rb_io_gets_internal(io);
11323 }
11324 
11325 rb_ast_t*
rb_compile_file(const char * f,VALUE file,int start)11326 rb_compile_file(const char *f, VALUE file, int start)
11327 {
11328     VALUE vparser = rb_parser_new();
11329 
11330     return rb_parser_compile_file(vparser, f, file, start);
11331 }
11332 
11333 rb_ast_t*
rb_parser_compile_file(VALUE vparser,const char * f,VALUE file,int start)11334 rb_parser_compile_file(VALUE vparser, const char *f, VALUE file, int start)
11335 {
11336     return rb_parser_compile_file_path(vparser, rb_filesystem_str_new_cstr(f), file, start);
11337 }
11338 
11339 rb_ast_t*
rb_parser_compile_file_path(VALUE vparser,VALUE fname,VALUE file,int start)11340 rb_parser_compile_file_path(VALUE vparser, VALUE fname, VALUE file, int start)
11341 {
11342     struct parser_params *p;
11343 
11344     TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, p);
11345 
11346     p->lex.gets = lex_io_gets;
11347     p->lex.input = file;
11348     p->lex.pbeg = p->lex.pcur = p->lex.pend = 0;
11349 
11350     return yycompile(vparser, p, fname, start);
11351 }
11352 
11353 static VALUE
lex_generic_gets(struct parser_params * p,VALUE input)11354 lex_generic_gets(struct parser_params *p, VALUE input)
11355 {
11356     return (*p->lex.gets_.call)(input, p->line_count);
11357 }
11358 
11359 rb_ast_t*
rb_parser_compile_generic(VALUE vparser,VALUE (* lex_gets)(VALUE,int),VALUE fname,VALUE input,int start)11360 rb_parser_compile_generic(VALUE vparser, VALUE (*lex_gets)(VALUE, int), VALUE fname, VALUE input, int start)
11361 {
11362     struct parser_params *p;
11363 
11364     TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, p);
11365 
11366     p->lex.gets = lex_generic_gets;
11367     p->lex.gets_.call = lex_gets;
11368     p->lex.input = input;
11369     p->lex.pbeg = p->lex.pcur = p->lex.pend = 0;
11370 
11371     return yycompile(vparser, p, fname, start);
11372 }
11373 #endif  /* !RIPPER */
11374 
11375 #define STR_FUNC_ESCAPE 0x01
11376 #define STR_FUNC_EXPAND 0x02
11377 #define STR_FUNC_REGEXP 0x04
11378 #define STR_FUNC_QWORDS 0x08
11379 #define STR_FUNC_SYMBOL 0x10
11380 #define STR_FUNC_INDENT 0x20
11381 #define STR_FUNC_LABEL  0x40
11382 #define STR_FUNC_LIST   0x4000
11383 #define STR_FUNC_TERM   0x8000
11384 
11385 enum string_type {
11386     str_label  = STR_FUNC_LABEL,
11387     str_squote = (0),
11388     str_dquote = (STR_FUNC_EXPAND),
11389     str_xquote = (STR_FUNC_EXPAND),
11390     str_regexp = (STR_FUNC_REGEXP|STR_FUNC_ESCAPE|STR_FUNC_EXPAND),
11391     str_sword  = (STR_FUNC_QWORDS|STR_FUNC_LIST),
11392     str_dword  = (STR_FUNC_QWORDS|STR_FUNC_EXPAND|STR_FUNC_LIST),
11393     str_ssym   = (STR_FUNC_SYMBOL),
11394     str_dsym   = (STR_FUNC_SYMBOL|STR_FUNC_EXPAND)
11395 };
11396 
11397 static VALUE
parser_str_new(const char * ptr,long len,rb_encoding * enc,int func,rb_encoding * enc0)11398 parser_str_new(const char *ptr, long len, rb_encoding *enc, int func, rb_encoding *enc0)
11399 {
11400     VALUE str;
11401 
11402     str = rb_enc_str_new(ptr, len, enc);
11403     if (!(func & STR_FUNC_REGEXP) && rb_enc_asciicompat(enc)) {
11404 	if (rb_enc_str_coderange(str) == ENC_CODERANGE_7BIT) {
11405 	}
11406 	else if (enc0 == rb_usascii_encoding() && enc != rb_utf8_encoding()) {
11407 	    rb_enc_associate(str, rb_ascii8bit_encoding());
11408 	}
11409     }
11410 
11411     return str;
11412 }
11413 
11414 #define lex_goto_eol(p) ((p)->lex.pcur = (p)->lex.pend)
11415 #define lex_eol_p(p) ((p)->lex.pcur >= (p)->lex.pend)
11416 #define lex_eol_n_p(p,n) ((p)->lex.pcur+(n) >= (p)->lex.pend)
11417 #define peek(p,c) peek_n(p, (c), 0)
11418 #define peek_n(p,c,n) (!lex_eol_n_p(p, n) && (c) == (unsigned char)(p)->lex.pcur[n])
11419 #define peekc(p) peekc_n(p, 0)
11420 #define peekc_n(p,n) (lex_eol_n_p(p, n) ? -1 : (unsigned char)(p)->lex.pcur[n])
11421 
11422 #ifdef RIPPER
11423 static void
add_delayed_token(struct parser_params * p,const char * tok,const char * end)11424 add_delayed_token(struct parser_params *p, const char *tok, const char *end)
11425 {
11426     if (tok < end) {
11427 	if (!has_delayed_token(p)) {
11428 	    p->delayed = rb_str_buf_new(1024);
11429 	    rb_enc_associate(p->delayed, p->enc);
11430 	    p->delayed_line = p->ruby_sourceline;
11431 	    p->delayed_col = (int)(tok - p->lex.pbeg);
11432 	}
11433 	rb_str_buf_cat(p->delayed, tok, end - tok);
11434 	p->lex.ptok = end;
11435     }
11436 }
11437 #else
11438 #define add_delayed_token(p, tok, end) ((void)(tok), (void)(end))
11439 #endif
11440 
11441 static int
nextline(struct parser_params * p)11442 nextline(struct parser_params *p)
11443 {
11444     VALUE v = p->lex.nextline;
11445     p->lex.nextline = 0;
11446     if (!v) {
11447 	if (p->eofp)
11448 	    return -1;
11449 
11450 	if (!p->lex.input || NIL_P(v = lex_getline(p))) {
11451 	    p->eofp = 1;
11452 	    lex_goto_eol(p);
11453 	    return -1;
11454 	}
11455 	p->cr_seen = FALSE;
11456     }
11457     add_delayed_token(p, p->lex.ptok, p->lex.pend);
11458     if (p->heredoc_end > 0) {
11459 	p->ruby_sourceline = p->heredoc_end;
11460 	p->heredoc_end = 0;
11461     }
11462     p->ruby_sourceline++;
11463     p->lex.pbeg = p->lex.pcur = RSTRING_PTR(v);
11464     p->lex.pend = p->lex.pcur + RSTRING_LEN(v);
11465     token_flush(p);
11466     p->lex.prevline = p->lex.lastline;
11467     p->lex.lastline = v;
11468     return 0;
11469 }
11470 
11471 static int
parser_cr(struct parser_params * p,int c)11472 parser_cr(struct parser_params *p, int c)
11473 {
11474     if (peek(p, '\n')) {
11475 	p->lex.pcur++;
11476 	c = '\n';
11477     }
11478     else if (!p->cr_seen) {
11479 	p->cr_seen = TRUE;
11480 	/* carried over with p->lex.nextline for nextc() */
11481 	rb_warn0("encountered \\r in middle of line, treated as a mere space");
11482     }
11483     return c;
11484 }
11485 
11486 static inline int
nextc(struct parser_params * p)11487 nextc(struct parser_params *p)
11488 {
11489     int c;
11490 
11491     if (UNLIKELY((p->lex.pcur == p->lex.pend) || p->eofp || p->lex.nextline)) {
11492 	if (nextline(p)) return -1;
11493     }
11494     c = (unsigned char)*p->lex.pcur++;
11495     if (UNLIKELY(c == '\r')) {
11496 	c = parser_cr(p, c);
11497     }
11498 
11499     return c;
11500 }
11501 
11502 static void
pushback(struct parser_params * p,int c)11503 pushback(struct parser_params *p, int c)
11504 {
11505     if (c == -1) return;
11506     p->lex.pcur--;
11507     if (p->lex.pcur > p->lex.pbeg && p->lex.pcur[0] == '\n' && p->lex.pcur[-1] == '\r') {
11508 	p->lex.pcur--;
11509     }
11510 }
11511 
11512 #define was_bol(p) ((p)->lex.pcur == (p)->lex.pbeg + 1)
11513 
11514 #define tokfix(p) ((p)->tokenbuf[(p)->tokidx]='\0')
11515 #define tok(p) (p)->tokenbuf
11516 #define toklen(p) (p)->tokidx
11517 
11518 static char*
newtok(struct parser_params * p)11519 newtok(struct parser_params *p)
11520 {
11521     p->tokidx = 0;
11522     p->tokline = p->ruby_sourceline;
11523     if (!p->tokenbuf) {
11524 	p->toksiz = 60;
11525 	p->tokenbuf = ALLOC_N(char, 60);
11526     }
11527     if (p->toksiz > 4096) {
11528 	p->toksiz = 60;
11529 	REALLOC_N(p->tokenbuf, char, 60);
11530     }
11531     return p->tokenbuf;
11532 }
11533 
11534 static char *
tokspace(struct parser_params * p,int n)11535 tokspace(struct parser_params *p, int n)
11536 {
11537     p->tokidx += n;
11538 
11539     if (p->tokidx >= p->toksiz) {
11540 	do {p->toksiz *= 2;} while (p->toksiz < p->tokidx);
11541 	REALLOC_N(p->tokenbuf, char, p->toksiz);
11542     }
11543     return &p->tokenbuf[p->tokidx-n];
11544 }
11545 
11546 static void
tokadd(struct parser_params * p,int c)11547 tokadd(struct parser_params *p, int c)
11548 {
11549     p->tokenbuf[p->tokidx++] = (char)c;
11550     if (p->tokidx >= p->toksiz) {
11551 	p->toksiz *= 2;
11552 	REALLOC_N(p->tokenbuf, char, p->toksiz);
11553     }
11554 }
11555 
11556 static int
tok_hex(struct parser_params * p,size_t * numlen)11557 tok_hex(struct parser_params *p, size_t *numlen)
11558 {
11559     int c;
11560 
11561     c = scan_hex(p->lex.pcur, 2, numlen);
11562     if (!*numlen) {
11563 	p->lex.ptok = p->lex.pcur;
11564 	yyerror0("invalid hex escape");
11565 	return 0;
11566     }
11567     p->lex.pcur += *numlen;
11568     return c;
11569 }
11570 
11571 #define tokcopy(p, n) memcpy(tokspace(p, n), (p)->lex.pcur - (n), (n))
11572 
11573 static int
tokadd_codepoint(struct parser_params * p,rb_encoding ** encp,int regexp_literal,int wide)11574 tokadd_codepoint(struct parser_params *p, rb_encoding **encp,
11575 		 int regexp_literal, int wide)
11576 {
11577     size_t numlen;
11578     int codepoint = scan_hex(p->lex.pcur, wide ? p->lex.pend - p->lex.pcur : 4, &numlen);
11579     literal_flush(p, p->lex.pcur);
11580     p->lex.pcur += numlen;
11581     if (wide ? (numlen == 0 || numlen > 6) : (numlen < 4))  {
11582 	yyerror0("invalid Unicode escape");
11583 	return wide && numlen > 0;
11584     }
11585     if (codepoint > 0x10ffff) {
11586 	yyerror0("invalid Unicode codepoint (too large)");
11587 	return wide;
11588     }
11589     if ((codepoint & 0xfffff800) == 0xd800) {
11590 	yyerror0("invalid Unicode codepoint");
11591 	return wide;
11592     }
11593     if (regexp_literal) {
11594 	tokcopy(p, (int)numlen);
11595     }
11596     else if (codepoint >= 0x80) {
11597 	rb_encoding *utf8 = rb_utf8_encoding();
11598 	if (*encp && utf8 != *encp) {
11599 	    static const char mixed_utf8[] = "UTF-8 mixed within %s source";
11600 	    size_t len = sizeof(mixed_utf8) - 2 + strlen(rb_enc_name(*encp));
11601 	    char *mesg = alloca(len);
11602 	    snprintf(mesg, len, mixed_utf8, rb_enc_name(*encp));
11603 	    yyerror0(mesg);
11604 	    return wide;
11605 	}
11606 	*encp = utf8;
11607 	tokaddmbc(p, codepoint, *encp);
11608     }
11609     else {
11610 	tokadd(p, codepoint);
11611     }
11612     return TRUE;
11613 }
11614 
11615 /* return value is for ?\u3042 */
11616 static int
parser_tokadd_utf8(struct parser_params * p,rb_encoding ** encp,int string_literal,int symbol_literal,int regexp_literal)11617 parser_tokadd_utf8(struct parser_params *p, rb_encoding **encp,
11618 		   int string_literal, int symbol_literal, int regexp_literal)
11619 {
11620     /*
11621      * If string_literal is true, then we allow multiple codepoints
11622      * in \u{}, and add the codepoints to the current token.
11623      * Otherwise we're parsing a character literal and return a single
11624      * codepoint without adding it
11625      */
11626 
11627     const int open_brace = '{', close_brace = '}';
11628 
11629     if (regexp_literal) { tokadd(p, '\\'); tokadd(p, 'u'); }
11630 
11631     if (peek(p, open_brace)) {  /* handle \u{...} form */
11632 	int c, last = nextc(p);
11633 	if (p->lex.pcur >= p->lex.pend) goto unterminated;
11634 	while (ISSPACE(c = *p->lex.pcur) && ++p->lex.pcur < p->lex.pend);
11635 	while (c != close_brace) {
11636 	    if (regexp_literal) tokadd(p, last);
11637 	    if (!tokadd_codepoint(p, encp, regexp_literal, TRUE)) {
11638 		break;
11639 	    }
11640 	    while (ISSPACE(c = *p->lex.pcur)) {
11641 		if (++p->lex.pcur >= p->lex.pend) goto unterminated;
11642 		last = c;
11643 	    }
11644 	}
11645 
11646 	if (c != close_brace) {
11647 	  unterminated:
11648 	    literal_flush(p, p->lex.pcur);
11649 	    yyerror0("unterminated Unicode escape");
11650 	    return 0;
11651 	}
11652 
11653 	if (regexp_literal) tokadd(p, close_brace);
11654 	nextc(p);
11655     }
11656     else {			/* handle \uxxxx form */
11657 	if (!tokadd_codepoint(p, encp, regexp_literal, FALSE)) {
11658 	    return 0;
11659 	}
11660     }
11661 
11662     return TRUE;
11663 }
11664 
11665 #define ESCAPE_CONTROL 1
11666 #define ESCAPE_META    2
11667 
11668 static int
read_escape(struct parser_params * p,int flags,rb_encoding ** encp)11669 read_escape(struct parser_params *p, int flags, rb_encoding **encp)
11670 {
11671     int c;
11672     size_t numlen;
11673 
11674     switch (c = nextc(p)) {
11675       case '\\':	/* Backslash */
11676 	return c;
11677 
11678       case 'n':	/* newline */
11679 	return '\n';
11680 
11681       case 't':	/* horizontal tab */
11682 	return '\t';
11683 
11684       case 'r':	/* carriage-return */
11685 	return '\r';
11686 
11687       case 'f':	/* form-feed */
11688 	return '\f';
11689 
11690       case 'v':	/* vertical tab */
11691 	return '\13';
11692 
11693       case 'a':	/* alarm(bell) */
11694 	return '\007';
11695 
11696       case 'e':	/* escape */
11697 	return 033;
11698 
11699       case '0': case '1': case '2': case '3': /* octal constant */
11700       case '4': case '5': case '6': case '7':
11701 	pushback(p, c);
11702 	c = scan_oct(p->lex.pcur, 3, &numlen);
11703 	p->lex.pcur += numlen;
11704 	return c;
11705 
11706       case 'x':	/* hex constant */
11707 	c = tok_hex(p, &numlen);
11708 	if (numlen == 0) return 0;
11709 	return c;
11710 
11711       case 'b':	/* backspace */
11712 	return '\010';
11713 
11714       case 's':	/* space */
11715 	return ' ';
11716 
11717       case 'M':
11718 	if (flags & ESCAPE_META) goto eof;
11719 	if ((c = nextc(p)) != '-') {
11720 	    goto eof;
11721 	}
11722 	if ((c = nextc(p)) == '\\') {
11723 	    if (peek(p, 'u')) goto eof;
11724 	    return read_escape(p, flags|ESCAPE_META, encp) | 0x80;
11725 	}
11726 	else if (c == -1 || !ISASCII(c)) goto eof;
11727 	else {
11728 	    return ((c & 0xff) | 0x80);
11729 	}
11730 
11731       case 'C':
11732 	if ((c = nextc(p)) != '-') {
11733 	    goto eof;
11734 	}
11735       case 'c':
11736 	if (flags & ESCAPE_CONTROL) goto eof;
11737 	if ((c = nextc(p))== '\\') {
11738 	    if (peek(p, 'u')) goto eof;
11739 	    c = read_escape(p, flags|ESCAPE_CONTROL, encp);
11740 	}
11741 	else if (c == '?')
11742 	    return 0177;
11743 	else if (c == -1 || !ISASCII(c)) goto eof;
11744 	return c & 0x9f;
11745 
11746       eof:
11747       case -1:
11748         yyerror0("Invalid escape character syntax");
11749 	pushback(p, c);
11750 	return '\0';
11751 
11752       default:
11753 	return c;
11754     }
11755 }
11756 
11757 static void
tokaddmbc(struct parser_params * p,int c,rb_encoding * enc)11758 tokaddmbc(struct parser_params *p, int c, rb_encoding *enc)
11759 {
11760     int len = rb_enc_codelen(c, enc);
11761     rb_enc_mbcput(c, tokspace(p, len), enc);
11762 }
11763 
11764 static int
tokadd_escape(struct parser_params * p,rb_encoding ** encp)11765 tokadd_escape(struct parser_params *p, rb_encoding **encp)
11766 {
11767     int c;
11768     int flags = 0;
11769     size_t numlen;
11770 
11771   first:
11772     switch (c = nextc(p)) {
11773       case '\n':
11774 	return 0;		/* just ignore */
11775 
11776       case '0': case '1': case '2': case '3': /* octal constant */
11777       case '4': case '5': case '6': case '7':
11778 	{
11779 	    ruby_scan_oct(--p->lex.pcur, 3, &numlen);
11780 	    if (numlen == 0) goto eof;
11781 	    p->lex.pcur += numlen;
11782 	    tokcopy(p, (int)numlen + 1);
11783 	}
11784 	return 0;
11785 
11786       case 'x':	/* hex constant */
11787 	{
11788 	    tok_hex(p, &numlen);
11789 	    if (numlen == 0) return -1;
11790 	    tokcopy(p, (int)numlen + 2);
11791 	}
11792 	return 0;
11793 
11794       case 'M':
11795 	if (flags & ESCAPE_META) goto eof;
11796 	if ((c = nextc(p)) != '-') {
11797 	    pushback(p, c);
11798 	    goto eof;
11799 	}
11800 	tokcopy(p, 3);
11801 	flags |= ESCAPE_META;
11802 	goto escaped;
11803 
11804       case 'C':
11805 	if (flags & ESCAPE_CONTROL) goto eof;
11806 	if ((c = nextc(p)) != '-') {
11807 	    pushback(p, c);
11808 	    goto eof;
11809 	}
11810 	tokcopy(p, 3);
11811 	goto escaped;
11812 
11813       case 'c':
11814 	if (flags & ESCAPE_CONTROL) goto eof;
11815 	tokcopy(p, 2);
11816 	flags |= ESCAPE_CONTROL;
11817       escaped:
11818 	if ((c = nextc(p)) == '\\') {
11819 	    goto first;
11820 	}
11821 	else if (c == -1) goto eof;
11822 	tokadd(p, c);
11823 	return 0;
11824 
11825       eof:
11826       case -1:
11827         yyerror0("Invalid escape character syntax");
11828 	return -1;
11829 
11830       default:
11831 	tokadd(p, '\\');
11832 	tokadd(p, c);
11833     }
11834     return 0;
11835 }
11836 
11837 static int
regx_options(struct parser_params * p)11838 regx_options(struct parser_params *p)
11839 {
11840     int kcode = 0;
11841     int kopt = 0;
11842     int options = 0;
11843     int c, opt, kc;
11844 
11845     newtok(p);
11846     while (c = nextc(p), ISALPHA(c)) {
11847         if (c == 'o') {
11848             options |= RE_OPTION_ONCE;
11849         }
11850         else if (rb_char_to_option_kcode(c, &opt, &kc)) {
11851 	    if (kc >= 0) {
11852 		if (kc != rb_ascii8bit_encindex()) kcode = c;
11853 		kopt = opt;
11854 	    }
11855 	    else {
11856 		options |= opt;
11857 	    }
11858         }
11859         else {
11860 	    tokadd(p, c);
11861         }
11862     }
11863     options |= kopt;
11864     pushback(p, c);
11865     if (toklen(p)) {
11866 	tokfix(p);
11867 	compile_error(p, "unknown regexp option%s - %*s",
11868 		      toklen(p) > 1 ? "s" : "", toklen(p), tok(p));
11869     }
11870     return options | RE_OPTION_ENCODING(kcode);
11871 }
11872 
11873 static int
tokadd_mbchar(struct parser_params * p,int c)11874 tokadd_mbchar(struct parser_params *p, int c)
11875 {
11876     int len = parser_precise_mbclen(p, p->lex.pcur-1);
11877     if (len < 0) return -1;
11878     tokadd(p, c);
11879     p->lex.pcur += --len;
11880     if (len > 0) tokcopy(p, len);
11881     return c;
11882 }
11883 
11884 static inline int
simple_re_meta(int c)11885 simple_re_meta(int c)
11886 {
11887     switch (c) {
11888       case '$': case '*': case '+': case '.':
11889       case '?': case '^': case '|':
11890       case ')': case ']': case '}': case '>':
11891 	return TRUE;
11892       default:
11893 	return FALSE;
11894     }
11895 }
11896 
11897 static int
parser_update_heredoc_indent(struct parser_params * p,int c)11898 parser_update_heredoc_indent(struct parser_params *p, int c)
11899 {
11900     if (p->heredoc_line_indent == -1) {
11901 	if (c == '\n') p->heredoc_line_indent = 0;
11902     }
11903     else {
11904 	if (c == ' ') {
11905 	    p->heredoc_line_indent++;
11906 	    return TRUE;
11907 	}
11908 	else if (c == '\t') {
11909 	    int w = (p->heredoc_line_indent / TAB_WIDTH) + 1;
11910 	    p->heredoc_line_indent = w * TAB_WIDTH;
11911 	    return TRUE;
11912 	}
11913 	else if (c != '\n') {
11914 	    if (p->heredoc_indent > p->heredoc_line_indent) {
11915 		p->heredoc_indent = p->heredoc_line_indent;
11916 	    }
11917 	    p->heredoc_line_indent = -1;
11918 	}
11919     }
11920     return FALSE;
11921 }
11922 
11923 static void
parser_mixed_error(struct parser_params * p,rb_encoding * enc1,rb_encoding * enc2)11924 parser_mixed_error(struct parser_params *p, rb_encoding *enc1, rb_encoding *enc2)
11925 {
11926     static const char mixed_msg[] = "%s mixed within %s source";
11927     const char *n1 = rb_enc_name(enc1), *n2 = rb_enc_name(enc2);
11928     const size_t len = sizeof(mixed_msg) - 4 + strlen(n1) + strlen(n2);
11929     char *errbuf = ALLOCA_N(char, len);
11930     snprintf(errbuf, len, mixed_msg, n1, n2);
11931     yyerror0(errbuf);
11932 }
11933 
11934 static void
parser_mixed_escape(struct parser_params * p,const char * beg,rb_encoding * enc1,rb_encoding * enc2)11935 parser_mixed_escape(struct parser_params *p, const char *beg, rb_encoding *enc1, rb_encoding *enc2)
11936 {
11937     const char *pos = p->lex.pcur;
11938     p->lex.pcur = beg;
11939     parser_mixed_error(p, enc1, enc2);
11940     p->lex.pcur = pos;
11941 }
11942 
11943 static int
tokadd_string(struct parser_params * p,int func,int term,int paren,long * nest,rb_encoding ** encp,rb_encoding ** enc)11944 tokadd_string(struct parser_params *p,
11945 	      int func, int term, int paren, long *nest,
11946 	      rb_encoding **encp, rb_encoding **enc)
11947 {
11948     int c;
11949     bool erred = false;
11950 
11951 #define mixed_error(enc1, enc2) \
11952     (void)(erred || (parser_mixed_error(p, enc1, enc2), erred = true))
11953 #define mixed_escape(beg, enc1, enc2) \
11954     (void)(erred || (parser_mixed_escape(p, beg, enc1, enc2), erred = true))
11955 
11956     while ((c = nextc(p)) != -1) {
11957 	if (p->heredoc_indent > 0) {
11958 	    parser_update_heredoc_indent(p, c);
11959 	}
11960 
11961 	if (paren && c == paren) {
11962 	    ++*nest;
11963 	}
11964 	else if (c == term) {
11965 	    if (!nest || !*nest) {
11966 		pushback(p, c);
11967 		break;
11968 	    }
11969 	    --*nest;
11970 	}
11971 	else if ((func & STR_FUNC_EXPAND) && c == '#' && p->lex.pcur < p->lex.pend) {
11972 	    int c2 = *p->lex.pcur;
11973 	    if (c2 == '$' || c2 == '@' || c2 == '{') {
11974 		pushback(p, c);
11975 		break;
11976 	    }
11977 	}
11978 	else if (c == '\\') {
11979 	    literal_flush(p, p->lex.pcur - 1);
11980 	    c = nextc(p);
11981 	    switch (c) {
11982 	      case '\n':
11983 		if (func & STR_FUNC_QWORDS) break;
11984 		if (func & STR_FUNC_EXPAND) {
11985 		    if (!(func & STR_FUNC_INDENT) || (p->heredoc_indent < 0))
11986 			continue;
11987 		    if (c == term) {
11988 			c = '\\';
11989 			goto terminate;
11990 		    }
11991 		}
11992 		tokadd(p, '\\');
11993 		break;
11994 
11995 	      case '\\':
11996 		if (func & STR_FUNC_ESCAPE) tokadd(p, c);
11997 		break;
11998 
11999 	      case 'u':
12000 		if ((func & STR_FUNC_EXPAND) == 0) {
12001 		    tokadd(p, '\\');
12002 		    break;
12003 		}
12004 		if (!parser_tokadd_utf8(p, enc, term,
12005 					func & STR_FUNC_SYMBOL,
12006 					func & STR_FUNC_REGEXP)) {
12007 		    return -1;
12008 		}
12009 		continue;
12010 
12011 	      default:
12012 		if (c == -1) return -1;
12013 		if (!ISASCII(c)) {
12014 		    if ((func & STR_FUNC_EXPAND) == 0) tokadd(p, '\\');
12015 		    goto non_ascii;
12016 		}
12017 		if (func & STR_FUNC_REGEXP) {
12018 		    if (c == term && !simple_re_meta(c)) {
12019 			tokadd(p, c);
12020 			continue;
12021 		    }
12022 		    pushback(p, c);
12023 		    if ((c = tokadd_escape(p, enc)) < 0)
12024 			return -1;
12025 		    if (*enc && *enc != *encp) {
12026 			mixed_escape(p->lex.ptok+2, *enc, *encp);
12027 		    }
12028 		    continue;
12029 		}
12030 		else if (func & STR_FUNC_EXPAND) {
12031 		    pushback(p, c);
12032 		    if (func & STR_FUNC_ESCAPE) tokadd(p, '\\');
12033 		    c = read_escape(p, 0, enc);
12034 		}
12035 		else if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) {
12036 		    /* ignore backslashed spaces in %w */
12037 		}
12038 		else if (c != term && !(paren && c == paren)) {
12039 		    tokadd(p, '\\');
12040 		    pushback(p, c);
12041 		    continue;
12042 		}
12043 	    }
12044 	}
12045 	else if (!parser_isascii(p)) {
12046 	  non_ascii:
12047 	    if (!*enc) {
12048 		*enc = *encp;
12049 	    }
12050 	    else if (*enc != *encp) {
12051 		mixed_error(*enc, *encp);
12052 		continue;
12053 	    }
12054 	    if (tokadd_mbchar(p, c) == -1) return -1;
12055 	    continue;
12056 	}
12057 	else if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) {
12058 	    pushback(p, c);
12059 	    break;
12060 	}
12061         if (c & 0x80) {
12062 	    if (!*enc) {
12063 		*enc = *encp;
12064 	    }
12065 	    else if (*enc != *encp) {
12066 		mixed_error(*enc, *encp);
12067 		continue;
12068 	    }
12069         }
12070 	tokadd(p, c);
12071     }
12072   terminate:
12073     if (*enc) *encp = *enc;
12074     return c;
12075 }
12076 
12077 static inline rb_strterm_t *
new_strterm(VALUE v1,VALUE v2,VALUE v3,VALUE v0)12078 new_strterm(VALUE v1, VALUE v2, VALUE v3, VALUE v0)
12079 {
12080     return (rb_strterm_t*)rb_imemo_new(imemo_parser_strterm, v1, v2, v3, v0);
12081 }
12082 
12083 /* imemo_parser_strterm for literal */
12084 #define NEW_STRTERM(func, term, paren) \
12085     new_strterm((VALUE)(func), (VALUE)(paren), (VALUE)(term), 0)
12086 
12087 #ifdef RIPPER
12088 static void
flush_string_content(struct parser_params * p,rb_encoding * enc)12089 flush_string_content(struct parser_params *p, rb_encoding *enc)
12090 {
12091     VALUE content = yylval.val;
12092     if (!ripper_is_node_yylval(content))
12093 	content = ripper_new_yylval(p, 0, 0, content);
12094     if (has_delayed_token(p)) {
12095 	ptrdiff_t len = p->lex.pcur - p->lex.ptok;
12096 	if (len > 0) {
12097 	    rb_enc_str_buf_cat(p->delayed, p->lex.ptok, len, enc);
12098 	}
12099 	dispatch_delayed_token(p, tSTRING_CONTENT);
12100 	p->lex.ptok = p->lex.pcur;
12101 	RNODE(content)->nd_rval = yylval.val;
12102     }
12103     dispatch_scan_event(p, tSTRING_CONTENT);
12104     if (yylval.val != content)
12105 	RNODE(content)->nd_rval = yylval.val;
12106     yylval.val = content;
12107 }
12108 #else
12109 #define flush_string_content(p, enc) ((void)(enc))
12110 #endif
12111 
12112 RUBY_FUNC_EXPORTED const unsigned int ruby_global_name_punct_bits[(0x7e - 0x20 + 31) / 32];
12113 /* this can be shared with ripper, since it's independent from struct
12114  * parser_params. */
12115 #ifndef RIPPER
12116 #define BIT(c, idx) (((c) / 32 - 1 == idx) ? (1U << ((c) % 32)) : 0)
12117 #define SPECIAL_PUNCT(idx) ( \
12118 	BIT('~', idx) | BIT('*', idx) | BIT('$', idx) | BIT('?', idx) | \
12119 	BIT('!', idx) | BIT('@', idx) | BIT('/', idx) | BIT('\\', idx) | \
12120 	BIT(';', idx) | BIT(',', idx) | BIT('.', idx) | BIT('=', idx) | \
12121 	BIT(':', idx) | BIT('<', idx) | BIT('>', idx) | BIT('\"', idx) | \
12122 	BIT('&', idx) | BIT('`', idx) | BIT('\'', idx) | BIT('+', idx) | \
12123 	BIT('0', idx))
12124 const unsigned int ruby_global_name_punct_bits[] = {
12125     SPECIAL_PUNCT(0),
12126     SPECIAL_PUNCT(1),
12127     SPECIAL_PUNCT(2),
12128 };
12129 #undef BIT
12130 #undef SPECIAL_PUNCT
12131 #endif
12132 
12133 static enum yytokentype
parser_peek_variable_name(struct parser_params * p)12134 parser_peek_variable_name(struct parser_params *p)
12135 {
12136     int c;
12137     const char *ptr = p->lex.pcur;
12138 
12139     if (ptr + 1 >= p->lex.pend) return 0;
12140     c = *ptr++;
12141     switch (c) {
12142       case '$':
12143 	if ((c = *ptr) == '-') {
12144 	    if (++ptr >= p->lex.pend) return 0;
12145 	    c = *ptr;
12146 	}
12147 	else if (is_global_name_punct(c) || ISDIGIT(c)) {
12148 	    return tSTRING_DVAR;
12149 	}
12150 	break;
12151       case '@':
12152 	if ((c = *ptr) == '@') {
12153 	    if (++ptr >= p->lex.pend) return 0;
12154 	    c = *ptr;
12155 	}
12156 	break;
12157       case '{':
12158 	p->lex.pcur = ptr;
12159 	p->command_start = TRUE;
12160 	return tSTRING_DBEG;
12161       default:
12162 	return 0;
12163     }
12164     if (!ISASCII(c) || c == '_' || ISALPHA(c))
12165 	return tSTRING_DVAR;
12166     return 0;
12167 }
12168 
12169 #define IS_ARG() IS_lex_state(EXPR_ARG_ANY)
12170 #define IS_END() IS_lex_state(EXPR_END_ANY)
12171 #define IS_BEG() (IS_lex_state(EXPR_BEG_ANY) || IS_lex_state_all(EXPR_ARG|EXPR_LABELED))
12172 #define IS_SPCARG(c) (IS_ARG() && space_seen && !ISSPACE(c))
12173 #define IS_LABEL_POSSIBLE() (\
12174 	(IS_lex_state(EXPR_LABEL|EXPR_ENDFN) && !cmd_state) || \
12175 	IS_ARG())
12176 #define IS_LABEL_SUFFIX(n) (peek_n(p, ':',(n)) && !peek_n(p, ':', (n)+1))
12177 #define IS_AFTER_OPERATOR() IS_lex_state(EXPR_FNAME | EXPR_DOT)
12178 
12179 static inline enum yytokentype
parser_string_term(struct parser_params * p,int func)12180 parser_string_term(struct parser_params *p, int func)
12181 {
12182     p->lex.strterm = 0;
12183     if (func & STR_FUNC_REGEXP) {
12184 	set_yylval_num(regx_options(p));
12185 	dispatch_scan_event(p, tREGEXP_END);
12186 	SET_LEX_STATE(EXPR_END);
12187 	return tREGEXP_END;
12188     }
12189     if ((func & STR_FUNC_LABEL) && IS_LABEL_SUFFIX(0)) {
12190 	nextc(p);
12191 	SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
12192 	return tLABEL_END;
12193     }
12194     SET_LEX_STATE(EXPR_END);
12195     return tSTRING_END;
12196 }
12197 
12198 static enum yytokentype
parse_string(struct parser_params * p,rb_strterm_literal_t * quote)12199 parse_string(struct parser_params *p, rb_strterm_literal_t *quote)
12200 {
12201     int func = (int)quote->u1.func;
12202     int term = (int)quote->u3.term;
12203     int paren = (int)quote->u2.paren;
12204     int c, space = 0;
12205     rb_encoding *enc = p->enc;
12206     rb_encoding *base_enc = 0;
12207     VALUE lit;
12208 
12209     if (func & STR_FUNC_TERM) {
12210 	if (func & STR_FUNC_QWORDS) nextc(p); /* delayed term */
12211 	SET_LEX_STATE(EXPR_END);
12212 	p->lex.strterm = 0;
12213 	return func & STR_FUNC_REGEXP ? tREGEXP_END : tSTRING_END;
12214     }
12215     c = nextc(p);
12216     if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) {
12217 	do {c = nextc(p);} while (ISSPACE(c));
12218 	space = 1;
12219     }
12220     if (func & STR_FUNC_LIST) {
12221 	quote->u1.func &= ~STR_FUNC_LIST;
12222 	space = 1;
12223     }
12224     if (c == term && !quote->u0.nest) {
12225 	if (func & STR_FUNC_QWORDS) {
12226 	    quote->u1.func |= STR_FUNC_TERM;
12227 	    pushback(p, c); /* dispatch the term at tSTRING_END */
12228 	    add_delayed_token(p, p->lex.ptok, p->lex.pcur);
12229 	    return ' ';
12230 	}
12231 	return parser_string_term(p, func);
12232     }
12233     if (space) {
12234 	pushback(p, c);
12235 	add_delayed_token(p, p->lex.ptok, p->lex.pcur);
12236 	return ' ';
12237     }
12238     newtok(p);
12239     if ((func & STR_FUNC_EXPAND) && c == '#') {
12240 	int t = parser_peek_variable_name(p);
12241 	if (t) return t;
12242 	tokadd(p, '#');
12243 	c = nextc(p);
12244     }
12245     pushback(p, c);
12246     if (tokadd_string(p, func, term, paren, &quote->u0.nest,
12247 		      &enc, &base_enc) == -1) {
12248 	if (p->eofp) {
12249 #ifndef RIPPER
12250 # define unterminated_literal(mesg) yyerror0(mesg)
12251 #else
12252 # define unterminated_literal(mesg) compile_error(p,  mesg)
12253 #endif
12254 	    literal_flush(p, p->lex.pcur);
12255 	    if (func & STR_FUNC_REGEXP) {
12256 		unterminated_literal("unterminated regexp meets end of file");
12257 	    }
12258 	    else {
12259 		unterminated_literal("unterminated string meets end of file");
12260 	    }
12261 	    quote->u1.func |= STR_FUNC_TERM;
12262 	}
12263     }
12264 
12265     tokfix(p);
12266     add_mark_object(p, lit = STR_NEW3(tok(p), toklen(p), enc, func));
12267     set_yylval_str(lit);
12268     flush_string_content(p, enc);
12269 
12270     return tSTRING_CONTENT;
12271 }
12272 
12273 static enum yytokentype
heredoc_identifier(struct parser_params * p)12274 heredoc_identifier(struct parser_params *p)
12275 {
12276     /*
12277      * term_len is length of `<<"END"` except `END`,
12278      * in this case term_len is 4 (<, <, " and ").
12279      */
12280     int c = nextc(p), term, func = 0, term_len = 2;
12281     enum yytokentype token = tSTRING_BEG;
12282     long len;
12283     int newline = 0;
12284     int indent = 0;
12285 
12286     if (c == '-') {
12287 	c = nextc(p);
12288 	term_len++;
12289 	func = STR_FUNC_INDENT;
12290     }
12291     else if (c == '~') {
12292 	c = nextc(p);
12293 	term_len++;
12294 	func = STR_FUNC_INDENT;
12295 	indent = INT_MAX;
12296     }
12297     switch (c) {
12298       case '\'':
12299 	term_len++;
12300 	func |= str_squote; goto quoted;
12301       case '"':
12302 	term_len++;
12303 	func |= str_dquote; goto quoted;
12304       case '`':
12305 	term_len++;
12306 	token = tXSTRING_BEG;
12307 	func |= str_xquote; goto quoted;
12308 
12309       quoted:
12310 	term_len++;
12311 	newtok(p);
12312 	tokadd(p, term_len);
12313 	tokadd(p, func);
12314 	term = c;
12315 	while ((c = nextc(p)) != -1 && c != term) {
12316 	    if (tokadd_mbchar(p, c) == -1) return 0;
12317 	    if (!newline && c == '\n') newline = 1;
12318 	    else if (newline) newline = 2;
12319 	}
12320 	if (c == -1) {
12321 	    yyerror(NULL, p, "unterminated here document identifier");
12322 	    return -1;
12323 	}
12324 	switch (newline) {
12325 	  case 1:
12326 	    rb_warn0("here document identifier ends with a newline");
12327 	    if (--p->tokidx > 0 && p->tokenbuf[p->tokidx] == '\r') --p->tokidx;
12328 	    break;
12329 	  case 2:
12330 	    compile_error(p, "here document identifier across newlines, never match");
12331 	    return -1;
12332 	}
12333 	break;
12334 
12335       default:
12336 	if (!parser_is_identchar(p)) {
12337 	    pushback(p, c);
12338 	    if (func & STR_FUNC_INDENT) {
12339 		pushback(p, indent > 0 ? '~' : '-');
12340 	    }
12341 	    return 0;
12342 	}
12343 	newtok(p);
12344 	tokadd(p, term_len);
12345 	tokadd(p, func |= str_dquote);
12346 	do {
12347 	    if (tokadd_mbchar(p, c) == -1) return 0;
12348 	} while ((c = nextc(p)) != -1 && parser_is_identchar(p));
12349 	pushback(p, c);
12350 	break;
12351     }
12352 
12353     tokfix(p);
12354     dispatch_scan_event(p, tHEREDOC_BEG);
12355     len = p->lex.pcur - p->lex.pbeg;
12356     lex_goto_eol(p);
12357 
12358     p->lex.strterm = new_strterm(STR_NEW(tok(p), toklen(p)), /* term */
12359 				 p->lex.lastline, /* lastline */
12360 				 len, /* lastidx */
12361 				 p->ruby_sourceline);
12362     p->lex.strterm->flags |= STRTERM_HEREDOC;
12363 
12364     token_flush(p);
12365     p->heredoc_indent = indent;
12366     p->heredoc_line_indent = 0;
12367     return token;
12368 }
12369 
12370 static void
heredoc_restore(struct parser_params * p,rb_strterm_heredoc_t * here)12371 heredoc_restore(struct parser_params *p, rb_strterm_heredoc_t *here)
12372 {
12373     VALUE line;
12374 
12375     p->lex.strterm = 0;
12376     line = here->lastline;
12377     p->lex.lastline = line;
12378     p->lex.pbeg = RSTRING_PTR(line);
12379     p->lex.pend = p->lex.pbeg + RSTRING_LEN(line);
12380     p->lex.pcur = p->lex.pbeg + here->u3.lastidx;
12381     p->heredoc_end = p->ruby_sourceline;
12382     p->ruby_sourceline = (int)here->sourceline;
12383     token_flush(p);
12384 }
12385 
12386 static int
dedent_string(VALUE string,int width)12387 dedent_string(VALUE string, int width)
12388 {
12389     char *str;
12390     long len;
12391     int i, col = 0;
12392 
12393     RSTRING_GETMEM(string, str, len);
12394     for (i = 0; i < len && col < width; i++) {
12395 	if (str[i] == ' ') {
12396 	    col++;
12397 	}
12398 	else if (str[i] == '\t') {
12399 	    int n = TAB_WIDTH * (col / TAB_WIDTH + 1);
12400 	    if (n > width) break;
12401 	    col = n;
12402 	}
12403 	else {
12404 	    break;
12405 	}
12406     }
12407     if (!i) return 0;
12408     rb_str_modify(string);
12409     str = RSTRING_PTR(string);
12410     if (RSTRING_LEN(string) != len)
12411 	rb_fatal("literal string changed: %+"PRIsVALUE, string);
12412     MEMMOVE(str, str + i, char, len - i);
12413     rb_str_set_len(string, len - i);
12414     return i;
12415 }
12416 
12417 #ifndef RIPPER
12418 static NODE *
heredoc_dedent(struct parser_params * p,NODE * root)12419 heredoc_dedent(struct parser_params *p, NODE *root)
12420 {
12421     NODE *node, *str_node, *prev_node;
12422     int indent = p->heredoc_indent;
12423     VALUE prev_lit = 0;
12424 
12425     if (indent <= 0) return root;
12426     p->heredoc_indent = 0;
12427     if (!root) return root;
12428 
12429     prev_node = node = str_node = root;
12430     if (nd_type(root) == NODE_ARRAY) str_node = root->nd_head;
12431 
12432     while (str_node) {
12433 	VALUE lit = str_node->nd_lit;
12434 	if (str_node->flags & NODE_FL_NEWLINE) {
12435 	    dedent_string(lit, indent);
12436 	}
12437 	if (!prev_lit) {
12438 	    prev_lit = lit;
12439 	}
12440 	else if (!literal_concat0(p, prev_lit, lit)) {
12441 	    return 0;
12442 	}
12443 	else {
12444 	    NODE *end = node->nd_end;
12445 	    node = prev_node->nd_next = node->nd_next;
12446 	    if (!node) {
12447 		if (nd_type(prev_node) == NODE_DSTR)
12448 		    nd_set_type(prev_node, NODE_STR);
12449 		break;
12450 	    }
12451 	    node->nd_end = end;
12452 	    goto next_str;
12453 	}
12454 
12455 	str_node = 0;
12456 	while ((node = (prev_node = node)->nd_next) != 0) {
12457 	  next_str:
12458 	    if (nd_type(node) != NODE_ARRAY) break;
12459 	    if ((str_node = node->nd_head) != 0) {
12460 		enum node_type type = nd_type(str_node);
12461 		if (type == NODE_STR || type == NODE_DSTR) break;
12462 		prev_lit = 0;
12463 		str_node = 0;
12464 	    }
12465 	}
12466     }
12467     return root;
12468 }
12469 #else /* RIPPER */
12470 static VALUE
heredoc_dedent(struct parser_params * p,VALUE array)12471 heredoc_dedent(struct parser_params *p, VALUE array)
12472 {
12473     int indent = p->heredoc_indent;
12474 
12475     if (indent <= 0) return array;
12476     p->heredoc_indent = 0;
12477     dispatch2(heredoc_dedent, array, INT2NUM(indent));
12478     return array;
12479 }
12480 
12481 /*
12482  *  call-seq:
12483  *    Ripper.dedent_string(input, width)   -> Integer
12484  *
12485  *  USE OF RIPPER LIBRARY ONLY.
12486  *
12487  *  Strips up to +width+ leading whitespaces from +input+,
12488  *  and returns the stripped column width.
12489  */
12490 static VALUE
parser_dedent_string(VALUE self,VALUE input,VALUE width)12491 parser_dedent_string(VALUE self, VALUE input, VALUE width)
12492 {
12493     int wid, col;
12494 
12495     StringValue(input);
12496     wid = NUM2UINT(width);
12497     col = dedent_string(input, wid);
12498     return INT2NUM(col);
12499 }
12500 #endif
12501 
12502 static int
whole_match_p(struct parser_params * p,const char * eos,long len,int indent)12503 whole_match_p(struct parser_params *p, const char *eos, long len, int indent)
12504 {
12505     const char *ptr = p->lex.pbeg;
12506     long n;
12507 
12508     if (indent) {
12509 	while (*ptr && ISSPACE(*ptr)) ptr++;
12510     }
12511     n = p->lex.pend - (ptr + len);
12512     if (n < 0) return FALSE;
12513     if (n > 0 && ptr[len] != '\n') {
12514 	if (ptr[len] != '\r') return FALSE;
12515 	if (n <= 1 || ptr[len+1] != '\n') return FALSE;
12516     }
12517     return strncmp(eos, ptr, len) == 0;
12518 }
12519 
12520 #define NUM_SUFFIX_R   (1<<0)
12521 #define NUM_SUFFIX_I   (1<<1)
12522 #define NUM_SUFFIX_ALL 3
12523 
12524 static int
number_literal_suffix(struct parser_params * p,int mask)12525 number_literal_suffix(struct parser_params *p, int mask)
12526 {
12527     int c, result = 0;
12528     const char *lastp = p->lex.pcur;
12529 
12530     while ((c = nextc(p)) != -1) {
12531 	if ((mask & NUM_SUFFIX_I) && c == 'i') {
12532 	    result |= (mask & NUM_SUFFIX_I);
12533 	    mask &= ~NUM_SUFFIX_I;
12534 	    /* r after i, rational of complex is disallowed */
12535 	    mask &= ~NUM_SUFFIX_R;
12536 	    continue;
12537 	}
12538 	if ((mask & NUM_SUFFIX_R) && c == 'r') {
12539 	    result |= (mask & NUM_SUFFIX_R);
12540 	    mask &= ~NUM_SUFFIX_R;
12541 	    continue;
12542 	}
12543 	if (!ISASCII(c) || ISALPHA(c) || c == '_') {
12544 	    p->lex.pcur = lastp;
12545 	    literal_flush(p, p->lex.pcur);
12546 	    return 0;
12547 	}
12548 	pushback(p, c);
12549 	if (c == '.') {
12550 	    c = peekc_n(p, 1);
12551 	    if (ISDIGIT(c)) {
12552 		yyerror0("unexpected fraction part after numeric literal");
12553 		p->lex.pcur += 2;
12554 		while (parser_is_identchar(p)) nextc(p);
12555 	    }
12556 	}
12557 	break;
12558     }
12559     return result;
12560 }
12561 
12562 static enum yytokentype
set_number_literal(struct parser_params * p,VALUE v,enum yytokentype type,int suffix)12563 set_number_literal(struct parser_params *p, VALUE v,
12564 		   enum yytokentype type, int suffix)
12565 {
12566     if (suffix & NUM_SUFFIX_I) {
12567 	v = rb_complex_raw(INT2FIX(0), v);
12568 	type = tIMAGINARY;
12569     }
12570     set_yylval_literal(v);
12571     add_mark_object(p, v);
12572     SET_LEX_STATE(EXPR_END);
12573     return type;
12574 }
12575 
12576 static enum yytokentype
set_integer_literal(struct parser_params * p,VALUE v,int suffix)12577 set_integer_literal(struct parser_params *p, VALUE v, int suffix)
12578 {
12579     enum yytokentype type = tINTEGER;
12580     if (suffix & NUM_SUFFIX_R) {
12581 	v = rb_rational_raw1(v);
12582 	type = tRATIONAL;
12583     }
12584     return set_number_literal(p, v, type, suffix);
12585 }
12586 
12587 #ifdef RIPPER
12588 static void
dispatch_heredoc_end(struct parser_params * p)12589 dispatch_heredoc_end(struct parser_params *p)
12590 {
12591     VALUE str;
12592     if (has_delayed_token(p))
12593 	dispatch_delayed_token(p, tSTRING_CONTENT);
12594     str = STR_NEW(p->lex.ptok, p->lex.pend - p->lex.ptok);
12595     ripper_dispatch1(p, ripper_token2eventid(tHEREDOC_END), str);
12596     lex_goto_eol(p);
12597     token_flush(p);
12598 }
12599 
12600 #else
12601 #define dispatch_heredoc_end(p) ((void)0)
12602 #endif
12603 
12604 static enum yytokentype
here_document(struct parser_params * p,rb_strterm_heredoc_t * here)12605 here_document(struct parser_params *p, rb_strterm_heredoc_t *here)
12606 {
12607     int c, func, indent = 0;
12608     const char *eos, *ptr, *ptr_end;
12609     long len;
12610     VALUE str = 0;
12611     rb_encoding *enc = p->enc;
12612     rb_encoding *base_enc = 0;
12613     int bol;
12614 
12615     eos = RSTRING_PTR(here->term);
12616     len = RSTRING_LEN(here->term) - 2; /* here->term includes term_len and func */
12617     eos++; /* skip term_len */
12618     indent = (func = *eos++) & STR_FUNC_INDENT;
12619 
12620     if ((c = nextc(p)) == -1) {
12621       error:
12622 	compile_error(p, "can't find string \"%s\" anywhere before EOF", eos);
12623 #ifdef RIPPER
12624 	if (!has_delayed_token(p)) {
12625 	    dispatch_scan_event(p, tSTRING_CONTENT);
12626 	}
12627 	else {
12628 	    if (str) {
12629 		rb_str_append(p->delayed, str);
12630 	    }
12631 	    else if ((len = p->lex.pcur - p->lex.ptok) > 0) {
12632 		if (!(func & STR_FUNC_REGEXP) && rb_enc_asciicompat(enc)) {
12633 		    int cr = ENC_CODERANGE_UNKNOWN;
12634 		    rb_str_coderange_scan_restartable(p->lex.ptok, p->lex.pcur, enc, &cr);
12635 		    if (cr != ENC_CODERANGE_7BIT &&
12636 			p->enc == rb_usascii_encoding() &&
12637 			enc != rb_utf8_encoding()) {
12638 			enc = rb_ascii8bit_encoding();
12639 		    }
12640 		}
12641 		rb_enc_str_buf_cat(p->delayed, p->lex.ptok, len, enc);
12642 	    }
12643 	    dispatch_delayed_token(p, tSTRING_CONTENT);
12644 	}
12645 	lex_goto_eol(p);
12646 #endif
12647       restore:
12648 	heredoc_restore(p, &p->lex.strterm->u.heredoc);
12649 	p->lex.strterm = 0;
12650 	return 0;
12651     }
12652     bol = was_bol(p);
12653     /* `heredoc_line_indent == -1` means
12654      * - "after an interpolation in the same line", or
12655      * - "in a continuing line"
12656      */
12657     if (bol &&
12658 	(p->heredoc_line_indent != -1 || (p->heredoc_line_indent = 0)) &&
12659 	whole_match_p(p, eos, len, indent)) {
12660 	dispatch_heredoc_end(p);
12661 	heredoc_restore(p, &p->lex.strterm->u.heredoc);
12662 	p->lex.strterm = 0;
12663 	SET_LEX_STATE(EXPR_END);
12664 	return tSTRING_END;
12665     }
12666 
12667     if (!(func & STR_FUNC_EXPAND)) {
12668 	do {
12669 	    ptr = RSTRING_PTR(p->lex.lastline);
12670 	    ptr_end = p->lex.pend;
12671 	    if (ptr_end > ptr) {
12672 		switch (ptr_end[-1]) {
12673 		  case '\n':
12674 		    if (--ptr_end == ptr || ptr_end[-1] != '\r') {
12675 			ptr_end++;
12676 			break;
12677 		    }
12678 		  case '\r':
12679 		    --ptr_end;
12680 		}
12681 	    }
12682 
12683 	    if (p->heredoc_indent > 0) {
12684 		long i = 0;
12685 		while (ptr + i < ptr_end && parser_update_heredoc_indent(p, ptr[i]))
12686 		    i++;
12687 		p->heredoc_line_indent = 0;
12688 	    }
12689 
12690 	    if (str)
12691 		rb_str_cat(str, ptr, ptr_end - ptr);
12692 	    else
12693 		str = STR_NEW(ptr, ptr_end - ptr);
12694 	    if (ptr_end < p->lex.pend) rb_str_cat(str, "\n", 1);
12695 	    lex_goto_eol(p);
12696 	    if (p->heredoc_indent > 0) {
12697 		goto flush_str;
12698 	    }
12699 	    if (nextc(p) == -1) {
12700 		if (str) {
12701 		    str = 0;
12702 		}
12703 		goto error;
12704 	    }
12705 	} while (!whole_match_p(p, eos, len, indent));
12706     }
12707     else {
12708 	/*	int mb = ENC_CODERANGE_7BIT, *mbp = &mb;*/
12709 	newtok(p);
12710 	if (c == '#') {
12711 	    int t = parser_peek_variable_name(p);
12712 	    if (p->heredoc_line_indent != -1) {
12713 		if (p->heredoc_indent > p->heredoc_line_indent) {
12714 		    p->heredoc_indent = p->heredoc_line_indent;
12715 		}
12716 		p->heredoc_line_indent = -1;
12717 	    }
12718 	    if (t) return t;
12719 	    tokadd(p, '#');
12720 	    c = nextc(p);
12721 	}
12722 	do {
12723 	    pushback(p, c);
12724 	    enc = p->enc;
12725 	    if ((c = tokadd_string(p, func, '\n', 0, NULL, &enc, &base_enc)) == -1) {
12726 		if (p->eofp) goto error;
12727 		goto restore;
12728 	    }
12729 	    if (c != '\n') {
12730 		if (c == '\\') p->heredoc_line_indent = -1;
12731 	      flush:
12732 		str = STR_NEW3(tok(p), toklen(p), enc, func);
12733 	      flush_str:
12734 		set_yylval_str(str);
12735 		add_mark_object(p, str);
12736 #ifndef RIPPER
12737 		if (bol) yylval.node->flags |= NODE_FL_NEWLINE;
12738 #endif
12739 		flush_string_content(p, enc);
12740 		return tSTRING_CONTENT;
12741 	    }
12742 	    tokadd(p, nextc(p));
12743 	    if (p->heredoc_indent > 0) {
12744 		lex_goto_eol(p);
12745 		goto flush;
12746 	    }
12747 	    /*	    if (mbp && mb == ENC_CODERANGE_UNKNOWN) mbp = 0;*/
12748 	    if ((c = nextc(p)) == -1) goto error;
12749 	} while (!whole_match_p(p, eos, len, indent));
12750 	str = STR_NEW3(tok(p), toklen(p), enc, func);
12751     }
12752     dispatch_heredoc_end(p);
12753 #ifdef RIPPER
12754     str = ripper_new_yylval(p, ripper_token2eventid(tSTRING_CONTENT),
12755 			    yylval.val, str);
12756 #endif
12757     heredoc_restore(p, &p->lex.strterm->u.heredoc);
12758     p->lex.strterm = NEW_STRTERM(func | STR_FUNC_TERM, 0, 0);
12759     set_yylval_str(str);
12760     add_mark_object(p, str);
12761 #ifndef RIPPER
12762     if (bol) yylval.node->flags |= NODE_FL_NEWLINE;
12763 #endif
12764     return tSTRING_CONTENT;
12765 }
12766 
12767 #include "lex.c"
12768 
12769 static int
arg_ambiguous(struct parser_params * p,char c)12770 arg_ambiguous(struct parser_params *p, char c)
12771 {
12772 #ifndef RIPPER
12773     rb_warning1("ambiguous first argument; put parentheses or a space even after `%c' operator", WARN_I(c));
12774 #else
12775     dispatch1(arg_ambiguous, rb_usascii_str_new(&c, 1));
12776 #endif
12777     return TRUE;
12778 }
12779 
12780 static ID
formal_argument(struct parser_params * p,ID lhs)12781 formal_argument(struct parser_params *p, ID lhs)
12782 {
12783     switch (id_type(lhs)) {
12784       case ID_LOCAL:
12785 	break;
12786 #ifndef RIPPER
12787       case ID_CONST:
12788 	yyerror0("formal argument cannot be a constant");
12789 	return 0;
12790       case ID_INSTANCE:
12791 	yyerror0("formal argument cannot be an instance variable");
12792 	return 0;
12793       case ID_GLOBAL:
12794 	yyerror0("formal argument cannot be a global variable");
12795 	return 0;
12796       case ID_CLASS:
12797 	yyerror0("formal argument cannot be a class variable");
12798 	return 0;
12799       default:
12800 	yyerror0("formal argument must be local variable");
12801 	return 0;
12802 #else
12803       default:
12804 	lhs = dispatch1(param_error, lhs);
12805 	ripper_error(p);
12806 	return 0;
12807 #endif
12808     }
12809     shadowing_lvar(p, lhs);
12810     return lhs;
12811 }
12812 
12813 static int
lvar_defined(struct parser_params * p,ID id)12814 lvar_defined(struct parser_params *p, ID id)
12815 {
12816     return (dyna_in_block(p) && dvar_defined(p, id)) || local_id(p, id);
12817 }
12818 
12819 /* emacsen -*- hack */
12820 static long
parser_encode_length(struct parser_params * p,const char * name,long len)12821 parser_encode_length(struct parser_params *p, const char *name, long len)
12822 {
12823     long nlen;
12824 
12825     if (len > 5 && name[nlen = len - 5] == '-') {
12826 	if (rb_memcicmp(name + nlen + 1, "unix", 4) == 0)
12827 	    return nlen;
12828     }
12829     if (len > 4 && name[nlen = len - 4] == '-') {
12830 	if (rb_memcicmp(name + nlen + 1, "dos", 3) == 0)
12831 	    return nlen;
12832 	if (rb_memcicmp(name + nlen + 1, "mac", 3) == 0 &&
12833 	    !(len == 8 && rb_memcicmp(name, "utf8-mac", len) == 0))
12834 	    /* exclude UTF8-MAC because the encoding named "UTF8" doesn't exist in Ruby */
12835 	    return nlen;
12836     }
12837     return len;
12838 }
12839 
12840 static void
parser_set_encode(struct parser_params * p,const char * name)12841 parser_set_encode(struct parser_params *p, const char *name)
12842 {
12843     int idx = rb_enc_find_index(name);
12844     rb_encoding *enc;
12845     VALUE excargs[3];
12846 
12847     if (idx < 0) {
12848 	excargs[1] = rb_sprintf("unknown encoding name: %s", name);
12849       error:
12850 	excargs[0] = rb_eArgError;
12851 	excargs[2] = rb_make_backtrace();
12852 	rb_ary_unshift(excargs[2], rb_sprintf("%"PRIsVALUE":%d", p->ruby_sourcefile_string, p->ruby_sourceline));
12853 	rb_exc_raise(rb_make_exception(3, excargs));
12854     }
12855     enc = rb_enc_from_index(idx);
12856     if (!rb_enc_asciicompat(enc)) {
12857 	excargs[1] = rb_sprintf("%s is not ASCII compatible", rb_enc_name(enc));
12858 	goto error;
12859     }
12860     p->enc = enc;
12861 #ifndef RIPPER
12862     if (p->debug_lines) {
12863 	VALUE lines = p->debug_lines;
12864 	long i, n = RARRAY_LEN(lines);
12865 	for (i = 0; i < n; ++i) {
12866 	    rb_enc_associate_index(RARRAY_AREF(lines, i), idx);
12867 	}
12868     }
12869 #endif
12870 }
12871 
12872 static int
comment_at_top(struct parser_params * p)12873 comment_at_top(struct parser_params *p)
12874 {
12875     const char *ptr = p->lex.pbeg, *ptr_end = p->lex.pcur - 1;
12876     if (p->line_count != (p->has_shebang ? 2 : 1)) return 0;
12877     while (ptr < ptr_end) {
12878 	if (!ISSPACE(*ptr)) return 0;
12879 	ptr++;
12880     }
12881     return 1;
12882 }
12883 
12884 typedef long (*rb_magic_comment_length_t)(struct parser_params *p, const char *name, long len);
12885 typedef void (*rb_magic_comment_setter_t)(struct parser_params *p, const char *name, const char *val);
12886 
12887 static void
magic_comment_encoding(struct parser_params * p,const char * name,const char * val)12888 magic_comment_encoding(struct parser_params *p, const char *name, const char *val)
12889 {
12890     if (!comment_at_top(p)) {
12891 	return;
12892     }
12893     parser_set_encode(p, val);
12894 }
12895 
12896 static int
parser_get_bool(struct parser_params * p,const char * name,const char * val)12897 parser_get_bool(struct parser_params *p, const char *name, const char *val)
12898 {
12899     switch (*val) {
12900       case 't': case 'T':
12901 	if (strcasecmp(val, "true") == 0) {
12902 	    return TRUE;
12903 	}
12904 	break;
12905       case 'f': case 'F':
12906 	if (strcasecmp(val, "false") == 0) {
12907 	    return FALSE;
12908 	}
12909 	break;
12910     }
12911     rb_compile_warning(p->ruby_sourcefile, p->ruby_sourceline, "invalid value for %s: %s", name, val);
12912     return -1;
12913 }
12914 
12915 static void
parser_set_token_info(struct parser_params * p,const char * name,const char * val)12916 parser_set_token_info(struct parser_params *p, const char *name, const char *val)
12917 {
12918     int b = parser_get_bool(p, name, val);
12919     if (b >= 0) p->token_info_enabled = b;
12920 }
12921 
12922 static void
parser_set_compile_option_flag(struct parser_params * p,const char * name,const char * val)12923 parser_set_compile_option_flag(struct parser_params *p, const char *name, const char *val)
12924 {
12925     int b;
12926 
12927     if (p->token_seen) {
12928 	rb_warning1("`%s' is ignored after any tokens", WARN_S(name));
12929 	return;
12930     }
12931 
12932     b = parser_get_bool(p, name, val);
12933     if (b < 0) return;
12934 
12935     if (!p->compile_option)
12936 	p->compile_option = rb_obj_hide(rb_ident_hash_new());
12937     rb_hash_aset(p->compile_option, ID2SYM(rb_intern(name)),
12938 		 (b ? Qtrue : Qfalse));
12939 }
12940 
12941 # if WARN_PAST_SCOPE
12942 static void
parser_set_past_scope(struct parser_params * p,const char * name,const char * val)12943 parser_set_past_scope(struct parser_params *p, const char *name, const char *val)
12944 {
12945     int b = parser_get_bool(p, name, val);
12946     if (b >= 0) p->past_scope_enabled = b;
12947 }
12948 # endif
12949 
12950 struct magic_comment {
12951     const char *name;
12952     rb_magic_comment_setter_t func;
12953     rb_magic_comment_length_t length;
12954 };
12955 
12956 static const struct magic_comment magic_comments[] = {
12957     {"coding", magic_comment_encoding, parser_encode_length},
12958     {"encoding", magic_comment_encoding, parser_encode_length},
12959     {"frozen_string_literal", parser_set_compile_option_flag},
12960     {"warn_indent", parser_set_token_info},
12961 # if WARN_PAST_SCOPE
12962     {"warn_past_scope", parser_set_past_scope},
12963 # endif
12964 };
12965 
12966 static const char *
magic_comment_marker(const char * str,long len)12967 magic_comment_marker(const char *str, long len)
12968 {
12969     long i = 2;
12970 
12971     while (i < len) {
12972 	switch (str[i]) {
12973 	  case '-':
12974 	    if (str[i-1] == '*' && str[i-2] == '-') {
12975 		return str + i + 1;
12976 	    }
12977 	    i += 2;
12978 	    break;
12979 	  case '*':
12980 	    if (i + 1 >= len) return 0;
12981 	    if (str[i+1] != '-') {
12982 		i += 4;
12983 	    }
12984 	    else if (str[i-1] != '-') {
12985 		i += 2;
12986 	    }
12987 	    else {
12988 		return str + i + 2;
12989 	    }
12990 	    break;
12991 	  default:
12992 	    i += 3;
12993 	    break;
12994 	}
12995     }
12996     return 0;
12997 }
12998 
12999 static int
parser_magic_comment(struct parser_params * p,const char * str,long len)13000 parser_magic_comment(struct parser_params *p, const char *str, long len)
13001 {
13002     int indicator = 0;
13003     VALUE name = 0, val = 0;
13004     const char *beg, *end, *vbeg, *vend;
13005 #define str_copy(_s, _p, _n) ((_s) \
13006 	? (void)(rb_str_resize((_s), (_n)), \
13007 	   MEMCPY(RSTRING_PTR(_s), (_p), char, (_n)), (_s)) \
13008 	: (void)((_s) = STR_NEW((_p), (_n))))
13009 
13010     if (len <= 7) return FALSE;
13011     if (!!(beg = magic_comment_marker(str, len))) {
13012 	if (!(end = magic_comment_marker(beg, str + len - beg)))
13013 	    return FALSE;
13014 	indicator = TRUE;
13015 	str = beg;
13016 	len = end - beg - 3;
13017     }
13018 
13019     /* %r"([^\\s\'\":;]+)\\s*:\\s*(\"(?:\\\\.|[^\"])*\"|[^\"\\s;]+)[\\s;]*" */
13020     while (len > 0) {
13021 	const struct magic_comment *mc = magic_comments;
13022 	char *s;
13023 	int i;
13024 	long n = 0;
13025 
13026 	for (; len > 0 && *str; str++, --len) {
13027 	    switch (*str) {
13028 	      case '\'': case '"': case ':': case ';':
13029 		continue;
13030 	    }
13031 	    if (!ISSPACE(*str)) break;
13032 	}
13033 	for (beg = str; len > 0; str++, --len) {
13034 	    switch (*str) {
13035 	      case '\'': case '"': case ':': case ';':
13036 		break;
13037 	      default:
13038 		if (ISSPACE(*str)) break;
13039 		continue;
13040 	    }
13041 	    break;
13042 	}
13043 	for (end = str; len > 0 && ISSPACE(*str); str++, --len);
13044 	if (!len) break;
13045 	if (*str != ':') {
13046 	    if (!indicator) return FALSE;
13047 	    continue;
13048 	}
13049 
13050 	do str++; while (--len > 0 && ISSPACE(*str));
13051 	if (!len) break;
13052 	if (*str == '"') {
13053 	    for (vbeg = ++str; --len > 0 && *str != '"'; str++) {
13054 		if (*str == '\\') {
13055 		    --len;
13056 		    ++str;
13057 		}
13058 	    }
13059 	    vend = str;
13060 	    if (len) {
13061 		--len;
13062 		++str;
13063 	    }
13064 	}
13065 	else {
13066 	    for (vbeg = str; len > 0 && *str != '"' && *str != ';' && !ISSPACE(*str); --len, str++);
13067 	    vend = str;
13068 	}
13069 	if (indicator) {
13070 	    while (len > 0 && (*str == ';' || ISSPACE(*str))) --len, str++;
13071 	}
13072 	else {
13073 	    while (len > 0 && (ISSPACE(*str))) --len, str++;
13074 	    if (len) return FALSE;
13075 	}
13076 
13077 	n = end - beg;
13078 	str_copy(name, beg, n);
13079 	s = RSTRING_PTR(name);
13080 	for (i = 0; i < n; ++i) {
13081 	    if (s[i] == '-') s[i] = '_';
13082 	}
13083 	do {
13084 	    if (STRNCASECMP(mc->name, s, n) == 0 && !mc->name[n]) {
13085 		n = vend - vbeg;
13086 		if (mc->length) {
13087 		    n = (*mc->length)(p, vbeg, n);
13088 		}
13089 		str_copy(val, vbeg, n);
13090 		(*mc->func)(p, mc->name, RSTRING_PTR(val));
13091 		break;
13092 	    }
13093 	} while (++mc < magic_comments + numberof(magic_comments));
13094 #ifdef RIPPER
13095 	str_copy(val, vbeg, vend - vbeg);
13096 	dispatch2(magic_comment, name, val);
13097 #endif
13098     }
13099 
13100     return TRUE;
13101 }
13102 
13103 static void
set_file_encoding(struct parser_params * p,const char * str,const char * send)13104 set_file_encoding(struct parser_params *p, const char *str, const char *send)
13105 {
13106     int sep = 0;
13107     const char *beg = str;
13108     VALUE s;
13109 
13110     for (;;) {
13111 	if (send - str <= 6) return;
13112 	switch (str[6]) {
13113 	  case 'C': case 'c': str += 6; continue;
13114 	  case 'O': case 'o': str += 5; continue;
13115 	  case 'D': case 'd': str += 4; continue;
13116 	  case 'I': case 'i': str += 3; continue;
13117 	  case 'N': case 'n': str += 2; continue;
13118 	  case 'G': case 'g': str += 1; continue;
13119 	  case '=': case ':':
13120 	    sep = 1;
13121 	    str += 6;
13122 	    break;
13123 	  default:
13124 	    str += 6;
13125 	    if (ISSPACE(*str)) break;
13126 	    continue;
13127 	}
13128 	if (STRNCASECMP(str-6, "coding", 6) == 0) break;
13129     }
13130     for (;;) {
13131 	do {
13132 	    if (++str >= send) return;
13133 	} while (ISSPACE(*str));
13134 	if (sep) break;
13135 	if (*str != '=' && *str != ':') return;
13136 	sep = 1;
13137 	str++;
13138     }
13139     beg = str;
13140     while ((*str == '-' || *str == '_' || ISALNUM(*str)) && ++str < send);
13141     s = rb_str_new(beg, parser_encode_length(p, beg, str - beg));
13142     parser_set_encode(p, RSTRING_PTR(s));
13143     rb_str_resize(s, 0);
13144 }
13145 
13146 static void
parser_prepare(struct parser_params * p)13147 parser_prepare(struct parser_params *p)
13148 {
13149     int c = nextc(p);
13150     p->token_info_enabled = !compile_for_eval && RTEST(ruby_verbose);
13151     switch (c) {
13152       case '#':
13153 	if (peek(p, '!')) p->has_shebang = 1;
13154 	break;
13155       case 0xef:		/* UTF-8 BOM marker */
13156 	if (p->lex.pend - p->lex.pcur >= 2 &&
13157 	    (unsigned char)p->lex.pcur[0] == 0xbb &&
13158 	    (unsigned char)p->lex.pcur[1] == 0xbf) {
13159 	    p->enc = rb_utf8_encoding();
13160 	    p->lex.pcur += 2;
13161 	    p->lex.pbeg = p->lex.pcur;
13162 	    return;
13163 	}
13164 	break;
13165       case EOF:
13166 	return;
13167     }
13168     pushback(p, c);
13169     p->enc = rb_enc_get(p->lex.lastline);
13170 }
13171 
13172 #ifndef RIPPER
13173 #define ambiguous_operator(tok, op, syn) ( \
13174     rb_warning0("`"op"' after local variable or literal is interpreted as binary operator"), \
13175     rb_warning0("even though it seems like "syn""))
13176 #else
13177 #define ambiguous_operator(tok, op, syn) \
13178     dispatch2(operator_ambiguous, TOKEN2VAL(tok), rb_str_new_cstr(syn))
13179 #endif
13180 #define warn_balanced(tok, op, syn) ((void) \
13181     (!IS_lex_state_for(last_state, EXPR_CLASS|EXPR_DOT|EXPR_FNAME|EXPR_ENDFN) && \
13182      space_seen && !ISSPACE(c) && \
13183      (ambiguous_operator(tok, op, syn), 0)), \
13184      (enum yytokentype)(tok))
13185 
13186 static VALUE
parse_rational(struct parser_params * p,char * str,int len,int seen_point)13187 parse_rational(struct parser_params *p, char *str, int len, int seen_point)
13188 {
13189     VALUE v;
13190     char *point = &str[seen_point];
13191     size_t fraclen = len-seen_point-1;
13192     memmove(point, point+1, fraclen+1);
13193     v = rb_cstr_to_inum(str, 10, FALSE);
13194     return rb_rational_new(v, rb_int_positive_pow(10, fraclen));
13195 }
13196 
13197 static enum yytokentype
no_digits(struct parser_params * p)13198 no_digits(struct parser_params *p)
13199 {
13200     yyerror0("numeric literal without digits");
13201     if (peek(p, '_')) nextc(p);
13202     /* dummy 0, for tUMINUS_NUM at numeric */
13203     return set_integer_literal(p, INT2FIX(0), 0);
13204 }
13205 
13206 static enum yytokentype
parse_numeric(struct parser_params * p,int c)13207 parse_numeric(struct parser_params *p, int c)
13208 {
13209     int is_float, seen_point, seen_e, nondigit;
13210     int suffix;
13211 
13212     is_float = seen_point = seen_e = nondigit = 0;
13213     SET_LEX_STATE(EXPR_END);
13214     newtok(p);
13215     if (c == '-' || c == '+') {
13216 	tokadd(p, c);
13217 	c = nextc(p);
13218     }
13219     if (c == '0') {
13220 	int start = toklen(p);
13221 	c = nextc(p);
13222 	if (c == 'x' || c == 'X') {
13223 	    /* hexadecimal */
13224 	    c = nextc(p);
13225 	    if (c != -1 && ISXDIGIT(c)) {
13226 		do {
13227 		    if (c == '_') {
13228 			if (nondigit) break;
13229 			nondigit = c;
13230 			continue;
13231 		    }
13232 		    if (!ISXDIGIT(c)) break;
13233 		    nondigit = 0;
13234 		    tokadd(p, c);
13235 		} while ((c = nextc(p)) != -1);
13236 	    }
13237 	    pushback(p, c);
13238 	    tokfix(p);
13239 	    if (toklen(p) == start) {
13240 		return no_digits(p);
13241 	    }
13242 	    else if (nondigit) goto trailing_uc;
13243 	    suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
13244 	    return set_integer_literal(p, rb_cstr_to_inum(tok(p), 16, FALSE), suffix);
13245 	}
13246 	if (c == 'b' || c == 'B') {
13247 	    /* binary */
13248 	    c = nextc(p);
13249 	    if (c == '0' || c == '1') {
13250 		do {
13251 		    if (c == '_') {
13252 			if (nondigit) break;
13253 			nondigit = c;
13254 			continue;
13255 		    }
13256 		    if (c != '0' && c != '1') break;
13257 		    nondigit = 0;
13258 		    tokadd(p, c);
13259 		} while ((c = nextc(p)) != -1);
13260 	    }
13261 	    pushback(p, c);
13262 	    tokfix(p);
13263 	    if (toklen(p) == start) {
13264 		return no_digits(p);
13265 	    }
13266 	    else if (nondigit) goto trailing_uc;
13267 	    suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
13268 	    return set_integer_literal(p, rb_cstr_to_inum(tok(p), 2, FALSE), suffix);
13269 	}
13270 	if (c == 'd' || c == 'D') {
13271 	    /* decimal */
13272 	    c = nextc(p);
13273 	    if (c != -1 && ISDIGIT(c)) {
13274 		do {
13275 		    if (c == '_') {
13276 			if (nondigit) break;
13277 			nondigit = c;
13278 			continue;
13279 		    }
13280 		    if (!ISDIGIT(c)) break;
13281 		    nondigit = 0;
13282 		    tokadd(p, c);
13283 		} while ((c = nextc(p)) != -1);
13284 	    }
13285 	    pushback(p, c);
13286 	    tokfix(p);
13287 	    if (toklen(p) == start) {
13288 		return no_digits(p);
13289 	    }
13290 	    else if (nondigit) goto trailing_uc;
13291 	    suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
13292 	    return set_integer_literal(p, rb_cstr_to_inum(tok(p), 10, FALSE), suffix);
13293 	}
13294 	if (c == '_') {
13295 	    /* 0_0 */
13296 	    goto octal_number;
13297 	}
13298 	if (c == 'o' || c == 'O') {
13299 	    /* prefixed octal */
13300 	    c = nextc(p);
13301 	    if (c == -1 || c == '_' || !ISDIGIT(c)) {
13302 		return no_digits(p);
13303 	    }
13304 	}
13305 	if (c >= '0' && c <= '7') {
13306 	    /* octal */
13307 	  octal_number:
13308 	    do {
13309 		if (c == '_') {
13310 		    if (nondigit) break;
13311 		    nondigit = c;
13312 		    continue;
13313 		}
13314 		if (c < '0' || c > '9') break;
13315 		if (c > '7') goto invalid_octal;
13316 		nondigit = 0;
13317 		tokadd(p, c);
13318 	    } while ((c = nextc(p)) != -1);
13319 	    if (toklen(p) > start) {
13320 		pushback(p, c);
13321 		tokfix(p);
13322 		if (nondigit) goto trailing_uc;
13323 		suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
13324 		return set_integer_literal(p, rb_cstr_to_inum(tok(p), 8, FALSE), suffix);
13325 	    }
13326 	    if (nondigit) {
13327 		pushback(p, c);
13328 		goto trailing_uc;
13329 	    }
13330 	}
13331 	if (c > '7' && c <= '9') {
13332 	  invalid_octal:
13333 	    yyerror0("Invalid octal digit");
13334 	}
13335 	else if (c == '.' || c == 'e' || c == 'E') {
13336 	    tokadd(p, '0');
13337 	}
13338 	else {
13339 	    pushback(p, c);
13340 	    suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
13341 	    return set_integer_literal(p, INT2FIX(0), suffix);
13342 	}
13343     }
13344 
13345     for (;;) {
13346 	switch (c) {
13347 	  case '0': case '1': case '2': case '3': case '4':
13348 	  case '5': case '6': case '7': case '8': case '9':
13349 	    nondigit = 0;
13350 	    tokadd(p, c);
13351 	    break;
13352 
13353 	  case '.':
13354 	    if (nondigit) goto trailing_uc;
13355 	    if (seen_point || seen_e) {
13356 		goto decode_num;
13357 	    }
13358 	    else {
13359 		int c0 = nextc(p);
13360 		if (c0 == -1 || !ISDIGIT(c0)) {
13361 		    pushback(p, c0);
13362 		    goto decode_num;
13363 		}
13364 		c = c0;
13365 	    }
13366 	    seen_point = toklen(p);
13367 	    tokadd(p, '.');
13368 	    tokadd(p, c);
13369 	    is_float++;
13370 	    nondigit = 0;
13371 	    break;
13372 
13373 	  case 'e':
13374 	  case 'E':
13375 	    if (nondigit) {
13376 		pushback(p, c);
13377 		c = nondigit;
13378 		goto decode_num;
13379 	    }
13380 	    if (seen_e) {
13381 		goto decode_num;
13382 	    }
13383 	    nondigit = c;
13384 	    c = nextc(p);
13385 	    if (c != '-' && c != '+' && !ISDIGIT(c)) {
13386 		pushback(p, c);
13387 		nondigit = 0;
13388 		goto decode_num;
13389 	    }
13390 	    tokadd(p, nondigit);
13391 	    seen_e++;
13392 	    is_float++;
13393 	    tokadd(p, c);
13394 	    nondigit = (c == '-' || c == '+') ? c : 0;
13395 	    break;
13396 
13397 	  case '_':	/* `_' in number just ignored */
13398 	    if (nondigit) goto decode_num;
13399 	    nondigit = c;
13400 	    break;
13401 
13402 	  default:
13403 	    goto decode_num;
13404 	}
13405 	c = nextc(p);
13406     }
13407 
13408   decode_num:
13409     pushback(p, c);
13410     if (nondigit) {
13411 	char tmp[30];
13412       trailing_uc:
13413 	literal_flush(p, p->lex.pcur - 1);
13414 	snprintf(tmp, sizeof(tmp), "trailing `%c' in number", nondigit);
13415 	yyerror0(tmp);
13416     }
13417     tokfix(p);
13418     if (is_float) {
13419 	enum yytokentype type = tFLOAT;
13420 	VALUE v;
13421 
13422 	suffix = number_literal_suffix(p, seen_e ? NUM_SUFFIX_I : NUM_SUFFIX_ALL);
13423 	if (suffix & NUM_SUFFIX_R) {
13424 	    type = tRATIONAL;
13425 	    v = parse_rational(p, tok(p), toklen(p), seen_point);
13426 	}
13427 	else {
13428 	    double d = strtod(tok(p), 0);
13429 	    if (errno == ERANGE) {
13430 		rb_warning1("Float %s out of range", WARN_S(tok(p)));
13431 		errno = 0;
13432 	    }
13433 	    v = DBL2NUM(d);
13434 	}
13435 	return set_number_literal(p, v, type, suffix);
13436     }
13437     suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
13438     return set_integer_literal(p, rb_cstr_to_inum(tok(p), 10, FALSE), suffix);
13439 }
13440 
13441 static enum yytokentype
parse_qmark(struct parser_params * p,int space_seen)13442 parse_qmark(struct parser_params *p, int space_seen)
13443 {
13444     rb_encoding *enc;
13445     register int c;
13446     VALUE lit;
13447 
13448     if (IS_END()) {
13449 	SET_LEX_STATE(EXPR_VALUE);
13450 	return '?';
13451     }
13452     c = nextc(p);
13453     if (c == -1) {
13454 	compile_error(p, "incomplete character syntax");
13455 	return 0;
13456     }
13457     if (rb_enc_isspace(c, p->enc)) {
13458 	if (!IS_ARG()) {
13459 	    int c2 = 0;
13460 	    switch (c) {
13461 	      case ' ':
13462 		c2 = 's';
13463 		break;
13464 	      case '\n':
13465 		c2 = 'n';
13466 		break;
13467 	      case '\t':
13468 		c2 = 't';
13469 		break;
13470 	      case '\v':
13471 		c2 = 'v';
13472 		break;
13473 	      case '\r':
13474 		c2 = 'r';
13475 		break;
13476 	      case '\f':
13477 		c2 = 'f';
13478 		break;
13479 	    }
13480 	    if (c2) {
13481 		rb_warn1("invalid character syntax; use ?\\%c", WARN_I(c2));
13482 	    }
13483 	}
13484       ternary:
13485 	pushback(p, c);
13486 	SET_LEX_STATE(EXPR_VALUE);
13487 	return '?';
13488     }
13489     newtok(p);
13490     enc = p->enc;
13491     if (!parser_isascii(p)) {
13492 	if (tokadd_mbchar(p, c) == -1) return 0;
13493     }
13494     else if ((rb_enc_isalnum(c, p->enc) || c == '_') &&
13495 	     p->lex.pcur < p->lex.pend && is_identchar(p->lex.pcur, p->lex.pend, p->enc)) {
13496 	if (space_seen) {
13497 	    const char *start = p->lex.pcur - 1, *ptr = start;
13498 	    do {
13499 		int n = parser_precise_mbclen(p, ptr);
13500 		if (n < 0) return -1;
13501 		ptr += n;
13502 	    } while (ptr < p->lex.pend && is_identchar(ptr, p->lex.pend, p->enc));
13503 	    rb_warn2("`?' just followed by `%.*s' is interpreted as" \
13504 		     " a conditional operator, put a space after `?'",
13505 		     WARN_I((int)(ptr - start)), WARN_S_L(start, (ptr - start)));
13506 	}
13507 	goto ternary;
13508     }
13509     else if (c == '\\') {
13510 	if (peek(p, 'u')) {
13511 	    nextc(p);
13512 	    enc = rb_utf8_encoding();
13513 	    if (!parser_tokadd_utf8(p, &enc, -1, 0, 0))
13514 		return 0;
13515 	}
13516 	else if (!lex_eol_p(p) && !(c = *p->lex.pcur, ISASCII(c))) {
13517 	    nextc(p);
13518 	    if (tokadd_mbchar(p, c) == -1) return 0;
13519 	}
13520 	else {
13521 	    c = read_escape(p, 0, &enc);
13522 	    tokadd(p, c);
13523 	}
13524     }
13525     else {
13526 	tokadd(p, c);
13527     }
13528     tokfix(p);
13529     add_mark_object(p, lit = STR_NEW3(tok(p), toklen(p), enc, 0));
13530     set_yylval_str(lit);
13531     SET_LEX_STATE(EXPR_END);
13532     return tCHAR;
13533 }
13534 
13535 static enum yytokentype
parse_percent(struct parser_params * p,const int space_seen,const enum lex_state_e last_state)13536 parse_percent(struct parser_params *p, const int space_seen, const enum lex_state_e last_state)
13537 {
13538     register int c;
13539 
13540     if (IS_BEG()) {
13541 	int term;
13542 	int paren;
13543 
13544 	c = nextc(p);
13545       quotation:
13546 	if (c == -1 || !ISALNUM(c)) {
13547 	    term = c;
13548 	    c = 'Q';
13549 	}
13550 	else {
13551 	    term = nextc(p);
13552 	    if (rb_enc_isalnum(term, p->enc) || !parser_isascii(p)) {
13553 		yyerror0("unknown type of %string");
13554 		return 0;
13555 	    }
13556 	}
13557 	if (c == -1 || term == -1) {
13558 	    compile_error(p, "unterminated quoted string meets end of file");
13559 	    return 0;
13560 	}
13561 	paren = term;
13562 	if (term == '(') term = ')';
13563 	else if (term == '[') term = ']';
13564 	else if (term == '{') term = '}';
13565 	else if (term == '<') term = '>';
13566 	else paren = 0;
13567 
13568 	switch (c) {
13569 	  case 'Q':
13570 	    p->lex.strterm = NEW_STRTERM(str_dquote, term, paren);
13571 	    return tSTRING_BEG;
13572 
13573 	  case 'q':
13574 	    p->lex.strterm = NEW_STRTERM(str_squote, term, paren);
13575 	    return tSTRING_BEG;
13576 
13577 	  case 'W':
13578 	    p->lex.strterm = NEW_STRTERM(str_dword, term, paren);
13579 	    return tWORDS_BEG;
13580 
13581 	  case 'w':
13582 	    p->lex.strterm = NEW_STRTERM(str_sword, term, paren);
13583 	    return tQWORDS_BEG;
13584 
13585 	  case 'I':
13586 	    p->lex.strterm = NEW_STRTERM(str_dword, term, paren);
13587 	    return tSYMBOLS_BEG;
13588 
13589 	  case 'i':
13590 	    p->lex.strterm = NEW_STRTERM(str_sword, term, paren);
13591 	    return tQSYMBOLS_BEG;
13592 
13593 	  case 'x':
13594 	    p->lex.strterm = NEW_STRTERM(str_xquote, term, paren);
13595 	    return tXSTRING_BEG;
13596 
13597 	  case 'r':
13598 	    p->lex.strterm = NEW_STRTERM(str_regexp, term, paren);
13599 	    return tREGEXP_BEG;
13600 
13601 	  case 's':
13602 	    p->lex.strterm = NEW_STRTERM(str_ssym, term, paren);
13603 	    SET_LEX_STATE(EXPR_FNAME|EXPR_FITEM);
13604 	    return tSYMBEG;
13605 
13606 	  default:
13607 	    yyerror0("unknown type of %string");
13608 	    return 0;
13609 	}
13610     }
13611     if ((c = nextc(p)) == '=') {
13612 	set_yylval_id('%');
13613 	SET_LEX_STATE(EXPR_BEG);
13614 	return tOP_ASGN;
13615     }
13616     if (IS_SPCARG(c) || (IS_lex_state(EXPR_FITEM) && c == 's')) {
13617 	goto quotation;
13618     }
13619     SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
13620     pushback(p, c);
13621     return warn_balanced('%', "%%", "string literal");
13622 }
13623 
13624 static int
tokadd_ident(struct parser_params * p,int c)13625 tokadd_ident(struct parser_params *p, int c)
13626 {
13627     do {
13628 	if (tokadd_mbchar(p, c) == -1) return -1;
13629 	c = nextc(p);
13630     } while (parser_is_identchar(p));
13631     pushback(p, c);
13632     return 0;
13633 }
13634 
13635 static ID
tokenize_ident(struct parser_params * p,const enum lex_state_e last_state)13636 tokenize_ident(struct parser_params *p, const enum lex_state_e last_state)
13637 {
13638     ID ident = TOK_INTERN();
13639 
13640     set_yylval_name(ident);
13641 
13642     return ident;
13643 }
13644 
13645 static int
parse_numvar(struct parser_params * p)13646 parse_numvar(struct parser_params *p)
13647 {
13648     size_t len;
13649     int overflow;
13650     unsigned long n = ruby_scan_digits(tok(p)+1, toklen(p)-1, 10, &len, &overflow);
13651     const unsigned long nth_ref_max =
13652 	((FIXNUM_MAX < INT_MAX) ? FIXNUM_MAX : INT_MAX) >> 1;
13653     /* NTH_REF is left-shifted to be ORed with back-ref flag and
13654      * turned into a Fixnum, in compile.c */
13655 
13656     if (overflow || n > nth_ref_max) {
13657 	/* compile_error()? */
13658 	rb_warn1("`%s' is too big for a number variable, always nil", WARN_S(tok(p)));
13659 	return 0;		/* $0 is $PROGRAM_NAME, not NTH_REF */
13660     }
13661     else {
13662 	return (int)n;
13663     }
13664 }
13665 
13666 static enum yytokentype
parse_gvar(struct parser_params * p,const enum lex_state_e last_state)13667 parse_gvar(struct parser_params *p, const enum lex_state_e last_state)
13668 {
13669     register int c;
13670 
13671     SET_LEX_STATE(EXPR_END);
13672     newtok(p);
13673     c = nextc(p);
13674     switch (c) {
13675       case '_':		/* $_: last read line string */
13676 	c = nextc(p);
13677 	if (parser_is_identchar(p)) {
13678 	    tokadd(p, '$');
13679 	    tokadd(p, '_');
13680 	    break;
13681 	}
13682 	pushback(p, c);
13683 	c = '_';
13684 	/* fall through */
13685       case '~':		/* $~: match-data */
13686       case '*':		/* $*: argv */
13687       case '$':		/* $$: pid */
13688       case '?':		/* $?: last status */
13689       case '!':		/* $!: error string */
13690       case '@':		/* $@: error position */
13691       case '/':		/* $/: input record separator */
13692       case '\\':		/* $\: output record separator */
13693       case ';':		/* $;: field separator */
13694       case ',':		/* $,: output field separator */
13695       case '.':		/* $.: last read line number */
13696       case '=':		/* $=: ignorecase */
13697       case ':':		/* $:: load path */
13698       case '<':		/* $<: reading filename */
13699       case '>':		/* $>: default output handle */
13700       case '\"':		/* $": already loaded files */
13701 	tokadd(p, '$');
13702 	tokadd(p, c);
13703 	goto gvar;
13704 
13705       case '-':
13706 	tokadd(p, '$');
13707 	tokadd(p, c);
13708 	c = nextc(p);
13709 	if (parser_is_identchar(p)) {
13710 	    if (tokadd_mbchar(p, c) == -1) return 0;
13711 	}
13712 	else {
13713 	    pushback(p, c);
13714 	    pushback(p, '-');
13715 	    return '$';
13716 	}
13717       gvar:
13718 	set_yylval_name(TOK_INTERN());
13719 	return tGVAR;
13720 
13721       case '&':		/* $&: last match */
13722       case '`':		/* $`: string before last match */
13723       case '\'':		/* $': string after last match */
13724       case '+':		/* $+: string matches last paren. */
13725 	if (IS_lex_state_for(last_state, EXPR_FNAME)) {
13726 	    tokadd(p, '$');
13727 	    tokadd(p, c);
13728 	    goto gvar;
13729 	}
13730 	set_yylval_node(NEW_BACK_REF(c, &_cur_loc));
13731 	return tBACK_REF;
13732 
13733       case '1': case '2': case '3':
13734       case '4': case '5': case '6':
13735       case '7': case '8': case '9':
13736 	tokadd(p, '$');
13737 	do {
13738 	    tokadd(p, c);
13739 	    c = nextc(p);
13740 	} while (c != -1 && ISDIGIT(c));
13741 	pushback(p, c);
13742 	if (IS_lex_state_for(last_state, EXPR_FNAME)) goto gvar;
13743 	tokfix(p);
13744 	set_yylval_node(NEW_NTH_REF(parse_numvar(p), &_cur_loc));
13745 	return tNTH_REF;
13746 
13747       default:
13748 	if (!parser_is_identchar(p)) {
13749 	    if (c == -1 || ISSPACE(c)) {
13750 		compile_error(p, "`$' without identifiers is not allowed as a global variable name");
13751 	    }
13752 	    else {
13753 		pushback(p, c);
13754 		compile_error(p, "`$%c' is not allowed as a global variable name", c);
13755 	    }
13756 	    return 0;
13757 	}
13758       case '0':
13759 	tokadd(p, '$');
13760     }
13761 
13762     if (tokadd_ident(p, c)) return 0;
13763     SET_LEX_STATE(EXPR_END);
13764     tokenize_ident(p, last_state);
13765     return tGVAR;
13766 }
13767 
13768 static enum yytokentype
parse_atmark(struct parser_params * p,const enum lex_state_e last_state)13769 parse_atmark(struct parser_params *p, const enum lex_state_e last_state)
13770 {
13771     enum yytokentype result = tIVAR;
13772     register int c = nextc(p);
13773 
13774     newtok(p);
13775     tokadd(p, '@');
13776     if (c == '@') {
13777 	result = tCVAR;
13778 	tokadd(p, '@');
13779 	c = nextc(p);
13780     }
13781     if (c == -1 || ISSPACE(c)) {
13782 	if (result == tIVAR) {
13783 	    compile_error(p, "`@' without identifiers is not allowed as an instance variable name");
13784 	}
13785 	else {
13786 	    compile_error(p, "`@@' without identifiers is not allowed as a class variable name");
13787 	}
13788 	return 0;
13789     }
13790     else if (ISDIGIT(c) || !parser_is_identchar(p)) {
13791 	pushback(p, c);
13792 	if (result == tIVAR) {
13793 	    compile_error(p, "`@%c' is not allowed as an instance variable name", c);
13794 	}
13795 	else {
13796 	    compile_error(p, "`@@%c' is not allowed as a class variable name", c);
13797 	}
13798 	return 0;
13799     }
13800 
13801     if (tokadd_ident(p, c)) return 0;
13802     SET_LEX_STATE(EXPR_END);
13803     tokenize_ident(p, last_state);
13804     return result;
13805 }
13806 
13807 static enum yytokentype
parse_ident(struct parser_params * p,int c,int cmd_state)13808 parse_ident(struct parser_params *p, int c, int cmd_state)
13809 {
13810     enum yytokentype result;
13811     int mb = ENC_CODERANGE_7BIT;
13812     const enum lex_state_e last_state = p->lex.state;
13813     ID ident;
13814 
13815     do {
13816 	if (!ISASCII(c)) mb = ENC_CODERANGE_UNKNOWN;
13817 	if (tokadd_mbchar(p, c) == -1) return 0;
13818 	c = nextc(p);
13819     } while (parser_is_identchar(p));
13820     if ((c == '!' || c == '?') && !peek(p, '=')) {
13821 	result = tFID;
13822 	tokadd(p, c);
13823     }
13824     else if (c == '=' && IS_lex_state(EXPR_FNAME) &&
13825 	     (!peek(p, '~') && !peek(p, '>') && (!peek(p, '=') || (peek_n(p, '>', 1))))) {
13826 	result = tIDENTIFIER;
13827 	tokadd(p, c);
13828     }
13829     else {
13830 	result = tCONSTANT;	/* assume provisionally */
13831 	pushback(p, c);
13832     }
13833     tokfix(p);
13834 
13835     if (IS_LABEL_POSSIBLE()) {
13836 	if (IS_LABEL_SUFFIX(0)) {
13837 	    SET_LEX_STATE(EXPR_ARG|EXPR_LABELED);
13838 	    nextc(p);
13839 	    set_yylval_name(TOK_INTERN());
13840 	    return tLABEL;
13841 	}
13842     }
13843     if (mb == ENC_CODERANGE_7BIT && !IS_lex_state(EXPR_DOT)) {
13844 	const struct kwtable *kw;
13845 
13846 	/* See if it is a reserved word.  */
13847 	kw = rb_reserved_word(tok(p), toklen(p));
13848 	if (kw) {
13849 	    enum lex_state_e state = p->lex.state;
13850 	    SET_LEX_STATE(kw->state);
13851 	    if (IS_lex_state_for(state, EXPR_FNAME)) {
13852 		set_yylval_name(rb_intern2(tok(p), toklen(p)));
13853 		return kw->id[0];
13854 	    }
13855 	    if (IS_lex_state(EXPR_BEG)) {
13856 		p->command_start = TRUE;
13857 	    }
13858 	    if (kw->id[0] == keyword_do) {
13859 		if (lambda_beginning_p()) {
13860 		    p->lex.lpar_beg = -1; /* make lambda_beginning_p() == FALSE in the body of "-> do ... end" */
13861 		    return keyword_do_LAMBDA;
13862 		}
13863 		if (COND_P()) return keyword_do_cond;
13864 		if (CMDARG_P() && !IS_lex_state_for(state, EXPR_CMDARG))
13865 		    return keyword_do_block;
13866 		return keyword_do;
13867 	    }
13868 	    if (IS_lex_state_for(state, (EXPR_BEG | EXPR_LABELED)))
13869 		return kw->id[0];
13870 	    else {
13871 		if (kw->id[0] != kw->id[1])
13872 		    SET_LEX_STATE(EXPR_BEG | EXPR_LABEL);
13873 		return kw->id[1];
13874 	    }
13875 	}
13876     }
13877 
13878     if (IS_lex_state(EXPR_BEG_ANY | EXPR_ARG_ANY | EXPR_DOT)) {
13879 	if (cmd_state) {
13880 	    SET_LEX_STATE(EXPR_CMDARG);
13881 	}
13882 	else {
13883 	    SET_LEX_STATE(EXPR_ARG);
13884 	}
13885     }
13886     else if (p->lex.state == EXPR_FNAME) {
13887 	SET_LEX_STATE(EXPR_ENDFN);
13888     }
13889     else {
13890 	SET_LEX_STATE(EXPR_END);
13891     }
13892 
13893     ident = tokenize_ident(p, last_state);
13894     if (result == tCONSTANT && is_local_id(ident)) result = tIDENTIFIER;
13895     if (!IS_lex_state_for(last_state, EXPR_DOT|EXPR_FNAME) &&
13896 	(result == tIDENTIFIER) && /* not EXPR_FNAME, not attrasgn */
13897 	lvar_defined(p, ident)) {
13898 	SET_LEX_STATE(EXPR_END|EXPR_LABEL);
13899     }
13900     return result;
13901 }
13902 
13903 static enum yytokentype
parser_yylex(struct parser_params * p)13904 parser_yylex(struct parser_params *p)
13905 {
13906     register int c;
13907     int space_seen = 0;
13908     int cmd_state;
13909     int label;
13910     enum lex_state_e last_state;
13911     int fallthru = FALSE;
13912     int token_seen = p->token_seen;
13913 
13914     if (p->lex.strterm) {
13915 	if (p->lex.strterm->flags & STRTERM_HEREDOC) {
13916 	    return here_document(p, &p->lex.strterm->u.heredoc);
13917 	}
13918 	else {
13919 	    token_flush(p);
13920 	    return parse_string(p, &p->lex.strterm->u.literal);
13921 	}
13922     }
13923     cmd_state = p->command_start;
13924     p->command_start = FALSE;
13925     p->token_seen = TRUE;
13926   retry:
13927     last_state = p->lex.state;
13928 #ifndef RIPPER
13929     token_flush(p);
13930 #endif
13931     switch (c = nextc(p)) {
13932       case '\0':		/* NUL */
13933       case '\004':		/* ^D */
13934       case '\032':		/* ^Z */
13935       case -1:			/* end of script. */
13936 	return 0;
13937 
13938 	/* white spaces */
13939       case ' ': case '\t': case '\f': case '\r':
13940       case '\13': /* '\v' */
13941 	space_seen = 1;
13942 #ifdef RIPPER
13943 	while ((c = nextc(p))) {
13944 	    switch (c) {
13945 	      case ' ': case '\t': case '\f': case '\r':
13946 	      case '\13': /* '\v' */
13947 		break;
13948 	      default:
13949 		goto outofloop;
13950 	    }
13951 	}
13952       outofloop:
13953 	pushback(p, c);
13954 	dispatch_scan_event(p, tSP);
13955 #endif
13956 	goto retry;
13957 
13958       case '#':		/* it's a comment */
13959 	p->token_seen = token_seen;
13960 	/* no magic_comment in shebang line */
13961 	if (!parser_magic_comment(p, p->lex.pcur, p->lex.pend - p->lex.pcur)) {
13962 	    if (comment_at_top(p)) {
13963 		set_file_encoding(p, p->lex.pcur, p->lex.pend);
13964 	    }
13965 	}
13966 	lex_goto_eol(p);
13967         dispatch_scan_event(p, tCOMMENT);
13968         fallthru = TRUE;
13969 	/* fall through */
13970       case '\n':
13971 	p->token_seen = token_seen;
13972 	c = (IS_lex_state(EXPR_BEG|EXPR_CLASS|EXPR_FNAME|EXPR_DOT) &&
13973 	     !IS_lex_state(EXPR_LABELED));
13974 	if (c || IS_lex_state_all(EXPR_ARG|EXPR_LABELED)) {
13975             if (!fallthru) {
13976                 dispatch_scan_event(p, tIGNORED_NL);
13977             }
13978             fallthru = FALSE;
13979 	    if (!c && p->in_kwarg) {
13980 		goto normal_newline;
13981 	    }
13982 	    goto retry;
13983 	}
13984 	while (1) {
13985 	    switch (c = nextc(p)) {
13986 	      case ' ': case '\t': case '\f': case '\r':
13987 	      case '\13': /* '\v' */
13988 		space_seen = 1;
13989 		break;
13990 	      case '&':
13991 	      case '.': {
13992 		dispatch_delayed_token(p, tIGNORED_NL);
13993 		if (peek(p, '.') == (c == '&')) {
13994 		    pushback(p, c);
13995 		    dispatch_scan_event(p, tSP);
13996 		    goto retry;
13997 		}
13998 	      }
13999 	      default:
14000 		p->ruby_sourceline--;
14001 		p->lex.nextline = p->lex.lastline;
14002 	      case -1:		/* EOF no decrement*/
14003 #ifndef RIPPER
14004 		if (p->lex.prevline && !p->eofp) p->lex.lastline = p->lex.prevline;
14005 		p->lex.pbeg = RSTRING_PTR(p->lex.lastline);
14006 		p->lex.pend = p->lex.pcur = p->lex.pbeg + RSTRING_LEN(p->lex.lastline);
14007 		pushback(p, 1); /* always pushback */
14008 		p->lex.ptok = p->lex.pcur;
14009 #else
14010 		lex_goto_eol(p);
14011 		if (c != -1) {
14012 		    p->lex.ptok = p->lex.pcur;
14013 		}
14014 #endif
14015 		goto normal_newline;
14016 	    }
14017 	}
14018       normal_newline:
14019 	p->command_start = TRUE;
14020 	SET_LEX_STATE(EXPR_BEG);
14021 	return '\n';
14022 
14023       case '*':
14024 	if ((c = nextc(p)) == '*') {
14025 	    if ((c = nextc(p)) == '=') {
14026 		set_yylval_id(idPow);
14027 		SET_LEX_STATE(EXPR_BEG);
14028 		return tOP_ASGN;
14029 	    }
14030 	    pushback(p, c);
14031 	    if (IS_SPCARG(c)) {
14032 		rb_warning0("`**' interpreted as argument prefix");
14033 		c = tDSTAR;
14034 	    }
14035 	    else if (IS_BEG()) {
14036 		c = tDSTAR;
14037 	    }
14038 	    else {
14039 		c = warn_balanced((enum ruby_method_ids)tPOW, "**", "argument prefix");
14040 	    }
14041 	}
14042 	else {
14043 	    if (c == '=') {
14044                 set_yylval_id('*');
14045 		SET_LEX_STATE(EXPR_BEG);
14046 		return tOP_ASGN;
14047 	    }
14048 	    pushback(p, c);
14049 	    if (IS_SPCARG(c)) {
14050 		rb_warning0("`*' interpreted as argument prefix");
14051 		c = tSTAR;
14052 	    }
14053 	    else if (IS_BEG()) {
14054 		c = tSTAR;
14055 	    }
14056 	    else {
14057 		c = warn_balanced('*', "*", "argument prefix");
14058 	    }
14059 	}
14060 	SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
14061 	return c;
14062 
14063       case '!':
14064 	c = nextc(p);
14065 	if (IS_AFTER_OPERATOR()) {
14066 	    SET_LEX_STATE(EXPR_ARG);
14067 	    if (c == '@') {
14068 		return '!';
14069 	    }
14070 	}
14071 	else {
14072 	    SET_LEX_STATE(EXPR_BEG);
14073 	}
14074 	if (c == '=') {
14075 	    return tNEQ;
14076 	}
14077 	if (c == '~') {
14078 	    return tNMATCH;
14079 	}
14080 	pushback(p, c);
14081 	return '!';
14082 
14083       case '=':
14084 	if (was_bol(p)) {
14085 	    /* skip embedded rd document */
14086 	    if (strncmp(p->lex.pcur, "begin", 5) == 0 && ISSPACE(p->lex.pcur[5])) {
14087 		int first_p = TRUE;
14088 
14089 		lex_goto_eol(p);
14090 		dispatch_scan_event(p, tEMBDOC_BEG);
14091 		for (;;) {
14092 		    lex_goto_eol(p);
14093 		    if (!first_p) {
14094 			dispatch_scan_event(p, tEMBDOC);
14095 		    }
14096 		    first_p = FALSE;
14097 		    c = nextc(p);
14098 		    if (c == -1) {
14099 			compile_error(p, "embedded document meets end of file");
14100 			return 0;
14101 		    }
14102 		    if (c != '=') continue;
14103 		    if (c == '=' && strncmp(p->lex.pcur, "end", 3) == 0 &&
14104 			(p->lex.pcur + 3 == p->lex.pend || ISSPACE(p->lex.pcur[3]))) {
14105 			break;
14106 		    }
14107 		}
14108 		lex_goto_eol(p);
14109 		dispatch_scan_event(p, tEMBDOC_END);
14110 		goto retry;
14111 	    }
14112 	}
14113 
14114 	SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
14115 	if ((c = nextc(p)) == '=') {
14116 	    if ((c = nextc(p)) == '=') {
14117 		return tEQQ;
14118 	    }
14119 	    pushback(p, c);
14120 	    return tEQ;
14121 	}
14122 	if (c == '~') {
14123 	    return tMATCH;
14124 	}
14125 	else if (c == '>') {
14126 	    return tASSOC;
14127 	}
14128 	pushback(p, c);
14129 	return '=';
14130 
14131       case '<':
14132 	last_state = p->lex.state;
14133 	c = nextc(p);
14134 	if (c == '<' &&
14135 	    !IS_lex_state(EXPR_DOT | EXPR_CLASS) &&
14136 	    !IS_END() &&
14137 	    (!IS_ARG() || IS_lex_state(EXPR_LABELED) || space_seen)) {
14138 	    int token = heredoc_identifier(p);
14139 	    if (token) return token;
14140 	}
14141 	if (IS_AFTER_OPERATOR()) {
14142 	    SET_LEX_STATE(EXPR_ARG);
14143 	}
14144 	else {
14145 	    if (IS_lex_state(EXPR_CLASS))
14146 		p->command_start = TRUE;
14147 	    SET_LEX_STATE(EXPR_BEG);
14148 	}
14149 	if (c == '=') {
14150 	    if ((c = nextc(p)) == '>') {
14151 		return tCMP;
14152 	    }
14153 	    pushback(p, c);
14154 	    return tLEQ;
14155 	}
14156 	if (c == '<') {
14157 	    if ((c = nextc(p)) == '=') {
14158 		set_yylval_id(idLTLT);
14159 		SET_LEX_STATE(EXPR_BEG);
14160 		return tOP_ASGN;
14161 	    }
14162 	    pushback(p, c);
14163 	    return warn_balanced((enum ruby_method_ids)tLSHFT, "<<", "here document");
14164 	}
14165 	pushback(p, c);
14166 	return '<';
14167 
14168       case '>':
14169 	SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
14170 	if ((c = nextc(p)) == '=') {
14171 	    return tGEQ;
14172 	}
14173 	if (c == '>') {
14174 	    if ((c = nextc(p)) == '=') {
14175 		set_yylval_id(idGTGT);
14176 		SET_LEX_STATE(EXPR_BEG);
14177 		return tOP_ASGN;
14178 	    }
14179 	    pushback(p, c);
14180 	    return tRSHFT;
14181 	}
14182 	pushback(p, c);
14183 	return '>';
14184 
14185       case '"':
14186 	label = (IS_LABEL_POSSIBLE() ? str_label : 0);
14187 	p->lex.strterm = NEW_STRTERM(str_dquote | label, '"', 0);
14188 	return tSTRING_BEG;
14189 
14190       case '`':
14191 	if (IS_lex_state(EXPR_FNAME)) {
14192 	    SET_LEX_STATE(EXPR_ENDFN);
14193 	    return c;
14194 	}
14195 	if (IS_lex_state(EXPR_DOT)) {
14196 	    if (cmd_state)
14197 		SET_LEX_STATE(EXPR_CMDARG);
14198 	    else
14199 		SET_LEX_STATE(EXPR_ARG);
14200 	    return c;
14201 	}
14202 	p->lex.strterm = NEW_STRTERM(str_xquote, '`', 0);
14203 	return tXSTRING_BEG;
14204 
14205       case '\'':
14206 	label = (IS_LABEL_POSSIBLE() ? str_label : 0);
14207 	p->lex.strterm = NEW_STRTERM(str_squote | label, '\'', 0);
14208 	return tSTRING_BEG;
14209 
14210       case '?':
14211 	return parse_qmark(p, space_seen);
14212 
14213       case '&':
14214 	if ((c = nextc(p)) == '&') {
14215 	    SET_LEX_STATE(EXPR_BEG);
14216 	    if ((c = nextc(p)) == '=') {
14217                 set_yylval_id(idANDOP);
14218 		SET_LEX_STATE(EXPR_BEG);
14219 		return tOP_ASGN;
14220 	    }
14221 	    pushback(p, c);
14222 	    return tANDOP;
14223 	}
14224 	else if (c == '=') {
14225             set_yylval_id('&');
14226 	    SET_LEX_STATE(EXPR_BEG);
14227 	    return tOP_ASGN;
14228 	}
14229 	else if (c == '.') {
14230 	    set_yylval_id(idANDDOT);
14231 	    SET_LEX_STATE(EXPR_DOT);
14232 	    return tANDDOT;
14233 	}
14234 	pushback(p, c);
14235 	if (IS_SPCARG(c)) {
14236 	    if ((c != ':') ||
14237 		(c = peekc_n(p, 1)) == -1 ||
14238 		!(c == '\'' || c == '"' ||
14239 		  is_identchar((p->lex.pcur+1), p->lex.pend, p->enc))) {
14240 		rb_warning0("`&' interpreted as argument prefix");
14241 	    }
14242 	    c = tAMPER;
14243 	}
14244 	else if (IS_BEG()) {
14245 	    c = tAMPER;
14246 	}
14247 	else {
14248 	    c = warn_balanced('&', "&", "argument prefix");
14249 	}
14250 	SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
14251 	return c;
14252 
14253       case '|':
14254 	if ((c = nextc(p)) == '|') {
14255 	    SET_LEX_STATE(EXPR_BEG);
14256 	    if ((c = nextc(p)) == '=') {
14257                 set_yylval_id(idOROP);
14258 		SET_LEX_STATE(EXPR_BEG);
14259 		return tOP_ASGN;
14260 	    }
14261 	    pushback(p, c);
14262 	    return tOROP;
14263 	}
14264 	if (c == '=') {
14265             set_yylval_id('|');
14266 	    SET_LEX_STATE(EXPR_BEG);
14267 	    return tOP_ASGN;
14268 	}
14269 	SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG|EXPR_LABEL);
14270 	pushback(p, c);
14271 	return '|';
14272 
14273       case '+':
14274 	c = nextc(p);
14275 	if (IS_AFTER_OPERATOR()) {
14276 	    SET_LEX_STATE(EXPR_ARG);
14277 	    if (c == '@') {
14278 		return tUPLUS;
14279 	    }
14280 	    pushback(p, c);
14281 	    return '+';
14282 	}
14283 	if (c == '=') {
14284             set_yylval_id('+');
14285 	    SET_LEX_STATE(EXPR_BEG);
14286 	    return tOP_ASGN;
14287 	}
14288 	if (IS_BEG() || (IS_SPCARG(c) && arg_ambiguous(p, '+'))) {
14289 	    SET_LEX_STATE(EXPR_BEG);
14290 	    pushback(p, c);
14291 	    if (c != -1 && ISDIGIT(c)) {
14292 		return parse_numeric(p, '+');
14293 	    }
14294 	    return tUPLUS;
14295 	}
14296 	SET_LEX_STATE(EXPR_BEG);
14297 	pushback(p, c);
14298 	return warn_balanced('+', "+", "unary operator");
14299 
14300       case '-':
14301 	c = nextc(p);
14302 	if (IS_AFTER_OPERATOR()) {
14303 	    SET_LEX_STATE(EXPR_ARG);
14304 	    if (c == '@') {
14305 		return tUMINUS;
14306 	    }
14307 	    pushback(p, c);
14308 	    return '-';
14309 	}
14310 	if (c == '=') {
14311             set_yylval_id('-');
14312 	    SET_LEX_STATE(EXPR_BEG);
14313 	    return tOP_ASGN;
14314 	}
14315 	if (c == '>') {
14316 	    SET_LEX_STATE(EXPR_ENDFN);
14317 	    return tLAMBDA;
14318 	}
14319 	if (IS_BEG() || (IS_SPCARG(c) && arg_ambiguous(p, '-'))) {
14320 	    SET_LEX_STATE(EXPR_BEG);
14321 	    pushback(p, c);
14322 	    if (c != -1 && ISDIGIT(c)) {
14323 		return tUMINUS_NUM;
14324 	    }
14325 	    return tUMINUS;
14326 	}
14327 	SET_LEX_STATE(EXPR_BEG);
14328 	pushback(p, c);
14329 	return warn_balanced('-', "-", "unary operator");
14330 
14331       case '.':
14332 	SET_LEX_STATE(EXPR_BEG);
14333 	if ((c = nextc(p)) == '.') {
14334 	    if ((c = nextc(p)) == '.') {
14335 		return tDOT3;
14336 	    }
14337 	    pushback(p, c);
14338 	    return tDOT2;
14339 	}
14340 	pushback(p, c);
14341 	if (c != -1 && ISDIGIT(c)) {
14342 	    yyerror0("no .<digit> floating literal anymore; put 0 before dot");
14343 	}
14344 	set_yylval_id('.');
14345 	SET_LEX_STATE(EXPR_DOT);
14346 	return '.';
14347 
14348       case '0': case '1': case '2': case '3': case '4':
14349       case '5': case '6': case '7': case '8': case '9':
14350 	return parse_numeric(p, c);
14351 
14352       case ')':
14353 	COND_POP();
14354 	CMDARG_POP();
14355 	SET_LEX_STATE(EXPR_ENDFN);
14356 	p->lex.paren_nest--;
14357 	return c;
14358 
14359       case ']':
14360 	COND_POP();
14361 	CMDARG_POP();
14362 	SET_LEX_STATE(EXPR_END);
14363 	p->lex.paren_nest--;
14364 	return c;
14365 
14366       case '}':
14367 	/* tSTRING_DEND does COND_POP and CMDARG_POP in the yacc's rule */
14368 	if (!p->lex.brace_nest--) return tSTRING_DEND;
14369 	COND_POP();
14370 	CMDARG_POP();
14371 	SET_LEX_STATE(EXPR_END);
14372 	p->lex.paren_nest--;
14373 	return c;
14374 
14375       case ':':
14376 	c = nextc(p);
14377 	if (c == ':') {
14378 	    if (IS_BEG() || IS_lex_state(EXPR_CLASS) || IS_SPCARG(-1)) {
14379 		SET_LEX_STATE(EXPR_BEG);
14380 		return tCOLON3;
14381 	    }
14382 	    set_yylval_id(idCOLON2);
14383 	    SET_LEX_STATE(EXPR_DOT);
14384 	    return tCOLON2;
14385 	}
14386 	if (IS_END() || ISSPACE(c) || c == '#') {
14387 	    pushback(p, c);
14388 	    c = warn_balanced(':', ":", "symbol literal");
14389 	    SET_LEX_STATE(EXPR_BEG);
14390 	    return c;
14391 	}
14392 	switch (c) {
14393 	  case '\'':
14394 	    p->lex.strterm = NEW_STRTERM(str_ssym, c, 0);
14395 	    break;
14396 	  case '"':
14397 	    p->lex.strterm = NEW_STRTERM(str_dsym, c, 0);
14398 	    break;
14399 	  default:
14400 	    pushback(p, c);
14401 	    break;
14402 	}
14403 	SET_LEX_STATE(EXPR_FNAME);
14404 	return tSYMBEG;
14405 
14406       case '/':
14407 	if (IS_BEG()) {
14408 	    p->lex.strterm = NEW_STRTERM(str_regexp, '/', 0);
14409 	    return tREGEXP_BEG;
14410 	}
14411 	if ((c = nextc(p)) == '=') {
14412             set_yylval_id('/');
14413 	    SET_LEX_STATE(EXPR_BEG);
14414 	    return tOP_ASGN;
14415 	}
14416 	pushback(p, c);
14417 	if (IS_SPCARG(c)) {
14418 	    arg_ambiguous(p, '/');
14419 	    p->lex.strterm = NEW_STRTERM(str_regexp, '/', 0);
14420 	    return tREGEXP_BEG;
14421 	}
14422 	SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
14423 	return warn_balanced('/', "/", "regexp literal");
14424 
14425       case '^':
14426 	if ((c = nextc(p)) == '=') {
14427             set_yylval_id('^');
14428 	    SET_LEX_STATE(EXPR_BEG);
14429 	    return tOP_ASGN;
14430 	}
14431 	SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
14432 	pushback(p, c);
14433 	return '^';
14434 
14435       case ';':
14436 	SET_LEX_STATE(EXPR_BEG);
14437 	p->command_start = TRUE;
14438 	return ';';
14439 
14440       case ',':
14441 	SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
14442 	return ',';
14443 
14444       case '~':
14445 	if (IS_AFTER_OPERATOR()) {
14446 	    if ((c = nextc(p)) != '@') {
14447 		pushback(p, c);
14448 	    }
14449 	    SET_LEX_STATE(EXPR_ARG);
14450 	}
14451 	else {
14452 	    SET_LEX_STATE(EXPR_BEG);
14453 	}
14454 	return '~';
14455 
14456       case '(':
14457 	if (IS_BEG()) {
14458 	    c = tLPAREN;
14459 	}
14460 	else if (!space_seen) {
14461 	    /* foo( ... ) => method call, no ambiguity */
14462 	}
14463 	else if (IS_ARG() || IS_lex_state_all(EXPR_END|EXPR_LABEL)) {
14464 	    c = tLPAREN_ARG;
14465 	}
14466 	else if (IS_lex_state(EXPR_ENDFN) && !lambda_beginning_p()) {
14467 	    rb_warning0("parentheses after method name is interpreted as "
14468 			"an argument list, not a decomposed argument");
14469 	}
14470 	p->lex.paren_nest++;
14471 	COND_PUSH(0);
14472 	CMDARG_PUSH(0);
14473 	SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
14474 	return c;
14475 
14476       case '[':
14477 	p->lex.paren_nest++;
14478 	if (IS_AFTER_OPERATOR()) {
14479 	    if ((c = nextc(p)) == ']') {
14480 		SET_LEX_STATE(EXPR_ARG);
14481 		if ((c = nextc(p)) == '=') {
14482 		    return tASET;
14483 		}
14484 		pushback(p, c);
14485 		return tAREF;
14486 	    }
14487 	    pushback(p, c);
14488 	    SET_LEX_STATE(EXPR_ARG|EXPR_LABEL);
14489 	    return '[';
14490 	}
14491 	else if (IS_BEG()) {
14492 	    c = tLBRACK;
14493 	}
14494 	else if (IS_ARG() && (space_seen || IS_lex_state(EXPR_LABELED))) {
14495 	    c = tLBRACK;
14496 	}
14497 	SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
14498 	COND_PUSH(0);
14499 	CMDARG_PUSH(0);
14500 	return c;
14501 
14502       case '{':
14503 	++p->lex.brace_nest;
14504 	if (lambda_beginning_p()) {
14505 	    SET_LEX_STATE(EXPR_BEG);
14506 	    COND_PUSH(0);
14507 	    CMDARG_PUSH(0);
14508 	    p->lex.paren_nest++;
14509 	    return tLAMBEG;
14510 	}
14511 	p->lex.paren_nest++;
14512 	if (IS_lex_state(EXPR_LABELED))
14513 	    c = tLBRACE;      /* hash */
14514 	else if (IS_lex_state(EXPR_ARG_ANY | EXPR_END | EXPR_ENDFN))
14515 	    c = '{';          /* block (primary) */
14516 	else if (IS_lex_state(EXPR_ENDARG))
14517 	    c = tLBRACE_ARG;  /* block (expr) */
14518 	else
14519 	    c = tLBRACE;      /* hash */
14520 	COND_PUSH(0);
14521 	CMDARG_PUSH(0);
14522 	SET_LEX_STATE(c != tLBRACE ? EXPR_BEG : EXPR_BEG|EXPR_LABEL);
14523 	if (c != tLBRACE) p->command_start = TRUE;
14524 	return c;
14525 
14526       case '\\':
14527 	c = nextc(p);
14528 	if (c == '\n') {
14529 	    space_seen = 1;
14530 	    dispatch_scan_event(p, tSP);
14531 	    goto retry; /* skip \\n */
14532 	}
14533 	if (c == ' ') return tSP;
14534 	if (ISSPACE(c)) return c;
14535 	pushback(p, c);
14536 	return '\\';
14537 
14538       case '%':
14539 	return parse_percent(p, space_seen, last_state);
14540 
14541       case '$':
14542 	return parse_gvar(p, last_state);
14543 
14544       case '@':
14545 	return parse_atmark(p, last_state);
14546 
14547       case '_':
14548 	if (was_bol(p) && whole_match_p(p, "__END__", 7, 0)) {
14549 	    p->ruby__end__seen = 1;
14550 	    p->eofp = 1;
14551 #ifndef RIPPER
14552 	    return -1;
14553 #else
14554             lex_goto_eol(p);
14555             dispatch_scan_event(p, k__END__);
14556             return 0;
14557 #endif
14558 	}
14559 	newtok(p);
14560 	break;
14561 
14562       default:
14563 	if (!parser_is_identchar(p)) {
14564 	    compile_error(p, "Invalid char `\\x%02X' in expression", c);
14565 	    goto retry;
14566 	}
14567 
14568 	newtok(p);
14569 	break;
14570     }
14571 
14572     return parse_ident(p, c, cmd_state);
14573 }
14574 
14575 static enum yytokentype
yylex(YYSTYPE * lval,YYLTYPE * yylloc,struct parser_params * p)14576 yylex(YYSTYPE *lval, YYLTYPE *yylloc, struct parser_params *p)
14577 {
14578     enum yytokentype t;
14579 
14580     p->lval = lval;
14581     lval->val = Qundef;
14582     t = parser_yylex(p);
14583 
14584     if (p->lex.strterm && (p->lex.strterm->flags & STRTERM_HEREDOC))
14585 	RUBY_SET_YYLLOC_FROM_STRTERM_HEREDOC(*yylloc);
14586     else
14587 	RUBY_SET_YYLLOC(*yylloc);
14588 
14589     if (has_delayed_token(p))
14590 	dispatch_delayed_token(p, t);
14591     else if (t != 0)
14592 	dispatch_scan_event(p, t);
14593 
14594     return t;
14595 }
14596 
14597 #define LVAR_USED ((ID)1 << (sizeof(ID) * CHAR_BIT - 1))
14598 
14599 static NODE*
node_newnode(struct parser_params * p,enum node_type type,VALUE a0,VALUE a1,VALUE a2,const rb_code_location_t * loc)14600 node_newnode(struct parser_params *p, enum node_type type, VALUE a0, VALUE a1, VALUE a2, const rb_code_location_t *loc)
14601 {
14602     NODE *n = rb_ast_newnode(p->ast);
14603 
14604     rb_node_init(n, type, a0, a1, a2);
14605 
14606     nd_set_loc(n, loc);
14607     nd_set_node_id(n, parser_get_node_id(p));
14608     return n;
14609 }
14610 
14611 static NODE *
nd_set_loc(NODE * nd,const YYLTYPE * loc)14612 nd_set_loc(NODE *nd, const YYLTYPE *loc)
14613 {
14614     nd->nd_loc = *loc;
14615     nd_set_line(nd, loc->beg_pos.lineno);
14616     return nd;
14617 }
14618 
14619 #ifndef RIPPER
14620 static enum node_type
nodetype(NODE * node)14621 nodetype(NODE *node)			/* for debug */
14622 {
14623     return (enum node_type)nd_type(node);
14624 }
14625 
14626 static int
nodeline(NODE * node)14627 nodeline(NODE *node)
14628 {
14629     return nd_line(node);
14630 }
14631 
14632 static NODE*
newline_node(NODE * node)14633 newline_node(NODE *node)
14634 {
14635     if (node) {
14636 	node = remove_begin(node);
14637 	node->flags |= NODE_FL_NEWLINE;
14638     }
14639     return node;
14640 }
14641 
14642 static void
fixpos(NODE * node,NODE * orig)14643 fixpos(NODE *node, NODE *orig)
14644 {
14645     if (!node) return;
14646     if (!orig) return;
14647     nd_set_line(node, nd_line(orig));
14648 }
14649 
14650 static void
parser_warning(struct parser_params * p,NODE * node,const char * mesg)14651 parser_warning(struct parser_params *p, NODE *node, const char *mesg)
14652 {
14653     rb_compile_warning(p->ruby_sourcefile, nd_line(node), "%s", mesg);
14654 }
14655 
14656 static void
parser_warn(struct parser_params * p,NODE * node,const char * mesg)14657 parser_warn(struct parser_params *p, NODE *node, const char *mesg)
14658 {
14659     rb_compile_warn(p->ruby_sourcefile, nd_line(node), "%s", mesg);
14660 }
14661 
14662 static NODE*
block_append(struct parser_params * p,NODE * head,NODE * tail)14663 block_append(struct parser_params *p, NODE *head, NODE *tail)
14664 {
14665     NODE *end, *h = head, *nd;
14666 
14667     if (tail == 0) return head;
14668 
14669     if (h == 0) return tail;
14670     switch (nd_type(h)) {
14671       case NODE_LIT:
14672       case NODE_STR:
14673       case NODE_SELF:
14674       case NODE_TRUE:
14675       case NODE_FALSE:
14676       case NODE_NIL:
14677 	parser_warning(p, h, "unused literal ignored");
14678 	return tail;
14679       default:
14680 	h = end = NEW_BLOCK(head, &head->nd_loc);
14681 	end->nd_end = end;
14682 	head = end;
14683 	break;
14684       case NODE_BLOCK:
14685 	end = h->nd_end;
14686 	break;
14687     }
14688 
14689     nd = end->nd_head;
14690     switch (nd_type(nd)) {
14691       case NODE_RETURN:
14692       case NODE_BREAK:
14693       case NODE_NEXT:
14694       case NODE_REDO:
14695       case NODE_RETRY:
14696 	if (RTEST(ruby_verbose)) {
14697 	    parser_warning(p, tail, "statement not reached");
14698 	}
14699 	break;
14700 
14701       default:
14702 	break;
14703     }
14704 
14705     if (nd_type(tail) != NODE_BLOCK) {
14706 	tail = NEW_BLOCK(tail, &tail->nd_loc);
14707 	tail->nd_end = tail;
14708     }
14709     end->nd_next = tail;
14710     h->nd_end = tail->nd_end;
14711     nd_set_last_loc(head, nd_last_loc(tail));
14712     return head;
14713 }
14714 
14715 /* append item to the list */
14716 static NODE*
list_append(struct parser_params * p,NODE * list,NODE * item)14717 list_append(struct parser_params *p, NODE *list, NODE *item)
14718 {
14719     NODE *last;
14720 
14721     if (list == 0) return NEW_LIST(item, &item->nd_loc);
14722     if (list->nd_next) {
14723 	last = list->nd_next->nd_end;
14724     }
14725     else {
14726 	last = list;
14727     }
14728 
14729     list->nd_alen += 1;
14730     last->nd_next = NEW_LIST(item, &item->nd_loc);
14731     list->nd_next->nd_end = last->nd_next;
14732 
14733     nd_set_last_loc(list, nd_last_loc(item));
14734 
14735     return list;
14736 }
14737 
14738 /* concat two lists */
14739 static NODE*
list_concat(NODE * head,NODE * tail)14740 list_concat(NODE *head, NODE *tail)
14741 {
14742     NODE *last;
14743 
14744     if (head->nd_next) {
14745 	last = head->nd_next->nd_end;
14746     }
14747     else {
14748 	last = head;
14749     }
14750 
14751     head->nd_alen += tail->nd_alen;
14752     last->nd_next = tail;
14753     if (tail->nd_next) {
14754 	head->nd_next->nd_end = tail->nd_next->nd_end;
14755     }
14756     else {
14757 	head->nd_next->nd_end = tail;
14758     }
14759 
14760     nd_set_last_loc(head, nd_last_loc(tail));
14761 
14762     return head;
14763 }
14764 
14765 static int
literal_concat0(struct parser_params * p,VALUE head,VALUE tail)14766 literal_concat0(struct parser_params *p, VALUE head, VALUE tail)
14767 {
14768     if (NIL_P(tail)) return 1;
14769     if (!rb_enc_compatible(head, tail)) {
14770 	compile_error(p, "string literal encodings differ (%s / %s)",
14771 		      rb_enc_name(rb_enc_get(head)),
14772 		      rb_enc_name(rb_enc_get(tail)));
14773 	rb_str_resize(head, 0);
14774 	rb_str_resize(tail, 0);
14775 	return 0;
14776     }
14777     rb_str_buf_append(head, tail);
14778     return 1;
14779 }
14780 
14781 /* concat two string literals */
14782 static NODE *
literal_concat(struct parser_params * p,NODE * head,NODE * tail,const YYLTYPE * loc)14783 literal_concat(struct parser_params *p, NODE *head, NODE *tail, const YYLTYPE *loc)
14784 {
14785     enum node_type htype;
14786     NODE *headlast;
14787     VALUE lit;
14788 
14789     if (!head) return tail;
14790     if (!tail) return head;
14791 
14792     htype = nd_type(head);
14793     if (htype == NODE_EVSTR) {
14794 	NODE *node = NEW_DSTR(add_mark_object(p, STR_NEW0()), loc);
14795 	head = list_append(p, node, head);
14796 	htype = NODE_DSTR;
14797     }
14798     if (p->heredoc_indent > 0) {
14799 	switch (htype) {
14800 	  case NODE_STR:
14801 	    nd_set_type(head, NODE_DSTR);
14802 	  case NODE_DSTR:
14803 	    return list_append(p, head, tail);
14804 	  default:
14805 	    break;
14806 	}
14807     }
14808     switch (nd_type(tail)) {
14809       case NODE_STR:
14810 	if (htype == NODE_DSTR && (headlast = head->nd_next->nd_end->nd_head) &&
14811 	    nd_type(headlast) == NODE_STR) {
14812 	    htype = NODE_STR;
14813 	    lit = headlast->nd_lit;
14814 	}
14815 	else {
14816 	    lit = head->nd_lit;
14817 	}
14818 	if (htype == NODE_STR) {
14819 	    if (!literal_concat0(p, lit, tail->nd_lit)) {
14820 	      error:
14821 		rb_discard_node(p, head);
14822 		rb_discard_node(p, tail);
14823 		return 0;
14824 	    }
14825 	    rb_discard_node(p, tail);
14826 	}
14827 	else {
14828 	    list_append(p, head, tail);
14829 	}
14830 	break;
14831 
14832       case NODE_DSTR:
14833 	if (htype == NODE_STR) {
14834 	    if (!literal_concat0(p, head->nd_lit, tail->nd_lit))
14835 		goto error;
14836 	    tail->nd_lit = head->nd_lit;
14837 	    rb_discard_node(p, head);
14838 	    head = tail;
14839 	}
14840 	else if (NIL_P(tail->nd_lit)) {
14841 	  append:
14842 	    head->nd_alen += tail->nd_alen - 1;
14843 	    head->nd_next->nd_end->nd_next = tail->nd_next;
14844 	    head->nd_next->nd_end = tail->nd_next->nd_end;
14845 	    rb_discard_node(p, tail);
14846 	}
14847 	else if (htype == NODE_DSTR && (headlast = head->nd_next->nd_end->nd_head) &&
14848 		 nd_type(headlast) == NODE_STR) {
14849 	    lit = headlast->nd_lit;
14850 	    if (!literal_concat0(p, lit, tail->nd_lit))
14851 		goto error;
14852 	    tail->nd_lit = Qnil;
14853 	    goto append;
14854 	}
14855 	else {
14856 	    nd_set_type(tail, NODE_ARRAY);
14857 	    tail->nd_head = NEW_STR(tail->nd_lit, loc);
14858 	    list_concat(head, tail);
14859 	}
14860 	break;
14861 
14862       case NODE_EVSTR:
14863 	if (htype == NODE_STR) {
14864 	    nd_set_type(head, NODE_DSTR);
14865 	    head->nd_alen = 1;
14866 	}
14867 	list_append(p, head, tail);
14868 	break;
14869     }
14870     return head;
14871 }
14872 
14873 static NODE *
evstr2dstr(struct parser_params * p,NODE * node)14874 evstr2dstr(struct parser_params *p, NODE *node)
14875 {
14876     if (nd_type(node) == NODE_EVSTR) {
14877 	node = list_append(p, NEW_DSTR(add_mark_object(p, STR_NEW0()), &node->nd_loc), node);
14878     }
14879     return node;
14880 }
14881 
14882 static NODE *
new_evstr(struct parser_params * p,NODE * node,const YYLTYPE * loc)14883 new_evstr(struct parser_params *p, NODE *node, const YYLTYPE *loc)
14884 {
14885     NODE *head = node;
14886 
14887     if (node) {
14888 	switch (nd_type(node)) {
14889 	  case NODE_STR: case NODE_DSTR: case NODE_EVSTR:
14890 	    return node;
14891 	}
14892     }
14893     return NEW_EVSTR(head, loc);
14894 }
14895 
14896 static NODE *
call_bin_op(struct parser_params * p,NODE * recv,ID id,NODE * arg1,const YYLTYPE * op_loc,const YYLTYPE * loc)14897 call_bin_op(struct parser_params *p, NODE *recv, ID id, NODE *arg1,
14898 		const YYLTYPE *op_loc, const YYLTYPE *loc)
14899 {
14900     NODE *expr;
14901     value_expr(recv);
14902     value_expr(arg1);
14903     expr = NEW_OPCALL(recv, id, NEW_LIST(arg1, &arg1->nd_loc), loc);
14904     nd_set_line(expr, op_loc->beg_pos.lineno);
14905     return expr;
14906 }
14907 
14908 static NODE *
call_uni_op(struct parser_params * p,NODE * recv,ID id,const YYLTYPE * op_loc,const YYLTYPE * loc)14909 call_uni_op(struct parser_params *p, NODE *recv, ID id, const YYLTYPE *op_loc, const YYLTYPE *loc)
14910 {
14911     NODE *opcall;
14912     value_expr(recv);
14913     opcall = NEW_OPCALL(recv, id, 0, loc);
14914     nd_set_line(opcall, op_loc->beg_pos.lineno);
14915     return opcall;
14916 }
14917 
14918 static NODE *
new_qcall(struct parser_params * p,ID atype,NODE * recv,ID mid,NODE * args,const YYLTYPE * op_loc,const YYLTYPE * loc)14919 new_qcall(struct parser_params* p, ID atype, NODE *recv, ID mid, NODE *args, const YYLTYPE *op_loc, const YYLTYPE *loc)
14920 {
14921     NODE *qcall = NEW_QCALL(atype, recv, mid, args, loc);
14922     nd_set_line(qcall, op_loc->beg_pos.lineno);
14923     return qcall;
14924 }
14925 
14926 static 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)14927 new_command_qcall(struct parser_params* p, ID atype, NODE *recv, ID mid, NODE *args, NODE *block, const YYLTYPE *op_loc, const YYLTYPE *loc)
14928 {
14929     NODE *ret;
14930     if (block) block_dup_check(p, args, block);
14931     ret = new_qcall(p, atype, recv, mid, args, op_loc, loc);
14932     if (block) ret = method_add_block(p, ret, block, loc);
14933     fixpos(ret, recv);
14934     return ret;
14935 }
14936 
14937 #define nd_once_body(node) (nd_type(node) == NODE_ONCE ? (node)->nd_body : node)
14938 static NODE*
match_op(struct parser_params * p,NODE * node1,NODE * node2,const YYLTYPE * op_loc,const YYLTYPE * loc)14939 match_op(struct parser_params *p, NODE *node1, NODE *node2, const YYLTYPE *op_loc, const YYLTYPE *loc)
14940 {
14941     NODE *n;
14942     int line = op_loc->beg_pos.lineno;
14943 
14944     value_expr(node1);
14945     value_expr(node2);
14946     if (node1 && (n = nd_once_body(node1)) != 0) {
14947 	switch (nd_type(n)) {
14948 	  case NODE_DREGX:
14949 	    {
14950 		NODE *match = NEW_MATCH2(node1, node2, loc);
14951 		nd_set_line(match, line);
14952 		return match;
14953 	    }
14954 
14955 	  case NODE_LIT:
14956 	    if (RB_TYPE_P(n->nd_lit, T_REGEXP)) {
14957 		const VALUE lit = n->nd_lit;
14958 		NODE *match = NEW_MATCH2(node1, node2, loc);
14959 		match->nd_args = reg_named_capture_assign(p, lit, loc);
14960 		nd_set_line(match, line);
14961 		return match;
14962 	    }
14963 	}
14964     }
14965 
14966     if (node2 && (n = nd_once_body(node2)) != 0) {
14967         NODE *match3;
14968 
14969 	switch (nd_type(n)) {
14970 	  case NODE_LIT:
14971 	    if (!RB_TYPE_P(n->nd_lit, T_REGEXP)) break;
14972 	    /* fallthru */
14973 	  case NODE_DREGX:
14974 	    match3 = NEW_MATCH3(node2, node1, loc);
14975 	    return match3;
14976 	}
14977     }
14978 
14979     n = NEW_CALL(node1, tMATCH, NEW_LIST(node2, &node2->nd_loc), loc);
14980     nd_set_line(n, line);
14981     return n;
14982 }
14983 
14984 # if WARN_PAST_SCOPE
14985 static int
past_dvar_p(struct parser_params * p,ID id)14986 past_dvar_p(struct parser_params *p, ID id)
14987 {
14988     struct vtable *past = p->lvtbl->past;
14989     while (past) {
14990 	if (vtable_included(past, id)) return 1;
14991 	past = past->prev;
14992     }
14993     return 0;
14994 }
14995 # endif
14996 
14997 #define WARN_LOCATION(type) do { \
14998     if (p->warn_location) { \
14999 	rb_warning0(type" in eval may not return location in binding;" \
15000 		    " use Binding#source_location instead"); \
15001     } \
15002 } while (0)
15003 
15004 static NODE*
gettable(struct parser_params * p,ID id,const YYLTYPE * loc)15005 gettable(struct parser_params *p, ID id, const YYLTYPE *loc)
15006 {
15007     ID *vidp = NULL;
15008     NODE *node;
15009     switch (id) {
15010       case keyword_self:
15011 	return NEW_SELF(loc);
15012       case keyword_nil:
15013 	return NEW_NIL(loc);
15014       case keyword_true:
15015 	return NEW_TRUE(loc);
15016       case keyword_false:
15017 	return NEW_FALSE(loc);
15018       case keyword__FILE__:
15019 	WARN_LOCATION("__FILE__");
15020 	{
15021 	    VALUE file = p->ruby_sourcefile_string;
15022 	    if (NIL_P(file))
15023 		file = rb_str_new(0, 0);
15024 	    else
15025 		file = rb_str_dup(file);
15026 	    node = NEW_STR(add_mark_object(p, file), loc);
15027 	}
15028 	return node;
15029       case keyword__LINE__:
15030 	WARN_LOCATION("__LINE__");
15031 	return NEW_LIT(INT2FIX(p->tokline), loc);
15032       case keyword__ENCODING__:
15033 	return NEW_LIT(add_mark_object(p, rb_enc_from_encoding(p->enc)), loc);
15034     }
15035     switch (id_type(id)) {
15036       case ID_LOCAL:
15037 	if (dyna_in_block(p) && dvar_defined_ref(p, id, &vidp)) {
15038 	    if (id == p->cur_arg) {
15039 		rb_warn1("circular argument reference - %"PRIsWARN, rb_id2str(id));
15040 	    }
15041 	    if (vidp) *vidp |= LVAR_USED;
15042 	    node = NEW_DVAR(id, loc);
15043 	    return node;
15044 	}
15045 	if (local_id_ref(p, id, &vidp)) {
15046 	    if (id == p->cur_arg) {
15047 		rb_warn1("circular argument reference - %"PRIsWARN, rb_id2str(id));
15048 	    }
15049 	    if (vidp) *vidp |= LVAR_USED;
15050 	    node = NEW_LVAR(id, loc);
15051 	    return node;
15052 	}
15053 # if WARN_PAST_SCOPE
15054 	if (!p->in_defined && RTEST(ruby_verbose) && past_dvar_p(p, id)) {
15055 	    rb_warning1("possible reference to past scope - %"PRIsWARN, rb_id2str(id));
15056 	}
15057 # endif
15058 	/* method call without arguments */
15059 	return NEW_VCALL(id, loc);
15060       case ID_GLOBAL:
15061 	return NEW_GVAR(id, loc);
15062       case ID_INSTANCE:
15063 	return NEW_IVAR(id, loc);
15064       case ID_CONST:
15065 	return NEW_CONST(id, loc);
15066       case ID_CLASS:
15067 	return NEW_CVAR(id, loc);
15068     }
15069     compile_error(p, "identifier %"PRIsVALUE" is not valid to get", rb_id2str(id));
15070     return 0;
15071 }
15072 
15073 static NODE *
opt_arg_append(NODE * opt_list,NODE * opt)15074 opt_arg_append(NODE *opt_list, NODE *opt)
15075 {
15076     NODE *opts = opt_list;
15077     opts->nd_loc.end_pos = opt->nd_loc.end_pos;
15078 
15079     while (opts->nd_next) {
15080 	opts = opts->nd_next;
15081 	opts->nd_loc.end_pos = opt->nd_loc.end_pos;
15082     }
15083     opts->nd_next = opt;
15084 
15085     return opt_list;
15086 }
15087 
15088 static NODE *
kwd_append(NODE * kwlist,NODE * kw)15089 kwd_append(NODE *kwlist, NODE *kw)
15090 {
15091     if (kwlist) {
15092 	NODE *kws = kwlist;
15093 	kws->nd_loc.end_pos = kw->nd_loc.end_pos;
15094 	while (kws->nd_next) {
15095 	    kws = kws->nd_next;
15096 	    kws->nd_loc.end_pos = kw->nd_loc.end_pos;
15097 	}
15098 	kws->nd_next = kw;
15099     }
15100     return kwlist;
15101 }
15102 
15103 static NODE *
new_defined(struct parser_params * p,NODE * expr,const YYLTYPE * loc)15104 new_defined(struct parser_params *p, NODE *expr, const YYLTYPE *loc)
15105 {
15106     return NEW_DEFINED(remove_begin_all(expr), loc);
15107 }
15108 
15109 static NODE*
symbol_append(struct parser_params * p,NODE * symbols,NODE * symbol)15110 symbol_append(struct parser_params *p, NODE *symbols, NODE *symbol)
15111 {
15112     if (nd_type(symbol) == NODE_DSTR) {
15113 	nd_set_type(symbol, NODE_DSYM);
15114     }
15115     else {
15116 	nd_set_type(symbol, NODE_LIT);
15117 	symbol->nd_lit = add_mark_object(p, rb_str_intern(symbol->nd_lit));
15118     }
15119     return list_append(p, symbols, symbol);
15120 }
15121 
15122 static NODE *
new_regexp(struct parser_params * p,NODE * node,int options,const YYLTYPE * loc)15123 new_regexp(struct parser_params *p, NODE *node, int options, const YYLTYPE *loc)
15124 {
15125     NODE *list, *prev;
15126     VALUE lit;
15127 
15128     if (!node) {
15129 	return NEW_LIT(add_mark_object(p, reg_compile(p, STR_NEW0(), options)), loc);
15130     }
15131     switch (nd_type(node)) {
15132       case NODE_STR:
15133 	{
15134 	    VALUE src = node->nd_lit;
15135 	    nd_set_type(node, NODE_LIT);
15136 	    nd_set_loc(node, loc);
15137 	    add_mark_object(p, node->nd_lit = reg_compile(p, src, options));
15138 	}
15139 	break;
15140       default:
15141 	add_mark_object(p, lit = STR_NEW0());
15142 	node = NEW_NODE(NODE_DSTR, lit, 1, NEW_LIST(node, loc), loc);
15143       case NODE_DSTR:
15144 	nd_set_type(node, NODE_DREGX);
15145 	nd_set_loc(node, loc);
15146 	node->nd_cflag = options & RE_OPTION_MASK;
15147 	if (!NIL_P(node->nd_lit)) reg_fragment_check(p, node->nd_lit, options);
15148 	for (list = (prev = node)->nd_next; list; list = list->nd_next) {
15149 	    if (nd_type(list->nd_head) == NODE_STR) {
15150 		VALUE tail = list->nd_head->nd_lit;
15151 		if (reg_fragment_check(p, tail, options) && prev && !NIL_P(prev->nd_lit)) {
15152 		    VALUE lit = prev == node ? prev->nd_lit : prev->nd_head->nd_lit;
15153 		    if (!literal_concat0(p, lit, tail)) {
15154 			return NEW_NIL(loc); /* dummy node on error */
15155 		    }
15156 		    rb_str_resize(tail, 0);
15157 		    prev->nd_next = list->nd_next;
15158 		    rb_discard_node(p, list->nd_head);
15159 		    rb_discard_node(p, list);
15160 		    list = prev;
15161 		}
15162 		else {
15163 		    prev = list;
15164 		}
15165 	    }
15166 	    else {
15167 		prev = 0;
15168 	    }
15169 	}
15170 	if (!node->nd_next) {
15171 	    VALUE src = node->nd_lit;
15172 	    nd_set_type(node, NODE_LIT);
15173 	    add_mark_object(p, node->nd_lit = reg_compile(p, src, options));
15174 	}
15175 	if (options & RE_OPTION_ONCE) {
15176 	    node = NEW_NODE(NODE_ONCE, 0, node, 0, loc);
15177 	}
15178 	break;
15179     }
15180     return node;
15181 }
15182 
15183 static NODE *
new_kw_arg(struct parser_params * p,NODE * k,const YYLTYPE * loc)15184 new_kw_arg(struct parser_params *p, NODE *k, const YYLTYPE *loc)
15185 {
15186     if (!k) return 0;
15187     return NEW_KW_ARG(0, (k), loc);
15188 }
15189 
15190 static NODE *
new_xstring(struct parser_params * p,NODE * node,const YYLTYPE * loc)15191 new_xstring(struct parser_params *p, NODE *node, const YYLTYPE *loc)
15192 {
15193     if (!node) {
15194 	VALUE lit = STR_NEW0();
15195 	NODE *xstr = NEW_XSTR(lit, loc);
15196 	add_mark_object(p, lit);
15197 	return xstr;
15198     }
15199     switch (nd_type(node)) {
15200       case NODE_STR:
15201 	nd_set_type(node, NODE_XSTR);
15202 	nd_set_loc(node, loc);
15203 	break;
15204       case NODE_DSTR:
15205 	nd_set_type(node, NODE_DXSTR);
15206 	nd_set_loc(node, loc);
15207 	break;
15208       default:
15209 	node = NEW_NODE(NODE_DXSTR, Qnil, 1, NEW_LIST(node, loc), loc);
15210 	break;
15211     }
15212     return node;
15213 }
15214 
15215 #else  /* !RIPPER */
15216 static int
id_is_var(struct parser_params * p,ID id)15217 id_is_var(struct parser_params *p, ID id)
15218 {
15219     if (is_notop_id(id)) {
15220 	switch (id & ID_SCOPE_MASK) {
15221 	  case ID_GLOBAL: case ID_INSTANCE: case ID_CONST: case ID_CLASS:
15222 	    return 1;
15223 	  case ID_LOCAL:
15224 	    if (dyna_in_block(p) && dvar_defined(p, id)) return 1;
15225 	    if (local_id(p, id)) return 1;
15226 	    /* method call without arguments */
15227 	    return 0;
15228 	}
15229     }
15230     compile_error(p, "identifier %"PRIsVALUE" is not valid to get", rb_id2str(id));
15231     return 0;
15232 }
15233 
15234 static VALUE
new_regexp(struct parser_params * p,VALUE re,VALUE opt,const YYLTYPE * loc)15235 new_regexp(struct parser_params *p, VALUE re, VALUE opt, const YYLTYPE *loc)
15236 {
15237     VALUE src = 0, err;
15238     int options = 0;
15239     if (ripper_is_node_yylval(re)) {
15240 	src = RNODE(re)->nd_cval;
15241 	re = RNODE(re)->nd_rval;
15242     }
15243     if (ripper_is_node_yylval(opt)) {
15244 	options = (int)RNODE(opt)->nd_tag;
15245 	opt = RNODE(opt)->nd_rval;
15246     }
15247     if (src && NIL_P(parser_reg_compile(p, src, options, &err))) {
15248 	compile_error(p, "%"PRIsVALUE, err);
15249     }
15250     return dispatch2(regexp_literal, re, opt);
15251 }
15252 #endif /* !RIPPER */
15253 
15254 #ifndef RIPPER
15255 static const char rb_parser_lex_state_names[][13] = {
15256     "EXPR_BEG",    "EXPR_END",    "EXPR_ENDARG", "EXPR_ENDFN",  "EXPR_ARG",
15257     "EXPR_CMDARG", "EXPR_MID",    "EXPR_FNAME",  "EXPR_DOT",    "EXPR_CLASS",
15258     "EXPR_LABEL",  "EXPR_LABELED","EXPR_FITEM",
15259 };
15260 
15261 static VALUE
append_lex_state_name(enum lex_state_e state,VALUE buf)15262 append_lex_state_name(enum lex_state_e state, VALUE buf)
15263 {
15264     int i, sep = 0;
15265     unsigned int mask = 1;
15266     static const char none[] = "EXPR_NONE";
15267 
15268     for (i = 0; i < EXPR_MAX_STATE; ++i, mask <<= 1) {
15269 	if ((unsigned)state & mask) {
15270 	    if (sep) {
15271 		rb_str_cat(buf, "|", 1);
15272 	    }
15273 	    sep = 1;
15274 	    rb_str_cat_cstr(buf, rb_parser_lex_state_names[i]);
15275 	}
15276     }
15277     if (!sep) {
15278 	rb_str_cat(buf, none, sizeof(none)-1);
15279     }
15280     return buf;
15281 }
15282 
15283 static void
flush_debug_buffer(struct parser_params * p,VALUE out,VALUE str)15284 flush_debug_buffer(struct parser_params *p, VALUE out, VALUE str)
15285 {
15286     VALUE mesg = p->debug_buffer;
15287 
15288     if (!NIL_P(mesg) && RSTRING_LEN(mesg)) {
15289 	p->debug_buffer = Qnil;
15290 	rb_io_puts(1, &mesg, out);
15291     }
15292     if (!NIL_P(str) && RSTRING_LEN(str)) {
15293 	rb_io_write(p->debug_output, str);
15294     }
15295 }
15296 
15297 enum lex_state_e
rb_parser_trace_lex_state(struct parser_params * p,enum lex_state_e from,enum lex_state_e to,int line)15298 rb_parser_trace_lex_state(struct parser_params *p, enum lex_state_e from,
15299 			  enum lex_state_e to, int line)
15300 {
15301     VALUE mesg;
15302     mesg = rb_str_new_cstr("lex_state: ");
15303     append_lex_state_name(from, mesg);
15304     rb_str_cat_cstr(mesg, " -> ");
15305     append_lex_state_name(to, mesg);
15306     rb_str_catf(mesg, " at line %d\n", line);
15307     flush_debug_buffer(p, p->debug_output, mesg);
15308     return to;
15309 }
15310 
15311 VALUE
rb_parser_lex_state_name(enum lex_state_e state)15312 rb_parser_lex_state_name(enum lex_state_e state)
15313 {
15314     return rb_fstring(append_lex_state_name(state, rb_str_new(0, 0)));
15315 }
15316 
15317 static void
append_bitstack_value(stack_type stack,VALUE mesg)15318 append_bitstack_value(stack_type stack, VALUE mesg)
15319 {
15320     if (stack == 0) {
15321 	rb_str_cat_cstr(mesg, "0");
15322     }
15323     else {
15324 	stack_type mask = (stack_type)1U << (CHAR_BIT * sizeof(stack_type) - 1);
15325 	for (; mask && !(stack & mask); mask >>= 1) continue;
15326 	for (; mask; mask >>= 1) rb_str_cat(mesg, stack & mask ? "1" : "0", 1);
15327     }
15328 }
15329 
15330 void
rb_parser_show_bitstack(struct parser_params * p,stack_type stack,const char * name,int line)15331 rb_parser_show_bitstack(struct parser_params *p, stack_type stack,
15332 			const char *name, int line)
15333 {
15334     VALUE mesg = rb_sprintf("%s: ", name);
15335     append_bitstack_value(stack, mesg);
15336     rb_str_catf(mesg, " at line %d\n", line);
15337     flush_debug_buffer(p, p->debug_output, mesg);
15338 }
15339 
15340 void
rb_parser_fatal(struct parser_params * p,const char * fmt,...)15341 rb_parser_fatal(struct parser_params *p, const char *fmt, ...)
15342 {
15343     va_list ap;
15344     VALUE mesg = rb_str_new_cstr("internal p error: ");
15345 
15346     va_start(ap, fmt);
15347     rb_str_vcatf(mesg, fmt, ap);
15348     va_end(ap);
15349     parser_yyerror(p, NULL, RSTRING_PTR(mesg));
15350     RB_GC_GUARD(mesg);
15351 
15352     mesg = rb_str_new(0, 0);
15353     append_lex_state_name(p->lex.state, mesg);
15354     compile_error(p, "p->lex.state: %"PRIsVALUE, mesg);
15355     rb_str_resize(mesg, 0);
15356     append_bitstack_value(p->cond_stack, mesg);
15357     compile_error(p, "p->cond_stack: %"PRIsVALUE, mesg);
15358     rb_str_resize(mesg, 0);
15359     append_bitstack_value(p->cmdarg_stack, mesg);
15360     compile_error(p, "p->cmdarg_stack: %"PRIsVALUE, mesg);
15361     if (p->debug_output == rb_stdout)
15362 	p->debug_output = rb_stderr;
15363     p->debug = TRUE;
15364 }
15365 
15366 void
rb_parser_set_location_from_strterm_heredoc(struct parser_params * p,rb_strterm_heredoc_t * here,YYLTYPE * yylloc)15367 rb_parser_set_location_from_strterm_heredoc(struct parser_params *p, rb_strterm_heredoc_t *here, YYLTYPE *yylloc)
15368 {
15369     const char *eos = RSTRING_PTR(here->term);
15370     long term_len = RSTRING_LEN(here->term) - 2 + (unsigned char)eos[0];
15371 
15372     yylloc->beg_pos.lineno = (int)here->sourceline;
15373     yylloc->beg_pos.column = (int)(here->u3.lastidx - term_len);
15374     yylloc->end_pos.lineno = (int)here->sourceline;
15375     yylloc->end_pos.column = (int)(here->u3.lastidx);
15376 }
15377 
15378 void
rb_parser_set_location_of_none(struct parser_params * p,YYLTYPE * yylloc)15379 rb_parser_set_location_of_none(struct parser_params *p, YYLTYPE *yylloc)
15380 {
15381     yylloc->beg_pos.lineno = p->ruby_sourceline;
15382     yylloc->beg_pos.column = (int)(p->lex.ptok - p->lex.pbeg);
15383     yylloc->end_pos.lineno = p->ruby_sourceline;
15384     yylloc->end_pos.column = (int)(p->lex.ptok - p->lex.pbeg);
15385 }
15386 
15387 void
rb_parser_set_location(struct parser_params * p,YYLTYPE * yylloc)15388 rb_parser_set_location(struct parser_params *p, YYLTYPE *yylloc)
15389 {
15390     yylloc->beg_pos.lineno = p->ruby_sourceline;
15391     yylloc->beg_pos.column = (int)(p->lex.ptok - p->lex.pbeg);
15392     yylloc->end_pos.lineno = p->ruby_sourceline;
15393     yylloc->end_pos.column = (int)(p->lex.pcur - p->lex.pbeg);
15394 }
15395 #endif /* !RIPPER */
15396 
15397 static void
parser_token_value_print(struct parser_params * p,enum yytokentype type,const YYSTYPE * valp)15398 parser_token_value_print(struct parser_params *p, enum yytokentype type, const YYSTYPE *valp)
15399 {
15400     VALUE v;
15401 
15402     switch (type) {
15403       case tIDENTIFIER: case tFID: case tGVAR: case tIVAR:
15404       case tCONSTANT: case tCVAR: case tLABEL: case tOP_ASGN:
15405 #ifndef RIPPER
15406 	v = rb_id2str(valp->id);
15407 #else
15408 	v = valp->node->nd_rval;
15409 #endif
15410 	rb_parser_printf(p, "%"PRIsVALUE, v);
15411 	break;
15412       case tINTEGER: case tFLOAT: case tRATIONAL: case tIMAGINARY:
15413       case tSTRING_CONTENT: case tCHAR:
15414 #ifndef RIPPER
15415 	v = valp->node->nd_lit;
15416 #else
15417 	v = valp->val;
15418 #endif
15419 	rb_parser_printf(p, "%+"PRIsVALUE, v);
15420 	break;
15421       case tNTH_REF:
15422 #ifndef RIPPER
15423 	rb_parser_printf(p, "$%ld", valp->node->nd_nth);
15424 #else
15425 	rb_parser_printf(p, "%"PRIsVALUE, valp->val);
15426 #endif
15427 	break;
15428       case tBACK_REF:
15429 #ifndef RIPPER
15430 	rb_parser_printf(p, "$%c", (int)valp->node->nd_nth);
15431 #else
15432 	rb_parser_printf(p, "%"PRIsVALUE, valp->val);
15433 #endif
15434 	break;
15435       default:
15436 	break;
15437     }
15438 }
15439 
15440 static int
assignable0(struct parser_params * p,ID id,const char ** err)15441 assignable0(struct parser_params *p, ID id, const char **err)
15442 {
15443     if (!id) return -1;
15444     switch (id) {
15445       case keyword_self:
15446 	*err = "Can't change the value of self";
15447 	return -1;
15448       case keyword_nil:
15449 	*err = "Can't assign to nil";
15450 	return -1;
15451       case keyword_true:
15452 	*err = "Can't assign to true";
15453 	return -1;
15454       case keyword_false:
15455 	*err = "Can't assign to false";
15456 	return -1;
15457       case keyword__FILE__:
15458 	*err = "Can't assign to __FILE__";
15459 	return -1;
15460       case keyword__LINE__:
15461 	*err = "Can't assign to __LINE__";
15462 	return -1;
15463       case keyword__ENCODING__:
15464 	*err = "Can't assign to __ENCODING__";
15465 	return -1;
15466     }
15467     switch (id_type(id)) {
15468       case ID_LOCAL:
15469 	if (dyna_in_block(p)) {
15470 	    if (dvar_curr(p, id)) return NODE_DASGN_CURR;
15471 	    if (dvar_defined(p, id)) return NODE_DASGN;
15472 	    if (local_id(p, id)) return NODE_LASGN;
15473 	    dyna_var(p, id);
15474 	    return NODE_DASGN_CURR;
15475 	}
15476 	else {
15477 	    if (!local_id(p, id)) local_var(p, id);
15478 	    return NODE_LASGN;
15479 	}
15480 	break;
15481       case ID_GLOBAL: return NODE_GASGN;
15482       case ID_INSTANCE: return NODE_IASGN;
15483       case ID_CONST:
15484 	if (!p->in_def) return NODE_CDECL;
15485 	*err = "dynamic constant assignment";
15486 	return -1;
15487       case ID_CLASS: return NODE_CVASGN;
15488       default:
15489 	compile_error(p, "identifier %"PRIsVALUE" is not valid to set", rb_id2str(id));
15490     }
15491     return -1;
15492 }
15493 
15494 #ifndef RIPPER
15495 static NODE*
assignable(struct parser_params * p,ID id,NODE * val,const YYLTYPE * loc)15496 assignable(struct parser_params *p, ID id, NODE *val, const YYLTYPE *loc)
15497 {
15498     const char *err = 0;
15499     int node_type = assignable0(p, id, &err);
15500     switch (node_type) {
15501       case NODE_DASGN_CURR: return NEW_DASGN_CURR(id, val, loc);
15502       case NODE_DASGN: return NEW_DASGN(id, val, loc);
15503       case NODE_LASGN: return NEW_LASGN(id, val, loc);
15504       case NODE_GASGN: return NEW_GASGN(id, val, loc);
15505       case NODE_IASGN: return NEW_IASGN(id, val, loc);
15506       case NODE_CDECL: return NEW_CDECL(id, val, 0, loc);
15507       case NODE_CVASGN: return NEW_CVASGN(id, val, loc);
15508     }
15509     if (err) yyerror1(loc, err);
15510     return NEW_BEGIN(0, loc);
15511 }
15512 #else
15513 static VALUE
assignable(struct parser_params * p,VALUE lhs)15514 assignable(struct parser_params *p, VALUE lhs)
15515 {
15516     const char *err = 0;
15517     assignable0(p, get_id(lhs), &err);
15518     if (err) lhs = assign_error(p, lhs);
15519     return lhs;
15520 }
15521 #endif
15522 
15523 static int
is_private_local_id(ID name)15524 is_private_local_id(ID name)
15525 {
15526     VALUE s;
15527     if (name == idUScore) return 1;
15528     if (!is_local_id(name)) return 0;
15529     s = rb_id2str(name);
15530     if (!s) return 0;
15531     return RSTRING_PTR(s)[0] == '_';
15532 }
15533 
15534 static int
shadowing_lvar_0(struct parser_params * p,ID name)15535 shadowing_lvar_0(struct parser_params *p, ID name)
15536 {
15537     if (is_private_local_id(name)) return 1;
15538     if (dyna_in_block(p)) {
15539 	if (dvar_curr(p, name)) {
15540 	    yyerror0("duplicated argument name");
15541 	}
15542 	else if (dvar_defined(p, name) || local_id(p, name)) {
15543 	    vtable_add(p->lvtbl->vars, name);
15544 	    if (p->lvtbl->used) {
15545 		vtable_add(p->lvtbl->used, (ID)p->ruby_sourceline | LVAR_USED);
15546 	    }
15547 	    return 0;
15548 	}
15549     }
15550     else {
15551 	if (local_id(p, name)) {
15552 	    yyerror0("duplicated argument name");
15553 	}
15554     }
15555     return 1;
15556 }
15557 
15558 static ID
shadowing_lvar(struct parser_params * p,ID name)15559 shadowing_lvar(struct parser_params *p, ID name)
15560 {
15561     shadowing_lvar_0(p, name);
15562     return name;
15563 }
15564 
15565 static void
new_bv(struct parser_params * p,ID name)15566 new_bv(struct parser_params *p, ID name)
15567 {
15568     if (!name) return;
15569     if (!is_local_id(name)) {
15570 	compile_error(p, "invalid local variable - %"PRIsVALUE,
15571 		      rb_id2str(name));
15572 	return;
15573     }
15574     if (!shadowing_lvar_0(p, name)) return;
15575     dyna_var(p, name);
15576 }
15577 
15578 #ifndef RIPPER
15579 static NODE *
aryset(struct parser_params * p,NODE * recv,NODE * idx,const YYLTYPE * loc)15580 aryset(struct parser_params *p, NODE *recv, NODE *idx, const YYLTYPE *loc)
15581 {
15582     return NEW_ATTRASGN(recv, tASET, idx, loc);
15583 }
15584 
15585 static void
block_dup_check(struct parser_params * p,NODE * node1,NODE * node2)15586 block_dup_check(struct parser_params *p, NODE *node1, NODE *node2)
15587 {
15588     if (node2 && node1 && nd_type(node1) == NODE_BLOCK_PASS) {
15589 	compile_error(p, "both block arg and actual block given");
15590     }
15591 }
15592 
15593 static NODE *
attrset(struct parser_params * p,NODE * recv,ID atype,ID id,const YYLTYPE * loc)15594 attrset(struct parser_params *p, NODE *recv, ID atype, ID id, const YYLTYPE *loc)
15595 {
15596     if (!CALL_Q_P(atype)) id = rb_id_attrset(id);
15597     return NEW_ATTRASGN(recv, id, 0, loc);
15598 }
15599 
15600 static void
rb_backref_error(struct parser_params * p,NODE * node)15601 rb_backref_error(struct parser_params *p, NODE *node)
15602 {
15603     switch (nd_type(node)) {
15604       case NODE_NTH_REF:
15605 	compile_error(p, "Can't set variable $%ld", node->nd_nth);
15606 	break;
15607       case NODE_BACK_REF:
15608 	compile_error(p, "Can't set variable $%c", (int)node->nd_nth);
15609 	break;
15610     }
15611 }
15612 
15613 static NODE *
arg_append(struct parser_params * p,NODE * node1,NODE * node2,const YYLTYPE * loc)15614 arg_append(struct parser_params *p, NODE *node1, NODE *node2, const YYLTYPE *loc)
15615 {
15616     if (!node1) return NEW_LIST(node2, &node2->nd_loc);
15617     switch (nd_type(node1))  {
15618       case NODE_ARRAY:
15619 	return list_append(p, node1, node2);
15620       case NODE_BLOCK_PASS:
15621 	node1->nd_head = arg_append(p, node1->nd_head, node2, loc);
15622 	node1->nd_loc.end_pos = node1->nd_head->nd_loc.end_pos;
15623 	return node1;
15624       case NODE_ARGSPUSH:
15625 	node1->nd_body = list_append(p, NEW_LIST(node1->nd_body, &node1->nd_body->nd_loc), node2);
15626 	node1->nd_loc.end_pos = node1->nd_body->nd_loc.end_pos;
15627 	nd_set_type(node1, NODE_ARGSCAT);
15628 	return node1;
15629       case NODE_ARGSCAT:
15630         if (nd_type(node1->nd_body) != NODE_ARRAY) break;
15631         node1->nd_body = list_append(p, node1->nd_body, node2);
15632         node1->nd_loc.end_pos = node1->nd_body->nd_loc.end_pos;
15633         return node1;
15634     }
15635     return NEW_ARGSPUSH(node1, node2, loc);
15636 }
15637 
15638 static NODE *
arg_concat(struct parser_params * p,NODE * node1,NODE * node2,const YYLTYPE * loc)15639 arg_concat(struct parser_params *p, NODE *node1, NODE *node2, const YYLTYPE *loc)
15640 {
15641     if (!node2) return node1;
15642     switch (nd_type(node1)) {
15643       case NODE_BLOCK_PASS:
15644 	if (node1->nd_head)
15645 	    node1->nd_head = arg_concat(p, node1->nd_head, node2, loc);
15646 	else
15647 	    node1->nd_head = NEW_LIST(node2, loc);
15648 	return node1;
15649       case NODE_ARGSPUSH:
15650 	if (nd_type(node2) != NODE_ARRAY) break;
15651 	node1->nd_body = list_concat(NEW_LIST(node1->nd_body, loc), node2);
15652 	nd_set_type(node1, NODE_ARGSCAT);
15653 	return node1;
15654       case NODE_ARGSCAT:
15655 	if (nd_type(node2) != NODE_ARRAY ||
15656 	    nd_type(node1->nd_body) != NODE_ARRAY) break;
15657 	node1->nd_body = list_concat(node1->nd_body, node2);
15658 	return node1;
15659     }
15660     return NEW_ARGSCAT(node1, node2, loc);
15661 }
15662 
15663 static NODE *
last_arg_append(struct parser_params * p,NODE * args,NODE * last_arg,const YYLTYPE * loc)15664 last_arg_append(struct parser_params *p, NODE *args, NODE *last_arg, const YYLTYPE *loc)
15665 {
15666     NODE *n1;
15667     if ((n1 = splat_array(args)) != 0) {
15668 	return list_append(p, n1, last_arg);
15669     }
15670     return arg_append(p, args, last_arg, loc);
15671 }
15672 
15673 static NODE *
rest_arg_append(struct parser_params * p,NODE * args,NODE * rest_arg,const YYLTYPE * loc)15674 rest_arg_append(struct parser_params *p, NODE *args, NODE *rest_arg, const YYLTYPE *loc)
15675 {
15676     NODE *n1;
15677     if ((nd_type(rest_arg) == NODE_ARRAY) && (n1 = splat_array(args)) != 0) {
15678 	return list_concat(n1, rest_arg);
15679     }
15680     return arg_concat(p, args, rest_arg, loc);
15681 }
15682 
15683 static NODE *
splat_array(NODE * node)15684 splat_array(NODE* node)
15685 {
15686     if (nd_type(node) == NODE_SPLAT) node = node->nd_head;
15687     if (nd_type(node) == NODE_ARRAY) return node;
15688     return 0;
15689 }
15690 
15691 static void
mark_lvar_used(struct parser_params * p,NODE * rhs)15692 mark_lvar_used(struct parser_params *p, NODE *rhs)
15693 {
15694     ID *vidp = NULL;
15695     if (!rhs) return;
15696     switch (nd_type(rhs)) {
15697       case NODE_LASGN:
15698 	if (local_id_ref(p, rhs->nd_vid, &vidp)) {
15699 	    if (vidp) *vidp |= LVAR_USED;
15700 	}
15701 	break;
15702       case NODE_DASGN:
15703       case NODE_DASGN_CURR:
15704 	if (dvar_defined_ref(p, rhs->nd_vid, &vidp)) {
15705 	    if (vidp) *vidp |= LVAR_USED;
15706 	}
15707 	break;
15708 #if 0
15709       case NODE_MASGN:
15710 	for (rhs = rhs->nd_head; rhs; rhs = rhs->nd_next) {
15711 	    mark_lvar_used(p, rhs->nd_head);
15712 	}
15713 	break;
15714 #endif
15715     }
15716 }
15717 
15718 static NODE *
node_assign(struct parser_params * p,NODE * lhs,NODE * rhs,const YYLTYPE * loc)15719 node_assign(struct parser_params *p, NODE *lhs, NODE *rhs, const YYLTYPE *loc)
15720 {
15721     if (!lhs) return 0;
15722 
15723     switch (nd_type(lhs)) {
15724       case NODE_GASGN:
15725       case NODE_IASGN:
15726       case NODE_LASGN:
15727       case NODE_DASGN:
15728       case NODE_DASGN_CURR:
15729       case NODE_MASGN:
15730       case NODE_CDECL:
15731       case NODE_CVASGN:
15732 	lhs->nd_value = rhs;
15733 	nd_set_loc(lhs, loc);
15734 	break;
15735 
15736       case NODE_ATTRASGN:
15737 	lhs->nd_args = arg_append(p, lhs->nd_args, rhs, loc);
15738 	nd_set_loc(lhs, loc);
15739 	break;
15740 
15741       default:
15742 	/* should not happen */
15743 	break;
15744     }
15745 
15746     return lhs;
15747 }
15748 
15749 static NODE *
value_expr_check(struct parser_params * p,NODE * node)15750 value_expr_check(struct parser_params *p, NODE *node)
15751 {
15752     NODE *void_node = 0, *vn;
15753 
15754     if (!node) {
15755 	rb_warning0("empty expression");
15756     }
15757     while (node) {
15758 	switch (nd_type(node)) {
15759 	  case NODE_RETURN:
15760 	  case NODE_BREAK:
15761 	  case NODE_NEXT:
15762 	  case NODE_REDO:
15763 	  case NODE_RETRY:
15764 	    return void_node ? void_node : node;
15765 
15766 	  case NODE_BLOCK:
15767 	    while (node->nd_next) {
15768 		node = node->nd_next;
15769 	    }
15770 	    node = node->nd_head;
15771 	    break;
15772 
15773 	  case NODE_BEGIN:
15774 	    node = node->nd_body;
15775 	    break;
15776 
15777 	  case NODE_IF:
15778 	  case NODE_UNLESS:
15779 	    if (!node->nd_body) {
15780 		node = node->nd_else;
15781 		break;
15782 	    }
15783 	    else if (!node->nd_else) {
15784 		node = node->nd_body;
15785 		break;
15786 	    }
15787 	    vn = value_expr_check(p, node->nd_body);
15788 	    if (!vn) return NULL;
15789 	    if (!void_node) void_node = vn;
15790 	    node = node->nd_else;
15791 	    break;
15792 
15793 	  case NODE_AND:
15794 	  case NODE_OR:
15795 	    node = node->nd_1st;
15796 	    break;
15797 
15798 	  case NODE_LASGN:
15799 	  case NODE_DASGN:
15800 	  case NODE_DASGN_CURR:
15801 	  case NODE_MASGN:
15802 	    mark_lvar_used(p, node);
15803 	    return NULL;
15804 
15805 	  default:
15806 	    return NULL;
15807 	}
15808     }
15809 
15810     return NULL;
15811 }
15812 
15813 static int
value_expr_gen(struct parser_params * p,NODE * node)15814 value_expr_gen(struct parser_params *p, NODE *node)
15815 {
15816     NODE *void_node = value_expr_check(p, node);
15817     if (void_node) {
15818 	yyerror1(&void_node->nd_loc, "void value expression");
15819 	/* or "control never reach"? */
15820 	return FALSE;
15821     }
15822     return TRUE;
15823 }
15824 
15825 static void
void_expr(struct parser_params * p,NODE * node)15826 void_expr(struct parser_params *p, NODE *node)
15827 {
15828     const char *useless = 0;
15829 
15830     if (!RTEST(ruby_verbose)) return;
15831 
15832     if (!node || !(node = nd_once_body(node))) return;
15833     switch (nd_type(node)) {
15834       case NODE_OPCALL:
15835 	switch (node->nd_mid) {
15836 	  case '+':
15837 	  case '-':
15838 	  case '*':
15839 	  case '/':
15840 	  case '%':
15841 	  case tPOW:
15842 	  case tUPLUS:
15843 	  case tUMINUS:
15844 	  case '|':
15845 	  case '^':
15846 	  case '&':
15847 	  case tCMP:
15848 	  case '>':
15849 	  case tGEQ:
15850 	  case '<':
15851 	  case tLEQ:
15852 	  case tEQ:
15853 	  case tNEQ:
15854 	    useless = rb_id2name(node->nd_mid);
15855 	    break;
15856 	}
15857 	break;
15858 
15859       case NODE_LVAR:
15860       case NODE_DVAR:
15861       case NODE_GVAR:
15862       case NODE_IVAR:
15863       case NODE_CVAR:
15864       case NODE_NTH_REF:
15865       case NODE_BACK_REF:
15866 	useless = "a variable";
15867 	break;
15868       case NODE_CONST:
15869 	useless = "a constant";
15870 	break;
15871       case NODE_LIT:
15872       case NODE_STR:
15873       case NODE_DSTR:
15874       case NODE_DREGX:
15875 	useless = "a literal";
15876 	break;
15877       case NODE_COLON2:
15878       case NODE_COLON3:
15879 	useless = "::";
15880 	break;
15881       case NODE_DOT2:
15882 	useless = "..";
15883 	break;
15884       case NODE_DOT3:
15885 	useless = "...";
15886 	break;
15887       case NODE_SELF:
15888 	useless = "self";
15889 	break;
15890       case NODE_NIL:
15891 	useless = "nil";
15892 	break;
15893       case NODE_TRUE:
15894 	useless = "true";
15895 	break;
15896       case NODE_FALSE:
15897 	useless = "false";
15898 	break;
15899       case NODE_DEFINED:
15900 	useless = "defined?";
15901 	break;
15902     }
15903 
15904     if (useless) {
15905 	rb_warn1L(nd_line(node), "possibly useless use of %s in void context", WARN_S(useless));
15906     }
15907 }
15908 
15909 static NODE *
void_stmts(struct parser_params * p,NODE * node)15910 void_stmts(struct parser_params *p, NODE *node)
15911 {
15912     NODE *const n = node;
15913     if (!RTEST(ruby_verbose)) return n;
15914     if (!node) return n;
15915     if (nd_type(node) != NODE_BLOCK) return n;
15916 
15917     while (node->nd_next) {
15918 	void_expr(p, node->nd_head);
15919 	node = node->nd_next;
15920     }
15921     return n;
15922 }
15923 
15924 static NODE *
remove_begin(NODE * node)15925 remove_begin(NODE *node)
15926 {
15927     NODE **n = &node, *n1 = node;
15928     while (n1 && nd_type(n1) == NODE_BEGIN && n1->nd_body) {
15929 	*n = n1 = n1->nd_body;
15930     }
15931     return node;
15932 }
15933 
15934 static NODE *
remove_begin_all(NODE * node)15935 remove_begin_all(NODE *node)
15936 {
15937     NODE **n = &node, *n1 = node;
15938     while (n1 && nd_type(n1) == NODE_BEGIN) {
15939 	*n = n1 = n1->nd_body;
15940     }
15941     return node;
15942 }
15943 
15944 static void
reduce_nodes(struct parser_params * p,NODE ** body)15945 reduce_nodes(struct parser_params *p, NODE **body)
15946 {
15947     NODE *node = *body;
15948 
15949     if (!node) {
15950 	*body = NEW_NIL(&NULL_LOC);
15951 	return;
15952     }
15953 #define subnodes(n1, n2) \
15954     ((!node->n1) ? (node->n2 ? (body = &node->n2, 1) : 0) : \
15955      (!node->n2) ? (body = &node->n1, 1) : \
15956      (reduce_nodes(p, &node->n1), body = &node->n2, 1))
15957 
15958     while (node) {
15959 	int newline = (int)(node->flags & NODE_FL_NEWLINE);
15960 	switch (nd_type(node)) {
15961 	  end:
15962 	  case NODE_NIL:
15963 	    *body = 0;
15964 	    return;
15965 	  case NODE_RETURN:
15966 	    *body = node = node->nd_stts;
15967 	    if (newline && node) node->flags |= NODE_FL_NEWLINE;
15968 	    continue;
15969 	  case NODE_BEGIN:
15970 	    *body = node = node->nd_body;
15971 	    if (newline && node) node->flags |= NODE_FL_NEWLINE;
15972 	    continue;
15973 	  case NODE_BLOCK:
15974 	    body = &node->nd_end->nd_head;
15975 	    break;
15976 	  case NODE_IF:
15977 	  case NODE_UNLESS:
15978 	    if (subnodes(nd_body, nd_else)) break;
15979 	    return;
15980 	  case NODE_CASE:
15981 	    body = &node->nd_body;
15982 	    break;
15983 	  case NODE_WHEN:
15984 	    if (!subnodes(nd_body, nd_next)) goto end;
15985 	    break;
15986 	  case NODE_ENSURE:
15987 	    if (!subnodes(nd_head, nd_resq)) goto end;
15988 	    break;
15989 	  case NODE_RESCUE:
15990 	    if (node->nd_else) {
15991 		body = &node->nd_resq;
15992 		break;
15993 	    }
15994 	    if (!subnodes(nd_head, nd_resq)) goto end;
15995 	    break;
15996 	  default:
15997 	    return;
15998 	}
15999 	node = *body;
16000 	if (newline && node) node->flags |= NODE_FL_NEWLINE;
16001     }
16002 
16003 #undef subnodes
16004 }
16005 
16006 static int
is_static_content(NODE * node)16007 is_static_content(NODE *node)
16008 {
16009     if (!node) return 1;
16010     switch (nd_type(node)) {
16011       case NODE_HASH:
16012 	if (!(node = node->nd_head)) break;
16013       case NODE_ARRAY:
16014 	do {
16015 	    if (!is_static_content(node->nd_head)) return 0;
16016 	} while ((node = node->nd_next) != 0);
16017       case NODE_LIT:
16018       case NODE_STR:
16019       case NODE_NIL:
16020       case NODE_TRUE:
16021       case NODE_FALSE:
16022       case NODE_ZARRAY:
16023 	break;
16024       default:
16025 	return 0;
16026     }
16027     return 1;
16028 }
16029 
16030 static int
assign_in_cond(struct parser_params * p,NODE * node)16031 assign_in_cond(struct parser_params *p, NODE *node)
16032 {
16033     switch (nd_type(node)) {
16034       case NODE_MASGN:
16035       case NODE_LASGN:
16036       case NODE_DASGN:
16037       case NODE_DASGN_CURR:
16038       case NODE_GASGN:
16039       case NODE_IASGN:
16040 	break;
16041 
16042       default:
16043 	return 0;
16044     }
16045 
16046     if (!node->nd_value) return 1;
16047     if (is_static_content(node->nd_value)) {
16048 	/* reports always */
16049 	parser_warn(p, node->nd_value, "found `= literal' in conditional, should be ==");
16050     }
16051     return 1;
16052 }
16053 
16054 static void
warn_unless_e_option(struct parser_params * p,NODE * node,const char * str)16055 warn_unless_e_option(struct parser_params *p, NODE *node, const char *str)
16056 {
16057     if (!e_option_supplied(p)) parser_warn(p, node, str);
16058 }
16059 
16060 static void
warning_unless_e_option(struct parser_params * p,NODE * node,const char * str)16061 warning_unless_e_option(struct parser_params *p, NODE *node, const char *str)
16062 {
16063     if (!e_option_supplied(p)) parser_warning(p, node, str);
16064 }
16065 
16066 static NODE *cond0(struct parser_params*,NODE*,int,const YYLTYPE*);
16067 
16068 static NODE*
range_op(struct parser_params * p,NODE * node,const YYLTYPE * loc)16069 range_op(struct parser_params *p, NODE *node, const YYLTYPE *loc)
16070 {
16071     enum node_type type;
16072 
16073     if (node == 0) return 0;
16074 
16075     type = nd_type(node);
16076     value_expr(node);
16077     if (type == NODE_LIT && FIXNUM_P(node->nd_lit)) {
16078 	warn_unless_e_option(p, node, "integer literal in conditional range");
16079 	return NEW_CALL(node, tEQ, NEW_LIST(NEW_GVAR(rb_intern("$."), loc), loc), loc);
16080     }
16081     return cond0(p, node, FALSE, loc);
16082 }
16083 
16084 static int
literal_node(NODE * node)16085 literal_node(NODE *node)
16086 {
16087     if (!node) return 1;	/* same as NODE_NIL */
16088     if (!(node = nd_once_body(node))) return 1;
16089     switch (nd_type(node)) {
16090       case NODE_LIT:
16091       case NODE_STR:
16092       case NODE_DSTR:
16093       case NODE_EVSTR:
16094       case NODE_DREGX:
16095       case NODE_DSYM:
16096 	return 2;
16097       case NODE_TRUE:
16098       case NODE_FALSE:
16099       case NODE_NIL:
16100 	return 1;
16101     }
16102     return 0;
16103 }
16104 
16105 static NODE*
cond0(struct parser_params * p,NODE * node,int method_op,const YYLTYPE * loc)16106 cond0(struct parser_params *p, NODE *node, int method_op, const YYLTYPE *loc)
16107 {
16108     if (node == 0) return 0;
16109     if (!(node = nd_once_body(node))) return 0;
16110     assign_in_cond(p, node);
16111 
16112     switch (nd_type(node)) {
16113       case NODE_DSTR:
16114       case NODE_EVSTR:
16115       case NODE_STR:
16116 	if (!method_op) rb_warn0("string literal in condition");
16117 	break;
16118 
16119       case NODE_DREGX:
16120 	{
16121 	    if (!method_op)
16122 		warning_unless_e_option(p, node, "regex literal in condition");
16123 
16124 	    return NEW_MATCH2(node, NEW_GVAR(idLASTLINE, loc), loc);
16125 	}
16126 
16127       case NODE_AND:
16128       case NODE_OR:
16129 	node->nd_1st = cond0(p, node->nd_1st, FALSE, loc);
16130 	node->nd_2nd = cond0(p, node->nd_2nd, FALSE, loc);
16131 	break;
16132 
16133       case NODE_DOT2:
16134       case NODE_DOT3:
16135 	node->nd_beg = range_op(p, node->nd_beg, loc);
16136 	node->nd_end = range_op(p, node->nd_end, loc);
16137 	if (nd_type(node) == NODE_DOT2) nd_set_type(node,NODE_FLIP2);
16138 	else if (nd_type(node) == NODE_DOT3) nd_set_type(node, NODE_FLIP3);
16139 	if (!method_op && !e_option_supplied(p)) {
16140 	    int b = literal_node(node->nd_beg);
16141 	    int e = literal_node(node->nd_end);
16142 	    if ((b == 1 && e == 1) || (b + e >= 2 && RTEST(ruby_verbose))) {
16143 		parser_warn(p, node, "range literal in condition");
16144 	    }
16145 	}
16146 	break;
16147 
16148       case NODE_DSYM:
16149 	if (!method_op) parser_warning(p, node, "literal in condition");
16150 	break;
16151 
16152       case NODE_LIT:
16153 	if (RB_TYPE_P(node->nd_lit, T_REGEXP)) {
16154 	    if (!method_op)
16155 		warn_unless_e_option(p, node, "regex literal in condition");
16156 	    nd_set_type(node, NODE_MATCH);
16157 	}
16158 	else if (node->nd_lit == Qtrue ||
16159 		 node->nd_lit == Qfalse) {
16160 	    /* booleans are OK, e.g., while true */
16161 	}
16162 	else {
16163 	    if (!method_op)
16164 		parser_warning(p, node, "literal in condition");
16165 	}
16166       default:
16167 	break;
16168     }
16169     return node;
16170 }
16171 
16172 static NODE*
cond(struct parser_params * p,NODE * node,const YYLTYPE * loc)16173 cond(struct parser_params *p, NODE *node, const YYLTYPE *loc)
16174 {
16175     if (node == 0) return 0;
16176     return cond0(p, node, FALSE, loc);
16177 }
16178 
16179 static NODE*
method_cond(struct parser_params * p,NODE * node,const YYLTYPE * loc)16180 method_cond(struct parser_params *p, NODE *node, const YYLTYPE *loc)
16181 {
16182     if (node == 0) return 0;
16183     return cond0(p, node, TRUE, loc);
16184 }
16185 
16186 static NODE*
new_if(struct parser_params * p,NODE * cc,NODE * left,NODE * right,const YYLTYPE * loc)16187 new_if(struct parser_params *p, NODE *cc, NODE *left, NODE *right, const YYLTYPE *loc)
16188 {
16189     if (!cc) return right;
16190     cc = cond0(p, cc, FALSE, loc);
16191     return newline_node(NEW_IF(cc, left, right, loc));
16192 }
16193 
16194 static NODE*
new_unless(struct parser_params * p,NODE * cc,NODE * left,NODE * right,const YYLTYPE * loc)16195 new_unless(struct parser_params *p, NODE *cc, NODE *left, NODE *right, const YYLTYPE *loc)
16196 {
16197     if (!cc) return right;
16198     cc = cond0(p, cc, FALSE, loc);
16199     return newline_node(NEW_UNLESS(cc, left, right, loc));
16200 }
16201 
16202 static NODE*
logop(struct parser_params * p,ID id,NODE * left,NODE * right,const YYLTYPE * op_loc,const YYLTYPE * loc)16203 logop(struct parser_params *p, ID id, NODE *left, NODE *right,
16204 	  const YYLTYPE *op_loc, const YYLTYPE *loc)
16205 {
16206     enum node_type type = id == idAND || id == idANDOP ? NODE_AND : NODE_OR;
16207     NODE *op;
16208     value_expr(left);
16209     if (left && (enum node_type)nd_type(left) == type) {
16210 	NODE *node = left, *second;
16211 	while ((second = node->nd_2nd) != 0 && (enum node_type)nd_type(second) == type) {
16212 	    node = second;
16213 	}
16214 	node->nd_2nd = NEW_NODE(type, second, right, 0, loc);
16215 	nd_set_line(node->nd_2nd, op_loc->beg_pos.lineno);
16216 	left->nd_loc.end_pos = loc->end_pos;
16217 	return left;
16218     }
16219     op = NEW_NODE(type, left, right, 0, loc);
16220     nd_set_line(op, op_loc->beg_pos.lineno);
16221     return op;
16222 }
16223 
16224 static void
no_blockarg(struct parser_params * p,NODE * node)16225 no_blockarg(struct parser_params *p, NODE *node)
16226 {
16227     if (node && nd_type(node) == NODE_BLOCK_PASS) {
16228 	compile_error(p, "block argument should not be given");
16229     }
16230 }
16231 
16232 static NODE *
ret_args(struct parser_params * p,NODE * node)16233 ret_args(struct parser_params *p, NODE *node)
16234 {
16235     if (node) {
16236 	no_blockarg(p, node);
16237 	if (nd_type(node) == NODE_ARRAY) {
16238 	    if (node->nd_next == 0) {
16239 		node = node->nd_head;
16240 	    }
16241 	    else {
16242 		nd_set_type(node, NODE_VALUES);
16243 	    }
16244 	}
16245     }
16246     return node;
16247 }
16248 
16249 static NODE *
new_yield(struct parser_params * p,NODE * node,const YYLTYPE * loc)16250 new_yield(struct parser_params *p, NODE *node, const YYLTYPE *loc)
16251 {
16252     if (node) no_blockarg(p, node);
16253 
16254     return NEW_YIELD(node, loc);
16255 }
16256 
16257 static VALUE
negate_lit(struct parser_params * p,VALUE lit)16258 negate_lit(struct parser_params *p, VALUE lit)
16259 {
16260     if (FIXNUM_P(lit)) {
16261 	return LONG2FIX(-FIX2LONG(lit));
16262     }
16263     if (SPECIAL_CONST_P(lit)) {
16264 #if USE_FLONUM
16265 	if (FLONUM_P(lit)) {
16266 	    return DBL2NUM(-RFLOAT_VALUE(lit));
16267 	}
16268 #endif
16269 	goto unknown;
16270     }
16271     switch (BUILTIN_TYPE(lit)) {
16272       case T_BIGNUM:
16273 	BIGNUM_NEGATE(lit);
16274 	lit = rb_big_norm(lit);
16275 	break;
16276       case T_RATIONAL:
16277 	RRATIONAL_SET_NUM(lit, negate_lit(p, RRATIONAL(lit)->num));
16278 	break;
16279       case T_COMPLEX:
16280 	RCOMPLEX_SET_REAL(lit, negate_lit(p, RCOMPLEX(lit)->real));
16281 	RCOMPLEX_SET_IMAG(lit, negate_lit(p, RCOMPLEX(lit)->imag));
16282 	break;
16283       case T_FLOAT:
16284 	RFLOAT(lit)->float_value = -RFLOAT_VALUE(lit);
16285 	break;
16286       unknown:
16287       default:
16288 	rb_parser_fatal(p, "unknown literal type (%s) passed to negate_lit",
16289 			rb_builtin_class_name(lit));
16290 	break;
16291     }
16292     return lit;
16293 }
16294 
16295 static NODE *
arg_blk_pass(NODE * node1,NODE * node2)16296 arg_blk_pass(NODE *node1, NODE *node2)
16297 {
16298     if (node2) {
16299         if (!node1) return node2;
16300 	node2->nd_head = node1;
16301 	nd_set_first_lineno(node2, nd_first_lineno(node1));
16302 	nd_set_first_column(node2, nd_first_column(node1));
16303 	return node2;
16304     }
16305     return node1;
16306 }
16307 
16308 
16309 static NODE*
new_args(struct parser_params * p,NODE * pre_args,NODE * opt_args,ID rest_arg,NODE * post_args,NODE * tail,const YYLTYPE * loc)16310 new_args(struct parser_params *p, NODE *pre_args, NODE *opt_args, ID rest_arg, NODE *post_args, NODE *tail, const YYLTYPE *loc)
16311 {
16312     int saved_line = p->ruby_sourceline;
16313     struct rb_args_info *args = tail->nd_ainfo;
16314 
16315     args->pre_args_num   = pre_args ? rb_long2int(pre_args->nd_plen) : 0;
16316     args->pre_init       = pre_args ? pre_args->nd_next : 0;
16317 
16318     args->post_args_num  = post_args ? rb_long2int(post_args->nd_plen) : 0;
16319     args->post_init      = post_args ? post_args->nd_next : 0;
16320     args->first_post_arg = post_args ? post_args->nd_pid : 0;
16321 
16322     args->rest_arg       = rest_arg;
16323 
16324     args->opt_args       = opt_args;
16325 
16326     p->ruby_sourceline = saved_line;
16327     nd_set_loc(tail, loc);
16328 
16329     return tail;
16330 }
16331 
16332 static NODE*
new_args_tail(struct parser_params * p,NODE * kw_args,ID kw_rest_arg,ID block,const YYLTYPE * loc)16333 new_args_tail(struct parser_params *p, NODE *kw_args, ID kw_rest_arg, ID block, const YYLTYPE *loc)
16334 {
16335     int saved_line = p->ruby_sourceline;
16336     struct rb_args_info *args;
16337     NODE *node;
16338     rb_imemo_tmpbuf_t *tmpbuf = new_tmpbuf();
16339 
16340     args = ZALLOC(struct rb_args_info);
16341     tmpbuf->ptr = (VALUE *)args;
16342     node = NEW_NODE(NODE_ARGS, 0, 0, args, &NULL_LOC);
16343     if (p->error_p) return node;
16344 
16345     args->block_arg      = block;
16346     args->kw_args        = kw_args;
16347 
16348     if (kw_args) {
16349 	/*
16350 	 * def foo(k1: 1, kr1:, k2: 2, **krest, &b)
16351 	 * variable order: k1, kr1, k2, &b, internal_id, krest
16352 	 * #=> <reorder>
16353 	 * variable order: kr1, k1, k2, internal_id, krest, &b
16354 	 */
16355 	ID kw_bits = internal_id(p), *required_kw_vars, *kw_vars;
16356 	struct vtable *vtargs = p->lvtbl->args;
16357 	NODE *kwn = kw_args;
16358 
16359 	vtable_pop(vtargs, !!block + !!kw_rest_arg);
16360 	required_kw_vars = kw_vars = &vtargs->tbl[vtargs->pos];
16361 	while (kwn) {
16362 	    if (!NODE_REQUIRED_KEYWORD_P(kwn->nd_body))
16363 		--kw_vars;
16364 	    --required_kw_vars;
16365 	    kwn = kwn->nd_next;
16366 	}
16367 
16368 	for (kwn = kw_args; kwn; kwn = kwn->nd_next) {
16369 	    ID vid = kwn->nd_body->nd_vid;
16370 	    if (NODE_REQUIRED_KEYWORD_P(kwn->nd_body)) {
16371 		*required_kw_vars++ = vid;
16372 	    }
16373 	    else {
16374 		*kw_vars++ = vid;
16375 	    }
16376 	}
16377 
16378 	arg_var(p, kw_bits);
16379 	if (kw_rest_arg) arg_var(p, kw_rest_arg);
16380 	if (block) arg_var(p, block);
16381 
16382 	args->kw_rest_arg = NEW_DVAR(kw_rest_arg, loc);
16383 	args->kw_rest_arg->nd_cflag = kw_bits;
16384     }
16385     else if (kw_rest_arg) {
16386 	args->kw_rest_arg = NEW_DVAR(kw_rest_arg, loc);
16387     }
16388 
16389     p->ruby_sourceline = saved_line;
16390     return node;
16391 }
16392 
16393 static NODE*
dsym_node(struct parser_params * p,NODE * node,const YYLTYPE * loc)16394 dsym_node(struct parser_params *p, NODE *node, const YYLTYPE *loc)
16395 {
16396     VALUE lit;
16397 
16398     if (!node) {
16399 	return NEW_LIT(ID2SYM(idNULL), loc);
16400     }
16401 
16402     switch (nd_type(node)) {
16403       case NODE_DSTR:
16404 	nd_set_type(node, NODE_DSYM);
16405 	nd_set_loc(node, loc);
16406 	break;
16407       case NODE_STR:
16408 	lit = node->nd_lit;
16409 	add_mark_object(p, node->nd_lit = ID2SYM(rb_intern_str(lit)));
16410 	nd_set_type(node, NODE_LIT);
16411 	nd_set_loc(node, loc);
16412 	break;
16413       default:
16414 	node = NEW_NODE(NODE_DSYM, Qnil, 1, NEW_LIST(node, loc), loc);
16415 	break;
16416     }
16417     return node;
16418 }
16419 
16420 static int
append_literal_keys(st_data_t k,st_data_t v,st_data_t h)16421 append_literal_keys(st_data_t k, st_data_t v, st_data_t h)
16422 {
16423     NODE *node = (NODE *)v;
16424     NODE **result = (NODE **)h;
16425     node->nd_alen = 2;
16426     node->nd_next->nd_end = node->nd_next;
16427     node->nd_next->nd_next = 0;
16428     if (*result)
16429 	list_concat(*result, node);
16430     else
16431 	*result = node;
16432     return ST_CONTINUE;
16433 }
16434 
16435 static NODE *
remove_duplicate_keys(struct parser_params * p,NODE * hash)16436 remove_duplicate_keys(struct parser_params *p, NODE *hash)
16437 {
16438     st_table *literal_keys = st_init_numtable_with_size(hash->nd_alen / 2);
16439     NODE *result = 0;
16440     while (hash && hash->nd_head && hash->nd_next) {
16441 	NODE *head = hash->nd_head;
16442 	NODE *value = hash->nd_next;
16443 	NODE *next = value->nd_next;
16444 	VALUE key = (VALUE)head;
16445 	st_data_t data;
16446 	if (nd_type(head) == NODE_LIT &&
16447 	    st_lookup(literal_keys, (key = head->nd_lit), &data)) {
16448 	    rb_compile_warn(p->ruby_sourcefile, nd_line((NODE *)data),
16449 			    "key %+"PRIsVALUE" is duplicated and overwritten on line %d",
16450 			    head->nd_lit, nd_line(head));
16451 	    head = ((NODE *)data)->nd_next;
16452 	    head->nd_head = block_append(p, head->nd_head, value->nd_head);
16453 	}
16454 	else {
16455 	    st_insert(literal_keys, (st_data_t)key, (st_data_t)hash);
16456 	}
16457 	hash = next;
16458     }
16459     st_foreach(literal_keys, append_literal_keys, (st_data_t)&result);
16460     st_free_table(literal_keys);
16461     if (hash) {
16462 	if (!result) result = hash;
16463 	else list_concat(result, hash);
16464     }
16465     return result;
16466 }
16467 
16468 static NODE *
new_hash(struct parser_params * p,NODE * hash,const YYLTYPE * loc)16469 new_hash(struct parser_params *p, NODE *hash, const YYLTYPE *loc)
16470 {
16471     if (hash) hash = remove_duplicate_keys(p, hash);
16472     return NEW_HASH(hash, loc);
16473 }
16474 #endif /* !RIPPER */
16475 
16476 #ifndef RIPPER
16477 static NODE *
new_op_assign(struct parser_params * p,NODE * lhs,ID op,NODE * rhs,const YYLTYPE * loc)16478 new_op_assign(struct parser_params *p, NODE *lhs, ID op, NODE *rhs, const YYLTYPE *loc)
16479 {
16480     NODE *asgn;
16481 
16482     if (lhs) {
16483 	ID vid = lhs->nd_vid;
16484 	YYLTYPE lhs_loc = lhs->nd_loc;
16485 	if (op == tOROP) {
16486 	    lhs->nd_value = rhs;
16487 	    nd_set_loc(lhs, loc);
16488 	    asgn = NEW_OP_ASGN_OR(gettable(p, vid, &lhs_loc), lhs, loc);
16489 	    if (is_notop_id(vid)) {
16490 		switch (id_type(vid)) {
16491 		  case ID_GLOBAL:
16492 		  case ID_INSTANCE:
16493 		  case ID_CLASS:
16494 		    asgn->nd_aid = vid;
16495 		}
16496 	    }
16497 	}
16498 	else if (op == tANDOP) {
16499 	    lhs->nd_value = rhs;
16500 	    nd_set_loc(lhs, loc);
16501 	    asgn = NEW_OP_ASGN_AND(gettable(p, vid, &lhs_loc), lhs, loc);
16502 	}
16503 	else {
16504 	    asgn = lhs;
16505 	    asgn->nd_value = NEW_CALL(gettable(p, vid, &lhs_loc), op, NEW_LIST(rhs, &rhs->nd_loc), loc);
16506 	    nd_set_loc(asgn, loc);
16507 	}
16508     }
16509     else {
16510 	asgn = NEW_BEGIN(0, loc);
16511     }
16512     return asgn;
16513 }
16514 
16515 static NODE *
new_ary_op_assign(struct parser_params * p,NODE * ary,NODE * args,ID op,NODE * rhs,const YYLTYPE * args_loc,const YYLTYPE * loc)16516 new_ary_op_assign(struct parser_params *p, NODE *ary,
16517 		  NODE *args, ID op, NODE *rhs, const YYLTYPE *args_loc, const YYLTYPE *loc)
16518 {
16519     NODE *asgn;
16520 
16521     args = make_array(args, args_loc);
16522     if (nd_type(args) == NODE_BLOCK_PASS) {
16523 	args = NEW_ARGSCAT(args, rhs, loc);
16524     }
16525     else {
16526 	args = arg_concat(p, args, rhs, loc);
16527     }
16528     asgn = NEW_OP_ASGN1(ary, op, args, loc);
16529     fixpos(asgn, ary);
16530     return asgn;
16531 }
16532 
16533 static NODE *
new_attr_op_assign(struct parser_params * p,NODE * lhs,ID atype,ID attr,ID op,NODE * rhs,const YYLTYPE * loc)16534 new_attr_op_assign(struct parser_params *p, NODE *lhs,
16535 		   ID atype, ID attr, ID op, NODE *rhs, const YYLTYPE *loc)
16536 {
16537     NODE *asgn;
16538 
16539     asgn = NEW_OP_ASGN2(lhs, CALL_Q_P(atype), attr, op, rhs, loc);
16540     fixpos(asgn, lhs);
16541     return asgn;
16542 }
16543 
16544 static NODE *
new_const_op_assign(struct parser_params * p,NODE * lhs,ID op,NODE * rhs,const YYLTYPE * loc)16545 new_const_op_assign(struct parser_params *p, NODE *lhs, ID op, NODE *rhs, const YYLTYPE *loc)
16546 {
16547     NODE *asgn;
16548 
16549     if (lhs) {
16550 	asgn = NEW_OP_CDECL(lhs, op, rhs, loc);
16551     }
16552     else {
16553 	asgn = NEW_BEGIN(0, loc);
16554     }
16555     fixpos(asgn, lhs);
16556     return asgn;
16557 }
16558 
16559 static NODE *
const_decl(struct parser_params * p,NODE * path,const YYLTYPE * loc)16560 const_decl(struct parser_params *p, NODE *path, const YYLTYPE *loc)
16561 {
16562     if (p->in_def) {
16563 	yyerror1(loc, "dynamic constant assignment");
16564     }
16565     return NEW_CDECL(0, 0, (path), loc);
16566 }
16567 #else
16568 static VALUE
const_decl(struct parser_params * p,VALUE path)16569 const_decl(struct parser_params *p, VALUE path)
16570 {
16571     if (p->in_def) {
16572 	path = dispatch1(assign_error, path);
16573 	ripper_error(p);
16574     }
16575     return path;
16576 }
16577 
16578 static VALUE
assign_error(struct parser_params * p,VALUE a)16579 assign_error(struct parser_params *p, VALUE a)
16580 {
16581     a = dispatch1(assign_error, a);
16582     ripper_error(p);
16583     return a;
16584 }
16585 
16586 static VALUE
var_field(struct parser_params * p,VALUE a)16587 var_field(struct parser_params *p, VALUE a)
16588 {
16589     return ripper_new_yylval(p, get_id(a), dispatch1(var_field, a), 0);
16590 }
16591 #endif
16592 
16593 #ifndef RIPPER
16594 static NODE *
new_bodystmt(struct parser_params * p,NODE * head,NODE * rescue,NODE * rescue_else,NODE * ensure,const YYLTYPE * loc)16595 new_bodystmt(struct parser_params *p, NODE *head, NODE *rescue, NODE *rescue_else, NODE *ensure, const YYLTYPE *loc)
16596 {
16597     NODE *result = head;
16598     if (rescue) {
16599         NODE *tmp = rescue_else ? rescue_else : rescue;
16600         YYLTYPE rescue_loc = code_loc_gen(&head->nd_loc, &tmp->nd_loc);
16601 
16602         result = NEW_RESCUE(head, rescue, rescue_else, &rescue_loc);
16603         nd_set_line(result, rescue->nd_loc.beg_pos.lineno);
16604     }
16605     else if (rescue_else) {
16606         result = block_append(p, result, rescue_else);
16607     }
16608     if (ensure) {
16609         result = NEW_ENSURE(result, ensure, loc);
16610     }
16611     fixpos(result, head);
16612     return result;
16613 }
16614 #endif
16615 
16616 static void
warn_unused_var(struct parser_params * p,struct local_vars * local)16617 warn_unused_var(struct parser_params *p, struct local_vars *local)
16618 {
16619     int i, cnt;
16620     ID *v, *u;
16621 
16622     if (!local->used) return;
16623     v = local->vars->tbl;
16624     u = local->used->tbl;
16625     cnt = local->used->pos;
16626     if (cnt != local->vars->pos) {
16627 	rb_parser_fatal(p, "local->used->pos != local->vars->pos");
16628     }
16629     for (i = 0; i < cnt; ++i) {
16630 	if (!v[i] || (u[i] & LVAR_USED)) continue;
16631 	if (is_private_local_id(v[i])) continue;
16632 	rb_warn1L((int)u[i], "assigned but unused variable - %"PRIsWARN, rb_id2str(v[i]));
16633     }
16634 }
16635 
16636 static void
local_push(struct parser_params * p,int toplevel_scope)16637 local_push(struct parser_params *p, int toplevel_scope)
16638 {
16639     struct local_vars *local;
16640     int inherits_dvars = toplevel_scope && (compile_for_eval || p->in_main /* is p->in_main really needed? */);
16641     int warn_unused_vars = RTEST(ruby_verbose);
16642 
16643     local = ALLOC(struct local_vars);
16644     local->prev = p->lvtbl;
16645     local->args = vtable_alloc(0);
16646     local->vars = vtable_alloc(inherits_dvars ? DVARS_INHERIT : DVARS_TOPSCOPE);
16647 #ifndef RIPPER
16648     if (toplevel_scope && compile_for_eval) warn_unused_vars = 0;
16649     if (toplevel_scope && e_option_supplied(p)) warn_unused_vars = 0;
16650 #endif
16651     local->used = warn_unused_vars ? vtable_alloc(0) : 0;
16652 
16653 # if WARN_PAST_SCOPE
16654     local->past = 0;
16655 # endif
16656     CMDARG_PUSH(0);
16657     COND_PUSH(0);
16658     p->lvtbl = local;
16659 }
16660 
16661 static void
local_pop(struct parser_params * p)16662 local_pop(struct parser_params *p)
16663 {
16664     struct local_vars *local = p->lvtbl->prev;
16665     if (p->lvtbl->used) {
16666 	warn_unused_var(p, p->lvtbl);
16667 	vtable_free(p->lvtbl->used);
16668     }
16669 # if WARN_PAST_SCOPE
16670     while (p->lvtbl->past) {
16671 	struct vtable *past = p->lvtbl->past;
16672 	p->lvtbl->past = past->prev;
16673 	vtable_free(past);
16674     }
16675 # endif
16676     vtable_free(p->lvtbl->args);
16677     vtable_free(p->lvtbl->vars);
16678     CMDARG_POP();
16679     COND_POP();
16680     ruby_sized_xfree(p->lvtbl, sizeof(*p->lvtbl));
16681     p->lvtbl = local;
16682 }
16683 
16684 #ifndef RIPPER
16685 static ID*
local_tbl(struct parser_params * p)16686 local_tbl(struct parser_params *p)
16687 {
16688     int cnt_args = vtable_size(p->lvtbl->args);
16689     int cnt_vars = vtable_size(p->lvtbl->vars);
16690     int cnt = cnt_args + cnt_vars;
16691     int i, j;
16692     ID *buf;
16693     rb_imemo_tmpbuf_t *tmpbuf = new_tmpbuf();
16694 
16695     if (cnt <= 0) return 0;
16696     buf = ALLOC_N(ID, cnt + 1);
16697     tmpbuf->ptr = (void *)buf;
16698     MEMCPY(buf+1, p->lvtbl->args->tbl, ID, cnt_args);
16699     /* remove IDs duplicated to warn shadowing */
16700     for (i = 0, j = cnt_args+1; i < cnt_vars; ++i) {
16701 	ID id = p->lvtbl->vars->tbl[i];
16702 	if (!vtable_included(p->lvtbl->args, id)) {
16703 	    buf[j++] = id;
16704 	}
16705     }
16706     if (--j < cnt) tmpbuf->ptr = (void *)REALLOC_N(buf, ID, (cnt = j) + 1);
16707     buf[0] = cnt;
16708 
16709     return buf;
16710 }
16711 #endif
16712 
16713 static void
arg_var(struct parser_params * p,ID id)16714 arg_var(struct parser_params *p, ID id)
16715 {
16716     vtable_add(p->lvtbl->args, id);
16717 }
16718 
16719 static void
local_var(struct parser_params * p,ID id)16720 local_var(struct parser_params *p, ID id)
16721 {
16722     vtable_add(p->lvtbl->vars, id);
16723     if (p->lvtbl->used) {
16724 	vtable_add(p->lvtbl->used, (ID)p->ruby_sourceline);
16725     }
16726 }
16727 
16728 static int
local_id_ref(struct parser_params * p,ID id,ID ** vidrefp)16729 local_id_ref(struct parser_params *p, ID id, ID **vidrefp)
16730 {
16731     struct vtable *vars, *args, *used;
16732 
16733     vars = p->lvtbl->vars;
16734     args = p->lvtbl->args;
16735     used = p->lvtbl->used;
16736 
16737     while (vars && !DVARS_TERMINAL_P(vars->prev)) {
16738 	vars = vars->prev;
16739 	args = args->prev;
16740 	if (used) used = used->prev;
16741     }
16742 
16743     if (vars && vars->prev == DVARS_INHERIT) {
16744 	return rb_local_defined(id, p->base_block);
16745     }
16746     else if (vtable_included(args, id)) {
16747 	return 1;
16748     }
16749     else {
16750 	int i = vtable_included(vars, id);
16751 	if (i && used && vidrefp) *vidrefp = &used->tbl[i-1];
16752 	return i != 0;
16753     }
16754 }
16755 
16756 static int
local_id(struct parser_params * p,ID id)16757 local_id(struct parser_params *p, ID id)
16758 {
16759     return local_id_ref(p, id, NULL);
16760 }
16761 
16762 static const struct vtable *
dyna_push(struct parser_params * p)16763 dyna_push(struct parser_params *p)
16764 {
16765     p->lvtbl->args = vtable_alloc(p->lvtbl->args);
16766     p->lvtbl->vars = vtable_alloc(p->lvtbl->vars);
16767     if (p->lvtbl->used) {
16768 	p->lvtbl->used = vtable_alloc(p->lvtbl->used);
16769     }
16770     return p->lvtbl->args;
16771 }
16772 
16773 static void
dyna_pop_vtable(struct parser_params * p,struct vtable ** vtblp)16774 dyna_pop_vtable(struct parser_params *p, struct vtable **vtblp)
16775 {
16776     struct vtable *tmp = *vtblp;
16777     *vtblp = tmp->prev;
16778 # if WARN_PAST_SCOPE
16779     if (p->past_scope_enabled) {
16780 	tmp->prev = p->lvtbl->past;
16781 	p->lvtbl->past = tmp;
16782 	return;
16783     }
16784 # endif
16785     vtable_free(tmp);
16786 }
16787 
16788 static void
dyna_pop_1(struct parser_params * p)16789 dyna_pop_1(struct parser_params *p)
16790 {
16791     struct vtable *tmp;
16792 
16793     if ((tmp = p->lvtbl->used) != 0) {
16794 	warn_unused_var(p, p->lvtbl);
16795 	p->lvtbl->used = p->lvtbl->used->prev;
16796 	vtable_free(tmp);
16797     }
16798     dyna_pop_vtable(p, &p->lvtbl->args);
16799     dyna_pop_vtable(p, &p->lvtbl->vars);
16800 }
16801 
16802 static void
dyna_pop(struct parser_params * p,const struct vtable * lvargs)16803 dyna_pop(struct parser_params *p, const struct vtable *lvargs)
16804 {
16805     while (p->lvtbl->args != lvargs) {
16806 	dyna_pop_1(p);
16807 	if (!p->lvtbl->args) {
16808 	    struct local_vars *local = p->lvtbl->prev;
16809 	    ruby_sized_xfree(p->lvtbl, sizeof(*p->lvtbl));
16810 	    p->lvtbl = local;
16811 	}
16812     }
16813     dyna_pop_1(p);
16814 }
16815 
16816 static int
dyna_in_block(struct parser_params * p)16817 dyna_in_block(struct parser_params *p)
16818 {
16819     return !DVARS_TERMINAL_P(p->lvtbl->vars) && p->lvtbl->vars->prev != DVARS_TOPSCOPE;
16820 }
16821 
16822 static int
dvar_defined_ref(struct parser_params * p,ID id,ID ** vidrefp)16823 dvar_defined_ref(struct parser_params *p, ID id, ID **vidrefp)
16824 {
16825     struct vtable *vars, *args, *used;
16826     int i;
16827 
16828     args = p->lvtbl->args;
16829     vars = p->lvtbl->vars;
16830     used = p->lvtbl->used;
16831 
16832     while (!DVARS_TERMINAL_P(vars)) {
16833 	if (vtable_included(args, id)) {
16834 	    return 1;
16835 	}
16836 	if ((i = vtable_included(vars, id)) != 0) {
16837 	    if (used && vidrefp) *vidrefp = &used->tbl[i-1];
16838 	    return 1;
16839 	}
16840 	args = args->prev;
16841 	vars = vars->prev;
16842 	if (!vidrefp) used = 0;
16843 	if (used) used = used->prev;
16844     }
16845 
16846     if (vars == DVARS_INHERIT) {
16847         return rb_dvar_defined(id, p->base_block);
16848     }
16849 
16850     return 0;
16851 }
16852 
16853 static int
dvar_defined(struct parser_params * p,ID id)16854 dvar_defined(struct parser_params *p, ID id)
16855 {
16856     return dvar_defined_ref(p, id, NULL);
16857 }
16858 
16859 static int
dvar_curr(struct parser_params * p,ID id)16860 dvar_curr(struct parser_params *p, ID id)
16861 {
16862     return (vtable_included(p->lvtbl->args, id) ||
16863 	    vtable_included(p->lvtbl->vars, id));
16864 }
16865 
16866 static void
reg_fragment_enc_error(struct parser_params * p,VALUE str,int c)16867 reg_fragment_enc_error(struct parser_params* p, VALUE str, int c)
16868 {
16869     compile_error(p,
16870         "regexp encoding option '%c' differs from source encoding '%s'",
16871         c, rb_enc_name(rb_enc_get(str)));
16872 }
16873 
16874 #ifndef RIPPER
16875 int
rb_reg_fragment_setenc(struct parser_params * p,VALUE str,int options)16876 rb_reg_fragment_setenc(struct parser_params* p, VALUE str, int options)
16877 {
16878     int c = RE_OPTION_ENCODING_IDX(options);
16879 
16880     if (c) {
16881 	int opt, idx;
16882 	rb_char_to_option_kcode(c, &opt, &idx);
16883 	if (idx != ENCODING_GET(str) &&
16884 	    rb_enc_str_coderange(str) != ENC_CODERANGE_7BIT) {
16885             goto error;
16886 	}
16887 	ENCODING_SET(str, idx);
16888     }
16889     else if (RE_OPTION_ENCODING_NONE(options)) {
16890         if (!ENCODING_IS_ASCII8BIT(str) &&
16891             rb_enc_str_coderange(str) != ENC_CODERANGE_7BIT) {
16892             c = 'n';
16893             goto error;
16894         }
16895 	rb_enc_associate(str, rb_ascii8bit_encoding());
16896     }
16897     else if (p->enc == rb_usascii_encoding()) {
16898 	if (rb_enc_str_coderange(str) != ENC_CODERANGE_7BIT) {
16899 	    /* raise in re.c */
16900 	    rb_enc_associate(str, rb_usascii_encoding());
16901 	}
16902 	else {
16903 	    rb_enc_associate(str, rb_ascii8bit_encoding());
16904 	}
16905     }
16906     return 0;
16907 
16908   error:
16909     return c;
16910 }
16911 
16912 static void
reg_fragment_setenc(struct parser_params * p,VALUE str,int options)16913 reg_fragment_setenc(struct parser_params* p, VALUE str, int options)
16914 {
16915     int c = rb_reg_fragment_setenc(p, str, options);
16916     if (c) reg_fragment_enc_error(p, str, c);
16917 }
16918 
16919 static int
reg_fragment_check(struct parser_params * p,VALUE str,int options)16920 reg_fragment_check(struct parser_params* p, VALUE str, int options)
16921 {
16922     VALUE err;
16923     reg_fragment_setenc(p, str, options);
16924     err = rb_reg_check_preprocess(str);
16925     if (err != Qnil) {
16926         err = rb_obj_as_string(err);
16927         compile_error(p, "%"PRIsVALUE, err);
16928 	return 0;
16929     }
16930     return 1;
16931 }
16932 
16933 typedef struct {
16934     struct parser_params* parser;
16935     rb_encoding *enc;
16936     NODE *succ_block;
16937     const YYLTYPE *loc;
16938 } reg_named_capture_assign_t;
16939 
16940 static int
reg_named_capture_assign_iter(const OnigUChar * name,const OnigUChar * name_end,int back_num,int * back_refs,OnigRegex regex,void * arg0)16941 reg_named_capture_assign_iter(const OnigUChar *name, const OnigUChar *name_end,
16942           int back_num, int *back_refs, OnigRegex regex, void *arg0)
16943 {
16944     reg_named_capture_assign_t *arg = (reg_named_capture_assign_t*)arg0;
16945     struct parser_params* p = arg->parser;
16946     rb_encoding *enc = arg->enc;
16947     long len = name_end - name;
16948     const char *s = (const char *)name;
16949     ID var;
16950     NODE *node, *succ;
16951 
16952     if (!len) return ST_CONTINUE;
16953     if (rb_enc_symname_type(s, len, enc, (1U<<ID_LOCAL)) != ID_LOCAL)
16954         return ST_CONTINUE;
16955 
16956     var = intern_cstr(s, len, enc);
16957     if (len < MAX_WORD_LENGTH && rb_reserved_word(s, (int)len)) {
16958 	if (!lvar_defined(p, var)) return ST_CONTINUE;
16959     }
16960     node = node_assign(p, assignable(p, var, 0, arg->loc), NEW_LIT(ID2SYM(var), arg->loc), arg->loc);
16961     succ = arg->succ_block;
16962     if (!succ) succ = NEW_BEGIN(0, arg->loc);
16963     succ = block_append(p, succ, node);
16964     arg->succ_block = succ;
16965     return ST_CONTINUE;
16966 }
16967 
16968 static NODE *
reg_named_capture_assign(struct parser_params * p,VALUE regexp,const YYLTYPE * loc)16969 reg_named_capture_assign(struct parser_params* p, VALUE regexp, const YYLTYPE *loc)
16970 {
16971     reg_named_capture_assign_t arg;
16972 
16973     arg.parser = p;
16974     arg.enc = rb_enc_get(regexp);
16975     arg.succ_block = 0;
16976     arg.loc = loc;
16977     onig_foreach_name(RREGEXP_PTR(regexp), reg_named_capture_assign_iter, &arg);
16978 
16979     if (!arg.succ_block) return 0;
16980     return arg.succ_block->nd_next;
16981 }
16982 
16983 static VALUE
parser_reg_compile(struct parser_params * p,VALUE str,int options)16984 parser_reg_compile(struct parser_params* p, VALUE str, int options)
16985 {
16986     reg_fragment_setenc(p, str, options);
16987     return rb_parser_reg_compile(p, str, options);
16988 }
16989 
16990 VALUE
rb_parser_reg_compile(struct parser_params * p,VALUE str,int options)16991 rb_parser_reg_compile(struct parser_params* p, VALUE str, int options)
16992 {
16993     return rb_reg_compile(str, options & RE_OPTION_MASK, p->ruby_sourcefile, p->ruby_sourceline);
16994 }
16995 
16996 static VALUE
reg_compile(struct parser_params * p,VALUE str,int options)16997 reg_compile(struct parser_params* p, VALUE str, int options)
16998 {
16999     VALUE re;
17000     VALUE err;
17001 
17002     err = rb_errinfo();
17003     re = parser_reg_compile(p, str, options);
17004     if (NIL_P(re)) {
17005 	VALUE m = rb_attr_get(rb_errinfo(), idMesg);
17006 	rb_set_errinfo(err);
17007 	compile_error(p, "%"PRIsVALUE, m);
17008 	return Qnil;
17009     }
17010     return re;
17011 }
17012 #else
17013 static VALUE
parser_reg_compile(struct parser_params * p,VALUE str,int options,VALUE * errmsg)17014 parser_reg_compile(struct parser_params* p, VALUE str, int options, VALUE *errmsg)
17015 {
17016     VALUE err = rb_errinfo();
17017     VALUE re;
17018     int c = rb_reg_fragment_setenc(p, str, options);
17019     if (c) reg_fragment_enc_error(p, str, c);
17020     re = rb_parser_reg_compile(p, str, options);
17021     if (NIL_P(re)) {
17022 	*errmsg = rb_attr_get(rb_errinfo(), idMesg);
17023 	rb_set_errinfo(err);
17024     }
17025     return re;
17026 }
17027 #endif
17028 
17029 #ifndef RIPPER
17030 void
rb_parser_set_options(VALUE vparser,int print,int loop,int chomp,int split)17031 rb_parser_set_options(VALUE vparser, int print, int loop, int chomp, int split)
17032 {
17033     struct parser_params *p;
17034     TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, p);
17035     p->do_print = print;
17036     p->do_loop = loop;
17037     p->do_chomp = chomp;
17038     p->do_split = split;
17039 }
17040 
17041 void
rb_parser_warn_location(VALUE vparser,int warn)17042 rb_parser_warn_location(VALUE vparser, int warn)
17043 {
17044     struct parser_params *p;
17045     TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, p);
17046     p->warn_location = warn;
17047 }
17048 
17049 static NODE *
parser_append_options(struct parser_params * p,NODE * node)17050 parser_append_options(struct parser_params *p, NODE *node)
17051 {
17052     static const YYLTYPE default_location = {{1, 0}, {1, 0}};
17053     const YYLTYPE *const LOC = &default_location;
17054 
17055     if (p->do_print) {
17056 	NODE *print = NEW_FCALL(rb_intern("print"),
17057 				NEW_ARRAY(NEW_GVAR(idLASTLINE, LOC), LOC),
17058 				LOC);
17059 	node = block_append(p, node, print);
17060     }
17061 
17062     if (p->do_loop) {
17063 	if (p->do_split) {
17064 	    NODE *split = NEW_GASGN(rb_intern("$F"),
17065 				    NEW_CALL(NEW_GVAR(idLASTLINE, LOC),
17066 					     rb_intern("split"), 0, LOC),
17067 				    LOC);
17068 	    node = block_append(p, split, node);
17069 	}
17070 	if (p->do_chomp) {
17071 	    NODE *chomp = NEW_CALL(NEW_GVAR(idLASTLINE, LOC),
17072 				   rb_intern("chomp!"), 0, LOC);
17073 	    node = block_append(p, chomp, node);
17074 	}
17075 
17076 	node = NEW_WHILE(NEW_VCALL(idGets, LOC), node, 1, LOC);
17077     }
17078 
17079     return node;
17080 }
17081 
17082 void
rb_init_parse(void)17083 rb_init_parse(void)
17084 {
17085     /* just to suppress unused-function warnings */
17086     (void)nodetype;
17087     (void)nodeline;
17088 }
17089 #endif /* !RIPPER */
17090 
17091 static ID
internal_id(struct parser_params * p)17092 internal_id(struct parser_params *p)
17093 {
17094     const ID max_id = RB_ID_SERIAL_MAX & ~0xffff;
17095     ID id = (ID)vtable_size(p->lvtbl->args) + (ID)vtable_size(p->lvtbl->vars);
17096     id = max_id - id;
17097     return ID_STATIC_SYM | ID_INTERNAL | (id << ID_SCOPE_SHIFT);
17098 }
17099 
17100 static void
parser_initialize(struct parser_params * p)17101 parser_initialize(struct parser_params *p)
17102 {
17103     /* note: we rely on TypedData_Make_Struct to set most fields to 0 */
17104     p->command_start = TRUE;
17105     p->ruby_sourcefile_string = Qnil;
17106     p->lex.lpar_beg = -1; /* make lambda_beginning_p() == FALSE at first */
17107     p->node_id = 0;
17108 #ifdef RIPPER
17109     p->delayed = Qnil;
17110     p->result = Qnil;
17111     p->parsing_thread = Qnil;
17112 #else
17113     p->error_buffer = Qfalse;
17114 #endif
17115     p->debug_buffer = Qnil;
17116     p->debug_output = rb_stdout;
17117     p->enc = rb_utf8_encoding();
17118 }
17119 
17120 #ifdef RIPPER
17121 #define parser_mark ripper_parser_mark
17122 #define parser_free ripper_parser_free
17123 #endif
17124 
17125 static void
parser_mark(void * ptr)17126 parser_mark(void *ptr)
17127 {
17128     struct parser_params *p = (struct parser_params*)ptr;
17129 
17130     rb_gc_mark(p->lex.input);
17131     rb_gc_mark(p->lex.prevline);
17132     rb_gc_mark(p->lex.lastline);
17133     rb_gc_mark(p->lex.nextline);
17134     rb_gc_mark(p->ruby_sourcefile_string);
17135     rb_gc_mark((VALUE)p->lex.strterm);
17136     rb_gc_mark((VALUE)p->ast);
17137 #ifndef RIPPER
17138     rb_gc_mark(p->debug_lines);
17139     rb_gc_mark(p->compile_option);
17140     rb_gc_mark(p->error_buffer);
17141 #else
17142     rb_gc_mark(p->delayed);
17143     rb_gc_mark(p->value);
17144     rb_gc_mark(p->result);
17145     rb_gc_mark(p->parsing_thread);
17146 #endif
17147     rb_gc_mark(p->debug_buffer);
17148     rb_gc_mark(p->debug_output);
17149 #ifdef YYMALLOC
17150     rb_gc_mark((VALUE)p->heap);
17151 #endif
17152 }
17153 
17154 static void
parser_free(void * ptr)17155 parser_free(void *ptr)
17156 {
17157     struct parser_params *p = (struct parser_params*)ptr;
17158     struct local_vars *local, *prev;
17159 
17160     if (p->tokenbuf) {
17161         ruby_sized_xfree(p->tokenbuf, p->toksiz);
17162     }
17163     for (local = p->lvtbl; local; local = prev) {
17164 	if (local->vars) xfree(local->vars);
17165 	prev = local->prev;
17166 	xfree(local);
17167     }
17168     {
17169 	token_info *ptinfo;
17170 	while ((ptinfo = p->token_info) != 0) {
17171 	    p->token_info = ptinfo->next;
17172 	    xfree(ptinfo);
17173 	}
17174     }
17175     xfree(ptr);
17176 }
17177 
17178 static size_t
parser_memsize(const void * ptr)17179 parser_memsize(const void *ptr)
17180 {
17181     struct parser_params *p = (struct parser_params*)ptr;
17182     struct local_vars *local;
17183     size_t size = sizeof(*p);
17184 
17185     size += p->toksiz;
17186     for (local = p->lvtbl; local; local = local->prev) {
17187 	size += sizeof(*local);
17188 	if (local->vars) size += local->vars->capa * sizeof(ID);
17189     }
17190     return size;
17191 }
17192 
17193 static const rb_data_type_t parser_data_type = {
17194 #ifndef RIPPER
17195     "parser",
17196 #else
17197     "ripper",
17198 #endif
17199     {
17200 	parser_mark,
17201 	parser_free,
17202 	parser_memsize,
17203     },
17204     0, 0, RUBY_TYPED_FREE_IMMEDIATELY
17205 };
17206 
17207 #ifndef RIPPER
17208 #undef rb_reserved_word
17209 
17210 const struct kwtable *
rb_reserved_word(const char * str,unsigned int len)17211 rb_reserved_word(const char *str, unsigned int len)
17212 {
17213     return reserved_word(str, len);
17214 }
17215 
17216 VALUE
rb_parser_new(void)17217 rb_parser_new(void)
17218 {
17219     struct parser_params *p;
17220     VALUE parser = TypedData_Make_Struct(0, struct parser_params,
17221 					 &parser_data_type, p);
17222     parser_initialize(p);
17223     return parser;
17224 }
17225 
17226 VALUE
rb_parser_set_context(VALUE vparser,const struct rb_block * base,int main)17227 rb_parser_set_context(VALUE vparser, const struct rb_block *base, int main)
17228 {
17229     struct parser_params *p;
17230 
17231     TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, p);
17232     p->error_buffer = main ? Qfalse : Qnil;
17233     p->base_block = base;
17234     p->in_main = main;
17235     return vparser;
17236 }
17237 #endif
17238 
17239 #ifdef RIPPER
17240 #define rb_parser_end_seen_p ripper_parser_end_seen_p
17241 #define rb_parser_encoding ripper_parser_encoding
17242 #define rb_parser_get_yydebug ripper_parser_get_yydebug
17243 #define rb_parser_set_yydebug ripper_parser_set_yydebug
17244 static VALUE ripper_parser_end_seen_p(VALUE vparser);
17245 static VALUE ripper_parser_encoding(VALUE vparser);
17246 static VALUE ripper_parser_get_yydebug(VALUE self);
17247 static VALUE ripper_parser_set_yydebug(VALUE self, VALUE flag);
17248 
17249 /*
17250  *  call-seq:
17251  *    ripper.error?   -> Boolean
17252  *
17253  *  Return true if parsed source has errors.
17254  */
17255 static VALUE
ripper_error_p(VALUE vparser)17256 ripper_error_p(VALUE vparser)
17257 {
17258     struct parser_params *p;
17259 
17260     TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, p);
17261     return p->error_p ? Qtrue : Qfalse;
17262 }
17263 #endif
17264 
17265 /*
17266  *  call-seq:
17267  *    ripper.end_seen?   -> Boolean
17268  *
17269  *  Return true if parsed source ended by +\_\_END\_\_+.
17270  */
17271 VALUE
rb_parser_end_seen_p(VALUE vparser)17272 rb_parser_end_seen_p(VALUE vparser)
17273 {
17274     struct parser_params *p;
17275 
17276     TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, p);
17277     return p->ruby__end__seen ? Qtrue : Qfalse;
17278 }
17279 
17280 /*
17281  *  call-seq:
17282  *    ripper.encoding   -> encoding
17283  *
17284  *  Return encoding of the source.
17285  */
17286 VALUE
rb_parser_encoding(VALUE vparser)17287 rb_parser_encoding(VALUE vparser)
17288 {
17289     struct parser_params *p;
17290 
17291     TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, p);
17292     return rb_enc_from_encoding(p->enc);
17293 }
17294 
17295 /*
17296  *  call-seq:
17297  *    ripper.yydebug   -> true or false
17298  *
17299  *  Get yydebug.
17300  */
17301 VALUE
rb_parser_get_yydebug(VALUE self)17302 rb_parser_get_yydebug(VALUE self)
17303 {
17304     struct parser_params *p;
17305 
17306     TypedData_Get_Struct(self, struct parser_params, &parser_data_type, p);
17307     return p->debug ? Qtrue : Qfalse;
17308 }
17309 
17310 /*
17311  *  call-seq:
17312  *    ripper.yydebug = flag
17313  *
17314  *  Set yydebug.
17315  */
17316 VALUE
rb_parser_set_yydebug(VALUE self,VALUE flag)17317 rb_parser_set_yydebug(VALUE self, VALUE flag)
17318 {
17319     struct parser_params *p;
17320 
17321     TypedData_Get_Struct(self, struct parser_params, &parser_data_type, p);
17322     p->debug = RTEST(flag);
17323     return flag;
17324 }
17325 
17326 #ifndef RIPPER
17327 #ifdef YYMALLOC
17328 #define HEAPCNT(n, size) ((n) * (size) / sizeof(YYSTYPE))
17329 /* Keep the order; NEWHEAP then xmalloc and ADD2HEAP to get rid of
17330  * potential memory leak */
17331 #define NEWHEAP() rb_imemo_tmpbuf_parser_heap(0, p->heap, 0)
17332 #define ADD2HEAP(new, cnt, ptr) ((p->heap = (new))->ptr = (ptr), \
17333 			   (new)->cnt = (cnt), (ptr))
17334 
17335 void *
rb_parser_malloc(struct parser_params * p,size_t size)17336 rb_parser_malloc(struct parser_params *p, size_t size)
17337 {
17338     size_t cnt = HEAPCNT(1, size);
17339     rb_imemo_tmpbuf_t *n = NEWHEAP();
17340     void *ptr = xmalloc(size);
17341 
17342     return ADD2HEAP(n, cnt, ptr);
17343 }
17344 
17345 void *
rb_parser_calloc(struct parser_params * p,size_t nelem,size_t size)17346 rb_parser_calloc(struct parser_params *p, size_t nelem, size_t size)
17347 {
17348     size_t cnt = HEAPCNT(nelem, size);
17349     rb_imemo_tmpbuf_t *n = NEWHEAP();
17350     void *ptr = xcalloc(nelem, size);
17351 
17352     return ADD2HEAP(n, cnt, ptr);
17353 }
17354 
17355 void *
rb_parser_realloc(struct parser_params * p,void * ptr,size_t size)17356 rb_parser_realloc(struct parser_params *p, void *ptr, size_t size)
17357 {
17358     rb_imemo_tmpbuf_t *n;
17359     size_t cnt = HEAPCNT(1, size);
17360 
17361     if (ptr && (n = p->heap) != NULL) {
17362 	do {
17363 	    if (n->ptr == ptr) {
17364 		n->ptr = ptr = xrealloc(ptr, size);
17365 		if (n->cnt) n->cnt = cnt;
17366 		return ptr;
17367 	    }
17368 	} while ((n = n->next) != NULL);
17369     }
17370     n = NEWHEAP();
17371     ptr = xrealloc(ptr, size);
17372     return ADD2HEAP(n, cnt, ptr);
17373 }
17374 
17375 void
rb_parser_free(struct parser_params * p,void * ptr)17376 rb_parser_free(struct parser_params *p, void *ptr)
17377 {
17378     rb_imemo_tmpbuf_t **prev = &p->heap, *n;
17379 
17380     while ((n = *prev) != NULL) {
17381 	if (n->ptr == ptr) {
17382 	    *prev = n->next;
17383 	    rb_gc_force_recycle((VALUE)n);
17384 	    break;
17385 	}
17386 	prev = &n->next;
17387     }
17388     xfree(ptr);
17389 }
17390 #endif
17391 
17392 void
rb_parser_printf(struct parser_params * p,const char * fmt,...)17393 rb_parser_printf(struct parser_params *p, const char *fmt, ...)
17394 {
17395     va_list ap;
17396     VALUE mesg = p->debug_buffer;
17397 
17398     if (NIL_P(mesg)) p->debug_buffer = mesg = rb_str_new(0, 0);
17399     va_start(ap, fmt);
17400     rb_str_vcatf(mesg, fmt, ap);
17401     va_end(ap);
17402     if (RSTRING_END(mesg)[-1] == '\n') {
17403 	rb_io_write(p->debug_output, mesg);
17404 	p->debug_buffer = Qnil;
17405     }
17406 }
17407 
17408 static void
parser_compile_error(struct parser_params * p,const char * fmt,...)17409 parser_compile_error(struct parser_params *p, const char *fmt, ...)
17410 {
17411     va_list ap;
17412 
17413     rb_io_flush(p->debug_output);
17414     p->error_p = 1;
17415     va_start(ap, fmt);
17416     p->error_buffer =
17417 	rb_syntax_error_append(p->error_buffer,
17418 			       p->ruby_sourcefile_string,
17419 			       p->ruby_sourceline,
17420 			       rb_long2int(p->lex.pcur - p->lex.pbeg),
17421 			       p->enc, fmt, ap);
17422     va_end(ap);
17423 }
17424 #endif
17425 
17426 #ifdef RIPPER
17427 #ifdef RIPPER_DEBUG
17428 extern int rb_is_pointer_to_heap(VALUE);
17429 
17430 /* :nodoc: */
17431 static VALUE
ripper_validate_object(VALUE self,VALUE x)17432 ripper_validate_object(VALUE self, VALUE x)
17433 {
17434     if (x == Qfalse) return x;
17435     if (x == Qtrue) return x;
17436     if (x == Qnil) return x;
17437     if (x == Qundef)
17438         rb_raise(rb_eArgError, "Qundef given");
17439     if (FIXNUM_P(x)) return x;
17440     if (SYMBOL_P(x)) return x;
17441     if (!rb_is_pointer_to_heap(x))
17442         rb_raise(rb_eArgError, "invalid pointer: %p", x);
17443     switch (BUILTIN_TYPE(x)) {
17444       case T_STRING:
17445       case T_OBJECT:
17446       case T_ARRAY:
17447       case T_BIGNUM:
17448       case T_FLOAT:
17449       case T_COMPLEX:
17450       case T_RATIONAL:
17451         return x;
17452       case T_NODE:
17453 	if (nd_type(x) != NODE_RIPPER) {
17454 	    rb_raise(rb_eArgError, "NODE given: %p", x);
17455 	}
17456 	return ((NODE *)x)->nd_rval;
17457       default:
17458         rb_raise(rb_eArgError, "wrong type of ruby object: %p (%s)",
17459                  x, rb_obj_classname(x));
17460     }
17461     return x;
17462 }
17463 #endif
17464 
17465 #define validate(x) ((x) = get_value(x))
17466 
17467 static VALUE
ripper_dispatch0(struct parser_params * p,ID mid)17468 ripper_dispatch0(struct parser_params *p, ID mid)
17469 {
17470     return rb_funcall(p->value, mid, 0);
17471 }
17472 
17473 static VALUE
ripper_dispatch1(struct parser_params * p,ID mid,VALUE a)17474 ripper_dispatch1(struct parser_params *p, ID mid, VALUE a)
17475 {
17476     validate(a);
17477     return rb_funcall(p->value, mid, 1, a);
17478 }
17479 
17480 static VALUE
ripper_dispatch2(struct parser_params * p,ID mid,VALUE a,VALUE b)17481 ripper_dispatch2(struct parser_params *p, ID mid, VALUE a, VALUE b)
17482 {
17483     validate(a);
17484     validate(b);
17485     return rb_funcall(p->value, mid, 2, a, b);
17486 }
17487 
17488 static VALUE
ripper_dispatch3(struct parser_params * p,ID mid,VALUE a,VALUE b,VALUE c)17489 ripper_dispatch3(struct parser_params *p, ID mid, VALUE a, VALUE b, VALUE c)
17490 {
17491     validate(a);
17492     validate(b);
17493     validate(c);
17494     return rb_funcall(p->value, mid, 3, a, b, c);
17495 }
17496 
17497 static VALUE
ripper_dispatch4(struct parser_params * p,ID mid,VALUE a,VALUE b,VALUE c,VALUE d)17498 ripper_dispatch4(struct parser_params *p, ID mid, VALUE a, VALUE b, VALUE c, VALUE d)
17499 {
17500     validate(a);
17501     validate(b);
17502     validate(c);
17503     validate(d);
17504     return rb_funcall(p->value, mid, 4, a, b, c, d);
17505 }
17506 
17507 static VALUE
ripper_dispatch5(struct parser_params * p,ID mid,VALUE a,VALUE b,VALUE c,VALUE d,VALUE e)17508 ripper_dispatch5(struct parser_params *p, ID mid, VALUE a, VALUE b, VALUE c, VALUE d, VALUE e)
17509 {
17510     validate(a);
17511     validate(b);
17512     validate(c);
17513     validate(d);
17514     validate(e);
17515     return rb_funcall(p->value, mid, 5, a, b, c, d, e);
17516 }
17517 
17518 static VALUE
ripper_dispatch7(struct parser_params * p,ID mid,VALUE a,VALUE b,VALUE c,VALUE d,VALUE e,VALUE f,VALUE g)17519 ripper_dispatch7(struct parser_params *p, ID mid, VALUE a, VALUE b, VALUE c, VALUE d, VALUE e, VALUE f, VALUE g)
17520 {
17521     validate(a);
17522     validate(b);
17523     validate(c);
17524     validate(d);
17525     validate(e);
17526     validate(f);
17527     validate(g);
17528     return rb_funcall(p->value, mid, 7, a, b, c, d, e, f, g);
17529 }
17530 
17531 static ID
ripper_get_id(VALUE v)17532 ripper_get_id(VALUE v)
17533 {
17534     NODE *nd;
17535     if (!RB_TYPE_P(v, T_NODE)) return 0;
17536     nd = (NODE *)v;
17537     if (nd_type(nd) != NODE_RIPPER) return 0;
17538     return nd->nd_vid;
17539 }
17540 
17541 static VALUE
ripper_get_value(VALUE v)17542 ripper_get_value(VALUE v)
17543 {
17544     NODE *nd;
17545     if (v == Qundef) return Qnil;
17546     if (!RB_TYPE_P(v, T_NODE)) return v;
17547     nd = (NODE *)v;
17548     if (nd_type(nd) != NODE_RIPPER) return Qnil;
17549     return nd->nd_rval;
17550 }
17551 
17552 static void
ripper_error(struct parser_params * p)17553 ripper_error(struct parser_params *p)
17554 {
17555     p->error_p = TRUE;
17556 }
17557 
17558 static void
ripper_compile_error(struct parser_params * p,const char * fmt,...)17559 ripper_compile_error(struct parser_params *p, const char *fmt, ...)
17560 {
17561     VALUE str;
17562     va_list args;
17563 
17564     va_start(args, fmt);
17565     str = rb_vsprintf(fmt, args);
17566     va_end(args);
17567     rb_funcall(p->value, rb_intern("compile_error"), 1, str);
17568     ripper_error(p);
17569 }
17570 
17571 static VALUE
ripper_lex_get_generic(struct parser_params * p,VALUE src)17572 ripper_lex_get_generic(struct parser_params *p, VALUE src)
17573 {
17574     VALUE line = rb_funcallv_public(src, id_gets, 0, 0);
17575     if (!NIL_P(line) && !RB_TYPE_P(line, T_STRING)) {
17576 	rb_raise(rb_eTypeError,
17577 		 "gets returned %"PRIsVALUE" (expected String or nil)",
17578 		 rb_obj_class(line));
17579     }
17580     return line;
17581 }
17582 
17583 static VALUE
ripper_lex_io_get(struct parser_params * p,VALUE src)17584 ripper_lex_io_get(struct parser_params *p, VALUE src)
17585 {
17586     return rb_io_gets(src);
17587 }
17588 
17589 static VALUE
ripper_s_allocate(VALUE klass)17590 ripper_s_allocate(VALUE klass)
17591 {
17592     struct parser_params *p;
17593     VALUE self = TypedData_Make_Struct(klass, struct parser_params,
17594 				       &parser_data_type, p);
17595     p->value = self;
17596     return self;
17597 }
17598 
17599 #define ripper_initialized_p(r) ((r)->lex.input != 0)
17600 
17601 /*
17602  *  call-seq:
17603  *    Ripper.new(src, filename="(ripper)", lineno=1) -> ripper
17604  *
17605  *  Create a new Ripper object.
17606  *  _src_ must be a String, an IO, or an Object which has #gets method.
17607  *
17608  *  This method does not starts parsing.
17609  *  See also Ripper#parse and Ripper.parse.
17610  */
17611 static VALUE
ripper_initialize(int argc,VALUE * argv,VALUE self)17612 ripper_initialize(int argc, VALUE *argv, VALUE self)
17613 {
17614     struct parser_params *p;
17615     VALUE src, fname, lineno;
17616 
17617     TypedData_Get_Struct(self, struct parser_params, &parser_data_type, p);
17618     rb_scan_args(argc, argv, "12", &src, &fname, &lineno);
17619     if (RB_TYPE_P(src, T_FILE)) {
17620         p->lex.gets = ripper_lex_io_get;
17621     }
17622     else if (rb_respond_to(src, id_gets)) {
17623         p->lex.gets = ripper_lex_get_generic;
17624     }
17625     else {
17626         StringValue(src);
17627         p->lex.gets = lex_get_str;
17628     }
17629     p->lex.input = src;
17630     p->eofp = 0;
17631     if (NIL_P(fname)) {
17632         fname = STR_NEW2("(ripper)");
17633 	OBJ_FREEZE(fname);
17634     }
17635     else {
17636 	StringValueCStr(fname);
17637 	fname = rb_str_new_frozen(fname);
17638     }
17639     parser_initialize(p);
17640 
17641     p->ruby_sourcefile_string = fname;
17642     p->ruby_sourcefile = RSTRING_PTR(fname);
17643     p->ruby_sourceline = NIL_P(lineno) ? 0 : NUM2INT(lineno) - 1;
17644 
17645     return Qnil;
17646 }
17647 
17648 static VALUE
ripper_parse0(VALUE parser_v)17649 ripper_parse0(VALUE parser_v)
17650 {
17651     struct parser_params *p;
17652 
17653     TypedData_Get_Struct(parser_v, struct parser_params, &parser_data_type, p);
17654     parser_prepare(p);
17655     p->ast = rb_ast_new();
17656     ripper_yyparse((void*)p);
17657     rb_ast_dispose(p->ast);
17658     p->ast = 0;
17659     return p->result;
17660 }
17661 
17662 static VALUE
ripper_ensure(VALUE parser_v)17663 ripper_ensure(VALUE parser_v)
17664 {
17665     struct parser_params *p;
17666 
17667     TypedData_Get_Struct(parser_v, struct parser_params, &parser_data_type, p);
17668     p->parsing_thread = Qnil;
17669     return Qnil;
17670 }
17671 
17672 /*
17673  *  call-seq:
17674  *    ripper.parse
17675  *
17676  *  Start parsing and returns the value of the root action.
17677  */
17678 static VALUE
ripper_parse(VALUE self)17679 ripper_parse(VALUE self)
17680 {
17681     struct parser_params *p;
17682 
17683     TypedData_Get_Struct(self, struct parser_params, &parser_data_type, p);
17684     if (!ripper_initialized_p(p)) {
17685         rb_raise(rb_eArgError, "method called for uninitialized object");
17686     }
17687     if (!NIL_P(p->parsing_thread)) {
17688         if (p->parsing_thread == rb_thread_current())
17689             rb_raise(rb_eArgError, "Ripper#parse is not reentrant");
17690         else
17691             rb_raise(rb_eArgError, "Ripper#parse is not multithread-safe");
17692     }
17693     p->parsing_thread = rb_thread_current();
17694     rb_ensure(ripper_parse0, self, ripper_ensure, self);
17695 
17696     return p->result;
17697 }
17698 
17699 /*
17700  *  call-seq:
17701  *    ripper.column   -> Integer
17702  *
17703  *  Return column number of current parsing line.
17704  *  This number starts from 0.
17705  */
17706 static VALUE
ripper_column(VALUE self)17707 ripper_column(VALUE self)
17708 {
17709     struct parser_params *p;
17710     long col;
17711 
17712     TypedData_Get_Struct(self, struct parser_params, &parser_data_type, p);
17713     if (!ripper_initialized_p(p)) {
17714         rb_raise(rb_eArgError, "method called for uninitialized object");
17715     }
17716     if (NIL_P(p->parsing_thread)) return Qnil;
17717     col = p->lex.ptok - p->lex.pbeg;
17718     return LONG2NUM(col);
17719 }
17720 
17721 /*
17722  *  call-seq:
17723  *    ripper.filename   -> String
17724  *
17725  *  Return current parsing filename.
17726  */
17727 static VALUE
ripper_filename(VALUE self)17728 ripper_filename(VALUE self)
17729 {
17730     struct parser_params *p;
17731 
17732     TypedData_Get_Struct(self, struct parser_params, &parser_data_type, p);
17733     if (!ripper_initialized_p(p)) {
17734         rb_raise(rb_eArgError, "method called for uninitialized object");
17735     }
17736     return p->ruby_sourcefile_string;
17737 }
17738 
17739 /*
17740  *  call-seq:
17741  *    ripper.lineno   -> Integer
17742  *
17743  *  Return line number of current parsing line.
17744  *  This number starts from 1.
17745  */
17746 static VALUE
ripper_lineno(VALUE self)17747 ripper_lineno(VALUE self)
17748 {
17749     struct parser_params *p;
17750 
17751     TypedData_Get_Struct(self, struct parser_params, &parser_data_type, p);
17752     if (!ripper_initialized_p(p)) {
17753         rb_raise(rb_eArgError, "method called for uninitialized object");
17754     }
17755     if (NIL_P(p->parsing_thread)) return Qnil;
17756     return INT2NUM(p->ruby_sourceline);
17757 }
17758 
17759 /*
17760  *  call-seq:
17761  *    ripper.state   -> Integer
17762  *
17763  *  Return scanner state of current token.
17764  */
17765 static VALUE
ripper_state(VALUE self)17766 ripper_state(VALUE self)
17767 {
17768     struct parser_params *p;
17769 
17770     TypedData_Get_Struct(self, struct parser_params, &parser_data_type, p);
17771     if (!ripper_initialized_p(p)) {
17772 	rb_raise(rb_eArgError, "method called for uninitialized object");
17773     }
17774     if (NIL_P(p->parsing_thread)) return Qnil;
17775     return INT2NUM(p->lex.state);
17776 }
17777 
17778 #ifdef RIPPER_DEBUG
17779 /* :nodoc: */
17780 static VALUE
ripper_assert_Qundef(VALUE self,VALUE obj,VALUE msg)17781 ripper_assert_Qundef(VALUE self, VALUE obj, VALUE msg)
17782 {
17783     StringValue(msg);
17784     if (obj == Qundef) {
17785         rb_raise(rb_eArgError, "%"PRIsVALUE, msg);
17786     }
17787     return Qnil;
17788 }
17789 
17790 /* :nodoc: */
17791 static VALUE
ripper_value(VALUE self,VALUE obj)17792 ripper_value(VALUE self, VALUE obj)
17793 {
17794     return ULONG2NUM(obj);
17795 }
17796 #endif
17797 
17798 /*
17799  *  call-seq:
17800  *    Ripper.lex_state_name(integer)   -> string
17801  *
17802  *  Returns a string representation of lex_state.
17803  */
17804 static VALUE
ripper_lex_state_name(VALUE self,VALUE state)17805 ripper_lex_state_name(VALUE self, VALUE state)
17806 {
17807     return rb_parser_lex_state_name(NUM2INT(state));
17808 }
17809 
17810 void
Init_ripper(void)17811 Init_ripper(void)
17812 {
17813     ripper_init_eventids1();
17814     ripper_init_eventids2();
17815     id_warn = rb_intern_const("warn");
17816     id_warning = rb_intern_const("warning");
17817     id_gets = rb_intern_const("gets");
17818 
17819     InitVM(ripper);
17820 }
17821 
17822 void
InitVM_ripper(void)17823 InitVM_ripper(void)
17824 {
17825     VALUE Ripper;
17826 
17827     Ripper = rb_define_class("Ripper", rb_cObject);
17828     /* version of Ripper */
17829     rb_define_const(Ripper, "Version", rb_usascii_str_new2(RIPPER_VERSION));
17830     rb_define_alloc_func(Ripper, ripper_s_allocate);
17831     rb_define_method(Ripper, "initialize", ripper_initialize, -1);
17832     rb_define_method(Ripper, "parse", ripper_parse, 0);
17833     rb_define_method(Ripper, "column", ripper_column, 0);
17834     rb_define_method(Ripper, "filename", ripper_filename, 0);
17835     rb_define_method(Ripper, "lineno", ripper_lineno, 0);
17836     rb_define_method(Ripper, "state", ripper_state, 0);
17837     rb_define_method(Ripper, "end_seen?", rb_parser_end_seen_p, 0);
17838     rb_define_method(Ripper, "encoding", rb_parser_encoding, 0);
17839     rb_define_method(Ripper, "yydebug", rb_parser_get_yydebug, 0);
17840     rb_define_method(Ripper, "yydebug=", rb_parser_set_yydebug, 1);
17841     rb_define_method(Ripper, "error?", ripper_error_p, 0);
17842 #ifdef RIPPER_DEBUG
17843     rb_define_method(rb_mKernel, "assert_Qundef", ripper_assert_Qundef, 2);
17844     rb_define_method(rb_mKernel, "rawVALUE", ripper_value, 1);
17845     rb_define_method(rb_mKernel, "validate_object", ripper_validate_object, 1);
17846 #endif
17847 
17848     rb_define_singleton_method(Ripper, "dedent_string", parser_dedent_string, 2);
17849     rb_define_private_method(Ripper, "dedent_string", parser_dedent_string, 2);
17850 
17851     rb_define_singleton_method(Ripper, "lex_state_name", ripper_lex_state_name, 1);
17852 
17853     /* ignore newline, +/- is a sign. */
17854     rb_define_const(Ripper, "EXPR_BEG", INT2NUM(EXPR_BEG));
17855     /* newline significant, +/- is an operator. */
17856     rb_define_const(Ripper, "EXPR_END", INT2NUM(EXPR_END));
17857     /* ditto, and unbound braces. */
17858     rb_define_const(Ripper, "EXPR_ENDARG", INT2NUM(EXPR_ENDARG));
17859     /* ditto, and unbound braces. */
17860     rb_define_const(Ripper, "EXPR_ENDFN", INT2NUM(EXPR_ENDFN));
17861     /* newline significant, +/- is an operator. */
17862     rb_define_const(Ripper, "EXPR_ARG", INT2NUM(EXPR_ARG));
17863     /* newline significant, +/- is an operator. */
17864     rb_define_const(Ripper, "EXPR_CMDARG", INT2NUM(EXPR_CMDARG));
17865     /* newline significant, +/- is an operator. */
17866     rb_define_const(Ripper, "EXPR_MID", INT2NUM(EXPR_MID));
17867     /* ignore newline, no reserved words. */
17868     rb_define_const(Ripper, "EXPR_FNAME", INT2NUM(EXPR_FNAME));
17869     /* right after `.' or `::', no reserved words. */
17870     rb_define_const(Ripper, "EXPR_DOT", INT2NUM(EXPR_DOT));
17871     /* immediate after `class', no here document. */
17872     rb_define_const(Ripper, "EXPR_CLASS", INT2NUM(EXPR_CLASS));
17873     /* flag bit, label is allowed. */
17874     rb_define_const(Ripper, "EXPR_LABEL", INT2NUM(EXPR_LABEL));
17875     /* flag bit, just after a label. */
17876     rb_define_const(Ripper, "EXPR_LABELED", INT2NUM(EXPR_LABELED));
17877     /* symbol literal as FNAME. */
17878     rb_define_const(Ripper, "EXPR_FITEM", INT2NUM(EXPR_FITEM));
17879     /* equals to +EXPR_BEG+ */
17880     rb_define_const(Ripper, "EXPR_VALUE", INT2NUM(EXPR_VALUE));
17881     /* equals to <tt>(EXPR_BEG | EXPR_MID | EXPR_CLASS)</tt> */
17882     rb_define_const(Ripper, "EXPR_BEG_ANY", INT2NUM(EXPR_BEG_ANY));
17883     /* equals to <tt>(EXPR_ARG | EXPR_CMDARG)</tt> */
17884     rb_define_const(Ripper, "EXPR_ARG_ANY", INT2NUM(EXPR_ARG_ANY));
17885     /* equals to <tt>(EXPR_END | EXPR_ENDARG | EXPR_ENDFN)</tt> */
17886     rb_define_const(Ripper, "EXPR_END_ANY", INT2NUM(EXPR_END_ANY));
17887     /* equals to +0+ */
17888     rb_define_const(Ripper, "EXPR_NONE", INT2NUM(EXPR_NONE));
17889 
17890     ripper_init_eventids1_table(Ripper);
17891     ripper_init_eventids2_table(Ripper);
17892 
17893 # if 0
17894     /* Hack to let RDoc document SCRIPT_LINES__ */
17895 
17896     /*
17897      * When a Hash is assigned to +SCRIPT_LINES__+ the contents of files loaded
17898      * after the assignment will be added as an Array of lines with the file
17899      * name as the key.
17900      */
17901     rb_define_global_const("SCRIPT_LINES__", Qnil);
17902 #endif
17903 
17904 }
17905 #endif /* RIPPER */
17906